The Computational Complexity of Counting Linear Regions in ReLU Neural Networks

Moritz Stargalla, Christoph Hertrich, Daniel Reichman
5/1/2025

No confident code implementation found for this paper.

Abstract

An established measure of the expressive power of a given ReLU neural network is the number of linear regions into which it partitions the input space. There exist many different, non-equivalent definitions of what a linear region actually is.

Show full abstract

We systematically assess which papers use which definitions and discuss how they relate to each other. We then analyze the computational complexity of counting the number of such regions for the various definitions. Generally, this turns out to be an intractable problem. We prove NP- and #P-hardness results already for networks with one hidden layer and strong hardness of approximation results for two or more hidden layers. Finally, on the algorithmic side, we demonstrate that counting linear regions can at least be achieved in polynomial space for some common definitions.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{stargalla2025computational,
  title  = {The Computational Complexity of Counting Linear Regions in ReLU Neural Networks},
  author = {Moritz Stargalla and Christoph Hertrich and Daniel Reichman},
  year   = {2025},
  eprint = {2505.16716},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2505.16716},
  url    = {https://doi.org/10.48550/arXiv.2505.16716},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.16716.svg)](https://codeofpaper.com/paper/2505.16716)

Discussion