Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Dx-Rx: An MRI Agent That Measures Artifacts Before Fixing Them

Before and after frames from the project-page video of arXiv:2611.03996 by Necati Sefercioglu, Mehmet Ozan Unal, Metin Ertas, Altan Cakir and Isa Yildirim: sagittal, coronal and axial slices of IXI test volume t0145 with simulated bias field, spike and noise, and the volume returned by the Dx-Rx agent.

A brain MRI that comes back with noise, a spike stripe and uneven shading rarely tells you which of those it has. Most deep-learning restoration models are trained to fix one known artifact, so someone has to decide first what is wrong. In arXiv:2611.03996, Necati Sefercioglu, Mehmet Ozan Unal, Metin Ertas, Altan Cakir and Isa Yildirim from Istanbul Technical University describe Dx-Rx, an agent that measures each suspected artifact with a dedicated tool before it repairs anything, works on the whole 3D volume, and ends with a radiology-style report that is checked against its own run log.

The language model never touches the pixels. It reads numbers and pictures from classical tools, decides what to run and in what order, and writes up what it did.

What the agent does

Dx-Rx receives one 3D T1-weighted brain volume (192 x 240 x 240 at 1 mm) and nothing else: no clean scan, no artifact labels, no file name. Its system prompt states the task, the phase-encoding direction (anterior to posterior) and the fact that motion cannot be repaired. A multimodal large language model then works through eleven tools, each acting on a numbered version of the volume (v0 is the input).

  1. Look and compare. “Look” returns 2D slices of a version so the model can see it. “Compare” returns the difference between two versions and its root mean square.
  2. Five diagnostic tools. Noise (standard deviation in flat tissue), spike (isolated bright points in k-space), ghosting (faint copies of the head along the anterior-posterior axis), bias field (an N4 fit inside an HD-BET brain mask) and motion (head signal leaking into the air along the phase-encoding axis). Each returns present or absent, a value, a confidence, a reason and a picture of its evidence.
  3. Four restoration tools. Remove spikes in k-space, put back the signal that ghosting displaced, denoise with DRUNet at the measured noise level slice by slice along each axis and average the three results, and divide out the N4 bias field. Each repair runs its diagnostic tool before and after and returns the new answer, so the model sees whether the artifact is gone.
  4. Keep every version. Every repair creates a new version and none is overwritten. The model can measure a repair again, compare two versions, or go back to an earlier one and try a different order.
  5. Finish with a report. The run ends with a chosen version and a report under radiology headings: findings per artifact (present, absent or uncertain, with the measured evidence), what was done and why, impression and recommendation, including whether to rescan.

Nothing is trained. The tools are classical methods or published weights, each with one threshold and one scale set on development volumes. Motion has no repair tool. The agent advises a rescan when the motion tool returns 0.033 or more, the level at which a motion-corrupted scan in the MR-ART dataset was as likely to be graded unusable by radiologists as usable.

Why the report gets checked

A language model can describe steps it never took. The authors check every report against the run log with three deterministic rules: the repairs listed must match the history of the returned version, every number in the text must have been returned by a tool, and the written findings must agree with the model’s own yes or no answers. A report that passes all three counts as faithful. With GPT-6.1 Terra, 97.3 % of the 148 reports passed. Claude Sonnet 5.5 wrote the most faithful reports, 147 of 148.

What comes out of it

The featured image shows test volume t0145 from the authors’ project-page video, viewed in ITK-SNAP with the same gray window: the input with a simulated bias field, spike and noise on top, the volume Dx-Rx returned below, in all three planes. The input carries a simulated bias field (borderline), spike (mild) and noise (moderate), at the levels used in the paper. On this volume Dx-Rx removed 78.9 % of the artifact error, a selected example above the test-set average.

Fig. 3 in the paper shows why the loop helps. On a volume with a spike and ghosting, the agent first ran the standard order, spike then ghosting, and ghosting remained even after two more tries. It went back to the input, removed the ghosting first and then the spike, and reached 96.5 % of the error removed against 47.7 % for the fixed order. The report explains why it changed course.

Where it would sit in a workflow

Dx-Rx works on reconstructed magnitude volumes, so unlike k-space methods it can run on the images a PACS already holds, once the series is converted to a 3D volume. The natural place is a QA or preprocessing step: run it on incoming 3D T1 studies, store the restored volume as a separate series next to the original, attach the report, and route the rescan flag to the technologist while the patient may still be on site. The report format suits a viewer side panel, since every number in it traces back to a tool call.

Running cost is small. Mean cost per volume ranged from $0.002 with GPT-6 Luna to $0.035 with Claude Sonnet 5.5, and $0.017 with GPT-6.1 Terra. The open-weights Qwen 3.8-27B removed 63.1 % of the error, so a hospital can keep the whole loop on site.

How they tested it

The test set is 148 IXI T1-weighted volumes from three London hospitals (1.5 T and 3 T), with zero to five artifacts each, simulated in physical order on the whole volume. Artifact levels (mild, moderate, borderline) were calibrated to 60 real motion scans from MR-ART that radiologists had graded. The score is the share of the input’s artifact error that a method removes inside the brain, reported over the 138 volumes that have a repairable artifact.

  • Running all four repairs on every volume removed 52.1 % and made 11 volumes worse.
  • An expert rule-based pipeline, which runs a repair only when its diagnostic tool says yes, in a fixed order, removed 62.3 % and made none worse.
  • Dx-Rx with GPT-6.1 Terra removed 64.5 % and made none worse. It was better than the rule-based pipeline on 8 volumes and never worse.
  • The same tools told the true artifacts (the oracle) removed 64.6 %.
  • A model that only looks at the slices once and names the repairs, as earlier MRI agents do, removed at most 19.7 %.

Giving the single-pass model the diagnostic tools’ results brought it close to Dx-Rx, though still below it, so the diagnostic tools carry most of the gain, and the loop adds the ability to check a repair and change the order. In 18 test runs Dx-Rx repaired ghosting before the spike, against the fixed order, and those runs beat the oracle 16 times and were never worse.

Where it falls short

  • Simulated artifacts only. All five artifacts are simulated on clean IXI scans. Levels are calibrated to real graded scans, but no real multi-artifact clinical scan is restored in the paper.
  • One sequence. The tools and thresholds are set for 3D T1-weighted brain MRI with a known phase-encoding direction. Other contrasts, 2D multislice protocols and other anatomy would need new tools and thresholds.
  • The tools set the ceiling. Even with a perfect diagnosis the repairs leave about a third of the error. A better agent cannot fix what the restoration tools cannot.
  • No motion repair. Motion is measured and turned into a rescan recommendation, which is useful at the scanner but does not recover the scan.
  • Small margins. The gap to the rule-based pipeline is about two points on average, and with most models Dx-Rx gave the same result as the pipeline on at least 112 of 138 volumes. The case for the agent is flexibility and the report as much as the number.

Code, weights and license

The code is public at github.com/itu-biai/measure-before-you-repair under the MIT license, with the artifact simulation, the diagnostic and restoration tools, the agent loop, the compared methods and the scoring. It calls models through OpenRouter, so you need a key, and it downloads the DRUNet weights from the KAIR release and HD-BET weights on first use. The IXI scans (CC BY-SA 3.0) are not included, and the project-page video frames in the featured image are shared under CC BY-SA 3.0. A project page with the before and after video and a full report is at itu-biai.github.io/measure-before-you-repair. The preprint is released under CC BY 4.0. For related reading, see our posts on training-free motion correction for 3D brain MRI, artifact grading for portable neonatal brain MRI and radiology AI agents on real DICOM workflows.

My take

I like the split of work here. The classical tools do the image processing, the language model does the scheduling and the paperwork, and a deterministic check stops it from inventing findings. That design is easy to audit, cheap to run and portable to an on-site model. The numbers come from simulated artifacts on one sequence, so I would treat it as a strong pattern for a QA step rather than a ready product, and test it on your own failed scans before trusting the rescan flag.

We build custom medical imaging platforms — advanced DICOM viewers, AI segmentation, and the clinical systems around them.

Get in Touch

Copyright © 2026 PYCAD. All Rights Reserved.