Manuscript Offprint
arXiv:2610.41553CEFR Level Assessment across Languages and Text Granularities
Abstract
Automatic assessment of textual CEFR levels is an important task in educational natural language processing. However, accurate CEFR level prediction remains challenging due to the naturally imbalanced distribution of CEFR levels and the ambiguous boundaries between adjacent levels. To address these challenges, we propose a unified training objective that combines focal loss with supervised contrastive learning. Focal loss mitigates class imbalance by emphasizing underrepresented and difficult examples, while supervised contrastive learning learns more discriminative representations by encouraging intra-class compactness and inter-class separation. We evaluate the proposed method on sentence- and document-level CEFR assessment in both monolingual and multilingual settings. Experimental results demonstrate that our method consistently outperforms strong baselines across all settings, establishing new state-of-the-art performance on multiple CEFR assessment benchmarks.
1 Introduction
Automatic text difficulty assessment has long been an active research topic in natural language processing, with applications in educational technologies such as automated essay scoring and text simplification (Li et al., 2025). The Common European Framework of Reference (CEFR) is a widely adopted framework for describing language proficiency, defining six levels ranging from A1 (beginner) to C2 (proficient).
Early approaches to predicting CEFR levels of texts relied on manually engineered linguistic features (Vajjala and Meurers, 2012), while more recent work (Imperial et al., 2025) has substantially improved performance using pretrained language models such as BERT (Devlin et al., 2019). Despite these advances, two fundamental challenges remain. First, the distribution of CEFR levels is inherently imbalanced, with A1 and C2 texts occurring much less frequently than texts at intermediate levels. Second, CEFR levels form an ordinal scale, and the boundaries between adjacent levels are often ambiguous, making neighboring levels difficult to distinguish consistently. Although Arase et al. (2022) addressed class imbalance through metric learning, their approach does not explicitly account for the ambiguity of adjacent CEFR levels.
To address these challenges, we propose a CEFR level assessment method that jointly leverages focal loss (Lin et al., 2017) and supervised contrastive learning (Gao et al., 2021). Focal loss mitigates the effect of class imbalance by emphasizing underrepresented and difficult examples, while supervised contrastive learning learns more discriminative representations by pulling together examples from the same CEFR level while increasing the separation between different CEFR levels in the embedding space. Together, these objectives improve CEFR level prediction under both class imbalance and ambiguous class boundaries.
We evaluate the proposed method on sentence- and document-level CEFR assessment in both monolingual (English) and multilingual settings. Experimental results demonstrate that it consistently outperforms strong state-of-the-art baselines across all evaluation settings.
The contributions of this paper are threefold: (i) we propose a unified training objective combining focal loss and supervised contrastive learning for CEFR level assessment, addressing both naturally imbalanced CEFR distributions and ambiguity between adjacent levels; (ii) we demonstrate its effectiveness on sentence- and document-level CEFR level assessment in both monolingual and multilingual settings; and (iii) we achieve state-of-the-art on multiple CEFR level assessment datasets.
https://www.coe.int/en/web/common-european-framework-reference-languages
We conduct two-stage training; as in Khosla et al. (2020), preliminary experiments confirmed this separation performed better than joint training. In the first stage, the PMLM parameters are fine-tuned with the supervised contrastive learning (Section 2.2). In the second stage, the first eight layers of the embedder are frozen, and the classification head is trained on top of it with the focal loss (Section 2.3).
2.1 Encoding
First, the input text is encoded by PMLM: , where is the final layer hidden representation. We then obtain a fixed-size sentence representation, , by mean pooling over the sequence dimension: .
2.2 Supervised Contrastive Learning
Supervised Contrastive Learning (Khosla et al., 2020) regards samples sharing the same class label as positive pairs, while all remaining samples in the batch as negatives. Formally, given an -th sample, the probability assigned to a positive pair is
where is cosine similarity measuring the closeness of two embeddings, is a temperature hyperparameter of the distribution, and is the number of training samples. We augment the samples by encoding each input text using the PMLM twice. The randomness of the dropout layers yields two slightly different embeddings of the same sentence, which serves as the augmented positive pair (Gao et al., 2021). Finally, the loss function is
| Dataset | Split | Num. of samples |
|---|---|---|
| CEFR-SP | train | 13,990 |
| dev | 1,843 | |
| test | 1,843 | |
| UCEFR-sent / -doc | train | 39,473 / 25,537 |
| dev | 6,146 / 6,191 | |
| test | 1,400 / 1,241 |
Table 1: Number of training, development, and test samples in CEFR-SP and UniversalCEFR.
defined as:
2.3 Focal Loss
The focal loss (Lin et al., 2017) is a generalization of the cross-entropy loss that introduces a modulating factor to adjust the contribution of each sample to the total loss. For a training example with ground-truth class , it is defined as
where denotes the predicted probability of the ground-truth class and is the focusing parameter. For , the focal loss reduces to the standard cross-entropy loss and for , it downweights well-classified examples and shifts training towards hard ones.
Focal loss adaptively reweights individual training examples based on their prediction confidence. To additionally account for the global class distribution, we combine it with the class-level weighting scheme (Arase et al., 2022), which weights the loss for each CEFR level according to its frequency in the training data: , where is the frequency of level in the training set and controls the weight strength.
3 Experiments
We evaluate the performance of the proposed method on multi-granular and multilingual settings.
3.1 Datasets
We use two datasets, CEFR-SP (Arase et al., 2022), an English sentence-level corpus, and UniversalCEFR (Imperial et al., 2025), a multilingual collection spanning multiple text granularities. Table 1
| Dataset | CEFR level | Cross-Entropy | Prototype(Arase et al., 2022) | SupCon + Focal(proposed) |
|---|---|---|---|---|
| CEFR-SP | A1 | |||
| A2 | ||||
| B1 | ||||
| B2 | ||||
| C1 | ||||
| C2 | ||||
| Macro-F1 | ||||
| UCEFR-sent | A1 | |||
| A2 | ||||
| B1 | ||||
| B2 | ||||
| C | ||||
| Macro-F1 | ||||
| UCEFR-doc | A1 | |||
| A2 | ||||
| B1 | ||||
| B2 | ||||
| C | ||||
| Macro-F1 |
Table 2: Per-level F1 and macro-F1 on the CEFR-SP and UniversalCEFR (sentence- and document-level) test sets. For CEFR-SP, we report mean ± std over 12 seeds, discarding the best- and worst-performing seed by macro-F1 (i.e., averaging over the remaining 10); for UniversalCEFR, mean ± std over 3 seeds. The best Macro-F1 scores are indicated by bold fonts, while the best per-level F1 scores are indicated by underlines.
shows the number of samples in each dataset. For the label distributions of CEFR levels, please refer to Table 4 in Appendix B.
CEFR-SP provides labels assigned by two annotators. We expand our contrastive learning setting to regard both labels as correct CEFR levels (see Appendix A for more details).
UniversalCEFR covers 13 languages; we pool all languages and conduct separate experiments at the sentence and document level (denoted as “UCEFR-sent” and “UCEFR-doc”, respectively). Because C2 samples are scarce on UniversalCEFR, we merge C1 and C2 into a single C class to discuss based on stable statistics.
3.2 Evaluation Metrics
Since the label distributions of all CEFR datasets are highly imbalanced, we report macro-F1, which weights all levels equally and thus prevents the scarce levels from being dominated by the well-represented ones. For CEFR-SP, where each sentence carries two annotator labels, we count a pre-
diction as correct if it matches either label (Arase et al., 2022). We report the average scores of over 12 random seeds for CEFR-SP and 3 seeds per configuration for UniversalCEFR.
3.3 Implementation & Baselines
We compare our method against two baselines: (i) the same architecture as our method yet trained end-to-end with a plain cross-entropy loss, and (ii) the state-of-the-art on CEFR-SP (Arase et al., 2022), denoted as “Prototype”. We employ bert-base-uncased on CEFR-SP and x1m-roberta-base (Conneau et al., 2020) on UniversalCEFR as the common PMLM. Training and hyperparameter settings are in Appendix C.
3.4 Results and Discussions
Table 2 reports per-level F1 and macro-F1 scores on test sets of CEFR-SP and UniversalCEFR. Overall, the proposed method performs best across sentence and document level assessment and monolingual and multilingual settings. On CEFR-


Figure 1: Confusion matrices of our model on the CEFR-SP test set against each annotator's labels. Cells show row-normalised recall, averaged over 12 training seeds discarding the best- and worst-performing seed by macro-F1.
| Dataset | Cross-Entropy | Prototype | Proposed |
|---|---|---|---|
| CEFR-SP | |||
| UCEFR-sent | |||
| UCEFR-doc |
Table 3: Silhouette scores of the test-set embedding spaces with respect to the gold CEFR levels, averaged over the same seeds as Table 2. For CEFR-SP, the score is the mean over the two annotators' label sets.
SP, plain cross-entropy training struggles on the scarce classes A1 and C2, where it exhibits both low scores and high variance across seeds. In contrast, the prototype classifier (Arase et al., 2022) and our method both mitigate the class imbalance, improving macro-F1 by more than 12 points while remaining on par with cross-entropy on the well-represented intermediate levels. On Universal-CEFR, the prototype classifier in turn falls behind cross-entropy at almost all levels, on both granularities. The proposed method consistently achieves the best macro-F1 scores on all settings.
Moreover, supervised contrastive learning produces a more class-separable embedding space. Table 3 reports the silhouette scores (Rousseeuw, 1987) of the final models' test-set embeddings (visualized in Appendix D). The proposed method scores highest on CEFR-SP and at the document level UniversalCEFR, and is on par with the prototype classifier at the sentence level.
Our analysis found that almost all misclassifications occur between adjacent CEFR levels. Figure 1 shows the confusion matrices of our proposed method, evaluated on CEFR-SP against each annotator's labels. Errors are concentrated almost exclusively in neighboring classes: 99.1% of test
sentences are predicted within one level of the target for Annotator A, and 97.3% for Annotator B. These results indicate that the proposed method effectively separates distant CEFR levels than baselines but still struggles to distinguish adjacent levels, whose boundaries are inherently ambiguous. This observation is consistent with previous findings (Arase et al., 2022; Imperial et al., 2025). Although the proposed training objective improves class discrimination, it does not explicitly model the ordinal relationships among CEFR levels. Incorporating ordinal-aware objectives that preserve the inherent similarity between neighboring levels while improving their discriminability is a promising direction for future work.
4 Conclusion
In this paper, we presented a unified training objective for CEFR level assessment that combines focal loss and supervised contrastive learning to address two fundamental challenges of the task: the naturally imbalanced distribution of CEFR levels and the ambiguity between adjacent levels. Extensive experiments on sentence- and document-level CEFR assessment in both monolingual and multilingual settings demonstrated that the proposed method consistently outperforms strong baselines.
The results suggest that jointly addressing class imbalance and adjacent-level ambiguity leads to more discriminative representations for CEFR level prediction and generalizes well across languages and text granularities. As future work, we plan to investigate training objectives that explicitly exploit the ordinal structure of CEFR levels and to extend our approach to other educational NLP tasks involving ordinal difficulty level prediction.
Limitations
Although the proposed training objective consistently improves CEFR level assessment across multiple datasets and evaluation settings, several limitations remain. First, the method treats CEFR level prediction as a classification task and does not explicitly model the ordinal relationships among levels. While supervised contrastive learning learns more discriminative representations, it does not distinguish between adjacent and distant CEFR levels in the optimization objective.
In addition, although we evaluate the proposed method in both monolingual and multilingual settings, we do not investigate its generalization to domains beyond the available benchmarks. Evaluating the method on a broader range of educational resources, particularly expert domains such as law and medical, remains an important direction for future work.
References
Yuki Arase, Satoru Uchida, and Tomoyuki Kajiwara. 2022. CEFR-based sentence difficulty annotation and assessment. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 6206–6219, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettle-moyer, and Veselin Stoyanov. 2020. Unsupervised cross-lingual representation learning at scale. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8440–8451, Online. Association for Computational Linguistics.
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics.
Tianyu Gao, Xingcheng Yao, and Danqi Chen. 2021. SimCSE: Simple contrastive learning of sentence embeddings. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 6894–6910, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
Joseph Marvin Imperial, Abdullah Barayan, Regina Stodden, Rodrigo Wilkens, Ricardo Muñoz Sánchez, Lingyun Gao, Melissa Torgbi, Dawn Knight, Gail Forey, Reka R. Jablonkai, Ekaterina Kochmar, Robert Joshua Reynolds, Eugénio Ribeiro, Horacio Saggion, Elena Volodina, Sowmya Vajjala, Thomas François, Fernando Alva-Manchego, and Harish Tayyar Madabushi. 2025. UniversalCEFR: Enabling open multilingual research on language proficiency assessment. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pages 9703–9755, Suzhou, China. Association for Computational Linguistics.
Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. 2020. Supervised contrastive learning. In Advances in Neural Information Processing Systems, volume 33, pages 18661–18673. Curran Associates, Inc.
Guanlin Li, Yuki Arase, and Noel Crespi. 2025. Aligning sentence simplification with ESL learner's proficiency for language acquisition. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pages 492–507, Albuquerque, New Mexico. Association for Computational Linguistics.
Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollar. 2017. Focal loss for dense object detection. In Proceedings of the IEEE International Conference on Computer Vision (ICCV).
Ilya Loshchilov and Frank Hutter. 2019. Decoupled weight decay regularization. In International Conference on Learning Representations.
Peter J. Rousseeuw. 1987. Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. Journal of Computational and Applied Mathematics, 20:53–65.
Sowmya Vajjala and Detmar Meurers. 2012. On improving the accuracy of readability classification using insights from second language acquisition. In Proceedings of the Seventh Workshop on Building Educational Applications Using NLP, pages 163–173, Montréal, Canada. Association for Computational Linguistics.
Laurens van der Maaten and Geoffrey Hinton. 2008. Visualizing data using t-sne. Journal of Machine Learning Research, 9(86):2579–2605.
A Dual-Label Handling
Unlike standard classification datasets, each sentence in CEFR-SP is annotated by two annotators, resulting in two labels and per sample . To adapt supervised contrastive learning to this dual-label setting, we redefine the set of positives such that a sample is positive if any of its annotator labels matches any of 's annotator labels:
In other words, and form a positive pair if they agree on the CEFR level under at least one combination of their respective annotators' labels.
B Dataset Statistics
Table 4 reports the number of texts per CEFR level for all datasets and splits used in our experiments.
C Implementation Details
All models are optimized using AdamW (Loshchilov and Hutter, 2019), and training was terminated by early stopping (patience of 10 epochs). The batch size was 128. For our two-stage approach, the stopping criterion was the silhouette score (Rousseeuw, 1987) of the resulting embedding space during the first stage, and macro-F1 on the development set during the second stage. Hyperparameters were tuned to maximize the macro-F1 scores on the development set (Table 5).
D Embedding Space Visualization
Figure 2 shows t-SNE projections (van der Maaten and Hinton, 2008) of the test-set embedding spaces, for one representative training seed per panel. On CEFR-SP, the proposed method arranges the levels along a largely ordinal progression. On Universal-CEFR, it instead separates the levels into multiple clusters, some dominated by a single level and others exhibiting the same ordinal progression. In both datasets, overlapping levels are almost exclusively adjacent, in line with our observation that misclassifications concentrate on neighboring levels.
| Dataset | Split | A1 | A2 | B1 | B2 | C1 | C2 | Total |
|---|---|---|---|---|---|---|---|---|
| CEFR-SP (annotator A) | train | 513 | 2,772 | 6,329 | 3,603 | 732 | 41 | 13,990 |
| dev | 121 | 442 | 680 | 439 | 125 | 36 | 1,843 | |
| test | 109 | 440 | 722 | 419 | 119 | 34 | 1,843 | |
| CEFR-SP (annotator B) | train | 77 | 1,718 | 5,826 | 4,727 | 1,570 | 72 | 13,990 |
| dev | 45 | 207 | 732 | 588 | 222 | 49 | 1,843 | |
| test | 43 | 216 | 715 | 595 | 225 | 49 | 1,843 | |
| UniversalCEFR sentence | train | 1,430 | 13,962 | 15,742 | 4,891 | 3,448 | 39,473 | |
| dev | 173 | 2,412 | 2,592 | 586 | 383 | 6,146 | ||
| test | 247 | 329 | 362 | 249 | 213 | 1,400 | ||
| UniversalCEFR document | train | 4,851 | 7,446 | 6,702 | 3,838 | 2,700 | 25,537 | |
| dev | 1,578 | 1,752 | 1,516 | 802 | 543 | 6,191 | ||
| test | 83 | 272 | 406 | 282 | 198 | 1,241 |
Table 4: Number of texts per CEFR level. Every CEFR-SP sentence is labeled by two annotators. For UniversalCEFR the C1 and C2 classes are merged into a single C class, the merged count spans the C1/C2 columns.
| Hyperparameter | Proposed | CE | Prototype |
|---|---|---|---|
| 0.07 | - | - | |
| 0.5 | - | - | |
| 0.4 | - | 0.2 | |
| LR |
Table 5: Hyperparameters of the proposed method, cross-entropy (CE) and prototype baselines. For the proposed method, the two learning rates (LR) are for the first and second stages, respectively.

(a) CEFR-SP. Both rows show the same embeddings, colored by annotator A's and annotator B's labels, respectively.

(b) UniversalCEFR, sentence level (top) and document level (bottom), with C1 and C2 merged.
Figure 2: t-SNE projections of the test-set embeddings for each method (columns), colored by gold CEFR level. Each panel shows a single training seed: the 6th-best of 12 seeds by test macro-F1 for CEFR-SP and the 2nd-best of 3 for UniversalCEFR. Panels are independent projections, so distances are not comparable across panels.