mlsanityData to 7 Oct 2026

WheaCha: A Method for Explaining the Predictions of Models of Code

arXiv 2102.04625 ↗First posted 9 Feb 2021cs.LG cs.PL cs.SEcited by 1

Not on the map. Why?

Abstract (arXiv)

Attribution methods have emerged as a popular approach to interpreting model predictions based on the relevance of input features. Although the feature importance ranking can provide insights of how models arrive at a prediction from a raw input, they do not give a clear-cut definition of the key features models use for the prediction. In this paper, we present a new method, called WheaCha, for explaining the predictions of code models. Although WheaCha employs the same mechanism of tracing model predictions back to the input features, it differs from all existing attribution methods in crucial ways. Specifically, WheaCha divides an input program into "wheat" (i.e., the defining features that are the reason for which models predict the label that they predict) and the rest "chaff" for any prediction of a learned code model. We realize WheaCha in a tool, HuoYan, and use it to explain four prominent code models: code2vec, seq-GNN, GGNN, and CodeBERT. Results show (1) HuoYan is efficient - taking on average under twenty seconds to compute the wheat for an input program in an end-to-end fashion (i.e., including model prediction time); (2) the wheat that all models use to predict input programs is made of simple syntactic or even lexical properties (i.e., identifier names); (3) Based on wheat, we present a novel approach to explaining the predictions of code models through the lens of training data.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 21 of its 44 references that are in the map. First posted on arXiv 9 Feb 2021.

Builds on

21 of 44 references.

References · 21

  1. 2017A Unified Approach to Interpreting Model Predictionscited by 6,488
  2. 2016"Why Should I Trust You?": Explaining the Predictions of Any Classifiercited by 5,040
  3. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
  4. 2017Axiomatic Attribution for Deep Networkscited by 3,350
  5. 2013Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Mapscited by 2,348
  6. 2017Learning Important Features Through Propagating Activation Differencescited by 1,454
  7. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  8. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  9. 2018A Benchmark for Interpretability Methods in Deep Neural Networkscited by 467
  10. 2016Not Just a Black Box: Learning Important Features Through Propagating Activation Differencescited by 295
  11. 2018code2vec: Learning Distributed Representations of Codecited by 249
  12. 2017Learning to Represent Programs with Graphscited by 219
9 more
  1. 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
  2. 2017Visualizing Deep Neural Network Decisions: Prediction Difference Analysiscited by 166
  3. 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 144
  4. 2018Structured Neural Summarizationcited by 53
  5. 2020LambdaNet: Probabilistic Type Inference using Graph Neural Networkscited by 44
  6. 2020On the Generalizability of Neural Program Models with respect to Semantic-Preserving Program Transformationscited by 41
  7. 2017Dynamic Neural Program Embedding for Program Repaircited by 23
  8. 2020Learning Semantic Program Embeddings with Graph Interval Neural Networkcited by 20
  9. 2020Learning Nonlinear Loop Invariants with Gated Continuous Logic Networks (Extended Version)cited by 17

Built on by

Cited by year

Citing papers per year: 2023: 1.

1 paper.