Papers
Topics
Authors
Recent
Search
2000 character limit reached

ALPINE: Autoregressive Planning in Networks

Updated 12 February 2026
  • The paper introduces ALPINE, a framework that recasts planning as discrete token sequence generation on graphs to bridge next-token prediction with path-finding.
  • It demonstrates that even simple Transformer models can accurately encode observed adjacency and reachability, yet fail to generalize transitive closure.
  • Empirical evaluations on synthetic DAGs and Blocksworld confirm that while direct path prediction is robust, compositional planning remains a critical limitation.

Autoregressive Learning for Planning In NEtworks (ALPINE) is a theoretical and empirical investigation into how standard Transformer-based LLMs, trained via autoregressive next-token prediction, acquire and execute planning capabilities when such planning is cast as path-finding over networks. The ALPINE framework formalizes planning as network path-finding, characterizes precisely what is learned by Transformers under cross-entropy training, and reveals fundamental limitations—most notably, the inability to infer transitive reachability—from both theoretical and experimental perspectives (Wang et al., 2024).

1. Formalization of Path-Finding as Autoregressive Prediction

ALPINE models planning as a discrete token sequence generation problem: given a directed graph G\mathcal{G} with node set V\mathcal{V}, adjacency matrix Atrue{0,1}V×VA^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|} (where Ai,ktrue=1A_{i,k}^{\mathrm{true}} = 1 iff edge (ik)(i \to k) exists), and reachability matrix Rtrue{0,1}V×VR^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|} (where Rt,ktrue=1R_{t,k}^{\mathrm{true}} = 1 iff a path ktk \to \ldots \to t exists), the task is to generate a token sequence u=(s,t,s,u1,u2,,up,t,\n)u = (s, t, s, u_1, u_2, \ldots, u_p, t, \text{\textbackslash n}), representing a path from source ss to target V\mathcal{V}0. The vocabulary size is V\mathcal{V}1.

Transformers are trained to autoregressively predict each next token using standard architecture:

  • Input encoding: V\mathcal{V}2, where V\mathcal{V}3 is one-hot, V\mathcal{V}4, V\mathcal{V}5 are learned weights.
  • Layerwise propagation: V\mathcal{V}6.
  • Output: V\mathcal{V}7.
  • Training loss: V\mathcal{V}8.

This formulation provides a direct bridge between next-token prediction and the mechanistic implementation of planning as path-finding.

2. Representation of Graph Structure in Self-Attention and Output Probabilities

A core result (Theorem 3.1) demonstrates that a 1-layer, 1-head Transformer with embedding dimension V\mathcal{V}9 can exactly implement optimal path-finding via appropriately chosen weights:

  • Attention: Weights Atrue{0,1}V×VA^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}0, Atrue{0,1}V×VA^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}1 ensure all attention mass focuses on the target token position.
  • Values: Weights Atrue{0,1}V×VA^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}2 at the target token position embed the row Atrue{0,1}V×VA^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}3 of the true reachability matrix.
  • Feedforward/MLP: Weights Atrue{0,1}V×VA^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}4 extract the row Atrue{0,1}V×VA^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}5, representing outgoing edges from the current node Atrue{0,1}V×VA^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}6.
  • Final logits: At each next-token step,

Atrue{0,1}V×VA^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}7

where Atrue{0,1}V×VA^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}8 are scaling factors. The softmax over these logits assigns nonzero mass precisely to those Atrue{0,1}V×VA^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}9 reachable from Ai,ktrue=1A_{i,k}^{\mathrm{true}} = 10 and, ultimately, from Ai,ktrue=1A_{i,k}^{\mathrm{true}} = 11.

This construction unveils how Transformers, in principle, can internalize both adjacency (Ai,ktrue=1A_{i,k}^{\mathrm{true}} = 12) and reachability (Ai,ktrue=1A_{i,k}^{\mathrm{true}} = 13) information in their parameters and use these to make path-finding decisions stepwise.

3. Learning Dynamics: Adjacency and Partial Reachability

The analysis of SGD-driven learning dynamics (Section 4) employs a simplified Transformer (single layer/head, no nonlinearity/normalization, input/output weights as identities) to clarify which graph-theoretic structures are reliably encoded:

  • For each observed triple Ai,ktrue=1A_{i,k}^{\mathrm{true}} = 14 (current node, target, next node), the final logit is Ai,ktrue=1A_{i,k}^{\mathrm{true}} = 15.
  • Gradients with respect to Ai,ktrue=1A_{i,k}^{\mathrm{true}} = 16 (adjacency) drive Ai,ktrue=1A_{i,k}^{\mathrm{true}} = 17 up if edge Ai,ktrue=1A_{i,k}^{\mathrm{true}} = 18 is seen in the training paths, and down or unchanged otherwise—resulting precisely in Ai,ktrue=1A_{i,k}^{\mathrm{true}} = 19 encoding (ik)(i \to k)0, the adjacency matrix of the paths present in training.
  • For (ik)(i \to k)1 (reachability), the same dynamics cause (ik)(i \to k)2 to reflect (ik)(i \to k)3, that is, direct evidence of (ik)(i \to k)4 appearing on any path to (ik)(i \to k)5 in training.

Crucially, concatenated or composite reachabilities—cases where (ik)(i \to k)6 is reachable through chaining but never observed as a direct (ik)(i \to k)7 pair—are not learned. Thus, the trained model does not internalize the transitive closure required for inferential planning beyond observed data.

4. Empirical Evaluation on Synthetic DAGs and Blocksworld

Extensive experiments validate the theoretical predictions using both synthetic graph environments and the Blocksworld planning benchmark:

  • Synthetic DAGs: Training on random graphs ((ik)(i \to k)8–500 nodes, (ik)(i \to k)9 edge prob.), up to 120-dimensional embeddings, varying layers/heads, and evaluating exact-path accuracy.
    • For Rtrue{0,1}V×VR^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}0, 1-layer/1-head models achieve >95% accuracy; for larger graphs, accuracy falls modestly.
    • Attention always focuses on the target token.
    • Feedforward matrix Rtrue{0,1}V×VR^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}1 recovers Rtrue{0,1}V×VR^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}2 on seen edges.
    • Value matrix Rtrue{0,1}V×VR^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}3 correlates with Rtrue{0,1}V×VR^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}4; pairs requiring transitive closure are not captured.
    • Partitioning by “degree” (number of required concatenations): accuracy is near-100% for degree 0, falls to 20–50% for degree Rtrue{0,1}V×VR^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}5.
  • Blocksworld: The state graph with 73 nodes (legal 4-block configurations) is encoded analogously, trained on 80% of Rtrue{0,1}V×VR^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}6 pairs, sampled over 50,000 paths.
    • A 1-layer, 1-head, Rtrue{0,1}V×VR^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}7 Transformer achieves near-100% accuracy on directly observed reachabilities; attention and weights mirror synthetic results.

These results confirm both the successful learning of adjacency and observed reachability, and the consistent failure to generalize to purely compositional inferences.

5. Fundamental Limitation: No Transitive Closure

Theoretical (Section 4) and empirical (Figures 8, 9, 10) evidence demonstrate that autoregressive next-token training on path sequences fails to instantiate a mechanism for learning transitive closure:

  • Gradients for Rtrue{0,1}V×VR^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}8 do not increase unless Rtrue{0,1}V×VR^{\mathrm{true}} \in \{0,1\}^{|\mathcal{V}| \times |\mathcal{V}|}9 appears directly in the data—as such, the model has no way to “compose” two or more partial reachabilities and thus cannot infer Rt,ktrue=1R_{t,k}^{\mathrm{true}} = 10 for any Rt,ktrue=1R_{t,k}^{\mathrm{true}} = 11 not observed.
  • Empirically, entries in Rt,ktrue=1R_{t,k}^{\mathrm{true}} = 12 corresponding to unobserved (but actually reachable) node pairs remain indistinguishable from truly unreachable pairs.
  • Accordingly, test accuracy collapses on pairs requiring nontrivial concatenation (degree Rt,ktrue=1R_{t,k}^{\mathrm{true}} = 13), even on large models and extensive training sets.

This limitation underscores that current Transformer architectures, when trained exclusively via next-token prediction, do not implement compositional or algorithmic reasoning required for generalizable planning.

6. Insights and Prospects for Enhanced Planning in LLMs

ALPINE’s synthesis of theory and experiment yields several insights for advancing the planning capabilities of LLMs:

  • Transformers can reliably learn and utilize direct adjacency and observed reachability within their weights under next-token cross-entropy training.
  • However, absence of a compositional mechanism precludes the discovery of novel, transitive reachabilities—planning generalizes only across instances seen during training.
  • To instill robust, compositional planning, promising modifications include:
    • Algorithmic or compositional supervision (e.g., chain-of-thought traces incorporating path composition).
    • Architectural augmentation using explicit graph reasoning modules, such as GNN encoders capable of dynamic-programming-style inference.
    • Expansion of the training objective to include new reachability queries, beyond observed instances.
    • Memory or deduction layers designed for transitive inference.
    • Hybrid losses that encourage generalized reasoning across unseen node pairs.

Collectively, these directions point toward future LLMs with genuinely generalizable planning and path-finding abilities, contingent upon integrating architectural, training, or supervision innovations beyond standard autoregressive objectives (Wang et al., 2024).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Autoregressive Learning for Planning In NEtworks (ALPINE).