TL;DR
When AI agents learn through trial and error, they usually save their "memories" by asking a language model to write isolated text summaries of past attempts—a slow, expensive process that misses connections between different tries. G-Skill replaces these isolated notes with persistent state-transition graphs that merge every attempt at a task into a single evolving map. Using simple, millisecond-fast graph search instead of extra LLM calls, it automatically stitches together shortcuts across failed and successful runs to guide future learning.
What Problem Does This Paper Address?
Teaching Large Language Model (LLM) agents to navigate multi-step tasks—like online shopping or virtual housekeeping—via Reinforcement Learning (RL) is notoriously sample-inefficient. To avoid rediscovering the wheel on every episode, researchers equip agents with "skill banks": libraries of reusable advice distilled from past trajectories.
However, current skill-learning methods have three glaring blind spots:
- Fragmented representation: They extract skills from single attempts in isolation. If Attempt A finds a great first half of a route and Attempt B finds a great second half, isolated summaries never connect the dots.
- Heavyweight construction: They rely on teacher LLMs or extra policy decoding turns to summarize trajectories into text, creating an expensive bottleneck.
- Coarse-grained updates: Updating the skill bank usually means adding or deleting entire skills. If a 10-step recipe has one bad step, it’s hard to surgically fix just that flaw.
Methods
Instead of storing text summaries, G-Skill maintains a persistent, directed state-transition graph for each task across training rounds. Nodes represent environment states, and edges represent actions taken. Both successful and failed rollouts are merged into this shared map (building on batch-level graph ideas from prior work like GraphGPO, but persisting them across the entire training run).
What’s new is how G-Skill turns pure graph geometry into dual-granularity skills without a single LLM generation call:
- Reverse BFS: Starting from the goal state, a lightweight reverse breadth-first search (BFS) calculates the exact shortest known distance to the goal from every visited state.
- Task Skills (Macro-level): Extracted directly from the shortest path from start to goal, formatted via fixed templates as a high-level sequence of subgoals.
- Step Skills (Micro-level): For any given state, G-Skill scores candidate actions by their helpfulness—how much they reduce the remaining distance to the goal—giving the agent ranked, local action examples.
As training continues, Skill Evolution happens organically. New rollouts add edges to the graph. If a shortcut is discovered, distances drop, Task Skills automatically shorten, and Step Skill action rankings reshuffle in place. During RL rollouts, the agent uses standard BM25 text similarity to retrieve relevant skills from other similar tasks (strictly excluding the exact same task to prevent cheating) and injects them into its prompt.
Datasets
The authors evaluate G-Skill on two standard interactive agent benchmarks (no new datasets are introduced):
- ALFWorld: Text-based household tasks (e.g., "Clean a butter knife and put it on the dining table") requiring long-horizon navigation and object manipulation across 140
valid_seengames. - WebShop: A simulated e-commerce site where agents search, filter, and buy products matching specific user constraints (color, size, price) across 64 benchmark slots.
Key Insights and Ideas
- Cross-trajectory recombination creates "super-rollouts": Because G-Skill merges shared states across attempts, it stitches together optimal segments from different runs. In ALFWorld, 30.3% of extracted Task Skills were shorter than any single successful rollout the agent had actually executed, saving up to 8 actions!
- Graphs adapt to the task horizon: Persistent graphs naturally shift roles depending on the environment. In long-horizon ALFWorld, gains come from recombining paths into shorter Task Skills. In short-horizon WebShop (3–4 steps), paths rarely shorten; instead, evolution shines by linking new states to the goal and refining local Step Skill rankings.
- Zero-LLM skill building prevents bank collapse: Because LLM-based baselines are expensive or prune aggressively, they end up with tiny, repetitive, or formatting-corrupted skill banks (e.g., retaining only 48–305 distinct WebShop tasks). G-Skill's algorithmic approach retains 1,528 distinct WebShop tasks, giving unseen test queries much closer reference matches.
Key Results
Tested on Qwen2.5-3B-Instruct and Qwen3-4B-Instruct-2507 paired with two RL algorithms (GRPO and GraphGPO), G-Skill achieved the highest mean success rate in every group:
- Big RL boosts: With GRPO, G-Skill lifted WebShop success from 62.8% to 89.4% (Qwen2.5-3B) and ALFWorld success from 38.7% to 77.6% (Qwen3-4B).
- Stackable gains: Pairing G-Skill with GraphGPO pushed performance even higher, hitting 91.9% on ALFWorld (Qwen3-4B) and 92.8% on WebShop (Qwen2.5-3B).
- Millisecond overhead: Computing reverse BFS on CPU took just 0.030 ms per graph on WebShop and 0.071 ms per graph on ALFWorld—zero API latency, zero extra GPU decoding turns.
Limitations and Future Work
- State representation sensitivity: G-Skill relies on recognizing when two states are identical. In messy, unstructured environments where exact states rarely repeat, the graph won't merge; conversely, if states are simplified too coarsely, distinct situations blur together and create unexecutable paths.
- Negative transfer & scaling: Retrieved skills from similar tasks can still mislead an agent into applying the wrong constraint (like searching for the reference item's color). Furthermore, generating a Step Skill for every goal-reaching state causes the bank—and retrieval overhead—to grow rapidly.
- Future directions: Testing larger models, evaluating out-of-distribution (
unseen) splits, and pairing graph memory with learned state abstractions to tackle richer, less structured domains.
Summary updated