Worked examples are a powerful form of instruction, but learners must infer how the demonstrated steps were produced. A naive simulation of this self-explanation process can generate thousands of numerical explanations that reproduce one observed change without capturing its underlying procedure. We propose structure-mapping-guided self-explanation as a computational account of the cognitive biases that reduce search effort and make this inference tractable. The model represents mathematical expressions as typed relational structures and uses structure mapping to identify corresponding source and target regions. For each changed target value, the corresponding source region serves as an anchor: it guides abductive search toward structurally relevant values and operations before broader alternatives, yielding ordered, executable candidate procedures with inspectable source evidence. Across 70 mathematical transformations containing 120 changed numeric components, the model recovered every intended procedure. It returned the intended procedure before any other computation producing the same target value in 104 subproblems (86.7%), compared with a median of 32 (26.7%) across 100 unguided runs that tested candidate calculations in random order. Our proposed model also tested 93.8% fewer combinations of values and operations than unguided search before reaching the intended procedures. These results provide an efficient, interpretable account of how relational structure can guide procedural learning and a testable hypothesis about human self-explanation from worked examples.
Figures & tables
Figure 1: Structure mapping guides numerical self-explanation in the running example. Green arrows mark exact correspondences that are copied unchanged, while dashed orange arrows mark changed structural correspondences. These mappings anchor 25 to 52 and 144 to 122 , causing search to consider the operands and operations in each corresponding source region before unrelated alternatives.
Mathematical context
Primary
Extended
Example transformation
Algebra/precalculus
12
6
4(2x+3)→8x+12
Geometry
12
6
(10−6)2+(8−5)2→42+32
Calculus notation
11
5
dxd4x6→24x5
Vector/matrix notation
12
6
⟨2,3⟩⋅⟨5,4⟩:2⋅5+3⋅4→10+12
Table 1: Composition of the primary and extended corpora, with illustrative adjacent transformations.
Configuration
Mapped anchor
Value order
Operation order
Unguided search
No
Random
Random
Randomized visible-first
No
Visible first
Visible first
Anchor only
Yes
Random
Random
Value-distance guidance
Yes
Distance
Random
Operation-distance guidance
Yes
Random
Distance
Full guidance
Yes
Distance
Distance
Table 2: Controlled candidate-ordering configurations. “Distance” orders source occurrences by AST distance from the mapped region. Random ordering respects the priorities described below; it does not change the candidate space. Anchor-based conditions retain the initial preference for the displayed calculation when the compound anchor is executable.
Configuration
Found
Intended first
Within 5
Alternative explanations before intended
Calculations tested
Unguided search
120
32
82
575.5
39,194.0
Randomized visible-first
120
62
107
230.5
6,713.5
Anchor only
120
98
118
44.0
3,897.0
Value-distance guidance
120
104
120
23.5
853.5
Operation-distance guidance
120
103
119
25.0
2,417.5
Full guidance
120
104
118
34.0
2,442.0
Table 3: Results for 120 numeric changes. “Found” counts recovered intended procedures. “Intended first” and “Within 5” count changes for which the intended procedure appears first or among the first five successful explanations. Alternative explanations also produce the target but differ from the intended procedure. The last two columns total alternatives before the intended procedure and all calculations tested through its recovery, including unsuccessful attempts. Both totals cover all 120 changes. Randomized entries are medians of whole-corpus totals over 100 orders; full guidance is deterministic.
Intended first
Calculations tested
Analysis
Full guidance
Value-distance
Full guidance
Value-distance
Original, 5 operations
104/120
104/120
2,442.0
853.5
Original, 8 operations
104/120
101/120
3,889.0
1,317.5
Competing visible operations
27/27
26/27
149.0
263.5
Table 4: When operation-distance guidance helps. The first two rows use the same 70 transformations and 120 numeric changes; the third uses 24 transformations with 27 numeric changes and competing visible operations. “Intended first” counts changes for which the intended explanation appears before any alternative. Calculations tested are totals through recovery of the intended procedures. Full guidance is the proposed model; value-distance entries are medians over 100 orders.