When Names Disappear: Revealing What LLMs Actually Understand About Code

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Le, Cuong Chi, Pham, Minh V. T., Van, Cuong Duc, Phan, Hoang N., Phan, Huy N., Nguyen, Tien N.
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866915532014354432
author Le, Cuong Chi
Pham, Minh V. T.
Van, Cuong Duc
Phan, Hoang N.
Phan, Huy N.
Nguyen, Tien N.
author_facet Le, Cuong Chi
Pham, Minh V. T.
Van, Cuong Duc
Phan, Hoang N.
Phan, Huy N.
Nguyen, Tien N.
contents Large Language Models (LLMs) achieve strong results on code tasks, but how they derive program meaning remains unclear. We argue that code communicates through two channels: structural semantics, which define formal behavior, and human-interpretable naming, which conveys intent. Removing the naming channel severely degrades intent-level tasks such as summarization, where models regress to line-by-line descriptions. Surprisingly, we also observe consistent reductions on execution tasks that should depend only on structure, revealing that current benchmarks reward memorization of naming patterns rather than genuine semantic reasoning. To disentangle these effects, we introduce a suite of semantics-preserving obfuscations and show that they expose identifier leakage across both summarization and execution. Building on these insights, we release ClassEval-Obf, an obfuscation-enhanced benchmark that systematically suppresses naming cues while preserving behavior. Our results demonstrate that ClassEval-Obf reduces inflated performance gaps, weakens memorization shortcuts, and provides a more reliable basis for assessing LLMs' code understanding and generalization.
format Preprint
id arxiv_https___arxiv_org_abs_2510_03178
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle When Names Disappear: Revealing What LLMs Actually Understand About Code
Le, Cuong Chi
Pham, Minh V. T.
Van, Cuong Duc
Phan, Hoang N.
Phan, Huy N.
Nguyen, Tien N.
Software Engineering
Computation and Language
Large Language Models (LLMs) achieve strong results on code tasks, but how they derive program meaning remains unclear. We argue that code communicates through two channels: structural semantics, which define formal behavior, and human-interpretable naming, which conveys intent. Removing the naming channel severely degrades intent-level tasks such as summarization, where models regress to line-by-line descriptions. Surprisingly, we also observe consistent reductions on execution tasks that should depend only on structure, revealing that current benchmarks reward memorization of naming patterns rather than genuine semantic reasoning. To disentangle these effects, we introduce a suite of semantics-preserving obfuscations and show that they expose identifier leakage across both summarization and execution. Building on these insights, we release ClassEval-Obf, an obfuscation-enhanced benchmark that systematically suppresses naming cues while preserving behavior. Our results demonstrate that ClassEval-Obf reduces inflated performance gaps, weakens memorization shortcuts, and provides a more reliable basis for assessing LLMs' code understanding and generalization.
title When Names Disappear: Revealing What LLMs Actually Understand About Code
topic Software Engineering
Computation and Language
url https://arxiv.org/abs/2510.03178