Automatic reflection level classification in Hungarian student essays

Zsolt Csibi, Mónika Sándor, Mónika Serfozo, Kinga Gyöngy, Kristian Fenech

TL;DR

This paper tackles the challenge of automatically classifying the level of reflection in Hungarian student essays, a task crucial for educational assessment but historically difficult to scale. They introduce a novel, expert-annotated Hungarian dataset and compare traditional machine learning methods with fine-tuned transformer models, finding that while shallow models offer competitive performance, transformers show better sensitivity to minority classes, especially when addressing class imbalance.

What Problem Does This Paper Address?

Assessing reflective thinking is a cornerstone of modern education, encouraging deeper learning and professional development. However, manually evaluating reflective essays is time-consuming and subjective. While automated methods for analyzing reflective writing exist for languages like English and German, Hungarian has been largely overlooked. This is a significant gap, as Hungarian's rich morphology presents unique challenges for natural language processing. This paper aims to bridge this gap by developing and evaluating automatic reflection level classification systems specifically for Hungarian student essays.

Methods

The researchers explored two main families of models:

  • Classical Machine Learning: They utilized TF-IDF and semantic embedding features (specifically, the Qwen3-E model) to represent the essays. Models like Random Forest, XGBoost, and CatBoost were trained and evaluated.
  • Transformer Models: They fine-tuned Hungarian-specific transformer models, namely SZTAKI-HLT/hubert-base-cc and NYTK/PULI-BERT-Large, for document-level classification. To handle the long nature of essays, they employed chunking with overlap.

A significant focus was placed on addressing the class imbalance inherent in the dataset. They systematically investigated various techniques, including:

  • Class Weighting: Adjusting the importance of different classes during training.
  • Oversampling: Generating synthetic samples for minority classes (e.g., SMOTE, ADASYN, RandomOverSampling).
  • Text Augmentation: Using back-translation to create more data for minority classes.
  • Loss Functions: Experimenting with Cross-Entropy, Weighted Cross-Entropy, Focal Loss, and Dice Loss.

An ablation study was conducted to understand the contribution of each technique and model choice.

Datasets

The study introduces a new, expert-annotated dataset of 1,954 Hungarian student essays. These essays were collected over four academic years from students in an Early Childhood Education program, who wrote reflective essays based on their practical experiences. The dataset is labeled on a four-level reflection scale (0: no reflection, 1: low, 2: medium, 3: high). The dataset is not publicly available due to privacy and ethical considerations.

Key Insights and Ideas

  • Classical Models Still Shine: Despite the rise of transformers, well-engineered shallow machine learning models with appropriate feature extraction (like TF-IDF and semantic embeddings) can achieve highly competitive results, especially in low-resource settings.
  • Transformers Excel in Minority Class Sensitivity: While shallow models might achieve higher overall scores, transformer models demonstrated a better ability to correctly classify samples from minority reflection levels, which is crucial for imbalanced datasets.
  • Class Imbalance is a Major Hurdle: The dataset exhibits a severe class imbalance, with the majority of essays falling into the highest reflection category. This significantly impacts model performance, often leading to models favoring majority class predictions.
  • Imbalance Techniques are Nuanced: Techniques like oversampling and data augmentation are not universally beneficial. Their effectiveness depends heavily on the model family and the specific metric being optimized. Sometimes, these techniques can improve minority class detection but degrade overall performance or majority class stability.
  • Feature Engineering Matters: For shallow models, the choice of features (TF-IDF vs. semantic embeddings) significantly impacts performance.

Key Results

  • The best shallow machine learning model (SMOTEBoost with Qwen3 embeddings and a Decision Tree) achieved an overall score of approximately 71% (averaged across Accuracy, F1-score, and ROC-AUC).
  • The best transformer models achieved a slightly lower overall score of approximately 68%.
  • Statistical significance tests (T-tests) revealed no statistically significant difference between the best shallow and transformer models in Accuracy and Weighted F1-score. However, the shallow model achieved a statistically significant higher ROC-AUC score.
  • The study highlights that while shallow models can distinguish between classes better, transformers offer improved sensitivity to minority classes.

Limitations and Future Work

  • Class Skew: The strong class imbalance remains a bottleneck for robust minority-class learning.
  • Transformer Context Window: The limited context window of transformer models necessitates chunking long essays, which can lead to information loss and weaken document-level coherence signals.
  • Future Work: The authors suggest exploring more advanced data augmentation strategies, collecting more balanced datasets, developing longer-context Hungarian or multilingual transformer architectures, and investigating hybrid systems that combine the strengths of shallow and deep learning approaches.

Summary updated

BibTeX
@article{csibi2026automatic,
  author = {Zsolt Csibi and Mónika Sándor and Mónika Serfozo and Kinga Gyöngy and Kristian Fenech},
  title = {{Automatic reflection level classification in Hungarian student essays}},
  journal = {Array},
  year = {2026},
  doi = {10.1016/j.array.2026.100971},
}
Figure