Year: 2026
Type: article
Abstract: This work investigates probabilistic characteristics of language models as a tool for assessing the correctness of program code. The proposed approach is based on the analysis of token-level log-probabilities assigned by the model to generated solutions and requires neither reference solutions nor code execution. We examine the relationship between log-probability values and functional correctness measured by automated testing, using rank correlation, ROC analysis and logistic regression, and we compare several strategies for aggregating token-level values into a sequence-level score. Because solution length is associated both with the metrics and with the probability of passing tests, every comparison is reported twice: without length control and under length control, implemented as paired comparison within a narrow length band and as partial rank correlation. Experiments on the HumanEval-X benchmark across five programming languages and five open-weight models of up to 16 billion parameters show that probabilistic metrics distinguish correct from incorrect solutions and exhibit a statistically significant association with pass@1. Under length control the gap between self- and cross-evaluation substantially decreases, solution length alone is a weak predictor of correctness, whereas predictive entropy of the token distribution remains competitive with log-probability-based metrics.
Language: Russian
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7225215433
