Abstract
We present a novel machine learning architecture that uses the exponential of a single input-dependent matrix as its only nonlinearity. The mathematical simplicity of this architecture allows a detailed analysis of its behaviour, providing robustness guarantees via Lipschitz bounds. Despite its simplicity, a single matrix exponential layer already provides universal approximation properties and can learn fundamental functions of the input, such as periodic functions or multivariate polynomials. This architecture outperforms other general-purpose architectures on benchmark problems, including CIFAR-10, using substantially fewer parameters.
Introduction
Deep Neural Networks (DNNs) typically achieve expressive power by composing many simple, one-dimensional nonlinearities (e.g., ReLU, Sigmoid). However, this design forces the network to approximate complex interactions, such as multiplication or high-degree polynomials, through deep stacks of additive operations. This often leads to excessive parameter counts and poor extrapolation performance on tasks involving periodic or polynomial data.
We propose the M-layer, an architecture centered around a single, high-dimensional nonlinearity: the matrix exponential. By mapping inputs to the entries of a matrix $M$ and computing $\exp(M)$, the network can naturally represent complex feature interactions and periodic patterns with high efficiency.
The M-Layer Architecture
The M-layer transforms an input vector $x$ through a sequence of linear mappings and a single matrix exponential operation.
The computation follows three primary steps:
- Input Mapping: The input $x$ is mapped to a matrix $M$ via an affine transformation $M = B + T(U(x))$, where $B$ is a bias matrix and $T, U$ are linear transformations.
- Matrix Exponential: The core nonlinearity is $\exp(M) = \sum_{k=0}^{\infty} \frac{M^k}{k!}$. Unlike element-wise functions, this operation couples all entries of $M$, enabling the learning of multivariate polynomials and complex interactions.
- Output Projection: The resulting matrix is projected to the output space via a linear map $S$.
This structure is mathematically equivalent to a Linear Time-Invariant (LTI) Ordinary Differential Equation (ODE) where the system's dynamics are conditioned on the input.
Theoretical Properties
The M-layer offers several unique advantages over traditional architectures:
- Polynomial and Periodic Reasoning: By learning specific sparse structures in $M$, the network can implement arbitrary arithmetic circuits. Furthermore, imaginary eigenvalues in $M$ naturally lead to oscillatory behavior, allowing for perfect extrapolation of periodic functions.
- Certified Robustness: The centralized nonlinearity allows for the derivation of closed-form Lipschitz bounds. This provides a mathematical guarantee that small input variations (e.g., adversarial noise) will not result in disproportionate output changes.
- Universal Approximation: A single M-layer is shown to possess universal approximation properties, capable of representing a wide class of continuous functions.
Experimental Results
The M-layer was benchmarked against standard DNNs on tasks ranging from toy classification to image recognition.
- Mathematical Tasks: In predicting $3 \times 3$ determinants, the M-layer achieved an MSE of $2 \cdot 10^{-4}$ with 811 parameters, while a standard DNN required nearly four times as many parameters to achieve a significantly worse error (0.003).
- Image Classification: On CIFAR-10, the M-layer reached 54.17% accuracy using only 148,965 parameters. A Sigmoid-based network with over 8 million parameters achieved only 46.63%, demonstrating the M-layer's superior parameter efficiency.
- Extrapolation: While standard networks failed to maintain periodic patterns outside the training range, the M-layer's inherent mathematical structure allowed it to continue oscillations accurately.
Conclusion
The M-layer represents a shift from stacking simple 1D nonlinearities to utilizing a single, powerful multidimensional operation. While computational scaling of the matrix exponential remains a challenge for very wide layers, its efficiency, robustness, and extrapolation capabilities make it a promising alternative for complex modeling tasks. Future work will focus on hybrid convolutional-M-layer architectures and advanced regularization techniques.
Summary updated