arXiv論文メモ
新着一覧
cs.SE / cs.CL / cs.LG · 査読状況未確認

識別子名に引きずられるコード理解モデルの再評価

On the Lexical Superstition of Large Language Models for Code Comprehension: Re-evaluation on Code of Low Lexical Quality

Xin Shen, San-Zhuo Xi, Yali Du, Ming Li (Nanjing University, Nanjing, China)

この論文をやさしく読む

ひとことで言うと

コードの名前だけを意味を変えずに変更し、LLMの理解が名前に引きずられるかを調べた。

何に役立つ?

コード理解モデルを評価するとき、誤解を招く変数名などへの依存を検出するために役立つ。

この研究の面白いところ

名前の情報を段階的に崩して比較し、型推論のように名前なしで局所的に解ける課題では影響が小さいことも示す。

どこまで分かった?

結果は評価したモデルと課題、代表的な対策についてのものであり、識別子名そのものが不要だとは結論していない。

v1のアブストラクトに基づくAI解説。日本語訳とは別に、用途の解釈を含みます。

アブストラクトの日本語訳

大規模言語モデル(LLM)の進歩により、コードに関する作業で広く使われるようになった。自然に書かれたコードでは識別子名は統計的に有用な情報を持つが、その情報が常に信頼できるわけではない。本研究は、プログラムの構造を保ったまま名前を変えるとき、現在のLLMが語彙上の手がかりを過度に重視するかを調べる。意味を保って識別子を改名する枠組みFace/Offを導入し、複数のモデルとコード理解課題で、名前の情報を段階的に変えた条件を評価する。この枠組みでは、評価したモデルと主要課題の全体にわたり、語彙への過度の依存が見られた。識別子の情報を除いたり誤解を招くものにしたりすると性能は一般に低下し、出力はしばしば誤解を招く名前が示唆する意味へ誘導された。この傾向は代表的なプロンプトによる対策や微調整による対策の下でも続き、根深い問題であることが示唆される。一方、型推論を用いた対照では、対象の名前がなくても局所的に答えを復元できる場合、名前の影響は小さいという境界が確認された。これらの結果は識別子が役立たないことを意味しない。語彙上の手がかりとプログラム構造のバランスの取り方に、現在のLLMが体系的な弱点を持つことを示している。自然なコードの規則性の利点を保ちつつ、正確に形式化されたコードの意味に根拠を置く評価・モデル化の方法が必要である。

v1の要旨から自動生成。本文の精読・人による確認は未実施。

初稿
2026-09-22(UTC)
最新改訂
2026-09-22 · v1
査読・掲載
査読状況未確認
arXivで読むPDF

更新履歴

取得できた版を表示。版の更新は査読済みを意味しません。過去版の本文差分は未解析です。

原文の要旨

Recent advances in large language models (LLMs) have made them widely used for code-related tasks. Identifier names are statistically informative in naturally occurring code, but their information is not always reliable. We investigate whether current LLMs assign disproportionate weight to lexical cues when renaming preserves program structure. We introduce Face/Off, a semantics-preserving identifier-renaming framework, and evaluate progressive naming conditions across multiple models and code-comprehension tasks. Within this framework, lexical overemphasis is pervasive across the evaluated models and primary tasks: performance generally decreases as identifier information is removed or made misleading, and outputs are often directed toward the meanings suggested by misleading names. The pattern persists under representative prompt- and fine-tuning-based interventions, suggesting that lexical overemphasis is an entrenched problem. A type-inference control confirms a boundary: naming effects are smaller when the answer is locally recoverable without the target name. These results do not imply that identifiers are unhelpful; rather, they reveal a systematic vulnerability in how current LLMs balance lexical cues against program structure. Our findings motivate evaluations and modeling methods that preserve the benefits of natural code regularities while keeping conclusions grounded in accurate, formalized code semantics.

著者のコメント

27 pages, 9 figures, 12 tables. Submitted to an ACM journal in September 2025. Preprint; manuscript under review. Corresponding author: Ming Li

arXiv ID: 2609.26388 / 要約の誤りについて