Elamur Research

Different Tokenization Schemes Lead to Comparable Performance in Spanish Number Agreement

Paper · 2024 · Catherine Arnett, Pamela D. Rivière, Tyler A. Chang et al.

Summary

In Spanish, the article before a noun changes when the noun goes from singular to plural. The difference between la mujer and las mujeres is easy to see in print, but a text prediction system can receive the noun in several forms. Its tokenization can keep mujeres whole, or it can divide the word so that the singular base mujer and the plural ending -es arrive as separate units. Other words are split at places that cut across the grammatical ending. The authors ask whether making that ending visible as a unit helps BETO, a Spanish text predictor, choose the correct article.

The study draws regular singular and plural nouns from the AnCora treebanks. The authors hide the article in a short input and compare the probabilities BETO assigns to the singular and plural candidates. They group nouns by how the default tokenizer handles their plurals. Some plurals occupy a single token, some have a separate token for the ending, and some are divided into pieces that cross the boundary between base and ending. BETO distinguishes singular from plural well in all three groups. On plural inputs, the reported agreement accuracy is 0.97 for the group whose default segmentation isolates the ending and 0.98 for each of the other two groups. A statistical analysis detects a small effect of the original segmentation on the strength of the article preference, including when the authors account for word frequency.

The authors also change the input for the same plural noun. For a word such as mujeres, they substitute the tokens for the singular noun followed by the token for -es. BETO still usually favors the plural article. Its preference is weaker on average than when the same nouns use their default tokens. The intervention thus gives evidence that BETO can use a regular ending in a different token sequence while leaving the usual representation slightly ahead on this task.

An exploratory analysis asks what the internal noun representations have in common. A direction chosen to distinguish singular nouns from whole-token plurals also groups the differently segmented plurals together. Other directions distinguish some of those plural groups. The representations therefore carry a number distinction that can be read across several segmentations, alongside differences associated with those segmentations. Whether BETO uses the same internal process to choose the article in every case remains open.

Deep dive: Different Tokenization Schemes Lead to Comparable Performance in Spanish Number Agreement

A study of whether splitting Spanish plural nouns at their grammatical endings helps BETO predict which articles agree with them. · about 33 minutes to read

The problem and its context

Where a grammatical boundary can disappear

A tokenizer sets the units a text predictor receives. A word may have its own entry in the tokenizer’s vocabulary, or it may be represented by a sequence of smaller entries. With subword tokenization, those pieces can sometimes be shared across related words. For a noun with a regular plural, an appealing division is the form used in the singular followed by a piece representing the plural ending. That makes the relationship between the forms visible in the input. A division chosen by the tokenizer may instead keep the whole plural together or attach part of its base to the ending.

This is a question about how morphology is represented. Morphology concerns the internal structure of words and the forms they take. A morpheme is a unit in that structure that contributes meaning or grammatical information. The plural ending is the relevant morpheme here. Its position in the Spanish word is a fact about the word’s structure. Whether that ending occupies a separate position in BETO’s input is a separate property determined by the tokenizer. The paper asks how much those two levels need to line up for a particular grammatical prediction to succeed.

Consider neuronas, divided by BETO into neuro and ##nas. The second piece contains the plural ending, but also contains material from the singular base. The last letter is still present. What changes is the unit that represents it. By comparison, BETO divides naranjas into naranja and ##s, so the ending has a unit of its own. A successful prediction for the first word could arise from information learned about one or both of its pieces, their combination, or other properties of the representation. A successful prediction for the second could draw on the separate suffix token. The experiment starts by asking whether those different inputs support different levels of success.

The paper frames this as a question about both storage and generalization. A vocabulary that assigns a dedicated entry to many words can preserve information particular to those words. It can also require more computational resources and offer fewer shared units for coping with unfamiliar words. Smaller pieces provide a way to express a word through units available elsewhere. If those pieces correspond to grammatical components, a regularity learned from some nouns could carry over to others that use the same ending. The authors relate this to a question in research on human language about storing complete forms and learning rules that apply across forms. The parallel motivates the computational question without turning the experiment into a test of human behavior.

Frequency complicates the connection between the input units and the grammatical prediction. A common plural may already have its own vocabulary entry, and the system may also have had more opportunities to learn about it. A less common plural may be assembled from smaller pieces and give the system fewer opportunities to learn the form. If the common noun yields a stronger article prediction, the existence of a whole-word token is only one possible explanation. The paper deals with that issue through both an analysis of frequency and a comparison in which the noun itself stays fixed while its tokens change.

Why use Spanish articles?

The grammatical dependency under study is number agreement between an article and a noun. In la mujer, the article is singular. In las mujeres, it is plural. The chosen nouns make the change especially traceable because the authors focus on plurals formed by adding -s or -es to the corresponding singular. The task can therefore probe a concrete question about the input. If the plural ending is supplied on its own, will the predictor assign more weight to the plural article?

Agreement makes it possible to pose the question with a pair of candidate answers whose difference is easy to specify. BETO receives the noun and a blank where the article belongs. For a definite article, the researchers compare definite singular with definite plural. For an indefinite article, they compare indefinite singular with indefinite plural. This keeps the analysis centered on number even though the system assigns scores to many possible completions of the blank. Grammatical gender also matters in selecting the appropriate candidates, so the nouns are annotated for it.

The choice of task narrows what a result can establish. A noun and a masked article provide a direct test of whether number information is available for that small prediction. A subject and verb in a longer sentence can pose a different problem, especially when a system must decide which noun controls agreement. The Spanish article task puts the noun close to the decision and uses a regular change in form. That makes the input manipulation easier to interpret. It also makes it possible for several ways of representing the ending to give sufficiently clear evidence for the same answer.

The article contrast gives the experiment a role for singular nouns as well as plurals. A general tendency to prefer plural articles would produce the desired answer on plural inputs. It would give the wrong direction on singular inputs. Including both forms lets the authors ask whether the preference actually tracks the number of the noun. The same comparison helps make sense of a change in confidence. A more negative score can be a better outcome for a singular, while a more positive score can be a better outcome for a plural.

The evidence the authors built on

The paper places its experiment within prior studies of grammatical agreement in systems that predict words from context. It describes work across languages that generally found high agreement accuracy. It also points to earlier Spanish subject–verb tests where BETO made errors with certain nouns, even though it could extend agreement to novel words. That combination leaves room for a more specific question. Success with unfamiliar forms establishes some capacity to generalize, while errors on particular inputs leave open which properties of their representation matter.

One earlier example discussed in the paper is comanas, a often misnumbered item in the subject–verb study. Its default division is coman followed by ##as, which crosses the relevant grammatical boundary. That example gives a reason to examine segmentation systematically. The association for the single word leaves the cause of the error open. For the article study, the authors therefore compare groups of nouns and construct an additional test that changes the representation of a word without changing the intended noun or its number.

The paper also describes prior work finding benefits from morphology-aware segmentation on downstream tasks. Those studies supply a reason to expect that preserving grammatical pieces might help. The authors mention work on machine translation and on similarity judgments when discussing that expectation. The demands of those tasks differ from choosing a Spanish article. A segmentation that helps preserve information relevant to translation may offer little extra benefit on a nearby agreement dependency that can already be resolved from several cues.

The most direct precedent is a study that sorted complex English words into whole vocabulary entries, words split into grammatical pieces, and words split elsewhere. The paper describes an association between those categories and performance across several tasks. Arnett and colleagues carry the distinction over to Spanish and use it to study a specific inflectional pattern. The categories give them a way to compare whole-form storage, a visible base-and-ending structure, and a split where the ending is embedded in a larger piece.

These precedents motivate separate questions about ordinary use and generalization. The default comparison asks whether nouns that already receive one segmentation are easier to handle than nouns that receive another. The intervention asks what happens if a plural normally represented one way is sent through the same predictor with an explicit ending. The first question concerns the distribution of inputs created by the existing tokenizer. The second concerns what BETO can do with a different sequence of familiar tokens. Their answers need to be interpreted at those respective levels.

The method, step by step

Starting with singular and plural forms

The authors extract plural nouns and their corresponding singular forms from AnCora, a collection of treebanks, or texts annotated for linguistic structure. The singular serves two functions. It supplies a comparison for asking whether the article preference changes with grammatical number. It also supplies the base to which the researchers can append an ending when constructing an alternative token sequence for the plural.

The sample is restricted to cases where the plural can be constructed by adding the selected suffix to the singular form. The authors distinguish between the regular patterns represented by endings -s and -es. In the patterns they select, a vowel-final singular takes -s and a consonant-final singular takes -es. The study excludes irregular nouns, spelling mistakes, and forms absent from the online dictionary of the Real Academia Española. These decisions make the added ending a well-defined change in the chosen words. A native Spanish speaker annotates the nouns for grammatical gender, giving the researchers the information they need to select the matching articles.

A lemma is the form used to group inflected forms of the same lexical item. Here the singular noun gives the base form for that grouping. The study also works with individual word forms, such as the singular mujer and plural mujeres. The distinction matters because the same lemma can occur in observations that differ in number, article type, or tokenization. The authors use this connection both to construct comparisons and to account for repeated observations in their statistical analyses.

The nouns come from the treebanks, while the examples given to BETO are short sequences centered on the noun and masked article. The original treebank occurrences provide the vocabulary to examine. The masked examples provide the actual evidence about agreement. A reader can therefore understand the procedure as taking grammatical forms from an annotated resource and placing them into a standardized prediction setting.

Classifying the default tokens

All experiments use BETO, a Spanish pretrained BERT system with 110M parameters. Its pretraining used roughly 3B words. The associated SentencePiece tokenizer has a vocabulary of 32K entries. The authors work with that existing vocabulary and the pretrained predictor. The comparisons concern the segmentation of particular inputs, with the underlying predictor shared across the conditions. The paper makes the study’s code and data available.

For each plural, the authors first look at the sequence produced by the default tokenizer. A plural with an entry of its own goes into the single-token group. If the tokenizer divides the plural, the researchers check whether the division follows the grammatical boundary. In the morphemic group, the plural ends in a dedicated suffix token, as when naranjas becomes naranja followed by ##s. In the non-morphemic group, a token crosses the boundary, as in neuro followed by ##nas for neuronas. The ## in these examples marks a continuation piece in the tokenizer’s representation.

This classification records how BETO receives a form, rather than how the researchers think the word should be analyzed in isolation. All the selected plurals have a regular morphological relationship to their singulars. Only some expose it through the default token sequence. The classes can therefore have the same kind of grammatical information in the spelling while presenting it to BETO in different units. The original class is a property of the plural form. When singular and plural responses are compared in the statistical analysis, the class identifies the plural side of the corresponding noun.

The class sizes also differ. There are 1247 single-token plurals, 508 with a default division that follows the morpheme boundary, and 627 divided across that boundary. These are counts of plural forms in the noun lists. The agreement observations are more numerous because forms can be used with different article types and, for eligible plurals, with more than one representation.

Constructing an alternative sequence

For a plural that is normally a single token or has a non-morphemic split, the researchers create a version with a separate ending. They start with the token or tokens used for the singular and append the corresponding suffix token. The spelling and the intended word remain the same. What changes is the sequence of vocabulary entries through which the predictor sees the word. Plurals with a default split at the boundary already provide the arrangement being tested, so the artificial comparison focuses on the other groups.

The example mujeres shows what happens to a whole-token plural. The default representation gives BETO mujeres as one entry. The artificial version supplies mujer and ##es. The target remains the plural noun, and the singular and plural article candidates remain the same as in the default condition. The manipulation replaces a whole-form entry with a base that also appears in the singular and an explicit continuation token carrying the plural suffix.

The example patronos shows the change for a plural already divided into pieces. The default input uses patr followed by ##onos. The artificial input uses patr, ##ono, and ##s. Here the researchers preserve the pieces used for the singular base, then append the ending. This matters because a morphemic division can coexist with a base that itself spans several tokens. Giving the ending its own unit does not require building a vocabulary in which every singular noun is a unit.

In both examples, the intervention can alter the number of input positions and the identities of tokens at those positions. It answers whether a particular alternate encoding is usable and whether it improves the prediction for the same word. A more narrowly isolated test of an ending’s contribution would have to hold more aspects of the sequence constant. The authors’ chosen manipulation reflects what actually happens when the usual pieces are replaced by the singular representation and an explicit suffix.

From annotated Spanish nouns to agreement scores

The steps in order.

From annotated Spanish nouns to agreement scoresStep 1: Extract regular singular and plural noun forms1. Extract regular singular and plural noun formsStep 2: Record default token boundaries and grammatical gender2. Record default token boundaries and grammatical genderStep 3: Build alternative plurals with separate suffix tokens3. Build alternative plurals with separate suffix tokensStep 4: Present each noun beside a masked article4. Present each noun beside a masked articleStep 5: Compare matching singular and plural article probabilities5. Compare matching singular and plural article probabilitiesStep 6: Analyze scores by number, segmentation, and frequency6. Analyze scores by number, segmentation, and frequency

Eliciting a prediction at the article

The input includes the sequence markers [CLS] and [SEP], with a [MASK] position before the noun. Only the article position is hidden. For the whole-token example, BETO sees mujeres at the noun position. For the alternate version, it sees mujer followed by ##es. The position to be filled still calls for the article before the noun. This design lets the authors examine the effect of changing the noun’s representation while preserving the prediction the system is asked to make.

At the mask, BETO produces logits, which are numerical scores for candidate vocabulary entries before their conversion to probabilities. The researchers use the scores for the relevant articles. For a given noun and article type, the two candidates agree with the noun’s gender and differ in number. Definite and indefinite article comparisons are kept separate. A definite plural can therefore support the plural side of the definite comparison without being pitted against the indefinite singular in the same score.

Softmax turns the output scores into probabilities. In the expression below, the normalization runs over the candidate output vocabulary at the masked position.

pᵢ = exp(zᵢ) / ∑ⱼ exp(zⱼ)

Here pᵢ is the probability assigned to the vocabulary entry indexed by i. The value zᵢ is its logit. The function exp is the exponential, and ∑ⱼ sums the exponentiated logits over the vocabulary entries indexed by j. The denominator is shared by the article candidates for the same input.

The agreement score is the logarithm of the ratio between the two relevant article probabilities.

L = log(pₚₗ / pₛg)

Here L is the reported log-odds score. The quantity pₚₗ is the probability of the plural article, and pₛg is the probability of the singular article, for the same input and the same article type. The function log takes the logarithm of their ratio. A value above 0 favors the plural candidate, and a value below 0 favors the singular candidate. Equal probabilities put the score at 0.

The score describes a pairwise preference. The probability of some other vocabulary entry can exceed the probabilities of both articles while the ratio still favors the appropriate one. Likewise, shifting the probabilities of both candidates together can leave their relative preference much the same. This setup is suited to probing agreement because the two alternatives are fixed by the researchers. The reported outcome concerns which candidate wins that comparison and how strongly it wins.

Accuracy and log-odds capture different properties of those outcomes. For a plural example, the direction of the log-odds tells the researchers whether BETO smiles on the singular or plural candidate, and therefore whether the example counts as correct. The magnitude tells them how decisive that preference was. A change that leaves the same article ahead can still change the log-odds appreciably. The statistical analyses use that continuous score, while the accuracy results provide a more direct account of how frequently the preference went in the correct direction.

Accounting for repeated observations and frequency

The full agreement dataset contains 13,276 observations, each with a log-odds score. The observations reflect the different presentations of the noun forms, including the article types and the alternate token sequences where applicable. The authors analyze them with linear mixed-effects regressions. These estimate systematic associations with the tested conditions while allowing results from the same lemma or sentence to share a baseline. They also allow the effect of a manipulation to vary across lemmas in the paired plural comparison.

A fixed effect describes an association the regression estimates across the observations, such as the effect of article type or word number. An interaction allows one association to depend on another condition. Here the key interaction in the default comparison asks whether the change in score from singular to plural depends on the default segmentation group. A random intercept for lemma allows observations belonging to the same noun to start from a different score level than observations belonging to another noun. A random slope for the artificial representation allows its effect to differ across lemmas.

The paper compares fitted regressions with versions that omit a specific term. For example, the authors compare a regression that lets the effect of number depend on segmentation with one that represents their effects separately. The corresponding chi-square statistic measures the improvement of the fuller fit in that comparison. This approach tells the reader which term the evidence supports. The measured size of a difference in article preference is reported separately through scores, accuracy, or the graphical analysis. The authors use R and the lme4 package, fitting richer random-effects structures where possible and reducing them as needed for convergence.

The authors also bring in frequency norms based on spoken Spanish. They first use the available plural frequencies to see whether the default groups represent different ranges of word familiarity. Then they include log frequency in an additional agreement analysis to ask whether it accounts for the number-by-segmentation interaction. Log frequency is a transformed measure of how frequently the word form occurs in the frequency data. It gives the researchers a common quantity to include alongside conditions such as singular versus plural and default tokenization category.

Looking inside the noun representations

The authors complement the prediction experiment with an exploratory examination of Transformer representations. An embedding here is a vector of values the predictor constructs for an input token. Since a noun can occupy several positions, the researchers average over its tokens to get a representation of the noun. They use representations from the last four of BETO’s twelve Transformer layers, averaging across those layers as well. For all multi-token conditions in this part of the study, they keep only plurals that use two tokens. That restriction reduces variation introduced by averaging across different numbers of positions among the split forms.

The authors use linear discriminant analysis, abbreviated LDA, to find directions that distinguish specified groups. A direction gives a way to reduce a vector to a single score by projecting the vector onto it. The analysis chooses directions with group separation in view. It first fits a direction using singular nouns and plurals that each occupy one token, so the starting contrast differs in number while keeping the token count the same. The authors then project the other plural groups onto the direction learned from those whole-token forms.

The paper describes the number of discriminant directions in terms of the number of groups.

d = n − 1

Here n is the number of groups of representations supplied to the analysis, and d is the number of separating directions described for those groups. The subtraction gives one direction for the singular-versus-plural fit in the paper. In the separate comparison of four plural groups, the analysis produces three directions.

The two fits serve different purposes. The first asks whether representations of plural nouns segmented in other ways occupy the plural region of a space defined using whole-token forms. The second uses only plurals and asks whether differences among their kinds of segmentation can be detected within that broad region. A noun can share the value associated with plurality on one direction and differ substantially on another. That is how the paper connects similar article behavior with representation differences that remain visible internally.

Experiments and results

The default groups all support agreement

The first experiment uses the ordinary BETO input sequences as its reference conditions. The grammatical baseline is the contrast between each plural and the corresponding singular. The segmentation comparisons use the three classes of plural noun drawn from AnCora. For every presentation with a definite or indefinite article contrast, the researchers record whether the favored candidate agrees with the noun and how far the score moves towards singular or plural.

The regression for the default comparison includes segmentation group, word number, and their interaction, with article type as another fixed effect. It allows separate baseline adjustments by lemma and sentence. The relevant comparison removes only the interaction between number and segmentation. Adding the interaction improves the fit, with χ²(2) = 6.54 and p = .04. The result supports a difference among default segmentations in how scores change between singular and plural. In the paper’s plot, the difference is small relative to the general separation by number.

Overall, the plural nouns are associated with positive log-odds and the singular nouns with negative log-odds. This is the direction expected if the predictor is using the noun to choose the appropriate number. For plural inputs, the reported accuracy is 0.97 for the morphemically segmented group and 0.98 for each of the other default groups. The plotted log-odds distributions convey the stronger general pattern, while the accuracies show how close the classes are as measured by the winning candidate.

BETO plural article agreement accuracy by default segmentation on AnCora nouns

Plural agreement accuracy is high across all default segmentation groups.

BETO plural article agreement accuracy by default segmentation on AnCora nounsSeparate base and suffix by default: 0.97Separate base and suffix by default0.97Boundary-crossing split by default (this paper): 0.98Boundary-crossing split by default (thispaper)0.98Whole plural token by default: 0.98Whole plural token by default0.98
The numbers
System or settingaccuracy
Separate base and suffix by default0.97
Boundary-crossing split by default (this paper)0.98
Whole plural token by default0.98

The accuracy values concern the plural observations. They leave room for differences in confidence within and between the default groups. For example, the two groups at 0.98 can have the same reported accuracy while differing in the distributions of their log-odds. The paper’s conclusion that single-token forms do slightly better overall should be read alongside that distinction. The accuracy entries tie the whole-token and boundary-crossing groups, and the continuous analysis supports a small association between the original segmentation and the response to number.

There is also a distinction between comparing default groups and comparing alternative versions of the same word. The default groups contain different nouns. A word that already has a separate suffix token may differ in frequency or other lexical properties from one that has a whole-form entry. The small observed default difference describes how this tokenizer and predictor handle the respective sets of nouns. The alternate-segmentation experiment provides a more direct way to ask how the response changes under a different encoding of a given form.

The alternate sequences carry usable number information

The first question for the artificial sequences is whether they still lead BETO to distinguish singular and plural nouns. The authors use plural forms from the originally single-token and originally boundary-crossing groups and represent them through the singular base and a suffix token. Their regression includes article type, word number, segmentation group, and which of the two suffixes the plural uses, with random intercepts for lemma and sentence.

Omitting word number from that regression produces a much worse fit. The reported comparison has χ²(1) = 11,988 and p < .001. The singular and artificially encoded plural inputs produce substantially different log-odds, with the plural inputs moving the preference toward the plural article. This result addresses the basic question of whether BETO can make use of the alternate representation. The reference here is the response to singular forms, so the test concerns the presence of an agreement distinction.

The accuracy values show how often those artificially encoded plurals yield the correct side of the comparison. Plurals that originally had a whole-word token reach 0.97 after the change. Those originally split across the grammatical boundary reach 0.96. These values belong to the groups defined by their original segmentation. The inputs are now constructed with a separate ending in both groups. Keeping the original group labels makes it possible to connect the outcomes to what each set received before the manipulation.

BETO plural article agreement accuracy for original and altered AnCora inputs

Both groups retain high accuracy with a separate suffix and score highest with their default tokens.

BETO plural article agreement accuracy for original and altered AnCora inputsOriginally whole token, default input (this paper): 0.98Originally whole token, default input(this paper)0.98Originally whole token, separate suffix: 0.97Originally whole token, separate suffix0.97Originally boundary-crossing split, default input: 0.98Originally boundary-crossing split,default input0.98Originally boundary-crossing split, separate suffix: 0.96Originally boundary-crossing split,separate suffix0.96
The numbers
System or settingaccuracy
Originally whole token, default input (this paper)0.98
Originally whole token, separate suffix0.97
Originally boundary-crossing split, default input0.98
Originally boundary-crossing split, separate suffix0.96

The interpretation turns on the status of the alternative token sequence. The new input can be built from vocabulary pieces available to BETO, including the suffix. The authors describe the artificially encoded sequence for a word as a sequence that BETO did not encounter in that form during training. Success is therefore evidence of generalization to another sequence for a familiar kind of grammatical construction. It shows that the input can be read as plural even when the word is presented differently from the tokenizer’s usual choice.

The same words score higher with their default tokens

The next analysis asks a stricter question. Among eligible plural forms, does BETO prefer the plural article more strongly when the input has a separate ending or when it has its default tokens? The authors restrict this comparison to plural inputs and include whether the representation is artificial, which suffix it uses, and which default group it originally belonged to. The regression accounts for lemma, sentence, and word form through random intercepts and lets the effect of artificial tokenization vary by lemma.

Including the artificial-versus-default distinction improves the fit, with χ²(1) = 141.81 and p < .001. The direction of the effect favors the default sequences. For artificially segmented plurals, the mean log-odds is 3.38 and the standard deviation is 2. For the same plural forms in the default condition, the mean is 3.95 and the standard deviation is 2.15. Both means indicate a clear preference for the plural article. The default condition supplies the stronger preference on average.

Mean plural article log-odds for paired AnCora inputs

BETO favors the plural article more strongly when the same nouns use their default tokens.

Mean plural article log-odds for paired AnCora inputsArtificial base and suffix: 3.38Artificial base and suffix3.38Default tokenization (this paper): 3.95Default tokenization (this paper)3.95
The numbers
System or settingmean log-odds
Artificial base and suffix3.38
Default tokenization (this paper)3.95

The accuracy and score comparisons answer related questions. The accuracy results show how frequently a change of input moves the preferred answer to the wrong side of the singular–plural decision. The mean log-odds show how strongly the prediction favors plurality even when many answers stay correct. The alternate procedure succeeds by both descriptions of what a useful plural input can do, while the default tokens retain the better reported outcomes in the paired comparison.

The two statistical tests on artificial inputs have different reference points. The large effect of word number shows separation between singular and artificially represented plural inputs. The effect of changing the token sequence shows a smaller preference for plurality relative to the original plural representations. A viable new encoding can preserve the grammatical distinction and still lose some of the evidence the predictor previously drew on. The paper’s claim for morphology-aligned tokenization is accordingly about its usability in this setting.

Frequency accounts for part of the variation

The frequency comparison uses oral norms from a corpus of over 3M spoken words. Norms are available for 2071 of the target plural forms. The authors predict log frequency from default segmentation class, using the morphemically divided group as the reference. The regression has R² = 0.33, indicating that segmentation class accounts for a substantial share of variation in log frequency within this comparison.

Relative to the morphemically segmented group, the boundary-crossing group has a negative log-frequency coefficient of β = −0.18, with SE = 0.03 and p < .001. The single-token group has a positive coefficient of β = 0.59, with SE = 0.03 and p < .001. In these results, β is the estimated difference from the reference group on the log-frequency scale, SE is the standard error of that estimate, and p reports the statistical evidence for the corresponding difference. The order is thus whole-token plurals at the higher end of frequency, morphemically segmented plurals in the middle, and plurals divided across the boundary at the lower end.

The agreement follow-up includes word number, segmentation class, log frequency, and interactions of word number with both segmentation and log frequency. Including the interaction between number and frequency improves the fit, with χ²(1) = 17.89 and p < .001. Its coefficient is β = −0.35, with SE = 0.08 and p < .001. The authors describe more frequent singular nouns as receiving more negative plural-versus-singular log-odds, which means a stronger preference for the singular article. They interpret frequency as contributing to better predictions, with the singular pattern giving a concrete instance of that relationship.

After accounting for the frequency terms, omitting the interaction between word number and original segmentation still worsens the fit, with χ²(2) = 11.24 and p = .004. The default segmentation association therefore survives adjustment for the measured frequencies. These frequency-adjusted results apply to the observations for which the necessary norms are available. They support a residual association with segmentation in that analysis. The effect of changing the tokens for the same noun comes from the separate intervention.

What the ablations show

What changes when the word stays the same

The closest comparison to an ablation is the replacement of a plural’s original token sequence with the singular base and a separate ending. The authors change what BETO receives for a specific word and read out the same article preference from the same pretrained system. Because the intended word and article contrast are held fixed, this comparison addresses a question the default groups alone leave open. It shows how agreement responds when the system is given another way of representing that particular plural.

The result is informative in both directions. The continued preference for plural articles shows that a whole-word entry or a default boundary-crossing piece can be replaced successfully in most cases tested. The weaker preference for the plural article shows that exposing the ending provides no additional advantage over the original encoding in the paired analysis. BETO has learned something that transfers across input sequences, while the usual representation of those same forms supports somewhat stronger agreement.

For a whole-token noun such as mujeres, the intervention removes the dedicated plural entry from the input and replaces it with two familiar components. The result is consistent with BETO using the suffix in combination with a noun base for which that token sequence is unusual. The comparison cannot pin the effect to the suffix alone, since the singular base becomes separately available at the same time. A similar issue arises for patronos, where the changed suffix boundary also changes a base piece and the length of the sequence. The demonstrated capability is handling the full alternate sequence.

Both original groups retain high accuracy after the manipulation. That matters because a usable whole-token replacement and a usable replacement for a boundary-crossing split involve different starting representations. In one case, the word has a dedicated vocabulary entry. In the other, BETO already has to combine pieces, but the original pieces group the ending with part of the base. Their shared success under the artificial procedure gives the study evidence across both kinds of replacement. The small advantage for the default input appears in both groups’ reported accuracies.

The statistical comparison on the plural forms also accounts for which suffix is appended and how the plural was originally segmented. This compares the artificial and original conditions while allowing for systematic differences related to those factors. The by-lemma slope lets the size of the effect vary with the noun. The reported mean advantage is a description of the tested inputs as a group. It leaves individual nouns free to respond differently when their pieces are changed.

What the frequency control resolves

A default single-token plural usually comes from a more frequent part of the noun sample. That observation creates a plausible account of why original segmentation might be associated with agreement even if the particular boundaries had little direct effect. More frequent words can support clearer predictions, and the tokenizer may encode those words differently. The follow-up regression evaluates the association between segmentation and word number while allowing frequency to have its own relationship with the same singular-to-plural contrast.

The frequency term improves the regression, and the term for the segmentation interaction improves it as well. Those findings show why each quantity matters to the interpretation. Treating the three default categories as frequency-matched would ignore a difference documented in the noun sample. Treating the default results as entirely explained by the available frequency norms would also miss a term that continues to improve the agreement analysis. The paper establishes that frequency contributes evidence and that the measured frequency contribution leaves a segmentation association.

The control and the paired intervention complement each other. The frequency adjustment compares observations across ordinary segmentation categories while using a measured property of the word forms. The intervention compares encodings of the same plural and therefore keeps its identity and ordinary lexical frequency fixed. The familiarity of the particular sequence presented to BETO can still change. The alternate sequence is deliberately unusual for the noun, even though both versions express the same form. This distinction helps reconcile a weaker response after retokenization with successful transfer to the new sequence.

Frequency also bears on the internal representation analysis. Default morphemic plurals and artificially segmented ones use similar suffix units, but they come from different sets of nouns and from different relations to the pretraining input. The paper suggests frequency as one possible contributor to the slight separation between these groups. Another possibility it raises is a genuine difference in number representation. The frequency regression on behavior does not settle which explanation accounts for the embedding clusters.

A number distinction shared by the plural groups

The first LDA comparison is deliberately trained with singular and plural words that each occupy one token. That yields a direction selected for separating grammatical number in whole-token inputs. Separation between those training groups is an expected outcome of the fitting criterion. The more informative observation is where plurals from the other segmentation classes land when the direction is applied to them.

Naturally morphemic plurals, artificially morphemic plurals, and plurals divided across the boundary all occupy a similar region to the whole-token plurals along this direction. Singular forms cluster separately. The transfer of the direction across the groups indicates that their embeddings contain a similar linear distinction for number, even though the token sequence carrying that information differs. Because the direction was obtained from whole-token forms, the result supports a common representational property that extends beyond the forms used to find it.

The practical meaning of “similar” here is specific. Projection turns an embedding into a value along one direction. Two vectors can map to similar values there and still be far apart when other dimensions are considered. The first LDA analysis thus establishes overlap with respect to a number-discriminating direction. It leaves room for different kinds of plurals to carry additional differences that this projection deliberately sets aside.

The second LDA fit is designed to find those differences. It uses four plural categories and looks for directions that separate their noun representations. In the resulting analysis, whole-token plurals and two-token boundary-crossing plurals are distinguishable from each other and from the remaining groups. The natural and artificial morphemic groups form distinct clusters that overlap. Their shared suffix tokens are one possible explanation for their proximity. The study also leaves room for frequency and differences in the representation of number to help explain the separation that remains.

The two analyses together explain how similar behavior can coexist with distinguishable representations. Along a direction that brings out grammatical number, the plural classes look alike. Along directions chosen to reveal differences among plurals, they can look distinct. For the agreement question, the presence of a common number distinction supplies a plausible account of why multiple tokenizations work. It gives the researchers a candidate feature to investigate in a causal test.

A causal test would need to intervene on the relevant representation and observe what happens to the article prediction. The paper proposes intervening along the embedding directions or examining which parts of the system support the behavior in different conditions. The current projections measure what can be distinguished in the embeddings. The reported behavior is compatible with BETO using a shared number feature, with different processes arriving at similar outputs, or with a combination of shared and segmentation-specific processing.

Limitations

Limits the authors identify

The authors identify scope as a principal limitation. The experiment examines regular Spanish noun plurals, a nearby article agreement relation, and one pretrained Spanish predictor with its existing vocabulary. The regular change in the chosen forms makes the manipulation interpretable, but it also confines the evidence to a particular kind of inflection. Other morphological phenomena, languages, tokenizers, and predictors could produce a different balance between locating a clear ending and learning useful information from whole forms or other pieces. The authors explicitly point to that wider range as the next place to test the question.

High performance is another stated limit. In this setting, virtually all the tested segmentation classes support the correct preference most of the time. That leaves little room for an intervention to increase the accuracy score. Continuous log-odds reveal changes in preference even around that ceiling, which is why the regressions can find effects that look modest in the accuracy results. The authors suggest using a more challenging agreement task or a task where the division of a complex word into parts has more opportunity to affect the final prediction.

The paper also limits its claim about internal processes. A shared direction separating singulars and plurals says that a similar distinction can be read from several types of input representation. Establishing which computations actually carry that information to the article prediction would require further intervention. The authors accordingly describe the embedding work as exploratory. Its contribution is to point to a plausible common representation and to show where the plural groups can still be told apart.

The authors discuss the result in the context of studies where morphology-aware segmentation has helped. Their own task shows that presenting a grammatical ending as a separate token can be viable without producing an advantage over the original pieces. They also connect the artificial-token results to evidence of morphological generalization in previous work and note that generalization varies across languages and systems. The conclusion stays close to the tested predictor, noun class, and article decision.

Limits that follow from the experimental design

The effect of artificial tokenization is measured after pretraining. BETO’s parameters and vocabulary come from its existing pretraining setup, and the intervention supplies a different token sequence at evaluation time. A predictor trained from the outset with a tokenizer that consistently isolated plural markers would have different opportunities to learn those pieces and their combinations. How such a training choice would affect article agreement remains open. The experiment gives direct evidence about alternate inputs to an existing predictor.

The artificial condition changes the input in several ways at once. It creates a separate suffix token, reuses the tokenization of the base from the singular, and can change the number of positions used for the noun. These are all part of the encoding that the authors want to test. They also mean that the paired comparison estimates the combined effect of adopting that encoding. Features such as sequence length and the familiarity of the original pieces are possible reasons for some of the difference. The article results alone leave their contributions unresolved.

In the default comparison, the segmentation classes contain different nouns. The spoken frequency norms document one source of difference, and the adjustment accounts for the frequency relationship measured with those norms. Spoken usage and exposure during BETO’s pretraining are different quantities. Frequency coverage is also limited to forms represented in the norms. Consequently, the adjusted regression can support an association beyond the measured frequency effect while leaving other differences among the lexical groups open.

The categorical outcomes have a narrow interpretation. Each score compares the probabilities of two gender-appropriate articles of the same type. That is enough to tell whether the system prefers the right number within the candidate pair. Open-ended generation involves the rest of the vocabulary as well, and a sentence can require retaining or recovering number information under more varied conditions. The dataset gives a relatively direct view of local sensitivity to the noun’s number. Its accuracy therefore applies to a masked article comparison with predetermined alternatives.

The source of the nouns and the shape of the input place an additional boundary on the result. AnCora supplies the forms, while the prediction examples discussed in the paper place the noun directly after the article mask. The resulting task minimizes demands from surrounding material. Under these conditions, even a piece that crosses a morpheme boundary can preserve information sufficient for agreement. How such pieces behave when more of the input competes for attention remains a separate empirical question.

The study’s evidence for generalization also deserves a precise statement. The authors change how attested plural forms are expressed as sequences of tokens. The original word can be familiar while the artificial sequence is new for that word. The exercise asks whether the system can transfer its use of plural cues to that alternate sequence. Generalization to a genuinely novel noun, to an unfamiliar pattern of inflection, or to irregular forms involves additional demands beyond the tested intervention.

Finally, the embedding analysis has a narrower sample and a more compressed representation than the behavioral comparison. The choice to use two-token plurals among the split forms helps control the effects of averaging. It makes the resulting projections most directly applicable to the forms that satisfy that requirement. Averaging across noun tokens and upper layers also yields a representation of the noun as a whole. It leaves open where across positions and layers the relevant information arises or which representation the predictor uses at the mask. An article preference and a discriminant projection give two views of the same inputs, each with its own scope.

What came after

The later work Why do language models perform worse for morphologically complex languages? frames the question at the level of languages that differ in morphological complexity. The Spanish experiment supplies a narrower point of comparison for that question. It tracks what happens when one common grammatical distinction is presented through different pieces, including a representation the predictor would ordinarily never receive for that word. Its results show that a regular inflection can remain accessible through several segmentations under favorable task conditions. The later work’s question broadens the outcome from a single agreement judgment to differences in performance associated with morphological complexity.

The relationship between those questions matters for how the Spanish result is carried forward. A word can be morphologically complex while still being easy to interpret in a specific local context. The selected Spanish plurals share predictable endings, and the article task offers a direct comparison between number candidates. Broader differences across languages can involve demands beyond recovering such an ending. The earlier experiment gives one bounded case for reasoning about the link between internal word structure, the tokens supplied to a predictor, and measured performance.

MAGNET takes up tokenization as an intervention in multilingual fairness and identifies adaptive gradient-based tokenization as its approach. Its connection to the agreement study is the decision to treat the way text is divided as a variable that can affect the resulting predictions. The Spanish study manually changes individual nouns to expose their grammatical endings, then measures the response of a fixed predictor. MAGNET places the segmentation decision within an adaptive approach directed at multilingual fairness. The stated objectives therefore give the tokenization choice different tests, from preserving a particular local grammatical distinction to addressing behavior across languages.

Cite

Cite as Catherine Arnett, Pamela D. Rivière, Tyler A. Chang and Sean Trott. 2024. Different Tokenization Schemes Lead to Comparable Performance in Spanish Number Agreement. Proceedings of the 21st SIGMORPHON workshop on Computational Research in Phonetics, Phonology, and Morphology.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2024.sigmorphon-1.4

@inproceedings{arnett2024different,
  title = {{Different Tokenization Schemes Lead to Comparable Performance in Spanish Number Agreement}},
  author = {Catherine Arnett, Pamela D. Rivière, Tyler A. Chang and Sean Trott},
  booktitle = {Proceedings of the 21st SIGMORPHON workshop on Computational Research in Phonetics, Phonology, and Morphology},
  year = {2024},
  doi = {10.18653/v1/2024.sigmorphon-1.4},
  url = {https://doi.org/10.18653/v1/2024.sigmorphon-1.4}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/arnett-2024-different-tokenization-schemes-lead-comparable/