2026

Automated Answer Grading (AAG) is a fundamental task in intelligent education, requiring accurate semantic understanding and reliable modeling of student deviations from reference answers. Despite recent progress, large language models (LLMs) remain insensitive to missing key concepts, exhibit unstable scoring scales, and lack structured scoring semantics in their representation space. To overcome these limitations, we propose a difference-aware AAG framework that integrates heuristic difference labeling with dual-contrastive learning. Semantic difference levels between student and reference answers are automatically inferred through similarity-based heuristics and injected into the model input as explicit prompts, enabling fine-grained perception of semantic deviations. In addition, an InfoNCE-based contrastive objective enforces representation consistency among samples with identical scores, while a hierarchical contrastive constraint guided by score gaps promotes structured separation across different scoring levels. Experiments on benchmark datasets, including SciEntsBank and Beetle, show that the proposed method consistently outperforms cross-entropy–based baselines in accuracy, weighted accuracy, and relevance metrics. Further analyses demonstrate improved robustness and generalization, even when applied to small-scale models. We have made all datasets and the corresponding code publiclyaccessible at: https://github.com/leibnizchen/DiffCL
Token sampling strategies critically influence text generation quality in large language models (LLMs). However, existing methods introduce additional hyperparameters, requiring extensive tuning and complicating deployment. We present Entropy Equilibrium Sampling (EES), a tuning-free approach grounded in information theory that dynamically determines the candidate set size using a first-crossing rule: it stops candidate-set expansion at the first index where cumulative probability mass exceeds the normalized entropy of the top-k distribution and retains the preceding prefix. We evaluate EES on reasoning, mathematical, and open-ended generation tasks across multiple model architectures and scales. Our results show that EES achieves robust performance across temperature settings without retuning truncation hyperparameters, delivering competitive accuracy with tuned baselines while maintaining diversity. Analysis reveals that the retained candidate-set size k* automatically encodes temperature effects, adapting from near-greedy behavior at low temperatures to broad candidate retention at high temperatures. By eliminating truncation-specific hyperparameter tuning, EES simplifies deployment while providing stable and competitive performance. Our code is publicly available.