Semantic Neighborhood Density and Eye Gaze Time in Human Programmer Attention

📅 2026-03-03
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This study introduces semantic neighborhood density (SND)—a concept from psychology—into software engineering to investigate its impact on programmers’ cognitive attention during source code reading. Leveraging eye-tracking data from C and Java code, the authors employ model-free statistical analyses and regression modeling to demonstrate that words with high SND, particularly those of low frequency, significantly increase fixation duration, suggesting that SND effectively captures cognitive load. The findings reveal that SND, in conjunction with word frequency, exhibits predictive power for fixation time, maintaining explanatory strength even in the presence of substantial noise in eye-tracking data. This work thus offers a novel cognitive metric for understanding programmers’ reading behavior and contributes a psychologically grounded dimension to the empirical study of code comprehension.

Technology Category

Application Category

📝 Abstract
This paper studies the relationship between human eye gaze time on words in source code and the Semantic Neighborhood Density (SND) of those words. Human eye gaze time is a popular way to quantify human attention such as the importance of words people read and the cognitive effort people exert. Meanwhile, SND is a measure of how similar a word is in meaning to other words in the same context. SND has a long history in Psychology research where it has been connected to eye gaze time in various domains and helps explain human cognitive factors such as confusion and quality of reading comprehension. But SND carries an unknown and potentially unique meaning in software engineering. In this paper, we compute SND for tokens in source code that people viewed in two previous eye-tracking experiments, one in C and one in Java. We conduct a model-free analysis for statistical relationships between SND and gaze time, and a model-based analysis for predictive power of SND to gaze time. We found that words with high SND tend to have higher gaze time then low SND words, especially for words that are uncommon (i.e., have low frequency). We also found SND and frequency to have a minor predictive power on gaze time, despite high levels of noise common in eye tracking data
Problem

Research questions and friction points this paper is trying to address.

Semantic Neighborhood Density
eye gaze time
programmer attention
source code comprehension
cognitive effort
Innovation

Methods, ideas, or system contributions that make the work stand out.

Semantic Neighborhood Density
eye gaze time
programmer attention
code comprehension
cognitive effort
🔎 Similar Papers