Introduction
ReLU neural networks are often treated as "black boxes," but mathematically, they are Continuous Piecewise Affine (CPWA) functions. This means they partition their input space into a massive jigsaw puzzle of convex polyhedral regions, acting as a simple linear function within each piece. Together, these pieces form a "polyhedral complex."
Understanding this geometric structure is crucial for analyzing a model's expressivity, its robustness to adversarial attacks, and its utility in neural implicit representations (where networks encode 3D shapes). However, extracting this complex is notoriously expensive. Previous methods relied on "region subdivision," which is highly redundant: a single edge in the complex is shared by many surrounding regions, causing these algorithms to recalculate the same vertices multiple times. As the input dimension grows, this redundancy creates a massive computational bottleneck.
To solve this, researchers have introduced a novel edge subdivision method that extracts this complex up to 20x faster than previous techniques by leveraging GPU-accelerated tensor operations and focusing on the network's "skeleton" rather than its high-dimensional regions.
The Edge Subdivision Method
The core shift in perspective proposed by the authors is simple but powerful: don't subdivide regions; subdivide edges.
- The 1-Skeleton: Instead of tracking high-dimensional volumes, the algorithm tracks only the "1-skeleton"—the unique vertices and the edges connecting them.
- Sign-Vectors: Every point in the input space is assigned a "sign-vector" (a sequence of + or -) based on whether each neuron in the network is active or inactive. These vectors perfectly encode the combinatorial structure of the complex.
- Iterative Subdivision: The algorithm iterates through the network layer by layer. For each neuron, it identifies which edges are "split" by the neuron's decision boundary (where the sign changes from + to -). It then uses linear interpolation to find the exact intersection point (a new vertex) and updates the connectivity graph.
- GPU Acceleration: Unlike previous graph-based CPU methods, this edge-centric approach can be implemented using standard tensor operations in PyTorch. This allows the algorithm to process millions of cells simultaneously on a consumer-grade GPU.
Datasets and Geometric Validation
Rather than standard image classification datasets, the paper focuses on geometric validation and performance benchmarking:
- Synthetic Benchmarks: Randomly initialized ReLU networks with varying depths and widths were used to test scaling across dimensions ($D=1$ to $10$).
- Neural Implicit Shapes: The authors applied their method to networks trained to represent 3D shapes, such as the Signed Distance Field (SDF) of the Stanford Bunny.
- 2D Geometry: Used for experiments in shape optimization and combinatorial pruning.
Key Insights and Results
By focusing on the edges rather than the regions, the authors avoid recalculating geometric data shared across multiple volumes. In an unbounded arrangement, an edge is shared by $2^{D-1}$ regions, making this optimization critical for higher dimensions.
- Massive Speedups: The method is approximately 20 times faster on average than SplineCam (the previous state-of-the-art CPU-based region subdivision method) for 2D inputs.
- High Scalability: It can extract complexes with millions of cells in just seconds on an NVIDIA RTX 3090, scaling log-linearly with the number of vertices.
- Differentiability: Because the extraction process involves differentiable linear interpolation, researchers can backpropagate through the extraction itself. This enables a "Geometric Loss"—allowing a network to adjust its weights to make its resulting polyhedral shape more compact or smoother. In one demo, a "bunny-shaped" ReLU network was optimized into a perfect circle by minimizing a compactness loss directly on the extracted complex.
- Combinatorial Pruning: By analyzing sign-vectors during subdivision, the method can identify and prune "dead" neurons that do not contribute to a shape's boundary, compressing the model without losing geometric detail.
Limitations and Future Work
Despite these advances, the method still faces the "curse of dimensionality." For input dimensions $D > 8$, the number of regions grows so rapidly that even this optimized approach becomes impractical for all but the smallest networks.
Currently, the implementation operates on bounded domains (like a hypercube), and extending it to unbounded spaces remains a logical next step. Additionally, the edge-pairing step currently relies on sorting ($O(N \log N)$ time). The authors suggest that custom GPU hash tables could reduce this to true linear $O(N)$ time. Finally, while the current work focuses on ReLU activations, the core principles could potentially generalize to other CPWA functions like Leaky ReLU or Max-out layers.
Summary updated