Optical Convolutional Neural Network with Atomic
Nonlinearity
Mingwei Yang1 ,2 , Elizabeth Robertson1 ,2 , Luisa Esguerra1 ,2 , Janik Wolters1 ,2
1. Deutsches Zentrum für Luft- und Raumfahrt e.V. (DLR), Rutherfordstraße 2, D-12489, Berlin, Germany 2.
Technische Universität Berlin, Straße des 17. Juni 135, D-10623, Berlin, Germany

Abstract: An optical convolutional neural network is demonstrated in which linear operations areimplemented by lenses and digital micro mirror devices, while an optical nonlinearity is realized
by cesium atoms as a saturable absorber. This system classifies the handwritten digital dataset
MNIST [1] with 83.96% accuracy, which agrees well with corresponding simulations. Our results thus
demonstrate the viability of utilizing atomic nonlinearities in neural network architectures with low
power consumption.

Convolutional neural networks (CNNs) have become an indispensable part of machine learning due totheir successful application on image-based machine learning problems. However, the compute resources
required to train and infer such CNNs scale quadratically with problem size, thus expense of time andenergy is large. Unlike electrons, photons can be used to naturally realize massive and parallel interconnections [2], achieve clock speeds in the GHz range and most importantly the computational cost for
optical convolutions scales only linearly with problem size. Thus, optical computing is becoming ever more
attractive. Within the broader context of artificial neural networks, linear-optics implementations canbe realized through free-space or integrated methods. The former encompasses diffractive materials andspatial light modulators (SLMs), etc., while the latter involves phase-change materials and semiconductor optical amplifiers, among others. Mechanisms for achieving optical nonlinearity include atom-based
nonlinearities, saturable absorption in thermal atoms, and electromagnetically induced transparency, as
well as solid-state approaches such as the use of phase-change materials. Here we demonstrate an opticalconvolutional neural network (OCNN) in which both linear operations and the nonlinearity are realized
optically. The handwritten digit dataset MNIST is used to train and benchmark the OCNN.
We implement the OCNN with one input layer, one optical convolutional layer, one fully connected
layer followed by one output layer. An optical nonlinearity is applied after the convolutional layer [Fig.
1]. The OCNN performs the convolution process by employing the convolution theorem
f (x) ∗ h(x) = F −1 {F[f (x)] · F[h(x)]}(1)

and the Fourier transform properties of lenses. Specifically, the convolution (∗) of the input f (x) and thekernel h(x) is the inverse Fourier transform (F −1 ) of the pointwise product (·) of their Fourier transforms(F[f (x)], F[h(x)]). These individual parts can be performed optically and passively by constructing a 4fsystem with two digital micromirror devices and two lenses. Thus, the convolved images can be observedin the front focal plane of the second lens. A CMOS camera acts as an analog-to-digital converter. A
digital fully connected layer is implemented in the computer to connect the nonlinear activated featuremaps and the output layer. We simulate the system based on the experimental setup, which is usedto train both the kernel of the OCNN and the digital fully connected layer. The trained kernel is thenFigure 1: Sketch of the experimental setup.
displayed in the experiment and the inference process is executed for both simulation and experiment,
for the same kernel and fully connected layer. In the experiment, the optical nonlinearity is provided bya cesium vapor cell. The cesium atoms absorb on-resonant photons and are excited to the excited state.

This absorption process results in attenuation of the intensity of the beam passing through the atoms.
The relation between the output intensity I and the input intensity I0 is−OD0I = I0 exp,(2)1 + I0 /Is
where I, I0 , Is represent the output intensity, input intensity, and saturation intensity, respectively. The
optical depth at I0 = 0 is given by OD0 .
When the input intensity I0 reaches the saturation intensity Is , the absorption is reduced by 50%.
The input-output relation thus follows a nonlinear shape. While varying the incident laser power tothe cesium vapor cell, we measure the resulting pixel intensity detected by the CMOS camera with andwithout the Cs cell, respectively. The measured and fitted input-output relation of the nonlinearity isused to provide the optical nonlinearity for the OCNN [Fig. 2].

Figure 2: Measured input-output average pixel brightness and the corresponding fit curve. Fitting theexperimental data to Eq. (1) gives OD0 = 1.38, Is = 62.31 pixel brightness. The axes represent theaverage grayscale value of the picture without (input) and with (output) the vapor cell, respectively.
The prediction accuracy of the OCNN setup for recognizing the MNIST are summarized in Table 1.
The simulation of the OCNN achieve 92.6% and 93.2% accuracy with the cesium absorption function andthe ReLU function as nonlinearity, respectively. The OCNN setup achieves 70.72% and 71.84% accuracy
with and without the vapor cell in the setup, respectively. We train a mapping matrix using the full
10, 000 test data being processed by the optical system. This linear mapping is used to modify the fully
connected layer, i.e. to retrain it to the experimental data. With the help of this training, the accuracy
increases to 83.96% and 91.9% as a result of with and without the vapor cell, respectively.
Non-linearity
Simulation
OCNN (No mapping matrix)
OCNN (With mapping matrix)

Cs Vapor
92.6%
71.84%
83.96%

ReLU
93.2%
70.72%
91.9%

No nonlinearity
90.8%
45.59%
89.3%

Table 1. Summary of OCNN prediction accuracy. Each kernel is individually trained for each case. Nononlinearity means that no additional nonlinearity is added beyond the inherent nonlinearity of thecamera.
In summary, we have demonstrated an optical convolutional neural network with atomic nonlinearity.
The effectiveness of the atomic vapor cell suggests that it has great potential to provide optical nonlinear
activation functions for neural networks with other topologies. It is an attractive candidate for use inmultilayer optical neural networks with several SLMs and vapor cells in series. Moreover, the atomic
nonlinearity enables the possibilities for realizing multilayer ONNs with all-optical training [3].

References[1] LeCun, Y. The MNIST database of handwritten digits. Http://yann. Lecun. Com/exdb/mnist/.
(1998)[2] Caulfield, H., Kinser, J. & Rogers, S. Optical neural networks. Proceedings Of The IEEE. 77, 15731583 (1989)[3] Guo, X., Barrett, T., Wang, Z. & Lvovsky, A. Backpropagation through nonlinear units for theall-optical training of neural networks. Photonics Research. 9, B71-B80 (2021)