Manuscript Offprint
arXiv:2611.01790Detection Instead of Inversion: T1-T2 Microstructure Quantification With Detection Transformers
ABSTRACT
T1-T2 correlation MRI has strong potential to quantify microstructural compartments without imposing a biological model. Traditionally, full T1-T2 spectra per voxel are reconstructed with an ill-conditioned and time-consuming Inverse Laplace Transform. We propose to view this challenge as an object detection task: A Detection Transformer (DETR) takes 64 T1/TE signals and directly predicts a set of compartments specified by T1, T2, and signal fraction. We achieve a mean average precision mAP@10 of 76.8% on simulated data, outperforming both our previous model design (53.8%) and regularized NNLS (66.1%). We show that our DETR approach outperforms NNLS in almost every setting across compartment count, compartmental signal fraction, and SNR. Reconstruction is orders of magnitude faster than NNLS.
The results are fully reproducible from our public code: github.com/SebastianEndtTHI/t1t2-detr
Index Terms— Magnetic Resonance Imaging, T1-T2 correlation imaging, multicomponent relaxometry, detection transformer, set prediction, inverse Laplace transform
1. INTRODUCTION
Magnetic Resonance Imaging (MRI) voxels contain a mixture of microstructural compartments, such as intra- and extracellular water, myelin water, and free water – each with distinct relaxation properties. Multidimensional correlation MRI, e.g., T1-T2 correlation imaging, can distinguish these compartments [1, 2, 3]. Conventionally, full multidimensional parameter spectra are reconstructed for each voxel. This ill-posed Inverse Laplace Transform (ILT) is usually solved using regularized NNLS algorithms.
Earlier work on diffusion correlation MRI showed that the quantification of microstructural compartments can be interpreted as an object detection task [4]. A detection transformer (DETR) [5] is used for end-to-end prediction of a set of compartments. The permutation invariance in this set prediction problem is solved with Hungarian matching [6].
In this work we
-
transfer the diffusion MRI DETR [4] to T1-T2 correlation MRI, with log-scaled T1/T2 targets, uniform compartment weighting, and other refinements.
-
systematically evaluate DETR against NNLS across compartment count, signal fraction, and SNR.
2.1. Signal simulation
We simulate inversion-recovery spin-echo data with varying inversion time T1 and echo time TE, i.e., a T1-T2 correlation imaging protocol sensitive to myelin water [7]. The protocol covers a total of 64 contrasts. The signal of a voxel with compartments is given as:
where is the compartment's signal fraction, or weight. The data set comprises between 1 and 4 with equal shares. All in a voxel contribute at least 5% and sum up to 1. Parameters are drawn from log-uniform distributions ms, ms, with .
Gaussian noise with random is added as , followed by normalization to .
Training, validation, and test data contain 200k, 25k, and 25k random voxels, respectively. Additionally, 5k voxels with , using one fixed noise pattern, yield 8 data sets differing only in noise amplitude to investigate SNR dependency.
2.2. Detection Transformer
The detection transformer (DETR) [5] is adapted from an earlier work on diffusion correlation MRI [4]. An MLP encoder compresses the 64 input signals into a hidden representation. A transformer decoder takes ten learned queries and has them cross-attend to these signals. Separate sigmoid-activated MLP prediction heads predict T1, T2, and signal fraction for each query. Existence scores for all queries are

Fig. 1. T1-T2 spectra of random test voxels with at SNR=40. Grayscale: NNLS spectrum; orange crosses: NNLS compartments; filled blue circles: DETR (ours); empty black circles: ground truth. Marker size represents signal fraction.
predicted jointly, taking all other queries into account. The model has learnable parameters.
Given an unordered set of predicted compartments, the assignment to ground truths is handled with Hungarian matching [6]. Then the loss is computed from mean squared errors of T1, T2 and signal fraction, and the binary cross entropy of the existence score. Existence loss is weighted with 0.1 compared to the other loss terms. AdamW optimizer learning rate starts at and is halved after 7 epochs without improvement. Training is stopped after 35 epochs without improvement; the checkpoint with the best validation mAP@10 is saved. The metric mAP@10 is the mean average precision, where a prediction matches if its deviations in and each lie within of the log parameter range [8, 9, 4]. The existence score threshold is chosen such that F1-score is maximized on validation data.
In our diffusion correlation proof-of-concept [4], parameters were scaled linearly, which is problematic for relaxation times, and both training loss and matching cost were weighted by signal fraction, underrepresenting small compartments. Therefore we compare two models:
- DETR (diff): linear parameter scaling ; Loss/cost weighted with signal fraction.
- DETR (ours): logarithmic parameter scaling (; Equal weighting of compartments in loss/cost.
Otherwise, both variants use the same architecture, training and data, including other refinements over [4].
2.3. NNLS baseline
Our approach is judged against a standard regularized NNLS algorithm. T1-T2 spectra are defined using a grid
within the same parameter ranges. Also obeying , this leaves 771 spectrum entries. Zero-order Tikhonov regularization is applied with respect to the criterion such that . Compartments are identified with hill climbing and surrounding entries are assigned to local maxima. Compartmental T1 and T2 are computed as the assigned entries' weighted geometric mean; compartmental signal fraction as their integral. The peak fraction serves as confidence; its threshold (0.1, best validation F1) only applies to strict accuracy.
2.4. Evaluation
All methods are evaluated on previously unseen test data and compared using the same metrics. In addition to mAP@10, we compute mAP@5 at . Strict accuracy denotes the fraction of voxels for which the number of compartments is predicted correctly and all predicted compartments satisfy the matching criterion. 95% confidence intervals are computed from a paired percentile bootstrap, over the same voxels for each method and using 1000 resamples.
3. RESULTS
Fig. 1 shows random spectra with , combining ground truth, NNLS spectrum and DETR prediction. Both methods identify large, well-separated compartments. DETR also detects smaller compartments, whereas these are less distinctly resolved by NNLS. NNLS spectra are generally broadened along ridges.
Fig. 2 shows agreement between all matched DETR compartments and the ground truth ( for , 0.952
Table 1. Quantitative results on 25,000 voxel test data. mAP@10 is additionally broken down for different numbers of compartments and compartmental signal fractions .
| Method | mAP@5 | mAP@10 | Strict | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| [%] | [%] | acc. [%] | 1 | 2 | 3 | 4 | < 0.35 | 0.35–0.65 | ≥ 0.65 | |
| NNLS | 43.3 | 66.1 | 40.5 | 99.0 | 78.2 | 62.1 | 51.4 | 42.8 | 82.6 | 93.3 |
| DETR (diff) | 25.6 | 53.8 | 39.4 | 98.5 | 74.0 | 50.1 | 39.2 | 33.2 | 73.2 | 93.8 |
| DETR (ours) | 49.2 | 76.8 | 49.0 | 98.9 | 89.8 | 77.4 | 64.6 | 60.8 | 91.9 | 98.0 |



Fig. 2. True vs. predicted (left), (middle), and signal fraction (right) for all matched DETR (ours) test compartments, colored by true signal fraction.
for , for ). Table 1 summarizes the quantitative results on 25,000 previously unseen test voxels. Our proposed DETR achieves a higher mAP@10 of 76.8% compared to 66.1% for NNLS and 53.8% for the diffusion design. At the stricter , the mAP decreases to 49.2%, 43.3% and 25.6%, respectively. Strict accuracy rises from 40.5% using NNLS to 49.0% using our DETR.
In single-compartment voxels, all methods show comparably high performance. For multi-compartment voxels, which constitute the clinically interesting cases, our DETR outperforms NNLS by +11.6pp (percentage points) for , +15.3 pp for , and +13.3 pp for . The largest improvement is observed for small compartments (), where our DETR achieves an mAP@10 of 60.8%, compared with 42.8% for NNLS and 33.2% for the diffusion design. For medium and large compartments we still outperform the other methods.
Fig. 3 shows mAP@10 and strict accuracy across the paired SNR data sets. Across SNRs from 10 to 200, our DETR model outperforms NNLS, most prominently for SNR of 40–80 with an increase of +11.3 pp and +11.0 pp in mAP@10, respectively. This benefit lies well beyond the confidence intervals. At low SNR of 5, which was not included in the training data, NNLS outperforms DETR. For very high SNR, our model seems to plateau (82.8% at SNR=120, 85.3% without noise), while NNLS reaches up to 95.0% mAP@10 in noise-free data. The diffusion design converges towards 59%. Strict accuracy yields similar re-
sults, with our proposed DETR method outperforming the other methods across SNRs from 10 to 200.
With an inference time of 0.018 ms per voxel on an NVIDIA A100 (MIG with 40GB), DETR is about times faster than NNLS (147 ms per voxel on a single AMD EPYC 7763 CPU core).
4. DISCUSSION
With the introduction of object detection principles to the field of correlation MRI, we propose a potential paradigm shift: While current approaches for spectra reconstruction, like NNLS, reconstruct a full spectrum, we translate the signals directly into a set prediction of compartments.
In voxels with more or smaller compartments, the regularization in NNLS merges similar compartments, and small compartments are lost in broad peaks.
Comparison with our initial design from diffusion correlation MRI shows that the methods do not translate one-to-one from one modality to another. The logarithmic parametrization and equal weighting of compartments in losses improve mAP@10 by 23 pp. The gain concentrates on small compartments, where the diffusion design falls behind even NNLS. A separate ablation of parametrization and weighting was omitted due to space limitations.
DETR is superior within its training SNR range. In noise-free data, it plateaus while model-based NNLS keeps improving; at SNR=5, outside the training range, NNLS is also

Fig. 3. mAP@10 (top) and strict accuracy (bottom) vs. SNR on 5000 voxels with identical noise pattern. Shaded: bootstrap 95% CIs; gray: training SNR range.
slightly better, although earlier work suggested deep learning to be more robust to noise [10]. Whether a broader training distribution helps is left for future work.
The study is subject to limitations: All data was simulated with Gaussian noise, due to the real-valued signals, and without considering field inhomogeneities, incomplete inversions, exchange, or magnetization transfer. The training follows a specific measurement protocol and would have to be retrained for different acquisition parameters. Finally, the test on in vivo data is the subject of ongoing work.
5. CONCLUSION
This study interprets the microstructure quantification with T1-T2 correlation imaging as an object detection task, using a Detection Transformer. Compared to traditional spectra reconstruction with NNLS we reach better results (mAP@10 of 76.8% vs. 66.1%) and are orders of magnitude faster.
6. COMPLIANCE WITH ETHICAL STANDARDS
This is a numerical simulation study for which no ethical approval was required.
7. ACKNOWLEDGMENTS
No funding was received for this study. The authors have no relevant interests to disclose. Claude (Anthropic) assisted with code development, text editing and layout. All content was verified by the authors.
8. REFERENCES
[1] A. E. English, K. P. Whittall, M. L. G. Joy, and R. M. Henkelman, “Quantitative two-dimensional time correlation relaxometry,” Magn. Reson. Med., vol. 22, no. 2, pp. 425–434, 1991. [2] D. Benjamini and P. J. Basser, “Multidimensional correlation MRI,” NMR Biomed., vol. 33, no. 12, 2020. [3] P. J. Slator et al., “Combined diffusion-relaxometry microstructure imaging: Current status and future prospects,” Magn. Reson. Med., vol. 86, no. 6, pp. 2987–3011, 2021. [4] S. Endt, M. Wirth, J. R. Schlund, and M. I. Menzel, “Fiber-Resolved Microstructure Quantification from Multi-Shell Diffusion MRI using Detection Transformers,” in Proc. MICCAI Int. Workshop Comput. Diffusion MRI (CDMRI), 2026. [5] N. Carion, F. Massa, G. Synnaeve, N. Usunier, A. Kirillov, and S. Zagoruyko, “End-to-End Object Detection with Transformers,” in Proc. Eur. Conf. Comput. Vis. (ECCV), 2020, pp. 213–229. [6] R. Stewart, M. Andriluka, and A. Y. Ng, “End-to-End People Detection in Crowded Scenes,” in Proc. IEEE Conf. Comput. Vis. Pattern Recognit. (CVPR), 2016, pp. 2325–2333. [7] S. Endt et al., “In Vivo Myelin Water Quantification Using Diffusion-Relaxation Correlation MRI: A Comparison of 1D and 2D Methods,” Appl. Magn. Reson., vol. 54, no. 11, pp. 1571–1588, 2023. [8] M. Everingham, L. Van Gool, C. Williams, J. Winn, and A. Zisserman, “The Pascal visual object classes (VOC) challenge,” Int. J. Comput. Vis., vol. 88, pp. 303–338, 2010. [9] T.-Y. Lin et al., “Microsoft COCO: Common Objects in Context,” in Proc. Eur. Conf. Comput. Vis. (ECCV), 2014, pp. 740–755. [10] S. Endt, C. M. Pirkl, C. Mayrink Verdun, B. H. Menze, and M. I. Menzel, “Unmixing tissue compartments via deep learning T1-T2-relaxation correlation imaging,” in Proc. 17th Int. Symp. Med. Inf. Process. Anal. (SIPAIM), 2021, vol. 12088 of Proc. SPIE, pp. 218–227.