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?
Building block: the sigmoidal neuron
A sigmoidal function is any bounded measurable function that approaches 0 as its input goes to and approaches 1 as its input goes to . The classic example is the logistic sigmoid , but the theorem applies to any function with this S-shaped limiting behavior.
A single hidden-layer network takes an input and computes:
Each contributes one S-curve: , scaled by . The vector sets the orientation and steepness, the shifts it left or right, and controls its amplitude. The full network output is a weighted sum — a superposition — of these S-curves.
The theorem: any continuous function, any accuracy
Here is the formal claim. Let be any continuous sigmoidal function. Let be any continuous function on the unit hypercube . Then for every , there exist , weights , biases , and coefficients such that:
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 is not dense in the space of continuous functions . This means there is some continuous function that no network output can get close to.
Step 2 — Invoke Hahn-Banach. If is not dense, then by the Hahn-Banach separation theorem, there exists a nonzero bounded linear functional that equals zero on all of . Think of as a "detector" that ignores every network output.
Step 3 — Invoke Riesz Representation. By the Riesz theorem, this functional corresponds to a finite signed measure on : . So annihilates every sigmoid superposition: for all .
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 . But we said . Contradiction. Therefore is dense, and the theorem is proved.
Key insight: sigmoids become step functions
A crucial step in the proof relies on a beautiful geometric fact: as the weight magnitude grows large, the sigmoid 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.
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 needed could grow exponentially with the input dimension or the desired accuracy. The theorem only says a finite 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 . Discontinuous functions are not addressed (though later extensions by Hornik handle 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.
The same idea in code
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
1957
Perceptron
Rosenblatt's Perceptron — a single neuron that learns linear decision boundaries. Inspired optimism but limited to linearly separable problems.
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.
1986
Backpropagation popularized
Rumelhart, Hinton, & Williams showed that gradient descent can train multi-layer networks, reviving the field.
1989
Cybenko — Universal Approximation Theorem
Proved that a single hidden layer with sigmoidal activations is a universal approximator. Settled the expressivity question.
1989
Hornik et al. — Broader generalization
Extended the result to any bounded, non-constant activation function and to Lᵖ approximation, not just uniform.
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.
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
- Sigmoidدالة سيجمويد
- Activation Functionدالة التنشيط
- Neural Networkالشبكة العصبية
- Hidden Layerالطبقة الخفية
- Weightالوزن البنيوي
- Biasالانحياز الحسابي
- Expressivityالقدرة التعبيرية
- Backpropagationالتحديث التراجعي
- Representation Learningتعلم التمثيلات الرقمية
- Non-linearityلاخطي