TL;DR
QuadraNet introduces a novel architecture that replaces the memory-heavy self-attention mechanism of Transformers with efficient "quadratic neurons." By leveraging low-rank factorization and hardware-aware neural architecture search (NAS), QuadraNet achieves Transformer-level accuracy with up to 1.5× higher throughput and 30% less memory footprint.
What Problem Does This Paper Address?
Modern computer vision has shifted from standard Convolutions (CNNs) to Transformer-based models. The secret sauce of Transformers is "high-order interaction"—the ability to multiply different features together (via self-attention) to capture complex global context.
However, this "intelligence" comes at a steep price. Self-attention requires calculating and storing massive intermediate state matrices, leading to quadratic ($O(N^2)$) time and space complexity. Even "lightweight" Transformers like MobileViT can be 10× slower than traditional CNNs on edge devices. Previous attempts to fix this, like linear attention or recursive convolutions, often sacrifice accuracy or introduce complex data dependencies that hurt hardware parallelism.
Methods
The authors rethink high-order interactions at the neuron level rather than the architectural level.
- The Quadratic Neuron: Instead of a standard linear neuron ($y = Wx + b$), they use a quadratic formulation: $y = x^T W_q x + W_c x + b$. This naturally captures high-order interactions within the neuron itself.
- Low-Rank Factorization: A raw quadratic weight matrix ($W_q$) is $O(n^2)$, which is too heavy. The authors factorize it into two low-rank vectors ($W_a$ and $W_b$), transforming the computation into a simple Hadamard product: $(W_a x) \odot (W_b x)$. This brings the complexity back down to $O(n)$.
- The QuadraBlock: They integrate these neurons into a structural block. It uses a "Quadratic Depth-wise Convolution" for spatial mixing, followed by standard 1×1 convolutions for channel mixing. This design avoids the "recursive logic" of prior work, allowing for better GPU parallelism.
- Hardware-Aware NAS: Recognizing that "one size does not fit all," they use Neural Architecture Search (based on ProxylessNAS) to optimize the model's kernel sizes and expansion rates for specific target hardware, including NVIDIA A100 GPUs, Intel Myriad VPUs, and ARM CPUs.
Datasets
The models were trained and evaluated on the industry-standard ImageNet-1K dataset, which contains 1.28 million training images and 50,000 validation images across 1,000 classes.
Key Insights and Ideas
- Attention is just Multiplication: The paper argues that the core benefit of self-attention is simply the multiplication of input-adaptive weights. Quadratic neurons achieve this same "superposition" effect without the need for expensive Softmax operations or large attention maps.
- Eliminating Intermediate States: By using the factorized quadratic form, the model avoids storing the $O(N^2)$ intermediate states required by Transformers. This is the primary driver behind the 30% memory saving.
- Spatial Efficiency: The authors found that while spatial mixing layers (the "convolutions") account for less than 5% of a model's parameters, injecting quadratic neurons here provides the most significant boost in "cognitive capacity" (accuracy) for the least computational cost.
- Hardware Matters: A model that is fast on a GPU might be slow on a VPU. Their NAS approach showed that QuadraNet could adapt its structure to stay efficient across vastly different hardware architectures.
Key Results
- Speed & Throughput: QuadraNet-25-T achieved 2433 img/s on an A100 GPU, significantly outperforming the Swin Transformer (1321 img/s) and ConvNeXt (1944 img/s) at similar accuracy levels.
- Memory Savings: In training evaluations, QuadraNet used roughly 8.1 GB of memory compared to 12.6 GB for a comparable SwinBlock—a reduction of over 30%.
- Accuracy: QuadraNet-36-B reached 84.1% Top-1 accuracy on ImageNet, matching or exceeding state-of-the-art high-order models like HorNet while maintaining much higher inference speeds.
- Edge Performance: On the Intel Myriad VPU, the NAS-optimized QuadraNet achieved 73.2% accuracy with a latency of only 29.9ms.
Limitations and Future Work
- Receptive Field Trade-offs: The authors noted that while very large receptive fields (e.g., 21×21) improve accuracy, they significantly increase training time due to unoptimized operators. They currently settle for a 7×7 kernel as a balance.
- Task Generalization: This paper focuses almost exclusively on image classification. Future work is needed to see if the quadratic neuron approach translates as effectively to object detection, segmentation, or Natural Language Processing (NLP).
- Library Optimization: While they used the
QuadraLiblibrary for some optimizations, the authors suggest that deeper integration with compilers like Apache TVM could unlock even more hardware-specific speedups.
Summary updated