# Program Bindings Inside Code Models

DevFeed: [Program Bindings Inside Code Models](<https://devfeed.tech/articles/program-bindings-inside-code-models-107396.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.39489>)

Author: Prateek Kumar Rajput, Yewei Song, Jacques Klein, Tegawend\\'e F. Bissyand\\'e

Published: 2026-10-30T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Software Engineering](<https://devfeed.tech/sources/arxiv-software-engineering.md>)

Topics: [Static code analysis](<https://devfeed.tech/topics/static-code-analysis.md>), [Parsing](<https://devfeed.tech/topics/parsing.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [cs-se](<https://devfeed.tech/tags/cs-se.md>), [front-end](<https://devfeed.tech/tags/front-end.md>), [hidden](<https://devfeed.tech/tags/hidden.md>), [hidden-states](<https://devfeed.tech/tags/hidden-states.md>), [language-models](<https://devfeed.tech/tags/language-models.md>), [links](<https://devfeed.tech/tags/links.md>), [models](<https://devfeed.tech/tags/models.md>), [program](<https://devfeed.tech/tags/program.md>), [python](<https://devfeed.tech/tags/python.md>), [scope](<https://devfeed.tech/tags/scope.md>), [standard](<https://devfeed.tech/tags/standard.md>), [static](<https://devfeed.tech/tags/static.md>), [static-analysis](<https://devfeed.tech/tags/static-analysis.md>), [structure](<https://devfeed.tech/tags/structure.md>), [syntax](<https://devfeed.tech/tags/syntax.md>), [token](<https://devfeed.tech/tags/token.md>)

## AI overview

The study finds that compiler-style static-analysis labels can describe and edit hidden states in most tested code models. Researchers decomposed frozen models' Python-program representations using each token's AST position, scope, definition-use links, and syntactic category, then tested whether replacing hidden states with that decomposition preserved program-output answers. It outperformed a same-size positional baseline in 10 of 14 open models, including six of seven code-trained models; removing definition-use links erased most of the advantage in the two models tested. For StarCoder2-15B, rebinding a call argument yielded the edited program's answer in 90 of 100 cases, versus 19 with the positional baseline. The Qwen2.5 family was an exception on several measures. Results suggest this approach can expose and alter encoded program information without retraining, for most models tested.

## Source excerpt

arXiv:2610.39489v1 Announce Type: new Abstract: Code language models complete, review, and repair programs without exposing the program structure encoded in their hidden states. In this paper, we test whether the hidden states of a code model can be described and edited using the information a compiler front end computes. For each token of a Python program, standard analyzers provide its position in the abstract syntax tree, its scope, its definition-use links, and its syntactic category. We fit a decomposition that expresses every hidden state of a frozen model as a sum of one term per token, each combining the token with this structural label, and we replace the model's own states with the decomposition at every layer while it predicts the output of a small program. If the model still answers correctly, the decomposition preserves the information the model uses. We apply this test to 14 open models, seven of them trained for code, and compare against a baseline decomposition of the same size built from token positions. The static-analysis decomposition preserves the model's answers better than the positional one in 10 of the 14 models, including six of the seven code models, and deleting the definition-use links from it removes most of that advantage on the two models tested. Editing the decomposition, for instance rebinding the argument of a call, makes StarCoder2-15B produce the answer of the edited program in 90 of 100 cases, compared with 19 for the positional baseline. The Qwen2.5 family is the exception on several measures. For most of the models tested, standard static analysis therefore provides both a description of what the hidden states encode about a program and a way to change it without retraining.