Code Language Models (CodeLLMs) traditionally learn attention based solely on statistical input-output token correlations ("machine attention"). In contrast, human developers rely on intuition, selectively fixating on semantically salient tokens during program comprehension. We present EyeMulator, a model-agnostic technique to align CodeLLM attention with human visual attention without architectural changes. By extracting scan paths from eye-tracking data, we derive token-level attention weights used to augment the loss function during fine-tuning. This induces the model to mimic human focus. Our evaluation across StarCoder, Llama-3.2, and DeepSeek-Coder shows that EyeMulator significantly outperforms baselines, achieving gains of over 30 CodeBLEU points in translation and up to 22 BERTScore points in summarization. Ablation studies confirm that these gains stem directly from replicating human attention dynamics. Artifacts are available at https://zenodo.org/records/17205682.


翻译:代码语言模型(CodeLLM)传统上仅基于输入-输出统计词符相关性(“机器注意力”)来学习注意力机制。相比之下,人类开发者在程序理解过程中依赖直觉,选择性聚焦于语义显著的词符。我们提出EyeMulator——一种无需架构修改即可将代码语言模型注意力与人类视觉注意力对齐的模型无关技术。通过从眼动追踪数据中提取扫描路径,我们推导出词符级注意力权重,用于增强微调期间的损失函数。这种方法引导模型模仿人类注意力焦点。我们在StarCoder、Llama-3.2和DeepSeek-Coder上的评估表明,EyeMulator显著优于基线方法,在代码翻译任务中CodeBLEU分数提升超过30点,在摘要任务中BERTScore提升高达22点。消融研究证实,这些收益直接源于对人类注意力动态的复现。相关工件可通过https://zenodo.org/records/17205682获取。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
【博士论文】学习视觉-语言表示以实现多模态理解
专知会员服务
28+阅读 · 2025年2月8日
【CVPR2023】BiFormer:基于双层路由注意力的视觉Transformer
专知会员服务
35+阅读 · 2023年3月20日
基于关系网络的视觉建模:有望替代卷积神经网络
微软研究院AI头条
10+阅读 · 2019年7月12日
自注意力机制在计算机视觉中的应用
GAN生成式对抗网络
19+阅读 · 2018年12月20日
入门 | 什么是自注意力机制?
机器之心
17+阅读 · 2018年8月19日
干货!自然语言处理中的自注意力机制!
全球人工智能
11+阅读 · 2018年3月27日
深度学习中的注意力机制
人工智能头条
16+阅读 · 2017年11月2日
国家自然科学基金
7+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
VIP会员
最新内容
ICML 2026 | CFPO:用反事实策略优化提升多模态推理
专知会员服务
1+阅读 · 27分钟前
综述 | 世界动作模型:少做梦,多行动
专知会员服务
1+阅读 · 29分钟前
美以伊冲突:无人机与人工智能的运用
专知会员服务
2+阅读 · 41分钟前
《特种部队在透明战场中的生存力》最新报告
专知会员服务
2+阅读 · 今天14:11
《人工智能生成的零日漏洞:对未来作战的影响》
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
8+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
相关资讯
基于关系网络的视觉建模:有望替代卷积神经网络
微软研究院AI头条
10+阅读 · 2019年7月12日
自注意力机制在计算机视觉中的应用
GAN生成式对抗网络
19+阅读 · 2018年12月20日
入门 | 什么是自注意力机制?
机器之心
17+阅读 · 2018年8月19日
干货!自然语言处理中的自注意力机制!
全球人工智能
11+阅读 · 2018年3月27日
深度学习中的注意力机制
人工智能头条
16+阅读 · 2017年11月2日
相关基金
国家自然科学基金
7+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员