From buzzing molecules in a cell to the swings of a stock price, many things in nature move in ways that defy the neat, predictable rules of simple diffusion. Scientists know that different hidden mechanisms can produce these unusual paths, but figuring out which one is at work from a short, noisy track is hard. This study shows how modern artificial intelligence can not only sort these wandering paths into types, but also reveal which parts of each path matter most for its decision.
Strange motion all around us
In textbooks, random motion is often pictured as a drunkard’s walk, where the average spread of positions grows steadily over time. Real-life motion is rarely so well behaved. In living cells, social systems, and financial markets, the spread of positions can grow faster or slower than expected, a behavior known as anomalous diffusion. Physicists have built many mathematical models to explain this, from walks with long waits to paths with long memory. Yet when they look at a single recorded trajectory, these models can be hard to tell apart, especially when only a short time window is available and the data are noisy.
Teaching a neural network to read paths
Building on recent work in the Anomalous Diffusion (AnDi) challenge, the authors design a deep learning tool called ResAnDi to classify motion paths. ResAnDi is based on a popular image-recognition architecture known as a residual network, adapted to handle time series of two-dimensional positions instead of colored pixels. It is trained on simulated trajectories from eight different motion mechanisms, including standard Brownian motion and several subdiffusive and superdiffusive variants. After passing a trajectory through 18 stacked processing layers, the network outputs the probabilities that the path came from each mechanism, reaching accuracy comparable to the top entries in the AnDi challenge even though it must distinguish more classes.
Shining a spotlight on key moments Figure 1. How AI reads wandering particle paths to sort different types of strange motion
Deep learning systems are often criticized as black boxes, since they may give the right answer without showing how they reached it. To open this box, the authors apply a technique from explainable AI known as Grad-CAM, which assigns a “relevance score” to different portions of an input. Adapted here, Grad-CAM highlights segments of a trajectory that most influence ResAnDi’s final choice. The team tests whether these scores reflect real information by selectively erasing parts of trajectories. When they flatten the segments with the highest Grad-CAM scores, classification accuracy drops much more than when equally large random segments are erased. This shows that the network has learned to rely on specific, informative stretches of motion, which often correspond to rare but telling fluctuations.
Using explanations to fight noise and find patterns Figure 2. How an AI heatmap highlights the most informative segments of a noisy particle path
The Grad-CAM scores also suggest a smarter way to expand the training data. Instead of randomly augmenting trajectories, the authors focus on those whose segments tend to have high relevance scores, rotate them, and add them to the training pool. When they then test the network on noisy trajectories, this targeted augmentation makes the classifier consistently more robust than standard random augmentation, especially when measurement noise is strong. To understand what the network has really learned, the team studies its internal layers and relates the Grad-CAM scores to simple statistics of the motion, such as how successive steps are correlated, how much the direction changes, how strongly the step sizes deviate from a bell curve, and how the effective “spreading rate” varies over time. Different mechanisms show distinct fingerprints in how strongly these statistics align with high Grad-CAM scores.
Peeking inside the AI’s reasoning
By combining performance tests, visualizations, and careful statistical checks, the study paints a coherent picture of how a deep network decodes complex motion. Early layers focus on very local features, like whether steps tend to reverse or persist, while deeper layers capture slower trends, such as gradual changes in how widely the particle roams. Grad-CAM acts as a bridge between these hidden computations and human intuition, indicating which segments of a path and which types of patterns are most informative. For non-experts, the main takeaway is that AI can be taught not only to label tricky particle motions with high accuracy, but also to point to the specific parts of the data that support its verdict, paving the way for more transparent and noise-resistant analysis of complex movement in physics, biology, and beyond.
Citation: Bae, J., Baek, Y. & Jeong, H. Exploring how deep learning decodes anomalous diffusion via Grad-CAM.
Nat Commun17, 4575 (2026). https://doi.org/10.1038/s41467-026-71229-x