An extreme learning machine (ELM) is a one-hidden-layer network whose hidden weights are drawn at random and never trained; only the output weights are fitted, by a single regularised least-squares solve. Training is therefore fast and deterministic, at the cost of needing many more hidden units than a network trained end to end. ELMs are a form of random-features regression, closely related to random kitchen sinks and kernel methods. This page covers the method, why ridge regularisation is essential, and when random features suffice. In the exercises you show unregularised ELM weights explode on noisy data while a small ridge penalty fixes them, then find on a smooth 2-D target that a 10-unit ELM was 18 times worse than the same network trained by backpropagation, but a 100-unit ELM, fitted in one solve, beat a trained 30-unit network.
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.
Random hidden units, trained output
Training all the weights of a network takes many slow gradient steps. An extreme learning machine skips most of that: it fixes the hidden layer to random weights and only fits the output layer, which is a linear regression solved in one step. Each random hidden unit is a random “feature”; with enough of them, a weighted sum can approximate the target well. It is fast and simple, but wasteful in units.
One hidden layer can draw any curve
target: units:
network with 6 hidden ReLU units · max error 0.1340 · bound h²·max|f″|/8 applies to smooth targets
Dashed: the target; orange: the network ĝ(x) = c + Σ vₖ·unitₖ(x); faint: each unit's contribution. Each ReLU adds a kink, so N of them trace the polyline through N + 1 knots, and doubling N cuts the error about 4× on smooth targets. Each steep sigmoid adds a step, which only halves the error. Neither can fix a jump exactly (try "step"), but the error region shrinks. This is the universal approximation theorem made concrete: width buys accuracy, though nothing here says how to find the weights from data, or how many units a high-dimensional target needs.
Why engineers care
When training must be very fast, retrained often, or run on small hardware (online system identification, sensor calibration, quick baselines), fitting only a linear output layer is attractive. The same random-features idea underlies reservoir computing (E6-12) and fast approximations to kernel methods.
📝 Quick check (Level 0)
0/3 answered
1. In an ELM the hidden weights are…
2. The output weights are found by…
3. ELMs typically need…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.
By hand
Hidden layer: H = tanh(XA + c), with A and c drawn at random. For x = 0 and c = 0, every feature is tanh(0) = 0.
Output weights (ridge): w = (HᵀH + λI)⁻¹Hᵀy. One feature equal to 1 on two points with targets 1 and 3: λ = 0 gives w = 2; λ = 2 gives w = 4/(2 + 2) = 1.
Trainable parameters: only the output layer, n_hid·n_out + n_out: 101 for 2–100–1, against 401 for full backpropagation.
Cost: forming HᵀH costs about n·h² operations and solving costs about h³/3; for n = 500, h = 300 that is about 5.4 × 10⁷.
Without λ the solve can be ill-conditioned: random tanh units of a low-dimensional input are strongly correlated.
📝 Quick check (Level 1)
0/3 answered
1. Trainable parameters of a 2–100–1 ELM:
2. w for feature 1 on targets 1 and 3 with λ = 2:
3. Features of x = 0 with c = 0:
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.
ELMs in code
Exercise 1. 40 noisy samples of sin(4x):
Unregularised least squares gave output weights of order 10¹¹ or more and a test RMSE above 0.2, worse with 100 units than with 40.
A ridge penalty of 0.01 kept the largest weight below 3 and the test RMSE near 0.08 for both sizes.
Practice.
Always use ridge regularisation and tune λ by cross-validation.
Scale the random input weights to the input range so that tanh units are neither all saturated nor all linear.
Use far more hidden units than a trained network would need; past a few thousand, the cost of the solve dominates.
For classification, regress one-hot targets and take the arg max, or use logistic regression on the features.
H = np.tanh(X @ A + c); w = np.linalg.solve(H.T @ H + lam * np.eye(H.shape[1]), H.T @ Y)
🐍 Exercise 1: why the output layer needs ridge
Fit an ELM to noisy 1-D data with and without a ridge penalty, and compare test error and weight size.
📝 Quick check (Level 2)
0/3 answered
1. Unregularised ELM weights on noisy 1-D data were…
2. λ should be chosen by…
3. Random input weights should be scaled to…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.
Theory
Random features. An ELM is linear regression on features φ(x) = tanh(Ax + c) with random A, c. As the number of units grows, the inner product of feature vectors converges to a kernel k(x, x’) = E[φ(x)φ(x’)], so an ELM approximates kernel ridge regression with that kernel (Rahimi and Recht’s “random kitchen sinks”, 2007–2008).
Universal approximation with random weights. Huang et al. proved that for almost any choice of random hidden weights, an ELM with enough units can interpolate N distinct points and approximate continuous functions; Igelnik and Pao (1995) proved similar results for random vector functional-link networks.
Why more units are needed. A trained network places its units where they help; random units are scattered, so many are redundant or nearly useless. The approximation error with random features typically falls like 1/√(number of features), slower than with optimised units.
Priority dispute. Similar random-hidden-layer networks were published earlier (for example by Schmidt et al., 1992, and Pao’s functional-link networks), so the ELM name and novelty claims are debated.
📝 Quick check (Level 3)
0/3 answered
1. As units grow, an ELM approximates…
2. Random-feature error typically falls like…
3. Random kitchen sinks are due to…
Level 4: Expert
★★★★★ Expert⏱ 25 minResearchers: original papers and open problems.
Random features versus training
History.
Y.-H. Pao et al. (1992–1994) introduced random vector functional-link networks; W. Schmidt et al. (1992) studied random-weight feed-forward networks.
G.-B. Huang, Q.-Y. Zhu and C.-K. Siew (2006) named and popularised the extreme learning machine.
A. Rahimi and B. Recht (2007, 2008) analysed random features for kernel machines.
Exercise 2. Target sin(3x₁)cos(2x₂) + 0.3x₁x₂ on [−1, 1]² (noise-free), 500 training points, test RMSE over 2000 points, two seeds. ELM: random tanh layer and ridge solve. Backprop: the same architecture with every weight trained by Adam (2000 full-batch steps).
method
hidden units
test RMSE
ELM
10
0.2373
backprop
10
0.0127
ELM
30
0.0398
backprop
30
0.0125
ELM
100
0.0014
ELM
300
0.0004
With few units, training wins by far: 10 trained units beat 10 random ones by a factor of 18.
Random units are cheap: 100 of them, fitted in one solve, beat the 30-unit trained network, and 300 were 30 times more accurate than it.
Caveat: a smooth, noise-free, two-dimensional target suits random features; in high dimensions or with complex structure, trained features usually win.
🐍 Exercise 2 (research): random features versus training
Compare ELMs with 10–300 hidden units against the same network trained end to end on a smooth 2-D target.
ELMs in AI, robotics and aerospace
Online system identification where a model must be refitted every few seconds from new data.
Embedded regression (calibration, quick surrogate models) on microcontrollers, where a linear solve is affordable but backpropagation is not.
Baselines: an ELM or random-features model is a quick check of whether a problem needs learned features at all.
References
G.-B. Huang, Q.-Y. Zhu, C.-K. Siew (2006). “Extreme learning machine: theory and applications.” Neurocomputing 70.
A. Rahimi, B. Recht (2008). “Weighted sums of random kitchen sinks: replacing minimization with randomization in learning.” Advances in NeurIPS.
B. Igelnik, Y.-H. Pao (1995). “Stochastic choice of basis functions in adaptive function approximation and the functional-link net.” IEEE Trans. Neural Networks 6(6).
Random units need to be numerous; trained units are efficient.
Practice
Show:
Level 0
Problem 1Level 0
Trainable parameters of a 2–100–1 ELM?
101.
Problem 2Level 0
Hidden feature of x = 0 with c = 0?
0.
Problem 3Level 0
Trainable parameters of the same network under backpropagation?
401.
Level 1
Problem 4Level 1
w for one constant feature on targets 1 and 3 with λ = 0?
2.
Problem 5Level 1
The same with λ = 2?
1.
Problem 6Level 1
Approximate solve cost for n = 500, h = 300?
4.5 × 10⁷ + 9 × 10⁶ = 5.4 × 10⁷.
Problem 7Level 1
tanh(1)?
0.762.
Level 2
Problem 8Level 2
ELM test RMSE with 10 units in exercise 2?
0.2373.
Problem 9Level 2
Backprop test RMSE with 10 units?
0.0127.
Problem 10Level 2
ELM test RMSE with 100 units?
0.0014.
Problem 11Level 2
ELM test RMSE with 30 units?
0.0398.
Problem 12Level 2
Ridge ELM test RMSE with 40 units in exercise 1?
0.078.
Problem 13Level 2
Backprop test RMSE with 30 units?
0.0125.
Level 3
Problem 14Level 3
Show that fitting an ELM’s output layer is ridge regression.
With A and c fixed, the prediction Hw is linear in w. Minimising ‖Hw − y‖² + λ‖w‖² is ridge regression on the design matrix H, with solution (HᵀH + λI)⁻¹Hᵀy. ∎
Problem 15Level 3
Explain why unregularised ELM weights exploded in exercise 1.
With a one-dimensional input, the random tanh units are smooth functions of a single variable and many are nearly linear combinations of others, so H is nearly rank-deficient. The least-squares solution then fits the noise using huge positive and negative weights on nearly identical features, which cancel at the training points but not between them, giving wild predictions. Ridge penalises large weights and chooses a stable, smooth combination. ∎
Problem 16Level 3
Explain why 100 random units beat 30 trained ones in exercise 2.
The target is smooth and two-dimensional, so a few hundred random tanh features cover the input space well, and the exact least-squares solve finds the best output weights for them. The 30-unit backprop network was limited both by its size and by 2000 Adam steps, which did not drive its error to its optimum. In higher dimensions or with sharper targets, random features would need far more units and the advantage would reverse. ∎
Problem 17Level 3
Advise whether to use an ELM for an online model of a drone’s thrust as a function of throttle, voltage and air density, refitted every minute.
Reasonable: three inputs, smooth relationship, and frequent refits suit a fast linear solve. Use a few hundred random tanh features with inputs standardised, a ridge penalty chosen offline by cross-validation, and a recursive least-squares update for continuous adaptation. Monitor prediction error and fall back to a physics model if inputs leave the trained range. ∎
Level 4
Problem 18Level 4
ELM test RMSE with 300 units?
0.0004.
Problem 19Level 4
Ratio of ELM to backprop RMSE at 10 units?
0.2373/0.0127 ≈ 18.7.
Problem 20Level 4
Ridge ELM test RMSE with 100 units in exercise 1?
0.085.
Coding practice
🐍 Code 1 (Level 0): random features
tanh(XA + c).
🐍 Code 2 (Level 1): ridge output
(HᵀH + λI)⁻¹Hᵀy.
🐍 Code 3 (Level 0): trainable parameters
Output layer only for ELM; all layers for backprop.
🐍 Code 4 (Level 0): RMSE
√mean((pred − y)²).
🐍 Code 5 (Level 0): solve cost
nh² + h³/3.
Topic test
A timed test drawn at random from this topic's question bank. Each attempt gets new questions. For a longer test across the whole chapter, see the chapter test, or mix topics in the question bag.
Extreme Learning Machines: topic test
10 questions, drawn at random from a bank of 21. Every attempt is different.
⏱ Time limit: 15 minutes. The test submits itself when time runs out.
Levels covered: 0, 1, 2, 3, 4. No hints or solutions until you submit.