Neural Networks as Local-to-Global Computations
Organizations: Department of Mathematics, University of Pennsylvania
Abstract
We construct a cellular sheaf from any feedforward ReLU neural network by placing one vertex for each intermediate quantity in the forward pass and encoding each computational step - affine transformation, activation, output - as a restriction map on an edge. The restricted coboundary operator on the free coordinates is unitriangular, so its determinant is and the restricted Laplacian is positive definite for every activation pattern. It follows that the relative cohomology vanishes and the forward pass output is the unique harmonic extension of the boundary data. The sheaf heat equation converges exponentially to this output despite the state-dependent switching introduced by piecewise linear activations. Unlike the forward pass, the heat equation propagates information bidirectionally across layers, enabling pinned neurons that impose constraints in both directions, training through local discrepancy minimization without a backward pass, and per-edge diagnostics that decompose network behavior by layer and operation type. We validate the framework experimentally on small synthetic tasks, confirming the convergence theorems and demonstrating that sheaf-based training, while not yet competitive with stochastic gradient descent, obeys quantitative scaling laws predicted by the theory.
Figures & tables
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
| Task | Depth | Sheaf Train | SGD Train | Sheaf Test | SGD Test | Ratio |
|---|---|---|---|---|---|---|
| Paraboloid | 1H | 0.0756 | 0.0030 | 0.0884 | 0.0044 | 19.9 |
| Saddle | 1H | 0.0108 | 0.0010 | 0.0106 | 0.0013 | 8.4 |
| Circular | 1H | 0.0652 | 0.0021 | 0.0679 | 0.0031 | 22.0 |
| Blobs | 1H | 0.1368 | 0.0657 | 0.1212 | 0.2613 | 0.5 |
| Paraboloid | 2H | 0.0764 | 0.0065 | 0.0880 | 0.0095 | 9.2 |
| Saddle | 2H | 0.0110 | 0.0009 | 0.0126 | 0.0011 | 11.0 |
| Architecture | (median) | (std) |
|---|---|---|
| [2,30,1] | 0.2248 | 0.0200 |
| [2,10,8,1] | 0.0602 | 0.0047 |
| [2,8,6,4,1] | 0.0281 | 0.0060 |
| Edge | Sheaf-trained | SGD-trained |
|---|---|---|
| W1 | 0.0007 0.0010 | 0.0000 0.0001 |
| W2 | 0.0001 0.0002 | 0.0000 0.0000 |
| R1 | 0.0027 0.0034 | 0.0002 0.0003 |
| Total | 0.0035 | 0.0003 |
Sheaf Neural Networks
Sheaf neural networks generalize graph learning with local vector spaces and edge maps that model how information is compared and transported.
See all 29 papers