ScanCoder: Leveraging Human Attention Patterns to Enhance LLMs for Code
Proceedings of the ACM on Software Engineering · 30.06.2026 · 3 (FSE) · 3230-3252
DOI: 10.1145/3808150 ↗Kurz gefasst
Fachartikel in der Zeitschrift Proceedings of the ACM on Software Engineering, online erschienen am 30.06.2026. Verfasst von Yueke Zhang und 6 weiteren Autor:innen. Die Arbeit nennt 69 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0).
Abstract (Originalsprache)
Code comprehension is a fundamental challenge in software engineering that impacts developer productivity and software quality. While Large Language Models (LLMs) demonstrate strong capabilities in code generation and summarization, they process code differently from human developers, who employ strategic attention patterns focused on semantically critical elements. Recent research has successfully integrated human attention patterns captured through eye-tracking into AI models for software engineering tasks, however, existing human-AI approaches face critical limitations that prevent widespread practical deployment, particularly for LLM enhancement. Existing approaches to incorporate human cognitive insights face scalability limitations due to resource-intensive eye-tracking studies and lack empirical validation for cross-language generalizability. We present ScanCoder, a framework that integrates cognitive simulation with LLM enhancement through (1) generating human-like attention patterns at scale using minimal eye-tracking data via cognitive simulation with Adaptive Character of Thought-Rational (ACT-R) architecture, and (2) cognitively-guided fine-tuning that emphasizes tokens according to their cognitive salience and attention order. Our approach demonstrates cross-language transfer by applying C++-derived cognitive patterns to enhance Java programming tasks. Comprehensive evaluation on CodeXGLUE benchmarks shows consistent improvements across different LLM architectures and scales (1B–8B parameters), achieving gains of up to 41.66 points on CrystalBLEU for code completion and 21.93 points on BERTScore for code summarization. Mechanistic analysis reveals that cognitive guidance reshapes model attention in task-dependent ways, increasing focus on semantically critical tokens by 2.5×. This work establishes the first scalable framework for integrating simulated human cognitive patterns into LLM training, enabling more interpretable and effective code understanding.
Zitieren
APA
Zhang, Y., Zhang, Y., Fang, Z., Trafton, G., Levin, D., Leach, K., & Huang, Y. (2026). ScanCoder: Leveraging Human Attention Patterns to Enhance LLMs for Code. Proceedings of the ACM on Software Engineering, 3(FSE), 3230-3252. https://doi.org/10.1145/3808150
Vancouver
Zhang Y, Zhang Y, Fang Z, Trafton G, Levin D, Leach K, et al. ScanCoder: Leveraging Human Attention Patterns to Enhance LLMs for Code. Proceedings of the ACM on Software Engineering. 2026;3(FSE):3230-3252. doi:10.1145/3808150
BibTeX
@article{Zhang2026,
author = {Zhang, Yueke and Zhang, Yifan and Fang, Zihan and Trafton, Greg and Levin, Daniel and Leach, Kevin and Huang, Yu},
title = {ScanCoder: Leveraging Human Attention Patterns to Enhance LLMs for Code},
journal = {Proceedings of the ACM on Software Engineering},
year = {2026},
volume = {3},
number = {FSE},
pages = {3230--3252},
doi = {10.1145/3808150}
}
EUVIMED