Introduction
The KLEJ benchmark introduces a comprehensive, multi-task evaluation suite for Polish Natural Language Understanding (NLU), mirroring the impact of the GLUE benchmark for English. Alongside this, the authors release HerBERT, a Transformer-based model trained specifically on Polish corpora that sets a new state-of-the-art across a diverse set of linguistic tasks.
The Need for a Polish Benchmark
While the "BERT revolution" has dramatically advanced Natural Language Processing, progress has been unevenly distributed. Most state-of-the-art models and standardized benchmarks are designed for English or Chinese. For languages like Polish—which features complex morphology and free word order—researchers previously lacked a unified platform to compare models fairly across different tasks.
Without a "GLUE-like" benchmark (General Language Understanding Evaluation), it was difficult to determine if a model was truly learning general linguistic representations or just over-fitting to a specific dataset. The authors address this by creating KLEJ (Kompleksowa Lista Ewaluacji Językowych), providing both the data and an online leaderboard to track progress in Polish NLU.
Methodology and HerBERT
The paper contributes two major components: the benchmark itself and a specialized model. HerBERT is a Polish-specific Transformer model based on the BERT-base architecture (12 layers, 768 hidden units). Key methodological choices include:
- Training Objective: It uses Masked Language Modeling (MLM) with dynamic masking and whole-word masking, which is more challenging and effective than static subword masking.
- No NSP: Following recent findings (like RoBERTa), the authors omitted the Next Sentence Prediction (NSP) task, finding it too easy and unhelpful for downstream performance.
- Tokenization: They used Byte-Pair Encoding (BPE) trained on high-quality Polish text to better handle the language's rich vocabulary.
Datasets and Tasks
The authors curated a mix of nine distinct tasks converted into a unified format (either text classification or regression). This allows a single model to be evaluated across various dimensions of language understanding using a consistent scoring scheme. The tasks range from sentiment analysis of e-commerce reviews (Allegro Reviews) to question answering derived from Wikipedia (Czy wiesz?).
Key Results and Insights
HerBERT achieved the highest average score across the benchmark (80.5), outperforming the best multilingual Transformer (XLM-17 at 80.2) and significantly beating traditional LSTM-based baselines.
Language Specificity Wins
HerBERT generally outperforms massive multilingual models like mBERT and XLM. This suggests that specialized tokenization and training on local corpora are crucial for languages with complex grammar. HerBERT showed particular strength in the new Allegro Reviews task and PolEmo2.0, likely due to the inclusion of e-commerce articles in its pre-training data.
The "Wikipedia Gap"
Interestingly, while HerBERT dominates sentiment and bullying detection, it struggled on the "Czy wiesz?" (Wikipedia-based QA) task compared to models like Slavic-BERT. The authors hypothesize this is because Slavic-BERT was trained on a different mix of Russian and Polish data that might favor Wikipedia-style facts.
Generalization
By including "Out-of-Domain" tasks (like PolEmo2.0-OUT), the benchmark forces models to prove they can handle text from domains they weren't specifically fine-tuned on, a true test of robust NLU.
Conclusion and Future Work
KLEJ establishes a new gold standard for Polish NLP. While HerBERT sets a high bar, some tasks—particularly question answering—remain significantly harder for all models, suggesting room for improvement in how models extract and reason over factual knowledge. The authors plan to continue expanding the benchmark and maintain the online leaderboard to encourage the community to submit even more powerful Polish models.
Summary updated