AI Glossary / Graphs and symbolic AI / Intermediate
Radial basis function
Definition
A radial basis function, or RBF, is a function whose value depends on distance from a center rather than on direction from that center. RBFs provide building blocks for approximating functions, interpolating scattered observations, and constructing some machine-learning models. A Gaussian-shaped response is a familiar example, but radial basis functions are not limited to Gaussians.
What it means
Imagine an input described by several numerical features. An RBF compares that input with a chosen center and converts their distance into one numerical response. Inputs at the same distance from the center receive the same response under the same distance definition.
Several such responses can be combined to describe a more complicated relationship. Each center contributes a different feature of the input. The usefulness of this representation depends on whether the distance is meaningful: a numerical difference in one feature may not be comparable with a difference in another. Scaling and the choice of coordinates therefore affect the model, not merely its presentation.
How it works
Write an RBF as phi(||x − c||), where x is the input, c is its center, and the bars denote a chosen norm. One Gaussian convention is exp(−||x − c||²/(2 sigma²)), with positive width sigma. A larger sigma gives a broader response in this convention.
A model may sum weighted responses from several centers, sometimes with an additional polynomial or bias term. Fitting determines the weights and possibly the centers or widths. Interpolation aims to match supplied observations; smoothing allows departures from them. Kernel methods also use Gaussian distance-based similarities, although using an RBF kernel is not identical to building an explicit RBF neural network.
Three practical examples
- An engineering prototype can interpolate measurements taken at irregularly spaced locations, using an RBF-based surface between observations.
- A regression experiment can create Gaussian responses around selected feature-space centers and learn a weighted prediction from those responses.
- A classification model can use a Gaussian RBF kernel to express similarity between examples when a straight boundary in the original features is inadequate.
Think of it this way
Think of overlapping pools of light centered at different locations. Their contributions combine into a pattern, and changing their widths changes how broadly they influence the surroundings. This analogy fits Gaussian responses, but not every RBF fades like light. Some radial functions grow with distance, and fitted weights can be negative rather than representing physical brightness.
Worked example
Consider an original one-dimensional model with centers c1 = 0 and c2 = 2. Both Gaussian functions use sigma = 1. Let phi1(x) = exp(−(x − 0)²/2) and phi2(x) = exp(−(x − 2)²/2). Define the illustrative output f(x) = 2 phi1(x) − phi2(x), with no bias. These weights are chosen for demonstration, not fitted to a dataset.
At x = 1, both distances are 1. Each response equals exp(−0.5), approximately 0.6065. The output is therefore 2(0.6065) − 0.6065 = 0.6065.
At x = 0, the responses are 1 and exp(−2), approximately 0.1353. The output is 2 − 0.1353 = 1.8647. Although each Gaussian response lies between zero and one, their weighted combination can exceed one or become negative. It is not automatically a probability.
For the first basis alone, x = −1 and x = +1 receive the same response because both are one unit from its center. The complete two-center model need not be symmetric about zero, because the second center is elsewhere.
Finally, changing sigma from 1 to 2 makes the response at distance 1 equal exp(−1/8), about 0.8825. This shows the broadening effect directly. Software may instead use gamma in exp(−gamma r²); in that convention, gamma = 1/(2 sigma²), so increasing gamma narrows the response.
Illustrative case study
Fictional case: Marigold Instruments studies a small collection of sensor measurements with two differently scaled inputs. Its first RBF regression model treats an input measured in thousands as dominant over another measured between zero and one. The team rescales inputs using its training data and compares several widths on held-out observations.
It also checks predictions outside the sampled region, where a smooth-looking curve may be unreliable. The fictional case illustrates modeling choices and validation; it does not report a deployment, improved accuracy, or a universal rule that one scaling method is best.
Common misconceptions and mistakes
Do not use RBF as a synonym for any neural network or assume every RBF is Gaussian. Do not interpret a basis response as a calibrated probability without an appropriate model and calibration. Exact interpolation of noisy observations can also be undesirable: matching the training points does not establish predictive accuracy.
Parameter names are especially easy to misread. A width, an inverse width, and an inverse squared width have different effects when increased. Check the actual formula before copying a setting between libraries. Very broad or closely related basis responses can create numerical difficulties, and using every observation as a center can become expensive.
Business use
RBF methods can be useful when a business problem involves scattered measurements or a nonlinear relationship in a meaningful numerical feature space. Compare them with simpler alternatives using representative held-out data, especially when observations are limited.
Record feature scaling, center selection, the precise radial function, width convention, and smoothing choices. These details determine what distance and influence mean in the model. Evaluate interpolation separately from extrapolation, and avoid presenting a smooth prediction surface as evidence of certainty between or beyond the observed points.
People also ask
Does radial mean the input must be two-dimensional?
No. Distance from a center can be defined in one dimension or many dimensions.
Is a Gaussian RBF a probability density?
Not necessarily. The usual response may be an unnormalized basis or similarity function.
Does a larger parameter always make the response wider?
No. Larger sigma widens the formula used here, while larger gamma narrows exp(−gamma r²).
Check your understanding
Why do −1 and +1 have equal responses for a basis centered at zero?
Answer: They have equal distance from that center. Radial dependence ignores their opposite directions under the stated norm.
Related terms
- Kernel method
- Regularization
- Gaussian kernel
- interpolation
- feature scaling
- basis function
- function approximation
- radial basis function network
Learn next
Evaluate the worked model at x = 2 and compare it with x = 0. The result is approximately −0.7293, showing how a negative weight changes the combined output. Then plot each basis separately before plotting their sum.
More in Graphs and symbolic AI
- Querying - Querying is the process of asking a data source or knowledge system a precisely expressed question and obtaining results according to its rules.
- Question answering - Question answering, or QA, is an AI task in which a system produces an answer to a user's question.
- Quiescence search - Quiescence search is a selective extension of game-tree search that examines unstable positions beyond the normal cutoff before evaluating them.
- Rainbow table - A rainbow table is a precomputed structure used to search for inputs that produce specified cryptographic outputs, especially password hashes in unsuitable...
- Random-fuzzy variable - A random-fuzzy variable, in the measurement-uncertainty framework developed by Ferrero and colleagues, represents a measurement result while retaining...
- Random geometric graph - A random geometric graph is a probabilistic graph model in which nodes occupy randomly chosen positions in a space and nearby nodes are connected.
Sources
Sources: SciPy, RBFInterpolator documentation, radial definition, interpolation and smoothing: https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.RBFInterpolator.html . Scikit-learn, rbf_kernel documentation, Gaussian gamma convention: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise.rbf_kernel.html .
Previous: Rademacher complexity Next: Radial Basis Function regression