Abstract: Neural networks with ReLU activation play a key role in modern machine learning. In view of safety-critical applications, the verification of trained networks is of great importance and necessitates a thorough understanding of essential properties of the function computed by a ReLU network, including characteristics like injectivity and surjectivity. Recently, Puthawala et al. [JMLR 2022] came up with a characterization for injectivity of a ReLU layer, which implies an exponential time algorithm. However, the exact computational complexity of deciding injectivity remained open. We answer this question by proving coNP-completeness of deciding injectivity of a ReLU layer. On the positive side, as our main result, we present a parameterized algorithm which yields fixed-parameter tractability of the problem with respect to the input dimension. In addition, we also characterize surjectivity for two-layer ReLU networks with one-dimensional output. Remarkably, the decision problem turns out to be the complement of a basic network verification task. We prove NP-hardness for surjectivity, implying a stronger hardness result than previously known for the network verification problem. Finally, we reveal interesting connections to computational convexity by formulating the surjectivity problem as a zonotope containment problem.
Introduction
As neural networks are increasingly deployed in safety-critical domains such as autonomous driving and medical imaging, the "black-box" nature of these models is no longer acceptable. Formal verification of properties like injectivity and surjectivity is essential for ensuring reliability. Injectivity—the property that distinct inputs map to distinct outputs—is vital for inverse problems and generative models. Surjectivity—the ability of a network to cover its entire output range—is intrinsically linked to the broader challenge of network verification: guaranteeing that outputs remain within a defined "safe" set for all valid inputs.
Historically, while researchers recognized the difficulty of these verification tasks, the exact computational complexity for a single ReLU layer remained an open question. This paper addresses these gaps, establishing the coNP-completeness of injectivity and providing a path forward through parameterized complexity.
Methodology and Hardness Results
The authors utilize a combination of computational complexity theory and polyhedral geometry to dissect the behavior of ReLU networks.
Hardness of Injectivity
To prove that deciding injectivity is coNP-complete, the authors developed a reduction from the Acyclic 2-Disconnection problem, a known hard problem in graph theory. This reduction demonstrates that even the simplest non-linear component of a modern network—a single ReLU layer—is computationally heavy to reason about.
Geometric Interpretation and FPT Algorithm
ReLU networks are piecewise linear, dividing the input space into a "fan" of polyhedral cells. Within each cell, the network acts as a linear transformation. The global property of injectivity depends on the consistency of these local linear maps across the entire partition.
While the problem is generally hard, the authors provide a "silver lining": a new algorithm that is Fixed-Parameter Tractable (FPT) with respect to the input dimension $d$. By using Helly’s Theorem to limit the search space, the algorithm can efficiently verify injectivity when $d$ is small, regardless of the number of neurons $m$. This effectively flips the traditional "curse of neurons" into a more manageable "curse of dimension" for many practical applications.
Key Insights and Implications
- Universal Verification Hardness: The study shows that verification is coNP-hard for any reasonable input domain containing a small ball. This suggests that the difficulty of verification is an inherent property of the ReLU activation itself, not the specific geometry of input constraints.
- The Zonotope Connection: The paper reveals a deep link between neural network surjectivity and Zonotope Containment, a problem from robotics and control theory involving the Minkowski sums of line segments. This connection opens new avenues for applying control theory techniques to neural network verification.
- Optimal Lower Bounds: Assuming the Exponential Time Hypothesis (ETH), the authors show that no algorithm can decide injectivity in $2^{o(m)}$ time, suggesting their $2^m$ approach is essentially optimal for high-dimensional inputs.
Conclusion and Future Work
This work provides a comprehensive mathematical map for the verification of ReLU networks. It identifies the fundamental computational walls—proving coNP-completeness for injectivity—while also highlighting a path forward for low-dimensional inputs via FPT algorithms.
Future research directions include extending the FPT results to multi-layer (deep) networks, improving the $O((d+1)^d)$ running time, and exploring the complexity of bijectivity in more complex architectures. These findings are a crucial step toward building provably reliable and transparent AI systems.
Summary updated