Table of Contents
Fetching ...

GAMMA_FLOW: Guided Analysis of Multi-label spectra by MAtrix Factorization for Lightweight Operational Workflows

Viola Rädle, Tilman Hartwig, Benjamin Oesen, Emily Alice Kröger, Julius Vogt, Eike Gericke, Martin Baron

TL;DR

The work tackles the need for real-time, interpretable analysis of noisy one-dimensional spectra in gamma spectroscopy by proposing gamma_flow, a lightweight, open-source framework based on a supervised variant of non-negative matrix factorization with fixed loadings. The method models spectra with $X \approx S L^T$, where $L$ contains mean isotope spectra and $S$ contains non-negative scores representing isotope contributions, enabling fast classification, deconvolution, and denoising. Demonstrations show classification accuracies above 90% (e.g., 94.8% in a measured single-label test) and smooth, interpretable denoised spectra, along with an explicit outlier-detection strategy grounded in latent-space analysis. The modular, three-notebook implementation supports end-to-end workflows and facilitates adoption across domains requiring real-time interpretation of spectral data, extending beyond gamma spectroscopy to environmental monitoring, materials science, and related fields.

Abstract

GAMMA_FLOW is an open-source Python package for real-time analysis of spectral data. It supports classification, denoising, decomposition, and outlier detection of both single- and multi-component spectra. Instead of relying on large, computationally intensive models, it employs a supervised approach to non-negative matrix factorization (NMF) for dimensionality reduction. This ensures a fast, efficient, and adaptable analysis while reducing computational costs. gamma_flow achieves classification accuracies above 90% and enables reliable automated spectral interpretation. Originally developed for gamma-ray spectra, it is applicable to any type of one-dimensional spectral data. As an open and flexible alternative to proprietary software, it supports various applications in research and industry.

GAMMA_FLOW: Guided Analysis of Multi-label spectra by MAtrix Factorization for Lightweight Operational Workflows

TL;DR

The work tackles the need for real-time, interpretable analysis of noisy one-dimensional spectra in gamma spectroscopy by proposing gamma_flow, a lightweight, open-source framework based on a supervised variant of non-negative matrix factorization with fixed loadings. The method models spectra with , where contains mean isotope spectra and contains non-negative scores representing isotope contributions, enabling fast classification, deconvolution, and denoising. Demonstrations show classification accuracies above 90% (e.g., 94.8% in a measured single-label test) and smooth, interpretable denoised spectra, along with an explicit outlier-detection strategy grounded in latent-space analysis. The modular, three-notebook implementation supports end-to-end workflows and facilitates adoption across domains requiring real-time interpretation of spectral data, extending beyond gamma spectroscopy to environmental monitoring, materials science, and related fields.

Abstract

GAMMA_FLOW is an open-source Python package for real-time analysis of spectral data. It supports classification, denoising, decomposition, and outlier detection of both single- and multi-component spectra. Instead of relying on large, computationally intensive models, it employs a supervised approach to non-negative matrix factorization (NMF) for dimensionality reduction. This ensures a fast, efficient, and adaptable analysis while reducing computational costs. gamma_flow achieves classification accuracies above 90% and enables reliable automated spectral interpretation. Originally developed for gamma-ray spectra, it is applicable to any type of one-dimensional spectral data. As an open and flexible alternative to proprietary software, it supports various applications in research and industry.

Paper Structure

This paper contains 13 sections, 2 equations, 5 figures, 2 tables.

Figures (5)

  • Figure 1: Software architecture of gamma_flow: The jupyter notebooks 01_preprocessing.ipynb, 02_model.ipynb and 03_outlier.ipynb are executed sequentially, using functions from different Python files.
  • Figure 2: Decomposition of spectral data into scores and loadings, illustrated for five different isotopes. The loadings matrix contains the latent components, corresponding to the mean spectrum of each isotope. The scores matrix provides the representation of each spectrum in the five-dimensional latent space. When normalized, the scores indicate the predicted contribution of each isotope to the measured spectrum.
  • Figure 3: Confusion matrix of single-label classification, with an accuracy of 94.8%. While the model was trained on simulated spectra, measured spectra were used as test data. Misclassifications only occur between an isotope and background, not between different isotopes.
  • Figure 4: Comparison between the original and the reconstructed denoised spectrum of 137Cs and background. The denoised spectrum is smoother, leading to an easy and fast interpretability.
  • Figure 5: For outlier detection, the decision boundary can be derived based on accuracy, precision and recall of the outliers dataset.