Towards Modeling Human Attention from Eye Movements for Neural Source Code Summarization

05/16/2023
by   Aakash Bansal, et al.
0

Neural source code summarization is the task of generating natural language descriptions of source code behavior using neural networks. A fundamental component of most neural models is an attention mechanism. The attention mechanism learns to connect features in source code to specific words to use when generating natural language descriptions. Humans also pay attention to some features in code more than others. This human attention reflects experience and high-level cognition well beyond the capability of any current neural model. In this paper, we use data from published eye-tracking experiments to create a model of this human attention. The model predicts which words in source code are the most important for code summarization. Next, we augment a baseline neural code summarization approach using our model of human attention. We observe an improvement in prediction performance of the augmented approach in line with other bio-inspired neural models.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/14/2023

Semantic Similarity Loss for Neural Source Code Summarization

This paper presents an improved loss function for neural source code sum...
research
03/28/2023

Label Smoothing Improves Neural Source Code Summarization

Label smoothing is a regularization technique for neural networks. Norma...
research
08/26/2023

Modeling Programmer Attention as Scanpath Prediction

This paper launches a new effort at modeling programmer attention by pre...
research
04/20/2018

Generating Descriptions from Structured Data Using a Bifocal Attention Mechanism and Gated Orthogonalization

In this work, we focus on the task of generating natural language descri...
research
08/31/2022

How Readable is Model-generated Code? Examining Readability and Visual Inspection of GitHub Copilot

Background: Recent advancements in large language models have motivated ...
research
07/04/2021

A Topic Guided Pointer-Generator Model for Generating Natural Language Code Summaries

Code summarization is the task of generating natural language descriptio...
research
02/09/2016

A Convolutional Attention Network for Extreme Summarization of Source Code

Attention mechanisms in neural networks have proved useful for problems ...

Please sign up or login with your details

Forgot password? Click here to reset