NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Empirical Studies on the Properties of Linear Regions in Deep Neural Networks

Xiao Zhang, Dongrui Wu

Introduction

Deep Neural Networks (DNNs) with piecewise linear activations (like ReLU) don't just learn a single smooth function; they partition the input space into a complex patchwork of convex polytopes known as "linear regions." Inside each patch, the network behaves as a simple affine transformation. While researchers previously believed that the number of these regions was the primary driver of a model’s expressivity, little was known about their actual geometry.

This paper moves beyond simply counting regions to analyze their geometric properties. It reveals how common optimization tricks—specifically Batch Normalization (BN) and Dropout—fundamentally reshape this internal landscape in distinct ways, even when they result in identical classification accuracy. By understanding the geometry of these regions (their size, orientation, and relationship to neighbors), we can better understand why certain models generalize better or are more robust to adversarial attacks.

Methods

The authors treat the linear regions as convex polytopes and employ mathematical tools from polyhedral computation to study them. Their approach involves:

  1. Region Search: Developing a "depth-wise exclusion process" to identify the exact half-spaces (inequalities) that define the linear region containing a specific input point.
  2. Insphere Calculation: Solving a convex optimization problem to find the inradius (the radius of the largest sphere that fits inside the polytope) to measure the "narrowness" or size of a region.
  3. Hyperplane Analysis: Calculating the angles between the boundaries (hyperplanes) of a region to check for correlation or orthogonality.
  4. Decision Boundary Probing: Searching for the maximum probability point within a region to determine if a classification boundary exists inside that specific patch.
  5. Gradient Relevance: Measuring the cosine similarity between the gradient of one region and its neighbors to see how "shattered" the gradient landscape is.

Datasets

The study primarily uses Vectorized MNIST for the bulk of the fully-connected DNN analysis, CIFAR-10 to extend findings to Convolutional Neural Networks (CNNs), and a 2D Toy Spiral Dataset created by the authors to provide intuitive visualizations of how different techniques partition a simple space.

Key Insights and Ideas

  • BN vs. Dropout Geometry: While both techniques improve training, they have opposite effects on geometry. Batch Normalization tends to partition the space into many small, uniform regions. Dropout, conversely, creates regions that are more concentrated and "aligned" around decision boundaries.
2D visualizations comparing the linear and classification regions of Vanilla, Batch Normalization, and Dropout models.
  • Orthogonality: One of the most striking findings is that BN makes the directions of the boundary hyperplanes more orthogonal (decorrelated). In contrast, Dropout and large learning rates tend to make these boundaries more parallel.
  • The "Shattered Gradient" Connection: The authors found that while gradients are highly relevant to their immediate neighbors (demonstrating the underlying linearity), BN slightly reduces this relevance. This provides a geometric perspective on the "shattered gradient" problem often discussed in deep scaling.
  • Adversarial vs. Manifold Regions: The regions containing adversarial examples (points designed to fool the model) actually look geometrically more like "normal" data regions than the regions containing the actual decision boundaries.

Key Results

  • Accuracy vs. Geometry: On MNIST, Vanilla, BN, and Dropout models all achieved ~98% accuracy, yet their internal linear region maps were completely different.
  • Region Size: BN leads to significantly smaller inradiuses across manifold, decision, and adversarial regions compared to vanilla models.
Density histograms of inradius sizes across different region types and learning rates.
  • Decision Boundaries: Dropout makes the regions where data points lie less likely to contain a decision boundary, effectively "pushing" the boundaries away from the data, which likely contributes to its regularization benefits.
  • CNN Stability: In CNNs, the properties of linear regions are more "stable" than in fully-connected networks, likely due to the inherent sparsity of convolutional weights.

Limitations and Future Work

  • Computational Complexity: Finding and analyzing these polytopes is computationally expensive. The authors acknowledge that scaling this analysis to state-of-the-art, massive architectures (like large Transformers) remains a challenge.
  • Smooth Activations: The current framework relies on the piecewise linearity of ReLU. It is not immediately applicable to "smooth" activations like Swish or GeLU without approximation.
  • Theoretical Framework: While the paper provides excellent empirical observations, the authors note the need for a formal theoretical framework to explain why these optimization techniques lead to these specific geometric outcomes.

Future work aims to explore the direct relationship between these geometric properties and a model's adversarial robustness.

Summary updated

BibTeX
@inproceedings{zhang2020empirical,
  author = {Xiao Zhang and Dongrui Wu},
  title = {{Empirical Studies on the Properties of Linear Regions in Deep Neural Networks}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
}
Figure