Code2Snapshot:使用代码快照学习Source Code的表示
Code2Snapshot: Using Code Snapshots for Learning Representations of Source Code
摘要:
在神经模型的输入向量中编码源代码有几种方法。这些方法试图在编码中包含输入程序的各种句法和语义特征。在本文中,我们调查Code2Snapshot,一种新的表示的源代码,是基于输入程序的快照。我们评估了这种表示的几种变化,并比较其性能与最先进的表示,利用丰富的语法和语义功能的输入程序。我们对Code2Snapshot在代码摘要和代码分类任务中的实用性的初步研究表明,输入程序的简单快照具有与最先进的表示相当的性能。有趣的是,模糊输入程序对Code2Snapshot性能的影响并不显著,这表明对于某些任务,神经模型可以通过仅依赖输入程序的结构来提供高性能。
英文摘要:
There are several approaches for encoding source code in the input vectors of neural models. These approaches attempt to include various syntactic and semantic features of input programs in their encoding. In this paper, we investigate Code2Snapshot, a novel representation of the source code that is based on the snapshots of input programs. We evaluate several variations of this representation and compare its performance with state-of-the-art representations that utilize the rich syntactic and semantic features of input programs. Our preliminary study on the utility of Code2Snapshot in the code summarization and code classification tasks suggests that simple snapshots of input programs have comparable performance to state-of-the-art representations. Interestingly, obscuring input programs have insignificant impacts on the Code2Snapshot performance, suggesting that, for some tasks, neural models may provide high performance by relying merely on the structure of input programs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。