On Behavioral Alignment of Model-Code and Human-Code Understandability via Behavioral Proxies
Xiaokai Rong, Aashish Yadavally, Hridya Dhulipala, Anh H. N. Nguyen, Tien N. Nguyen
The University of Texas at Dallas · University of Central Florida
Key points
From the paper's conclusion- Our findings show that LLMs exhibit stronger behavioral alignment with general human code understandability than previously used shallow machine learning baselines.
Abstract
Code understandability is a critical aspect of software quality. Prior research has largely focused on this attribute from a human-centric or code-centric perspective, while it should be viewed as a relational property arising from the interaction between a reader and the code. With the increasing adoption of large language models (LLMs) in software engineering, we posit that the notion of “reader” should be generalized to encompass both humans and models. Building on this relational perspective, we extend the concept of code understandability to distinguish between human and model code understandability, aiming to investigate the behavioral alignment between the two. To this end, we use a dataset from a prior study containing human-rated judgments of understandability across diverse participant groups, and evaluate multiple open and closed-source LLMs. To operationalize such behavioral alignment, we introduce four behavioral proxies of model-code understandability (BPMU): P0, based on program comprehension-focused question answering; and P1–P3, based on program intent summarization (derived from our proposed semantic self-consistency). Our findings show that LLMs exhibit stronger behavioral alignment with general human code understandability than previously used shallow machine learning baselines. Stratified analyses further reveal that model code understandability aligns most closely with professional developers, but significantly less with other student groups. Role-conditioned prompting does not improve the alignment for the latter, suggesting that current LLMs cannot accurately mimic the perspectives of human readers with varying expertise. Finally, we demonstrate that semantic self-consistency is a reliable and extensible measure to be used as a behavioral proxy for quantifying model code understandability, with broad implications in both software engineering research and practice.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- From Observation to Explanation: Mechanistic Interpretability of LLM-Generated Code for Principled RepairarXiv · 2026
- Analyzing Code Provenance in LLMs for Programming EducationarXiv · 2026
- The fools are certain; the wise are doubtful: Exploring LLM confidence in code completionAutomated Software Engineering · 2026
- Style, Not Self: Surface Cues Explain Zero-Shot Code Attribution by Large Language ModelsarXiv · 2026
- When Models Know but Can't Linearly Say: Relational Encoding Limits Linear Vulnerability Classification in Code LLMsarXiv · 2026
- Large Language Models for Code Generation from Multilingual Prompts: A Curated Benchmark and a Study on Code QualityACM Transactions on Software Engineering and Methodology · 2026