English

Presenting Neural Networks via Coherent Functors

Category Theory 2026-04-17 v1

Abstract

This paper develops a methodology for representing machine learning models as models of formal theories, grounded in the perspective that machine learning models are a form of database and that databases are models of theories in coherent logic. Two intermediate results support this approach: any functorial database schema has an associated κ\kappa-coherent theory whose models coincide with its instances, and data may be hard-coded into a coherent category such that any model of the resulting theory necessarily contains it. These tools are used to show that any dense feed-forward neural network architecture over the floating point numbers may be presented as a coherent category GG whose SetSet-models are the networks of that architecture, with inference arising as the precomposition functor Coh(ι,Set)Coh(\iota, Set) along a coherent functor ι:RSpan(a0,an)G\iota : RSpan(a_0, a_n) \rightarrow G. This representation is extended to networks with weight and bias fixing and tying, encompassing sparse and convolutional architectures, via a 2-coequaliser construction in CohCoh_\sim. Taken together, these results recast neural network inference as an extension problem in the 2-category CohCoh_\sim of coherent categories, supporting the interpretation of a network architecture as a formal hypothesis about the structure of data and of model training as a lifting of a dataset into a more constrained theory.

Keywords

Cite

@article{arxiv.2604.15100,
  title  = {Presenting Neural Networks via Coherent Functors},
  author = {Matthew Pugh and Jo Grundy and Corina Cirstea and Nick Harris},
  journal= {arXiv preprint arXiv:2604.15100},
  year   = {2026}
}
R2 v1 2026-07-01T12:12:48.672Z