A radial basis function (RBF) network has one hidden layer of local bumps, usually Gaussians centred at chosen points, and a linear output layer. Because only the output weights are learned once the centres and width are fixed, training is a linear least-squares problem. RBF networks are universal approximators, closely related to kernel methods and Gaussian processes, and excellent in low dimensions. This page covers the architecture, choosing centres (data points, k-means) and widths, exact interpolation, and the curse of dimensionality. In the exercises you show exact interpolation buys accuracy at the price of an ill-conditioned system, then find that the number of centres needed grows steeply with dimension: 16 centres were near-perfect in 1-D, but even 256 left a 15% error in 8-D.
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.
Build a function out of bumps
An RBF network places bell-shaped bumps at chosen points of the input space. Each bump responds strongly to inputs near its centre and hardly at all far away. The output is a weighted sum of the bumps, like building a landscape from hills of fixed shape. Once the bumps are placed, finding the best weights is a simple least-squares fit.
RBF kernel SVM: bumps of influence around support vectors
support vectors 37 of 70 · training accuracy 94%
Small γ: very wide bumps, so the boundary is almost linear and cannot draw a ring. Large γ: tiny bumps around each point; the SVM memorises the training set (including the 6% mislabelled points), nearly every point becomes a support vector, and the regions break into islands. Moderate γ with moderate C recovers the ring.
Why engineers care
RBF networks and their kernel cousins are fast to train, interpretable and very accurate on low-dimensional problems: interpolating sensor calibration tables, terrain or aerodynamic data, function approximation in adaptive control, and meshless methods for PDEs. Their weakness in high dimensions is equally important to understand.
📝 Quick check (Level 0)
0/3 answered
1. An RBF hidden unit responds most to inputs…
2. With centres fixed, training the output is…
3. RBF networks struggle in…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.
By hand
Unit: φ(x) = exp(−‖x − c‖²/(2σ²)). At the centre it is 1; one width away (‖x − c‖ = σ) it is e^(−1/2) ≈ 0.607.
Network: f(x) = Σⱼ wⱼφⱼ(x) + b. Example: centres 0 and 10, weights 2 and 5, σ = 1, b = 1, input 0: f = 2 + 5e^(−50) + 1 ≈ 3.
Output weights: with Φ the matrix of unit activations on the training inputs, w = (ΦᵀΦ + λI)⁻¹Φᵀy.
Centres: a random subset of the data, k-means centroids, or every data point (exact interpolation).
Tiling cost: covering [0, 1]ᵈ with p centres per axis needs pᵈ centres: 4 in one dimension, 65 536 in eight.
📝 Quick check (Level 1)
0/3 answered
1. φ at one width from the centre:
2. Centres to tile [0,1]⁸ with 4 per axis:
3. Exact interpolation puts a centre…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.
RBF networks in code
Exercise 1. Exact interpolation of sin(6x) at 15 points, with a centre on every point:
width
largest error between points
condition number
largest weight
0.01
1.00
about 10⁴
about 1
0.1
0.15
about 10¹¹
about 10³
0.15
0.01
about 10¹⁴
about 10⁶
All three fitted the training points exactly. Narrow bumps left spikes; wider ones interpolated well but made the system nearly singular.
Practice.
Standardise inputs; choose σ by validation, often near the typical distance between neighbouring centres.
Use fewer centres than data points (k-means or a random subset) and a small ridge penalty λ for stability.
For many points or high dimensions prefer kernel methods with approximations (random features, Nyström) or MLPs.
from scipy.interpolate import RBFInterpolatorf = RBFInterpolator(X, y, kernel="gaussian", epsilon=1 / sigma, smoothing=1e-6)
🐍 Exercise 1: exact interpolation and its fragility
Interpolate data exactly with Gaussian RBFs at three widths and compare accuracy between points, condition number and weight size.
📝 Quick check (Level 2)
0/3 answered
1. A good σ is often near…
2. Adding λI to ΦᵀΦ…
3. In exercise 1 the widest bumps were…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.
Theory
Interpolation theorem. For distinct points, the Gaussian Gram matrix is positive definite (Micchelli, 1986), so exact interpolation always has a unique solution. Its smallest eigenvalue shrinks rapidly as σ grows relative to the point spacing, the source of the ill-conditioning in exercise 1.
Universal approximation. Park and Sandberg (1991) proved that RBF networks with a common width are universal approximators.
Link to kernels and Gaussian processes. With a centre on every data point and a ridge penalty, an RBF network is kernel ridge regression with the Gaussian kernel, and its prediction equals the posterior mean of a Gaussian process with that covariance.
Curse of dimensionality. Each bump covers a region of radius about σ. To cover a d-dimensional region at resolution σ needs on the order of (1/σ)ᵈ bumps. Local methods therefore need exponentially many units unless the target has special structure; MLPs with global (ridge-function) units can exploit directions along which the target varies.
📝 Quick check (Level 3)
0/3 answered
1. The Gaussian Gram matrix for distinct points is…
2. RBF network + centre per point + ridge equals…
3. Bumps needed to cover d dimensions at resolution σ:
Level 4: Expert
★★★★★ Expert⏱ 25 minResearchers: original papers and open problems.
Centres versus dimension
History.
D. Broomhead and D. Lowe (1988) introduced RBF networks.
J. Moody and C. Darken (1989) placed centres by clustering.
C. Micchelli (1986) proved interpolation matrices are invertible; J. Park and I. Sandberg (1991) proved universality.
RBF networks were widely used in adaptive and nonlinear control in the 1990s.
Exercise 2. Approximate f(x) = sin(2Σxᵢ/√d) + 0.5cos(3x₁) on [−1, 1]ᵈ from 1000 points, with k centres chosen at random from the data and the width tuned on a validation set. Relative test error (1 = no better than predicting the mean), two seeds:
dimension
16 centres
64 centres
256 centres
1
0.0001
0.0001
0.0001
2
0.045
0.003
0.001
4
0.352
0.100
0.015
8
0.570
0.389
0.147
In one dimension 16 centres were near-perfect; in eight, even 256 left a 15% error.
The target varies mainly along one direction, which a ReLU or sigmoid MLP could exploit with a few units; local bumps cannot, so they must tile the whole space.
Lesson: RBF networks are excellent in low dimensions and degrade quickly as dimension grows.
🐍 Exercise 2 (research): centres versus dimension
Fit RBF networks with 16, 64 and 256 centres in 1, 2, 4 and 8 dimensions and compare the relative test error.
RBF networks in AI, robotics and aerospace
Adaptive control: RBF networks approximate unknown dynamics in neural adaptive controllers, with stability proofs based on Lyapunov methods.
Interpolation of calibration and aerodynamic tables in 2–4 dimensions.
Meshless methods for PDEs and shape deformation (mesh morphing in aerodynamic design) use RBF interpolation.
References
D. S. Broomhead, D. Lowe (1988). “Multivariable functional interpolation and adaptive networks.” Complex Systems 2.
J. Moody, C. J. Darken (1989). “Fast learning in networks of locally-tuned processing units.” Neural Computation 1(2).
J. Park, I. W. Sandberg (1991). “Universal approximation using radial-basis-function networks.” Neural Computation 3(2).
C. A. Micchelli (1986). “Interpolation of scattered data: distance matrices and conditionally positive definite functions.” Constructive Approximation 2.
The number of centres needed grows steeply with dimension.
Practice
Show:
Level 0
Problem 1Level 0
φ at its own centre?
1.
Problem 2Level 0
φ one width from the centre?
e^(−1/2) ≈ 0.607.
Problem 3Level 0
Centres to tile [0, 1] with 4 per axis?
4.
Level 1
Problem 4Level 1
Centres to tile [0, 1]⁸ with 4 per axis?
65 536.
Problem 5Level 1
f(0) for centres 0 and 10, weights 2 and 5, σ = 1, bias 1?
≈ 2 + 0 + 1 = 3.
Problem 6Level 1
φ two widths from the centre?
e^(−2) ≈ 0.135.
Problem 7Level 1
Centres to tile [0, 1]³ with 10 per axis?
1000.
Level 2
Problem 8Level 2
Largest error between points at width 0.1 in exercise 1?
0.15.
Problem 9Level 2
Relative error with 256 centres in 8-D (exercise 2)?
0.147.
Problem 10Level 2
Relative error with 16 centres in 8-D?
0.570.
Problem 11Level 2
Relative error with 16 centres in 2-D?
0.045.
Problem 12Level 2
Relative error with 64 centres in 4-D?
0.100.
Problem 13Level 2
Exponent of the condition number (base 10) at width 0.15 in exercise 1?
About 10¹⁴: 14.
Level 3
Problem 14Level 3
Show that RBF output weights solve a linear least-squares problem.
With fixed centres and width, f(xᵢ) = Σⱼ wⱼΦᵢⱼ + b is linear in (w, b). Minimising Σᵢ(f(xᵢ) − yᵢ)² + λ‖w‖² is a ridge regression on the design matrix Φ (with a column of ones), whose solution is w = (ΦᵀΦ + λI)⁻¹Φᵀy. ∎
Problem 15Level 3
Explain why wider Gaussians made the interpolation system ill-conditioned.
As σ grows relative to the spacing, neighbouring Gaussians become almost identical over the data, so the columns of the Gram matrix become nearly linearly dependent; its smallest eigenvalue approaches zero while the largest stays near N. The condition number explodes, and solving for weights that reproduce the data requires huge, cancelling coefficients that amplify rounding errors. ∎
Problem 16Level 3
Explain why an MLP could fit exercise 2’s 8-D target with few units.
The target depends mainly on the single combination Σxᵢ (plus a term in x₁). An MLP unit computes φ(w·x + b), a ridge function constant along all directions orthogonal to w; with w along (1, …, 1) a few units can represent the dominant sine accurately regardless of dimension. RBF units are local in every direction, so they must cover the whole 8-D cube. ∎
Problem 17Level 3
Advise an approximator for a 3-input engine calibration map sampled at 2000 points.
An RBF network or kernel ridge regression is a good fit: three inputs, smooth behaviour, and 2000 points are well within its comfort zone. Standardise inputs, choose a few hundred centres by k-means, tune σ and λ by cross-validation, and check errors near the edges of the operating envelope, where local methods extrapolate poorly. ∎
Level 4
Problem 18Level 4
Relative error with 256 centres in 4-D?
0.015.
Problem 19Level 4
Relative error with 64 centres in 8-D?
0.389.
Problem 20Level 4
Relative error with 16 centres in 4-D?
0.352.
Coding practice
🐍 Code 1 (Level 0): Gaussian RBF
exp(−‖x − c‖²/(2σ²)).
🐍 Code 2 (Level 1): network output
Σwⱼφⱼ(x) + b.
🐍 Code 3 (Level 0): tiling cost
pᵈ.
🐍 Code 4 (Level 1): output weights
(ΦᵀΦ + λI)⁻¹Φᵀy.
🐍 Code 5 (Level 2): k-means centres
Lloyd's algorithm.
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.
Radial Basis Function Networks: 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.