Thermal noise in magnetic tunnel junctions, usually suppressed, now serves as a tunable source of randomness for Bayesian neural networks with dramatic efficiency gains over silicon.
(Nanowerk Spotlight) In most of electronics, noise is waste. Every electronic component generates small, unwanted random signals caused by the thermal motion of atoms and electrons, and suppressing these fluctuations is a basic requirement of reliable device design. Magnetic memory chips and sensors are no exception: thermal energy randomly jostles the magnetic states inside these devices, and engineers invest considerable effort in keeping that randomness under control.
But a new generation of AI models has created an unusual engineering demand: they need enormous quantities of high-quality random numbers to function, and they need them fast and cheap. What if the noise that magnetic device engineers have always suppressed is exactly the resource these models require?
The models in question are Bayesian neural networks. Unlike standard neural networks, which assign a single fixed weight to every connection and produce a single confident answer for every input, Bayesian networks represent each weight as a probability distribution. This allows them to quantify uncertainty, flagging predictions as reliable or doubtful depending on the evidence. The tradeoff is computational: during each inference pass, the network must sample thousands of values from Gaussian distributions.
Conventional CMOS hardware handles this poorly. Silicon circuits are deterministic by design, and generating randomness on chip requires multi-stage pipelines of number generators, mathematical transformations, and scaling operations, consuming area and power. Several groups have explored alternative hardware, including spintronic probabilistic computers and memristive devices, but few experimental prototypes have moved beyond simulation.
A study published in Advanced Science (“Spintronic Bayesian Hardware Driven by Stochastic Magnetic Domain Wall Dynamics”) reports a working prototype that bridges this gap. The researchers build a Magnetic Probabilistic Computing platform that captures and tunes the thermal fluctuations of magnetic domain walls inside magnetic tunnel junctions, converting the very noise that device engineers suppress into a source of useful random signals.
Magnetic probabilistic computing platform and physical implementation of tunable probability. (a) Structure of neural networks. (i) A point-estimate neural network, where each weight is represented by a single value. (ii) Structure of a Bayesian Neural Network (BNN), where each weight is represented by a trainable Gaussian distribution. (b) Schematic of the Magnetic Probabilistic Computing (MPC) device. The device consists of three layers: the free layer, the tunnel barrier layer, and the fixed layer. Red (blue) arrows indicate +z (-z) magnetic domains. The grey arrow represents the in-plane (+x) magnetization direction, corresponding to the magnetic DW. The top electrode, connected to the fixed layer, functions as the readout electrode. A reading voltage is applied across the Magnetic Tunnel Junction (MTJ) stack to measure the Tunneling Magnetoresistance (TMR) signal. (c) Operating mechanism of the device. (i) Domain walls (DWs) located at distinct locations (labeled ①, ②, and ③) along the free layer. The dashed rectangle indicates the region probed by the TMR read head. Thermal excitations depicted by red wavy arrows perturb the magnetic moments, causing stochasticity in the DW position. (ii) Micromagnetic simulation illustrating DW snapshots. (iii) Each DW position corresponds to a specific point on the TMR versus DW mean position curve. (iv) When the DW mean position is held at a fixed location (e.g., Position ②), repeated TMR readouts exhibit stochastic fluctuations. (v) The resulting TMR signal variations follow a Gaussian distribution, as illustrated by the probability density function (PDF) plot. (Image: Reproduced from DOI:10.1002/advs.202520717, CC BY) (click on image to enlarge)
The core device is a magnetic tunnel junction, a sandwich of two ferromagnetic layers, one fixed and one free, separated by an ultrathin insulating barrier of magnesium oxide. Electrical resistance across the junction depends on how the magnetization in the two layers aligns: low when both point in the same direction, high when they point in opposing directions, and intermediate for partial alignment. This effect, known as tunneling magnetoresistance, converts a magnetic state into a readable analog electrical signal.
Inside the free layer, made of cobalt-iron-boron, the researchers create a domain wall, a narrow boundary between regions magnetized in opposite directions. A current pulse through a nearby conductor generates a localized field that flips a small section of magnetization, forming the wall. Sequential current pulses then drive the wall along the magnetic strip through spin-orbit torque, a process in which electrons flowing through the strip exert a push on the wall, nudging it forward step by step.
The team verified both the successful creation of the wall and its controlled motion using magneto-optical Kerr effect imaging, with all measurements taking place at room temperature.
The domain wall never sits perfectly still. Thermal energy constantly perturbs the magnetic moments at the boundary, causing the wall to jitter randomly around its mean position. Each jitter slightly changes the net magnetization beneath the readout terminal, producing a small variation in the resistance signal.
When the researchers collected 5,000 resistance measurements at a fixed wall position, the values traced out a Gaussian distribution, a result they confirmed through statistical testing. Moving the wall to a different position shifted the center of that distribution while preserving its bell-curve shape, providing a physical mechanism for tuning the Gaussian mean.
Controlling the width of the distribution required a separate mechanism. Applying a voltage across the junction modulates a property called perpendicular magnetic anisotropy, which governs how strongly the magnetization prefers to point out of the film plane. The voltage adjusts the depth of the energy well in which the domain wall sits: a positive voltage makes the well shallower, so thermal jostling pushes the wall into larger excursions and widens the distribution. A negative voltage deepens the well, suppressing fluctuations and narrowing it.
With independent electrical control over both mean and standard deviation, each junction becomes a compact Gaussian random number generator. To test whether physically generated distributions could substitute for idealized software sampling, the team trained a Bayesian neural network on the CIFAR-10 image classification benchmark in software, then mapped each learned weight distribution onto experimentally measured Gaussian signals from the device.
After mapping, the physical network reached a validation accuracy of 78.5%, comparable to published software-only results. The network also produced well-calibrated uncertainty estimates: its stated confidence levels closely matched actual prediction accuracy across all ten classes, confirming that the system was neither overconfident nor underconfident.
At the level of the basic computing unit, the magnetic device achieved roughly five orders of magnitude improvement in area efficiency and three orders of magnitude in energy efficiency over a standard 28 nm CMOS implementation. The advantage stems from collapsing the entire CMOS pipeline into a single physical process. Throughput matched CMOS for individual samples, but the magnetic approach scales more favorably: once the domain wall reaches its target position, each additional sample requires only a fast resistance readout, while a CMOS circuit must repeat the full pipeline every time.
A composite figure of merit combining area, time, and energy showed a seven-order-of-magnitude advantage at the unit level. At the full system level, accounting for matrix operations and supporting circuitry, the platform delivered approximately 25 times lower energy consumption and five times smaller area with comparable latency.
Practical limitations remain. Imperfections in the magnetic material can pin the domain wall, disrupting smooth motion and demanding further process refinement. The current demonstration feeds experimentally measured distributions into a software framework rather than running the entire inference pipeline on a single chip. The system-level benefit also depends on what fraction of computation goes to random number generation, a proportion that grows with more complex probabilistic models.
Room for optimization is substantial. Related material systems have already achieved domain wall motion energy as low as 27 aJ per operation and speeds up to 4,000 m/s, suggesting that throughput and efficiency could improve considerably. Scaling the architecture into larger arrays and embedding it within compute-in-memory frameworks, building on progress in spintronic devices for brain-inspired computing, could support full on-chip stochastic inference for tasks from image classification to generative modeling, bringing uncertainty-aware AI closer to efficient, trustworthy physical hardware.
For authors and communications departmentsclick to open
Lay summary
Prefilled posts
Plain-language explainer by Nanowerk
https://www.nanowerk.com/spotlight/spotid=68986.php?ref=li_author
Nanowerk Newsletter
Get our Nanotechnology Spotlight updates to your inbox!
Thank you!
You have successfully joined our subscriber list.
Become a Spotlight guest author! Join our large and growing group of guest contributors. Have you just published a scientific paper or have other exciting developments to share with the nanotechnology community? Here is how to publish on nanowerk.com.