GINN: Geometric Illustration of Neural Networks

Luke Nicholas Darlow, Amos J. StorkeyarXiv 2018 · OpenReview

Introduction

Neural networks are often criticized as "black boxes," where high-dimensional activations and complex architectures obscure the underlying mechanics of learning. While existing visualization techniques typically focus on the static final state of a trained model, they rarely capture the dynamic process of how a network learns to partition space. This paper introduces GINN (Geometric Illustration of Neural Networks), a tool designed to demystify Stochastic Gradient Descent (SGD) by tracking the evolution of decision boundaries in a simple 2D space.

Methodology

To facilitate clear visualization, the authors utilize a simple fully connected neural network with three hidden layers (16 neurons each) and ReLU activations. The problem is framed as a 2D coordinate classification task: given an $(x, y)$ pixel location, the network predicts the log-probability of that pixel being white or black.

The network architecture maps 2D coordinates to pixel intensities through multiple ReLU layers.

The core of GINN relies on the piecewise linear nature of the ReLU function ($\max(0, x)$). Every ReLU unit defines a "reflex point"—a boundary where it switches between active and inactive states. By mapping these boundaries across all layers, the authors can visualize how the network progressively divides the input domain into distinct linear regions. The model was trained on a single target image—a silhouette of a bottle with a central diamond—using the Adam optimizer over 1.28 million iterations.

Training Dynamics and Key Insights

By observing the animation of these geometric boundaries, several non-obvious training phenomena were identified:

  • Bias Dominance in Early Training: Initially, the network primarily adjusts biases, causing decision lines to shift in parallel across the domain before significant weight adjustments change their slopes.
  • Feature Convergence: Decision boundaries naturally gravitate toward "critical points" in the data, such as sharp corners or edges of the bottle silhouette.
  • Redundancy and "Copycat" Neurons: Multiple neurons within the same layer often converge to identical decision boundaries, illustrating the inherent redundancy in overparameterized models.
  • Boundary Instability: Some neurons exhibit "indecisive" behavior late in training, with boundaries flipping wildly despite a near-zero learning rate and stable overall loss.
  • Symmetry Constraints: Successful learning often depends on the network's ability to mirror the target data's symmetry. If early layers lock into asymmetric patterns, subsequent layers frequently struggle to correct the error.

Results

As a qualitative exploratory study, GINN demonstrates how layers interact to construct complex functions. Layer 1 provides basic linear divisions, while Layer 2 introduces "bends" where its boundaries intersect those of Layer 1. Layer 3 further refines these shapes, resulting in a sophisticated piecewise linear approximation of the target image.

The progression of the learning process from random initialization to the final fitted silhouette.

The visualizations confirm that tracking these geometric transitions provides a highly interpretable window into the mechanics of neural computation, revealing how simple linear units combine to represent complex geometry.

Conclusion and Future Work

While currently limited to toy 2D problems and small MLPs, GINN offers valuable intuitions into how optimization choices and initializations affect boundary formation. The authors suggest that these insights could inform the design of better training regimes for larger, more complex architectures. The GINN tool has been open-sourced to encourage further community exploration into the geometric foundations of deep learning.

Summary updated

BibTeX
@misc{darlow2018ginn,
  author = {Luke Nicholas Darlow and Amos J. Storkey},
  title = {{GINN: Geometric Illustration of Neural Networks}},
  year = {2018},
  eprint = {1810.01860},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1810.01860},
}
Figure