TL;DR
An inductive bias is the set of assumptions a learner brings before it sees the data: which rules it considers simpler, which patterns it expects to matter, which shapes it expects the answer to have. Training examples almost never pick out one rule on their own, because many rules fit them equally well. The bias is the tie-breaker that decides which of those rules the learner actually uses on new inputs.
Builds on: Hypothesis Class, Empirical Risk Minimization, Overfitting · Leads to: Inductive Learning, Bias-Variance Tradeoff, Relational inductive biases, deep learning, and graph networks
Where it's used
Image recognition. A convolutional network assumes that a small pattern, such as an edge, means the same thing wherever it appears in the picture. It applies one small filter at every position, so a 3 by 3 filter has 9 weights that are reused across the whole image. That assumption is the bias, and it is why these networks learn from far fewer images than a network that treats every pixel position as unrelated to every other.
House price prediction with many features. Suppose a model has 50 input features and only 40 houses in its training set. Many different weight vectors fit all 40 prices exactly, so the data alone cannot say which one is right. A ridge regression adds a penalty on the size of the weights, which, when the penalty is weak, prefers the smallest weight vector among those that fit exactly. That preference is an inductive bias, and it makes the problem have one answer.
Decision trees on tabular data. A Decision Tree splits on one feature at a time, asking questions such as "is the floor area above 90 square metres?". This assumes that the useful structure lines up with single features. When it does, the tree learns from a modest table of records. When the real rule depends on a combination of features in a slanted way, the same bias forces the tree to approximate it with many small steps.
How it works
Take a toy problem. Each example is a single number x with a label of 0 or 1. The training set has three examples:
| x | label |
|---|---|
| 1 | 0 |
| 2 | 0 |
| 4 | 1 |
The learner is given a hypothesis class of threshold rules. A rule h_t with threshold t answers 1 if x is at least t and 0 otherwise. Here is the walkthrough.
- Start with the family. The learner may use any rule h_t, where t can be any real number. Each t gives one candidate rule. Check: h_1.5 answers 1 at x = 2, and h_5 answers 0 at x = 4.
- Keep the rules that fit the training set. A rule must answer 0 at x = 1, so t is greater than 1. It must answer 0 at x = 2, so t is greater than 2. It must answer 1 at x = 4, so t is at most 4. The rules that fit are exactly those with 2 < t ≤ 4. Check: t = 3 gets all three right, while t = 1.5 and t = 4.5 each get one wrong.
- Ask a question the data does not answer. What does the learner say for a new point, x = 3? A rule with t at most 3 answers 1, and a rule with t between 3 and 4 answers 0. Both kinds fit the training set perfectly. The data cannot choose.
- Apply a bias to choose. Bias A says: put the boundary halfway between the nearest 0 and the nearest 1. The nearest 0 is at x = 2 and the nearest 1 is at x = 4, so the boundary is t = 3, and the prediction at x = 3 is 1. Check: h_3(3) = 1 because 3 is at least 3.
- Apply a different bias. Bias B says: put the boundary as far right as the data allows. That gives t = 4, and the prediction at x = 3 is 0. Check: h_4(3) = 0 because 3 is below 4.
- Compare. The data, the family and the training error are identical in steps 4 and 5. Only the bias differs, and the answer for x = 3 flips. This is the whole idea: the bias is what turns a set of equally good rules into one prediction.
The math
Let be the training set and the hypothesis class. The inductive bias of a learner is the extra information that makes it choose one rule from the set of rules that fit . It can be a preference ordering over , a prior over , or a restriction of itself.
Step 2 in symbols: the rules that fit
Write the training error of a rule as the fraction of training examples it gets wrong, . The set of rules that fit the data perfectly is
This set is the "tie". In the toy problem, . The symbol means "less than", and the set contains every threshold strictly above 2 and at most 4.
Here is the same idea for a family of curves. The picture shows the two families used in Worked Example 2: straight lines, and quadratics that pass through the same two points. Both families fit the data, and they disagree away from the data.
- line y = x
- quadratic, smallest coefficients
Step 4 in symbols: the disputed point
For a threshold rule, exactly when . So the rules in split:
Both sets are non-empty, so the data alone does not decide the label at .
Step 5 in symbols: the bias as a rule for choosing
A bias can be written as a penalised training problem. Let measure how complicated a rule is and let set how strongly to prefer simple rules:
With this is plain Empirical Risk Minimization, which has no preference among the rules in , so it cannot pick one. If the penalty is strong enough to outweigh training error, the objective over the rules in reduces to , so alone decides and the tie breaks. The choice of is the bias, and L2 Regularization is the case where is the sum of squared weights.
Bias A from the walkthrough is the rule "choose at the midpoint of the gap": .
A Bayesian learner expresses the same thing as a Prior Distribution over rules. The posterior is proportional to the likelihood times the prior, , where is the probability of the training data if were the true rule. The prior is the bias. If the prior is uniform over , the tie remains, and the learner has to pick at random. Bayes' Rule gives the update formula.
Step 6 in symbols: the test error
Once a rule is chosen, its quality is its risk on new data, . Two learners with different biases can have the same training error and different risks, because they chose different members of . The gap between the two is what the bias is worth on this problem.
Worked examples
Training data: , , . The rules that fit are the thresholds with . Use Bias A: put the boundary halfway between the nearest 0 and the nearest 1.
- The nearest 0 is at . The nearest 1 is at .
- The midpoint is , so the chosen rule is .
- Prediction at : , so the answer is 1.
- Prediction at : , so the answer is 0.
The data never mentioned 3.5. The bias chose it.
Training data: and . Two hypothesis classes fit both points.
- Lines. A line through and needs and . So the only line is , and at it predicts .
- Quadratics. Take for any real . Check: , and . So every such fits the data, and is a whole family.
- The bias. Among those quadratics, pick the one whose coefficients are smallest in total squared size. The coefficients are and , so the size is .
- Minimise. The derivative is . Setting it to zero gives .
- The chosen rule. . Check: .
- Prediction at . .
The two classes agree on the training data and give 3 and 6 at . The choice of class, plus the small-coefficient rule inside it, is the bias.
A layer must turn a grey image into output values. Compare two designs.
- Fully connected layer. Each output is a weighted sum of all input pixels. That needs weights, plus biases, so parameters in total.
- Convolutional layer. One filter slides over the image with no padding. The output is in each direction, so positions. The same weights are used at every position, and there is one bias, so parameters in total.
- Same number of outputs. Both designs produce values, so the comparison is fair.
- What the bias says. The convolutional design assumes that the same local detector is useful everywhere in the image. The fully connected design makes no such assumption, so it has to learn each position separately from the data.
- Cost of the assumption. If the task depends on exactly where something sits, the convolutional design throws away useful information, and the bias becomes a handicap.
Try it: a filter, with no padding, is applied to a grey image. How many positions does it visit, and how many parameters does the filter have? Answer: , so positions. The filter has parameters, the weights plus one bias. A fully connected layer to the same outputs would need parameters.
Common mistakes and tradeoffs
It is tempting to think that inductive bias means the same thing as statistical bias from the Bias-Variance Tradeoff. In fact they are different. Statistical bias is the error a model makes because its family is too rigid to match the truth. Inductive bias is the preference a learner uses to choose inside its family. A strong inductive bias can cause statistical bias, but the two terms name different things, and the convolution example has a large inductive bias that may or may not cause error.
It is tempting to think that more data removes the need for bias. In fact more data shrinks the set of rules that fit, but for any finite sample there can still be ties. Only when the class is small enough that a single rule fits does the tie disappear, and that restriction is itself a bias. The no-free-lunch theorem makes this precise: averaged over all possible problems, no learner beats any other on new points, so every learner's advantage comes from the bias it holds about which problems are likely.
It is tempting to think that a bias is always bad and should be removed. In fact a bias is a bet. When the bet matches the problem, as with local patterns in images, it lets the learner work with few examples. When it does not match, as in Example 3's position-dependent task, it causes errors that more data will not fix.
It is tempting to think that a regulariser and a bias are two separate things. In fact a penalty such as L2 Regularization is one way of writing a bias down. The architecture, the hypothesis class and the training procedure can all carry bias too, even when no penalty is written.
When to lean on a bias: the data is scarce, the problem has a known structure (locality, symmetry, sequence order), or the features are many and the training set is small. When not to: the structure is unknown or may be violated, and there is enough data to let a flexible model learn it. Alternatives include learning the bias itself from many related tasks, and using flexible models with validation to check whether a bias helps.
History
In a 1980 report, Tom Mitchell argued that a learner cannot generalise from examples unless it has some bias.
In 1992, Stuart Geman, Elie Bienenstock and René Doursat showed in a paper on neural networks that the error of a learner splits into a part from the family being too rigid and a part from chasing noise. That split gave a clear statistical picture of how bias and flexibility trade off.
In 1996, David Wolpert published results that became known as the no-free-lunch theorem. Averaged over all possible problems, no learning algorithm is better than another on unseen data. The result made clear that any advantage a learner has must come from assumptions about which problems matter.
Convolutional networks made the architectural bias concrete for images. In 1989, Yann LeCun and colleagues trained a convolutional network to read handwritten zip codes, and the weight sharing in that network was an explicit assumption that local patterns repeat across the image. Later work built on it, and the same idea is now a standard part of how image models are designed.
Recap
- A learner's training data often fits many rules equally well. The set of rules that fit is the tie, written .
- An inductive bias is the assumption that breaks the tie: a preference, a prior, or a restricted family.
- A bias can be written as a penalty such as . The choice of is the bias.
- Biases help when they match the problem and hurt when they do not. Architectures such as convolution carry strong biases.
- Read next: Inductive Learning, which uses this idea to define learning from examples, and Bias-Variance Tradeoff, which measures how flexibility affects error. For a deeper treatment of architectural biases, see Relational inductive biases, deep learning, and graph networks.
Check yourself
QuestionRecall: why can the training data alone not decide which rule a learner should use?Show answer
Many different rules fit the training set perfectly. Those rules disagree on new inputs, and nothing in the training error tells them apart. The learner needs a tie-breaker, which is the inductive bias.
QuestionComputation: training points are (1, 0), (2, 0) and (5, 1). The learner uses the midpoint bias from Example 1. What does it predict at x = 3?Show answer
The consistent thresholds satisfy . The midpoint of 2 and 5 is . Since , the rule answers 0 at .
QuestionWhy: when there are fewer examples than features, why does a small-weight penalty help a linear model?Show answer
With fewer examples than features, many weight vectors fit the training set exactly, so the training error cannot choose among them. The penalty on weight size breaks the tie by choosing the smallest-weight vector among those that fit, which is a bias toward simpler rules.
QuestionApplied: a team builds receipts models where the total is always printed in the same top-right box. A convolutional model with weight sharing makes many errors on the total. Why?Show answer
Weight sharing assumes that a pattern means the same thing wherever it appears. Here the position of the total is itself the signal, and the convolutional bias discards position information that the task needs. A design that keeps position, such as a fully connected layer or added position inputs, matches the problem better.