AI Glossary / Graphs and symbolic AI / Intermediate
Random walk
Definition
A random walk is a sequence of states produced by repeatedly making a random step from the current state. On a graph, the step usually follows an available edge according to specified probabilities. In a time-series model, a random walk commonly means that each value equals the previous value plus a random increment.
What it means
The word random describes the step rule, not an absence of mathematical structure. Once the starting state and transition probabilities are specified, questions about likely destinations, return times, and accumulated displacement become precise.
Different walks have different behavior. Steps can be biased, weighted, or restricted by boundaries. A graph walk need not visit all nodes equally often, and a numerical walk need not move equally far in both directions. The forecasting and graph meanings share the idea of successive random movement, but their assumptions should be stated separately rather than treating every result about one as automatically true of the other.
How it works
For a simple walk on an unweighted graph, choose one of the current node's neighbors uniformly and move there. A weighted version can choose neighbors in proportion to nonnegative edge weights. These rules define transition probabilities. Under the usual Markov formulation, the next-state distribution depends on the current state rather than the full route taken to reach it.
For an additive numerical walk, write X(t+1) = X(t) + epsilon(t+1). If increments are independent, have mean zero, and have variance sigma², the expected future position stays at the current value while the variance of an h-step change is h sigma². A constant mean increment introduces drift. These are model consequences, not universal claims about observed data.
Three practical examples
- A graph-analysis experiment can use random walks to explore connected regions, while accounting for the walk's tendency to encounter some nodes more often.
- A forecasting team can compare a complex model against the no-drift random-walk baseline that predicts the latest observed value.
- A simulation lesson can show how a sequence of unbiased steps may display an apparent trend over a limited interval without a persistent directional mechanism.
Think of it this way
Think of a walker choosing among permitted paths at each junction using a specified lottery. The map and lottery jointly determine where the walker can go. The analogy is limited because numerical random walks can represent abstract quantities rather than physical movement, and “random choice” need not mean equal probabilities or independence of all recorded positions.
Worked example
Consider an original three-node graph A - B - C with no self-loops. From A the walk must go to B; from C it must also go to B. From B it chooses A or C with probability one half each. Start at A at time zero.
After one step, the walk is at B with probability 1. After two steps, it is at A with probability 0.5 and C with probability 0.5. After three steps, it is again certainly at B. Thus the state distribution alternates instead of settling to the same distribution at every time step.
The degree-based stationary distribution is (0.25, 0.50, 0.25). Check it directly: the total probability flowing into B is 0.25 + 0.25 = 0.50, while each endpoint receives 0.50 × 0.5 = 0.25. Stationary means that starting with this distribution preserves it. It does not mean that the distribution from every fixed starting node converges to it; this walk is periodic.
For a separate numerical illustration, start at 10 and take two independent steps, each +1 or −1 with equal probability. The final values are 8, 10, and 12 with probabilities 0.25, 0.50, and 0.25. Their mean is 10 and variance is 2. A flat mean forecast therefore coexists with growing uncertainty. The graph calculation and the numerical calculation illustrate two related forms of random walk without assuming identical state spaces.
Illustrative case study
Fictional case: Willow Knowledge Lab samples pages from a small relationship graph using a walk that selects outgoing neighbors uniformly. Reviewers notice that highly connected pages appear repeatedly. The team stops describing the sample as uniformly drawn from all pages and documents the transition rule.
It compares visit frequencies with a known small graph before using the method in larger experiments. Separately, it adds a stay-in-place option to examine how periodic behavior changes. This fictional case illustrates sampling assumptions; it does not claim that every modified walk produces uniform samples or that a particular experiment improved a product.
Common misconceptions and mistakes
Do not confuse random increments with independent positions. Consecutive values in an additive walk share their accumulated past. Do not infer a predictable trend solely because one simulated path rises for several steps.
On graphs, connectivity, direction, weights, and periodicity affect long-run behavior. A stationary distribution can exist without convergence from a fixed start at every time step. Also, zero mean increments do not by themselves imply equal probabilities of moving up and down: step sizes may be asymmetric. The equal-probability example above imposes symmetry explicitly. A random-walk baseline should be tested rather than assumed to fit every business series.
Business use
Random walks provide useful baselines and building blocks for simulation, network exploration, and forecasting. Their simplicity makes assumptions inspectable, which helps teams identify what a more elaborate AI method actually adds.
When reporting an application, state how the walk starts, how transitions are chosen, what happens at boundaries or isolated nodes, and what quantity is being estimated. Reproduce simulations with recorded settings and assess variability across runs. For forecasting, distinguish the point forecast from its uncertainty and compare against realistic alternatives on data withheld from model development.
People also ask
Does random mean every next state is equally likely?
No. The transition rule specifies the probabilities, which may be unequal.
Does a flat forecast predict that nothing will change?
No. Under a no-drift random-walk model, changes remain uncertain even though their expected sum is zero.
Does visiting neighbors uniformly sample all graph nodes uniformly?
Generally not. Graph structure influences visit frequencies.
Check your understanding
Why is B certain after every odd step in the three-node example?
Answer: The walk alternates between the middle node and one of the endpoints. With no self-loops, every endpoint step returns to B.
Related terms
- Markov Chain
- Transition probability
- Stationary distribution
- Drift (tracking)
- White noise
- Stochastic process
- drift
- graph sampling
- naïve forecast
Learn next
Give each node a one-half chance of staying put and use the original transition rule otherwise. Recompute the first two distributions from A. They are (0.5, 0.5, 0) and (0.375, 0.5, 0.125), showing how the added self-transitions break the forced alternation.
More in Graphs and symbolic AI
- Quiescence search - Quiescence search is a selective extension of game-tree search that examines unstable positions beyond the normal cutoff before evaluating them.
- Radial basis function - A radial basis function, or RBF, is a function whose value depends on distance from a center rather than on direction from that center.
- 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.
- Random-restart hill climbing - Random-restart hill climbing is a local-search strategy that runs hill climbing from several randomly selected starting states.
Sources
Sources: Aldous and Fill, Reversible Markov Chains and Random Walks on Graphs, weighted graph construction: https://www.stat.berkeley.edu/~aldous/RWG/Book_Ralph/Ch3.S2.html . Hyndman and Athanasopoulos, Forecasting: Principles and Practice, random-walk models: https://otexts.com/fpp3/arima.html .
Previous: Random variable Next: Random-walk Metropolis