Abstract
One area of medical imaging that has recently experienced innovative deep learning advances is diffusion MRI (dMRI) streamline tractography with recurrent neural networks (RNNs). Unlike traditional imaging studies which utilize voxel-based learning, these studies model dMRI features at points in continuous space off the voxel grid in order to propagate streamlines, or virtual estimates of axons. However, implementing such models is non-trivial, and an open-source implementation is not yet widely available. Here, we describe a series of considerations for implementing tractography with RNNs and demonstrate they allow one to approximate a deterministic streamline propagator with comparable performance to existing algorithms. We release this trained model and the associated implementations leveraging popular deep learning libraries. We hope the availability of these resources will lower the barrier of entry into this field, spurring further innovation.
Introduction
Mapping the brain’s white matter "wiring"—the pathways that connect different functional regions—is a cornerstone of modern neuroscience. Diffusion MRI (dMRI) allows us to non-invasively estimate these pathways through tractography. Traditionally, this process relies on mathematical algorithms that follow water diffusion directions step-by-step. Recently, Recurrent Neural Networks (RNNs) have emerged as a powerful tool to learn these pathways directly from data.
However, implementing RNN-based tractography is notoriously difficult. Unlike standard image-processing AI that operates on fixed voxel grids, tractography models must predict sequences of points in continuous 3D space. This creates significant technical challenges regarding data bookkeeping, variable streamline lengths, and efficient GPU utilization. This paper provides a practical blueprint for building these models and introduces STrUDeL, an open-source framework designed to standardize deep learning tractography.
Technical Implementation Hurdles
The authors identify and solve four specific technical hurdles essential for successful RNN tractography:
- Coordinate Systems and Loss Functions: To prevent the network from "cheating" by varying step lengths, the model predicts directions in spherical coordinates (angles) rather than Cartesian coordinates. A cosine similarity loss is employed to compare predicted directions against ground truth data.
- Differentiable Trilinear Interpolation: Because streamlines move through continuous space, the model must sample MRI data at points that do not align with voxel corners. The authors implement a differentiable trilinear interpolation method, ensuring that error signals can propagate back to the original MRI grid during training.
- Efficient Batching with Padded Packed Tensors: Streamlines vary significantly in length. To optimize GPU training, the framework utilizes PyTorch’s "packed" sequences, allowing the system to process multiple streamlines of varying lengths simultaneously without wasting memory on padding.
- Point-wise Parallelization: During the inference phase, the model is designed to advance all streamlines in a batch by a single step concurrently, rather than completing one streamline at a time, significantly increasing generation speed.
Results and Performance
The RNN-based propagator, featuring 4.2 million parameters and Gated Recurrent Units (GRUs), was trained using data from the Human Connectome Project (HCP) to approximate the SDStream algorithm, a standard deterministic reference.
As shown in the qualitative results, the RNN successfully recovers major white matter structures, such as the arcuate fasciculus, with a high degree of similarity to both the reference SDStream and probabilistic methods like iFOD2. Quantitatively, the median Dice coefficients—a measure of spatial overlap—demonstrate that the deep learning approach achieves performance parity with traditional algorithms, proving its robustness across different subjects.
Discussion and Future Directions
While this implementation successfully approximates deterministic tractography, several avenues for future work remain. Currently, the model predicts the single most likely next step; moving toward probabilistic tractography would require incorporating architectures like Variational Autoencoders (VAEs) or Mixture Density Networks to account for uncertainty. Additionally, future iterations could benefit from anatomical priors to ensure streamlines do not traverse biologically impossible areas, such as bone or cerebrospinal fluid.
By releasing the STrUDeL framework, the authors aim to move the field toward a reproducible community standard, lowering the barrier for entry into deep learning-based brain mapping.
Summary updated