NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Explainable Software Analytics

Hoa Khanh Dam, Truyen Tran, Aditya Ghose · DOI

Abstract

Software analytics has been the subject of considerable recent attention but is yet to receive significant industry traction. One of the key reasons is that software practitioners are reluctant to trust predictions produced by the analytics machinery without understanding the rationale for those predictions. While complex models such as deep learning and ensemble methods improve predictive performance, they have limited explainability. In this paper, we argue that making software analytics models explainable to software practitioners is as important as achieving accurate predictions. Explainability should therefore be a key measure for evaluating software analytics models. We envision that explainability will be a key driver for developing software analytics models that are useful in practice. We outline a research roadmap for this space, building on social science, explainable artificial intelligence and software engineering.

Introduction: The Trust Gap in Software Analytics

In recent years, software analytics has leaned heavily on complex machine learning models—such as Deep Neural Networks and Ensemble methods—to predict defects, estimate effort, or recommend APIs. While these models achieve high scores in metrics like precision and recall, they suffer from a significant "trust gap."

Software practitioners are often reluctant to act on a model's output if they do not understand the rationale behind it. For instance, simply flagging a source file as "defective" is insufficient; a developer needs to know why it is considered defective to effectively fix it. Without explainability, these tools remain academic exercises rather than integrated parts of the professional development workflow. This work addresses the challenge of making these "black boxes" transparent and interpretable.

Strategies for Explainability

As a conceptual framework and research agenda, this work outlines three primary strategies for achieving explainability in software analytics:

  1. Transparent Modeling: Utilizing inherently interpretable models like Decision Trees or Classification Rules. These follow the "Occam’s Razor" principle, where the model's structure (e.g., an IF-THEN statement) serves as the explanation itself.
  2. Opening the Black Box: For high-performance models like Deep Learning, explainability can be achieved through:
  3. Visualization: Using techniques to inspect neuron activations or feature importance maps.
  4. Self-Explaining Architectures: Designing models with built-in mechanisms like Attention, which highlights specific input code tokens the model focused on.
  5. Natural Language Coupling: Generating human-readable text justifications alongside predictions.
  6. External Explainers: Employing "mimic learning" (knowledge distillation) where a simple, interpretable model approximates a complex one, or using tools like LIME to provide local explanations for specific data instances.

Key Insights: The Accuracy-Explainability Frontier

A fundamental tension exists in AI: as models become more powerful and accurate, they generally become less explainable. The goal of Explainable Software Analytics (XSA) is to push the frontier of this curve, seeking models that occupy the high-accuracy, high-explainability quadrant.

The trade-off between prediction accuracy and explainability across different machine learning models.

Beyond the trade-off, several key concepts define the XSA landscape:

  • Contrastive Explanations: Drawing from social sciences, humans often seek contrastive answers (e.g., "Why is this file flagged as defective rather than clean?").
  • Pragmatic Explanatory Pluralism: Different stakeholders—developers, managers, testers—require different types of justifications based on their specific roles and expertise.
  • Explainability as a Metric: Explainability should be a formal criterion for evaluation, potentially integrated into multi-objective optimization alongside accuracy.

Research Roadmap and Future Directions

The formalization of XSA identifies three critical research questions:

  1. What constitutes a "good" explanation in a software engineering context?
  2. How do we build models that generate these explanations?
  3. How do we quantitatively and qualitatively evaluate explainability?

While promising, the field faces challenges in measuring explainability, which is inherently subjective. Future work must involve expensive but necessary human studies with practitioners to establish "gold standards." Furthermore, trust requires not just explainability, but also reproducibility and repeatability. Ultimately, the vision is to create AI agents that are "self-aware"—knowing their own limitations and when they are likely to be incorrect.

Summary updated

BibTeX
@inproceedings{dam2018explainable,
  author = {Hoa Khanh Dam and Truyen Tran and Aditya Ghose},
  title = {{Explainable Software Analytics}},
  booktitle = {ICSE (NIER)},
  year = {2018},
  doi = {10.1145/3183399.3183424},
}
Figure