Papers
Topics
Authors
Recent
Search
2000 character limit reached

Spectral Relevance Analysis (SpRAy)

Updated 5 July 2026
  • SpRAy is a spectral explainability method that adapts decision predicate graphs to partition continuous spectra into expert-informed zones and employs PCA to reconstruct threshold spectra in physical units.
  • It overcomes limitations of traditional variable-level XAI by aggregating strongly collinear spectral data into coherent, interpretable spectral regions suited for chemometrics and spectroscopy.
  • Empirical evaluations demonstrate that, while SpRAy is distinct from the SMX framework, it delivers competitive faithfulness, domain alignment, and stability, enabling direct visual inspection of spectral decision boundaries.

Searching arXiv for the original SpRAy paper and closely related works to support disambiguation. In the context of recent work on explainability for spectral-based machine learning, Spectral Relevance Analysis (SpRAy) must be distinguished from the method presented in "Spectral Model eXplainer: a chemically-grounded explainability framework for spectral-based machine learning models" (Ribeiro et al., 4 May 2026). That paper explicitly states that it is not about the original SpRAy; instead, it introduces Spectral Model eXplainer (SMX), a separate post-hoc, global, model-agnostic explainability framework for spectral classifiers in chemometrics and spectroscopy. Within this source, SpRAy functions primarily as a point of contrast: the overlap in "spectral" and "relevance" is topical, whereas the algorithmic core comes from an adaptation and extension of Decision Predicate Graph (DPG) ideas to spectral domains (Ribeiro et al., 4 May 2026).

1. Disambiguation and method identity

A central clarification is that the 2026 SMX paper does not present the original Spectral Relevance Analysis method. It proposes SMX, and its intended domain is spectral-based machine learning, especially spectroscopy and chemometrics, with experiments on X-ray fluorescence (XRF) and gamma-ray spectrometry (GRS) binary classification tasks. The paper therefore belongs to the broader area of relevance analysis for spectral ML models, but not to SpRAy in the strict methodological sense (Ribeiro et al., 4 May 2026).

This distinction matters because the explanatory abstractions are different. The SMX paper characterizes its own pipeline as

zone→PCA score→predicate→perturbation relevance→graph centrality→reconstructed threshold spectrum.\text{zone} \rightarrow \text{PCA score} \rightarrow \text{predicate} \rightarrow \text{perturbation relevance} \rightarrow \text{graph centrality} \rightarrow \text{reconstructed threshold spectrum}.

That sequence is the paper’s actual contribution. A plausible implication is that references to "spectral relevance" in later spectroscopy literature may require careful bibliographic disambiguation: some refer to the original SpRAy, whereas others refer instead to zone-based explainability frameworks such as SMX.

2. Problem formulation in spectral explainability

The SMX paper frames the problem as a mismatch between standard XAI tools and the structure of spectral data. Widely used methods such as SHAP, Permutation Feature Importance (PFI), and chemometric VIP operate primarily at the level of individual variables—energy channels, wavelengths, or wavenumbers. According to the paper, this is a poor fit for spectra because spectral signals are physically continuous, neighboring variables are strongly collinear, and meaningful interpretation is generally attached to bands, zones, or element-linked peaks, not isolated variables (Ribeiro et al., 4 May 2026).

The consequence is that variable-level importance becomes fragmented and chemically awkward. The paper identifies several resulting difficulties: long ranked lists, dense clusters of nearly tied neighboring variables, and the need for post-hoc aggregation before a spectroscopist can infer which spectral region matters. It also notes that gradient methods are limited to differentiable models and therefore exclude common chemometric models such as PLS and SVM. In this formulation, relevance analysis for spectra is not simply a matter of ranking variables; it requires explanatory units aligned with the physicochemical organization of the signal.

3. SMX as a spectral-native alternative

SMX starts from a preprocessed spectral matrix

X∈Rn×p,\mathbf{X}\in\mathbb{R}^{n\times p},

where nn is the number of samples and pp the number of spectral variables, together with a trained supervised classifier ff. The pipeline has five main stages—spectral-zone decomposition and aggregation, predicate formulation, stochastic bag generation, perturbation-based predicate scoring, and graph construction and centrality analysis—followed by a distinctive interpretive step, threshold spectrum reconstruction (Ribeiro et al., 4 May 2026).

The first operation is the partition of the continuous spectrum into MM expert-informed spectral zones. These zones are not learned automatically in the paper; they are defined from spectroscopy knowledge, expected elemental lines, scattering regions, radionuclide peaks, and measurement setup. Zone mm is written as

Zm={j:λstart(m)≤λj≤λend(m)},m=1,…,M.Z_m=\{j:\lambda_{\mathrm{start}^{(m)}}\le \lambda_j \le \lambda_{\mathrm{end}^{(m)}}\}, \qquad m=1,\dots,M.

The paper emphasizes that the interpretable unit in spectroscopy is usually a known peak, band, or feature group rather than an arbitrary cluster of variables.

Each zone is then compressed to a single scalar score per sample using PCA with one principal component. For sample ii, the zone score is

ti(m)=(xi(m)−xˉZm)⊤w1(m),t_i^{(m)} = \bigl(\mathbf{x}_i^{(m)}-\bar{\mathbf{x}}_{Z_m}\bigr)^\top \mathbf{w}_1^{(m)},

and the corresponding explained variance ratio of PC1 is

X∈Rn×p,\mathbf{X}\in\mathbb{R}^{n\times p},0

The paper gives two reasons for choosing PCA rather than a mean or sum: it respects the dominant covariance structure within the zone, and its linearity permits later back-projection into the original spectral domain.

Predicates are defined from quantiles of these zone scores. For quantile levels X∈Rn×p,\mathbf{X}\in\mathbb{R}^{n\times p},1, with the example X∈Rn×p,\mathbf{X}\in\mathbb{R}^{n\times p},2, the threshold for zone X∈Rn×p,\mathbf{X}\in\mathbb{R}^{n\times p},3 and quantile X∈Rn×p,\mathbf{X}\in\mathbb{R}^{n\times p},4 is

X∈Rn×p,\mathbf{X}\in\mathbb{R}^{n\times p},5

and the complementary predicates are

X∈Rn×p,\mathbf{X}\in\mathbb{R}^{n\times p},6

The theoretical maximum number of predicates is X∈Rn×p,\mathbf{X}\in\mathbb{R}^{n\times p},7, with duplicates removed after tied quantiles.

4. Relevance estimation, graph aggregation, and threshold spectra

Because spectral datasets may exhibit limited sample size, imbalance, and instability, SMX uses bagging over subsamples. For each bag X∈Rn×p,\mathbf{X}\in\mathbb{R}^{n\times p},8, a subsample X∈Rn×p,\mathbf{X}\in\mathbb{R}^{n\times p},9 is drawn, typically with size nn0, without replacement. Predicates whose support falls below a threshold are discarded; the default minimum support is nn1 of training size. The full bagging-scoring-graph pipeline is then repeated across random seeds, and the final centralities are averaged across seeds (Ribeiro et al., 4 May 2026).

The core relevance mechanism is perturbation-based. For a predicate nn2 associated with zone nn3, SMX perturbs only the variables in that zone, replacing them by a column-wise training-set median by default. For classifiers such as SVM and MLP, relevance is computed from predicted class probabilities through Probability Shift:

nn4

with nn5 in the reported experiments. To avoid favoring wider zones simply because more variables are altered, the impact is normalized by zone length:

nn6

Within each bag, predicates are ranked by decreasing perturbation impact and assembled into a directed weighted graph nn7. The edge weights are scaled by the explained variance of the corresponding zone’s first principal component:

nn8

Global predicate relevance is then summarized through Local Reaching Centrality (LRC) on this directed weighted graph. The paper interprets LRC as an importance-like score reflecting recurrent evidence of influence in the ranking topology. One can retain the ranking at the predicate level or collapse it back to zones.

The most distinctive step is threshold spectrum reconstruction. Because the PCA representation is linear, a latent threshold nn9 can be mapped back into the original spectral coordinates:

pp0

This reconstructed vector is the threshold spectrum. The paper states that it is expressed in the natural physical units of the instrument, such as keV or channel range, and can therefore be overlaid directly on measured spectra. This suggests a form of explanation that differs from ordinary feature attribution: not simply the importance of a variable, but a reconstructed spectral decision boundary over a meaningful interval.

5. Baselines, datasets, and empirical findings

The paper evaluates SMX against KernelSHAP, PFI, and VIP for PLS. The baseline formulas are given explicitly, including global SHAP as mean absolute local contribution,

pp1

PFI as loss difference under permutation,

pp2

and VIP in the standard latent-variable form reported in the paper. The comparison is organized around faithfulness, domain alignment, stability, simplicity, and qualitative compositional quality and chemical plausibility (Ribeiro et al., 4 May 2026).

The empirical study uses eight real datasets and one synthetic benchmark. The real datasets are: Bank notes (XRF), Forage (XRF), Milk (XRF), Sediments (XRF), Soil fertility (XRF), Soil fertility (GRS), Soil types (GRS), and Tomato (XRF). The synthetic benchmark consists of Gaussian peaks plus noise,

pp3

with known discriminative structure: the peak around 150 is strongly discriminative, the peak around 300 is weakly discriminative, the peak around 500 is non-discriminative, and background regions contain only noise.

The central empirical findings are stated as follows. In faithfulness, SMX is broadly equivalent to SHAP, PFI, and VIP in most comparisons; Wilcoxon tests show no significant difference in 6 of 7 SMX-centered comparisons, with SHAP outperforming SMX significantly for MLP at pp4. In domain alignment, SMX is competitive and in some cases significantly better, especially for SVM and MLP. In stability, compared against PFI, SMX is more stable and significantly so for SVM at pp5, using instability pp6. In simplicity, SMX is significantly simpler than PFI in all models and simpler than VIP for PLS, while statistically comparable to SHAP. The paper also emphasizes that explanation is only meaningful when the underlying classifier is competent; weak models can render explanations analytically unreliable.

6. Case-study interpretation and scope relative to SpRAy

The clearest practical example in the paper is the soil fertility XRF case study. For the XRF soil fertility PLS model, the top SMX predicates are reported as: Ca pp7, Ca pp8, Mn pp9, Si ff0, Ca ff1, and Si ff2, with corresponding LRC values such as 9.40, 6.75, and 6.20. When converted to zone rankings, SMX agrees strongly with SHAP, PFI, and VIP on the dominant zones—Ca ff3, Mn, Si, and Fe ff4—and the reported pairwise zone-ranking RBO values are SMX–SHAP = 0.92, SMX–PFI = 0.82, and SMX–VIP = 0.80 (Ribeiro et al., 4 May 2026).

What the paper presents as the key added value is the threshold reconstruction associated with such predicates. For example, predicates like Ca ff5 correspond to threshold spectra that separate predominantly eutrophic from dystrophic soils, offering directly interpretable boundaries on the spectral plot. The paper further suggests several uses for threshold spectra: rapid visual sample screening, prioritizing borderline samples for confirmatory chemistry, monitoring instrument drift relative to stored threshold profiles, and hypothesis generation about physicochemical mechanisms behind classification.

The acknowledged limitations are equally important for positioning the method relative to SpRAy. The current implementation is for binary classification only; the method is global, not yet a formal local explainer; it requires expert-defined zones; quantile thresholds are hand-chosen rather than optimized; computational cost grows with bags, predicates, seeds, and model inference cost; and validation is limited to synthetic, XRF, and GRS data rather than vis-NIR, Raman, or LIBS. The paper therefore should not be treated as a replacement for the original SpRAy. Rather, it is a distinct explainability framework specialized for spectral data, relevant to the broader topic of relevance analysis because it identifies globally relevant spectral regions through expert-defined zones, PCA-based latent summaries, quantile predicates, perturbation-derived relevance, graph aggregation via Local Reaching Centrality, and back-projected threshold spectra in physical units.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Spectral Relevance Analysis (SpRAy).