Quiver neural networks

Iordan Ganev, Robin WaltersarXiv 2022

Abstract

We develop a uniform theoretical approach towards the analysis of various neural network connectivity architectures by introducing the notion of a quiver neural network. Inspired by quiver representation theory in mathematics, this approach gives a compact way to capture elaborate data flows in complex network architectures. As an application, we use parameter space symmetries to prove a lossless model compression algorithm for quiver neural networks with certain non-pointwise activations known as rescaling activations. In the case of radial rescaling activations, we prove that training the compressed model with gradient descent is equivalent to training the original model with projected gradient descent.

Introduction

As deep learning has evolved, architectures have moved far beyond simple stacks of layers. Modern networks utilize skip connections (ResNets), multi-scale pathways (U-Nets), and complex branching (Y-nets). Standard terminology like "layer" and "depth" is becoming too imprecise to describe how data actually flows through these intricate webs. Furthermore, while model compression is a significant field, most methods—such as pruning or quantization—are "lossy," altering the network's output and requiring retraining to recover accuracy.

This paper introduces Quiver Neural Networks (QNNs), a framework that leverages quiver representation theory to formally describe arbitrary architectures. By identifying and removing redundant dimensions in hidden feature spaces through parameter space symmetries, the authors develop a method to compress networks losslessly.

The QNN Framework

The authors turn to Quiver Representation Theory, a branch of mathematics studying directed graphs (quivers) where vertices are assigned vector spaces and edges are assigned linear maps. In the QNN framework, a neural network is viewed as a "representation" of a quiver:

  1. Vertices represent feature spaces (e.g., $\mathbb{R}^{d_i}$).
  2. Edges represent the weights ($W_i$) and biases ($b_i$) connecting them.
  3. Activations ($\rho_i$) are treated as endomorphisms on these spaces.
Figure 3: A quiver $\mathcal{Q}$ and its corresponding representation as a neural network with weights, biases, and activations.

A key focus is on rescaling activations, where the output is a scalar multiple of the input vector: $\rho(v) = \lambda(v)v$. A special subset is radial rescaling activations, where the scaling factor depends only on the norm of the input. These activations are crucial because they commute with orthogonal transformations (rotations), allowing the network to preserve structural symmetries during compression.

Lossless Compression via QR-Compress

The core insight is that neural networks possess massive parameter space symmetries. One can rotate or scale the basis of a hidden layer, and as long as surrounding weights are adjusted accordingly, the final output remains identical. Often, the input to a layer spans only a small subspace of its total dimension, creating "dead zones" that do not contribute to the final computation.

The proposed QR-Compress algorithm performs iterated QR decompositions across the network's topological order. By traversing the quiver from input to output, the algorithm identifies the specific subspace of each layer that actually contributes to the final output. It then "chops off" the unused dimensions. For radial activations, the activation function itself remains unchanged during compression—it is simply restricted to a smaller space, ensuring the network remains functionally identical to machine precision (less than $10^{-6}$ difference in output).

Results and Theoretical Equivalence

The framework successfully captures a wide variety of modern architectures under a single mathematical umbrella, providing a unified language for disparate designs.

Figure 4: Examples of complex architectures represented as quivers, including structures with skip connections and branching pathways.

Beyond structural description, the paper offers significant theoretical results:

  • Lossless Compression: The QR-Compress algorithm was empirically verified to produce smaller networks that are functionally identical to the originals.
  • Optimization Equivalence: Theorem 5.1 establishes a formal bridge between the optimization of large and small models. It proves that training a compressed model with gradient descent is mathematically equivalent to training the original, larger model with projected gradient descent. This suggests that we can potentially reach local minima faster by training in the compressed space.

Conclusion and Future Work

While the current theory relies on rescaling activations and focuses on fully connected components, it provides a rigorous foundation for understanding architectural redundancy. Future work aims to extend this to convolutional neural networks (CNNs) and explore quiver varieties to determine if these networks' loss surfaces possess favorable convexity properties, potentially revolutionizing how we optimize complex models.

Summary updated

BibTeX
@misc{ganev2022quiver,
  author = {Iordan Ganev and Robin Walters},
  title = {{Quiver neural networks}},
  year = {2022},
  eprint = {2207.12773},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2207.12773},
}
Figure