Modelwire
Subscribe

LLMs show heavy bias toward code variable names over actual semantics

A new study exposes a critical blind spot in how LLMs process code: they rely too heavily on variable and function names rather than semantic structure. Researchers built Face/Off, a framework that systematically renames identifiers while preserving program logic, then tested multiple models on code comprehension tasks. Results show that models consistently degrade when names are stripped or deliberately misleading, suggesting they've learned to exploit surface-level lexical patterns rather than truly understanding code behavior. This finding matters for production systems where code quality varies widely and for model robustness in adversarial settings.

Modelwire context

Explainer

The study doesn't just show LLMs fail on obfuscated code; it isolates the mechanism. By holding semantics constant while varying only identifier names, Face/Off proves models aren't learning code logic at all, just pattern-matching on naming conventions. This is a precision diagnosis, not a vague robustness complaint.

This connects directly to the interpretability work from late September on hierarchical cognitive processes and process supervision. Both papers attack the same root problem: AI systems making decisions without transparent reasoning chains. Where that work builds explainability into safety classification, this study reveals what LLMs are actually doing when they claim to understand code. Together they suggest a pattern: models trained on surface statistics will fail in high-stakes domains unless we force them to show their work and validate the logic, not just the output.

If major code-generation vendors (GitHub Copilot, Claude Code Interpreter, or similar) publish benchmarks on Face/Off's renamed code suite within six months, that signals they're taking the finding seriously. If they don't, or if their models show the same degradation, it confirms this isn't a fixable training problem but a fundamental limitation of current architectures.

This analysis is generated by Modelwire’s editorial layer from our archive and the summary above. It is not a substitute for the original reporting. How we write it.

MentionsFace/Off · Large Language Models

MW

Modelwire Editorial

This synthesis and analysis was prepared by the Modelwire editorial team. We use advanced language models to read, ground, and connect the day’s most significant AI developments, providing original strategic context that helps practitioners and leaders stay ahead of the frontier.

Modelwire summarizes, we don’t republish. arXiv cs.CL originally reported this story as On the Lexical Superstition of Large Language Models for Code Comprehension: Re-evaluation on Code of Low Lexical Quality”. The full content lives on arxiv.org. If you’re a publisher and want a different summarization policy for your work, see our takedown page.

LLMs show heavy bias toward code variable names over actual semantics · Modelwire