[Paper Review] Universal Language Model Fine-Tuning with Subword Tokenization for Polish
This paper proposes a subword tokenization approach using SentencePiece and Universal Language Model Fine-tuning (ULMFiT) to improve language modeling for morphologically rich Polish. By adapting ULMFiT with unigram subword tokenization, the method achieves a new state-of-the-art perplexity of 95.0 on the PolEval'18 test set, outperforming the second-best model by 35%, and demonstrates strong transfer learning potential for downstream NLP tasks in low-resource settings.
Universal Language Model for Fine-tuning [arXiv:1801.06146] (ULMFiT) is one of the first NLP methods for efficient inductive transfer learning. Unsupervised pretraining results in improvements on many NLP tasks for English. In this paper, we describe a new method that uses subword tokenization to adapt ULMFiT to languages with high inflection. Our approach results in a new state-of-the-art for the Polish language, taking first place in Task 3 of PolEval'18. After further training, our final model outperformed the second best model by 35%. We have open-sourced our pretrained models and code.
Motivation & Objective
- To address the challenge of high morphological inflection in Polish, which limits the effectiveness of standard word-level embeddings and n-gram models.
- To adapt ULMFiT—originally designed for English—to achieve state-of-the-art performance on Polish language modeling using subword tokenization.
- To reduce data and computational requirements for downstream NLP tasks in low-resource settings like Polish by enabling effective transfer learning.
- To replace FastText-based word representations in Polish NLP with a more robust subword-based ULMFiT framework.
Proposed method
- Employed SentencePiece’s unigram subword tokenization to handle morphological richness in Polish, enabling better OOV handling and semantic similarity preservation.
- Trained a 4-layer LSTM language model with 1150 hidden units and 400-dimensional embeddings on the PolEval 2018 LM dataset using ULMFiT’s fine-tuning strategy.
- Used a two-stage training process: first on a 25% subset to tune hyperparameters, then on the full dataset to optimize performance.
- Applied sampled softmax with 15K samples for larger vocabularies and avoided subword regularization due to dataset size constraints.
- Preprocessed text by deduplicating sentences, removing rare tokens, and optionally applying <up> control tokens for capitalized words.
- Evaluated models using validation perplexity and selected the best-performing configuration for final testing.
Experimental results
Research questions
- RQ1Can subword tokenization improve language modeling performance for morphologically rich languages like Polish when combined with ULMFiT?
- RQ2How does vocabulary size affect perplexity and model generalization in subword-based Polish language models?
- RQ3Does increasing the number of recurrent layers improve performance on Polish, despite higher memory and training cost?
- RQ4To what extent does text preprocessing, such as capitalization handling, impact model performance in Polish language modeling?
- RQ5Can ULMFiT’s transfer learning framework be effectively adapted to low-resource, inflection-heavy languages like Polish using subword representations?
Key findings
- The best-performing model achieved a test perplexity of 95.0 after further hyperparameter tuning, significantly outperforming the second-best model, which scored 146.7.
- The model achieved first place in Task 3 of PolEval’18, demonstrating state-of-the-art performance on the Polish language modeling benchmark.
- Vocabulary size had the strongest influence on model performance, with smaller vocabularies approaching character-level modeling and larger ones losing lemma-level similarity information.
- Four-layer models outperformed three-layer models on the full dataset, indicating that deeper architectures better capture Polish morphological complexity when trained on sufficient data.
- Text preprocessing with <up> tokens for initial capitals showed no significant impact on perplexity, except for a minor degradation at 100K vocabulary size.
- The final model achieved a 35% relative improvement over the second-best model, highlighting the effectiveness of subword tokenization with ULMFiT for low-resource, inflection-heavy languages.
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.