Foundations of Categorical Equivariant Deep Learning
Abstract
Symmetry-aware machine learning is commonly formulated in terms of equivariance under a single group action, but many real-world transformations are typed (i.e., have different source and target contexts), potentially partial or non-invertible, and compositional (e.g., modality transitions, causal updates, spatial/temporal subsampling, information aggregation, translation, logical entailment, intervention chains, reference frame changes, and their compositions). Such real-world transformations are better modeled by a category of transformations whose objects represent data contexts and whose morphisms represent admissible transformations between contexts. We thus extend symmetry-aware deep learning from groups to such transformation categories; enforcing categorical equivariance on neural architectures gives stronger robustness than group equivariance. We ground this in both theory and experiments. We formulate how to build category-equivariant architectures and prove an equivariant universal approximation theorem (UAT) for them (i.e., show that they can approximate any equivariant continuous transformations); specifically, we define the class of category-equivariant neural networks (CENNs) by extending group convolutions to category convolutions. The category-equivariant UAT allows us to systematically derive equivariant UATs for groups/groupoids, posets/lattices, graphs/sheaves, and their compositions such as categorical products and Grothendieck fibrations, unifying geometric and topological deep learning architectures within the single framework of categorical deep learning. Finally, we analyze the practical value of categorical symmetry in machine learning experiments. We present three experiments evaluating the OOD (out-of-distribution) robustness of CENNs and standard models, demonstrating that enforcing categorical equivariance yields measurable robustness gains over group-equivariant and Transformer baselines.