Efficient Neural Network Implementation with Quadratic Neuron

Zirui Xu, Jinjun Xiong, Fuxun Yu, Xiang ChenarXiv 2020

Abstract

This paper introduces a computationally efficient quadratic neuron design that reduces the complexity of second-order neural networks from $O(n^2)$ to $O(n)$. By decomposing the quadratic operation into three parallel linear components, the authors achieve higher prediction accuracy and significantly faster convergence across standard benchmarks. Notably, the inherent non-linearity of the quadratic neuron allows for the removal of traditional activation functions like ReLU, enabling the effective use of second-order optimization methods to further accelerate training.

Introduction

Standard neural networks rely on linear neurons paired with non-linear activation functions (such as ReLU) to approximate complex functions. While effective, this approach often requires deep or wide architectures to achieve high performance, which can lead to training difficulties. Previous research suggested "quadratic neurons"—which have non-linearity built directly into the neuron's function—as a more powerful alternative. However, traditional quadratic formulations require an $n \times n$ weight matrix, leading to $O(n^2)$ time and space complexity, making them impractical for modern large-scale networks. This paper addresses this limitation by proposing an implementation-friendly $O(n)$ quadratic neuron.

Proposed Method

The authors propose a new quadratic neuron formulation that decomposes the complex quadratic operation into three ordinary linear components. As shown in the architecture diagram below, the output is calculated by multiplying the results of two linear neurons and adding the result of a third:

$$X_{out} = (\sum x_{ia}w_{ia} + b_a)(\sum x_{ib}w_{ib} + b_b) + (\sum x_{ic}w_{ic} + b_c)$$

The proposed quadratic neuron structure decomposes a complex quadratic operation into three parallel linear paths.

This approach reduces complexity to $O(n)$, making it as efficient as standard linear neurons while retaining the expressive power of second-order functions. Beyond the architecture, the authors propose integrating second-order optimization methods (like L-BFGS) and leveraging closed-form partial derivatives to optimize memory management during training.

Experimental Results

The researchers evaluated their design using two standard benchmarks: MNIST for Multi-Layer Perceptrons (MLP) and CIFAR-10 for Convolutional Neural Networks (ConvNet).

A key insight from the experiments is that because the neuron itself is quadratic, it possesses inherent non-linearity. The authors found they could remove ReLU activation functions entirely, simplifying the network structure. On MNIST, the model reached 97.66% accuracy in only 4 epochs when paired with the L-BFGS optimizer, compared to 23 epochs for a standard first-order network.

On CIFAR-10, the quadratic ConvNet achieved 78% accuracy, outperforming the standard first-order network's 76%. As shown in the table below, the quadratic version without ReLU converged in 60 epochs, more than twice as fast as the first-order baseline of 135 epochs.

Evaluation results on CIFAR-10 demonstrate superior accuracy and faster convergence for the proposed design.

Conclusion

The proposed quadratic neuron offers a scalable path toward second-order neural networks by reducing computational complexity to $O(n)$. While the number of epochs required for convergence drops significantly, there is a trade-off in per-epoch computation time when using complex optimizers like L-BFGS. Future work will focus on hardware-level optimizations to fully realize the efficiency gains of this architecture.

Summary updated

BibTeX
@misc{xu2020efficient,
  author = {Zirui Xu and Jinjun Xiong and Fuxun Yu and Xiang Chen},
  title = {{Efficient Neural Network Implementation with Quadratic Neuron}},
  year = {2020},
  eprint = {2011.10813},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2011.10813},
}
Figure