Summary
Despite advances in artificial intelligence models, neural networks still cannot achieve human performance, partly due to differences in how information is encoded and processed compared with human brain. Information in an artificial neural network (ANN) is represented using a statistical method and processed as a fitting function, enabling handling of structural patterns in image, text, and speech processing. However, substantial changes to the statistical characteristics of the data, for example, reversing the background of an image, dramatically reduce the performance. Here, we propose a quantum superposition spiking neural network (QS-SNN) inspired by quantum mechanisms and phenomena in the brain, which can handle reversal of image background color. The QS-SNN incorporates quantum theory with brain-inspired spiking neural network models from a computational perspective, resulting in more robust performance compared with traditional ANN models, especially when processing noisy inputs. The results presented here will inform future efforts to develop brain-inspired artificial intelligence.
Subject areas: quantum theory, artificial intelligence, artificial intelligence theory
Graphical abstract
Highlights
-
•
Quantum and neuroscience research inspire new methods for artificial intelligence
-
•
QS-SNN integrates characteristics of quantum superposition state and brain spikes
-
•
QS-SNN can handle the background reverse visual inputs well
-
•
QS-SNN model is robust to reverse pixels noise and Gaussian noise on visual inputs
Quantum theory; Artificial intelligence; Artificial intelligence theory
Introduction
Many machine learning methods using quantum algorithms have been developed to improve parallel computation. Quantum computers have also been shown to be more powerful than classical computers when running certain specialized algorithms, including Shor's quantum factoring algorithm (Shor, 1999), Grover's database search algorithm (Grover, 1996), and other quantum-inspired computational algorithms (Manju and Nigam, 2014).
Quantum computation can also be used to find eigenvalues and eigenvectors of large matrices. For example, the traditional principal components analysis (PCA) algorithm calculates eigenvalues by decomposition of the covariance matrix; however, the computational resource cost increases exponentially with increasing matrix dimensions. For an unknown low-rank density matrix, quantum-enhanced PCA can reveal the quantum eigenvectors associated with the large eigenvalues; this approach is exponentially faster than the traditional method (Lloyd et al., 2014).
K-means is a classic machine learning algorithm that classifies unlabeled data sets into k distinct clusters. A quantum-inspired genetic algorithm for K-means has been proposed, in which a qubit-based representation is employed for exploration and exploitation in discrete “0” and “1” hyperspace. This algorithm was shown to obtain the optimal number of clusters and the optimal cluster centroids (Xiao et al., 2010). Quantum algorithms have also been used to speed up the solving of subroutine problems and matrix inversion problems (Harrow et al., 2009); for example, Grover's algorithm (Grover, 1996) provides quadratic speedup of a search of unstructured databases.
The quantum perceptron and quantum neuron computational models combine quantum theory with neural networks (Schuld et al., 2014). Compared with the classical perceptron model, the quantum perceptron requires fewer resources and benefits from the advantages of parallel quantum computing (Schuld et al., 2015; Torrontegui and García-Ripoll, 2019). The quantum neuron model (Cao et al., 2017; Mangini et al., 2020) can also be used to realize classical neurons with sigmoid or step function activation by encoding inputs in quantum superposition, thereby processing the whole data set at once. Deep quantum neural networks (Beer et al., 2020) raise the prospect of deploying deep learning algorithms on quantum computers.
Spiking neural networks (SNNs) represent the third generation of neural network models (Maass, 1997) and are biologically plausible from neuron, synapse, network, and learning principles perspectives. Unlike the perceptron model, neurons in an SNN accept signals from pre-synaptic neurons, integrating the post-synaptic potential and firing a spike when the somatic voltage exceeds a threshold. After spiking, the neuron voltage is reset in preparation for the next integrate-and-fire process. SNNs are powerful tools for representation and processing of spatial-temporal information. Many types of SNNs have been proposed for different purposes. Examples include visual pathway-inspired classification models (Zenke et al., 2015; Zeng et al., 2017), basal ganglia-based decision-making models (Héricé et al., 2016; Cox and Witten, 2019; Zhao et al., 2017), and other shallow SNN (Khalil et al., 2017; Shrestha and Orchard, 2018). Different SNN may include different types of biologically plausible neurons, e.g., the leaky integrate-and-fire (LIF) model (Gerstner and Kistler, 2002), Hodgkin–Huxley model, Izhikevich model (Izhikevich, 2003), and spike response model (Gerstner, 2001). In addition, many different types of synaptic plasticity principles have been used for learning, including spike-timing-dependent plasticity (Dan and Poo, 2004; Frémaux and Gerstner, 2016), Hebbian learning (Song et al., 2000), and reward-based tuning plasticity (Héricé et al., 2016).
Quantum superposition SNN has theoretic basis in both biology (Vaziri and Plenio, 2010) and computational models (Kristensen et al., 2019). From one perspective, spiking neuron models, such as the LIF and Izhikevich models, can be reformed by quantum algorithms in order to accelerate their processing using a quantum computer. On the other hand, quantum effects such as entanglement and superposition are regarded as special information-interactive methods and can be used to modify the classical SNN framework to generate similar behavior to that of particles in the quantum domain. In this work, we follow the latter approach. More specifically, we use a quantum superposition mechanism to encode complementary information simultaneously and further transfer it to spike trains, which are suitable for SNN processing. In our proposed quantum superposition SNN (QS-SNN) model, quantum state representation is integrated with spatiotemporal spike trains in SNN. This characteristic is conducive to good model performance not only on standard image classification tasks but also when handling color-inverted images. QS-SNN encodes the original image and the color-inverted image in the format of quantum superposition; the changing background context demonstrated by the spiking phase and spiking rate contains the image pixels' identity information.
We combine quantum superposition information encoding with SNN for three reasons. First, the possible influence of quantum effects on biological processes and the related quantum brain hypothesis have been theoretically investigated (Vaziri and Plenio, 2010; Fisher, 2015; Weingarten et al., 2016). Second, quantum superposition states are represented by vectors in complex Hilbert space, in contrast to traditional artificial neural network (ANN), which operate in real space only; this is more representative of brain spikes, as the spiking rate and spiking phase spatiotemporal property also have complex number representation. In essence, SNN are more appropriate for quantum-inspired superposition information encoding. Third, current quantum machine learning methods, especially those used for quantum image processing, focus on encoding a classical image in the quantum state, with the image processing methods accelerated by quantum computing (Iyengar et al., 2020). There has been less exploration of the possibility of using a quantum superposition state coding mechanism for different pattern information-processing frameworks. More importantly, owing to the use of statistical methods and fitting functions, current ANN show a huge performance drop when required to recognize a background-inverted image. This inspired us to develop a new information representation method unlike that used in traditional models. The integration of characteristics from SNN and quantum theory is intended to achieve a better representation of multi-states and potentially enable easier solving of tasks that are challenging for traditional ANN and SNN models.
The subsequent sections describe how complementary superposition information is generated and transferred to spatiotemporal spike trains. A two-compartment SNN is used to process the spikes. The proposed model, combining complementary superposition information encoding with the SNN spatiotemporal property, can successfully recognize a background color-inverted image, which is hard for traditional ANN models.
Complementary superposition information encoding
Quantum image processing
Quantum image processing combines image processing methods with quantum information theory. There are many approaches to internal representation of an image in a quantum computer, including flexible representation of quantum images (FRQIs), NEQR, GQIR, MCQI, and QBIP (Iyengar et al., 2020; Mastriani, 2020), which transfer the image to appropriate quantum states for the next step of quantum computing. Our approach is inspired by the FRQI method (Le et al., 2011), as shown in Equations (1) and (2):
(Equation 1) |
(Equation 2) |
where is the quantum image, qubit represents the position of a pixel in the image, and encodes the color information of the pixels. FRQI satisfies the quantum state constraint in Equation (3):
(Equation 3) |
Complementary superposition spikes
We propose a complementary superposition information encoding method and establish a linkage between quantum image formation and spatiotemporal spike trains. The complement code is widely used in computer science to turn subtraction into addition. We encode the original information and complementary information into a superposition state; one example is shown in Equation (4), with the rightmost sign bit removed and taking the complement:
(Equation 4) |
Equation (4) is an illustration of how complementary superposition information encoding works, with no factual significance. In this work, we focus on quantum image superposition encoding, as in Equation (5). However, it should be noted that any form of information that has a complement format, not just an image, can be encoded as a superposition state. Images in complementary quantum superposition states are further transferred to spike trains, as depicted in Figure 1. An image in its complementary state has an inverted background.
(Equation 5) |
(Equation 6) |
Figure 1.
Quantum complementary superposition information encoding
(A) The horizontal axis and longitudinal axis represent and , respectively. The parameter θ in Equation (5) measures the degree to which the image background is inverted, from (the original image) to the complementary state (totally inverted background).
(B) The top pictures show images inverted to different degrees, and the spikes to which they are encoded. The bottom axis corresponds to the value of θ. It should be noted that the pictures are intuitive demonstration instead of exact display.
The complementary quantum superposition encoding is shown in Equations (5) and (6), where the represent pixel positions. Unlike FRQI, which uses qubits only for color encoding, here we use complementary qubits for encoding both original image pixels and the color-inverted image with , supposing the pixel domain ranges from 0 to 1.0. The parameter represents the degree of quantum image , mixing the original state and reverse state .
We designed quantum circuit for the generation of quantum superposition image as shown in the Figure 2A, which is also discussed in (Le et al., 2011; Dendukuri and Luu, 2018). The quantum state is processed by Hadamard transform H and controlled gate to form the complementary state with:
(Equation 7) |
Figure 2.
Quantum superposition spike trains
(A) The circuit to generate quantum image. Only one image pixel state is depicted for perspicuity.
(B) A schematic diagram shows the transformation of quantum superposition states to spike trains . With parameter increasing, spike trains are shifted in time dimension. T is a simulation period in which spikes emerge within the time window. Also, the relation of parameter and spiking phase is intuitive example and not exact correspondence.
Then rotation matrices is used to encode phase information as
(Equation 8) |
Finally, the superposition state is measured and two states are retrieved with probability and .
The complex information in quantum encoding is similar to signal processing in SNN. Neuron spikes can encode spatiotemporal information with specific spiking rates and spiking times, which can be used to represent quantum information.
Neuron spikes have the attribute of spatiotemporal dimension, which are identical in shape but differ significantly in frequency and phase, seeing Izhikevich neuron model (Izhikevich, 2003) in Figure S1, and are well-suited to the implementation of the vector form quantum image in Equation (5). We use spike trains with firing rate and firing phase to represent quantum image state . As shown in Figure 2A, the spike trains containing information of can be generated using Equation(9) and (10).
(Equation 9) |
(Equation 10) |
Notation is set operation, and is specific in different tasks. The superposition state encoding is transferred to spike trains , which is generated from a Poisson spikes with spike rate and extended phase shown as Equation (11). Here, T is the time interval of neuron processing spikes received from pre-synaptic neurons, and is the spiking time window in this period, as shown in Figure 2B:
(Equation 11) |
(Equation 12) |
Two-compartment SNN
Synapses with time-differential convolution
Synapses play an important part in the conversion of information from spikes in pre-synaptic neurons to membrane potential (or current) in post-synaptic neurons. In this work, the time-differential kernel (TCK) convolution synapse is used, as shown in Equations (13) and (14) and Figure S2. The spikes, , from pre-synaptic neurons are convoluted with a kernel and then integrated with the dendrite membrane potential . This process can be considered as a stimulus-response convolution with the form of a Dirac function (Urbanczik and Senn, 2014):
(Equation 13) |
(Equation 14) |
Two-compartment neurons
Both the hidden layer and the output layer contain biologically plausible two-compartment neurons, which dynamically update the somatic membrane potential with the dendrite membrane potential , as shown in Figure S2.
In the compartment neuron model, is the membrane potential of neuron i in the hidden layer, which is updated with Equation (15); , , and are hyperparameters that represent synapse conductance, leaky conductance, and the integrated time constant, respectively; is the synaptic input from neuron j; is the dendrite potential with adjustable threshold in the hidden layer; and is the synaptic weight between the input and hidden layers:
(Equation 15) |
The somatic neuron model in the output layer contains 10 neurons corresponding to 10 classes of the MNIST data set. As shown in Equation (16), the hidden layer neurons deliver signals to the output layer with integrated spike rate , which is differentiable; hence, it can be tuned with back-propagation. Here, is the membrane potential in the output layer, is the dendrite potential, and is the hyperparameter for rescaling of fire-rate signals:
(Equation 16) |
The shallow three-layered architecture is shown in Figure 3. The input layer receives quantum spikes with encoding of complementary qubits. The hidden layer of QS-SNN consists of a two-compartment model with time-differential convolution synapses. Neurons in the output layer are integrated spike rate neurons, which receive an integrated fire rate from pre-synaptic neurons, as well as the teaching signal as information about class labels.
Figure 3.
Quantum superposition SNN, three-layer architecture of QS-SNN with TCK synapses and two-compartment neurons
Images are transferred to spikes as network inputs. The hidden layer is composed of 500 two-compartment neurons with dendrite and soma. The output layer contains 10 two-compartment neurons corresponding to 10 classes. In the training period, only original images are fed to the network, whereas in the test period, the trained network is tested with inverted background images. Neurons with maximum spiking rates at the output layer are taken as the network prediction and output.
Computational experiments
We examined the performance of the QS-SNN framework on a classification task using background color-inverted images from the MNIST (LeCun et al., 2010) and Fashion-MNIST (Xiao et al., 2017) data sets. QS-SNN encodes the original image and its color-inverted mirror as complementary superposition states and transfers them to spiking trains as an input signal to the two-compartment SNN. The dendrite prediction and proximal gradient methods used to train this model can be found in STAR Methods.
For comparison, we also tested several deep learning models on the color-inverted data sets, including a fully connected ANN, a 10-layers CNN (Lecun et al., 1998), VGG (Simonyan and Zisserman, 2015), ResNet (He et al., 2016), and DeseNet (Huang et al., 2017). All models are trained with original image and then tested on the background reverse image . The only difference is that, for QS-SNN, quantum superposition state image is transferred to spike trains which is compatible with spiking neural networks. In other words, our essential idea is that the spatiotemporal property of neuron spikes enables the brain to transform spatially variant information into time-differential information.
In this work, we formulated the spike trains transformation as the quantum superposition shown in Equation (5). And we have also demonstrated the numerical calculation of which is used for traditional ANN and CNN model testing in STAR Methods.
In addition, it is worth noting that the superposition state image is constructed from original information and reverse image . The original image and its complementary reverse information are maintained in the superposition state encoding at the same time. Because SNN is not processing pixel value directly, we transformed to spike trains, which can be regarded as different expression of superposition state encoding image in spatiotemporal dimension.
Standard and color-inverted images
The standard MNIST data set contains images of 10 classes of handwritten digits from 0 to 9; images are 28x28 pixels in size, with 60,000 and 10,000 training and test samples, respectively. Fashion-MNIST has the same image size and the same training and testing split as MNIST but contains grayscale images of different types of clothes and shoes.
The original MNIST and Fashion-MNIST images and their color-inverted versions, with different degrees of inversion as measured by parameter θ, are depicted in Figures 4A and 4B, respectively. To be specific, the spiking phase estimating operation in Equation (10) is set as piecewise selection function as
(Equation 17) |
Figure 4.
Classification of color-inverted images
(A) MNIST background color-inverted images. Parameter θ takes values from 0 to , denoting the degree of color inversion.
(B) Fashion-MNIST background color-inverted images.
(C) Background color-inverted MNIST classification results. QS-SNN initially showed performance degeneration similar to that of the fully connected ANN and CNN, with θ values from 0 to . However, as the background-inversion degree further increased, QS-SNN gradually recovered its accuracy, whereas the other networks did not. When the background was totally inverted (), QS-SNN showed almost the same performance as when classifying original images, whereas the second-best network (VGG16) retained only half its original accuracy.
(D) Background color-inverted Fashion-MNIST results. Similar results as in the MNIST experiment were achieved, with QS-SNN showing an even greater advantage (right-hand side).
Robustness to reverse pixel noise and Gaussian noise
Besides the effects of changing the whole background, we were interested in the capability of QS-SNN to handle other types of destabilization of images. For this purpose, we added reverse spike pixels and Gaussian noise to the MNIST and Fashion-MNIST images, and further tested the performance of QS-SNN in comparison with that of ANN and CNN. Reverse spike noise is created by randomly flipping image pixels to their reverse color and can be described as . The position i of the pixel to be flipped is randomly chosen, as shown in Figures 5A and 5B. The noisy images were encoded and processed in the same way as described in Algorithm 1. However, in the color-inverted experiment, all pixels of reverse degree were the same, resulting in the same change being applied to the whole image. By contrast, in the reverse pixel noise experiment, only a proportion of randomly chosen image pixels were changed; thus, every image pixel had a specific parameter. These image pixels are transferred to spike trains with heterogeneous phase . Specially in reverse pixel experiment we took the mean operation for as the estimation phase:
(Equation 18) |
Figure 5.
Reverse spike noise results
(A) Reverse spike noise MNIST. The possibility of pixel inversion is controlled by parameter r. When , no noise is added, i.e., the image is original data. When , all pixels are flipped.
(B) Reverse spike noise Fashion-MNIST.
(C) Classification of MNIST images with reverse noise. QS-SNN performed better compared with the inverted background experiment.
(D) Classification of Fashion-MNIST images with reverse noise.
Algorithm 1. The learning procedure of QS-SNN.
-
1.
Initialize weights with random uniform distribution, membrane potential states , and other related hyperparameters as in Table S1.
-
2.Start training procedure with only original images in training dataset, :
-
2.1Load training samples.
-
2.2Construct quantum superposition state representations of images.
-
2.3Input neuron spikes as Poisson process with spiking rate and phase time according to quantum superposition image.
-
2.4Process time-differential convolution to obtain dynamical updating of membrane potential of post-synaptic neurons.
-
2.5Update multi-layer membrane potential.
-
2.6Train the QS-SNN with dendrite prediction and proximal gradient.
-
2.7Select neurons in output layer with maximum spiking rate as the output class.
-
2.1
-
3.Start test procedure using color-inverse images with different degree of color inversion from the test dataset, .
-
3.1Load the test samples and transfer to spike trains as in steps 2.2 and 2.3.
-
3.2Test the performance of the trained QS-SNN on color-inverse images.
-
3.3Output the test performance.
-
3.1
Additive white Gaussian noise (AWGN) is commonly used to test system robustness. We also examined the performance of the proposed QS-SNN on AWGN MNIST and Fashion-MNIST images, as shown in Figures 6A and 6B.
Figure 6.
Gaussian noise image classification
(A) Additive white Gaussian noise on MNIST. The mean of Gaussian random noise was set to zero, and different values were used.
(B) Additive white Gaussian noise on Fashion-MNIST.
(C) Classification of MNIST images with Gaussian noise. Compared with other networks, QS-SNN showed much slower degeneration.
(D) Classification of Fashion-MNIST images with Gaussian noise. QS-SNN performed even better compared with its results on MNIST.
In contrast to color-inverted noise, AWGN results in uncorrelated disturbances on the original image. We were interested in the robustness of our proposed method when faced with this challenging condition. The procedure used to process AWGN images was the same as that used in the reverse pixel noise experiment, except that the whole image phase was estimated using half the median operation:
(Equation 19) |
Results
Standard and color-inverted data sets experiment
We constructed a three-layer QS-SNN with 500 hidden layer neurons and 10 output layer neurons. The structure of the experimental fully connected ANN was set to be the same for comparison. A simple CNN structure with three convolution layers and two pooling operations was used to determine the ability of different feature extraction methods to deal with inverted background images. We also tested VGG16, ResNet101, and DenseNet121 to investigate whether deeper structures could classify color-inverted images correctly. ANN, CNN, and QS-SNN were trained for 20 epochs with the Adam optimization method, and the learning rate was set to 0.001. VGG16, ResNet101, and DenseNet121 were trained for 400 epochs using stochastic gradient descent with learning rate 0.1, momentum 0.9, weight decay 5e-4, and learning rate decay 0.8 every 10 epochs. In the training phase, only the original image () was used; the testing phase used different color-inverted images (θ ranging from 0 to ). All results were obtained from the final epoch test step.
The results showed that the traditional fully connected ANN and convolution models struggled to handle huge changes in image properties such as background reversal, even when the spatial features of the image remained the same. Our proposed method showed much better performance than these traditional models (see Figures 4C and 4D and Tables S2 and S3 for details). Significant performance degradation occurred when processing color-inverted images with ANN and CNN, and even deeper networks such as VGG16, ResNet101, and Densenet121 experienced problems with color-inverted image classification. By contrast, QS-SNN, although affected by a similar performance drop when images were made blurry (θ from 0 to ), regained its ability when the images' backgrounds were inverted, and the clarity was improved (θ from to ). When the image color was fully inverted (), QS-SNN retained the same accuracy as when classifying the original data () and correctly recognized color-inverted MNIST and Fashion-MNIST images.
Robustness to noise experiments
Compared with other state-of-the-art models, the performance of QS-SNN was closer to human vision capacity. As more flipped-pixel noise was added to the images ( to 0.5), they became increasingly difficult to recognize, as indicated by the left side of the “U”-curve for QS-SNN in Figures 5C and 5D. However, as more noise was added to the pixels, the image features became clear again. When , with all pixels reversed, there was no conflict with the features of the original image when . QS-SNN can exploit these conditions owing to its image superposition encoding method (Equation 5), which is similar to the human vision system. As shown in Figures 5C and 5D and Tables S4 and S5, randomly inverting image pixels caused substantial performance degradation of ANN and CNN, as well as of the deep networks. On the contrary, the red “U”-shaped curve for QS-SNN indicated that it recovered its accuracy as the image's features became clear but the background was inverted ( to 1.0).
Gaussian noise influenced all networks significantly, with all methods showing a performance drop as noise (standard deviation; ) increased, as shown in Figures 6C and 6D and Tables S6 and S7. QS-SNN behaved more stably on the AWGN image processing task, with accuracies of 90.2% and 82.3% on the MNIST and Fashion-MNIST data sets, respectively, for ; by contrast, the other methods achieved no more than 60% and 50%, respectively. Images with are not very difficult for human vision to distinguish. Thus, by combining a brain-inspired spiking network with a quantum mechanism, we obtain a more robust approach to images with noise disturbance, similar to the performance of human vision.
Discussion
This work aimed to integrate quantum theory with a biologically plausible SNN. Quantum image encoding and quantum superposition states were used for information representation, followed by processing with a spatial-temporal SNN. A time-convolution synapse was built to obtain neuron process phase information, and dendrite prediction with a proximal gradient method was used to train the QS-SNN. The proposed QS-SNN showed good performance on color-inverted image recognition tasks that were very challenging to other models. Compared with traditional ANN models, QS-SNN showed better generalization ability.
It is worth noting that the quantum brain hypothesis is quite controversial. Nevertheless, this paper does not aim to provide direct persuasive evidence for the quantum brain hypothesis but to explore novel information-processing methods inspired by quantum information theory and brain spiking signal transmission.
Limitations of the study
Our model was inspired by quantum image processing methods, in particular, quantum image superposition state presentation. The model and corresponding experiments were run on a classical computer and did not use any quantum hardware; thus, our work could not benefit from quantum computing. Artificial neurons can be reformed to run on quantum computers (Schuld et al., 2014; Cao et al., 2017; Mangini et al., 2020). Efforts to build a quantum spiking neuron are still at a preliminary stage (Kristensen et al., 2019). Simulating spiking neuronal networks on a classical computer is hindered by heavy resource consumption and slow processing.
Future work includes modifying both the quantum superposition encoding strategy and the SNN architecture to suit quantum computing better. In computational neuroscience research, neuronal spikes are typically generated with the Poisson process, which samples data from the binomial distribution. Quantum bits, also named qubits, are fundamental components in a quantum computer. A qubit can take the value of “0” or “1” with a certain probability, which is very similar to neuronal spikes. Thus, a set of qubits can encode all possible states of a spike train, as well as the quantum superposition images, in the quantum computer. Although it requires much effort to reconstruct spiking neural models suited for quantum computing, it is significant in neurology and artificial intelligence research to explore more quantum-inspired mechanisms to explain brain functions that traditional theories fail to.
STAR★Methods
Key resources table
Resource availability
Lead contact
Further information and requests for resources and reagents should be directed to and will be fulfilled by the lead contact, Yi Zeng (yi.zeng@ia.ac.cn).
Materials availability
This study did not generate new unique reagents.
Data and code availability
The Python scripts can be downloaded from the GitHub repository: https://github.com/Brain-Inspired-Cognitive-Engine/Q-SNN.
Method details
Generating background inverse image
Different degree of background color-inverse images using for experiment are generated according to the quantum superposition encoding. Here we describe the numerical form value of quantum image used to test model. Suppose the original image is represented by X and the reversed image is . Parameter controls the proportion of original image and reverse image in background color-inverse images with
(Equation 20) |
Learning procedure of the QS-SNN algorithm
Dendrite prediction (Urbanczik and Senn, 2014) and proximal gradient methods are used for tuning of QS-SNN. In Equation (21), is the teaching current, which is the integration of correct labels in and wrong labels in . (8 mV) and (-8 mV) are the excitatory and inhibitory standard membrane potentials, respectively. The teaching current is injected to the soma of neurons in the output layer, generating added potential with membrane resistance , as shown in Equation (22):
(Equation 21) |
(Equation 22) |
Setting the left side of Equation (22) to zero and , we get the steady state of somatic potentials and with . The dendrite prediction rule defines the soma-dendrite error as Equation (23):
(Equation 23) |
Minimizing this error based on the differential chain rule, we obtain updated synaptic weights , as shown in Equations (24) and (25):
(Equation 24) |
(Equation 25) |
Equation (26) shows the iterative updating of synaptic weights and bias :
(Equation 26) |
For the hidden layer, error signal is passed from the previous layer, and neuron synapses are adapted using Equations (27) and (28):
(Equation 27) |
(Equation 28) |
Equation (29) shows the iterative updating of synaptic weights and bias :
(Equation 29) |
The training and test procedure for the QS-SNN model is shown in Algorithm 1.
Acknowledgments
This study was supported by the new generation of artificial intelligence major project of the Ministry of Science and Technology of the People's Republic of China (Grant No. 2020AAA0104305), the Strategic Priority Research Program of the Chinese Academy of Sciences (Grant No. XDB32070100), and the Beijing Municipal Commission of Science and Technology (Grant No. Z181100001518006).
Author contributions
Y.S. wrote the code, performed the experiments, analyzed the data, and wrote the manuscript. Y.Z. proposed and supervised the project and contributed to writing the manuscript. T.Z. participated in helpful discussions and contributed to writing the manuscript.
Declaration of interests
The authors declare that they have no competing interests.
Published: August 20, 2021
Footnotes
Supplemental information can be found online at https://doi.org/10.1016/j.isci.2021.102880.
Supplemental information
References
- Beer K., Bondarenko D., Farrelly T., Osborne T.J., Salzmann R., Scheiermann D., Wolf R. Training deep quantum neural networks. Nat. Commun. 2020;11:1–6. doi: 10.1038/s41467-020-14454-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Cao Y., Guerreschi G.G., Aspuru-Guzik A. Quantum neuron: an elementary building block for machine learning on quantum computers. arXiv. 2017 arXiv:1711.11240. [Google Scholar]
- Cox J., Witten I.B. Striatal circuits for reward learning and decision-making. Nat. Rev. Neurosci. 2019;20:482–494. doi: 10.1038/s41583-019-0189-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Dan Y., Poo M.M. Spike timing-dependent plasticity of neural circuits. Neuron. 2004;44:23–30. doi: 10.1016/j.neuron.2004.09.007. [DOI] [PubMed] [Google Scholar]
- Dendukuri A., Luu K. Image processing in quantum computers. arXiv. 2018 arXiv:1812.11042. [Google Scholar]
- Fisher M.P. Quantum cognition: the possibility of processing with nuclear spins in the brain. Ann. Phys. 2015;362:593–602. [Google Scholar]
- Frémaux N., Gerstner W. Neuromodulated spike-timing-dependent plasticity, and theory of three-factor learning rules. Front. Neural Circuits. 2016;9:85. doi: 10.3389/fncir.2015.00085. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Gerstner W. A framework for spiking neuron models: the spike response model. In: Moss F., Gielen S., editors. Vol. 4. Elsevier; 2001. pp. 469–516. (Handbook of Biological Physics). [Google Scholar]
- Gerstner W., Kistler W.M. Cambridge University Press; 2002. Spiking Neuron Models: Single Neurons, Populations, Plasticity. [Google Scholar]
- Grover L.K. Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing. ACM; 1996. A fast quantum mechanical algorithm for database search; pp. 212–219. [Google Scholar]
- Harrow A.W., Hassidim A., Lloyd S. Quantum algorithm for linear systems of equations. Phys. Rev. Lett. 2009;103:150502. doi: 10.1103/PhysRevLett.103.150502. [DOI] [PubMed] [Google Scholar]
- He K., Zhang X., Ren S., Sun J. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. IEEE; 2016. Deep residual learning for image recognition; pp. 770–778. [Google Scholar]
- Héricé C., Khalil R., Moftah M., Boraud T., Guthrie M., Garenne A. Decision making under uncertainty in a spiking neural network model of the basal ganglia. J. Integr. Neurosci. 2016;15:515–538. doi: 10.1142/S021963521650028X. [DOI] [PubMed] [Google Scholar]
- Huang G., Liu Z., Van Der Maaten L., Weinberger K.Q. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. IEEE; 2017. Densely connected convolutional networks; pp. 4700–4708. [Google Scholar]
- Iyengar S.S., Kumar L.K., Mastriani M. Analysis of five techniques for the internal representation of a digital image inside a quantum processor. arXiv. 2020 arXiv:2008.01081. [Google Scholar]
- Izhikevich E.M. Simple model of spiking neurons. IEEE Trans. Neural Netw. 2003;14:1569–1572. doi: 10.1109/TNN.2003.820440. [DOI] [PubMed] [Google Scholar]
- Khalil R., Moftah M.Z., Moustafa A.A. The effects of dynamical synapses on firing rate activity: a spiking neural network model. Eur. J. Neurosci. 2017;46:2445–2470. doi: 10.1111/ejn.13712. [DOI] [PubMed] [Google Scholar]
- Kristensen L.B., Degroote M., Wittek P., Aspuru-Guzik A., Zinner N.T. An artificial spiking quantum neuron. arXiv. 2019 arXiv:1907.06269. [Google Scholar]
- Le P.Q., Dong F., Hirota K. A flexible representation of quantum images for polynomial preparation, image compression, and processing operations. Quan. Inf. Process. 2011;10:63–84. [Google Scholar]
- Lecun Y., Bottou L., Bengio Y., Haffner P. Gradient-based learning applied to document recognition. Proc. IEEE. 1998;86:2278–2324. doi: 10.1109/5.726791. [DOI] [Google Scholar]
- LeCun Y., Cortes C., Burges C. ATT Labs; 2010. MNIST Handwritten Digit Database.http://yann.lecun.com/exdb/mnist [Google Scholar]
- Lloyd S., Mohseni M., Rebentrost P. Quantum principal component analysis. Nat. Phys. 2014;10:631. [Google Scholar]
- Maass W. Networks of spiking neurons: the third generation of neural network models. Neural Netw. 1997;10:1659–1671. [Google Scholar]
- Mangini S., Tacchino F., Gerace D., Macchiavello C., Bajoni D. Quantum computing model of an artificial neuron with continuously valued input data. Mach. Learn. Sci. Technol. 2020;1:045008. [Google Scholar]
- Manju A., Nigam M.J. Applications of quantum inspired computational intelligence: a survey. Artif. Intell. Rev. 2014;42:79–156. [Google Scholar]
- Mastriani M. Quantum image processing: the truth, the whole truth, and nothing but the truth about its problems on internal image representation and outcomes recovering. arXiv. 2020 arXiv:2002.04394. [Google Scholar]
- Schuld M., Sinayskiy I., Petruccione F. The quest for a quantum neural network. Quan. Inf. Process. 2014;13:2567–2586. [Google Scholar]
- Schuld M., Sinayskiy I., Petruccione F. Simulating a perceptron on a quantum computer. Phys. Lett. A. 2015;379:660–663. [Google Scholar]
- Shor P.W. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Rev. 1999;41:303–332. [Google Scholar]
- Shrestha S.B., Orchard G. SLAYER: spike layer error reassignment in time. In: Bengio S., Wallach H., editors. Advances in Neural Information Processing Systems. Curran Associates; 2018. pp. 1412–1421. [Google Scholar]
- Simonyan K., Zisserman A. Very deep convolutional networks for large-scale image recognition. arXiv. 2015;1409.1566:1–14. [Google Scholar]
- Song S., Miller K.D., Abbott L.F. Competitive Hebbian learning through spike-timing-dependent synaptic plasticity. Nat. Neurosci. 2000;3:919. doi: 10.1038/78829. [DOI] [PubMed] [Google Scholar]
- Torrontegui E., García-Ripoll J.J. Unitary quantum perceptron as efficient universal approximator. Europhys. Lett. 2019;125:30004. [Google Scholar]
- Urbanczik R., Senn W. Learning by the dendritic prediction of somatic spiking. Neuron. 2014;81:521–528. doi: 10.1016/j.neuron.2013.11.030. [DOI] [PubMed] [Google Scholar]
- Vaziri A., Plenio M.B. Quantum coherence in ion channels: resonances, transport and verification. New J. Phys. 2010;12:085001. [Google Scholar]
- Weingarten C.P., Doraiswamy P.M., Fisher M.P.A. A new spin on neural processing: quantum cognition. Front. Hum. Neurosci. 2016;10:541. doi: 10.3389/fnhum.2016.00541. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Xiao H., Rasul K., Vollgraf R. Fashion-MNIST: a novel image dataset for benchmarking machine learning algorithms. arXiv. 2017 arXiv:cs.LG/1708.07747. [Google Scholar]
- Xiao J., Yan Y., Zhang J., Tang Y. A quantum-inspired genetic algorithm for k-means clustering. Exp. Syst. Appl. 2010;37:4966–4973. [Google Scholar]
- Zeng Y., Zhang T., Xu B. Improving multi-layer spiking neural networks by incorporating brain-inspired rules. Sci. China Inform. Sci. 2017;60:052201. [Google Scholar]
- Zenke F., Agnes E.J., Gerstner W. Diverse synaptic plasticity mechanisms orchestrated to form and retrieve memories in spiking neural networks. Nat. Commun. 2015;6:6922. doi: 10.1038/ncomms7922. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Zhao F., Zhang T., Zeng Y., Xu B. The 24th International Conference on Neural Information Processing. Springer; 2017. Towards a brain-inspired developmental neural network by adaptive synaptic pruning; pp. 182–191. [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
The Python scripts can be downloaded from the GitHub repository: https://github.com/Brain-Inspired-Cognitive-Engine/Q-SNN.