SmartBloch-Agent: An Agentic Framework for Automated MRI Sequence Design and Optimization
Organizations: School of Electronic Science and Technology, Xiamen University, Xiamen 361005, China · Department of Radiological Sciences, University of California Irvine, Irvine, CA 92697, United States of America
Abstract
Magnetic resonance imaging (MRI) pulse sequences organize radiofrequency excitation, gradient encoding, and signal acquisition, determining magnetization evolution and image formation. Sequence research requires translating imaging objectives into executable protocols meeting physical and acquisition constraints, refined via physical simulation, signal reconstruction, and scientific evaluation. Sequence construction, physical verification, parameter search, and assessment involve many tools and manual decisions, limiting automation from objective to verifiable sequence. We develop SmartBloch-Agent, an integrated framework for automated MRI sequence design and optimization. Given objectives and scientific constraints in natural language, an AI agent interprets goals, plans tasks, orchestrates tools, and makes feedback-informed decisions, drawing on a construction module and optimizers for structural design and parameter search. Our GPU-accelerated SmartBloch engine supplies physical computation for both stages, so the framework configures, per sequence and objective, event validation, Full-Bloch magnetization evolution, signal acquisition, image reconstruction, and scientific evaluation, and closes the loop without external MRI simulators. Results return to the agent to guide sequence revision, parameter optimization, and candidate selection, and the design files carry simulation, reconstruction, and evaluation evidence, forming an output package for a real-scanner workflow. Experiments show the framework automatically designs and optimizes MRI sequences for varied objectives and constraints, refines candidates with physical feedback, and improves several parameter-estimation metrics and downstream quantitative reconstruction. SmartBloch-Agent unifies objectives, design, physical execution, and evaluation into a continuous workflow for end-to-end automation of MRI sequence research.
Figures & tables
| Representative work | Main task | Physical execution and feedback | Decision and search approach |
|---|---|---|---|
| Pulseq (2017) [ 6 ] | Event representation and sequence prototyping | Scanner-side interpretation and execution | Researcher-led design and programming |
| MRzero (2021) [ 10 ] | Joint sequence and reconstruction design | Differentiable Bloch model and experimental validation | Gradient-based optimization |
| MR-double-zero (2022) [ 13 ] | Target contrast search | Measured scanner feedback | Automated derivative-free search |
| KomaMRI (2023) [ 7 ] | General MRI numerical simulation | CPU/GPU physical solvers and reconstruction | Simulation platform |
| GPT4MR (2024) [ 16 ] | Sequence and reconstruction code assistance | Domain prompting and interactive checks | Human–AI collaborative programming |
| SeqGPT (2025) [ 20 ] | Sequence-structure generation (conference abstract) | Reported simulation of generated sequences | Generative model |
| Phase-encoding layout | Outside energy (%) | CSF/GM contrast | GM/WM contrast |
|---|---|---|---|
| Original A3 | 1.40180 | 0.44858 | 0.11669 |
| Contiguous bands, center at shot 0 | 0.24577 | 0.45128 | 0.07250 |
| Contiguous bands, center at shot 16 | 0.04083 | 0.50198 | 0.06021 |
| Workflow | Human effort (min/task) | End-to-end time (min/task) |
|---|---|---|
| SmartBloch-Agent | ||
| Fixed workflow | ||
| Manual coordination |
| Metric | Reference sequence | Optimized sequence | Mean change | Improved samples |
|---|---|---|---|---|
| MAE (ms) | 5.690 | 5.196 | 60/64 | |
| RMSE (ms) | 11.097 | 10.368 | 53/64 | |
| PSNR (dB) | 31.201 | 31.820 | dB | 53/64 |
| Masked SSIM | 0.9361 | 0.9471 | 64/64 | |
| Pearson | 0.9732 | 0.9778 | 55/64 |
| Workflow | Human effort (h/study) | Research coordination |
|---|---|---|
| SmartBloch-Agent | Autonomous | |
| Fixed workflow | Predefined checkpoints | |
| Manual coordination | Manual feedback-driven revision |
| RF condition | Cases (echoes) | Maximum complex absolute error | Prespecified tolerance |
|---|---|---|---|
| Instantaneous RF | 27 (216) | ||
| Finite-duration RF | 9 (72) |
| Sequence | MRiLab | SPROM | In-house CUDA implementation | Speedup vs. MRiLab |
|---|---|---|---|---|
| GRE | 10.220 | 192.320 | 0.820 | |
| Single-shot GRE-EPI | 11.442 | 29.812 | 0.466 | |
| Multishot GRE-EPI | 15.620 | 32.410 | 0.512 |
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| Instance | Research subject and final selection | Main evaluation | Evidence location |
|---|---|---|---|
| A: FSE design | Agent revisions A1–A3; additional banded-order comparison based on A3 | Timing, tissue contrast, outside-support energy, same-backend replay | Main Section 4.1; Supplement S5 |
| B: Archived multiobjective optimization | SSFP-MOLED, LLM candidate #353 | Six local uncertainty measures, scientific eligibility, 17-scenario replay | Main Section 4.2; Supplements S2–S3 |
| C: -specific study | Optuna candidate #186 from the same SSFP-MOLED archive | sensitivity and 64 paired reconstructions | Main Section 4.2; Supplement S5 |
| D: Extension tasks | GRE and SE with numerical-search/agent-assisted configurations | Contrast–time trade-offs and replay | Supplement S4 |
| SmartBloch simulation engine | CUDA computation and independent double-precision reference | Single-voxel complex error and selected spatial integration tests | Main Section 4.3; Supplement S6 |
| Parameter | Unit | Scale | Step |
|---|---|---|---|
| Relative magnetization | |||
| s | |||
| s | |||
| s | |||
| Hz | |||
| Dimensionless |
| Metric | Direction | Absolute criterion | Allowed degradation |
|---|---|---|---|
| Six values | Lower is better | Each | |
| Condition ratio | Lower is better | ||
| Minimum singular value | Higher is better | ||
| Maximum parameter correlation | Lower is better | ||
| Echo balance | Higher is better | ||
| Robustness loss | Lower is better |
| Metric | Fixed reference | Selected candidate | Relative change (%) |
|---|---|---|---|
| 0.002310443 | 0.002312405 | +0.0849 | |
| 0.006564837 | 0.006208974 | -5.4207 | |
| 0.003369154 | 0.003051537 | -9.4272 | |
| 0.005667921 | 0.005340107 | -5.7837 | |
| 0.0001120633 | 0.0001041838 | -7.0313 | |
| 0.001094844 | 0.0008834532 | -19.3078 |
| Configuration/seed | FA ( ∘ ) | TR (ms) | TE (ms) | Contrast | Duration (s) | Outcome |
|---|---|---|---|---|---|---|
| N/11 | 20.000 | 30.000 | 5.000 | 0.02314551 | 7.920 | Eligible/replay passed |
| A/11 | 30.000 | 15.000 | 4.500 | 0.01387110 | 6.960 | Eligible/replay passed |
| N/23 | — | — | — | — | — | Timing rejected |
| A/23 | 27.368 | 16.812 | 7.441 | 0.01480514 | 7.081 | Eligible/replay passed |
| N/37 | 44.058 | 58.026 | 6.566 | 0.03297491 | 9.747 | Eligible/replay passed |
| A/37 | 40.000 | 55.000 | 9.500 | 0.02924808 | 9.570 | Eligible/replay passed |
| Configuration/seed | TR (ms) | TE (ms) | Contrast | Duration (s) | Outcome |
|---|---|---|---|---|---|
| N/11 | 550.153 | 68.168 | 0.02616991 | 41.262 | Eligible/replay passed |
| A/11 | 550.153 | 68.168 | 0.02616988 | 41.262 | Eligible/replay passed |
| N/23 | 669.522 | 71.939 | 0.03671176 | 48.875 | Eligible/replay passed |
| A/23 | 669.522 | 71.939 | 0.03671179 | 48.875 | Eligible/replay passed |
| N/37 | 931.679 | 82.381 | 0.06287580 | 66.149 | Eligible/replay passed |
| A/37 | 931.679 | 82.381 | 0.06287582 | 66.149 | Eligible/replay passed |
| Phantom | CSF/GM | GM/WM | Magnitude | Complex replay relative |
|---|---|---|---|---|
| Brain01 | 0.44858 | 0.11669 | 0.48981 | |
| Brain02 | 0.43341 | 0.11462 | 0.47585 | |
| Brain03 | 0.42887 | 0.16109 | 0.49270 |
| Objective | Eligible and replay passed | Mean candidates | Mean native evaluations | Mean end-to-end time (min) |
|---|---|---|---|---|
| Tissue contrast | 3/3 | 1.00 | 2.00 | 25.93 |
| Scan time | 3/3 | 2.00 | 3.00 | 34.24 |
| RF resources | 3/3 | 1.00 | 2.00 | 46.83 |
| Spatial leakage | 3/3 | 1.00 | 2.00 | 70.87 |
| Setting | FSE design | SSFP-MOLED optimization |
|---|---|---|
| Model and interface | deepseek-v4-flash ; OpenAI-compatible function calling | deepseek-v4-flash ; OpenAI-compatible function calling |
| Model parameters | API defaults, no additional overrides | API defaults, no additional overrides |
| Model retries / tool rounds | 1 retry / 1 round | 2 retries / 2 rounds |
| Prompt and response records | Full prompts and raw responses | Prompt hashes and raw responses |
| Numerical random seeds | Fixed task seeds for Python, NumPy, and CUDA (2026101901–2026101903) | Fixed Optuna sampler seed 6303 for numerical search |
| Budget item | Repeated FSE design | SSFP-MOLED |
|---|---|---|
| Native search candidate budget | At most 4 initial candidates per task | 200 candidates |
| Compile-only rejection budget | At most 8 | Counted toward total candidate budget |
| Model decision budget | 16 | 200 |
| Model retries / tool rounds | 1 retry / 1 round | 2 retries / 2 rounds |
| Candidate retries | 0 | 1 |
| Independent final replay | 1 | 1 |
| Research objective | SmartBloch-Agent (min) | Fixed workflow (min) | Manual coordination (min) |
|---|---|---|---|
| Tissue contrast | 25.93 | ||
| Scan time | 34.24 | ||
| RF resources | 46.83 | ||
| Spatial leakage | 70.87 | ||
| Mean | 44.47 |
| Stage | Scenarios | Cumulative time (h) | Mean time per scenario (s) |
|---|---|---|---|
| F0 | 192 | 0.205 | 3.84 |
| F1 | 736 | 1.431 | 7.00 |
| F2 | 207 | 296.626 | 5158.71 |
| Recorded total | 1135 | 298.707 | 946.03 |
| Research activity | Fixed workflow (h) | Manual coordination (h) |
|---|---|---|
| Research planning | ||
| Feedback analysis and strategy adjustment | ||
| Final selection and verification | ||
| Total |
| Item | Setting |
|---|---|
| Network | R2AttUNet; 10 input channels, 1 output channel; 16 base filters; 2 recurrences; 1,485,709 parameters |
| Output and loss | Softplus output; foreground masked L1 times background masked L1 |
| Optimizer | AdamW; learning rate ; weight decay ; batch size 4 |
| Training procedure | Up to 150 epochs; checkpoint selected by validation MAE; early stopping after 25 epochs without improvement |
| Learning-rate schedule and gradients | ReduceLROnPlateau, factor 0.5, patience 8; gradient clipping 5 |
| Reproducibility setting | Seed 20261014; FP32; RTX 2080 Ti; PyTorch 2.1.2+cu118 |
Magnetic Resonance Imaging
Magnetic resonance imaging uses magnetic fields and radio waves to create images of anatomy and tissue function for research and clinical care.
See all 267 papers