Compact Circulant Layers with Spectral Priors
Organizations: Department of Computer Science (DIKU), University of Copenhagen, Copenhagen, Denmark · Department of Biology, University of Copenhagen, Copenhagen, Denmark
Abstract
Critical applications in areas such as medicine, robotics and autonomous systems require compact (i.e., memory efficient), uncertainty-aware neural networks suitable for edge and other resource-constrained deployments. We study compact spectral circulant and block-circulant-with-circulant-blocks (BCCB) layers: FFT-diagonalizable circular convolutions whose weights live directly in the real FFT (RFFT) half (1D) or half-plane (2D). Parameterizing filters in the frequency domain lets us impose simple spectral structure, perform structured variational inference in a low-dimensional weight space, and calculate exact layer spectral norms, enabling inexpensive global Lipschitz bounds and margin-based robustness diagnostics. By placing independent complex Gaussians on the Hermitian support we obtain a discrete instance of the spectral representation of stationary kernels, inducing an exact stationary Gaussian-process prior over filters on the discrete circle/torus. We exploit this to define a practical spectral prior and a Hermitian-aware low-rank-plus-diagonal variational posterior in real coordinates. Empirically, spectral circulant/BCCB layers are effective compact building blocks in both (variational) Bayesian and point estimate regimes: compact Bayesian neural networks on MNIST->Fashion-MNIST, variational heads on frozen CIFAR-10 features, and deterministic ViT projections on CIFAR-10/Tiny ImageNet; spectral layers match strong baselines while using substantially fewer parameters and with tighter Lipschitz certificates.
Figures & tables
| Aspect | This work |
|---|---|
| Parameterization | Circulant/BCCB layers parameterized directly in the nonredundant RFFT half-spectrum/half-plane. As a consequence, we keep only independent Fourier coefficients (the remainder are fixed by Hermitian symmetry), avoid per-step kernel FFTs, and implement band-limits/decays via simple masks or frequency-dependent scalings. |
| Prior & inference | A diagonal proper complex-Gaussian prior on these spectral coordinates. As a consequence, it induces an exact stationary GP prior over discrete filters, and it pairs naturally with a Hermitian-aware low-rank + diagonal Gaussian variational posterior in effective real coordinates with closed-form KL terms. |
| Geometry & use cases | For FFT-diagonalizable circulant/BCCB operators, layer spectral norms are available in closed form. As a consequence, we can compute inexpensive global Lipschitz upper bounds and margin-based certificates as geometric diagnostics (not robustness guarantees), and we evaluate these layers as compact replacements for square projections in ViT-style architectures. |
| Model | Params | Acc | Brier | ECE | AUROC |
|---|---|---|---|---|---|
| Spectral BCCB | 8.6k | 0.92 | 0.12 | 0.02 | 0.81 |
| Spectral Circ. | 8.6k | 0.92 | 0.12 | 0.02 | 0.83 |
| Conv2D | 62.8k | 0.96 | 0.08 | 0.04 | 0.62 |
| Dense | 622k | 0.97 | 0.05 | 0.02 | 0.84 |
| Model | Acc | NLL | ECE | AUROC | FPR@95 |
|---|---|---|---|---|---|
| Dense-32 | 0.971 | 0.098 | 0.009 | 0.70 | 0.57 |
| Dense-128 | 0.971 | 0.118 | 0.012 | 0.71 | 0.56 |
| Spectral Circ. (full) | 0.971 | 0.136 | 0.017 | 0.68 | 0.60 |
| Circulant (spatial) | 0.965 | 0.433 | 0.026 | 0.64 | 0.63 |
| Dataset | Model | Params | Acc | NLL |
|---|---|---|---|---|
| CIFAR-10 | Dense ViT | 1,205,898 | 0.685 | 0.97 |
| CIFAR-10 | Spectral ViT | 811,218 | 0.716 | 0.88 |
| TinyImg | Dense ViT | 1,248,840 | 0.307 | 3.06 |
| TinyImg | Spectral ViT | 854,160 | 0.344 | 2.94 |
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Description |
|---|---|
| Real and complex numbers | |
| Scalars (real or integer indices) | |
| Column vector (e.g., input signal) | |
| Filter vector (spatial domain) | |
| Output or latent vectors | |
| Input tensor (channels height width) |
| Model | Weights | Biases | Total |
|---|---|---|---|
| SpectralCirculant | 8,624 | 11 | 8,635 |
| SpectralBCCB ( ) | 8,624 | 11 | 8,635 |
| BCCB (spatial) | 8,624 | 11 | 8,635 |
| Conv2D ( , ) | 62,792 | 18 | 62,810 |
| Dense ( ) | 622,496 | 794 | 623,290 |
| Model | Acc. | Brier | ECE | MCE | AUROC | FPR@95 |
|---|---|---|---|---|---|---|
| SpectralBCCB | ||||||
| Conv2D | ||||||
| BCCB | ||||||
| SpectralCirculant | ||||||
| Circulant | ||||||
| Dense |
| Model | Acc | NLL | ECE | mean AUROC | AUROC S5 | FPR@95 S5 |
|---|---|---|---|---|---|---|
| Dense-32 (SVI) | 0.971 | 0.098 | 0.009 | 0.6986 | 0.7819 | 0.5727 |
| Dense-128 (SVI) | 0.971 | 0.118 | 0.012 | 0.7076 | 0.7946 | 0.5648 |
| RFFT (SVI) – Full | 0.971 | 0.136 | 0.017 | 0.6816 | 0.7165 | 0.5966 |
| Circulant (SVI) | 0.965 | 0.433 | 0.026 | 0.6400 | 0.7182 | 0.6323 |
| Weights | Comp. vs Dense-32 ( ) | Acc | mean AUROC | FPR@95 (S5) | |
|---|---|---|---|---|---|
| 22,528 | 2.92 | 0.971 | 0.6816 | 0.5966 | |
| 768 | 22,015 | 2.99 | 0.967 | 0.6846 | 0.6102 |
| 512 | 21,503 | 3.06 | 0.967 | 0.6710 | 0.6264 |
| 256 | 20,991 | 3.14 | 0.967 | 0.6664 | 0.6300 |
| 128 | 20,735 | 3.18 | 0.965 | 0.6650 | 0.6447 |
| 64 | 20,607 | 3.20 | 0.964 | 0.6615 | 0.6512 |