bispectrum: Selective G-Bispectra Made Practical
Johan Mathe ⋅ Adele Lantow ⋅ Simon Mataigne ⋅ Nina Miolane
Abstract
Many machine learning tasks are invariant under the action of a group $G$ of transformations: signal classification can be invariant under translations, image classification under 2D rotations, and spherical-image classification under 3D rotations. The $G$-bispectrum is a complete invariant of a signal (it determines the signal up to the group action) and has been used as a pooling layer in deep networks. However, the full bispectrum is costly to compute, and each existing implementation covers a single group. We present bispectrum, an open-source, fully unit-tested PyTorch library that implements selective $G$-bispectra for seven group actions as differentiable modules. For finite groups $G$, selectivity reduces the computational cost from $O(|G|^2)$ to $O(|G|)$. For planar rotations, we use the selective disk bispectrum. For spherical 3D rotations, we introduce an augmented selective bispectrum at band limit $L$ which reduces the number of coefficients from $\Theta(L^3)$ to $\Theta(L^2)$. We profile the library, showing that it is invariant up to floating-point error, with its selective $G$-bispectra computed in sub-millisecond time on GPU (up to band limit $L=16$ on the sphere). We evaluate selective $G$-bispectra as pooling layers in $G$-equivariant networks on PatchCamelyon ($C_8$) and OrganMNIST3D (the octahedral group $O$), against norm pooling, gated pooling, Fourier-ELU pooling, max pooling, and a (non-equivariant) data-augmented CNN. Across 46 comparisons, bispectral pooling is never significantly worse than any of them; it is on par on PCam and improves on max pooling by 5.0 pp on OrganMNIST3D. On Spherical MNIST, the augmented selective bispectrum with an MLP head reaches 95.8% on rotated test digits, on par with a matched spherical CNN at $4\times$ lower latency and within 0.3 pp of a tensor-product network at $364\times$ lower latency.
Successful Page Load