AI Glossary / Graphs and symbolic AI / Intermediate
Contraction
Definition
A contraction is a mapping that reduces the distance between any two inputs by at least a fixed proportional factor smaller than one. In AI, contraction mappings help explain why certain repeated numerical updates converge. A major example is the discounted Bellman update used to calculate values in a Markov decision process.
What it means
The word refers here to mathematical contraction mappings. It has other meanings in language processing, graph algorithms, and belief revision, which require separate definitions.
Choose a way to measure distance. A mapping T is a contraction if there is a constant c with 0 ≤ c < 1 such that the distance between T(x) and T(y) is at most c times the distance between x and y, for every permitted pair.
This is stronger than observing that a few updates happen to move closer together. The bound must hold throughout the stated domain. On a nonempty complete metric space, a contraction that maps the space into itself has a unique fixed point, and repeated application converges to it.
How it works
A fixed point is a value that an update leaves unchanged. To approximate one, start with a guess and repeatedly apply the mapping. The contraction property limits how much an initial discrepancy can persist after each step.
In a finite discounted Markov decision process, the Bellman optimality update combines immediate reward with discounted expected future value, selecting the best action. With bounded rewards and discount factor gamma below one, it is a contraction under the maximum absolute difference between state-value vectors.
The discount factor supplies a contraction bound. After k exact updates, the maximum error relative to the fixed point is at most gamma to the power k times the initial maximum error.
This statement concerns the specified mathematical update. Approximate function fitting, sampling, changing models, and numerical errors require additional analysis. A contraction proof for an exact tabular operator does not automatically transfer to every learning implementation.
Three practical examples
1. A value-iteration implementation uses a contraction argument to justify convergence in a finite discounted planning model.
2. An analyst compares two different initial value estimates and checks how an exact update reduces their maximum difference.
3. A numerical-method designer establishes a contraction bound for an iterative calculation before using a residual to decide when the approximation is sufficiently accurate.
Think of it this way
Think of a machine that reduces the gap between any two marks to half its previous length each time they pass through it. Repetition makes their locations increasingly similar, regardless of their initial separation.
The analogy needs a defined space and distance. Merely moving individual marks toward somewhere does not establish the required uniform bound. Also, shrinking differences does not mean the values themselves must shrink toward zero; the fixed point can be nonzero.
Worked example
Consider a model with one state, one action, reward 2 at every step, and discount factor 0.5. The action always returns to the same state. Its value update is T(v) = 2 + 0.5v.
For any two real values v and w, the difference after updating is |T(v) − T(w)| = 0.5|v − w|. Thus the contraction factor is 0.5.
The fixed point solves v = 2 + 0.5v, giving v = 4. Starting from 0 produces 2, 3, 3.5, and 3.75. The errors relative to 4 are 2, 1, 0.5, and 0.25, halving each time.
Starting instead from 8 produces 6, 5, 4.5, and 4.25. Both sequences approach the same fixed point from opposite sides. Their first updated values differ by 4, half the original difference of 8.
Changing the discount factor to 1 would give T(v) = 2 + v. Differences would no longer shrink, and this particular update would have no finite fixed point. The original argument therefore cannot simply ignore the discount assumption.
Illustrative case study
Fictional case: Beacon Logistics prototypes a small discounted decision model. Two engineers initialize its state values differently and obtain different intermediate results. They inspect the exact Bellman operator and confirm its contraction conditions, then compare the remaining numerical error against their chosen tolerance.
Later, the team replaces the value table with an approximate model. It records that the earlier convergence argument covered the table-based update, not the new fitting procedure. The case illustrates why a mathematical guarantee must remain attached to the algorithm and assumptions that support it.
Common misconceptions and mistakes
Do not equate contraction with every value decreasing. Values can increase toward a positive fixed point, as the example shows.
Do not confuse a unique optimal value function with a unique optimal policy. Several actions may achieve the same value.
Avoid treating a small update difference as a universal error certificate. The relationship depends on a justified bound and the actual operator.
Finally, a factor near one can imply slow convergence. A guarantee of eventual convergence says little about practical cost without considering the factor, starting error, update cost, and required accuracy.
Business use
For business planning models, contraction results help explain when repeated value calculations have a stable mathematical target. They can support defensible stopping rules and comparisons between implementations.
Ask which distance measure, domain, and update rule the guarantee covers. Record discount and reward assumptions, and separate numerical convergence from model validity. An algorithm may accurately solve a model whose transition probabilities or reward definitions poorly represent the operational problem.
People also ask
Must the contraction factor be strictly below one?
Yes for the contraction guarantee described here; a bound of one alone is insufficient.
Does contraction imply convergence to zero?
No. It implies convergence to the mapping's fixed point under the stated space conditions.
Does discounted value iteration prove every neural reinforcement-learning method converges?
No. Approximation and learning updates can change the relevant mathematical operator.
Check your understanding
For T(v) = 2 + 0.5v, what happens to an input difference of 10 after one update?
Answer: It becomes 5. The constant term cancels when comparing the two outputs, leaving half the original difference.
Related terms
- Fixed point
- Bellman equation
- Value iteration
- Discount factor
- Markov decision process
- Convergence
- maximum norm
- approximation error
Learn next
Study the Bellman update and maximum norm next. Reproduce the one-state calculation with discount 0.9 and compare its convergence speed. Keep the reward model fixed, and distinguish the new fixed point from the rate at which the iteration approaches it.
More in Graphs and symbolic AI
- Constraint weighting - Constraint weighting assigns numerical weights to constraints to guide a solver's search.
- Context-specific independence - Context-specific independence is a probabilistic relationship in which some variables become independent when a particular context holds.
- Continuous domains - Continuous domains are sets of possible variable values modeled as a continuum, such as all real numbers in an interval.
- Contraction hierarchies - Contraction hierarchies are a shortest-path acceleration technique that preprocesses a weighted graph into an ordered hierarchy with shortcut edges.
- Contradiction - In classical logic, a contradiction is a statement that is false under every interpretation, such as P AND NOT P.
- Control theory - Control theory studies how to influence a changing system so that its behavior meets specified objectives.
Sources
Primary sources: MIT, Value Functions and Bellman: https://gradml.mit.edu/reinforcement/value_bellman/
MIT, Value Iteration lecture: https://web.mit.edu/1.041/spring2023/lectures/L16-value-iteration-2023sp.pdf
Editorial scope: the supplied short term is interpreted as contraction mapping, consistent with the AIMA index: https://aima.eecs.berkeley.edu/aima-index.html
The worked calculation and fictional case are original.
Previous: Continuous variable Next: Contraction hierarchies