Judging from this and that paper, deep learning is the string theory of the 2020s for geometers and representation theorists.
String theory is the 90s answer to the tears of algebraic geometers worldwide trying to write the "Applications" part of their grant proposals. https://t.co/AboZ5WkPtc
โ algebraic geometer BLM (@BarbaraFantechi) December 17, 2021
If you want to know quickly what neural networks really are, I can recommend the post demystifying deep learning.
The typical layout of a deep neural network has an input layer

Picture taken from Logical informations cells I
For simplicity letโs assume all neurons in layer
If at any given moment the โstateโ of the neural network is described by the state-vectors
which will then give new states in layer
and so on, rippling through the network, until we get as the output
where all the
This is just the dynamic, or forward working of the network.
The learning happens by comparing the computed output with the expected output, and working backwards through the network to alter slightly the state-vectors in all layers, and the weight-matrices between them. This process is called back-propagation, and involves the gradient descent procedure.
Even from this (over)simplified picture it seems doubtful that set valued (!) toposes are suitable to describe deep neural networks, as the Paris-Huawei-topos-team claims in their recent paper Topos and Stacks of Deep Neural Networks.
Still, there is a vast generalisation of neural networks: learners, developed by Brendan Fong, David Spivak and Remy Tuyeras in their paper Backprop as Functor: A compositional perspective on supervised learning (which btw is an excellent introduction for mathematicians to neural networks).
For any two sets
is a set, a parameter space of some functions from to . is the interpretation map describing the functions in . is the update map , part of the learning procedure. The idea is that is a map which sends closer to than the map did. is the request map , the other part of the learning procedure. The idea is that the new element in is such that will be closer to than was.
The request map is also crucial is defining the composition of two learners
In this way we can view a deep neural network with
where the learner describing the transition from the
and interpretation map for
The update and request maps (encoding back-propagation and gradient-descent in this case) are explicitly given in theorem III.2 of the paper, and they behave functorial (whence the title of the paper).
More generally, we will now associate objects of a topos (actually just sheaves over a simple topological space) to a network op
inspired by section I.2 of Topos and Stacks of Deep Neural Networks.
The underlying category will be the poset-category (the opposite of the ordering of the layers)
The presheaf on a poset is a locale and in this case even the topos of sheaves on the topological space with
If the learner
and other retriction maps by composition.
A major result in Topos and Stacks of Deep Neural Networks is that back-propagation is a natural transformation, that is, a sheaf-morphism
In this general setting of layered learners we can always define a map on the sections of
But, in order for this to define a sheaf-morphism, compatible with the restrictions, we will have to impose restrictions on the update and restriction maps of the learners, in general.
Still, in the special case of deep neural networks, this compatibility follows from the functoriality property of Backprop as Functor: A compositional perspective on supervised learning.
To be continued.