---
title: "Grammatical gender in Swedish is predictable using recurrent"
description: "A recurrent neural network predicts the grammatical gender of Swedish nouns from spelling alone, even after common suffixes are excluded…"
canonical: "https://research.elamur.ai/free/en/papers/zec-2023-grammatical-gender-swedish-predictable-using/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/zec-2023-grammatical-gender-swedish-predictable-using/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2023](https://md.research.elamur.ai/free/en/papers/2023/) / Grammatical gender in Swedish is predictable using recurrent neural networks

# Grammatical gender in Swedish is predictable using recurrent neural networks

Paper · 2023 · Edvin Listo Zec and Olof Mogren

**Authors:** Edvin Listo Zec and [Olof Mogren](https://md.research.elamur.ai/free/en/authors/olof-mogren/) · **Year:** 2023 · **Venue:** arXiv:2306.10869 · **Licence:** [CC BY 4.0 (arXiv)](http://creativecommons.org/licenses/by/4.0/)

[**0** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W4381568552) · [arXiv:2306.10869](https://openalex.org/S4306400194) · [licence](http://creativecommons.org/licenses/by/4.0/)

- [PDF](https://arxiv.org/pdf/2306.10869)
- [arXiv 2306.10869](https://arxiv.org/abs/2306.10869)
- [OpenAlex](https://openalex.org/W4381568552)

Citations: OpenAlex, 2026-10-14.

## Summary

A Swedish speaker saying “a ball” uses *en boll*, while “a table” is *ett bord*. The choice between *en* and *ett* depends on the noun’s grammatical gender, a property that also affects definite forms. The Swedish Academy describes gender as mostly a property of individual words. Some endings are reliable clues, and nouns for living things usually belong to the common gender, but such tendencies leave many cases unresolved. The authors ask how frequently the gender of a Swedish noun can be inferred from its spelling when the noun is presented on its own.

They train classifiers on 88,480 nouns from the Swedish lexical resource SALDO. Each noun is given in its singular indefinite [word form](https://md.research.elamur.ai/free/en/concepts/word-form/). This choice keeps the experiment from giving the classifier a definite or plural ending that could already indicate the answer. The input is a sequence of written characters, paired during training with a label for common or neuter gender. The authors compare a feed-forward network with recurrent networks that read the characters in order and carry information from earlier positions forward.

The strongest classifier uses long short-term memory, or LSTM, a recurrent architecture that learns what to retain as it reads a sequence. It reaches 95.15% accuracy on the held-out test set. The majority-class reference reported for the task is 71%, the share of common-gender nouns in the dataset. When the authors remove test nouns ending in *ing*, *tion*, *het*, *ist* or *eri*, the LSTM’s accuracy on the remaining nouns is 92.68%. This second evaluation tests the same classifier on a narrower set of words, after removing examples with some familiar clues.

The experiment shows that written form carries enough information for accurate gender prediction across a large collection of Swedish nouns. Familiar endings help explain why spelling is a plausible source of evidence, and the filtered test shows that successful prediction extends well beyond nouns with the selected endings. The scores leave open which patterns account for individual decisions and how well the classifier would perform on words unrelated in form to those it encountered during training. The finding concerns statistical predictability on held-out words, with room for both regularity and exceptions.

## Deep dive: Grammatical gender in Swedish is predictable using recurrent neural networks

A recurrent neural network predicts the grammatical gender of Swedish nouns from spelling alone, even after common suffixes are excluded from testing. · about 32 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### A property of the noun with visible consequences

Common gender, also called *utrum*, and neuter gender, or *neutrum*, are the categories at issue. As the authors explain, the masculine and feminine categories of an earlier Swedish gender system merged into the present common gender. The paper studies the distinction used in modern Swedish. Calling one class “common” names the grammatical category as well as describing its prevalence in the dataset.

The difference is visible when a noun appears with an indefinite article. In *en boll* and *ett bord*, both articles correspond to “a” in [English](https://md.research.elamur.ai/free/en/topics/english/), while the Swedish forms differ. The authors also point to the definite article and the suffix used to mark definiteness. These are places where knowledge of the noun’s gender has a practical consequence. A learner who knows the meaning of a noun and can recognize it when written may still need to learn which article and definite forms go with it.

The paper draws on two descriptions of this difficulty. The Swedish Institute for Language and Folklore advises that there is no unambiguous general way to assign a word its gender. The Swedish Academy treats gender as a lexical property, meaning that it belongs to the noun as an entry in the language. In the Academy’s account, a noun’s meaning and construction usually give an incomplete basis for determining the category. Together, these observations explain why gender assignment is a difficulty for learners and why a prediction experiment is worth doing.

A lexical property can still correlate with other properties of the words that bear it. The authors point to a semantic tendency involving living things and to formal tendencies involving particular endings. The semantic tendency groups nouns by what they denote. The formal tendencies group them by how they end. Those are different sources of evidence, even though they can occur together in a particular noun. The experiment isolates the written sequence as input and asks what a classifier can learn from that source on its own.

#### From a rule for a word to a prediction across words

A rule that settles the gender of an individual noun would tell a learner which article to use with confidence. A statistical prediction can succeed across many nouns even when each clue admits exceptions. The distinction matters here because the authors evaluate the proportion of correct decisions over a set of words. Their experiment can show that the spelling is informative without requiring a compact rule that covers every noun.

The familiar endings offer a starting point. The paper identifies *ing*, *tion*, *het* and *ist* as endings associated mainly with common gender. It gives *eri*, *skop* and *gram* as endings associated mainly with neuter gender. The association concerns words that end with those sequences. An ending can favour a class while leaving the gender of a specific word uncertain. And a learner who can use these particular patterns still needs evidence for nouns whose endings fall outside the list.

That issue is partly about the unit of analysis. A linguist working on [morphology](https://md.research.elamur.ai/free/en/concepts/morphology/) might identify a suffix as a meaningful or grammatical piece of a word and distinguish it from an identical string of letters that happens to occur at the end of another word. The method in this paper receives the letter string. It can make use of repeated configurations whether or not they correspond to units that a linguistic analysis would identify. The experiment therefore addresses the predictive value of word form under a deliberately broad notion of formal evidence.

There is also a distinction between a clue already expressing gender and a clue merely associated with it. The definite suffix can express the gender distinction directly. A tendency among bare nouns with the same ending is a statistical association. The authors want to estimate what the second kind of evidence can achieve without giving the classifier the first kind through the choice of input form. That motivation governs which nouns and forms are used in the experiment.

#### What earlier gender predictors could use

The paper describes several approaches to predicting gender in other languages. Nastase and Popescu used kernel ridge regression for German and Romanian and obtained high precision, according to the authors’ account. The comparison is linguistically relevant because the paper describes Romanian as having sound patterns that help indicate gender, and German as closer to Swedish in having rules with exceptions. It also notes that German and Romanian are conventionally described as having three genders, whereas the Swedish prediction task has two.

The cited work by Dinu and colleagues approaches Romanian through an alternative question about the categories themselves. It uses a support vector machine with [n-gram](https://md.research.elamur.ai/free/en/concepts/n-gram/) features, which represent contiguous sequences of elements, and finds support for an analysis with two genders. The Swedish study starts with the common and neuter labels already assigned to nouns. Its task is to recover the assigned category from the form. The Romanian example shows how a prediction experiment can instead be used to examine the grouping of categories.

The work on Konkani described in the paper uses a morphological analyser to provide features for a classifier. In that setup, a separate component identifies morphological information and gives the classifier the resulting description. The Swedish authors leave this stage to learning from characters. The contrast in inputs matters because success with a morphological analyser can depend partly on what that analyser already knows how to identify, while the Swedish experiment begins with letter sequences and noun labels.

Cucerzan and Yarowsky’s work, as described by the authors, combines information from suffixes with information from the contexts of nouns in a corpus. Their systems organise word endings in tries, structures that can represent related strings through shared paths, and begin with a small set of labelled words. Their evaluation includes Swedish and [French](https://md.research.elamur.ai/free/en/topics/french/) alongside other languages. The Swedish result the paper singles out is that an ending restricted to one character provides too little evidence for a good prediction. That observation motivates interest in richer patterns of spelling even though their overall procedure can draw on surrounding words as well.

The paper also cites Basirat and Tang’s Swedish gender prediction work using [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/). In that study, a noun is represented using information from the contexts in which it occurs. The current paper adopts a different evidence source. It uses embeddings internally, but what those embeddings represent are individual characters in the noun, and the classifier receives its supervision from a labelled lexicon. The presence of a learned vector representation in both approaches does not make their inputs equivalent.

Context is especially consequential in a gender task because surrounding words can supply information of the sort exemplified by *en* and *ett*. Corpus evidence can also capture broader regularities in how words are used. The paper asks a more restricted question by withholding surrounding words altogether. A comparison with context-based research helps identify the kind of information being tested. It does not establish which input would be preferable under a shared evaluation.

#### Why a network that reads characters was a plausible choice

The authors connect their method to earlier research on generating inflected [word forms](https://md.research.elamur.ai/free/en/concepts/word-form/). One line of work they cite uses a character-based technique to produce an inflection given another word demonstrating the desired relationship. They also cite recurrent approaches to morphological inflection and reinflection. In those tasks, written characters supply useful evidence about how words are built and how forms change with grammatical requirements.

Gender prediction makes a different demand on that evidence. The network reads a word with the aim of choosing a grammatical category. It has no need to generate an inflected form or learn when to emit a particular sequence of output characters. The authors describe the resulting classifier as smaller and the route through which the learning signal travels as shorter than in the generation tasks they discuss. They suggest that some of the character patterns it can learn may nonetheless be similar.

This connection gives a reason to try recurrence before knowing what the results will be. Gender clues may occupy several successive character positions, as the familiar endings do. The significance of some characters may also depend on their neighbours or on where they occur within the noun. An architecture that reuses a transition as it moves along a sequence can learn from such configurations across words of different lengths. The experiment then asks how much of the gender distinction that approach can recover.

### The method, step by step

#### Choosing what the classifier gets to see

The starting material is SALDO, a resource from the Swedish Language Bank. The authors take Swedish nouns with gender labels and restrict the input to singular indefinite forms. When the target is a word’s gender, using a form whose inflection indicates that category would make the question easier in a way that bypasses much of the intended investigation. The chosen form keeps the focus on cues available within the spelling of the noun under the same grammatical conditions for every example.

Each example supplies a written word and its lexical class. During training, the word is the input and the class gives the desired answer. At evaluation time the classifier sees the word, and its decision is checked against the known label. The gender information comes from the resource. The network does not need an article beside a noun to learn which label it should produce during training.

The next operation turns written characters into integers. A character receives a distinct identifier, and the identifiers appear in the same order as the characters in the word. These integers are indices. Their purpose is to distinguish letters and address entries in an embedding layer. They need carry no numerical claim about which letters are similar or which belong to words of the same gender.

To make the resulting sequences a uniform length for the experiments, the authors append zeros on the right. The length used is 19, the length of the longest word in their dataset. The characters of a shorter word keep their original positions relative to its beginning, and padding fills the positions after its final character. The padding convention matters when interpreting what the network receives. Each noun is represented by the characters of the word and, where needed, positions reserved for padding. There is no word to its left or right in the input.

An embedding layer turns character identifiers into vectors, ordered collections of values that the network can use in its calculations. In the stated feed-forward design, the embedding dimension is 60. The recurrent designs use the same type of embedding layer, described in the paper as the same embedding layer. The representation goes from a sequence of discrete indices to a sequence of learned numerical descriptions. The entries in those descriptions are shaped by the training objective. Linguistic features such as suffix boundaries are left for the subsequent layers to infer from the character representation if useful.

From a written Swedish noun to a gender prediction The steps in order.

#### How a recurrent network reads a word

A recurrent neural network, or RNN, uses the same learned transformation at successive positions in a sequence. At each position it combines information about the current input with an internal state from the previous position. In this experiment, that means using the vector for the present character together with information accumulated as the network processed earlier characters. The state is itself a vector. It can hold features that help the next step interpret the current character or help the eventual output assign a category.

The repeated transformation is an important part of the design. A sequence of letters can occur in short and long words, and recurrence gives the network a shared way to process it as it unfolds. The values stored in the state can still depend on the preceding letters. Sharing the transformation across positions therefore leaves room for the same character to have different effects in different words. It also lets a recurrent architecture in principle process sequences of varying length, although the experiments prepare uniformly padded inputs.

The paper introduces recurrence with the transition for a basic RNN.

```
hₜ = tanh(W xₜ + U hₜ₋₁ + b)
```

Here, t indexes the current position in the sequence. The vector xₜ is the input at that position, and hₜ₋₁ is the hidden state carried over from the preceding position, indexed by t minus one. The vector hₜ is the updated hidden state. W is the matrix of learned weights applied to the current input, and U is the matrix of learned weights applied to the previous hidden state. Juxtaposing a matrix and a vector denotes matrix–vector multiplication. The plus signs indicate that the transformed input, the transformed state and the bias vector b are added. The function tanh is the hyperbolic tangent, applied separately to each component of that sum. The equals sign defines the new state in terms of these operations.

This equation introduces the mechanics of a recurrent transition. The architectures tested in the paper use gated recurrent units or long short-term memory cells in their recurrent layers. The basic equation is useful because it shows where the prior state enters the calculation and what it means to reuse the same weights at each position. The paper does not give a separate set of equations for the cells used in the experiments.

Training a recurrent network involves sending information about its prediction error back through the computations that produced the prediction. The paper notes that in a basic RNN this learning signal can become very small over many successive steps, a difficulty called the vanishing gradient problem. A gradient indicates how changing a parameter would change the loss being optimised. When the part of that signal reaching early steps is weak, it becomes harder to learn a useful relationship between information seen early and evidence encountered later. The authors present this as the motivation for using recurrent architectures with gates.

#### What a gate does

In the authors’ explanation of long short-term memory, the position indexed by t has an internal memory vector, cₜ. A forget gate, fₜ, controls which contributions from the previous memory are retained. An input gate, iₜ, controls what information is written to the memory. An output gate, oₜ, controls which information from the memory is made available in the cell’s output. These symbols name vectors associated with the current step. A gate here is a learned control over information flow, with values that can vary as the network reads different characters in different words.

This arrangement gives the network ways to retain a piece of evidence while continuing to read and to update it when later characters arrive. In an isolated word, a sequence that looks informative at an intermediate position may be followed by letters that change its relevance to the final decision. The architecture can in principle learn to handle such situations. That description explains why memory is a reasonable design choice. It does not identify the information actually stored by an individual cell in this experiment.

The other recurrent design uses a gated recurrent unit, or GRU. The authors introduce it as an architecture with two gates, in contrast to the three gate roles they describe for the LSTM. It offers another way to control the passage of information along a character sequence. The experiment keeps the broad recurrent arrangement comparable while changing the kind of cell. The earlier work credited with introducing the GRU is [Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation](https://md.research.elamur.ai/free/en/papers/cho-2014-learning-phrase-representations-rnn-encoder/).

#### How the architectures differ

The feed-forward classifier starts with the character embedding layer. Two dense layers follow. A dense layer calculates each of its outputs from the inputs presented to that layer using learned weights. The hidden dense layer has 128 units with a hyperbolic tangent activation, and the output layer has 1 unit with a sigmoid activation. Information moves through those layers towards the output without the recurrent state update used by the other designs. This gives the experiment a comparison that uses the same character-based input and a learned prediction function.

The GRU classifier follows the embedding layer with a recurrent layer of 64 units and a hyperbolic tangent activation, as described in the setup. The paper says that the recurrent layer passes a sequence to a dense layer with one sigmoid unit. The LSTM classifier follows the same arrangement with LSTM cells in place of the GRUs. The description establishes the main components and the change in recurrent cell type. The exact operation that reduces the sequence to the word-level decision is left unspecified in the architectural account.

A sigmoid turns the output unit’s score into a value between zero and one. This is a natural shape for a quantity used to distinguish between two classes. The design needs one output unit because the choice is between common and neuter. The paper evaluates the resulting categorical decisions. It gives neither the numerical cutoff used to turn the sigmoid value into a label nor the mapping of the high end of that value to a named gender.

The recurrent and feed-forward comparison is therefore about complete architectures as set up by the authors. They share preparation of the input and the purpose of the output. They differ in how intermediate computations use the characters, and their stated hidden layer sizes differ as well. The GRU and LSTM pair is more closely matched in the given description, since the change the authors specify is the substitution of the cell type. Those design choices determine how narrowly each comparison can be interpreted.

#### How learning and evaluation are kept apart

The authors divide the nouns into training, validation and test partitions. The training examples provide the word–label pairs used to adjust the network’s weights. The validation partition provides a separate loss measurement during training. Loss is the quantity used to judge prediction errors in the training procedure, whereas the main reported evaluation measures how many categorical decisions are correct. The test partition is held aside for evaluating the trained networks.

The paper assigns 60% of the dataset to training, 20% to validation and 20% to test. All the networks use a batch size of 32. A batch is the group of training examples processed together for an update. The authors train using the validation loss as a stopping signal. In their stated procedure, training continues until the validation loss has shown no change for 50 epochs. An epoch is a pass through the training examples. This rule specifies the patience of the procedure in terms of epochs without saying that all networks stopped after the same total number of passes.

All architectures use Adam, an optimiser that updates the parameters from gradient information gathered during training. The authors choose the settings from the paper that introduced it. [Adam: A Method for Stochastic Optimization](https://md.research.elamur.ai/free/en/papers/kingma-2014-adam-method-stochastic-optimization/)

```
α = 0.001
```

The symbol α is Adam’s learning rate, which sets the scale for parameter updates. The equals sign assigns it the value used in the experiments.

```
β₁ = 0.9
```

The symbol β₁ is Adam’s first decay rate. The subscript identifies the coefficient for the running estimate based on the gradients themselves. The equals sign gives the chosen setting for that coefficient.

```
β₂ = 0.999
```

The symbol β₂ is Adam’s second decay rate. Its subscript identifies the coefficient for the running estimate based on squared gradients. The equals sign gives the value used for that estimate’s decay.

```
ε = 10⁻⁸
```

The symbol ε is the small constant used for numerical stability in Adam’s calculation. The raised negative exponent in 10⁻⁸ denotes the power applied to the base 10. The equals sign specifies the value chosen for this constant.

The second test condition is created after defining the ordinary test partition. The authors remove nouns ending in selected familiar strings and evaluate on the words left in that partition. Training uses the original procedure, so the filtered test is a change to which evaluation examples contribute to the score. It lets the authors examine whether the classifier continues to make correct decisions when a familiar portion of the test vocabulary is set aside.

### Experiments and results

#### What counts as a test example

The dataset consists of 88,480 SALDO nouns labelled for grammatical gender. Common-gender nouns make up 71% of the full collection, and neuter nouns account for 29%. The paper sets this distribution beside the Swedish Academy’s more general description of common gender as applying to about two thirds of Swedish nouns and neuter to about one third. The percentages used in the experiment describe this collection. The Academy’s proportions are a broader description of the language.

The unit being classified is a noun in singular indefinite form. That choice determines what a correct prediction means. Each input has a gender label in SALDO, and success is agreement with that label. The task measures performance across the noun forms that enter the evaluation. There is no step that weights a word by how frequently someone encounters it in running text.

All architectures are compared on the same test data. That makes a difference in accuracy interpretable as a difference in the number of nouns the trained systems classify correctly under the stated conditions, with the examples serving as the common basis for comparison. Holding the nouns fixed is important because suitability for gender prediction may vary with the words tested. An evaluation with many words sharing familiar endings poses a different problem from one dominated by forms that give few obvious clues.

The paper reports the main accuracy on the held-out partition and creates a second evaluation from that partition by removing words ending in *ing*, *tion*, *het*, *ist* or *eri*. Excluding an example means that the whole noun is absent from the filtered evaluation. The remaining forms retain their original spelling and labels. The networks therefore face ordinary nouns from the same resource in both conditions. What varies is which portion of the test vocabulary contributes to the result.

#### The reference points for accuracy

Prediction accuracy is the share of evaluated nouns assigned the correct gender. That measure gives each evaluated word equal weight. Because common gender is prevalent, a system can achieve a substantial score by assigning every noun to that category. The paper reports 71% as the majority-class baseline, matching the common-gender share given for the full dataset. Its role is to show how far a method that uses no information from individual spellings can get by favouring the prevalent label.

The feed-forward network is a more informative architectural comparator. It receives the written word and learns from the same training data, so it can take advantage of spelling. Its purpose is to put the recurrent designs alongside a classifier using character embeddings and dense layers. The GRU and LSTM comparison then addresses a narrower question about which of the two recurrent variants performs better in this setup.

The authors also discuss a result from earlier Swedish research. The context-derived word embeddings used by Basirat and Tang yielded 93.7% classification accuracy in the work cited. That number describes the earlier study’s task under its own evaluation. The current experiment gives the classifiers different inputs and does not establish a shared test protocol with that work. The two reported accuracies are evidence that gender information can be recovered from different representations. Their ordering alone is insufficient to rank spelling and contextual evidence.

#### Accuracy on the complete and filtered test sets

The LSTM is the strongest of the networks the authors compare. Its classification accuracy is 95.15% on the complete held-out test set. Alongside the 71% majority-class reference, this result shows that the decisions extracted from character sequences add substantial predictive information. The reported accuracy pools common and neuter words. Its clearest interpretation is the overall rate of agreement with SALDO’s labels across the full test condition.

On the filtered test set, the LSTM achieves 92.68% accuracy. This score covers the test words that remain after the selected endings are removed. A strong result under that condition is central to the paper’s case. The most effective classifier continues to assign the right gender to a large share of test nouns even after removal of forms with those particular final strings. The score is lower than its accuracy on the full test partition, so the selection does affect the reported result.

LSTM accuracy on the complete and suffix-filtered SALDO test sets Accuracy is higher on the complete set and remains high on the words retained after filtering.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Complete held-out test set (this paper) | 95.15 |
| Test set excluding the selected endings | 92.68 |

These scores address complementary aspects of the question. The complete test partition asks how well the classifier performs over the collection of held-out nouns as constructed by the authors. The filtered partition asks how much predictive success remains outside a familiar set of endings. Since the latter is a subset of the former, the scores describe overlapping evaluations of the same task. Their relationship can be read in light of the change in test composition, rather than as independent results from separate collections.

The selected endings mostly indicate common gender, with *eri* providing a familiar neuter-associated ending. The gender mixture of the filtered test set could therefore differ from that of the full set. The paper gives 71% and 29% as shares for the complete dataset. It does not give corresponding percentages for the filtered evaluation. The majority-class reference should consequently be interpreted in the context in which the authors report it. The filtered accuracy has its own denominator, consisting of the remaining test nouns.

The authors refer to an accuracy table for the network comparison. The conclusion supported by their reported figures is that the LSTM leads, with the stated scores on the two test conditions. Separate accuracy figures for the feed-forward and GRU networks are not specified in the numerical account. The ranking establishes which design led the comparison. It leaves the extent of the LSTM’s advantage over each of the alternatives open.

#### Class-specific scores and examples

The paper also gives precision, recall and F1 as measures for the LSTM. For a gender treated as the category of interest, precision asks what share of the predictions of that gender are correct. Recall asks what share of the nouns labelled with that gender are recovered by the classifier. F1 combines precision and recall in a single measure that gives greater influence to the lower of the pair than an ordinary average would. These measures supplement accuracy because an overall score can conceal unequal performance across the categories.

Consider how the same assignment can look from the two directions. If a noun labelled neuter is assigned common gender, it is a missed neuter noun and a mistaken common-gender prediction. Recall for neuter and precision for common are designed to capture those respective effects. Accuracy records the assignment simply as an error. A class-level view is especially pertinent here given the prevalence of common gender in the dataset. The authors identify separate evaluation conditions for those measures, including results on the suffix-filtered set, but the numerical account does not specify the individual precision, recall and F1 values.

The paper also describes tables of randomly chosen examples from the test set, drawn from correctly and incorrectly classified words. The categorisation by outcome gives these examples a different purpose from the aggregate results. A reader can inspect what kinds of predictions succeed or fail. The frequencies of those phenomena in the test set still have to come from systematic counts. Showing examples drawn from the successful and unsuccessful groups does not preserve their relative size in the evaluation.

A visual analysis uses t-SNE on the outputs of the LSTM layer for the full and filtered test sets. The method makes a low-dimensional display out of the vectors produced by that layer, so a reader can inspect how words are arranged in the display relative to the labels. The figure distinguishes true gender labels and indicates incorrect predictions. This adds a view of what the recurrent layer represents after reading a word, whereas the headline score measures the final classification. Visual proximity can guide interpretation, but it supplies no additional measured accuracy and gives no direct account of which letter sequence caused a decision.

### What the ablations show

#### The suffix test changes the words under evaluation

The analysis closest to an ablation removes examples from the test set. Its design is worth tracing because removing a whole test word answers a particular question. If the word ends in one of the selected strings, its prediction contributes to full-set accuracy and is absent from the filtered score. If the word does not have a selected ending, it is judged with exactly the same spelling as before. The authors use the trained classifier in both conditions. No set of characters is erased from the words retained for the second evaluation.

That procedure tests whether the success of the classifier is confined to words with the familiar endings. The filtered score of 92.68% shows that prediction succeeds across much of the remainder. The complete score of 95.15% shows the performance when the removed words are also included. Together they establish that the subset without the specified endings is somewhat more difficult for the LSTM on this measure and still offers enough evidence for a high rate of correct decisions.

Those observations are about the population of nouns contributing to each score. They do not by themselves measure how much of a prediction for a particular word is attributable to its ending. A word removed because it ends in *ing*, for example, might also contain informative characters earlier in the sequence. The filtered test discards the whole prediction and with it the evidence about how the network used those earlier characters. It leaves the causal role of the ending in that word unresolved.

The procedure also leaves any occurrences of the selected endings in the training partition available to the classifier. A network that saw such examples during training could have learned useful patterns from them, some of which might occur in the retained set under other conditions. The filtered score estimates the classifier’s performance on words outside the selected ending groups after ordinary training. An experiment that withheld those examples during training would address a different question about what knowledge the network can acquire without exposure to them.

The choice of removed endings also determines the scope of the inference. The authors give *skop* and *gram* as endings associated with neuter gender, while the evaluation filter targets *ing*, *tion*, *het*, *ist* and *eri*. Other endings can still be present and useful, including ones that a linguist would recognise and ones the classifier learns as purely orthographic patterns. The experiment supports a role for spelling evidence extending beyond the named filter. It leaves open how much of that evidence consists of endings of other lengths or kinds.

#### What changes across the network comparisons

The feed-forward classifier and the recurrent classifiers share the same data and input encoding. This controls for the availability of information from the spelling, which is central to the research question. Each has access to a word’s characters and the same kind of gender supervision. The LSTM’s lead means that this particular recurrent design is the best of the approaches trained and evaluated in the paper. The comparison does not eliminate the possibility that a different dense network could use the same inputs as effectively.

The hidden widths and computation differ between the stated feed-forward and recurrent designs. A dense hidden layer combines the inputs through a feed-forward operation. The recurrent layer applies a cell repeatedly across positions, with a state carried forward. Accordingly, this comparison changes several properties at once. It supports a conclusion about the relative performance of the configured systems, while leaving the individual contributions of recurrence, width and other details unresolved.

The LSTM and GRU comparison holds more of the architecture fixed in the authors’ description. Both use the embedding layer, a recurrent layer and a single sigmoid output unit, with the GRU replaced by an LSTM in the latter design. This makes the result relevant to the choice of recurrent cell in their setup. It still does not establish which component of the cell caused the difference. The authors vary the whole cell type, so the effects of the separate memory and gate operations are combined in the comparison.

The motivation for using gated recurrence comes from the difficulty basic recurrent networks can have when the relevant learning signal passes through many positions. The experiments use that design motivation to choose architectures. They do not test the basic recurrent equation against the gated cells. Nor do the scores identify a particular dependency between distant characters that a gate was needed to learn. What the results establish is that a gated recurrent architecture can extract useful evidence under the paper’s input conditions.

#### What the qualitative analyses can explain

The examples of correct and incorrect predictions give a reader a way to ask what a score pools together. Different nouns can reach the same outcome for different reasons. A correct answer on a word with a familiar ending could be consistent with an ending-based rule. A correct answer on a word outside the selected ending groups might reflect a different ending, a longer pattern or features elsewhere in the word. Simply seeing that the answer is correct does not decide among those possibilities.

The projection of LSTM outputs shifts attention to the representation preceding the classification layer. Inspecting words with different true labels and noting where errors appear can help a reader ask whether the recurrent representation separates the classes cleanly or leaves examples that are difficult to distinguish. That is a question about [interpretability](https://md.research.elamur.ai/free/en/topics/interpretability/). A projected arrangement compresses the information in the original vectors. Its geometry can give a useful visual account of the representation while leaving the learned decision process underdetermined.

The architecture comparison, filtered test and qualitative displays thus provide different kinds of analysis. The first measures comparative performance of the networks as configured. The second measures performance on a vocabulary subset without selected endings. The examples and projection make it possible to inspect individual outcomes and representations. None of these analyses systematically removes internal components, isolates alternative positions in the spelling or tracks what a particular cell retains. The paper accounts for the presence of predictive information more directly than it accounts for its internal use.

### Limitations

#### Limits stated or acknowledged by the authors

The authors restrict their claim to gender prediction from the written characters of isolated Swedish nouns. Their setup directly excludes neighbouring words and uses only singular indefinite forms. As they explain, definite and plural endings could give away information the experiment is meant to recover under more demanding conditions. The result consequently describes one way of presenting a noun. How the same architectures would handle other forms is outside the experiment.

The authors also describe the linguistic regularities as tendencies with exceptions. Saying that living things are generally common gender or that certain endings favour a category gives a reason to look for evidence. It does not set an expectation of exceptionless classification. The paper’s conclusion is that the network can learn useful patterns from character sequences. The examples of incorrect predictions and the reported accuracy are consistent with the authors’ description of gender as a lexical property that can be difficult to assign.

The context-based studies discussed by the authors address a different input condition. A method that observes how a noun appears in a corpus can make use of information deliberately withheld here. The paper treats the smaller amount of input information as part of the point of its experiment. That leaves the question of comparative effectiveness across matched inputs and datasets for a different study. The current result shows how far the spelling-based procedure goes under the authors’ own evaluation.

Their second evaluation explicitly asks what happens without a selection of common endings among the test nouns. It is bounded by that selection. The authors’ own list of gender-associated endings includes forms outside the filter, and the experimental description leaves those forms eligible for evaluation. The resulting score is evidence that predictability survives this particular restriction on the test vocabulary.

#### What the data split can establish

The split establishes that evaluation is carried out on a held-out portion of the dataset. The paper describes the allocation into training, validation and test, while leaving the relationships among words on opposite sides of those boundaries unexamined. A noun can be held out as an example while still sharing an ending, a stem-like sequence or a larger part of its spelling with a training noun. Performance can therefore include generalisation across related-looking forms.

Such sharing is a plausible way for a form-based classifier to work, and the paper’s result remains a demonstration that the approach succeeds on the held-out nouns. The unresolved question is how much performance would survive in a split constructed to separate similar word forms or word families. The reported split addresses generalisation to test examples from the same resource. It gives no direct estimate for a partition designed to make words unfamiliar in that stronger sense.

The paper draws its nouns from SALDO. A dictionary-derived collection answers a question about coverage across entries in that resource. It need not have the same distribution of spellings or genders as nouns encountered by a learner in a particular reading passage, by a speaker in conversation or by a system in a new collection of text. Since the evaluation counts correct decisions over the specified test nouns, the published accuracy is best tied to that sampling unit.

The paper’s encoding choices also depend on this collection. The maximum padded length of 19 is determined by its longest word. The processing description covers the characters present in the dataset. Handling a longer word or a character outside the encoded inventory would require a defined policy in a use beyond the experiment. The paper leaves such cases open. That is an implementation boundary on the reported procedure rather than an argument about what recurrent networks in general can represent.

#### What the accuracy leaves unresolved

The overall accuracy is informative because the class-constant reference is already quite strong in a collection with a prevalent gender. Yet accuracy combines the correct decisions made for both genders. A reader who needs to know whether the classifier is equally dependable for common and neuter nouns needs the class-specific measures. The paper identifies precision, recall and F1 as measures it considers. The reported headline numbers alone do not specify the pattern of errors for each gender, especially under the filter.

The filtered test introduces a related issue. Altering the vocabulary can alter the proportion of common and neuter words as well as the prevalence of clues. The class balance in that subset is unspecified. Plausible influences on the score include differences in class prevalence and in how informative the retained spellings are. The measured accuracy remains valid for the evaluation as defined, but it cannot disentangle these influences.

The paper reports point estimates for the LSTM under the tested conditions. It gives no measure of how much those estimates would vary with different allocations of the nouns or with repetitions of training. That limits how precisely a reader can interpret the ordering of systems beyond this comparison. It also leaves the stability of the filtered result across other possible test partitions unresolved. The recorded scores answer what happened in the experiment, while claims about typical outcomes over repeated experiments would require further evidence.

A practical question about input evidence also remains. The study compares learned character classifiers and uses a majority baseline. It does not give the accuracy of a transparent predictor that applies a fixed list of suffix tendencies to the same held-out words. Such a comparator would measure how much of the task could be handled by that particular rule inventory. The filtered analysis speaks to breadth beyond a chosen set of examples, but it cannot establish the advantage over every simple spelling-based procedure.

#### What remains unknown about the learned patterns

The characters are the information supplied to the classifier at prediction time. The result therefore demonstrates that the orthography can support accurate inference from the supervision available in SALDO. It does not show that spelling determines gender in the grammar. A surface pattern can correlate with gender because it recurs in related words or because it indirectly marks properties that associate with gender. The experiment does not trace the origin of the correlation.

The relationship to meaning is particularly easy to overread. The classifier receives no separate semantic representation of the word, so the performance does not require such an input. But spelling patterns can recur among words that share properties of meaning or construction. The study leaves open whether the classifier is taking advantage of formal patterns that reflect those properties. Success from characters is an observation about what evidence reaches the network, with the sources of the underlying regularities still to be explained.

The same care applies to the idea that gender can be predicted without context. The test conditions establish that no surrounding words are necessary to reach the reported score on these isolated nouns. They do not estimate the contribution context would make for the words this classifier gets wrong, or how form and context would interact in a combined predictor. They also say little about the ways people learn gender. The paper motivates the problem partly through the challenges facing learners, while its experiment measures a trained network’s predictions on a lexical dataset.

Finally, the paper identifies the main architectural components and optimisation settings but leaves some details of the word-level computation unspecified. The account says that the recurrent layer passes a sequence to a dense layer and that the system produces a noun-level decision. It does not specify how the sequence is reduced for that decision, or whether padding is masked. These details matter for a reproduction because they determine how representations at different positions, including the padded positions, can affect the output. They leave the exact implementation of the reported architecture less completely specified than its overall design.

### What came after

The paper’s later reception remains undocumented here, with no identified follow-up studies available for assessing which parts of the experiment other researchers adopted or extended. The paper itself closes with a result about spelling-based prediction on held-out SALDO nouns. Its evidence extends to a subset that excludes familiar endings, while generalisation across independent lexical resources, across unrelated word forms and to other languages remains open.

## Cite

Cite as Edvin Listo Zec and Olof Mogren. 2023. Grammatical gender in Swedish is predictable using recurrent neural networks. arXiv:2306.10869.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.2306.10869](https://doi.org/10.48550/arxiv.2306.10869) · [arXiv 2306.10869](https://arxiv.org/abs/2306.10869)

```bibtex
@misc{zec2023grammatical,
  title = {{Grammatical gender in Swedish is predictable using recurrent neural networks}},
  author = {Edvin Listo Zec and Olof Mogren},
  year = {2023},
  doi = {10.48550/arxiv.2306.10869},
  eprint = {2306.10869},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2306.10869}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
