arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

预测人类对源代码中单词的视觉注意力

Predicting Human Visual Attention on Words in Source Code

Chia-Yi Su, Collin McMillan

arXiv 2607.14535首次发表:更新:

AI 中文总结

研究旨在预测人类对源代码中单词的视觉注意力,提出含新颖损失函数的模型,通过与三个数据集的眼动追踪数据比较评估,结果显示该模型在相关研究中表现出色,在读写任务上优于Claude和GPT - 5 。

AI 中文摘要

本文提出了一种计算模型来预测人类对软件源代码中单词的视觉注意力。长期以来,研究软件工程师阅读源代码时的视觉注意力,是理解软件工程任务中人类认知过程的一种方式。预测这种视觉注意力对于完善用户界面设计和理解人类程序员所需信息很重要。我们提出了一种程序员视觉注意力模型,设计了一种新颖的损失函数,用于计算眼动追踪实验中测量的人类注意力与人工神经网络内部注意力之间的相似度。我们通过将模型输出与来自三个独立数据集的实际眼动追踪数据进行比较来评估模型。两个数据集是Java编程语言的,一个是C编程语言的。根据皮尔逊相关性,我们的模型在各项研究中分别比软件工程基线高出64%、16%和467%。我们以扫描路径预测为例,证明我们的模型在需要理解人类思维过程的任务上更有能力。根据归一化莱文斯坦距离,我们的模型在阅读任务中比相近基线有统计学上的显著改进,并且在读写任务上均优于Claude和GPT - 5。

英文摘要

This paper presents a computational model to predict human visual attention over words in software source code. The visual attention of software engineers when reading source code has long been studied as a means to understand human cognitive processes during software engineering tasks. Predicting this visual attention is important for perfecting user interface design and understanding what information human programmers need. We propose a model of programmer visual attention in which we design a novel loss function that computes similarity between human attention measured during eye tracking experiments and the internal attention of the artificial neural network. We evaluate our model by comparing its outputs to actual eye tracking data from three separate datasets. Two are in the Java programming language and one is in the C programming language. Our model outperforms the baseline in software engineering by 64%, 16%, and 467% in each of these studies according to Pearson correlation. We used scanpath prediction as an example to demonstrate that our model is more capable of the task that requires the understanding of human thought process. Our model achieves a statistically significant improvement over the close baseline in the reading task according to normalized Levenshtein distance and outperforms both Claude and GPT-5 on both reading and writing tasks.

Comments13 pages, 1 figure, preprint under review

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑