Exploring GPT-4 as MR Sequence and Reconstruction Programming Assistant - Zaiß, Moritz; Rajput, Junaid Rasool; Dang, Hoai Nam; Golkov, Vladimir; Cremers, Daniel; Knoll, Florian; Maier, Andreas (Bildverarbeitung für die Medizin 2024. BVM 2024, 2024)
In this study, we explore the potential of generative pre-trained transformer (GPT), as a coding assistant for MRI sequence programming using the Pulseq framework. The programming of MRI sequences is traditionally a complex and time-consuming task, and the Pulseq standard has recently simplified this process. It allows researchers to define and generate complex pulse sequences used in MRI experiments. Leveraging GPT-4’s capabilities in natural language generation, we adapted it for MRI sequence programming, creating a specialized assistant named GPT4MR. Our tests involved generating various MRI sequences, revealing that GPT-4, guided by a tailored prompt, outperformed GPT-3.5, producing fewer errors and demonstrating improved reasoning. Despite limitations in handling complex sequences, GPT4MR corrected its own errors and successfully generated code with step-by-step instructions. The study showcases GPT4MR’s ability to accelerate MRI sequence development, even for novel ideas absent in its training set. While further research and improvement are needed to address complexity limitations, a well-designed prompt enhances performance. The findings propose GPT4MR as a valuable MRI sequence programming assistant, streamlining prototyping and development. The future prospect involves integrating a PyPulseq plugin into lightweight, open-source LLMs, potentially revolutionizing MRI sequence development and prototyping.
CRIS-Team Scopus Importer:2024-03-29

MR-zero meets FLASH – controlling the transient signal decay in gradient- and RF-spoiled gradient echo sequences - Weinmüller, Simon; Endres, Jonathan; Dang, Hoai Nam; Stollberger, Rudolf; Zaiß, Moritz (Magnetic Resonance in Medicine, 2025)
Purpose: The complex signal decay during the transient FLASH MRI readout can lead to artifacts in magnitude and phase images. We show that target-driven optimization of individual RF flip angles and phases can realize near-ideal signal behavior and mitigate artifacts. Methods: The differentiable end-to-end optimization framework MR-zero is used to optimize RF trains of the FLASH sequence. We focus herein on minimizing deviations from the ideally spoiled signal by using a mono-exponential Look–Locker target. We first obtain the transient FLASH signal decay substructure, and then minimize the deviation to the Look–Locker decay by optimizing the individual (i) flip angles, (ii) RF phases, and (iii) flip angles and RF phases. Comparison between measurement and simulation is performed using Pulseq in 1D and 2D. Results: We were able to reproduce the complex substructure of the transient FLASH signal decay. All three optimization objectives can bring the real FLASH signal closer to the ideal case, with best results when both flip angles and RF phases are adjusted jointly. This solution outperformed all tested conventional quadratic RF cyclings in terms of (i) matching the Look–Locker target signal, (ii) phase stability, (iii) point spread functions ideality, (iv) robustness against parameter changes, and (v) magnitude and phase image quality. Other target functions for the signal could as well be realized, yet their response is not as general as for the Look–Locker target and needs to be optimized for a specific context. Conclusion: Individual flip angle and RF phase optimization improves the transient signal decay of FLASH MRI sequences.
CRIS-Team Scopus Importer:2024-11-29
Keywords: Bloch optimization; extended phase graphs; FLASH; gradient spoiling; MPRAGE; phase distribution graphs; RF spoiling

Phase distribution graphs for fast, differentiable, and spatially encoded Bloch simulations of arbitrary MRI sequences - Endres, Jonathan; Weinmüller, Simon; Dang, Hoai Nam; Zaiß, Moritz (Magnetic Resonance in Medicine, 2024)
Purpose: An analytical approach to Bloch simulations for MRI sequences is introduced that enables time efficient calculations of signals free of Monte-Carlo noise, while providing full flexibility and differentiability in RF flip angles, RF phases, magnetic field gradients and time, as well as insights into image formation. Theory and Methods: We present an implementation of the extended phase graph (EPG) concept implemented in PyTorch, including an efficient state selection algorithm. This simulation is compared with an isochromat-based Bloch simulation with random isochromat distribution as well as with in vivo measurements using the Pulseq standard. Additionally, different sequences are tested and analyzed using this novel simulation approach. Results: Our simulation outperforms isochromat-based simulations in terms of computation time as well as signal quality, without exhibiting any kind of Monte-Carlo noise. The novel approach allows extracting useful information about the magnetization evolution not available otherwise. Our approach extends the common state-tensor-based EPG simulation approach for the contribution of dephased states including spatial encoding and (Formula presented.) effects, and arbitrary timing. This allows calculation of echo shapes in addition to echo amplitudes only. Our implementation provides full differentiability in all input parameters allowing gradient descent optimization. Simulation of non-instantaneous pulses via hard-pulse approximation is left for future work, as the performance and accuracy characteristics are not yet analyzed. Conclusions: Phase distribution graphs provide fast, differentiable, and spatially encoded Bloch simulations for most MRI sequences. It allows efficient simulation and optimization of arbitrary MRI sequences, which was previously only possible via high isochromat counts.
CRIS-Team Scopus Importer:2024-04-26
Keywords: Bloch simulation; differentiable simulation; extended phase graphs; phase distribution graphs; sequence analysis