# A method for explaining individual predictions in neural networks

**Authors:** Sejong Oh

PMC · DOI: 10.7717/peerj-cs.2802 · 2025-04-07

## TL;DR

This paper introduces a method to explain how neural networks make predictions by calculating the contribution of each input value.

## Contribution

The novel contribution is a method to interpret neural network predictions by analyzing input weights and their influence on outputs.

## Key findings

- The proposed method evaluates input contributions using weighted sums and network weights.
- The method is applicable to both regression and classification models regardless of network depth.
- A Python library was developed to implement the method, making it accessible for practical use.

## Abstract

Recently, the explainability of the prediction results of machine learning models has attracted attention. Most high-performance prediction models are black boxes that cannot be explained. Artificial neural networks are also considered black box models. Although they can explain image classification results to some extent, they still struggle to explain the classification and regression results for tabular data. In this study, we explain the individual prediction results derived from a neural network-based prediction model.

The output of a neural network is fundamentally determined by multiplying the input values by the network weights. In other words, the output is a weighted sum of the input values. The weights control how much each input value contributes to the output. The degree of influence of an input value xi on the output can be evaluated as (xi · weight value wi)/weighted sum. From this insight, we can calculate the contribution of each input value to the output as it flows through the neural network.

With the proposed method, the neural network is no longer a black box. The proposed method effectively explains the predictions made by the neural network and is independent of the depth of the hidden layers and the number of nodes in each hidden layer. This provides a clear rationale for this interpretation. It can be applied to both regression and classification models. The proposed method is implemented as a Python library, making it easy to use.

## Full-text entities

- **Genes:** ITIH2 (inter-alpha-trypsin inhibitor heavy chain 2) [NCBI Gene 3698] {aka H2P, ITI-HC2, SHAP}, F2R (coagulation factor II thrombin receptor) [NCBI Gene 2149] {aka CF2R, HTR, PAR-1, PAR1, TR}, IL17C (interleukin 17C) [NCBI Gene 27189] {aka CX2, IL-17C}, LIME1 (Lck interacting transmembrane adaptor 1) [NCBI Gene 54923] {aka LIME, dJ583P15.4}
- **Diseases:** TR (MESH:D002472), WS (MESH:D018980), XAI (MESH:C538243)
- **Chemicals:** magnesium (MESH:D008274), n_phenols (-), proline (MESH:D011392)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Figures

47 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12190433/full.md

---
Source: https://tomesphere.com/paper/PMC12190433