arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2202.06474cs.SEcs.LGcs.PL
收藏

神经代码智能模型的标签特征提取

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

University of Houston(休斯顿大学)

Md Rafiqul Islam Rabin

摘要:

代码智能(CI)模型通常是黑盒的,并且不提供任何关于输入特征的见解,这些特征是他们为了做出正确的预测而学习的。这种不透明性可能会导致对它们的预测的不信任,并阻碍它们在安全关键应用中的广泛采用。最近,程序简化技术被广泛用于识别关键输入特征,以解释CI模型的预测。该方法从输入程序中删除不相关的部分,并保留CI模型维持其预测所需的最小片段。然而,国家的最先进的方法主要使用的语法不知道的程序减少技术,不遵循程序的语法,这增加了显着的开销减少输入程序和模型的可解释性。在本文中,我们采用了语法指导的程序减少技术,减少过程中的输入程序的语法。我们在不同类型的输入程序的多个模型上的实验表明,语法引导的程序缩减技术在减少输入程序的大小方面显着优于语法未知的程序缩减技术。从约简程序中提取关键输入特征表明,语法引导的约简程序包含更多的标签特定的关键输入特征,并且在重命名程序中的关键标记时更容易受到对抗性变换的影响。这些标签特定的关键输入特征可以帮助从不同的角度理解模型预测的推理,并增加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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑