On the Solvability of the {XOR} Problem by Spiking Neural Networks

Bernhard A. Moser,Michael Lunglmayr
2024-08-12
Abstract:The linearly inseparable XOR problem and the related problem of representing binary logical gates is revisited from the point of view of temporal encoding and its solvability by spiking neural networks with minimal configurations of leaky integrate-and-fire (LIF) neurons. We use this problem as an example to study the effect of different hyper parameters such as information encoding, the number of hidden units in a fully connected reservoir, the choice of the leaky parameter and the reset mechanism in terms of reset-to-zero and reset-by-subtraction based on different refractory times. The distributions of the weight matrices give insight into the difficulty, respectively the probability, to find a solution. This leads to the observation that zero refractory time together with graded spikes and an adapted reset mechanism, reset-to-mod, makes it possible to realize sparse solutions of a minimal configuration with only two neurons in the hidden layer to resolve all binary logic gate constellations with XOR as a special case.
Neural and Evolutionary Computing
What problem does this paper attempt to address?
The main problem that this paper attempts to solve is to explore under what conditions Spiking Neural Networks (SNNs) can solve the linearly non - separable XOR problem. Specifically, by studying the influence of different hyper - parameters (such as information encoding methods, the number of hidden units, the selection of leakage parameters, and reset mechanisms, etc.) on the performance of SNNs, the author explores how to use the Leaky Integrate - and - Fire (LIF) neurons with the minimum configuration to achieve effective classification of the XOR problem. ### Specific Description of the Main Problem 1. **Linearly Non - separable XOR Problem**: The XOR problem is a classic binary classification problem. Its input space is \(\{(0,0), (0,1), (1,0), (1,1)\}\), and the outputs are \(0\) and \(1\) respectively. Since these four points cannot be completely separated by a straight line in a two - dimensional plane, traditional linear classifiers cannot solve this problem. According to Radon's theorem, any \(d + 2\) points in the \(R^d\) space have a partitioning method such that the convex hulls of the two subsets intersect. Therefore, 4 points in the \(R^2\) space cannot be perfectly separated by a linear classifier. 2. **Feasibility and Configuration Optimization of SNN**: The author aims to explore whether a single - hidden - layer SNN can solve the XOR problem and hopes to find an SNN model as simple as possible by adjusting different hyper - parameters. Specifically, the author focuses on the following points: - **Information Encoding Methods**: including time encoding and frequency encoding. - **Reset Mechanisms of LIF Neurons**: such as reset - to - zero, reset - by - subtraction, and the newly proposed reset - to - mod. - **Leakage Parameters**: that is, the leakage rate \(\alpha\) and the threshold \(\vartheta\) in the LIF neurons. - **Weight Matrix Distribution**: Analyze the distribution of the weight matrix to evaluate the difficulty of finding solutions. ### Main Contributions of the Paper - **Proposing a New Reset Mechanism**: The reset - to - mod mechanism is introduced, which is an immediate charge - discharge event with the characteristic of zero net voltage. - **Simplifying the Network Structure**: Research shows that by combining time encoding and the reset - to - mod mechanism, only 2 fully - connected LIF neurons are required to achieve sparse solutions for all binary logic gates (including XOR). - **Success Rate of Random Initialization**: By uniformly and randomly initializing the weight matrix, experiments show that the success rate reaches at least 3%. In summary, this paper not only solves the XOR problem but also provides valuable insights for further understanding the working principle of SNNs.