Skip to main content

Exploring GPT-4 as MR Sequence and Reconstruction Programming Assistant

GPT4MR

  • Conference paper
  • First Online:
Bildverarbeitung für die Medizin 2024 (BVM 2024)

Part of the book series: Informatik aktuell ((INFORMAT))

Included in the following conference series:

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 79.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Carr HY. Steady-state free precession in nuclear magnetic resonance. PhysRev. 1958;112:1693– 701.

    Google Scholar 

  2. Ravi KS, Geethanath S, Vaughan JT. PyPulseq: a Python package for MRI pulse sequence design. J Open Source Softw. 2019;4:1725.

    Google Scholar 

  3. Loktyushin A, Herz K, Dang N, Glang F, Deshmane A, Weinmuller S et al. MRzero: automated discovery of MRI sequences using supervised learning. Magn Reson Med. 2020;86:709–24.

    Google Scholar 

  4. OpenAI. GPT-4 Technical Report. ArXiv. 2023;abs/2303.08774.

    Google Scholar 

  5. OpenAI. OpenAI: introducing ChatGPT. 2022.

    Google Scholar 

  6. Brown TB, Mann B, Ryder N, Subbiah M, Kaplan J, Dhariwal P et al. Language models are few-shot learners. ArXiv. 2020;abs/2005.14165.

    Google Scholar 

  7. Dai D, Sun Y, Dong L, Hao Y, Sui Z, Wei F. Why can GPT learn in-context? Language models secretly perform gradient descent as meta-optimizers. ArXiv. 2023;abs/2212.10559.

    Google Scholar 

  8. Wei J,Wang X, Schuurmans D, Bosma M, Chi EHh, Xia F et al. Chain of thought prompting elicits reasoning in large language models. ArXiv. 2022;abs/2201.11903.

    Google Scholar 

  9. https://github.com/mmuckley/torchkbnufft.

  10. https://colab.research.google.com/drive/1RoubncbIAOBmX7IFy_OXeJFKI3DQK_F1.

  11. Touvron H, Lavril T, Izacard G, Martinet X, Lachaux MA, Lacroix T et al. LLaMA: open and efficient foundation language models. ArXiv. 2023;abs/2302.13971.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Moritz Zaiss .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 Der/die Autor(en), exklusiv lizenziert an Springer Fachmedien Wiesbaden GmbH, ein Teil von Springer Nature

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Zaiss, M. et al. (2024). Exploring GPT-4 as MR Sequence and Reconstruction Programming Assistant. In: Maier, A., Deserno, T.M., Handels, H., Maier-Hein, K., Palm, C., Tolxdorff, T. (eds) Bildverarbeitung für die Medizin 2024. BVM 2024. Informatik aktuell. Springer Vieweg, Wiesbaden. https://doi.org/10.1007/978-3-658-44037-4_28

Download citation

Publish with us

Policies and ethics