Papers
Topics
Authors
Recent
Search
2000 character limit reached

Singular Semi-Riemannian Geometry in DNNs

Updated 12 January 2026
  • Singular semi-Riemannian geometry is a framework that employs degenerate (positive semidefinite) metrics to reveal network invariances in DNNs.
  • It systematically pulls back a Euclidean output metric through layers to construct singular metrics whose null directions characterize equivalence classes in input space.
  • Algorithmic approaches like the SiMEC-1D scheme facilitate fast sampling and visualization of high-dimensional data manifolds, aiding adversarial vulnerability analysis.

Singular semi-Riemannian geometry in deep neural networks (DNNs) is a mathematical framework that employs degenerate Riemannian metrics—metrics that are positive semidefinite but not invertible—to analyze the geometry induced by feed-forward, convolutional, residual, and recurrent networks at both the input and hidden layers. By systematically pulling back an output-layer metric (typically Euclidean) through the entire network, one obtains a sequence of singular metrics whose null directions exactly correspond to network invariances: directions along which the network output does not change. This approach enables a rigorous investigation of fibers (preimages) of the network map, equivalence classes in input space, geometric characterization of adversarial directions, and algorithmic techniques for visualizing, exploring, and sampling high-dimensional data manifolds as transformed by modern DNNs (Benfenati et al., 2021, Benfenati et al., 2021, Benfenati et al., 2024).

1. Construction of Singular Metrics in DNNs

Given a smooth neural network map F:(M,gM)→(N,gN)F: (M, g_M) \to (N, g_N), where M⊂RmM \subset \R^m (input space) and N⊂RnN \subset \R^n (output space), and a Riemannian metric gNg_N on NN, the pullback metric on MM is defined by

g=F∗gNg = F^* g_N

with coordinate representation

gij(x)=∑h,k=1n∂Fh∂xi(x) ghkN(F(x)) ∂Fk∂xj(x).g_{ij}(x) = \sum_{h,k=1}^n \frac{\partial F^h}{\partial x^i}(x) \, g^N_{hk}(F(x)) \, \frac{\partial F^k}{\partial x^j}(x).

In matrix form, g(x)=JF(x)TgN(F(x))JF(x)g(x) = J_F(x)^T g_N(F(x)) J_F(x), where JF(x)J_F(x) is the Jacobian. If M⊂RmM \subset \R^m0 (as in typical overparameterized or compressive neural architectures), M⊂RmM \subset \R^m1 is positive semidefinite and only defines a (semi-)Riemannian structure. The kernel of M⊂RmM \subset \R^m2 consists of vectors tangent to directions in input space that are collapsed by the network to a single output value (Benfenati et al., 2021).

In multilayer networks, this construction is naturally iterated: for each layer map M⊂RmM \subset \R^m3, with output metric M⊂RmM \subset \R^m4, the pullback metric on M⊂RmM \subset \R^m5 is

M⊂RmM \subset \R^m6

For linear or piecewise linear layers (such as fully connected layers, convolutions, or blockwise-ReLU networks), the null space of M⊂RmM \subset \R^m7 is determined by the kernel of the layer Jacobian and can be computed explicitly (Benfenati et al., 2021, Benfenati et al., 2024).

2. Equivalence Classes and Fiber Geometry

The equivalence class of an input M⊂RmM \subset \R^m8 is the set

M⊂RmM \subset \R^m9

where N⊂RnN \subset \R^n0. Under regularity conditions (typically, N⊂RnN \subset \R^n1 is a submersion at N⊂RnN \subset \R^n2), N⊂RnN \subset \R^n3 is a smooth submanifold of N⊂RnN \subset \R^n4 with dimension N⊂RnN \subset \R^n5. The tangent space at N⊂RnN \subset \R^n6 to N⊂RnN \subset \R^n7 is N⊂RnN \subset \R^n8, and such fibers correspond exactly to the null-directions of the singular metric N⊂RnN \subset \R^n9 (Benfenati et al., 2021).

For networks mapping gNg_N0, generic fibers (preimages) are 1-dimensional curves. These equivalence classes organize input space into level sets of constant output and are fundamental for data augmentation, adversarial analysis, and understanding classifier boundaries.

The quotient space gNg_N1, under the equivalence relation gNg_N2 if gNg_N3 for the pseudodistance induced by gNg_N4, inherits a unique smooth structure, and the vertical bundle gNg_N5 describes the family of fibers over the base gNg_N6 (Benfenati et al., 2021).

3. Algorithmic Reconstruction of Equivalence Classes

For the explicit construction of preimages and equivalence classes, two approaches are prominent:

  • Continuous formulation: Integrate the differential equation gNg_N7, where gNg_N8 is a smooth, unit-length vector field spanning gNg_N9. This trajectory remains within the level set NN0 and satisfies NN1.
  • Discrete polygonal (SiMEC-1D) scheme: Iteratively step along the null-eigenvector of NN2:

    1. Compute NN3.
    2. Extract a unit eigenvector NN4 with zero eigenvalue (up to a numeric tolerance).
    3. Update NN5, ensuring orientation continuity.

Error control is achieved by monitoring the energy

NN6

Domain violations are handled by projection or boundary checks (Benfenati et al., 2021).

4. Geometric Insights: Invariances, Sensitivities, and Adversarial Vulnerability

Under the singular metric NN7, null directions represent invariances—perturbations along these directions do not change the neural network's output. The induced pseudodistance

NN8

is zero for NN9 in the same fiber. Directions orthogonal to MM0 with large eigenvalues measure sensitivity: small perturbations here can yield significant output changes (Benfenati et al., 2021).

Adversarial examples often exploit such directions: perturbations of small Riemannian length but large effect in output space (large gradient norm directions) are candidates for adversarial attacks. The study of geodesics and the energy-minimizing paths in this singular geometry provides a coordinate-invariant framework for quantifying classifier robustness.

Diffusion processes governed by the Laplace–Beltrami operator

MM1

describe uncertainty and model sensitivity transverse to the fiber (Benfenati et al., 2024).

5. Extensions to Non-Smooth and Structured Layers

Convolutional, residual, and recurrent architectures are incorporated by applying the pullback construction to the appropriate differentiable or piecewise differentiable maps. For ReLU and leaky-ReLU activations, MM2 is partitioned into polytopal regions where the map is MM3 and MM4 is well-defined; across boundaries, MM5 typically experiences a discontinuous change in signature or rank.

In convolutional networks, for example, the metric on the pre-flattened input space is constructed via automatic differentiation (e.g., in PyTorch), allowing explicit, data-driven computation of the singular geometry even in high dimensions (Benfenati et al., 2024).

Recurrent networks (including LSTM architectures) employ the product structure of input and hidden state spaces, and the stepwise update maps allow layerwise application of the pullback metric construction.

6. Random Walks, Sampling, and Numerical Experiments

Random walks on equivalence classes are realized by repeatedly sampling unit-norm directions in MM6 and stepping MM7. For high-dimensional classes, the probability of revisiting a previous location is exponentially small in the class dimension and step size, MM8. This provides an efficient means for exploring invariances and generating synthetic samples in the input manifold with fixed network output (Benfenati et al., 2024).

Empirical results span:

  • Fully connected networks for nonlinear regression: SiMEC-1D explores level sets to high accuracy, as shown with analytic surfaces MM9.

  • Convolutional neural networks on MNIST: For g=F∗gNg = F^* g_N0 softmax outputs, the null-class dimension is 774, and random walks yield synthetic samples classified identically.
  • Thermodynamic regression (power plant models): SiMEC walks in null directions keep output power fixed while exploring vast directions in input (environmental) variable space.

Step size selection is critical for numerical stability; larger g=F∗gNg = F^* g_N1 can induce drift or exit the intended domain (Benfenati et al., 2021, Benfenati et al., 2024).

7. Theoretical and Practical Implications

The singular semi-Riemannian framework enables:

  • Identification of geometric structures underlying network invariances and decision boundaries.
  • Quantitative and coordinate-invariant analysis of robustness and adversarial vulnerability by examining Riemannian lengths and geodesics in the null and orthogonal directions.
  • Fast sampling and data augmentation in high-dimensional null classes via random walks, with complexity orders of magnitude lower than naive mesh-grid explorations.
  • Uniform treatment of modern DNN architectures, including non-smooth activations and structured layers, by local partitioning and piecewise analysis.

The methods, grounded in differential geometry and implemented via automatic differentiation and linear algebra, provide a bridge between abstract mathematical theory and practical machine learning, with applications to generative modeling, uncertainty quantification, and classifier interpretation (Benfenati et al., 2021, Benfenati et al., 2021, Benfenati et al., 2024).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Singular Semi-Riemannian Geometry in DNNs.