Learning Theory1989foundational9 min read

Approximation by Superpositions of a Sigmoidal Function

التقريب بتراكب دوال سيغمويدية

Cybenko, G. — Mathematics of Control, Signals, and Systems

The problem

By the late 1980s neural networks were producing impressive empirical results — recognizing handwriting, learning XOR, and classifying patterns — but nobody could prove whether they could, in principle, represent any function. Without such a guarantee, skeptics argued that neural networks might have blind spots: functions they could never learn no matter how many neurons you added. The question "are neural networks universal approximators?" was open and urgent.

The contribution

Cybenko proved that a single feedforward network with any continuous sigmoidal can approximate any continuous function on the unit hypercube to arbitrary accuracy. The proof uses the Hahn-Banach theorem and the Riesz Representation theorem from functional analysis: it shows by contradiction that if the set of network outputs were not dense in the space of continuous functions, a nonzero bounded linear functional would annihilate all of them — then proves no such functional can exist. The result is existential: it guarantees a solution exists but says nothing about how many neurons are needed or how to find the weights.

The impact

The Universal Approximation Theorem became the theoretical bedrock of research. It silenced the argument that neural networks have fundamental representational limits and shifted the research focus from "can they represent it?" to "how efficiently can they learn it?". Every architecture since — deep networks, CNNs, Transformers — builds on this foundation, and later work by Hornik, Barron, and others extended the theorem to broader activation functions and provided convergence rates.

Imagine you are an artist with an unusual constraint: you can only mix S-shaped brush strokes — each one a stretched or shifted curve. Can you paint any landscape? Cybenko's theorem answers: yes. With enough S-curves, each properly positioned and scaled, you can approximate any continuous picture to any level of detail.

The catch? The theorem tells you the painting is possible but doesn't tell you how many strokes you need or where to place them. Finding those strokes is the job of and .

The question that haunted neural networks

In 1969 Minsky and Papert published Perceptrons, proving that a single-layer cannot compute XOR. This result was devastating — it triggered the first "AI winter" and left a lingering doubt: even with hidden layers, do neural networks have fundamental representational blind spots?

By the late 1980s, backpropagation had revived interest by enabling multi-layer training. Networks were solving real problems. But success in practice does not equal proof in theory. The community needed a mathematical answer: can a neural network represent any continuous function, or are there functions forever out of reach?

Open in Lab
The journey from Perceptron doubt to Universal Approximation. Click each milestone to see the question that drove it.
The demo wakes as you arrive…

Building block: the sigmoidal neuron

A sigmoidal function σ\sigma is any bounded measurable function that approaches 0 as its input goes to −∞-\infty and approaches 1 as its input goes to +∞+\infty. The classic example is the logistic sigmoid σ(t)=1/(1+e−t)\sigma(t) = 1/(1 + e^{-t}), but the theorem applies to any function with this S-shaped limiting behavior.

A single hidden-layer network takes an input x∈Rn\mathbf{x} \in \mathbb{R}^n and computes:

f^(x)=∑i=1Nαi σ(wi⊤x+bi)\hat{f}(\mathbf{x}) = \sum_{i=1}^{N} \alpha_i \, \sigma(\mathbf{w}_i^\top \mathbf{x} + b_i)

Each ii contributes one S-curve: σ(wi⊤x+bi)\sigma(\mathbf{w}_i^\top \mathbf{x} + b_i), scaled by αi\alpha_i. The vector wi\mathbf{w}_i sets the orientation and steepness, the bib_i shifts it left or right, and αi\alpha_i controls its amplitude. The full network output is a weighted sum — a superposition — of these S-curves.

f^(x)=∑i=1Nαi σ(wi⊤x+bi)\hat{f}(\mathbf{x}) = \sum_{i=1}^{N} \alpha_i \, \sigma(\mathbf{w}_i^\top \mathbf{x} + b_i)
Single hidden layer network — a superposition of sigmoids — N neurons, each a sigmoidal curve positioned by weight vector wᵢ and bias bᵢ, then scaled by αᵢ. The theorem says: for any continuous target, a large enough N makes the error arbitrarily small.
Open in Lab
Add neurons one by one and watch how their S-curves sum to approximate a target function. Drag weights and biases to reshape each curve.
The demo wakes as you arrive…

The theorem: any continuous function, any accuracy

Here is the formal claim. Let σ\sigma be any continuous sigmoidal function. Let ff be any continuous function on the unit hypercube [0,1]n[0,1]^n. Then for every ε>0\varepsilon > 0, there exist NN, weights {wi}\{\mathbf{w}_i\}, biases {bi}\{b_i\}, and coefficients {αi}\{\alpha_i\} such that:

sup⁡x∈[0,1]n∣f(x)−∑i=1Nαi σ(wi⊤x+bi)∣<ε\sup_{\mathbf{x} \in [0,1]^n} \left| f(\mathbf{x}) - \sum_{i=1}^{N} \alpha_i \, \sigma(\mathbf{w}_i^\top \mathbf{x} + b_i) \right| < \varepsilon

In plain words: no matter what continuous function you pick and no matter how tight your error tolerance, there exists a single-layer network that fits within that tolerance everywhere on the domain.

Proof intuition: why S-curves can build anything

The proof works by contradiction and uses two powerful theorems from functional analysis. Think of it as a courtroom argument:

Step 1 — Assume the opposite. Suppose the set of all possible network outputs H\mathcal{H} is not dense in the space of continuous functions C([0,1]n)C([0,1]^n). This means there is some continuous function that no network output can get close to.

Step 2 — Invoke Hahn-Banach. If H\mathcal{H} is not dense, then by the Hahn-Banach separation theorem, there exists a nonzero bounded linear functional LL that equals zero on all of H\mathcal{H}. Think of LL as a "detector" that ignores every network output.

Step 3 — Invoke Riesz Representation. By the Riesz theorem, this functional LL corresponds to a finite signed measure μ\mu on [0,1]n[0,1]^n: L(g)=∫g dμL(g) = \int g \, d\mu. So μ\mu annihilates every sigmoid superposition: ∫σ(w⊤x+b) dμ=0\int \sigma(\mathbf{w}^\top \mathbf{x} + b) \, d\mu = 0 for all w,b\mathbf{w}, b.

Step 4 — Show μ must be zero. Cybenko shows that a measure annihilating all sigmoids must also annihilate all indicator functions of half-spaces, hence all simple functions, hence all bounded measurable functions — so μ=0\mu = 0. But we said L≠0L \neq 0. Contradiction. Therefore H\mathcal{H} is dense, and the theorem is proved.

Open in Lab
Follow the four-step proof by contradiction. Click each step to reveal the key mathematical tool and its role.
The demo wakes as you arrive…

Key insight: sigmoids become step functions

A crucial step in the proof relies on a beautiful geometric fact: as the weight magnitude ∥w∥\|\mathbf{w}\| grows large, the sigmoid σ(w⊤x+b)\sigma(\mathbf{w}^\top \mathbf{x} + b) approaches a step function — it jumps sharply from 0 to 1 across a hyperplane.

This means sigmoids can approximate indicator functions of half-spaces. By combining multiple such "sharp" sigmoids with different orientations and positions, you can carve out any region of the input space. And if you can approximate indicator functions, you can approximate any simple function (a staircase), and simple functions are dense in continuous functions.

The chain of approximation works like this: sigmoids → step functions → indicator functions → simple functions → any continuous function.

Open in Lab
Drag the weight slider to increase w. Watch the sigmoid sharpen into a step function — the geometric heart of the proof.
The demo wakes as you arrive…

What the theorem does NOT say

The Universal Approximation Theorem is powerful but limited. It is important to understand what it guarantees and what it leaves open:

  • No bound on width. The number of neurons NN needed could grow exponentially with the input dimension or the desired accuracy. The theorem only says a finite NN exists.

  • No learning algorithm. Knowing a solution exists does not help you find it. may get stuck in local minima or require unfeasible training time.

  • Only continuous functions. The theorem covers C([0,1]n)C([0,1]^n). Discontinuous functions are not addressed (though later extensions by Hornik handle LpL^p spaces).

  • No depth advantage. The theorem is about width (one wide layer). Later work by Telgarsky (2016) showed that depth gives an exponential efficiency advantage: some functions need exponentially many neurons in one layer but only polynomially many in a deep network.

Open in Lab
Compare a wide single-layer network with a narrow deep network approximating the same target. Notice the neuron count difference.
The demo wakes as you arrive…

The same idea in code

Universal approximation — adding sigmoids to approximate a targetpython

Simplified to show the idea — not the real implementation.

import numpy as np

def sigmoid(t):
    """The classic sigmoidal function."""
    return 1.0 / (1.0 + np.exp(-t))

def single_layer_network(x, weights, biases, alphas):
    """
    A single hidden layer network: sum of scaled sigmoids.
    x:       input vector (n,)
    weights: (N, n) — each row is one neuron's weight vector
    biases:  (N,)   — one bias per neuron
    alphas:  (N,)   — output coefficients
    """
    # Each neuron computes sigmoid(w_i · x + b_i)
    pre_activation = weights @ x + biases        # (N,)
    activations = sigmoid(pre_activation)         # (N,)
    return alphas @ activations                   # scalar

# --- Demonstration: approximate f(x) = sin(2πx) on [0, 1] ---
N = 20  # number of neurons
np.random.seed(42)
w = np.random.randn(N, 1) * 5     # random weights
b = np.random.randn(N) * 2         # random biases
a = np.random.randn(N)             # random alphas

# With enough neurons AND the right weights (found by training),
# |f(x) - network(x)| < ε for any desired ε.
# The theorem guarantees those weights EXIST.
# Finding them is the job of backpropagation.

Why it changed everything

  1. 1957

    Perceptron

    Rosenblatt's Perceptron — a single neuron that learns linear decision boundaries. Inspired optimism but limited to linearly separable problems.

  2. 1969

    Minsky & Papert — Perceptrons book

    Proved that single-layer perceptrons cannot compute XOR. Triggered the first AI winter and cast doubt on neural nets as a whole.

  3. 1986

    Backpropagation popularized

    Rumelhart, Hinton, & Williams showed that gradient descent can train multi-layer networks, reviving the field.

  4. 1989

    Cybenko — Universal Approximation Theorem

    Proved that a single hidden layer with sigmoidal activations is a universal approximator. Settled the expressivity question.

  5. 1989

    Hornik et al. — Broader generalization

    Extended the result to any bounded, non-constant activation function and to Lᵖ approximation, not just uniform.

  6. 1993

    Barron — Convergence rates

    Showed that single-layer networks achieve dimension-independent approximation rates for a large function class defined via Fourier transforms — beating the curse of dimensionality.

  7. 2016

    Telgarsky — Depth separations

    Proved that some functions require exponentially more neurons in a shallow network than in a deep one. Depth is not just practical — it is provably more efficient.

Cybenko's 1989 proof was a turning point. It told the neural network community: the architecture you already have is theoretically complete. Now invest your energy in training algorithms, data, and depth. That shift of focus — from "can it represent?" to "can it learn efficiently?" — is what led to modern .

CitationCybenko, G.. Approximation by Superpositions of a Sigmoidal Function. Mathematics of Control, Signals, and Systems, 1989.

Terms in this paper