AffineLens: Capturing the Continuous Piecewise Affine Functions of Neural Networks
Pith reviewed 2026-05-13 07:00 UTC · model grok-4.3
The pith
AffineLens enumerates the exact maximal continuous piecewise affine regions of a neural network inside any given bounded input polytope by layer-wise selection of intersecting hyperplanes.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
Given a bounded input polytope, AffineLens identifies the subset of neuron-induced hyperplanes that intersect the domain, enumerates the resulting affine sub-regions in a layer-wise manner, and returns provably non-empty maximal CPA regions together with interior representatives. The framework exploits the fact that fixed activation patterns restrict the network to an affine map, allowing exact enumeration even when the architecture includes batch normalization, pooling, residual connections, multilayer perceptrons, and convolutional layers.
What carries the argument
Layer-wise enumeration of maximal affine regions induced by the subset of neuron hyperplanes that intersect the calibrated input polytope.
If this is right
- Networks become directly comparable through region-complexity metrics such as total region count and average region volume.
- Decision boundaries and region partitions can be visualized for qualitative inspection of any supported architecture.
- Design choices such as depth, width, or skip connections can be evaluated by their effect on the geometry of the induced partition.
- Quantitative expressivity studies become feasible without relying on activation histograms or theoretical upper bounds.
Where Pith is reading between the lines
- The same region enumeration could be used to compute tighter bounds on Lipschitz constants or robustness margins by inspecting the linear maps inside each region.
- Controlling region count during training might serve as a new regularizer that limits unnecessary fragmentation of input space.
- Safety-critical applications could verify that the learned function satisfies certain geometric properties by inspecting the explicit region list rather than the weights alone.
Load-bearing premise
Every network component, including batch-norm, pooling, residuals and convolutions, preserves the continuous piecewise-affine property so the layer-wise count remains exact.
What would settle it
A concrete counter-example in which the method returns a region that is empty inside the input polytope, or a network component that maps an affine piece to a curved surface.
Figures
read the original abstract
Piecewise affine neural networks (PANNs) provide a principled geometric perspective on neural network expressivity by characterizing the input--output map as a continuous piecewise affine (CPA) function whose complexity is governed by the number, arrangement, and shapes of its affine regions. However, existing interpretability and expressivity analyses often rely on indirect proxies (e.g., activation statistics or theoretical upper bounds) and rarely offer practical, accurate tools for enumerating and visualizing the induced region partition under realistic architectures and bounded input domains. In this work, we present AffineLens, a unified framework for computing the hyperplane arrangements and polyhedral structures underlying PANNs. Given a calibrated (bounded) input polytope, AffineLens identifies the subset of neuron-induced hyperplanes that intersect the domain, enumerates the resulting affine sub-regions in a layer-wise manner, and returns provably non-empty maximal CPA regions together with interior representatives. The framework further provides visualizations of region partitioning and decision boundaries, enabling qualitative inspection alongside quantitative region counts. By exploiting the affine restriction property of CPA networks under fixed activation patterns, AffineLens supports a broad class of modern components, including batch normalization, pooling, residual connections, multilayer perceptrons, and convolutional layers. Finally, we use AffineLens to perform a systematic empirical study of architectural expressivity, comparing networks through region complexity metrics and revealing how design choices influence the geometry of learned functions.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper introduces AffineLens, a computational framework that takes a calibrated bounded input polytope and performs layer-wise enumeration of the hyperplane arrangements induced by a piecewise-affine neural network (including batch-norm, pooling, residuals, convolutions, and MLPs). It identifies intersecting neuron hyperplanes, enumerates the resulting polyhedral cells, and returns provably non-empty maximal CPA regions together with interior representative points, plus visualizations and quantitative region-complexity metrics for comparing architectural expressivity.
Significance. If the layer-wise propagation and feasibility checks are exact, AffineLens supplies the first practical, architecture-agnostic tool for exact enumeration of maximal affine regions under realistic modern components. This moves beyond theoretical upper bounds or activation statistics and directly supports geometric interpretability, decision-boundary analysis, and controlled empirical studies of how design choices affect function complexity.
minor comments (3)
- [§4.3] §4.3: the statement that the LP feasibility check guarantees non-emptiness is correct in principle, but the manuscript should explicitly state the numerical tolerance used and how degenerate (zero-volume) cells are filtered.
- [Figure 5] Figure 5: the color scale for region density is not labeled with units or range; readers cannot interpret the quantitative comparison across architectures without it.
- [§5.2] The complexity discussion in §5.2 reports empirical runtimes but omits a big-O statement in terms of number of neurons and input dimension; adding this would clarify scalability limits.
Simulated Author's Rebuttal
We thank the referee for their positive summary of AffineLens and for recommending minor revision. No specific major comments were raised in the report, so we provide no point-by-point responses below. We will incorporate any minor editorial suggestions in the revised version.
Circularity Check
No significant circularity; AffineLens is a computational enumeration algorithm
full rationale
The paper describes AffineLens as an algorithmic procedure that, given a bounded input polytope, identifies intersecting neuron hyperplanes, performs layer-wise enumeration of affine sub-regions, and uses standard linear-programming feasibility checks to certify non-empty maximal CPA regions. No equations or steps reduce the output to a quantity defined by the authors' own fitted parameters, self-citations, or ansatzes. The CPA preservation under batch-norm, pooling, residuals, and convolutions follows from well-known properties of these operations (affine or CPA maps), and the 'provably non-empty' guarantee is a direct consequence of polyhedral feasibility rather than any self-referential construction. The contribution is therefore self-contained as a practical tool without circular reduction.
Axiom & Free-Parameter Ledger
axioms (2)
- domain assumption Networks composed of affine layers and piecewise-linear activations (ReLU, etc.) induce continuous piecewise-affine input-output maps.
- domain assumption The input domain can be represented as a bounded polytope whose intersection with hyperplanes can be computed exactly.
Reference graph
Works this paper leans on
-
[1]
On the Number of Linear Regions of Deep Neural Networks , booktitle =
Guido Mont. On the Number of Linear Regions of Deep Neural Networks , booktitle =
-
[2]
Kaiming He and Xiangyu Zhang and Shaoqing Ren and Jian Sun , title =. Proc. 2015 , publisher =
work page 2015
-
[3]
Andrew L. Maas and Awni Y. Hannun and Andrew Y. Ng , title =. Proc. 2013 , address =
work page 2013
-
[4]
Advances in Neural Information Processing Systems , volume =
Boris Hanin and David Rolnick , title =. Advances in Neural Information Processing Systems , volume =
-
[5]
Sergey Ioffe and Christian Szegedy , title =. Proc. Int. Conf. Mach. Learn. (. 2015 , publisher =
work page 2015
-
[6]
Thomas Zaslavsky , title =. 1975 , publisher =. doi:10.1090/memo/0154 , isbn =
- [7]
-
[8]
On the Expected Complexity of Maxout Networks , booktitle =
Hanna Tseran and Guido Mont. On the Expected Complexity of Maxout Networks , booktitle =
-
[9]
Arturs Berzins , title =. Proc. Int. Conf. Mach. Learn. (. 2023 , publisher =
work page 2023
-
[10]
Ahmed Imtiaz Humayun and Randall Balestriero and Guha Balakrishnan and Richard G. Baraniuk , title =. Proc. 2023 , publisher =
work page 2023
-
[11]
Hao Chen and Yu Guang Wang and Huan Xiong , title =. Neural Networks , volume =. 2023 , doi =
work page 2023
-
[12]
Huan Xiong and Lei Huang and Wenston J. T. Zang and Xiantong Zhen and Guo-Sen Xie and Bin Gu and Le Song , title =. 2024 , doi =
work page 2024
-
[13]
Pawel Piwek and Adam Klukowski and Tianyang Hu , title =. Proc. Conf. Uncertainty in Artificial Intelligence (. 2023 , publisher =
work page 2023
- [14]
-
[15]
Randall Balestriero and Richard G. Baraniuk , title =. Proc. Int. Conf. Mach. Learn. (. 2018 , publisher =
work page 2018
-
[16]
Advances in Neural Information Processing Systems , volume =
Setareh Cohan and Nam Hee Kim and David Rolnick and Michiel van de Panne , title =. Advances in Neural Information Processing Systems , volume =
-
[17]
Elisenda Grigsby and Kathryn Lindsey , title =
J. Elisenda Grigsby and Kathryn Lindsey , title =. 2022 , doi =
work page 2022
-
[18]
arXiv preprint arXiv:2401.11188 , year =
Randall Balestriero and Yann LeCun , title =. arXiv preprint arXiv:2401.11188 , year =. doi:10.48550/arXiv.2401.11188 , eprinttype =
-
[19]
Kaiming He and Xiangyu Zhang and Shaoqing Ren and Jian Sun , title =. Proc. 2016 , publisher =
work page 2016
-
[20]
Alexis Goujon and Arian Etemadi and Michael Unser , title =. J. Comput. Appl. Math. , volume =. 2024 , doi =
work page 2024
-
[21]
Mary Phuong and Christoph H. Lampert , title =. Proc. Int. Conf. Learn. Represent. (. 2020 , publisher =
work page 2020
-
[22]
Jeong and David Rolnick , title =
Boris Hanin and Ryan S. Jeong and David Rolnick , title =. Proc. Int. Conf. Learn. Represent. (. 2022 , publisher =
work page 2022
-
[23]
Yuan Wang , title =. Proc. Int. Joint Conf. Artif. Intell. (. 2022 , publisher =
work page 2022
-
[24]
Advances in Neural Information Processing Systems , volume =
Saket Tiwari and George Konidaris , title =. Advances in Neural Information Processing Systems , volume =
-
[25]
David Rolnick and Konrad P. Kording , title =. Proc. Int. Conf. Mach. Learn. (. 2020 , publisher =
work page 2020
-
[26]
Xiao Zhang and Dongrui Wu , title =. Proc. Int. Conf. Learn. Represent. (. 2020 , publisher =
work page 2020
-
[27]
Martin Trimmel and Henning Petzka and Cristian Sminchisescu , title =. Proc. Int. Conf. Learn. Represent. (. 2021 , publisher =
work page 2021
-
[28]
Journal of Computational Mathematics , volume =
Juncai He and Lin Li and Jinchao Xu and Chunyue Zheng , title =. Journal of Computational Mathematics , volume =. 2020 , doi =
work page 2020
-
[29]
Christoph Hertrich and Amitabh Basu and Marco Di Summa and Martin Skutella , title =. 2023 , doi =
work page 2023
-
[30]
Kuan-Lin Chen and Harinath Garudadri and Bhaskar D. Rao , title =. Advances in Neural Information Processing Systems , volume =
-
[31]
Christian Haase and Christoph Hertrich and Georg Loho , title =. Proc. Int. Conf. Learn. Represent. (. 2023 , publisher =
work page 2023
-
[32]
Randall Balestriero and Romain Cosentino and Behnaam Aazhang and Richard G. Baraniuk , title =. Advances in Neural Information Processing Systems , volume =
- [33]
-
[34]
Yann LeCun and Yoshua Bengio and Geoffrey Hinton , title =. Nature , volume =. 2015 , doi =
work page 2015
-
[35]
Vinod Nair and Geoffrey E. Hinton , title =. Proc. Int. Conf. Mach. Learn. (. 2010 , publisher =
work page 2010
-
[36]
Gennadiy Averkov and Christopher Hojny and Maximilian Merkert , title =. Proc. Int. Conf. Learn. Represent. (. 2025 , publisher =
work page 2025
-
[37]
Scikit-learn: Machine Learning in
Fabian Pedregosa and Ga. Scikit-learn: Machine Learning in. J. Mach. Learn. Res. , volume =. 2011 , doi =
work page 2011
-
[38]
Alex Krizhevsky , title =
-
[39]
Alex Krizhevsky and Ilya Sutskever and Geoffrey E. Hinton , title =. Advances in Neural Information Processing Systems , volume =
-
[40]
Gradient-Based Learning Applied to Document Recognition , journal =
Yann LeCun and L. Gradient-Based Learning Applied to Document Recognition , journal =. 1998 , doi =
work page 1998
-
[41]
Qinghua Tao and Li Li and Xiaolin Huang and Xiangming Xi and Shuning Wang and Johan A. K. Suykens , title =. Nature Reviews Methods Primers , volume =. 2022 , doi =
work page 2022
-
[42]
Max Milkert and David Hyde and Forrest J. Laine , title =. Proc. Int. Conf. Mach. Learn. (. 2025 , publisher =
work page 2025
-
[43]
On the Local Complexity of Linear Regions in Deep
Niket Patel and Guido Mont. On the Local Complexity of Linear Regions in Deep. Proc. Int. Conf. Mach. Learn. (. 2025 , publisher =
work page 2025
-
[44]
Duc Anh Nguyen and Ernesto Araya and Adalbert Fono and Gitta Kutyniok , title =. Proc. Int. Conf. Mach. Learn. (. 2025 , publisher =
work page 2025
-
[45]
Qiang Hu and Hao Zhang and Feifei Gao and Chengwen Xing and Jianping An , title =. 2022 , doi =
work page 2022
-
[46]
International Conference on Neural Information Processing , pages=
Comparative analysis of the linear regions in ReLU and LeakyReLU networks , author=. International Conference on Neural Information Processing , pages=. 2023 , organization=
work page 2023
-
[47]
International Conference on Artificial Neural Networks , pages=
Empirical Study on the Effect of Residual Networks on the Expressiveness of Linear Regions , author=. International Conference on Artificial Neural Networks , pages=. 2023 , organization=
work page 2023
-
[48]
arXiv preprint arXiv:2310.18725 , year=
The Evolution of the Interplay Between Input Distributions and Linear Regions in Networks , author=. arXiv preprint arXiv:2310.18725 , year=
-
[49]
Bibliography file sample.bib was not found during this compilation
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.