Introduction

Physical reservoir computing is attracting interdisciplinary attentions as one of the key technologies for realizing real-time information processing required in the coming Internet of Things society, while breaking free from energy-consuming silicon-based devices1,2,3. Taking advantage of nonlinear phenomena in a physical system known as a “physical reservoir”, the dynamics of the system acts as a mapping of the input data, given in the form of a physical signal, onto a high-dimensional internal feature space in a nonlinear manner. When equipped with the fading memory property to handle time-varying input streams4,5, the physical reservoir can be considered as a physical embodiment of a recurrent neural network, which addresses a wide range of machine learning problems such as classification and predictive analysis. In this framework, internal states of the reservoir are extracted by a read-out function in the form of vectors, and a linear transformation of these vectors provides the final output. It is worth highlighting that, in contrast to conventional neural networks, training is limited to linear regression only on the read-out layer, rather than on the physical reservoir itself. This reduction in training costs allows physical reservoirs to operate at low power, high speed, and high versatility, as demonstrated in a variety of implementations, including photonic systems6,7,8,9,10,11,12,13,14 and electrical systems15,16,17. Magnetic materials are also a potential platform for physical reservoir computing, which has been proposed in various setups, such as spin torque oscillators18,19,20,21,22, spin wave devices23,24,25, skyrmion fabrics25,26,27,28,29, and magnon scatterings30.

Toward device applications of spintronic reservoirs in realistic systems, two major challenges remain to be resolved. One is robustness against thermal fluctuations, which is crucial for retaining short-term memory (STM) long enough for practical use. Most spintronic reservoirs exploit nonlinear phenomena originating from magnetization dynamics, and are therefore inherently vulnerable to external noise that disturbs spin precessions. The other challenge is designing devices with highly integrated computational units, the importance of which is evident from the problems facing silicon chips. The straightforward solution for the latter is the use of multiple read-outs19,20,28,31,32, in which multiple internal state vectors are extracted from several local measurements, such as the dynamics of particular spins, and each is used independently for different computations. Another solution is parallelization by a selective read-out from superposed signals, such as wavelength-multiplexing10,13 and frequency-multiplexing14 studied in photonic systems, but such schemes have been largely unexplored for spintronic reservoirs thus far.

In this article, we propose a framework of spintronic physical reservoir computing that achieves both thermal-robustness and high-integration. We demonstrate it by utilizing a prototypical model of frustrated magnets as a physical reservoir, with the input by AC magnetic fields and read-out by spin dynamics. We find that the memories of input information are stored in the spin dynamics at frequencies around that of the AC field and can be preserved against thermal noise by filtering out irrelevant signals at the other frequencies. We also demonstrate parallel processing on multiple inputs in both space and time, using read-outs on different spins at different frequencies. Moreover, we show that the nonlinearity arising from the exchange interaction allows calculations that capture information across various frequencies without the need for dedicated communication channels. Our results pave the way for spintronic physical reservoir computing in realistic situations.

Results

Physical reservoir and input/output

Our spintronic reservoir receives a random sequence of input binary digits \(\left\{{s}_{k}\right\}\) in the form of local magnetic fields, and transforms them nonlinearly through the spin dynamics (Fig. 1a). As a prototypical model of frustrated magnets, we consider an antiferromagnetic Heisenberg model with classical spins on an \(L\times L\) \((L=128)\) triangular lattice with open boundary conditions. The Hamiltonian is given by

$$ \begin{array}{*{20}c} {H = J\sum\limits_{{\langle i,j\rangle }} {{\mathbf{S}}_{i} \cdot {\mathbf{S}}_{j} - \sum\limits_{{j \in \Lambda }} {H_{j}^{z} \left( t \right)S_{j}^{z} ,} } } \\ \end{array} $$
(1)

where \({\mathbf{S}}_{i}=\left({S}_{i}^{x}, {S}_{i}^{y}, {S}_{i}^{z}\right)\) represents the classical spin at site \(i\) \(\left(\left|{\mathbf{S}}_{i}\right|=1\right)\) and the sum of \(\langle i,j\rangle \) is taken for nearest-neighbor sites; \({H}_{j}^{z}\left(t\right)\) is the time-dependent magnetic field for the input (Fig. 1b) and \(\Lambda \) is a set of lattice sites used as the input terminals for the physical reservoir (Fig. 1c). Hereafter we take \(J=1\) as the energy unit. In the absence of magnetic fields, the spin configuration of this system has a \({120}^{\circ }\) structure with three sublattices at low temperature33,34, which might be realized experimentally, for instance, in ACrO2 (A = Li, Na)35,36,37,38, Ba3CoSb2O939,40, and κ-(BEDT-TTF)2Cu2(CN)341,42.

Figure 1
figure 1

Concept of physical reservoir computing by utilizing a frustrated magnet. (a) Architecture of physical reservoir computing, which consists of the input, reservoir, and output parts. Sequential information is converted to physical signals in the input part and nonlinearly transformed in the reservoir part via its dynamics. The output part linearly transforms measured signals from the physical reservoir to final outputs, whose coefficients are trained so that the final signals give desired answers for a specific problem. (b) Schematic diagram of the input magnetic field. The \(k\)-th input bit \({s}_{k}\) is converted to an AC magnetic field \({H}_{j}^{z}\left(t\right)\) with the duration of \({t}_{\mathrm{in}}\); see Eq. (2). (c) Schematic of an antiferromagnetic Heisenberg model on a triangular lattice used as the physical reservoir. The blue arrow represents the terminal spin where the input magnetic fields are applied using a probe indicated by the yellow needle, and the gray arrows represent the other spins. The \(z\) components of the spin dynamics on the terminal sites are observed as the read-out. (d) Schematic diagram of read-out from the physical reservoir. The spin component is observed every \(\Delta {t}_{\mathrm{in}}={t}_{\mathrm{in}}/{N}_{t}\) and transformed to an \(\left({N}_{t}+1\right)\)-dimensional internal state vector \({\mathbf{X}}_{k}\); see Eq. (4). The final output \({y}_{k}\) is calculated as \({y}_{k}={\mathbf{X}}_{k}\cdot \mathbf{w}\) with the weight vector \(\mathbf{w}\).

The input is a time series information of the binary bit \({s}_{k}\) with an interval of time, which we take \({t}_{\mathrm{in}}=12\), and converted into the magnetic field as

$$\begin{array}{c}{H}_{j\in\Lambda }^{z}\left(t\right)=\left\{ \begin{array}{c}{H}_{\mathrm{in}}\mathrm{sin}\left(2\pi {f}_{\mathrm{in}}t\right)\,\,\, \left({s}_{k}=1\right)\\ -{H}_{\mathrm{in}}\mathrm{sin}\left(2\pi {f}_{\mathrm{in}}t\right)\,\,\, \left({s}_{k}=0\right),\end{array}\right.\end{array}$$
(2)

where \({H}_{\mathrm{in}}\) and \({f}_{\mathrm{in}}\) is the norm and frequency of the magnetic field, respectively (Fig. 1b). We take \({f}_{\mathrm{in}}=n/\left(2{t}_{\mathrm{in}}\right)\) with an integer \(n\) so that \({H}_{j}^{z}\left(t\right)\) varies continuously in time. The magnetization dynamics under the input field is simulated by the stochastic Landau–Lifshitz–Gilbert (LLG) equation

$$\begin{array}{c}\frac{d{\mathbf{S}}_{i}}{dt}=-\frac{1}{1+{\alpha }^{2}}\left[{\mathbf{S}}_{i}\times {\mathbf{H}}_{i}^{\mathrm{eff}}+{\mathbf{S}}_{i}\times \left({\mathbf{S}}_{i}\times {\mathbf{H}}_{i}^{\mathrm{eff}}\right)\right],\end{array}$$
(3)

where \(\alpha \) is the Gilbert damping constant and \({\mathbf{H}}_{i}^{\mathrm{eff}}\) is the effective magnetic field at site \(i\) consisting of the input magnetic field, the exchange magnetic field, and the thermal field at temperature \(T\)43,44 (see the “Methods” section). We take \({H}_{\mathrm{in}}=0.1\) and \(\alpha =0.1\) in the following calculations. The time profiles of the \(z\) components of the read-out spins \({S}_{j}^{z}\) are observed every \(\Delta {t}_{\mathrm{in}}={t}_{\mathrm{in}}/{N}_{t}\) (Fig. 1d) where we take \({N}_{t}=120\)45. Then, the internal states of the reservoir, \({\mathbf{X}}_{k}\), are defined by an \(\left({N}_{t}+1\right)\)-dimensional vector including an additional component with the constant value 1 as

$$\begin{array}{c}{\mathbf{X}}_{k}=\left({S}_{j}^{z}\left(k{t}_{\mathrm{in}}\right), {S}_{j}^{z}\left(k{t}_{\mathrm{in}}+\Delta {t}_{\mathrm{in}}\right), { S}_{j}^{z}\left(k{t}_{\mathrm{in}}+2\Delta {t}_{\mathrm{in}}\right), \dots , {S}_{j}^{z}\left(k{t}_{\mathrm{in}}+\left({N}_{t}-1\right)\Delta {t}_{\mathrm{in}}\right), 1\right).\end{array}$$
(4)

The final output is obtained by linear transformation of the internal state vector \({y}_{k}={\mathbf{X}}_{k}\cdot \mathbf{w}\) where \(\mathbf{w}\) is a weight vector. With sufficiently large training data, the weight \(\mathbf{w}\) is trained so that each \({y}_{k}\) becomes close to the desired output \({\overline{y} }_{k}\) for a given problem. The reservoir performance is evaluated by the determination coefficient \({R}^{2}\) between the sequence of outputs \(\mathbf{y}=\left\{{y}_{k}\right\}\) and targets \(\overline{\mathbf{y} }=\left\{{\overline{y} }_{k}\right\}\): \({R}^{2}={\mathrm{cov}}^{2}\left(\mathbf{y}, \overline{\mathbf{y} }\right)/[{\sigma }^{2}\left(\mathbf{y}\right){\sigma }^{2}\left(\overline{\mathbf{y} }\right)]\) where cov and σ2 denote covariance and variance, respectively. \({R}^{2}\) is close to 1 when \(\mathbf{y}\) and \(\overline{\mathbf{y} }\) are well matched, and approaches 0 otherwise (see the “Methods” section).

Thermal robustness by frequency domain filtering

First, we examine the STM task to evaluate how long the input information is retained in the reservoir. The target output for this task is \({\overline{y} }_{k}={s}_{k-d}\) where \(d\) is the delay step after the input. It is noteworthy that the STM task is pivotal in quantifying the fading-memory property, which is a vital aspect of reservoir computing when dealing with time series analysis. Here, we apply the input magnetic field at frequency \({f}_{\mathrm{in}}=8/{t}_{\mathrm{in}}\) to one specific terminal spin at site \(j\), namely, \(\Lambda =\left\{ j\right\}\), and use the spin dynamics at the same site, \({S}_{j}^{z}(t)\), as a read-out to construct the internal state vectors. We place \(j\) around the center of the system to avoid uninteresting behavior near the edges.

Figure 2a shows the temperature dependence of the reservoir performance for the STM task. At absolute zero temperature, the memories are recovered with high accuracy of \({R}^{2}>0.95\) up to delay \(d=7\), and decay gradually for larger \(d\), exhibiting the fading memory property required for a physical reservoir. In contrast, at finite temperature, the reservoir rapidly loses the STM older than \(d=2\) even at extremely low temperature \(T={10}^{-4}\), and furthermore, remaining memories of \(d=0\) and 1 are also lost as the temperature increases. This is an indication that the STM stored in the spin dynamics is extremely fragile against thermal noise, as commonly seen in various spintronic physical reservoirs18,19,20,21,22,23,24,25,26,27,28.

Figure 2
figure 2

Reservoir computing in the Heisenberg antiferromagnet at finite temperature. (a) Reservoir performance for the STM task at several temperatures \(T\) when using the whole spin dynamics (without frequency filtering). Delay step \(d\) denotes discretized time length after input and \({R}^{2}\) is the determination coefficient. The STM is extremely fragile against thermal noise, especially for \(d\ge 2\). (b) The same plot as (a) with the frequency filter of \({f}_{\mathrm{in}}\le \left|f\right|<{f}_{\mathrm{in}}+1/\left(2{t}_{\mathrm{in}}\right)\). The memories are retained even at finite temperatures, proving the efficiency of frequency filtering for thermal noise. (c) Schematic picture of a frequency filter. The signals within a specific frequency band are extracted by means of the (inverse) Fourier transformation. (d) Fourier spectra of the spin dynamics on the terminal site \({S}_{j}^{z}\left(t\right)\) at three different temperatures. The dashed lines display the input frequency \(\pm\, {f}_{\mathrm{in}}\). (e) Distributions of the STM in frequency domain. The color represents the value of \({R}^{2}\) and the dashed line shows \({f}_{\mathrm{in}}\). The memories are stored at around \({f}_{\mathrm{in}}\) where the spin dynamics is preserved against thermal fluctuations, allowing for an efficient reservoir computing even at finite temperature.

To clarify how the thermal noise disturbs the read-out signals, we analyze the Fourier spectrum of the dynamics of \({S}_{j}^{z}\left(t\right)\). Figure 2d displays the spectra at three different temperatures. At \(T=0\), the spectrum shows strong peaks at around the frequency of the input magnetic field, \(\pm\, {f}_{\mathrm{in}}\), as the terminal spin linearly follows the time-dependent magnetic field via the Zeeman coupling. The wavy structure repeating every \(1/\left(2{t}_{\mathrm{in}}\right)\) also appears, which originates from the random switching of the input magnetic field at every \({t}_{\mathrm{in}}\) according to the input bit. Here, the finite peak width at \(\pm\, {f}_{\mathrm{in}}\) reflects the probabilistic nature of the bit sequence \(\left\{{s}_{k}\right\}\) in the input magnetic field, otherwise there would be only a delta-functional peak at exactly \(\pm\, {f}_{\mathrm{in}}\). In contrast, at finite temperature, thermal noise disturbs the spin dynamics, obscuring these characteristic peaks. At \(T=0.001\), the wavy structure disappears due to thermal noise, but the peaks at around \(\pm\, {f}_{\mathrm{in}}\) are still present. The latter peaks are also mostly drowned out at a higher temperature, \(T=0.1\).

From this observation, we introduce a frequency filter in order to mitigate the disturbances caused by thermal agitations. Specifically, we only retain signals within the frequency windows of \({f}_{\mathrm{in}}\le \left|f\right|<{f}_{\mathrm{in}}+1/\left(2{t}_{\mathrm{in}}\right)\), and use the frequency-filtered spin dynamics \({S}_{j, \mathrm{filtered}}^{z}\left(t\right)\) for computation instead of the whole spin dynamics, \({S}_{j}^{z}\left(t\right)\); see Fig. 2c and the “Methods” section. Figure 2b shows the reservoir performance for the STM task with the frequency filter. In clear contrast to the case without frequency filtering in Fig. 2a, the STM persists up to \(d=5\) with almost no information loss even at finite temperature, and the older memories are lost gradually. This indicates, surprisingly, that the input information can be recovered only by the signals within the narrow frequency bandwidth of \(1/\left(2{t}_{\mathrm{in}}\right)\) including \({f}_{\mathrm{in}}\), and that the memories within this range are resistant to thermal fluctuations. Similar improvements by frequency filtering can be observed in the memory capacity46, see Supplementary Note 1 and Fig. S1. Consequently, even at finite temperatures, our reservoir has the ability to handle a wide range of temporal tasks that necessitate the STM through the utilization of frequency filters. This is a qualitative leap from the previously expected scenario where performance is significantly degraded for almost all temporal tasks due to the loss of STM in the presence of thermal noise.

Figure 2e shows the distributions of the STM in frequency domain. We introduce frequency filters that pass signals within the frequency window of \(\left(m-1\right)/\left(2{t}_{\mathrm{in}}\right)\le \left|f\right|<m/\left(2{t}_{\mathrm{in}}\right)\), and evaluate the performance for the STM task while changing a positive integer \(m\). At \(T=0\), the memories are encoded over a broad frequency range, but \({R}^{2}\) gradually diminishes as the frequency window deviates from \({f}_{\mathrm{in}}\). Since the information embedding process from the input magnetic field is mainly governed by the linear Zeeman interaction, the input information is prominently restored in the spin dynamics at around \({f}_{\mathrm{in}}\). At \(T=0.001\), the system performance at around \({f}_{\mathrm{in}}\) remains largely unchanged from that at \(T=0\), although it deteriorates significantly at other frequencies. A comparison with Fig. 2d demonstrates that the input information is retained only at frequencies where the spin dynamics is preserved against thermal noise. As the signals at the other frequencies contribute as noise, the reservoir without the frequency filter is vulnerable to thermal agitations. At \(T=0.1\), the reservoir is almost non-functional even at around \({f}_{\mathrm{in}}\) because of the increased noise level as shown in Fig. 2b. The presence of thermal noise also disrupts the echo state property4,46,47, but its impact can be partially mitigated through frequency filtering (see Supplementary Note 2, Fig. S2).

In our configuration, we employ a single spin as the input and read-out, however, we verify that the utilization of multiple spins or the entire system does not alter the fundamental behavior. We note that increasing the amplitude of the input magnetic field broadens the temperature range within which the system can operate effectively (see Supplementary Note 3, Fig. S3). The influence of the input information in frequency domain is closely tied to the typical time scale of the system. In our input protocol, the input magnetic field is decomposed into the product of an AC magnetic field at frequency \({f}_{\mathrm{in}}\) and a pulse square field that randomly changes its sign every \({t}_{\mathrm{in}}\) depending on the supplied bit. This switching duration is the only relevant time scale for the randomness of the input, and thus the information is stored in units of \(1/{t}_{\mathrm{in}}\) in frequency domain. In other words, the memories retained at around \(f\), \(f\pm\, n/{t}_{\mathrm{in}}\) and \(-f+n/{t}_{\mathrm{in}}\) with a positive integer \(n\) are almost identical (see Supplementary Note 4, Fig. S4). This observation suggests that filters of \(\left(m-1\right)/\left(2{t}_{\mathrm{in}}\right)\le \left|f\right|<m/\left(2{t}_{\mathrm{in}}\right)\) are the narrowest frequency bandwidth that enables maximum recovery of STM without overlapping information.

Parallel reservoir computing in frequency and spatial domains

The above concept of frequency filtering can be extended to implement frequency division multiplexing, which allows for the simultaneous transmission of multiple signals encoded at different frequencies. As an illustration, we prepare three sequences of random input bits \(\left\{{s}_{k}^{1}\right\}, \left\{{s}_{k}^{2}\right\}, \left\{{s}_{k}^{3}\right\}\) and examine the STM task of each input bit: the target output is \({\overline{y} }_{k}^{n}={s}_{k-d}^{n}\) with delay step \(d\) and \(n=1, 2, 3\). We choose different frequencies \({f}_{\mathrm{in}}^{1}=8/{t}_{\mathrm{in}}\), \({f}_{\mathrm{in}}^{2}=45/\left(2{t}_{\mathrm{in}}\right)\), \({f}_{\mathrm{in}}^{3}=36/{t}_{\mathrm{in}}\) for each binary sequence, and transform the bits \({s}_{k}^{n}\) to the magnetic field at the assigned frequency in the same manner as Eq. (2): superposition of these three magnetic fields is given to one input terminal spin at site \(j\) (Fig. 3a). Herein the input bits \({s}_{k}^{n}\) are nonlinearly transformed through the dynamics of the terminal spin \({S}_{j}^{z}\left(t\right)\) and the internal state vectors \({{\mathbf{X}}}_{k}\) are then extracted for computations. Figure 3b shows the Fourier spectrum of \({S}_{j}^{z}\left(t\right)\) at zero temperature, where three peaks corresponding to \(\pm\, {f}_{\mathrm{in}}^{1}\), \(\pm\, {f}_{\mathrm{in}}^{2}\), \(\pm\, {f}_{\mathrm{in}}^{3}\) appear in addition to the wavy structure present over a wide frequency range.

Figure 3
figure 3

Parallel reservoir computing by frequency division multiplexing with the superposed input magnetic fields. (a) Schematic of the preparation of input magnetic field. Multiple bit sequences are converted to magnetic fields at different frequencies, and their superposition is given as the input magnetic field. (b) Fourier spectrum of the spin dynamics \({S}_{j}^{z}\left(t\right)\) on the terminal site. The gray lines display the frequencies of the input field: \({f}_{\mathrm{in}}^{1}=8/{t}_{\mathrm{in}}\) for the bit sequence \(\left\{{s}_{k}^{1}\right\}\) (dashed), \({f}_{\mathrm{in}}^{2}=45/\left(2{t}_{\mathrm{in}}\right)\) for \(\left\{{s}_{k}^{2}\right\}\) (dashed-dotted), and \({f}_{\mathrm{in}}^{3}=36/{t}_{\mathrm{in}}\) for \(\left\{{s}_{k}^{3}\right\}\) (dotted). Strong intensities are observed at around these three input frequencies. (c) Reservoir performance for the STM task in frequency domain. The color represents \({R}^{2}\) for the STM task of the input sequence \(\left\{{s}_{k}^{1}\right\}\) (top), \(\left\{{s}_{k}^{2}\right\}\) (middle), and \(\left\{{s}_{k}^{3}\right\}\) (bottom). The gray lines represent \({f}_{\mathrm{in}}^{1}\), \({f}_{\mathrm{in}}^{2}\), and \({f}_{\mathrm{in}}^{3}\) as in (b). Each STM is retained at around the corresponding input frequency, which allows for multiplexing in frequency domain.

Figure 3c represents the reservoir performance for the STM tasks of three input bit sequences in frequency domain. Each information is embedded into the spin dynamics at around its input frequency and not affected by the other input bits. Consequently, the memories can be selectively recovered using a frequency filter that passes the input frequency where the desired bits are provided. Indeed, for all \(n\), \({R}^{2}\) at around each \({f}_{\mathrm{in}}^{n}\) is greater than 0.9 up to delay \(d=5\) and gradually decreases for larger \(d\) due to the fading memory property, which indicates that the performance is almost the same for different parallel threads. This clearly demonstrates that the spin dynamics at different frequencies can be regarded as mutually independent parallel threads, allowing for frequency division multiplexed computational units. This parallelization scheme works at finite temperature in the same manner as Fig. 2e by filtering out irrelevant signals. Worth noting that the degree of parallelization can be further increased by allocating more frequencies for computation; we confirm that a spacing of \(1/{t}_{\mathrm{in}}\) or more is sufficient for such parallelization.

Our reservoir can also be parallelized in spatial domain with multiple inputs and read-outs. To demonstrate this, we perform the STM task by selecting two input terminal spins at sites \({j}_{1}\) and \({j}_{2}\) separated by 17 spins, namely \(\Lambda =\left\{ {j}_{1}, {j}_{2}\right\}\) in Eq. (1), denoted as terminal 1 and terminal 2, respectively (Fig. 4a). A bit sequence of \(\left\{{s}_{k}^{{j}_{1}, 1}\right\}\) \(\left(\left\{{s}_{k}^{{j}_{1},2}\right\}\right)\) is given to terminal 1 and \(\left\{{s}_{k}^{{j}_{2}, 1}\right\}\) \(\left(\left\{{s}_{k}^{{j}_{2},2}\right\}\right)\) is given to terminal 2 at frequency \({f}_{\mathrm{in}}^{1}\) \(\left({f}_{\mathrm{in}}^{2}\right)\); in total, four input bit sequences are simultaneously supplied to the system. Figure 4b shows the performance for the STM tasks of different input sequences at zero temperature. For the computation, the signals received from terminal 1 and terminal 2 are independently utilized with frequency filters. When the spin dynamics at terminal 1 is used as the read-out, the memories of \(\left\{{s}_{k}^{{j}_{1}, 1}\right\}\) and \(\left\{{s}_{k}^{{j}_{1}, 2}\right\}\) can be reproduced at around each input frequency with \({R}^{2}>0.9\) up to delay \(d=5\), whereas the information of \(\left\{{s}_{k}^{{j}_{2}, 1}\right\}\) and \(\left\{{s}_{k}^{{j}_{2}, 2}\right\}\) cannot be recovered at all. The opposite is true when utilizing signals from terminal 2. This illustrates that the spin dynamics at different sites can be treated as independent parallel computational threads, which realizes spatial multiplexing of computational units while preserving the frequency multiplexing. Due to the availability down to even single spin, the minimal components of magnetic materials, as read-outs, our proposed scheme offers the potential for high-density integration at the nanoscale on one magnetic chip; we confirm that a lattice spacing of more than 10 spins is sufficient for such parallel computation in our model. Moreover, simultaneous parallelization in spatial and frequency domains would allow for extreme integration of computational units in spatiotemporal domain by further increasing the number of frequency bands and I/O terminal spins.

Figure 4
figure 4

Parallel reservoir computing with multiple input/output spin terminals. (a) Set up of two input terminal spins. A bit sequence \(\left\{{s}_{k}^{{j}_{1}, 1}\right\}\) \(\left(\left\{{s}_{k}^{{j}_{1}, 2}\right\}\right)\) is given to terminal 1 (the blue arrow) and \(\left\{{s}_{k}^{{j}_{2}, 1}\right\}\) \(\left(\left\{{s}_{k}^{{j}_{2}, 2}\right\}\right)\) is given to terminal 2 (the sky blue arrow) through the magnetic field at the frequency \({f}_{\mathrm{in}}^{1}=8/{t}_{\mathrm{in}}\) \(\left({f}_{\mathrm{in}}^{2}=45/\left(2{t}_{\mathrm{in}}\right)\right)\). The yellow needles indicate probes to apply magnetic fields. (b) Reservoir performance for the STM task by independently processing the signals from terminal 1 (left) and terminal 2 (right). The top two figures represent the STM of \(\left\{{s}_{k}^{{j}_{1}, 1}\right\}\) and \(\left\{{s}_{k}^{{j}_{1}, 2}\right\}\), and the bottom two figures show the STM of \(\left\{{s}_{k}^{{j}_{2}, 1}\right\}\) and \(\left\{{s}_{k}^{{j}_{2},2}\right\}\). The gray lines correspond to \({f}_{\mathrm{in}}^{1}\) and \({f}_{\mathrm{in}}^{2}\). The STM of \(\left\{{s}_{k}^{{j}_{1}, 1}\right\}\) and \(\left\{{s}_{k}^{{j}_{1}, 2}\right\}\) can be recovered only by the signals from the terminal 1, and the STM of \(\left\{{s}_{k}^{{j}_{2}, 1}\right\}\) and \(\left\{{s}_{k}^{{j}_{2},2}\right\}\) requires the signals from the terminal 2 for reproduction. Each memory is retained at around the corresponding input frequency. A straightforward extension of this scheme would allow for high-density integration of computational units in both spatial and frequency domains.

Logic gate operation of bits in different threads

Applying the characteristics of frequency division multiplexing, different information retained in parallel at different frequencies can be accessed simultaneously by selecting signals at appropriate frequencies. To demonstrate this, we examine logic gate tasks between input bits in different parallel threads9,29. Two binary sequences \(\left\{{s}_{k}^{1}\right\}\) and \(\left\{{s}_{k}^{2}\right\}\) are simultaneously transformed to the input magnetic field at the frequency \({f}_{\mathrm{in}}^{1}={8/t}_{\mathrm{in}}\) and \({f}_{\mathrm{in}}^{2}={45/(2t}_{\mathrm{in}})\), respectively; the resulting superposition of them is then applied to one input terminal spin at site \(j\). Here, we observe the spin dynamics on the nearest-neighbor site from the input terminal site, denoted as \({j}^{\mathrm{NN}}\), for the read-out from the reservoir; the spin dynamics at the terminal site \(j\) is also traced for a comparison (Fig. 5a). The target output \({\overline{y} }_{k}\) is the resultant bit obtained by performing the logic gate operations on two input bits \({s}_{k}^{1}\) and \({s}_{k}^{2}\), the truth table of which is summarized in Fig. 5b. Figure 5c represents the Fourier spectra of the spin dynamics on the terminal site \(j\) and the neighboring site \({j}^{\mathrm{NN}}\) at zero temperature. While the overall behaviors, especially the strong peaks at \(\pm\, {f}_{\mathrm{in}}^{1}\) and \(\pm\, {f}_{\mathrm{in}}^{2}\), are common to both spectra, a significant difference is found in the additional peaks in the spectrum from the site \({j}^{\mathrm{NN}}\) at around the second harmonics frequencies: \(\pm\, 2{f}_{\mathrm{in}}^{1}\), \(\pm\, 2{f}_{\mathrm{in}}^{2}\), \(\pm\, \left({f}_{\mathrm{in}}^{2}-{f}_{\mathrm{in}}^{1}\right)\) and \(\pm\, \left({f}_{\mathrm{in}}^{1}+{f}_{\mathrm{in}}^{2}\right)\). The signals at \(\pm\, 2{f}_{\mathrm{in}}^{1}\) and \(\pm\, 2{f}_{\mathrm{in}}^{2}\), which originate from the square of the magnetic fields at the same frequency, are delta-functional since the sign information of the binary bits is lost. In contrast, the signals at \(\pm\, \left({f}_{\mathrm{in}}^{2}-{f}_{\mathrm{in}}^{1}\right)\) and \(\pm\, \left({f}_{\mathrm{in}}^{1}+{f}_{\mathrm{in}}^{2}\right)\) resulting from a nonlinear process at different frequencies have finite widths because the randomness of the input bits is preserved.

Figure 5
figure 5

Logic gate operations of two input bits stored in different frequencies. (a) Schematic of the input terminal spin (the blue arrow) and its nearest-neighbor spin (the red arrow). The former is directly affected by the input magnetic field through a probe represented by the yellow needle, while the latter is affected via the exchange interaction between the spins. (b) Truth table for logic gates with input bits \({s}_{k}^{1}\) and \({s}_{k}^{2}\). (c) Fourier spectra of the dynamics of the terminal spin \({S}_{j}^{z}\left(t\right)\) (top) and the nearest-neighbor spin \({S}_{{j}^{\mathrm{NN}}}^{z}\left(t\right)\) (bottom). The dashed lines display \({f}_{\mathrm{in}}^{1}=8/{t}_{\mathrm{in}}\) (light green) for the bit sequence \(\left\{{s}_{k}^{1}\right\}\) and \(2{f}_{\mathrm{in}}^{1}\) (dark green). The dotted lines show \({f}_{\mathrm{in}}^{2}=45/\left(2{t}_{\mathrm{in}}\right)\) (light blue) for the input sequence \(\left\{{s}_{k}^{2}\right\}\) and \(2{f}_{\mathrm{in}}^{2}\) (dark blue). The dashed-dotted lines represent the second harmonics frequencies \({f}_{\mathrm{in}}^{2}-{f}_{\mathrm{in}}^{1}\) (pink) and \({f}_{\mathrm{in}}^{1}+{f}_{\mathrm{in}}^{2}\) (purple). Strong intensities appear at around \(\pm\, {f}_{\mathrm{in}}^{1}\) and \(\pm\, {f}_{\mathrm{in}}^{2}\) in both spectra, while only that of the nearest-neighbor spin shows peaks at \(\pm\, 2{f}_{\mathrm{in}}^{1}\), \(\pm\, 2{f}_{\mathrm{in}}^{2}\), \(\pm\, \left({f}_{\mathrm{in}}^{2}-{f}_{\mathrm{in}}^{1}\right)\) and \(\pm\, \left({f}_{\mathrm{in}}^{1}+{f}_{\mathrm{in}}^{2}\right)\). (d) Reservoir performance for the logic gate tasks with frequency filters centered on \(\pm\, {f}_{\mathrm{in}}^{1}\) and \(\pm\, {f}_{\mathrm{in}}^{2}\). The blue and red bars represent \({R}^{2}\) utilizing the dynamics of the terminal spin and the nearest-neighbor spin, respectively. Additionally, the blue and red lines illustrate the corresponding accuracies, while the gray lines depict the accuracies when the output is randomly estimated, with values of 0.75 for AND, OR, NAND, and NOR tasks (dashed-dotted) and 0.5 for XOR and XNOR tasks (dotted). The linearly inseparable gates, XOR and XNOR, are nearly impossible with these frequency filters. (e) The same plot as (d) with frequency filters centered on \(\pm\, \left({f}_{\mathrm{in}}^{2}-{f}_{\mathrm{in}}^{1}\right)\) and \(\pm\, \left({f}_{\mathrm{in}}^{1}+{f}_{\mathrm{in}}^{2}\right)\). The performance of the nearest-neighbor spin becomes much better for all gating operations including the inseparable gates, owing to the nonlinear processes via the exchange interaction.

To begin with, the logic gate tasks—AND, OR, XOR, NAND, NOR, and XNOR—are demonstrated using signals in the frequency windows of \({f}_{\mathrm{in}}^{1}-1/\left(2{t}_{\mathrm{in}}\right)\le \left|f\right|<{f}_{\mathrm{in}}^{1}+1/\left(2{t}_{\mathrm{in}}\right)\) and \({f}_{\mathrm{in}}^{2}-1/\left(2{t}_{\mathrm{in}}\right)\le \left|f\right|<{f}_{\mathrm{in}}^{2}+1/\left(2{t}_{\mathrm{in}}\right)\). Figure 5d plots the reservoir performance for each task, where the blue and red bars exhibit \({R}^{2}\) with read-outs on the input site \(j\) and the nearest-neighbor site \({j}^{\mathrm{NN}}\). Additionally, the accuracy, calculated as the percentage of agreement between \({y}_{k}^{\prime}\) and \({\overline{y} }_{k}\), is also depicted by the blue and red lines. Here, \({y}_{k}^{\prime}\) corresponds to the binary output obtained by applying a threshold value of \(0.5\) to \({y}_{k}\). In the case of randomly generated outputs, the accuracy achieves \(0.75\) for the AND, OR, NAND, and NOR tasks, while it takes \(0.5\) for the XOR and XNOR tasks. By utilizing signals from the input site, the reservoir shows almost the same accuracy as in the random case, with moderate \({R}^{2}\sim 0.6\) for linearly separable tasks, namely AND, OR, NAND, and NOR, and extremely poor \({R}^{2}\sim 0\) for linearly inseparable tasks, XOR and XNOR. When utilizing the nearest-neighbor spin for the read-out, the performance becomes slightly better, but \({R}^{2}\) for the inseparable tasks are still low. Thus, although the signals containing input frequencies of \(\pm\, {f}_{\mathrm{in}}^{1}\) and \(\pm\, {f}_{\mathrm{in}}^{2}\) should possess information of both \({s}_{k}^{1}\) and \({s}_{k}^{2}\) as discussed above, the memories are concentrated around their assigned frequencies and have little effects on one another, making it difficult to resolve tasks that are heavily reliant on information in both frequencies.

In contrast, the spin dynamics at around the frequencies of \(\pm\, \left({f}_{\mathrm{in}}^{2}-{f}_{\mathrm{in}}^{1}\right)\) and \(\pm\, \left({f}_{\mathrm{in}}^{1}+{f}_{\mathrm{in}}^{2}\right)\) are equally influenced by \(\pm\, {f}_{\mathrm{in}}^{1}\) and \(\pm\, {f}_{\mathrm{in}}^{2}\) via the nonlinear process, retaining the memories of both \({s}_{k}^{1}\) and \({s}_{k}^{2}\). This is demonstrated by utilizing the spin dynamics at the neighboring site \({j}^{\mathrm{NN}}\) as a read-out, where information is nonlinearly transferred from the input site \(j\) via the exchange interaction. Figure 5e exhibits the reservoir performance for logic gate tasks using signals in the frequency windows of \({f}_{\mathrm{in}}^{2}-{f}_{\mathrm{in}}^{1}-1/\left(2{t}_{\mathrm{in}}\right)\le \left|f\right|<{f}_{\mathrm{in}}^{2}-{f}_{\mathrm{in}}^{1}+1/\left(2{t}_{\mathrm{in}}\right)\) and \({f}_{\mathrm{in}}^{1}+{f}_{\mathrm{in}}^{2}-1/\left(2{t}_{\mathrm{in}}\right)\le \left|f\right|<{f}_{\mathrm{in}}^{1}+{f}_{\mathrm{in}}^{2}+1/\left(2{t}_{\mathrm{in}}\right)\). With read-out on the nearest-neighbor site, the reservoir operates very well with \({R}^{2}>0.9\), as well as achieving an accuracy close to \(1\), for both linearly separable and inseparable tasks. These findings clearly indicate that the nonlinear processes via the exchange interaction enable two bits in different threads to exert an influence on one another. The importance of this coupling is evident from the very low \({R}^{2}\) and accuracy when utilizing the input spin as the read-out in Fig. 5e. In this case, the spin dynamics is dominated by the linear Zeeman coupling at \(\pm\, {f}_{\mathrm{in}}^{1}\) and \(\pm\, {f}_{\mathrm{in}}^{2}\), thereby obscuring the information at \(\pm\, \left({f}_{\mathrm{in}}^{2}-{f}_{\mathrm{in}}^{1}\right)\) and \(\pm\, \left({f}_{\mathrm{in}}^{1}+{f}_{\mathrm{in}}^{2}\right)\). Multi-bit tasks such as gating require mixing different information within the same reservoir dynamics, otherwise different bits cannot establish a nonlinear relationship. This is thus an operation that takes full advantage of the principle of superposition in the frequency domain, and is almost impossible with other parallelization schemes such as spatial domain multiplexing. In Supplementary Fig. S5, a more challenging logic gate task is demonstrated, involving inputs at different time steps. The high performance presented there serves as robust evidence confirming the system’s ability to handle nonlinear temporal tasks. We note, however, that the second harmonics in the dynamics of the nearest-neighbor spin are vulnerable to thermal noise, making linearly inseparable gating almost infeasible at finite temperature. This issue would be resolved by enhancing nonlinearity in models with different interactions, as we shall discuss later.

Discussion

In this paper, we have proposed a framework for physical reservoir computing in magnetic materials utilizing frequency domain dynamics. The input through an AC magnetic field and the selective read-out with frequency filters enable both thermal noise reduction and frequency division multiplexing, which are of great practical significance in the design of spintronic physical reservoir computing devices. In addition, by utilizing multiple read-outs, a substantial number of computational units can be integrated through parallelization in spatiotemporal domain. The inherent nonlinearity in the interacting spin systems allows the mixing of information stored in the spin dynamics at different frequencies.

In magnetic materials, the linearly introduced information via the Zeeman coupling is nonlinearly processed by the exchange interaction. This is where the differences in materials are most pronounced. For instance, an increase in connectivity and complexity of the interactions would enhance the nonlinearity of the spin dynamics, and longer-ranged interactions would propagate the input information over a wider region. When electrons in the system exhibit itinerant nature rather than localized one, the synergy between charge and spin degrees of freedom could alter the information transfer and processing. Moreover, in quantum spin systems, the reservoir takes advantage of the large dimensionality of Hilbert space, where quantum correlations and quantum entanglement would strongly influence the performance of the reservoir31,32,48,49. The impact of specific interactions on information processing will be a subject of future research.

The complexity of the magnetic structure contributes to the high dimensionality of the feature space where information is projected by a physical reservoir, providing ample resources for machine learning tasks. Here, the dimension corresponds to the number of spins whose dynamics is linearly independent, which determines the number of parameters in the feature space. In general, the spin dynamics in a uniform environment, such as a ferromagnetic state, can be described with a few parameters, while those in a complex environment require many parameters. Our reservoir with a frustrated magnet, consisting of only three sublattices, yields low-dimensional internal states, yet proves sufficient for the tasks demonstrated; we confirm magnets with solely nearest-neighbor ferromagnetic interactions are too simple to be employed for computation. Physical reservoirs with more complex magnetic textures would project information onto higher-dimensional feature spaces, which would enhance computational performance for complicated tasks, as presented in skyrmion systems27,28. Our protocol can be implemented experimentally either by employing a probe microscope, such as an atomic force microscope or a scanning tunneling microscope, to apply a local magnetic field or, alternatively, by utilizing standard equipment to apply a magnetic field to the entire magnetic material. As for the comprehensive influence of detailed magnetic structures on information processing, we leave their theoretical and experimental elucidation to future investigations.

In addition to its thermal robustness and parallel processing capabilities, our scheme exhibits versatility in its broad applicability to a variety of spintronic physical reservoirs with input by AC signals and read-out by time-varying signals. In magnetoelectric systems, for instance, the information could be embedded and extracted via either magnetic or electrical AC signals, while taking advantage of the nonlinearity of the spin-charge coupled dynamics for information processing50,51. The input information should be stored within the spin and charge dynamics at the characteristic frequency bands, where frequency filtering would play an important role. It is worth noting that the utilization of frequency filters extends beyond spintronic physical reservoirs; its applicability can encompass a wide range of oscillator systems20,46,52,53 where information is distributed within a specific range in frequency domain. Consequently, our implementation-independent protocol of frequency filtering would be integrated into various types of physical reservoirs as a component to enhance computational capability by enabling noise reduction and frequency division multiplexing. Our discovery opens up the way for hardware implementation of large-scale intelligent systems that exploit complex physical dynamics for real-time computation.

Methods

LLG calculation

To simulate the magnetization dynamics, we employ the stochastic LLG equation summarized in Eq. (3). The effective magnetic field \({\mathbf{H}}_{i}^{\mathrm{eff}}\) includes the exchange field \({\mathbf{H}}_{i}^{\mathrm{ex}}\) and the thermal field \({\mathbf{H}}_{i}^{\mathrm{th}}\). The former is given by the \({\mathbf{S}}_{i}\) derivative of the Hamiltonian [Eq. (1)] as \({\mathbf{H}}_{i}^{\mathrm{ex}}=-\partial \mathcal{H}/\partial {\mathbf{S}}_{i}\), and the latter is introduced as a white noise with the following properties:

$$\begin{array}{c}\langle {\mathbf{H}}_{i}^{\mathrm{th}}\left(t\right)\rangle =0, \,\,\,\langle {\mathbf{H}}_{i}^{\mathrm{th}}\left(t\right){\mathbf{H}}_{i}^{\mathrm{th}}\left({t}^{\prime}\right)\rangle =\frac{2\alpha T}{\Delta t}\delta \left(t-{t}^{\prime}\right){\delta }_{ij},\end{array}$$
(5)

where \(\Delta t\) denotes the time step (we take \(\Delta t\) = 0.005), \(\delta (t)\) the Dirac delta function, and \({\delta }_{ij}\) the Kronecker delta. The time evolution is traced by the fourth-order Runge–Kutta method. At each temperature, equilibrium spin configurations are obtained by relaxation for a sufficient time starting from a complete in-plane 120° structure, and they are used as an initial state of the reservoir. The temperature dependences of the energy and specific heat are in agreement with the previous results using Monte Carlo calculations33,54.

Scheme for training and testing

We take sequences of binary digits \(\left\{{s}_{k}\right\}\), and each data \({s}_{k}\) is fed to the system by the out-of-plane input magnetic field to the input terminal spin. The time interval \({t}_{\mathrm{in}}=12\) is selected to strike a balance between being excessively brief and overly extended for the information input, yielding the most optimal performance among all the alternatives we experimented with. The internal state is characterized by the induced out-of-plane dynamics at the read-out spin as the \(1\times \left({N}_{t}+1\right)\)-dimensional vector \({\mathbf{X}}_{k}\) [Eq. (4)] that is then linearly transformed to the output \({y}_{k}\) by the \(\left({N}_{t}+1\right)\times 1\)-dimensional weight \(\mathbf{w}\). In total \({l}^{\mathrm{tot}}=6,000\) inputs are used: \({l}^{\mathrm{w}}=2,000\) to warm up the system, \({l}^{\mathrm{tr}}=2,000\) for training of \(\mathbf{w}\), and \({l}^{\mathrm{ts}}=2,000\) for testing the reservoir performance. Since they are sufficiently large numbers compared to the number of tuning parameters \({N}_{t}+1\) \(\left({N}_{t}=120\right)\), the generalization performance is preserved without overfitting. The vectors \(\left\{{\mathbf{X}}_{k}\right\}\) at training phase and test phase are summarized to an \({l}^{\mathrm{tr}}\times ({N}_{t}+1)\) matrix \({\mathbf{X}}^{\mathrm{tr}}={\left\{{\mathbf{X}}_{k}\right\}}_{k={l}^{\mathrm{w}}}^{{l}^{\mathrm{w}}+{l}^{\mathrm{tr}}}\) and an \({l}^{\mathrm{ts}}\times ({N}_{t}+1)\) matrix \({\mathbf{X}}^{\mathrm{tr}}={\left\{{\mathbf{X}}_{k}\right\}}_{k={l}^{\mathrm{w}}+{l}^{\mathrm{tr}}}^{{l}^{\mathrm{w}}+{l}^{\mathrm{tr}}+{l}^{\mathrm{ts}}}\), and correspondingly the target output vectors are given by an \({l}^{\mathrm{tr}}\times 1\) vector \({\overline{\mathbf{y}} }^{\mathrm{tr}}={\left\{{\overline{y} }_{k}\right\}}_{k={l}^{\mathrm{w}}}^{{l}^{\mathrm{w}}+{l}^{\mathrm{tr}}}\) and an \({l}^{\mathrm{ts}}\times 1\) vector \({\overline{\mathbf{y}} }^{\mathrm{ts}}={\left\{{\overline{y} }_{k}\right\}}_{k={l}^{\mathrm{w}}+{l}^{\mathrm{tr}}}^{{l}^{\mathrm{w}}+{l}^{\mathrm{tr}}+{l}^{\mathrm{ts}}}\). The weight should be trained to satisfy \({\overline{\mathbf{y}} }^{\mathrm{tr}}={\mathbf{X}}^{\mathrm{tr}}\cdot \mathbf{w}\), which is impossible for overdetermined systems with \({l}^{\mathrm{tr}}\gg {N}_{t}+1\). Alternatively, we optimize \(\mathbf{w}\) to minimize the least squares error between vectors on both sides, which is analytically given by \(\mathbf{w}={\mathbf{X}}^{{\mathrm{tr}}^{+}}\cdot {\overline{\mathbf{y}} }^{\mathrm{tr}}\) where \({\mathbf{X}}^{+}\) is the Moore–Penrose pseudoinverse-matrix. The output in the testing phase is calculated by \(\mathbf{y}={\mathbf{X}}^{\mathrm{ts}}\cdot \mathbf{w}\) and the similarity to the desired output \({\overline{\mathbf{y}} }^{\mathrm{ts}}\) is evaluated using the determination coefficient \({R}^{2}={\mathrm{cov}}^{2}\left({\mathbf{y}}^{\mathrm{ts}}, {\overline{\mathbf{y}} }^{\mathrm{ts}}\right)/[{\sigma }^{2}\left({\mathbf{y}}^{\mathrm{ts}}\right){\sigma }^{2}\left({\overline{\mathbf{y}} }^{\mathrm{ts}}\right)]\).

Frequency filtering

The spin dynamics in the training phase \({S}^{\mathrm{tr}}(t)\) and in the testing phase \({S}^{\mathrm{ts}}(t)\) are calculated every time step \(\Delta t\) = 0.005 by the stochastic LLG equation, with the observation time being \({l}^{\mathrm{tr}}\times {t}_{\mathrm{in}}=\mathrm{24,000}\) for training and \({l}^{\mathrm{ts}}\times {t}_{\mathrm{in}}=\mathrm{24,000}\) for testing. The dynamics in time domain \({S}^{\mathrm{tr}}(t)\) and \({S}^{\mathrm{ts}}(t)\) are independently Fourier transformed to \({S}^{\mathrm{tr}}(f)\) and \({S}^{\mathrm{ts}}(f)\) with a sampling frequency of \(1/\Delta t=200\) and a frequency resolution of \(1/\mathrm{24,000}\). Of these, only the desired frequency components are inverse Fourier transformed to real-time dynamics \({S}_{\mathrm{filtered}}^{\mathrm{tr}}(t)\) and \({S}_{\mathrm{filtered}}^{\mathrm{ts}}(t)\), which are then used to the construct internal state vectors \({\mathbf{X}}^{\mathrm{tr}}\) and \({\mathbf{X}}^{\mathrm{ts}}\), respectively. It is worth noting that the frequency filter can be implemented experimentally by attaching electrical components that pass desired frequency components of the measured spin dynamics signal, such as a bandpass filter, outside the physical reservoir. The installation of these components does not make our system unnecessarily complex or slow, thus preserving the advantages of the simplicity of our reservoir even with frequency filtering.