A singular Riemannian Geometry Approach to Deep Neural Networks III. Piecewise Differentiable Layers and Random Walks on $n$-dimensional Classes
Alessandro Benfenati, Alessio Marta
TL;DR
The paper extends a singular Riemannian geometry framework to neural networks with piecewise differentiable layers, enabling a geometric view of equivalence classes across inputs and representations. It generalizes algorithms for exploring these classes (SiMEC/SiMExp) to n-dimensional settings and adapts them to convolutional, residual, and recurrent architectures, including ReLU-type activations. The approach yields practical insights through numerical experiments on MNIST and time-series data, demonstrating that outputs remain constant along null directions while non-null directions traverse between equivalence classes. This work provides a principled way to study the internal geometry of deep networks and suggests avenues for explainability and robustness analysis grounded in differential geometry.
Abstract
Neural networks are playing a crucial role in everyday life, with the most modern generative models able to achieve impressive results. Nonetheless, their functioning is still not very clear, and several strategies have been adopted to study how and why these model reach their outputs. A common approach is to consider the data in an Euclidean settings: recent years has witnessed instead a shift from this paradigm, moving thus to more general framework, namely Riemannian Geometry. Two recent works introduced a geometric framework to study neural networks making use of singular Riemannian metrics. In this paper we extend these results to convolutional, residual and recursive neural networks, studying also the case of non-differentiable activation functions, such as ReLU. We illustrate our findings with some numerical experiments on classification of images and thermodynamic problems.
