论文标题

提取神经代码智能模型的标签特定关键输入功能

Extracting Label-specific Key Input Features for Neural Code Intelligence Models

论文作者

Rabin, Md Rafiqul Islam

论文摘要

代码智能(CI)模型通常是黑框,并且没有提供有关他们所学的输入功能的任何见解。这种不透明度可能会导致他们的预测不信任,并阻碍其在安全至关重要的应用中的广泛采用。最近,该程序减少技术被广泛用于识别关键输入特征,以解释CI模型的预测。该方法从输入程序中删除了无关的部分,并保留了CI模型需要维持其预测的最小片段。但是,最先进的方法主要使用语法 - 纳维尔程序减少技术,该技术不遵循程序的语法,这为减少输入程序和模型的解释性增加了重要的开销。在本文中,我们采用语法引导的减少技术,该技术遵循减少过程中输入程序的语法。我们对不同类型输入程序的多个模型进行的实验表明,语法引导的程序减少技术在减少输入程序的大小方面显着优于语法 - unaware程序减少技术。从简化程序中提取关键输入功能表明,语法引导减少的程序包含更特定标签的密钥输入功能,并且在重命名程序中的密钥令牌时更容易受到对抗转换的影响。这些特定于标签的密钥输入功能可能有助于从不同的角度理解模型预测的推理,并提高可信赖性,以纠正CI模型给出的分类。

The code intelligence (CI) models are often black-box and do not offer any insights on the input features that they learn for making correct predictions. This opacity may lead to distrust in their prediction and hamper their wider adoption in safety-critical applications. In recent, the program reduction technique is widely being used to identify key input features in order to explain the prediction of CI models. The approach removes irrelevant parts from an input program and keeps the minimal snippets that a CI model needs to maintain its prediction. However, the state-of-the-art approaches mainly use a syntax-unaware program reduction technique that does not follow the syntax of programs, which adds significant overhead to the reduction of input programs and explainability of models. In this paper, we apply a syntax-guided program reduction technique that follows the syntax of input programs during reduction. Our experiments on multiple models across different types of input programs show that the syntax-guided program reduction technique significantly outperforms the syntax-unaware program reduction technique in reducing the size of input programs. Extracting key input features from reduced programs reveals that the syntax-guided reduced programs contain more label-specific key input features and are more vulnerable to adversarial transformation when renaming the key tokens in programs. These label-specific key input features may help to understand the reasoning of models' prediction from different perspectives and increase the trustworthiness to correct classification given by CI models.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源