Sandpaper + Machine Learning = Better X-ray Images

Scrambling an X-ray beam with sandpaper speeds imaging chemistry

3 min read

Various sandpapers are laid out in a geometric pattern
iStock

To build a better battery, you might start by improving the materials inside. Researchers often do that by first inspecting new materials and chemicals with high-powered X-rays from a synchrotron. But that’s a slow and tedious process. A surprising solution to speeding things up has recently emerged—sandpaper.

“The major motivation actually is trying to overcome the limitations of the traditional chemical imaging approach,” says Jizhou Li, an engineer at City University of Hong Kong and one of the researchers behind the work.

The sandpaper slots into the X-ray beam’s pathway, scrambling the illumination pattern it casts upon the material under investigation. After the X-rays pass through the sample, a machine-learning model uses both the sandpaper-scrambled pattern and the resulting image to reconstruct the sample’s chemical structure. This sandpaper-enhanced setup may let researchers attain that valuable chemical resolution rather more quickly.

Li and his colleagues worked with an X-ray beam in the SSRL synchrotron at SLAC National Accelerator Laboratory in Menlo Park, Calif. They collected two types of imaging data: A charge-coupled device detector captured a two-dimensional image of a sample’s structure from the X-rays that pass through it, and a second detector measured the sample’s fluorescence—the secondhand X-rays emitted by atoms excited by the beam.

This two-pronged approach is fairly common in X-ray imaging. Researchers can use a sample’s fluorescence signal to probe the chemical elements inside the sample. But because a fluorescence signal has only one dimension instead of an image’s two, it can be slow and inefficient to collect it. For instance, say you want to use X-rays to reconstruct the chemical composition across a sample to form a 2D image. You might have to individually focus the X-ray beam, point by point, or raster-scan it across the sample.

Li’s team discovered that sandpaper can solve this slowdown. The researchers modified the beam setup by sliding two sandpaper diffusers between the X-ray source and the sample. The sandpaper’s grit turns an X-ray beam into a nebula-like X-ray smear.

The first step of the setup’s computational side, then, is to build a pixel-by-pixel estimation of what that smear pattern should be. Then a 2D smeared-X-ray image of the sample is taken, along with the one-dimensional fluorescence signal—no rastering needed. The next stage is where self-supervised machine learning enters the picture, quite literally. The researchers feed the 2D image, the sandpaper-scrambled illumination pattern, and the 1D fluorescence signal into a neural network. The network then predicts the fluorescence signal at each pixel to generate a map of the elemental composition in the image. The researchers compare the process to enhancing blurry faces in a group photo.

A diagram showing the setup from CCD detector to synchrotron.X-rays generated by a synchrotron pass through two pieces of sandpaper (diffusers 1 and 2) on their way to illuminating a sample material. A machine-learning system [top right] combines the signals from the X-rays to produce a pixel-by-pixel prediction of the sample’s chemical nature.University of Texas at Austin/Proceedings of the National Academy of Sciences

Seeing battery chemistry and more

The sandpaper is a critical part of their algorithm. To piece together the chemical image, the machine-learning model relies on the pseudorandom patterns the sandpaper casts on the sample to create what are called structured X-rays. “We can make use of the randomness,” Li says. By swapping in different slides of sandpaper with different grit sizes, researchers can create different illumination patterns and image the same sample multiple times.

Li and his colleagues tested the technique on a battery sample. This battery’s cathode was a potpourri of three different lithium-containing materials. But the sandpaper trick picked out nanoscale particles of each of the three.

Li says his own prior experience with studying batteries motivated the researchers to use a battery for a proof of concept. He believes that the technique can pick out not just elements but likely also their oxidation states, which makes it optimal for imaging a battery. He adds that the technique has plenty of other uses: biomedical research, for instance, which uses synchrotron X-rays to image cells, tissues, and more.

The structured X-ray method is an example of how researchers can apply computation to create better imaging without significantly changing the colossal and costly underlying infrastructure that generates X-rays. Li wants to make the technique more accessible to scientists by testing the technique using laboratory-scale X-ray sources instead of rare bright synchrotrons like SLAC.

“Right now, we implemented it in a synchrotron setting, because synchrotron light is very powerful,” says Li. “In principle, this setup could be applied to laboratory X-ray sources as well.”

The researchers published their work in Proceedings of the National Academy of Sciences on 28 November. They posted their code to GitHub.
The Conversation (1)
Lance Doyle
Lance Doyle18 Jan, 2024
INDV

Something important that is not mentioned in the article is the chemistry of the sandpaper must be subtracted from the spectrum. A very well issue when preparing samples for XRF is that you can't use an arbitrary surfacing media to flatten/clean the samples. A common error is to use aluminum oxide paper which leaves a huge aluminum peak in the spectrum. You have to really think the process through.