2026-08-12 –, Room 4
Radio frequency (RF) pulse design in MRI is important but can be slow. We used reverse-mode AD on MRI simulations using GPU kernels, reducing a 2D RF pulse optimization from 5 hours to 5 seconds. We validated this by “drawing with spins” the Julia logo in a water-bottle phantom on a scanner. In this talk, we explain how this works and why fast RF pulse design can be clinically useful for applications such as subject-specific RF design, imaging near metal, and fat suppression.
Radio frequency (RF) and magnetic field gradient waveforms are the controls an MRI scanner uses to excite spins. By shaping these waveforms, we can go beyond simple slice selection and excite a chosen 2D pattern within a slice.
In this talk, I will first build intuition with minimal prerequisites: resonance, the rotating frame, how gradients turn frequency into a spatial label, and how time-varying gradients combined with a shaped RF waveform produce a 2D excitation pattern.
I then frame pulse design as an inverse problem. We seek an RF waveform x that minimizes the mismatch between a desired transverse magnetization pattern b and the simulated pattern A(x), where A(x) is computed by integrating the spin dynamics under the applied RF and gradient waveforms. The simulation is implemented in Julia using KomaMRI.jl, accelerated with GPU kernels via KernelAbstractions.jl, and differentiated using reverse-mode AD with Enzyme.jl.
The key contribution is speed. With CPU finite-difference gradients (FiniteDiff.jl), optimizing the Julia-logo pulse took about 5 hours. Using GPU execution and Enzyme-based reverse-mode AD, we reduced the same optimization to under 5 seconds.
As a concrete demonstration, we designed a 2D pulse that imprints the Julia logo in a water-bottle phantom and validated it by executing the pulse on a real scanner via Pulseq. The measured excitation pattern closely matches the simulation.
I will close by explaining why this matters clinically. If pulse design becomes fast enough, subject-specific RF tailoring becomes practical. Instead of one-size-fits-all pulses, we can restrict excitation to specific anatomical regions, improve imaging near metal implants, and optimize fat suppression, while staying within hardware limits such as RF power and gradient strength.
Carlos Castillo-Passi began his academic journey at Pontificia Universidad Catolica de Chile (PUC), where he earned both a degree and an MSc in Electrical Engineering in 2018. He then pursued a PhD in Biological and Medical Engineering through a joint program between PUC and King’s College London (KCL), completing it with maximum distinction in 2024. His research focused on the design of low-field cardiac MRI sequences using open-source MRI simulations. In 2023, his work on open-source MRI simulations was highlighted by the editor of Magnetic Resonance in Medicine (MRM). Furthermore, his application of this work to low-field cardiac MRI earned him the Early Career Award in Basic Science from the Society for Cardiovascular Magnetic Resonance (SCMR) in 2024. In addition to his research, Carlos is an active member of JuliaHealth, contributing to the development of high-performance, reproducible tools for health and medicine. In 2025, he joined Stanford University as a postdoctoral researcher, where he continues his work in cardiac MRI and open-source technologies.