Can Large Language Models Generalize Procedures Across Representations?

Fangru Lin, Valentin Hofmann, Xingchen Wan, Weixing Wang, Zifeng Ding, Anthony G. Cohn, Janet B. Pierrehumbert

Naive Transfer No No!
Curriculum RL Yes Yes!

Reasoning models are optimized for solving clean, symbolic problems such as coding. In real world, users ask messy, unstructured questions in natural language. How well can LLMs use the procedures learned in symbolic representations to solve problems in natural language?

Comic avatar presenting the latent procedure
code topo_sort(tasks)
graph
natural language

🤯Are we cooked by Monday?

latent procedure Same problem!
TL;DR

Main findings

  1. LLMs do not naively generalize procedures to natural language questions when trained on symbolic representations (e.g., graphs or code).
  2. A symbolic-to-natural RL curriculum substantially improves performance on natural language tasks, especially on out-of-distribution dialectal generalization.
  3. When they do generalize, they generalize more like analogical reasoning than mere frequency effects.
Motivation The recognition bottleneck

AI is brilliant at solving problems that are already framed, and there is a reason. The training that makes reasoning models strong rewards checkable answers: code that runs, math that comes out right, puzzles with a known solution. Clean, symbolic tasks are exactly what they are optimized on.

But that is not how real work arrives. Users do not always hand over a problem statement and a test to pass; they describe a situation and trust the model to find the structure inside it. The skill we train for and the skill we actually need pull apart — and the gap shows up first as recognition. Before a model can solve the problem, it has to recognize what problem it is solving.

A desparate student sends a message before a deadline:

I still have to finish experiments to get results, then make figures from the numbers. My advisor needs a day to review. The submission deadline is Monday. Are we cooked? 🤯

Buried in that message is a precise question: the longest path through a weighted DAG: the critical path that decides whether Monday is achievable. Decently good LLMs could compute it in an instant, if it recognized that this is what is being asked. That "if" is the whole problem.

This kind of recognition appears everywhere.

A broken checkout flow may hide a hypothesis-guided debugging procedure
A staffing request may hide an optimization problem
A scientific anomaly may hide a known physical mechanism

The model may already know the relevant procedure. The harder question is whether it can recognize when that procedure applies.

This recognition step is central to human intelligence and scientific advancement. A scientist does not just calculate; they notice that a messy phenomenon instantiates a known mechanism. An engineer does not just optimize; they recognize that a vague failure report is really a caching problem. A manager does not just schedule; they know that a launch plan is a critical-path problem.

This also explains why modern agent systems rely on skills and harnesses. Skills are useful because they make procedures explicit. That is powerful. But it also reveals the bottleneck: skills make procedures explicit, but users do not ask from a skill menu. The agent has to infer which procedure is relevant before it can execute anything.

Can LLMs recognize learned procedures in unfamiliar representations? 🤔

Our paper studies this gap in a controlled setting. We ask whether large language models can recognize the same underlying procedure when it appears in different representations: natural language, graphs, and code. Experiments in a toy setting like this cleanly isolate the recognition question, and shed light on the next bottleneck in AI reasoning: the recognition problem.

Experiment & Findings Same procedure, different representation

We test recognition in a controlled setting of asynchronous planning tasks represented in natural language, graphs, and code: the underlying procedures are equivalent, but the surface representations differ. We train models including Qwen2.5, Llama-3, Olmo-2 families across scales on one representation using GRPO, SFT, distillation, and STaR, and then evaluate on all representations.

We ask: when models are trained on one representation, do they recognize the same procedure in another?

Illustration of the same underlying procedure appearing across different representations
The same latent procedure in planning tasks can appear as natural language, graph structure, or code. Ideally, the model should generalize the same procedure in all representations once trained on one.
Key Finding · 1 LLMs often learn the surface representation before the procedure. 📝

Popular post-training methods improve performance in the representation used for training. However, these gains do not reliably transfer across representations. Training on symbolic representations such as graphs or code does not reliably generalize to corresponding natural-language tasks, even when the underlying procedure is identical. The paper reports this pattern across SFT, distillation, STaR, and GRPO.

Main paper results comparing procedure transfer across representations.
Main transfer result: source-interface success is not the same as recognizing the corresponding procedure in natural language.
LLaMA-family results showing representation-specific procedure learning
LLaMA-family results.
OLMo-family results showing representation-specific procedure learning
OLMo-family results.
Key Finding · 2 A symbolic-to-natural RL curriculum helps bridge the gap. 🎯

We propose a symbolic-to-natural reinforcement learning curriculum: first train the model on a symbolic representation where the structure is explicit, then continue training on natural language.

Stage 1

Symbolic structure

Train on a symbolic representation where the structure is explicit.

Stage 2

Natural recognition

Continue training on natural language, where the same procedure must be inferred from a messier presentation.

This curriculum substantially improves performance across model families and tasks. In the paper, a Qwen2.5-1.5B model trained with this curriculum matches zero-shot GPT-4o on naturalistic planning, outperforming GPT-4o-mini on out-of-distribution dialectal generalization.

Training and test accuracy on NL and NL-AAVE for curriculum strategies and baselines.
Train setting Train Acc. (NL) Test Acc. (NL) Test Acc. (NL-AAVE)
Graph (40 steps) + NL (40 steps) 0.873* 0.782* 0.573
NL (40 steps) + Graph (40 steps) 0.504 0.431 0.169
NL only (80 steps) 0.811 0.698 0.507
3B (NL 40 steps) 0.556 0.471 0.400
7B (NL 40 steps) 0.753 0.698 0.573
GPT-4o-mini (zero-shot) - 0.440 0.289
GPT-4o (zero-shot) - 0.782 0.724
Table 1: Graph-to-NL curriculum matches GPT-4o on NL test accuracy and improves over NL-only training under the same 80-step budget. Asterisks mark statistically significant improvements over 80-step NL.

We also extend the curriculum to other task families: math and physics. We train models on code in these task families and then evaluate on natural language representations. We find that the curriculum improves performance on both tasks, especially on out of distribution generalization, suggesting that the recipe can support procedure generalization in other task families.

Accuracy on math and physics tasks when training with a code-to-natural curriculum.
Train setting Test Acc. (Math) Test Acc. (Physics)
Math Code (20 steps) + NL (20 steps) 0.435 0.230
Math NL (40 steps) 0.385 0.135
Physics Code (20 steps) + NL (20 steps) 0.325 0.550
Physics NL (40 steps) 0.315 0.555
Table 2: The same curriculum idea extends beyond planning. Code-to-NL training improves math accuracy and gives comparable physics performance, suggesting the recipe can support procedure generalization in other task families. Yellow cells: in distribution. Blue cells: out of distribution.
Key Finding · 3 Recognition is generative analogy over structure. 🔍
Generative analogy illustration
Generative analogy: transfer needs structural alignment.

Humans excel at recognizing shared structures beneath different forms—a scientist sees a familiar principle in a new phenomenon, or an engineer maps a vague failure to a known fix. These types of recognition often demonstrate high degree of expertise and understanding of the relevant field.

When LLMs generalize, they often do so by analogical generalization. This generative analogy is closely related to human experts' ability to recognize shared structures beneath different forms.

Highest support for frequency-based and analogy-based hypotheses.
Hypothesis NL → NL NL → Graph Graph → NL Graph → Graph Graph→NL → NL Graph→NL → Graph
Frequency-based (rho_p) 0.176 0.124 - 0.188 0.245 0.273
Analogy-based (rho_k) 0.242 0.148 - 0.291 0.265 0.297
Table 3: Across successful transfer settings, analogy-based support is stronger than frequency-based support, suggesting that cross-representation generalization is better explained by structural alignment than by simple exposure frequency.
Implications From task assistance to workflow intelligence
For post-training RL curriculum for broader generalization.

Post-training should shape transferrable capabilities for diverse task generalization. Curriculum is one way to guide the abstraction: first expose the procedure in a clean symbolic form, then teach the model to recognize it in natural language. First teach the procedure. Then teach the disguise.

For evaluation and reasoning Test for transferability across representations.

Reliable reasoning requires more than in-domain accuracy. Reasoning benchmarks should rigorously test for transferability across representations. Change the disguise. Keep the procedure. Test what survives.

For agents and discovery Move from skill execution to procedure generalization.

Agents should reliably adapt to different scenarios where underlying procedures are similar to what they are trained on regardless of the representation. Cross-domain discovery also requires generalization of knowledge across different areas. Recognition is the key to this adaptability.