一句话:提出模型无关的 SIVAND,用程序简化识别神经代码智能模型的关键输入特征。
神经代码智能工具由深度神经网络驱动,已广泛用于提升编程生产力和程序分析,但开发者难以可靠理解其行为。现有透明/可解释AI方法常针对特定网络架构,甚至需要访问模型参数,普通程序员难以使用。本文提出 SIVAND,一种简单、模型无关的方法,借鉴软件调试中的 delta debugging,通过简化输入程序并在保持模型预测不变的前提下,识别对预测关键的特征。实验表明,该方法输出显著更小的程序,可广泛适用于多种模型架构和问题领域;模型常仅依赖输入程序中少数句法特征。作者认为,SIVAND 提取的特征有助于理解神经代码智能系统的预测与学习行为。
A wide range of code intelligence (CI) tools, powered by deep neural networks, have been developed recently to improve programming productivity and perform program analysis. To reliably use such tools, developers often need to reason about the behavior of the underlying models and the factors that affect them. This is especially challenging for tools backed by deep neural networks. Various methods have tried to reduce this opacity in the vein of "transparent/interpretable-AI". However, these approaches are often specific to a particular set of network architectures, even requiring access to the network's parameters. This makes them difficult to use for the average programmer, which hinders the reliable adoption of neural CI systems. In this paper, we propose a simple, model-agnostic approach to identify critical input features for models in CI systems, by drawing on software debugging research, specifically delta debugging. Our approach, SIVAND, uses simplification techniques that reduce the size of input programs of a CI model while preserving the predictions of the model. We show that this approach yields remarkably small outputs and is broadly applicable across many model architectures and problem domains. We find that the models in our experiments often rely heavily on just a few syntactic features in input programs. We believe that SIVAND's extracted features may help understand neural CI systems' predictions and learned behavior.