Non-negative factor analysis supporting the interpretation of elemental distribution images acquired by XRF

Matthias Alfeld, Mirwaes Wahabzada, Christian Bauckhage, Kristian Kersting, Gerd Wellenreuther, Gerald FalkenbergJournal of Physics Conference Series 2014

Abstract

Stacks of elemental distribution images acquired by X-ray Fluorescence (XRF) can be difficult to interpret due to high redundancy and components with similar qualitative but different quantitative elemental compositions. While Principal Component Analysis (PCA) is often used for dimensionality reduction, it frequently produces unphysical negative values. This paper presents the first application of the Python Matrix Factorization Module (pymf) to XRF data, specifically focusing on the painting Saul and David from the studio of Rembrandt van Rijn. We demonstrate how Non-Negative Matrix Factorization (NMF) supports the discrimination between chemically similar compounds with minimal user intervention.

Introduction

X-ray Fluorescence (XRF) imaging is a cornerstone of non-destructive analysis in art conservation, allowing researchers to map elemental distributions across large-scale historical works. However, the resulting datasets—often stacks of images representing various elements—present significant interpretational challenges. Two primary issues complicate the analysis:

  1. Redundancy: Single pigments typically contain multiple elements, causing the same physical component to appear across multiple elemental maps.
  2. Chemical Similarity: Distinct pigments may share the same elemental signatures but in different quantitative ratios, making them hard to distinguish in raw maps.

Traditionally, Principal Component Analysis (PCA) has been the go-to tool for reducing redundancy. However, PCA's reliance on orthogonal transformations often results in negative values in the basis vectors. In the context of XRF, a negative concentration is physically impossible, rendering PCA outputs difficult for chemists and conservators to interpret intuitively.

Methodology: Non-Negative Matrix Factorization (NMF)

To address the shortcomings of PCA, this study utilizes Non-Negative Matrix Factorization (NMF). Unlike PCA, NMF enforces a strict non-negativity constraint, ensuring that all decomposed components represent additive physical realities.

Schematic representation of Non-negative Matrix Factorization (NMF) decomposing a data matrix into basis vectors and coefficients.

As shown in the figure above, NMF decomposes the original data matrix $V$ (the stack of XRF images) into two smaller matrices: $W$ (basis vectors representing chemical components) and $H$ (coefficients representing spatial distribution). This "part-based" representation mirrors the physical process of painting, where layers of pigments are added together. For this study, the authors used the Python Matrix Factorization Module (pymf), scaling the data by the square root of the mean value to account for intensity uncertainty.

Case Study: Rembrandt’s Saul and David

The effectiveness of NMF was tested on an XRF scan of Saul and David (c. 1655), a painting attributed to Rembrandt’s studio. The dataset comprised 15 elemental distribution images (including Ca, Fe, Co, Ni, As, and Pb) at a resolution of 495 x 1074 pixels.

The painting's complex history—having been bisected and rejoined in the 19th century—provided a perfect test case. Specifically, the challenge was to distinguish between the original 17th-century cobalt-based blue pigment ("smalt") and a 19th-century cobalt-based drier used during restoration. Both materials appear in the Cobalt (Co) map, but NMF can distinguish them by analyzing the co-occurrence of other elements like Nickel (Ni) and Arsenic (As).

Key Results and Insights

The NMF algorithm, configured to extract 8 basis components, successfully isolated key historical and material features:

  • Component Separation: NMF automatically distinguished the original smalt (associated with Co, K, Fe, Ni, and As) from the modern restoration drier (associated with Co, Fe, and trace Ni).
  • Restoration Mapping: One specific component perfectly highlighted areas of paint loss and the modern materials (Mn, Ca, Cd) used to fill them.
  • Efficiency: The process was computationally efficient, taking approximately 35 seconds on a standard CPU.
  • Refined Analysis: By narrowing the input to four key elements (Fe, Co, Ni, As), NMF could even separate the original smalt into two distinct sub-groups, a task that previously required laborious manual scatter-plot analysis.

Conclusion and Future Directions

NMF proves to be a powerful tool for XRF data interpretation, providing physically meaningful results where PCA fails. By restricting the mathematical model to positive values, the algorithm naturally aligns with the chemical reality of the samples.

However, limitations remain. NMF's reliance on random initialization means results can vary between runs, requiring multiple iterations to ensure consistency. Future work should explore advanced NMF variants incorporating sparsity or convexity constraints to further improve the separation of highly similar compounds. Additionally, developing user-friendly graphical interfaces will be crucial for making these advanced Python-based tools accessible to the broader art conservation community.

Summary updated

BibTeX
@article{alfeld2014non,
  author = {Matthias Alfeld and Mirwaes Wahabzada and Christian Bauckhage and Kristian Kersting and Gerd Wellenreuther and Gerald Falkenberg},
  title = {{Non-negative factor analysis supporting the interpretation of elemental distribution images acquired by XRF}},
  journal = {Journal of Physics Conference Series},
  year = {2014},
  doi = {10.1088/1742-6596/499/1/012013},
}
Figure