mlsanityData to 7 Oct 2026

A Preliminary Study on Explaining Risk of Code Changes using LLM-Based Prediction Models

arXiv 2607.02782 ↗First posted 2 Jul 2026cs.SE cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Predictions by machine learning (ML) and artificial intelligence (AI) models are often received skeptically unless they are paired with intelligible explanations. In the context of just-in-time defect prediction, highlighting small portions of a software change (diff) -- beyond rule-based lints -- where risk may be concentrated has not yet been extensively investigated. In this work, we leverage attention weights from an LLM-based Diff Risk Score (DRS) model to highlight parts of a diff that the model focuses on when predicting risk. We aggregate token-level attention into interpretable code units (lines, hunks, and files), and present the top-K units to developers as a lightweight form of guidance during code review. We evaluate our approach using expert-labeled changes that have caused real outages. Results show that the highlighted snippets cover expert-labeled outage-causing change lines 53.85% of the time when highlighting the top-2 hunks, while requiring developers to review 26.28% of the changed lines on average. Because attention is produced during standard model inference, the approach is scalable for large development workflows and can be surfaced in the code review UI with low additional latency.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 8 of its 25 references that are in the map. First posted on arXiv 2 Jul 2026.

Builds on

8 of 25 references.

References · 8

  1. 2019Attention is not Explanationcited by 916
  2. 2020Captum: A unified and generic model interpretability library for PyTorchcited by 542
  3. 2019Explainable Reinforcement Learning Through a Causal Lenscited by 177
  4. 2022On scientific understanding with artificial intelligencecited by 68
  5. 2021Shapley values for feature selection: The good, the bad, and the axiomscited by 54
  6. 2018Explainable Software Analyticscited by 15
  7. 2021AI Explainability 360: Impact and Designcited by 8
  8. 2024Moving Faster and Reducing Risk: Using LLMs in Release Deploymentcited by 6

Built on by

Not cited yet.