New Software Accelerates Modelling of Spintronic Devices Using Machine Learning

Scientists are increasingly focused on modelling the complex multiphysics within spintronic devices, necessitating high-performance computational methods. Andy Nonaka, Yingheng Tang, and Julian C. LePelch, working with colleagues at the Applied Mathematics and Computational Research Division, Lawrence Berkeley National Laboratory, alongside contributions from The University of Texas at El Paso and the Center for Applied Scientific Computing, Lawrence Livermore National Laboratory, present MagneX, a new GPU-enabled, data-driven micromagnetics solver. This research details the development of an open-source tool leveraging the AMReX framework and SUNDIALS libraries, incorporating crucial magnetic coupling mechanisms and demonstrating significant performance scalability. Importantly, the team validates MagneX against established benchmarks and showcases a data-driven approach, replacing computationally intensive demagnetization calculations with neural networks trained on simulation data, offering a pathway towards accelerated and comprehensive modelling of advanced spintronic and electronic systems.

Scientists have unveiled MagneX, a new computational tool designed to simulate the complex behaviour of magnetism in nanoscale materials with unprecedented efficiency and accuracy. This open-source framework addresses critical limitations in existing micromagnetic modelling software, paving the way for advances in spintronics and magnetic data storage. MagneX combines cutting-edge techniques, including GPU acceleration, multirate time integration, and machine learning, to tackle the demanding computational challenges inherent in modelling magnetic materials at the nanoscale. The framework accurately captures crucial magnetic coupling mechanisms, including Zeeman coupling, demagnetization coupling, crystalline anisotropy interaction, exchange coupling, and Dzyaloshinskii-Moriya interaction (DMI) coupling. MagneX distinguishes itself through its ability to handle the disparate spatial and temporal scales present in micromagnetic simulations. Traditional methods often struggle with the computational cost of accurately modelling these phenomena, particularly when dealing with stiff physical processes. The tool leverages the Exascale Computing Project software framework AMReX, alongside SUNDIALS time-integration libraries and python-based machine learning workflows, to achieve substantial performance gains. AMReX facilitates adaptive mesh refinement, allowing for higher resolution in areas of interest while maintaining computational efficiency across the entire simulation domain. Crucially, MagneX incorporates a modular design, allowing researchers to seamlessly integrate machine learning surrogates to accelerate computationally intensive tasks, such as calculating the demagnetization field. The machine learning module was trained using a dataset generated from 1,000 simulations, yielding a total of 20,000 input-output pairs consisting of magnetization field inputs, M, and corresponding demagnetizing field outputs, Hdemag, created via forward simulations. A two-dimensional Fourier Neural Operator (FNO) was trained to approximate the mapping from normalized magnetization fields to the demagnetizing field, achieving a stable and efficient surrogate model. Rigorous validation against established benchmarks, like the mumag standard problems and widely-accepted DMI tests, confirms the reliability of MagneX’s simulations. By replacing the conventional calculation of the demagnetization field with a neural network, the researchers have demonstrated a data-driven capability that significantly reduces computational expense. The trained model was converted into TorchScript format, enabling deployment within the C++ environment of MagneX without Python dependencies. Input magnetization data, stored in AMReX MultiFab structures, was transformed into a 4D tensor of shape (Nb, C, H, W), where Nb is the batch size, C represents the three magnetization components, and (H, W) denote the in-plane spatial dimensions, facilitating seamless integration with the PyTorch framework and GPU-accelerated inference. Initial tests demonstrate a substantial acceleration of MagneX through the implementation of additively partitioned methods. Utilising combinations of explicit Runge-Kutta (RE), implicit Runge-Kutta (RI), and explicit multi-rate integration (RF) partitions, the time-to-solution for classical Runge-Kutta approaches was demonstrably improved. The allowable time step scales inversely with the square of the grid spacing, a crucial factor in computational efficiency, and the time step constraint is less restrictive for demagnetization calculations than other physical processes, allowing for strategic partitioning. MagneX employs a multirate time integration scheme, treating physically disparate processes, such as rapid exchange interactions and slower demagnetization effects, on separate timescales. This approach significantly improves computational efficiency by allowing larger time steps for slower phenomena without compromising the accuracy of faster processes. The core of the simulation is the Landau, Lifshitz, Gilbert (LLG) equation, which governs the time evolution of the magnetization vector field under the influence of an effective magnetic field. The demagnetization term can alternatively be computed via a Fast Fourier Transform (FFT) based convolution method, providing a benchmark for evaluating the performance of the machine learning approach. This hybrid strategy, combining GPU-accelerated computation, advanced time integration, and machine learning, enables scalable and high-fidelity modelling of complex magnetization dynamics. Scientists have long sought to accurately model the complex behaviour of magnetic materials at the nanoscale, a pursuit crucial for advancing spintronics and next-generation data storage technologies. This new work represents a significant step forward by presenting MagneX, an open-source micromagnetics modelling tool explicitly designed to overcome these limitations. By leveraging these advanced techniques, the tool unlocks the potential to explore a far wider range of magnetic configurations and dynamic behaviours. However, the reliance on training data introduces inherent limitations. The accuracy of the machine learning component is directly tied to the quality and breadth of the initial simulations used to train it. While the current validation is promising, extending this approach to even more complex magnetic interactions or material compositions will require substantial additional data and careful consideration of potential biases. Future work will likely focus on refining these machine learning models, exploring alternative surrogate methods, and integrating MagneX with other modelling frameworks to create a truly comprehensive platform for spintronic device design and analysis.

👉 More information
🗞 MagneX: A High-Performance, GPU-Enabled, Data-Driven Micromagnetics Solver for Spintronics
🧠 ArXiv: https://arxiv.org/abs/2602.12242

Rohail T.

Rohail T.

As a quantum scientist exploring the frontiers of physics and technology. My work focuses on uncovering how quantum mechanics, computing, and emerging technologies are transforming our understanding of reality. I share research-driven insights that make complex ideas in quantum science clear, engaging, and relevant to the modern world.

Latest Posts by Rohail T.:

Atomic Nuclei Retain Surprising Order Despite Complex Internal Interactions

Atomic Nuclei Retain Surprising Order Despite Complex Internal Interactions

February 16, 2026
Data Collaboration Safeguards Against Leaks and Identifies Model Misuse Sources

Data Collaboration Safeguards Against Leaks and Identifies Model Misuse Sources

February 16, 2026
New Technique Unlocks Deeper Analysis of 3D Shapes and Simulations

New Technique Unlocks Deeper Analysis of 3D Shapes and Simulations

February 16, 2026