- Rating
- 1
- Confidence
- 4
- Informativeness
- 2
- Presentation
- 1
- Soundness
- 1
Read review
Paper summary
This paper investigates whether large language models encode semantic information about variable roles in their internal representations. Based on Sajaniemi's taxonomy of eleven variable roles, the authors develop an automatic annotation pipeline and construct a dataset containing 126,926 source-code files and approximately 1.74 million role-annotated variables across five programming languages. The paper then conducts representation probing experiments across five language models and their corresponding sparse autoencoders (SAEs). The results suggest that variable-role annotations can be recovered from residual-stream representations more effectively than from individual SAE features or the tested lexical baselines. Finally, the authors investigate whether SAE-associated directions can steer code generation toward or away from particular variable roles.
Critical strengths
- The paper investigates a potentially meaningful question concerning how language models represent programming concepts internally.
- The authors make a substantial engineering effort to construct a multilingual variable-role dataset and evaluate multiple models and representation types.
- The experiments include several useful controls, including variable renaming, counterfactual code edits, and random intervention directions.
Critical weaknesses
- As the authors already discussed, the core research question and the main methodological components have already been substantially explored in prior literature[1-6]. Against this background, the present paper mainly combines established techniques and applies them to a larger collection of predefined variable roles. Although the resulting dataset and empirical comparisons provide some incremental value, the paper does not introduce a substantially new representation analysis method, nor does it establish a sufficiently distinctive mechanistic insight beyond these previous studies.
- While investigating the internal representations of programming concepts is potentially valuable, the paper does not convincingly demonstrate how its findings advance our understanding of code language models beyond existing research.
- A major concern is the reliability of the automatically generated variable-role annotations. The proposed dataset relies on author-defined static analysis rules over CPG graphs. However, the authors explicitly acknowledge that corpus-wide annotation precision and recall remain unmeasured. Furthermore, variables without a target-role annotation are used as candidate negative examples, even though the authors acknowledge that the automatic extractor may fail to identify valid instances of a role. Consequently, both positive-label errors and false negatives may affect the reported results.
- The causal relation between decodability and semantic representation is weak. The decodability of an automatically generated label is not sufficient to show that the model represents the corresponding semantic concept in a generalizable way.
- The paper attempts to address several substantial problems: large-scale semantic annotation, representation recoverability, SAE fidelity, counterfactual sensitivity, and causal control of code generation. Although these components are conceptually related, their connections are not developed into a sufficiently clear and coherent scientific argument. The manuscript frequently moves between different experimental settings, predictors, evaluation populations, and metrics, making it difficult to identify the principal hypothesis and understand how each experiment contributes to validating it.
[1] A Study of Variable-Role-based Feature Enrichment in Neural Models of Code Hussain et al. · InteNSE 2023
[2] Emergent Representations of Program Semantics in Language Models Trained on Programs Jin & Rinard · ICML 2024
[3] Do Large Code Models Understand Programming Concepts? Counterfactual Analysis for Code Predicates Hooda et al. · ICML 2024
[4] A Critical Study of What Code-LLMs (Do Not) Learn Anand et al. · Findings of ACL 2024
[5] Analyzing Latent Concepts in Code Language Models Sharma et al.
[6] Neuron-Guided Interpretation of Code LLMs: Where, Why, and How? Yin et al. · FSE 2026
Questions for authors
See the "Weakness" part.
We thank the reviewer for the critical assessment. The original paper insufficiently distinguished methodological breadth from scientific contribution and decodability from semantic representation. We revised the narrative and added targeted experiments to clarify our findings and limitations.
1. Novelty and scientific contribution
Our contribution is empirical: using Sajaniemi's independently defined variable roles, we study which variable-role distinctions are recoverable from code-LM activations, how far this information generalizes, and whether associated directions support selective control during generation..
Hussain et al. [1] use stepper and walker labels to enrich Code2Seq; we study all eleven roles as representation targets. Jin and Rinard [2], Hooda et al. [3], and Anand et al. [4] examine execution states, predicates, and learned code properties; Sharma et al. [5] and Yin et al. [6] investigate latent concepts and neurons. We connect variable-level residual and SAE readouts, controlled source comparisons, and generation interventions.
Our three main findings are:
The contribution is not a new interpretability method or identified role-specific circuits, but an empirical account of the gap between decodability, generalization, and controllability.
2. Reliability of automatic annotations
We added a blinded human evaluation of 660 stratified variables (Appendix D), covering extractor positives, role-suggestive negatives, and variables without extracted roles. Micro-precision/recall/F1 is 0.855/0.678/0.756. Precision is high for most roles, while recall varies substantially (0.467–1.000), revealing both missed roles and false positives.
The stratified sample does not support corpus-wide performance estimates, and inter-annotator agreement remains unmeasured. We acknowledge these limitations and treat unannotated variables as candidate rather than verified negatives.
3. Generalization and causal evidence
We agree that label decodability alone cannot establish semantic abstraction. Section 4 and Appendices H.2–H.4 test stronger lexical obfuscation, held-out languages and implementations, and function-matched programs.
Removing additional identifier and comment cues has a modest average impact. Most-wanted holder, gatherer, and one-way flag transfer relatively well, whereas stepper and walker show greater implementation dependence. On function-matched programs, residual probes reach within-task AUROC 0.921 but only 67.8% balanced accuracy at natural-code thresholds. Output agreement on finite tests does not prove full equivalence. Thus, the evidence supports partial generalization beyond tested surface cues, not implementation-invariant representations.
Appendix H.1 shows that fitted SAE role scores combine multiple reused features. SAE reconstructions preserve much matched-label discrimination but show reduced sensitivity to role-changing edits. These are predictive, not mechanistic, results.
Section 5 and Appendices Q–R test functional influence. Global interventions occasionally change annotations or code structure, but correctness-preserving target changes remain rare, without a clear aggregate advantage over random controls. Localized norm-matched patches barely change joint correctness and target outcomes (172/216 untreated versus 173/216 under either patch). Fixed-dose tests show small, role-dependent likelihood shifts without reversing preferred continuations. We therefore observe limited effects on generation, not precise, reliable role-specific control.
4. Coherence and presentation
The paper now follows three linked questions: (i) What role information is recoverable? (ii) How does it generalize across code variations? (iii) Can associated directions selectively influence generated roles?
Section 4 links decoding to lexical robustness, implementation transfer, and behavioral sensitivity, distinguishing ranking from classification. Section 5 assesses correctness, collateral changes, and random controls; appendices document protocols and limitations.
Our conclusion is deliberately narrower: variable-role information is decodable and partially generalizable; associated directions show limited effects on generation but do not support reliable, correctness-preserving control of target roles.