J. Eur. Opt. Society-Rapid Publ. 2026, 22, 27 Ó The Author( s), published by EDP Sciences, 2026 https:// doi. org / 10.1051 / jeos / 2026026 Available online at: https:// jeos. edpsciences. org
Recent Advances on Optics and Photonics 2026 Guest editors: Manuel Filipe P. C. M. Costa, Rogerio Nogueira and Alessandro Fantoni
RESEARCH ARTICLE
Journal of the European Optical Society-Rapid Publications
Monte Carlo optimization for real-time magnetic domain learning in magneto-optical diffractive deep neural networks
Fatima Zahra Chafi *, Tomonao Matsuya, Hotaka Sakaguchi, Kanata Watanabe, and Takayuki Ishibashi Department of Materials Science and Bioengineering, Nagaoka University of Technology, 1603-1 Kamitomioka, Nagaoka, 940-2188, Japan
Received 13 December 2025 / Accepted 7 March 2026
Abstract. We propose an optimized algorithm using Monte Carlo Method( MCM) tailored for online learning in magneto-optical diffractive deep neural networks( MO-D 2 NN), a physical neural network platform where binary-weight are determined by magneto-optical modulation of light through the Faraday effect. Our derivative-free approach based MCM, iteratively adjusts the magnetic domain patterns to minimize cross-entropy loss without relying on gradients at a much lower computational cost. Our findings reveal that the MCM-based optimization algorithm serves as a robust and viable alternative to gradient descent-based training, achieving an accuracy of 96 % for MNIST( Modified National Institute of Standard and Technology) handwritten digits classification with only a single hidden layer, highlighting its potential as a powerful approach for training MO-D 2 NN. We further validate its feasibility through physical implementation in an experimental optical setup, confirming its practical applicability for online image recognition tasks. We successfully demonstrate real-time learning of MO-D 2 NN using the MCM algorithm.
Keywords: Monte Carlo optimization algorithm, Magneto-optical diffractive deep neural network, Image recognition, Online learning.
1 Introduction
The pursuit of ultrafast, energy-efficient computation has spurred renewed interest in physically implemented neural networks that operates beyond the limits of conventional electronic systems. Diffractive optical neural networks( D 2 NNs) process information across multiple layers by only passing light interacting with successive diffractive structures, achieving high-throughput inference at minimal power [ 1, 2 ]. Building on this foundation, magneto-optical D 2 NN( MO-D 2 NN) harness light propagation and interference while exploiting the Faraday effect in engineered magnetic thin films to encode binary weights as reconfigurable magnetic domains [ 3, 4 ]. This direct modulation of light through MO interactions provides intrinsic parallelism and low latency, allowing real-time neural computation at the speed of light. Such systems offer a compelling alternative to traditional electronic accelerators for tasks ranging from image recognition to language processing, and scientific computing. Despite their promise, the inability to update network parameters in real-time remains a major obstacle to the widespread deployment of physical neural
* Corresponding author: cfz @ vos. nagaokaut. ac. jp networks. In most contemporary systems, neural networks are trained offline using numerical simulations, where stochastic gradient descent( SGD) methods such as backpropagation( BP) [ 5 ], are employed to minimize the loss function after which the optimized weights typically remain fixed. This approach significantly prevents real-time adaptation and limits performance in dynamic environments. The core limitation stems from the fundamental incompatibility between conventional gradient-based algorithms and the constraints of optical and hybrid neural systems. Such algorithms assume continuous, differentiable parameters, full observability, and deterministic behavior; conditions rarely met in practical optics, spintronics, or magneto-optics. Physical weights often require discrete or non-volatile updates, like magnetization switching, which are inherently non-differentiable. This highlights the need for efficient and compatible learning strategies tailored for physical implementations.
Monte Carlo methods( MCM) have a long legacy in physics and have demonstrated remarkable versatility across diverse scientific and engineering domains. Their applications extend from combinatorial optimization problems, such as scheduling and graph partitioning, to neural network optimization, and reinforced learning-based decision-making systems like AlphaGo [ 6 ]. They have also been
This is an Open Access article distributed under the terms of the Creative Commons Attribution License( https:// creativecommons. org / licenses / by / 4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.