Foundations to Frontier
Tests
E. Deep Learning › E6 Early and Energy-Based Networks

Extreme Learning Machines

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.

Level 0: Foundation

★☆☆☆☆ 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. 1. In an ELM the hidden weights are…
  2. 2. The output weights are found by…
  3. 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. 1. Trainable parameters of a 2–100–1 ELM:
  2. 2. w for feature 1 on targets 1 and 3 with λ = 2:
  3. 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. 1. Unregularised ELM weights on noisy 1-D data were…
  2. 2. λ should be chosen by…
  3. 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. 1. As units grow, an ELM approximates…
  2. 2. Random-feature error typically falls like…
  3. 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

  1. G.-B. Huang, Q.-Y. Zhu, C.-K. Siew (2006). “Extreme learning machine: theory and applications.” Neurocomputing 70.
  2. A. Rahimi, B. Recht (2008). “Weighted sums of random kitchen sinks: replacing minimization with randomization in learning.” Advances in NeurIPS.
  3. 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).