Elamur Research

Twist Bytes - German Dialect Identification with Data Mining Optimization

Paper · 2018 · Fernando Benites, Ralf Grubenmann, Pius von Däniken et al.

Summary

A transcription can preserve a clue to where someone speaks while leaving room for different spellings of the same word. It can also contain a short expression that speakers from several regions use in exactly the same way. Twist Bytes studies how to tell those cases apart in a text classification task at VarDial 2018. Given a transcribed sentence from an interview, the system had to assign it to Bern, Basel, Luzern or Zurich. A separate challenge added a dialect for which the training data contained no examples.

The authors train separate linear support vector machines, or SVMs, on different representations of each sentence. Some count sequences of words, some count sequences of characters, and some give more weight to sequences that occur in fewer sentences. Character pairs within words give a strong result by themselves. The system called TB-Meta adds the scores from the individual classifiers and learns how to turn the resulting pattern of scores into a final decision. A second system, TB-Hierarchical, first chooses between groups of dialects and then chooses a dialect within the selected group. The authors also investigate a training filter that removes sentences of one or two words, motivated by cases where identical short expressions carry different regional labels.

The hierarchy led among the systems implemented before submission on the development set, where the team compared its options. TB-Meta did better on the competition test set. Its submitted run scored 0.6464 macro F-1, a measure that gives each dialect equal weight. The paper describes the result as second place among 8 teams and notes that the organizers used a broader grouping for closely matched entries. After the competition, a TB-Meta experiment allowing 50k features per feature set reached 0.6511 macro F-1 on the same test set. That score belongs to a retrospective comparison.

For the surprise dialect, Twist Bytes used the confidence scores for the familiar dialects. If every score fell below a common threshold, the system assigned the sentence to the unfamiliar class. That submission achieved 0.5115 macro F-1 on the surprise test. The error analysis shows the difficulty of using low confidence for this purpose. The new dialect was frequently assigned to Bern or Luzern, and Luzern was already a difficult class in the task with familiar dialects alone.

Deep dive: Twist Bytes - German Dialect Identification with Data Mining Optimization

Twist Bytes identifies Swiss German dialects from transcribed sentences by combining character and word evidence, and tests how to flag an unseen dialect. · about 32 minutes to read

The problem and its context

What a regional label means in this task

The German Dialect Identification task starts with interview speech and gives the classifier a written sentence. The expected answer is the regional label associated with the speaker. Bern is represented as BE, Basel as BS, Luzern as LU and Zurich as ZH. The paper describes these as approximate regional groupings. Basel covers Basel-Stadt and Baselland, and the group called Luzern includes Luzern and Nidwalden. A prediction concerns membership in these benchmark classes. Within that setup, a word or phrase can be shared by speakers whose sentences have different expected labels.

The regions in the task are close enough for the paper to describe their positions as approximately a square with sides of 100 kilometers. The authors point out that even speakers from nearby regions can have difficulty understanding each other's dialects. The task gives the computer a narrower source of evidence than those speakers would have in conversation. It receives the transcription of a sentence. Its input preserves whatever distinctions the transcription convention and the transcriber represent in writing.

The ArchiMob corpus supplies the transcriptions. They use a convention associated with Dieth that is oriented towards pronunciation while drawing on standard German spelling habits and using the standard German alphabet. The convention can carry regional information in a written word, yet it records sound with less precision than the International Phonetic Alphabet. Transcription involves judgment even with guidelines, and the paper points to variable spellings as a complication. Its example is schön and schöön, both meaning beautiful and both carrying the Luzern label. The spellings differ in a way that matters to a system whose basic feature is the entire written word.

A classifier can deal with that example through characters. Features that depend on complete spellings treat the variants as distinct. A system that also counts adjacent characters can find overlapping evidence in them. Conversely, if a character sequence marks a spelling difference that occurs frequently in one region's transcriptions, a feature based on that sequence can help distinguish the region. This is the practical reason the authors expected character evidence to work well. Parts of words can be stable across spelling variation and can also be sensitive to the variation of interest.

Shared expressions create a different problem. An identical transcription can occur under different labels because those labels come from the speaker's region. In that case there is a difference between the answer required by the task and the information in the sentence. A classifier that sees the same written input on both occasions has the same evidence each time. It can learn that the expression is common or that one label is more plausible in its training examples. The sentence alone supplies no feature that can tell the two occurrences apart.

The paper places this work in a broader effort to build resources and tools for dialectal German. It points to the compilation of dialect corpora and to part-of-speech tagging as activities that can benefit from identifying the variety of the data. Tagging assigns grammatical categories to the words in a text. A regional distinction at the sentence level is a different annotation, but it helps describe the linguistic material to which such processing is applied. Twist Bytes evaluates that regional decision directly, using the task's sentence labels.

What the earlier competition had established

VarDial 2018 continued the dialect identification work described in the Findings of the VarDial Evaluation Campaign 2017. According to Twist Bytes, support vector machines had performed well with several kinds of text features. An SVM is a classifier that learns a decision boundary from labeled examples. In the linear version used here, each feature can contribute to the score for a class. This makes the classifier suited to a sentence representation with many possible features, most of which are absent from any individual sentence.

The closest predecessor identified by the authors is MAZA. That system trained SVMs on frequency features made from character sequences and individual words. An n-gram is a sequence of adjacent units, with the unit chosen to suit the representation. A character n-gram records a sequence of characters, and a word n-gram records a sequence of words. Once the base SVMs had produced predictions, MAZA gave those predictions to a random forest, a classifier that combines decisions from multiple trees. It used 10-fold cross-validation to obtain the inputs for that final classifier. In this setting cross-validation means repeatedly fitting on part of the training data and predicting on the part held aside.

Twist Bytes takes up the idea that classifiers looking at different representations can contribute distinct evidence. It extends the representations to include TF-IDF on characters as well as words. TF-IDF adjusts a feature's contribution using both its frequency in the current text and its distribution across texts. The team also changes the way scores reach the final classifier. MAZA puts the base outputs side by side. Twist Bytes first adds the scores for each dialect across its base classifiers, then uses a linear SVM to interpret the resulting totals. A separate branch of the project asks what happens when the dialect decision is broken down into choices between groups and then between members of a group.

The submissions were closed, so the team was restricted to the task data. This matters for both parts of the problem. For the main task, all evidence about the written forms of the labeled dialects had to come from the supplied examples. In the surprise task, the added dialect had no labeled training sentence. The team could learn what a confident or uncertain decision about the familiar dialects looked like, then use that information to decide whether to reject those labels. Its approach draws on thresholding in multi-label classification, where a classifier's score can be compared against a cutoff before assigning a label. The surprise task adapts that logic to an evaluation that still expects a single answer per sentence.

The method, step by step

Preparing sentences and keeping useful variation

The system starts with tokenization, the division of text into the units used for further processing. Twist Bytes uses whitespace to split the sentence into words and converts letters to lower-case. The procedure keeps common words that might be removed by a stopword filter. It also skips lemmatization, which would replace surface forms with a shared dictionary form. For a task in which the written form itself can distinguish dialects, either operation could erase a clue. Lowercasing is the normalization the authors accept at this stage.

There is also a separate choice about which sentences enter training. The Complete Training Set, or CTS, retains the supplied sentences. For the Reduced Training Set, or RTS, the authors drop the training sentences containing one or two words. A case that led them to try this rule was ja ja, meaning yes, yes. It appears with a Zurich label and with a Bern label. The label in each occurrence describes its speaker's region, so the conflict arises from a shared expression. The point of the filter is to see whether the classifier can learn clearer associations from training material with more context.

The rule uses sentence length as a proxy for ambiguity. It drops short sentences with clear regional cues along with short sentences that occur under multiple labels. Longer sentences remain available even when their texts are ambiguous. The reduction therefore changes the training distribution in a way that can be evaluated as a whole. The held-out sentences still pose the original task, including cases in which the written evidence is sparse.

From transcribed sentence to dialect decision

The steps in order.

From transcribed sentence to dialect decisionStep 1: Split at whitespace and lowercase the sentence1. Split at whitespace and lowercase the sentenceStep 2: Extract separate word and character feature sets2. Extract separate word and character feature setsStep 3: Score the dialects with each base classifier3. Score the dialects with each base classifierStep 4: Add the scores for each dialect4. Add the scores for each dialectStep 5: Predict through a final classifier or hierarchy5. Predict through a final classifier or hierarchy

Representing a sentence from several perspectives

Term frequency, abbreviated TF, records how frequently a feature appears in the sentence. The system can count individual words or adjacent sequences of words. It can also count characters or adjacent sequences of characters. The authors investigate n-gram lengths from 1 to 7. A longer sequence tracks a more specific form or phrase, while a shorter sequence has more chances to recur in other sentences. The feature experiments vary which lengths and weighting schemes the classifier sees together.

Word and character features give the classifier different ways to recognize something familiar. A whole word feature is sensitive to the spelling of that word and can be useful if the spelling recurs. A word sequence also captures local phrasing. Character features can still occur in a sentence whose words were absent from training, provided that parts of the spellings are familiar. This is why the system gives each feature family its own representation. The base classifier for a character representation can respond to partial overlap even when the whole-word classifier sees little relevant evidence.

The authors also vary how much a count contributes. Some versions use TF directly. Others normalize feature values, including a variant that places them in the range [0,1]. Normalization changes the numerical scale on which a linear classifier receives the values. The development comparison explicitly tests normalizing word TF, and the general feature inventory also names a normalized character TF representation. These are choices about the input values. The process of adding base classifier scores takes place later, after each representation has been used to fit a separate SVM.

TF-IDF incorporates the spread of a feature across the corpus. A feature that occurs in many sentences contributes differently from one concentrated in a smaller portion of the data, even when both occur equally often in the sentence being classified. Twist Bytes applies this weighting to word features and to character features. Character TF-IDF is an important extension of the earlier design because it lets the system distinguish widely shared fragments from fragments with narrower distributions. Whether a narrower distribution helps predict a dialect still depends on the classifier and the data.

A custom character analyzer gives the experiment its CB-C feature family. The standard character extraction discussed in the paper includes spaces among the characters it can use. The custom bigram version counts adjacent pairs within words and omits the pairs involving spaces at word edges. In schön and schöön, for instance, ch occurs in both spellings and öö occurs in the second. This example illustrates what the representation can see. The paper gives the spellings as evidence of transcription variation, while the classifier's tests measure the contribution of the full representation across sentences.

The authors mainly use scikit-learn for feature extraction and linear classification. They implement BM25 themselves because it was unavailable in scikit-learn 0.19.1. BM25 is another way to weight occurrences, and the paper highlights its treatment of document length. In this task the text being represented is a sentence. Their implementation sets the length-related parameter b to 0.5. The experiments introduce BM25 as an additional feature source in selected systems, allowing its contribution to be assessed alongside the word and character representations already in use.

The system also puts a ceiling on the number of features in each representation. This is separate from the maximum n-gram length. A range of lengths defines which sequences can be proposed as features. The cap limits how many distinct features can reach each base classifier. The team used a maximum of 20,000 per feature set in the competition. The test analysis later varies this limit for TB-Meta while keeping the surrounding architecture in place.

Turning separate predictions into a single score per dialect

The base learner is a linear SVM. Each classifier learns from the same task labels but receives one representation at a time. A word TF-IDF classifier and a within-word bigram classifier can therefore return different scores for the same sentence. The feature space for either classifier can be large and sparse. A sparse representation has many possible coordinates, with most carrying a value only when their corresponding pattern occurs in the current sentence. The implementation choice lets the authors work with these text features without requiring a linguistic analysis of every sentence.

The team also examined random forests, extreme gradient boosting and ARAM, an adaptive resonance associative map. The paper gives its strongest reported comparisons for SVMs and shows some explicit random-forest comparisons on the development data. A central choice within the SVM approach is whether to combine representations before fitting or to combine scores afterwards. In the first design, one long feature vector contains the inputs from the chosen representations and one SVM fits that vector. In the second, each representation has a separate SVM and the system adds their scores for each dialect.

The paper calls the score-adding system the S-Classifier. The following notation expresses its unweighted combination.

S(c, x) = ∑ᵢ sᵢ(c, x)

Here x is the sentence, c is a candidate class and i indexes the base classifiers. The term sᵢ(c, x) is the score given by base classifier i to that candidate for the sentence. The summation symbol ∑ means to add the scores over the base classifiers. S(c, x) is the resulting class score. The individual values are classifier scores, so the sum serves as evidence for choosing a label.

Used on its own, the S-Classifier chooses the class with the greatest total.

ĉ(x) = arg max[c ∈ C] S(c, x)

Here ĉ(x) is the class predicted for sentence x. The set C contains the candidate classes for the current decision. The notation c ∈ C means that c ranges over the members of that set. The operation arg max returns a class where the score is highest, and S(c, x) is the total just defined. In the ordinary flat decision, the candidates are the known dialects. In the hierarchy, the same operation can choose between dialect groups.

This design keeps the last stage small. However many feature coordinates contribute to the individual SVMs, score addition gives one total for each candidate class. The combined score for Bern, for instance, includes the Bern scores from the word and character classifiers. Those components can disagree about the sentence. Addition retains the net support for Bern while losing the information about which representation supplied it. TB-Meta makes that trade by design.

Training the final classifier in TB-Meta

A classifier trained to interpret base scores needs training examples that resemble the scores it will see on new sentences. If the base classifiers make predictions on the same examples they just learned from, the resulting scores may reflect that familiarity. TB-Meta uses cross-validation inside the training set to generate scores for sentences held out from the base fit that produced them.

The authors use a 10-fold arrangement. For each held-out fold, they train the base SVMs for the known dialects on the rest of the training data. Each fitted SVM predicts class scores on the held-out sentences using its assigned feature representation. For a given sentence and dialect, the scores are added across base classifiers. The saved record for that sentence consists of the totals for the dialects. Repeating the procedure across the folds produces a record for every training sentence.

The next fit uses these records and the original dialect labels. The final linear SVM has four input features and four possible output classes. Its inputs are the aggregate scores, one for each of Bern, Basel, Luzern and Zurich. Its target is the true label of the training sentence. A pattern that tends to accompany a mistake by the S-Classifier can now receive a different decision. For instance, the final SVM could learn that the balance between scores for Bern and Luzern is informative in combination with the scores for the other dialects. The authors motivate the extra classifier with this sort of recurring confusion. They do not specify a fixed hand-written correction for it.

The base classifiers are then fitted again using the full training set chosen for the system, either the reduced or complete version. At prediction time, these refitted SVMs produce the scores for the incoming sentence. The scores are added as they were during cross-validation, and the trained final SVM assigns the label. Cross-validation constructs the training inputs for the final SVM. Prediction on a new sentence uses the refitted base classifiers and the already fitted final SVM.

The authors describe TB-Meta as a way to avoid a manual search for weights. Its final SVM learns how the overall scores for each dialect should contribute to the decision. Since addition takes place first, the final SVM receives no separate coordinates for the output of each feature-specific classifier. It can change the influence of the combined Bern or Luzern score, for example, but it has no direct input saying how much of that score came from word TF-IDF. The paper reports that summation consistently helped in the sets investigated and suggests that giving the final classifier the separate outputs invited overfitting. The summed representation is the tested way of constraining that fit.

Making the decision in stages with TB-Hierarchical

The hierarchical system starts from the same idea of fitting one classifier per feature set and then adding scores. It changes the labels that the system considers at each stage. The known dialects are paired to form a balanced binary tree. At the root, a classifier learns to distinguish the groups. A possible group named by the authors is BS+LU, in which both Basel and Luzern examples count toward the same target at that stage.

After selecting a group, the system applies the S-Classifier trained to distinguish the dialects inside it. This second decision uses the original dialect labels. The first choice reduces the number of candidates, and the second settles the finer distinction. A wrong group choice also removes the true label from consideration. The grouping therefore determines which dialects can be contrasted in the final decision and which ones have to be separated at the root.

There are three balanced trees for the four task classes. The paper calls them H1, H2 and H3. Their difference is the pairing of the dialects, so the first decision asks a different question in each tree. This establishes a way to test whether the observed confusions are better handled by putting particular dialects together at the root or by asking the root to place them on different sides. It also changes which examples train each of the final dialect comparisons.

For the hierarchy, the authors apply explicit weights to the base scores and select values by grid search. A grid search evaluates settings drawn from specified candidate values. The weighted combination can be written as follows.

Sʷ(c, x) = ∑ᵢ wᵢ sᵢ(c, x)

The symbol Sʷ(c, x) denotes the weighted total for candidate c on sentence x. The superscript w distinguishes this total from the plain sum. Each i identifies a base classifier, wᵢ is its weight and sᵢ(c, x) is its score for the candidate. The summation adds the products of each weight and its corresponding score. Here c can stand for a dialect group at the root or a dialect within the selected group.

The search uses values between 0 and 1. The competition configuration assigns 1 to word TF-IDF and to the custom character bigram feature set. It assigns 0.5 to word TF and character TF-IDF, and 0.2 to character TF. These numbers describe the effect each classifier's scores have in the sum. A weight applies to a score after the underlying classifier has already learned from its own features.

Adding a label without training examples

The surprise system uses the score pattern for the known dialects to make room for a new answer. It asks whether any known class has enough support to be assigned. If even the greatest known-class score falls below a global threshold, all known classes are rejected and the sentence receives the label XY. Otherwise a familiar class remains eligible. This amounts to a test on the strongest score, even though the paper also describes the rule in terms of comparing every score to the threshold.

max[c ∈ C] q(c, x) < τ

The rule assigns XY when this condition holds. Here x denotes the sentence, C contains the known classes and c ∈ C runs over them. The value q(c, x) is the classifier score used for the threshold decision, and max chooses the largest such score. The symbol τ is the common threshold, and the inequality requires the largest score to be below it. A higher threshold makes rejection possible for some sentences that would have received a familiar label under a lower threshold.

The authors treat 0 as the point of indecision in the score setup and use a cutoff somewhat below it. They inspect known-class scores on the development data and consider their mean and standard deviation. The submitted setting is a common threshold of -0.3, chosen from a qualitative assessment of those predictions. The development data can help characterize how the classifier behaves on known dialects. The examples needed to see which thresholds actually recognize XY are in the surprise test set, so the paper's later searches with the gold labels answer a different question from the competition run.

Experiments and results

The splits and the meaning of the scores

The ordinary task uses training, development and test sets from the ArchiMob transcriptions. The training set differs slightly from the previous competition's training material, and the development set is the previous competition's test set. The counts provide a sense of scale and show how the examples are distributed across dialects.

DialectTraining sentencesDevelopment sentencesTest sentences
Bern35479851191
Basel310912971200
Luzern32629651186
Zurich35779091175

The difference between sentence counts and speaker counts is important for interpreting the split. The paper reports 3-7 training speakers per dialect and one development speaker per dialect. In the test set, Bern, Basel and the surprise class XY have one speaker each. Luzern and Zurich have two each. The authors say they could establish the test speaker counts only after the competition. The surprise set includes somewhat fewer examples of XY than of the familiar dialects. XY has no training examples.

The paper evaluates with macro and weighted F-1. For a dialect considered on its own, precision concerns how many sentences assigned to it actually have that label. Recall concerns how many sentences with that label the system retrieves. F-1 combines those quantities by taking their harmonic mean, so strong performance calls for both reliable assignments and good coverage. Macro F-1 averages the dialect scores with equal weight. Weighted F-1 gives a dialect's score influence in proportion to the number of examples of that dialect in the evaluation set. Both metrics therefore depend on the pattern of errors among the classes, and they can rank systems differently.

The development comparison reports a random-assignment baseline over 10 runs. Its weighted F-1 is 0.246 ± 0.003 and its macro F-1 is 0.250 ± 0.005. These are scores under random assignment on the development data, with the reported variation across runs. The test table separately records a random baseline of 0.2521 macro F-1. The paper also compares against MAZA's reported 0.662 macro F-1 from the 2017 task, whose test material serves as the 2018 development set. That historical result gives context for interpreting the development scores. The leading comparison for the competition itself comes from the submitted systems evaluated on the current test set.

What the development set favored

The authors start with linear SVMs and random forests using word frequency features, then try character information and combinations. The switch from word TF-IDF to custom within-word character bigrams gives a useful view of how much can be recovered from small pieces of a word. With complete training data, the word TF-IDF SVM reaches 0.6497 macro F-1 on development. The custom bigram SVM reaches 0.6739 under the same training condition. Its score is also above the reported MAZA result. The chart follows selected complete-training comparisons through the move to separate classifiers and normalized frequency features.

Selected feature systems on the GDI development set with complete training

The within-word bigram classifier is strong on its own, and the score-summing system with normalized word counts leads this comparison.

Selected feature systems on the GDI development set with complete trainingLinear SVM with word TF-IDF: 0.6497Linear SVM with word TF-IDF0.6497Linear SVM with within-word character bigrams: 0.6739Linear SVM with within-word characterbigrams0.6739Linear SVM with concatenated feature sets: 0.6730Linear SVM with concatenated featuresets0.6730Score summation over separate classifiers: 0.6829Score summation over separateclassifiers0.6829Score summation with normalized word TF (this paper): 0.6930Score summation with normalized word TF(this paper)0.6930
The numbers
System or settingMacro F-1
Linear SVM with word TF-IDF0.6497
Linear SVM with within-word character bigrams0.6739
Linear SVM with concatenated feature sets0.6730
Score summation over separate classifiers0.6829
Score summation with normalized word TF (this paper)0.6930

The concatenated and score-summing rows use the same collection of feature families. This gives the authors a comparison of two ways to combine the available information. The normalized word TF row comes from a further variant examined after the competition. Its development result helps explain the authors' interest in feature scaling, while the submission choices reflect which experiments they had completed at the time.

Among the approaches implemented before the competition, the hierarchy led on development. H3 was the most successful of the balanced trees there, and H1 was the weakest. For the meta-classifiers, the paper reports that training after dropping the short sentences consistently improved the development results. These findings informed the selection of the hierarchical and cross-validation systems for submission. An architecture that leads in this phase has done well on the set used to compare features, filters and other settings. The held-out competition then tests how well those choices transfer.

What the competition test set favored

The competition allowed 3 runs per task. Twist Bytes submitted versions of the two architectures based on its development work, and the final test ordering favored TB-Meta. The strongest submitted TB-Meta obtained 0.6464 macro F-1. SUKI led with 0.6857, and safina followed the submitted TB-Meta in the detailed score table with 0.6448. The paper describes Twist Bytes as second among 8 teams and explains that the official grouping was broader because several systems scored close together. The detailed scores show the ordering of the runs, and the organizers' grouping reflects the closeness the authors note.

Submitted classifiers on the 2018 GDI test set

TB-Meta has the strongest submitted Twist Bytes score and trails SUKI.

Submitted classifiers on the 2018 GDI test setSUKI: 0.6857SUKI0.6857TB-Meta (this paper): 0.6464TB-Meta (this paper)0.6464safina: 0.6448safina0.6448TB-Hierarchical: 0.6203TB-Hierarchical0.6203Random baseline: 0.2521Random baseline0.2521
The numbers
System or settingMacro F-1
SUKI0.6857
TB-Meta (this paper)0.6464
safina0.6448
TB-Hierarchical0.6203
Random baseline0.2521

TB-Hierarchical's 0.6203 macro F-1 is a reversal of the development ordering between the two architectures. The authors suggest that the weights chosen for the hierarchy may have fitted the development set too closely. The competition result is consistent with that explanation, while the experiment leaves other aspects of the hierarchy in play, including the grouping of the labels. The comparison demonstrates that the development preference for a particular design failed to carry over to the test set.

The paper also reports variants evaluated on the same test sentences after submission. With BM25, TB-Meta trained on the reduced set reached 0.6479 macro F-1. The complete-training version with BM25 reached 0.6485. Raising the feature allowance to 50k gave TB-Meta 0.6511, its highest value in the test table. These comparisons use the competition test data with its answer labels available to the authors. The submitted score still describes the performance of the configuration chosen before that analysis.

How the surprise submission handled the added dialect

With its development-selected global threshold of -0.3, the surprise submission scored 0.5115 macro F-1 and 0.5373 weighted F-1. Both numbers refer to the task that includes XY. They summarize the decisions across the candidate dialects, so they cannot be read as the F-1 of XY alone. Twist Bytes was the sole entrant for the surprise task, and that score records what its rejection rule achieved under the competition setup.

The authors later compare different thresholds using the gold test labels. In the sweep over a shared threshold, they report a peak of 0.518 macro F-1 around -0.12. They also try a separate cutoff for each known class. Their grid search over -0.4 to 0.1 yields 0.5230 macro F-1, with cutoffs of -0.2143 for Bern, -0.2571 for Basel, -0.1286 for Luzern and -0.0429 for Zurich. Per-class cutoffs let the threshold vary with how a particular classifier score tends to behave. The reported setting describes an optimization on this test set.

Threshold settings on the GDI surprise-dialect test set

With the gold labels available for tuning, class-specific cutoffs give the highest observed score.

Threshold settings on the GDI surprise-dialect test setSubmitted global cutoff: 0.5115Submitted global cutoff0.5115Global cutoff tuned on test labels: 0.518Global cutoff tuned on test labels0.518Class-specific cutoffs tuned on test labels (this paper): 0.5230Class-specific cutoffs tuned on testlabels (this paper)0.5230
The numbers
System or settingMacro F-1
Submitted global cutoff0.5115
Global cutoff tuned on test labels0.518
Class-specific cutoffs tuned on test labels (this paper)0.5230

The confusion matrix adds detail to these averages. It records how often each true class is predicted as each possible class. The authors find that many XY sentences receive Bern or Luzern labels. Basel has relatively little confusion with XY and is already a well-recognized familiar class. Luzern has more familiar-class errors and the highest confusion with XY. The rejection rule changes some uncertain decisions, with much of the original pattern of difficulty still visible once the unfamiliar class is added.

What the ablations show

Feature choice and the point at which evidence is combined

The development experiments are a sequence of substitutions and additions. Some comparisons hold the feature representation still and vary the classifier. Others hold the classifier type still and change the feature input. Later rows vary how the outputs of classifiers are combined. As a result, the series supplies several useful controlled comparisons along with comparisons of entire configurations.

The SVM and random-forest runs on word TF-IDF illustrate why the classifier choice matters. Under complete training on development, the SVM gives 0.6497 macro F-1 and the forest gives 0.4238. That comparison uses the same type of feature input. It supports the decision to use linear SVMs with these text representations. The paper's wider survey of other learners is less detailed, so these rows give a more specific basis for comparing SVMs and forests than for ordering every learner the authors tried.

The feature sequence offers a similarly specific result for the within-word bigram system. On complete training data, the bigram SVM gives 0.6739 macro F-1 on development. Concatenating bigram and word TF-IDF information gives 0.6733, even though the weighted F-1 rises from 0.6823 to 0.6837. The two metrics capture different changes in the class decisions. Extending the custom character analyzer to lengths from 1 to 7 leaves the scores of that concatenated configuration unchanged in the table. The development evidence for character features is strongest for particular representations and combinations, with the simple bigram result as an important reference.

The comparison between concatenation and sum is more direct than the feature additions. The complete-training concatenated system gives 0.6730 macro F-1 on development. Training an SVM separately for each representation and summing the class scores gives 0.6829 with those feature families. The reduced-training rows also favor summation, with 0.6725 for concatenation and 0.6811 for score addition. The repeated pattern across the training conditions supports the architecture change for these configurations. It tests the whole combination procedure, including the fact that each classifier learns its own weights before its scores are added.

The interpretation has a further distinction. The concatenation comparison concerns inputs to a base classifier. TB-Meta also has a design choice about whether to concatenate the outputs of the base classifiers before training the final classifier. The paper reports a consistent benefit from summing those outputs and offers overfitting as a possible explanation. Summation limits the final stage to the aggregate information for each dialect. The reported advantage belongs to that reduced representation in the settings studied. The comparison supplies no individual measurement of how much each base classifier contributed to the final learned decision.

The normalization experiment is useful for a different reason. Complete-training development macro F-1 for the version with word TF is 0.6884, and the version with normalized word TF gives 0.6930. The comparison shows that the choice of scale can matter even when the word sequences available to the learner are of the same kind. The paper also reports that TF additions could weaken the test results. For instance, the post-competition TB-Meta with added TF gives 0.6445 macro F-1 on test, compared with 0.6464 for the submitted TB-Meta. These are related observations from different configurations and splits. Together they make the case for checking feature choices where the system will actually be evaluated.

Short training sentences and the dialect hierarchy

The complete and reduced training sets test whether removing very short sentences helps. The authors emphasize the development benefit for the meta-classifiers. The direction can also be checked on the competition test with the corresponding TB-Meta configurations. The version using the reduced training data gives 0.6464 macro F-1 and the version labeled TB-Meta-all, trained on the complete set, gives 0.6440. The experiment changes the data seen in training while keeping the test task the same. This supports a modest benefit for the specific filtering rule in the principal submitted architecture.

The paper then investigates removing ambiguous training cases more broadly, including ones beyond the short lengths used for RTS. It reports a score degradation of 0.004 for this further change. The authors suggest that ambiguity has a different distribution among longer sentences. The two filters create different training sets, and a longer sentence can contain useful dialect evidence even when its label is difficult to predict. The result favors the tested length rule over the broader removal procedure in this experiment. It gives less direct evidence about which training examples account for the difference.

For the hierarchy, the comparison of H1, H2 and H3 asks whether the pairing of dialects affects decisions. H3 is consistently best on the development set, while H1 is worst there. The authors examine the confusion matrix and highlight the tendency for Luzern sentences to be predicted as Bern. They also note that this confusion is asymmetric. A mistake in one direction says something different from frequent mistakes in both directions. That distinction helps explain why the best tree cannot be read straight off a ranking of the most frequently confused pairs.

The authors consider whether the presence of other dialects in the group comparisons made the distinction easier for H3. This is a plausible account of the development behavior. Changing a tree changes the grouping the root has to learn and the comparison available to each descendant classifier. The paper's test result for the chosen hierarchy is weaker than TB-Meta's, and the authors did not run a full grid search of the possibilities on test. The evidence therefore concerns the selected hierarchical configuration, including its weights and grouping. It leaves the separate contributions of those choices unresolved.

What feature limits and confidence thresholds change

The feature-cap study varies the number of features allowed for each base classifier in TB-Meta. The submitted point, shown at 20k features in the paper's figure, is reported there as 0.646 macro F-1. The competition table gives the submitted score at its own precision, 0.6464. The 50k point reaches 0.6511. Between 20k and 300k the authors see no clear trend, and after 300k the measurements appear to stabilize. They suggest that beyond that range the analyzers may have no more features to add, or that additional features may have no noticeable effect on the result.

This experiment addresses a capacity choice common to all the feature extractors. A higher allowance can admit additional sequences wherever the previous cap excluded them. A representation with fewer distinct sequences can remain effectively the same as the allowance rises. The authors attribute the large candidate feature spaces to analyzers using many n-grams. The sweep establishes sensitivity to the cap in the tested system, without measuring the separate contribution of the extra features in each family. The maximum reported at 50k is a result about these test sentences and the settings compared on them.

BM25 provides another example of dependence on the split. The authors find no improvement from adding it in the development comparisons they discuss. On the competition test, adding it helps some TB-Meta variants, including the configurations with reduced and complete training data. BM25 represents the sentence using a weighting scheme that accounts for length, so the comparison changes the information delivered to that base classifier and the collection of scores available to the final decision. The result is evidence for the whole variant. It leaves open whether the change comes chiefly from the treatment of length or from other differences in the feature weighting.

The surprise-task sweep isolates a decision parameter after training. Moving a common threshold changes which sentences have scores low enough to receive XY. A class-specific threshold adds flexibility when score distributions differ by dialect. The observed scores rise in the test-label search from the submitted setting to the peak for a shared threshold and again for the class-specific search. The confusion matrix shows what that aggregate comparison omits. Rejection changes the outcome mainly where the classifier is uncertain, while many XY sentences still have enough support for a familiar label. The experiment measures the sensitivity of the rejection rule to its cutoff and the difficulty of locating the new dialect with confidence scores alone.

Limitations

Limits the authors identify

The authors emphasize the subjectivity of transcription and annotation for dialects whose written forms vary. Dieth spelling provides a common method of transcription with some orientation toward sound, while the alphabet and spelling habits place a limit on phonetic detail. A paper about classification from these transcriptions can measure how useful their written evidence is for the benchmark. A direct comparison with phonetic recordings or another transcription convention is outside the experiments reported here.

The authors also point to the small amount of training data, especially for the surprise task. In that part of the competition the known dialects are the only source of training examples. A rejection threshold has to be chosen through their score behavior before the system encounters examples of XY. The authors' gold-label analyses show where the thresholds could have been moved on the competition test, and their confusion analysis shows that the surprise dialect is frequently mistaken for familiar ones. Together these results describe why the submitted threshold offers only a partial solution to detecting unfamiliar material.

The submission budget and timing set other limits. The team could make 3 submissions per task, and choices such as the initial feature cap had already been made before the test analysis. The paper identifies settings, including the normalized TF variants, that the authors investigated after the competition. It also acknowledges that they did not explore all hierarchical settings on test. The study thus contains both a competition evaluation of submitted configurations and a retrospective investigation of additional settings. The two have different evidential value because the answer labels were available during the retrospective work.

The authors raise development overfitting as a possible explanation for the hierarchy's weaker test performance. There is also a related concern in their decision to sum base scores before fitting the final SVM. Their footnote argues that a linear classifier given separate outputs could in principle learn addition, yet in their trials the explicit sum helped. The paper's measurements support those observations about performance across configurations. They leave the proposed explanations for the fit behavior as interpretations.

Limits of the experimental setup

The number of labeled sentences gives a limited picture of the diversity available to train and test dialect recognition. Many sentences come from the same speakers. Development has one speaker per dialect, and the test speaker counts are also small. A feature that helps on one split could reflect properties shared widely in a dialect or properties especially common in the available speakers' transcriptions. The reported scores measure prediction of the assigned regional labels. An evaluation designed to separate speaker-specific cues from dialect cues would need to measure those effects independently.

The labels also stand for selected regions within the competition. They let the systems learn the assignment expected for these interview transcriptions. The experiments do not quantify performance for other Swiss German dialects, writing produced under different conventions, or speech supplied directly as audio. The surprise task gives evidence for one added dialect in this setup. It leaves general detection of unfamiliar varieties unmeasured, especially when their scores resemble the confident predictions of a familiar class.

The RTS comparison illustrates a limit on causal interpretation. Removing every sentence of one or two words changes several properties of the training data together. It eliminates some exact strings shared across regional labels, decreases the supply of short examples and changes which word and character counts are available to learn from. The reported improvement establishes what happened under the complete filter. It leaves the contribution of each of these changes unresolved. The later broad ambiguity removal also changes the examples the classifier sees, so its lower score gives a comparison of procedures rather than a measurement of a distinct type of ambiguity.

Several architecture comparisons involve similar dependencies. The test outcomes of TB-Meta and TB-Hierarchical reflect the tree, the weight selection and the way scores turn into a label. Development results show that the choice of tree matters, and the test results compare the actual submitted systems. There is no experiment here that fixes every other choice and varies just the weights of the hierarchy on an independently held-out test. The lower test score therefore identifies the weaker submitted configuration, while the source of its weakness remains open.

The most favorable settings for feature limits and surprise thresholds were identified with knowledge of the test answers. The associated scores quantify sensitivity on those sentences. A fresh evaluation would be necessary to measure the performance of procedures that select those settings in advance. This matters particularly for a threshold per class, where the search can fit the confidence patterns of the particular speakers and the unfamiliar dialect present in the test. The submitted threshold and the later tuned thresholds represent distinct evaluation conditions even though they share the same test corpus.

Finally, macro and weighted F-1 compress very different mistakes into scalar values. Macro F-1 is appropriate for giving each label equal influence, but the aggregate alone cannot establish whether an improvement comes from recognizing the surprise dialect, retrieving more examples of a familiar dialect or reducing a particular confusion. The confusion matrix is what lets the authors identify Bern and Luzern as common destinations for XY sentences. The paper's evidence is strongest when those class-level patterns are read alongside the main scores.

What came after

The Second VarDial Evaluation Campaign report is the companion account that cites Twist Bytes. Both papers are from 2018. Twist Bytes uses the report to identify the campaign that organized the task and to situate the GDI experiments among VarDial's work on related varieties. The report's connection to the system is through the shared evaluation. It places a score-combining entry in the same campaign as the other submissions, whereas the Twist Bytes paper provides the detail about how the entry was built and which settings the team examined afterward.

That relationship matters for interpreting the rank and the scope of the comparison. The campaign evaluation supplies the task and the framework for comparing participating systems. The Twist Bytes account notes that the organizers grouped closely performing systems more broadly than the detailed score ordering might suggest. Its own analysis then extends from the competition runs to configurations selected or investigated with the test labels available. The campaign connection concerns the shared benchmark and the submitted entry, rather than an independent evaluation of the post-competition variants.

The authors close by expressing the hope that their submission could serve as a baseline in the following competition. The companion report documents the setting in which that baseline was established. The record here establishes a campaign-level comparison and a technical account of the system's development. It leaves reuse of the feature combination, training filter and surprise-dialect rule in a subsequent system unestablished.

Cite

Cite as Fernando Benites, Ralf Grubenmann, Pius von Däniken, Dirk von Grünigen, Jan Deriu and Mark Cieliebak. 2018. Twist Bytes - German Dialect Identification with Data Mining Optimization. Proceedings of the Fifth Workshop on NLP for Similar Languages, Varieties and Dialects (VarDial 2018).

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{benites2018twist,
  title = {{Twist Bytes - German Dialect Identification with Data Mining Optimization}},
  author = {Fernando Benites, Ralf Grubenmann, Pius {von Däniken}, Dirk {von Grünigen}, Jan Deriu and Mark Cieliebak},
  booktitle = {Proceedings of the Fifth Workshop on NLP for Similar Languages, Varieties and Dialects (VarDial 2018)},
  year = {2018},
  doi = {10.21256/zhaw-4850},
  url = {https://doi.org/10.21256/zhaw-4850}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/benites-2018-twist-bytes-german-dialect-identification/