In the last decade, the recurrent neural network (RNN) as a basic architecture of deep learning has achieved great success in various fields, such as time series analysis1
Advanced Photonics Nexus, Volume. 3, Issue 6, 066006(2024)
Optoelectronic reservoir computing based on complex-value encoding
Optical reservoir computing (ORC) offers advantages, such as high computational speed, low power consumption, and high training speed, so it has become a competitive candidate for time series analysis in recent years. The current ORC employs single-dimensional encoding for computation, which limits input resolution and introduces extraneous information due to interactions between optical dimensions during propagation, thus constraining performance. Here, we propose complex-value encoding-based optoelectronic reservoir computing (CE-ORC), in which the amplitude and phase of the input optical field are both modulated to improve the input resolution and prevent the influence of extraneous information on computation. In addition, scale factors in the amplitude encoding can fine-tune the optical reservoir dynamics for better performance. We built a CE-ORC processing unit with an iteration rate of up to ∼1.2 kHz using high-speed communication interfaces and field programmable gate arrays (FPGAs) and demonstrated the excellent performance of CE-ORC in two time series prediction tasks. In comparison with the conventional ORC for the Mackey–Glass task, CE-ORC showed a decrease in normalized mean square error by ∼75 % . Furthermore, we applied this method in a weather time series analysis and effectively predicted the temperature and humidity within a range of 24 h.
1 Introduction
In the last decade, the recurrent neural network (RNN) as a basic architecture of deep learning has achieved great success in various fields, such as time series analysis1
In order to tackle complicated tasks, the current ORC has evolved from the early small-scale silicon-based ORC16,17 to time-delay ORC18
Here, we propose complex-value encoding-based optoelectronic reservoir computing (CE-ORC) through the modulation of the complex amplitude of the optical field. This development enhances the discrimination of data in the optical field and prevents the influence of task-irrelevant information on computation. In addition, complex-value encoding for the convenient introduction of scale factors as hyperparameters, tuning the optical reservoir to achieve optimal accuracy performance. We have built a CE-ORC processing unit with thousands of neurons based on a digital micromirror device (DMD) and scattering media. The dedicated field programmable gate array (FPGA) board has been developed to optimize the iteration rate of the processing unit using parallel processing and high-speed interfaces. We demonstrated the excellent performance of CE-ORC, which showed better prediction accuracy than the conventional ORC in both MG time series prediction and weather forecast.
Sign up for Advanced Photonics Nexus TOC Get the latest issue of Advanced Photonics delivered right to you!Sign up now
2 Methods
2.1 Principle of CE-ORC
The fundamental idea of CE-ORC is employing the multidimensional property of the optical field to improve the input resolution of the ORC system and introduce multiple hyperparameters to tune the reservoir dynamics for better accuracy performance. As shown in Fig. 1, we construct the optical reservoir with the combination of scattering medium and detector. The CE-ORC first converts the input state defined in the real space and the previous optical reservoir state to the corresponding complex vectors using the complex-valued encoding strategy (see Sec. 2.2). The combination of these two vectors will be loaded on the incident optical field through modulation. The modulated optical field as the input will propagate through the scattering medium to update the reservoir state. The current optical reservoir state, in the end, will be mapped to the output of CE-ORC through a linear operation.
Figure 1.Principle of CE-ORC. The complex-valued encoding strategy converts the input state
The complex-valued encoding strategy first encodes the real-value information into amplitude vector
The incident optical field
Based on the current state
Here,
2.2 Complex-value Encoding Based on a DMD
A complex-value encoding strategy based on the multidegree-of-freedom characteristic of the optical field is proposed to improve the input resolution. In this encoding strategy, we converted a real number
Here,
We generated the optical field by modulating the incident laser beam with a DMD. In the conventional method, the DMD provided only a binary amplitude modulation on the incident light. In CE-ORC, we introduced the superpixel encoding to modulate both the amplitude and phase of incident light. This encoding grouped
2.3 Experimental Setup and Characterization
Figure 2(a) shows a kind of CE-ORC implementation based on a DMD. To manipulate both the amplitude and phase of the optical field with the DMD, we adopted the superpixel technique30,31 (Note 2 and Fig. S2 in the Supplemental Material) modulating the incident laser. The superpixel technique loaded the complex information in the first-order diffraction from the DMD. The specific form of the complex information depended on the input and previous state. After being filtered out by a pinhole placed off-axis, the first-order diffraction was then transmitted through the scattering medium that mimicked the reservoir. In the end, a detector recorded the pattern of speckles as the current state. The above process corresponds to one optical reservoir update and it will be repeated as many times as there are reservoir states to compute.
Figure 2.Experimental setup and characterization of CE-ORC system. (a) Schematic illustration and physical demonstration of the CE-ORC implementation. M, mirror;
For demonstration, we constructed a CE-ORC processing unit with the size of
We evaluated the input resolution of the CE-ORC processing unit and compared it with the conventional basket-encoding ORC with respect to the normalized distance matrix of the encoded information [Fig. 2(c)]. The element in the distance matrix is the Euclidean distance between the encoded vectors corresponding to the horizontal and vertical coordinates. The distance matrix of the original data in real space is also shown in Fig. 2(c). In comparison, the distance matrix generated by CE-ORC shows a higher degree of similarity to the distance matrix of the original data. This indicates that the CE-ORC can well express the differences between two original data in the optical field and has a high input resolution. Moreover, the input resolution of CE-ORC is almost independent of the scale factor because the normalized distance matrix does not change significantly as the scale factor decreases. In addition, we evaluated the effect of input resolution improvement on the optical reservoir by the correlation matrix of the speckle patterns for different inputs [Fig. 2(d)]. Speckle patterns captured by the detector are the responses of the optical reservoir to inputs. In comparison, the richness of the responses in CE-ORC was better than that in the conventional basket-encoding ORC, whose correlation matrix was highly fragmented. All this evidence supports that CE-ORC has richer optical reservoir states due to the improved input resolution, which can achieve better task performance than conventional ORC.
2.4 Details of Experimental Setup
We introduced a laser with a 532 nm wavelength into the CE-ORC processing unit through a single-mode fiber. The lens
To optimize the computation speed of the CE-ORC processing unit, we eliminated unnecessary data transfer between hardware and computer during task execution and utilized high-speed interfaces and the powerful parallel processing capability of FPGAs. The FPGA board communicated with the DMD control card and CMOS control card through four SerDes interfaces that supported a high-speed transmission rate of up to 20 Gbps. To prevent the reduction of interaction efficiency between the DMD and CMOS caused by computer processing, we integrated the processing programs for CE-ORC into the FPGA board so that operations, such as extracting the optical reservoir state, complex-value encoding, and superpixel encoding could be executed on the board. In addition, the FPGA board was equipped with 42 MB of BRAM and 16G of DDR4. The ample storage resources on the board enabled us to employ high-efficiency lookup tables, resulting in a significant reduction of time spent on encoding operations. Moreover, the FPGA board supported 150 lookup tables working synchronously. Finally, The CE-ORC processing unit could complete 1000 computations in
3 Results
3.1 MG Time Series Prediction
To confirm the utility of CE-ORC for the time series analysis, we tested the CE-ORC processing unit on the MG time data set (Note 3 in the Supplemental Material), including 8250 steps. The reservoir node size was set to 512. The state of each node was encoded as a 10-dimensional complex vector so that the state vector of the reservoir had a dimension of
Figure 3.The horizontal coordinate representing time has been normalized with respect to the Lyapunov exponent
We observed that the CE-ORC had the optimal prediction performance when
In the one-step prediction, the outputs of optimized CE-ORC were almost identical to the values given in the target data set [Fig. 3(c)]. The prediction errors from CE-ORC were much smaller than those from the conventional basket-encoding ORC [Fig. 3(d)]. Their corresponding NMSEs were
3.2 Weather Forecast
Furthermore, we tested the CE-ORC on weather data to demonstrate its capability in real-world applications. The weather data set was the record 14,400 h of temperature and humidity from Shanghai Hongqiao International Airport from January 1, 2018. The reservoir contained 5000 nodes. The state of each node was encoded as a 10-dimensional complex vector so that the state vector of the reservoir had a dimension of
In the free-running prediction, we fed the first 14,280 steps for training and the other 120 steps for testing. We found that the CE-ORC processing unit reached the optimal prediction performance for temperature and humidity with the parameter configurations of
Figure 4.Test of CE-ORC for weather forecast. (a) Predictions of temperature made by the CE-ORC and conventional basket-encoding ORC in the free-running prediction mode. (b) Predictions of humidity made by the CE-ORC and conventional basket-encoding ORC in the free-running prediction mode. (c) Predictions of temperature made by the CE-ORC in the one-step prediction mode. (d) Errors in the predictions of humidity made by the CE-ORC in the one-step prediction mode.
In the one-step prediction, we fed the CE-ORC model with the first 13,400 steps for training and the other 1000 steps for testing. The predictions of CE-ORC were almost the same as the real data [Figs. 4(c) and 4(d)] because the errors in prediction did not accumulate. The errors in their predictions were within 2.5 Fahrenheit and 6%, respectively. These results show that by tuning the reservoir dynamics, the CE-ORC has good accuracy performance in weather forecasts and can adapt well to task changes.
4 Discussion and Conclusion
We proposed CE-ORC, which introduced complex-value encoding to spatial light-based ORC, enhancing input resolution and expanding system configurability through multiple hyperparameters (including two scale factors and the leak rate), thereby enabling the adjustment of optical reservoir dynamics and significantly improving prediction accuracy. Furthermore, the CE-ORC processing unit we constructed modulates the complex amplitude of the optical field using a DMD, facilitating rapid parallel encoding of large-scale information in the spatial domain. Controlled by a dedicated FPGA board, this unit optimized the iteration rate to
The major factors constraining the scale of CE-ORC are the dimensions of the DMD and superpixel encoding that grouped multiple neighboring DMD pixels into one superpixel to modulate both the amplitude and phase of the optical field. This implantation reduced the dimensions of the state of the reservoir and of the input of the neural network. The nonlinear activation of CE-ORC was simply measuring the light intensity that could be replaced by a more efficient optical nonlinear operation to further improve performance. When implementing CE-ORC, several important considerations should be taken into account. The size of the reservoir should be configured according to the complexity of the task. In general, more complex tasks require larger reservoir sizes. However, caution must be exercised to avoid overfitting, which can occur if the reservoir size is excessively large relative to the task complexity. In addition, ensuring the detector has good sensitivity and a high signal-to-noise ratio is essential to maintain system performance and processing speed because of the use of pinholes in the CE-ORC optical setup.
Jiamiao Yang received his PhD from Beijing Institute of Technology in 2015. He worked as a postdoctoral research associate in the Caltech Optical Imaging Laboratory at the California Institute of Technology until 2020. Currently, he is an associate professor at Shanghai Jiao Tong University. He is the author of more than 30 journal papers. His research focuses on wavefront shaping, optical measurement, and optical computing.
Biographies of the other authors are not available.
[8] N. Talati et al. mMPU: a real processing-in-memory architecture to combat the von Neumann bottleneck, 191-213(2020).
[20] K. Kanno, A. Uchida. Photonic reinforcement learning based on optoelectronic reservoir computing. Sci. Rep., 12, 3720(2022).
[22] J. Dong et al. Scaling up echo-state networks with multiple light scattering, 448-452(2018).
[28] M. Lukoševičius. A practical guide to applying echo state networks. Neural Networks: Tricks of the Trade: Second Edition, 659-686(2012).
Get Citation
Copy Citation Text
Chunxu Ding, Rongjun Shao, Jingwei Li, Yuan Qu, Linxian Liu, Qiaozhi He, Xunbin Wei, Jiamiao Yang, "Optoelectronic reservoir computing based on complex-value encoding," Adv. Photon. Nexus 3, 066006 (2024)
Received: Apr. 15, 2024
Accepted: Sep. 24, 2024
Published Online: Oct. 24, 2024
The Author Email: Xunbin Wei (xwei@bjmu.edu.cn), Jiamiao Yang (jiamiaoyang@sjtu.edu.cn)