EyeMulator: Improving Code Language Models by Mimicking Human Visual Attention

Yifan Zhang, Chen Huang, Yueke Zhang, Jiahao Zhang, Toby Jia-Jun Li, Collin McMillan, Kevin Leach, Yu Huang · DOI

Abstract

Code Language Models (CodeLLMs) learn token importance from data correlations, whereas human developers attend selectively to semantically salient code. We present EyeMulator, a model-agnostic method that injects human visual-attention priors into CodeLLM fine-tuning without architectural changes. EyeMulator distills eye-tracking data into semantic salience and gaze-transition priors, then uses them to reweight token-level training losses. Across six backbones, two data regimes, and three CodeXGLUE tasks, the reported configurations yield positive matched-metric deltas in all 36 model-task-setting cells. Effects are largest for structure-preserving completion and translation, while summarization shows smaller but positive METEOR deltas. Session-mode and component-ablation analyses further show that reading, writing, semantic, and transition-derived priors provide complementary signal. Human-attention artifacts are available at https://zenodo.org/records/17205682.
BibTeX
@inproceedings{zhang2026eyemulator,
  author = {Yifan Zhang and Chen Huang and Yueke Zhang and Jiahao Zhang and Toby Jia-Jun Li and Collin McMillan and Kevin Leach and Yu Huang},
  title = {{EyeMulator: Improving Code Language Models by Mimicking Human Visual Attention}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.acl-long.1158},
}

Loading related content...

Figure