Abstract
Classic learning theory suggests that proper regularization is the key to good generalization and robustness. In classification, current training schemes only target the complexity of the classifier itself, which can be misleading and ineffective. Instead, we advocate directly measuring the complexity of the decision boundary. As a proof of concept, we analyze ReLU neural networks, whose boundary complexity can be characterized by the number of affine pieces. Using tropical geometry, we develop a novel method to explicitly count the exact number of boundary pieces. Numerical experiments reveal that boundary piece count is largely independent of standard measures like weight norms but is negatively correlated with robustness. Popular robust training techniques are found to simplify the decision boundary by reducing the number of these pieces.
Introduction: The Boundary Complexity Gap
In deep learning, regularization methods like weight decay or dropout typically act on the functional level, aiming to keep weights small or functions smooth. However, for classification tasks, the exact values of the function are secondary to the decision boundary—the level set where the model switches labels. A model might have a small functional norm yet possess a highly "wiggly" and non-robust decision boundary. Conversely, scaling a function by a constant changes its norm but leaves the decision boundary unchanged. To truly understand generalization and robustness, we must measure the complexity of the boundary itself. While previous research offered only loose upper bounds, this work provides a method for an exact count.
Methodology: Tropical Geometry and Dual Space
We focus on ReLU neural networks, which are piecewise linear. Their decision boundaries consist of a finite number of flat "affine pieces." To count these pieces exactly, we leverage Tropical Geometry. In this framework, ReLU networks are represented as the difference between two convex piecewise-affine (CPA) functions.
As shown in the figure above, the authors represent these functions in a "dual space" where each linear piece of the network corresponds to a point, and the maximum of several linear pieces corresponds to the "upper hull" of those points. The core contribution is an algorithm using Minkowski sums of point sets in this dual space to track how pieces combine across layers. By analyzing the vertices of the resulting polytopes, we can precisely count the distinct linear segments forming the global decision boundary.
Empirical Validation: The 2D Spiral Dataset
Due to the computational intensity of Minkowski sums in high dimensions, empirical validation was conducted on 2D synthetic datasets, such as the 3×3 Gaussian Mixture and the 2D Spiral dataset. The spiral dataset is particularly useful as it is non-linearly separable and requires a complex boundary for high accuracy.
These experiments allow for a direct comparison between the calculated piece count and the visual "smoothness" of the boundary. The mathematical piece count correlates strongly with visual intuition, validating it as a meaningful complexity measure.
Key Insights: Robustness as Boundary Simplification
Our analysis uncovered several distinctive properties of boundary complexity:
- Independence from Standard Metrics: Boundary piece count is largely independent of the $l_2$ norm of weights. A model's weights can grow while its boundary remains simple.
- Two-Stage Training Behavior: During training, the number of boundary pieces typically spikes as the model learns the data, then decreases and stabilizes as it converges, effectively pruning unnecessary "wiggles."
- Robustness through Simplification: Robust training techniques, such as adversarial training and noise injection, significantly reduce the number of boundary pieces. In the spiral dataset, standard training resulted in an average of 377 pieces, while adversarial training reduced this to 259 pieces without sacrificing accuracy. This suggests that robust training acts as a form of "boundary regularization."
Conclusion and Future Work
This paper introduces the first method to calculate the exact number of boundary pieces for a ReLU network. While currently limited by the scalability of Minkowski sum computations in high dimensions, this work opens new avenues for understanding model complexity. Future research will focus on developing efficient approximations for high-dimensional data and exploring differentiable boundary regularization to incorporate this count directly into loss functions.
Summary updated