Apparent Cross-Language Invariance Reflects Shared Identifiers in Parallel Programs
Naing Oo Lwin ⋅ Sreedhyuti Nimmagadda ⋅ Ark Dutt ⋅ Michael Ji ⋅ Randy Lim ⋅ Cole Blondin ⋅ Archana Vaidheeswaran
Abstract
Cross-language probe transfer is often taken as evidence that a code model represents variable roles independently of programming language. We show that this conclusion depends on whether the readout includes the identifier tokens, which parallel programs systematically preserve. A span-pooled residual probe on Qwen2.5-Coder-1.5B looks flat across the language contrast ($-0.012$, $95\%$ problem-clustered $[-0.034,0.020]$), while a model-free surface classifier that masks the identifier loses $0.126$ macro-F1 on the same contrast. Excluding the occurrence from the probe readout changes the boundary to $-0.060$ $[-0.088,-0.030]$, a shift of $-0.048$ $[-0.088,-0.016]$, in line with context-matched untrained controls. The surface baseline outperforms the context-pooled probe in $14$ of $18$ matched cells. StarCoder2-7B reproduces the reversal more sharply, moving from $-0.014$ span-pooled to $-0.147$ $[-0.186,-0.092]$ occurrence-excluded, with a trained-minus-untrained boundary difference of $-0.068$ $[-0.114,-0.009]$ that excludes zero. The original invariance is therefore not identified independently of the readout, while the restricted readout still contains training-dependent role information. We make the implementation accessible at https://anonymous.4open.science/r/CrossLanguageProbeInvariance2026.
Chat is not available.
Successful Page Load