LatentGym: A Testbed For Cross-Task Experiential Learning With Controllable Latent Structure
The paper introduces LatentGym, a controllable testbed featuring ground-truth latent structures that enables the evaluation of cross-task experiential learning in agentic systems by separating exploration from exploitation, thereby facilitating the study of how and why LLMs adapt across sequential tasks.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are teaching a very smart but slightly rigid robot to play a series of games. In the real world, we humans are great at "connecting the dots." If you play a game where the answer is always one of three numbers, and you play it ten times, you quickly realize, "Hey, the answer is always one of these three!" You stop guessing randomly and start guessing those three numbers. You learn from experience.
The paper argues that today's most advanced AI agents (like the ones powering chatbots) are surprisingly bad at this. They tend to treat every single game as if it's brand new, forgetting everything they learned in the previous nine games.
To prove this and figure out how to fix it, the authors built LatentGym.
The Playground: LatentGym
Think of LatentGym not as a single game, but as a factory for creating game sequences.
- The "Latent" (The Hidden Rule): In a normal game, the rules are fixed. In LatentGym, there is a secret "hidden rule" that applies to all the games in a sequence. For example, in a number-guessing game, the hidden rule might be: "The number is always either 137 or 793." The AI doesn't know this at the start; it has to figure it out by playing.
- The Control Knobs: The researchers can tweak the difficulty like a soundboard:
- The Prompt: How much of the secret rule do they tell the AI? (Nothing? A vague hint? The whole truth?)
- The Feedback: After a game, do they just say "You won/lost," or do they reveal the actual answer so the AI can learn?
- The Horizon: How many games are in the sequence? (5? 10? 20?)
This setup is crucial because, in most AI tests, if an AI fails, you don't know why. Did it not see the pattern? Did it see the pattern but forget to use it? In LatentGym, the researchers know the secret rule perfectly, so they can pinpoint exactly where the AI's brain short-circuited.
The Problem: How AI Fails
When the researchers tested top-tier AI models (like GPT-4o and Claude) on these simple sequences, they found three specific ways the AI failed to learn:
- Adaptation Neglect (The "Reset Button" Syndrome): The AI ignores the fact that it has played before. Even if the answer is always "Red," it treats the second game as if it's the first time ever, starting with a random guess instead of checking "Red" first. It's like a student who forgets they took a math test yesterday and tries to re-derive the formula from scratch today.
- Adaptation Breakdown (The "Squinting" Syndrome): The AI notices a pattern ("Wait, the numbers are getting smaller!"), but it doesn't know how to use that information. It sees the clue but keeps playing the old way. It's like seeing a "Wet Floor" sign but still walking normally instead of slowing down.
- Adaptation Miscalibration (The "Over-Thinker" Syndrome): When the researchers explicitly told the AI the rule ("The answer is always 137 or 793"), the AI sometimes got confused and performed worse than when it wasn't told anything. It tried so hard to follow the rule that it ignored the actual game mechanics. It's like being told "Don't think about a pink elephant" and then spending the whole time thinking about pink elephants, forgetting to play the game.
The Solution: Cross-Task RL
The researchers tried to teach the AI to learn better using a method called Cross-Task Reinforcement Learning (RL).
- Old Way (Single-Task RL): You train the AI on Game 1, then Game 2, then Game 3. It learns to win Game 1, then Game 2, but it doesn't learn to connect them.
- New Way (Cross-Task RL): You train the AI on the entire sequence at once. You tell it, "Your goal isn't just to win Game 1; your goal is to win Game 10 by learning from Games 1 through 9."
The Results:
When they used this new training method, the AI actually learned to adapt.
- It started looking for patterns early on.
- It started using those patterns to win later games faster.
- Crucially, this learning generalized. Even when they tested the AI on a new set of games with a new hidden rule it had never seen before, it was still better at figuring it out than the AI trained the old way. It learned a "meta-skill" of how to learn.
A Surprising Twist: Less Information is Better
One of the most interesting findings was about feedback.
- Rich Feedback: Telling the AI the exact answer after every game.
- Sparse Feedback: Just telling the AI "You won" or "You lost."
Counter-intuitively, the AI trained with Sparse Feedback (less information) actually generalized better to new situations than the one trained with Rich Feedback. It seems that when you give the AI the answer too easily, it becomes lazy or over-reliant on that specific hint. When it has to figure things out with just a "win/loss" signal, it builds a more robust strategy that works even when the hints change.
The Bottom Line
The paper introduces a new "gym" (LatentGym) to test if AI agents can learn from a sequence of related tasks. They found that current top AIs are bad at this, often failing to connect the dots between tasks. However, by training them on full sequences of tasks (Cross-Task RL) rather than isolated tasks, they can learn a general ability to adapt. This framework allows researchers to see exactly why an AI fails and how to fix it, moving us closer to agents that truly learn from experience.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.