Paper · 2025-04-12 · cs.AI, cs.CY
Explainable Artificial Intelligence Techniques for Interpretation of Food Models: a Review
Semi-systematic review of explainable AI (SHAP, LIME, Grad-CAM, PDP, LRP) in food quality. Proposes a five-topic food-quality taxonomy and sorts studies by data type and explanation type. Pictorial data and visual explanations dominate; spectral and time-series data are rarely explained. Survey of over 200 works (author-reported count), not a new method.
Explainable AIFeature attributionExplanation evaluation (judging whether an XAI explanation is good)Counterfactual explanationexplainabilitysurveyfood-qualityinterpretabilityfeature-attribution
AI-compiled by claude-haiku-5-5 on 2026-10-19, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
Food companies increasingly use AI to spot contamination, judge freshness, check where a product came from and estimate its nutrition. Those models are often hard to inspect, so an inspector or a manager cannot easily tell why a sample was flagged. Explainable AI (XAI) tries to close that gap by showing which parts of an input, such as an image region or a wavelength, pushed the model toward its answer.
This paper is a review of how XAI has been used in food quality research. The authors read the literature, sorted it into five quality topics, and grouped each study by the kind of data it used and the kind of explanation it produced. Most of the work uses photos and heatmaps. Spectral and time-series data get much less attention, and few studies use more than one explanation method.
The paper proposes no new model. Its value is the map of what has been tried, which techniques are common, and a list of open gaps, such as real-time explanations, counterfactual guidance and formal evaluation of explanations.
TL;DR
- A semi-systematic review of XAI in food quality, built from Scopus and Google Scholar searches plus backward and forward snowballing, covering work up to July 2025 §1.1.
- It proposes a five-topic food-quality taxonomy (safety, authenticity and traceability, nutritional value, sensory attributes, sustainability and healthiness) and classifies studies by data type and explanation type §2 §3.1 §9.
- Pictorial data and visual explanations (mostly CAM-type heatmaps) dominate; spectral and time-series data are rarely explained, and few studies combine several XAI methods §9 fig. 8 fig. 9.
- Counts and trends are the authors' own tallies from a non-exhaustive corpus, with no quantitative benchmark. The paper reports no experiments §1.1.1 §9.
Problem
Food quality control increasingly relies on AI models, but reliability and adoption depend on understanding why a model made a decision §1. The authors see three gaps in the literature: inconsistent XAI terminology across food papers, no overview of the state of the art for food, and existing surveys that are either theoretical or not about food §1.
Food data also adds problems. Biological variability, raw-material heterogeneity, seasonal and batch effects, and storage conditions can shift distributions and create spurious correlations, so a model may rely on lighting, packaging or instrument drift instead of the quality signal §2.1. The authors propose XAI as a diagnostic layer for verifying and auditing such models §2.1.
Method
The paper's "method" is its review procedure and its classification scheme.
- Search. Keyword combinations on Scopus and Google Scholar, pairing XAI terms ("XAI" and the spelled-out name of the field) with food terms such as "food quality", "food control" and "agriculture" §1.1 fig. 2.
- Window. Works from the last ten years, available up to July 2025 §1.1 fig. 2.
- Eligibility. Keep a study only if it explicitly addresses food quality and explicitly uses at least one XAI technique. Food-AI papers without an explicit XAI method are excluded §1.1 fig. 2.
- Snowballing. Backward screening of reference lists and forward citation chasing, starting from LIME, SHAP, CAM/Grad-CAM, PDP and LRP §1.1 fig. 2.
- Classify each study on four axes: quality topic §2, data type (tabular, pictorial, spectral, time series) §2.2, AI method §2.3, and explanation type §3.1. The paper also records XAI technique and its scope and specificity tab. 2.
Taxonomy used to classify each XAI technique §3 tab. 2:
- Interpretability is an intrinsic model property; explainability is post-hoc explanation of a prediction §3 tab. 1.
- Scope: global (whole model) or local (one data point) §3.
- Specificity: model-agnostic (any model) or model-specific (a class of models) §3.
- Explanation type: numerical (crisp values, vectors, tensors), rule-based (IF–THEN logic), visual (heatmaps, graphs), mixed. Textual explanations are defined in the paper's source but were not observed in any surveyed work, so they are excluded from the analysis §3.1.
Per-technique summary as the paper describes it §3.2 tab. 2 fig. 5:
- LIME: trains an interpretable surrogate (usually a linear model or small decision tree) on k perturbed samples around one instance, weighted by proximity. Its coefficients or tree importances serve as feature attributions §3.2.
- SHAP: attributes to each feature its Shapley value, the average marginal contribution over feature coalitions. Removed features are replaced with a reference baseline. The attributions are additive and sum to the gap between the expected output and the prediction §3.2.
- PDP: shows the average effect of one or two features on the prediction by varying them over a grid and averaging over the other features §3.2.
- LRP, CAM, Grad-CAM: neural-network-specific, local methods. LRP redistributes the output score back to the input layer by layer. CAM and Grad-CAM weight final feature maps by class-specific weights (CAM) or gradients (Grad-CAM) to produce a localisation map §3.2.
# LIME: local surrogate explanation [§3.2]
# Input: black-box model; one instance; k (number of perturbed samples)
# Output: per-feature weights of a local, interpretable model
def lime_explain(model, instance, k):
# Create k perturbed points near the instance [§3.2]
samples = perturb(instance, k)
# Query the black box on each perturbed point [§3.2]
predictions = model(samples)
# Weight each sample by how close it is to the instance [§3.2]
weights = proximity(samples, instance)
# Fit a simple model (linear or small tree) on the weighted samples [§3.2]
surrogate = fit_weighted(samples, predictions, weights)
# Coefficients or tree importances act as attributions [§3.2]
return surrogate.importances# SHAP: Shapley-value attribution [§3.2]
# Input: model; one instance; reference values (baseline per feature)
# Output: one contribution per feature, additive to the prediction
def shap_values(model, instance, baseline):
# Start with no contributions
contributions = {}
for feature in features(instance):
# Average this feature's marginal effect over all coalitions [§3.2]
# A removed feature is replaced by its baseline value [§3.2]
contributions[feature] = shapley_average(
model, instance, baseline, feature
)
return contributionsThe paper gives no LIME kernel or perturbation formula and no SHAP estimator, so the pseudocode above follows the paper's prose only. Details such as k, the kernel width and the baseline are not stated.
Hyperparameters
Not applicable. The paper trains no models and reports no experiments §1.1. The only quantities are the review's own parameters, which are stated: time window (to July 2025) §1.1, databases (Scopus, Google Scholar) §1.1, and the classification axes §3 tab. 2.
Efficiency column from the paper's own table tab. 2: the cost of one explanation for one data point, where d is the number of features and k the number of perturbed samples (LIME only):
| Technique | Scope | Specificity | Explanation type | Cost per explanation |
|---|---|---|---|---|
| LIME | Local | Model-agnostic | Numerical / Mixed | O(k d²) |
| SHAP | Local | Model-agnostic | Numerical / Mixed | O(d 2^d) |
| PDP | Global | Model-agnostic | Visual | O(d) |
| LRP | Local | Model-specific | Visual | O(1) |
| CAM | Local | Model-specific | Visual | O(1) |
| Grad-CAM | Local | Model-specific | Visual | O(1) |
The table is the paper's tab. 2. The complexity values are the authors' figures, and the paper does not give derivations.
Results
Author-reported. The survey's results are counts and trends across the surveyed corpus, not a benchmark. Setup: works from Scopus and Google Scholar searches, published up to July 2025, plus snowballing §1.1.
| Setting | Metric | Finding | Source |
|---|---|---|---|
| Corpus size | Number of works | "over a hundred" in contributions; ">200" in the workflow figure and the conclusion (inconsistent) | §1 fig. 2 §11 |
| Data type | Share of works | Pictorial most frequent, tabular close behind; spectral and time series rarely used | §9 fig. 8 |
| Explanation type | Share of works | Visual dominant; numerical mostly for tabular data; rule-based rare; textual none observed | §3.1 §9 fig. 8 |
| Scope | Local vs global | Most studies use local methods (LIME, SHAP, Grad-CAM); global methods less common | §9 fig. 9a |
| Specificity | Agnostic vs specific | No clear preference overall; model-specific prominence comes from CAM-based methods | §9 fig. 9b |
| Multi-method use | Papers using >1 XAI technique | Few papers; authors call this a partial view of the model | §9 |
| Food safety | Works and methods | Mostly visual explanations on pictorial data, mainly CNNs with CAM-family methods | §4 tab. 3 |
| Topic distribution | Works per topic | Food security (called "Food Safety" in §4) most prominent, then authenticity and nutritional value; sensory and sustainability less explored | §9 fig. 7 |
| Time trend | Works per year | Sharp rise from 2020 onward, pictorial early and tabular more recent | fig. 6 §9 |
| Adoption | XAI vs AI studies | Only a small fraction of food-AI studies also use XAI | §9 |
| Method preference | CAM-family vs LRP | Most works prefer CAM-based methods (Grad-CAM) over LRP despite similar cost; the paper cites human studies for the preference | §3.2 tab. 2 |
Paper vs code
No official code. The arXiv abstract page lists no code or project link, and the source contains no repository URL. A GitHub repository search for "explainable food quality XAI" and for the first author's and a co-author's names with "XAI food" returned nothing.
Pitfalls
- Corpus size is inconsistent. The contributions say "over a hundred papers" §1. The workflow figure and conclusion say more than 200 fig. 2 §11. The paper does not list the included works. They appear only as citation keys in the topic tables tab. 3 tab. 4 tab. 5 tab. 6 tab. 7, and the reference list is in the source's bibliography file, not in the paper body. Do not quote a number without saying which claim it is.
- Date and version. The search window runs to July 2025 §1.1. The arXiv metadata gives 2025-04-12 for the first version, which cannot include July 2025 literature. The source used here is v2 (updated 2026-04-27). Cite v2 if you rely on the window.
- Topic naming mismatch. Section 4 and the table captions say "Food Safety" §4 tab. 3. The caption of the year-by-topic figure says "Food Security" fig. 7. The text is the same topic, but search on both terms when you look for a study.
- Textual explanations. The introduction lists five explanation forms, including textual §1. The explanation-type section excludes textual because no surveyed work used it §3.1. Treat textual as out of scope.
- Search limits. The review uses two databases, keyword retrieval and snowballing from classic XAI methods. The authors state that this biases the corpus toward highly cited work and misses non-standard terminology §1.1.1.
- Figures are not reproduced. Figure contents here come from captions and text. The figure PDFs in the source were not inspected. fig. 3 to fig. 9 are cited, not copied, and no figure is included on this page.
- Complexity table is per explanation. tab. 2 gives the cost of one explanation for one data point. It does not measure wall-clock time, memory, or the cost of training. SHAP's O(d 2^d) reflects exact enumeration; approximations are not discussed.
- Explanations are not ground truth. The paper stresses that LIME and SHAP are sensitive to sampling, kernel width, baseline and feature correlation, and that Grad-CAM heatmaps are coarse and can pick up background cues §9.1. These claims cite other works and were not tested here.
- Commented-out drafts in the source. The LaTeX source contains commented-out text, including an alternative search description and an older figure caption. It is not part of the published paper, and this card does not use it.
Lineage
- Builds on the classic XAI methods it surveys: LIME §3.2, SHAP §3.2, PDP §3.2, LRP §3.2, CAM and Grad-CAM §3.2. It uses their published definitions, and the paper cites them by author and year in the source. arXiv ids are not given here because those methods have no cards on this wiki yet.
- Also draws on the classification of Vilone et al., which the authors cite for the model-agnostic and model-specific split §3.2. No arXiv id is given for it in the paper.
- Compared against: earlier XAI surveys that are theoretical or not food-specific, and food-AI surveys that do not discuss explainability §1. The paper names several but gives no details here.
- Superseded by: not stated.
Source and license
Adapted from “Explainable Artificial Intelligence Techniques for Interpretation of Food Models: a Review” by Leonardo Arrighi, Ingrid Alves de Moraes, Marco Zullich, Michele Simonato, Douglas Fernandes Barbin, Sylvio Barbon Junior (arXiv:2504.10527), used under CC BY-SA 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors. This page is licensed under CC BY-SA 4.0.