arXiv:2610.06092cs.CCOct 2026

Manuscript Offprint

arXiv:2610.06092

Fractal Gadgets for Neural Networks: The Complexity of the Narrow Regime

Olivier Bournez, Johanne Cohen, Laura Cohen, Adrian Wurm

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We study the verification problem for deep narrow ReLU neural networks: given a network N:[0,1]→R\mathcal{N}:[0,1]\to\mathbb{R} of bounded width computing an iterated piecewise-affine map, does there exist an input x∈[0,1]x\in[0,1] satisfying a prescribed output constraint? Classical hardness results for ReLU verification rely on reductions from 3-SAT with one neuron per Boolean variable, and therefore do not address the narrow regime in which width is fixed to a small constant. At the other end of the scale, a width-1 ReLU network computes a monotone piecewise-affine function with polynomially many pieces, so its verification is solvable in polynomial time; this remains true for iterated width-1 networks under a unary time bound. The precise threshold at which verification becomes intractable had remained open.

Our main result is that verification of ReLU neural networks is NP-complete at width 4 for arbitrary inputs in [0,1][0,1]. When inputs are restricted to a natural discrete encoding set, NP-completeness already holds at width 3, a baseline building on earlier techniques. Combined with polynomial-time decidability at width 1, this pins down the complexity on the encoding set up to the single open case of width 2; for arbitrary inputs in [0,1][0,1], the classification is tight up to widths 2 and 3.

The technical core of the paper is a fractal preprocessing gadget of independent interest: a width-2 ReLU subnetwork that, applied to a real input x∈[0,1]x \in [0,1], vanishes precisely when xx lies near a finite Cantor-like subset of [0,1][0,1]. The gadget effectively reduces verification of a continuous function on [0,1][0,1] to verification on a discrete set of 2n2^n points, without any ad hoc real encoding of discrete data. This “discretisation trick” is the missing ingredient for width-bounded hardness reductions: combined with width-2 digit-extraction and clause-evaluation subnetworks sharing a single two-register state, it yields, together with one register for the fractal error, a width-4 polynomial-time reduction from 3-SAT on all of [0,1][0,1].

The same construction transfers a spectrum of further hardness results to the width-3 setting on the encoding set: the universal-zero problem is coNP-complete, counting zeros is #P-complete, a majority variant is PP-complete, and approximating the minimum output within any constant gap inherited from MAX-3SAT is NP-hard. The NP-, coNP-, and inapproximability results lift to arbitrary real inputs in [0,1][0,1] at width 4; the lifting of counting and majority, and whether the lifting to [0,1][0,1] can be achieved at width 3, remain open. We relate the latter to a continuity obstruction for width-3 ReLU gadgets discriminating between valid and invalid digit-4 prefixes. Keywords: Analysis and Verification of AI, Models of

computation, Complexity theory, Formal neural networks, Neural network verification

*Institut Polytechnique de Paris, Ecole Polytechnique, LIX, 91128 Palaiseau Cedex, France. olivier.bournez@lix.polytechnique.fr

†LISN, CNRS, Université Paris-Saclay, 91190 Gif-sur-Yvette, France. johanne.cohen@lisn.fr

‡^{\ddagger}CentraleSupelec, Université Paris-Saclay, 91190 Gif-sur-Yvette, France. laura.cohen@student-cs.fr

§^{§}Computer Science Institute, BTU Cottbus-Senftenberg, Platz der Deutschen Einheit 1, D-03046 Cottbus, Germany. wurm@b-tu.de

1 Introduction

The computational capabilities of neural networks—their expressive power, their links to classical models of computation, and the effect of architectural constraints such as depth, width, and activation function—have long motivated the study of verification problems, which ask whether a given network satisfies a prescribed input–output property. Such questions are especially important whenever neural networks are deployed in safety-sensitive settings. Concretely, the decision problem we study is the existential decision problem: given a network and a linear output specification (an affine constraint on the output, such as N(x)=0\mathcal{N}(x) = 0 or N(x)≥τ\mathcal{N}(x) \geq \tau), does there exist an input meeting it? This corresponds to the reachability question at the core of neural-network verification [20], and is the basic primitive on which richer property checks are built. We also consider its universal counterpart, asking whether every input satisfies the specification, which turns out to be coNP-complete in the same regime.

How hard verification is depends sharply on the architecture. The width of a network is the number of neurons per hidden layer, and its depth the number of hidden layers (see Section 2). Most existing hardness results address networks of arbitrary width and bounded depth, in the spirit of classical universality theorems on compact domains [5, 10]. In this paper we study the complementary regime of deep, narrow networks: bounded width and unbounded depth. Our goal is to pin down the minimum width at which verification becomes intractable for the standard activation function, ReLU. Our results are not intended to provide practical verification methods for large-scale models; rather, we show that extremely narrow ReLU networks already capture the full hardness of program-like verification, and we identify the precise width at which this transition occurs.

Deep, narrow networks. Although depth has long been conceptually natural, it became practically effective only with modern architectures [8], which popularised skip connections and led to the interpretation of very deep networks as discrete-time dynamical systems arising from numerical discretisations of ODEs (PolyNet, FractalNet, ResNet variants, Neural ODEs [4, 8, 12, 15, 16]). These models lie in the deep, narrow regime.

Why the narrow regime. Isolating width is natural for two reasons. A network of bounded width and unbounded depth is an iterated map on a constant-dimensional state: a discrete dynamical system in which width plays the role of a space-like resource that can be studied separately from depth. Constant-width computation has a distinguished history in this respect: width-5 branching programs already capture NC 1^{1} [2], and reachability for low-dimensional piecewise-affine maps is a classical source of hardness and of stubborn open problems [14]. Our results locate ReLU verification within this landscape: the network is the program, its width is the number of real registers kept alive, and the question is how few registers already make verification intractable. This regime is also a reasonable abstraction of very deep architectures such as ResNet variants, FractalNet, and Neural ODEs, which iterate blocks of fixed width within a stage. Thus, the width at which verification becomes hard has a concrete architectural reading rather than being an artefact of an exotic model. Pinning down that threshold is thus at once a clean complexity question, a width hierarchy for ReLU verification, and a statement about realistic networks.

Width as a complexity parameter. In the absence of width restrictions, verification and reachability for ReLU networks are NP-complete via reductions from SAT that use one neuron per Boolean variable [20, 23]; hardness becomes even stronger ( ∃R\exists R-hardness) for semi-algebraic or analytic activations [23, 24]. All these reductions use width freely, and therefore say nothing about the narrow regime. The complementary question, what happens at small constant width, has received less attention. On the expressiveness side, universal approximation holds already at constant widths barely above the input dimension [6, 17, 19, 9, 13, 25], and the classical depth separations are themselves witnessed by width-2 sawtooth networks [22]; these works address approximation, not verification. Our results show that the hardness of verification sets in essentially at the width threshold where expressiveness begins: restricting the width of the analysed network, a natural structural hope for verification tools [11, 20], cannot by itself yield tractability.

For ReLU networks, the two extremes of the width scale are easy. At width 1, verification is decidable in polynomial time (Proposition 5.16): a width-1 ReLU network computes a monotone one-dimensional piecewise-affine function with polynomially many pieces; the iterated variant with a unary time bound is also tractable (Theorem 5.17). At the other end, [3, Theorem 23] states that the transition map of a Turing machine, on configurations encoded over a dense discrete subset, can be implemented at width 3.

This leaves a narrow but genuine gap, which concerns the inputs. On the encoding set, the techniques of [3] point to hardness at width 3, which we establish as a baseline (Theorem 4.2 and Remark 4.3). But verification quantifies over all real inputs, whereas the construction of [3] works only on exact encodings, and no continuous map sends [0,1] onto the encoding set [3, Remark 9]. Classical SAT-style reductions for neural networks break down in this regime, since they rely on encoding one Boolean variable per neuron—a luxury that is no longer available when width is held constant. The deeper difficulty is not combinatorial but geometric: the input to a width-3 network is a single real x∈[0,1]x \in [0,1], whereas a satisfying assignment for a 3-SAT instance with n Boolean variables and m clauses is an element of the discrete set {0,1}n\{0,1\}^n. There is no obvious mechanism for converting a continuous verification problem into a discrete one without spending extra width on the conversion itself.

Main contribution. We narrow this gap. Our main result (Theorem 5.8 and Corollary 5.12) is that verification of ReLU neural networks on arbitrary inputs in [0,1][0,1] is NP-complete at width 4. On the encoding set, the baseline holds at width 3 (Theorem 4.2). Combined with the polynomial-time algorithm at width 1, this leaves open only width 2 on the encoding set, and widths 2 and 3 on [0,1][0,1].

The technical core of our result is a fractal preprocessing gadget of independent interest: a continuous piecewise-affine self-map Fε:[0,1]→[0,1]F_\varepsilon: [0,1] \to [0,1], realisable by a width-2 ReLU network, whose nn-fold iterate vanishes exactly on small neighbourhoods of a finite Cantor-like subset of [0,1][0,1] of size 2n2^n. The gadget effectively reduces verification of a continuous function on [0,1][0,1] to verification on a discrete set of 2n2^n points, without increasing the width. This “discretisation” step is, we argue, the missing ingredient for width-bounded hardness reductions: once the gadget is available, 3-SAT can be encoded by width-2 digit-extraction and clause-evaluation subnetworks that share a single two-register state (x,p)∈[0,1]2(x,p) \in [0,1]^2 throughout the computation; with one more register for the fractal error, this gives a width-4 polynomial-time reduction. By contrast, naive SAT-style reductions require width that grows linearly with the number of Boolean variables.

We stress where the difficulty lies. It is not that a discontinuous membership test must be approximated by a continuous piecewise-affine function: this is always possible, at any width. The constraints are quantitative and algorithmic. The gadget must vanish exactly on the 2n2^n encoding points; away from them it must keep a gap that survives the clause-evaluation layers applied afterwards, whose composed Lipschitz constant is exponential, of order 4Θ(mn)4^{\Theta(mn)}; and the gadget, together with its calibrated slope parameter ε\varepsilon, must be produced in polynomial time at width 2. Beating this exponential error amplification with polynomial-size weights is what the self-similar structure buys (Section 5).

A spectrum of width-3 hardness results. Once the fractal gadget is available, a broad range of further complexity results follows for width-3 ReLU verification. On inputs restricted to the discrete Cantor-like encoding set, the universal-zero problem is coNP-complete, counting zeros is