AI
EyeMulator brings human code-reading patterns into AI language models
Researchers embed eye-tracking data into code AI training to improve how models understand which parts of code matter most.
A team of researchers has introduced a new technique for strengthening code language models by training them to attend to code the way human developers actually read it. The approach, called EyeMulator, harnesses eye-tracking data from programmers to guide how AI models weight the importance of different code elements during training.
How it works#
EyeMulator operates without requiring any changes to a model's underlying architecture. The method extracts visual-attention patterns from recorded eye movements of human developers and converts these into two types of training signals: semantic salience (which parts of code carry the most meaning) and gaze-transition patterns (how developers move their attention through code). These signals then reweight how individual tokens contribute to the model's loss function during fine-tuning.
Broad improvements across tasks#
Testing across six different backbone models, two training data sizes, and three programming tasks from the CodeXGLUE benchmark, the researchers found positive gains in all 36 combinations tested. The technique proved especially effective for code completion and translation tasks that preserve structural relationships, while also delivering smaller but consistent improvements on code summarization.
Complementary learning signals#
Component analysis revealed that the reading patterns, writing patterns, semantic focus, and transition-based priors each contribute distinct useful information to model training. This suggests that different aspects of human visual attention capture complementary facets of how developers process code.
The researchers have made their eye-tracking data publicly available for further research. The work appears in arXiv preprint 2508.16771.

