[Paper Review] Exploring Swedish & English fastText Embeddings for NER with the Transformer
This paper evaluates fastText embeddings for Swedish and English in a Transformer-based Named Entity Recognition (NER) system, demonstrating that smaller, optimally hyperparameterized datasets outperform larger ones like Common Crawl. It introduces the first publicly available Swedish analogy test set and finds that subword n-grams significantly improve performance on morphologically rich Swedish, while word2vec-based CBoW models perform best on English despite larger training data.
In this paper, our main contributions are that embeddings from relatively smaller corpora can outperform ones from larger corpora and we make the new Swedish analogy test set publicly available. To achieve a good network performance in natural language processing (NLP) downstream tasks, several factors play important roles: dataset size, the right hyper-parameters, and well-trained embeddings. We show that, with the right set of hyper-parameters, good network performance can be reached even on smaller datasets. We evaluate the embeddings at both the intrinsic and extrinsic levels. The embeddings are deployed with the Transformer in named entity recognition (NER) task and significance tests conducted. This is done for both Swedish and English. We obtain better performance in both languages on the downstream task with smaller training data, compared to recently released, Common Crawl versions; and character n-grams appear useful for Swedish, a morphologically rich language.
Motivation & Objective
- To evaluate the performance of fastText embeddings trained on smaller corpora versus larger ones like Common Crawl in NER tasks for English and Swedish.
- To develop and release the first publicly available Swedish analogy test set for intrinsic evaluation of word embeddings.
- To investigate the impact of hyperparameter tuning on embedding quality and downstream NER performance.
- To assess the utility of character n-grams for morphologically rich languages like Swedish in comparison to English.
Proposed method
- Training fastText embeddings using skipgram-negative sampling with character n-grams (n=5) and varying window sizes on both English and Swedish corpora.
- Evaluating embeddings via intrinsic tests including analogy and WordSim-353, and extrinsic evaluation using a Transformer-based NER model.
- Applying grid search to determine optimal hyperparameters (window size, negative sampling, subword vs. word-level) for both languages.
- Conducting bootstrap-based significance tests to compare model performance differences across embeddings.
- Training a Transformer model on NER tasks using the best-performing embeddings and reporting F1, precision, and recall scores.
- Creating and validating a new Swedish analogy test set with expert-verified word analogies to enable intrinsic evaluation of Swedish embeddings.
Experimental results
Research questions
- RQ1Can fastText embeddings trained on smaller corpora outperform those trained on larger datasets like Common Crawl in downstream NER tasks for both English and Swedish?
- RQ2To what extent do character n-grams improve performance on morphologically rich languages like Swedish compared to English?
- RQ3Does intrinsic evaluation via analogy and WordSim-353 reliably predict downstream NER performance?
- RQ4How do hyperparameter choices (window size, negative sampling, subword vs. word-level) affect model performance in NER?
- RQ5Is there a significant performance difference between word2vec and subword-based fastText embeddings in the NER task for Swedish and English?
Key findings
- Subword-based fastText embeddings trained on smaller corpora outperformed larger Common Crawl-based embeddings in Swedish NER, with F1 scores of 0.591 compared to 0.492 for word2vec.
- For English, the word2vec CBoW model with window size 8 and negative sampling (w8s0h0) achieved the highest F1 score of 0.720, outperforming both subword and larger Common Crawl-based embeddings.
- The Swedish subword model (w4s1h1) achieved a Spearman correlation of 74.7 on the new analogy test set, indicating strong intrinsic quality.
- Significance tests showed that the performance difference between the best English embeddings was unlikely due to chance (95% CI: [0.0003, 0.1674]), while the difference in Swedish was not statistically significant (95% CI: [-0.3257, 0.169]).
- The Transformer model achieved convergence in as few as 5 training epochs, indicating faster learning compared to prior LSTM-based models.
- The study confirms that increasing dataset size alone does not guarantee better performance; optimal hyperparameters are crucial for achieving high performance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.