Introduction
Offline Reinforcement Learning (RL) has recently been reframed as a sequence modeling problem, leveraging the powerful architectures of Large Language Models to predict actions, states, and rewards. However, scaling these models to handle multiple tasks simultaneously introduces significant challenges: the computational cost of high-capacity models, negative interference between conflicting task parameters, and the "deadlock" of sparse rewards where average return values provide little guidance for planning.
To address these hurdles, we introduce SwitchTT, an architecture that combines the efficiency of Switch Transformers (a Mixture-of-Experts approach) with distributional value estimation. This combination allows for massive model capacity with sparse activation, significantly accelerating training while improving performance in complex, multi-task environments.
The SwitchTT Architecture
The core innovation of SwitchTT lies in its use of sparsely activated switch layers. Unlike standard dense transformers where every parameter is used for every token, SwitchTT employs a "router" that directs tokens to specialized expert sub-networks.
This Mixture-of-Experts (MoE) design allows the model to maintain a high total parameter count—essential for learning diverse tasks—while only "firing" a small fraction of those parameters during any single forward pass. This effectively mitigates negative interference, as the model learns to allocate specific experts to specific task types (e.g., navigation vs. object manipulation).
Distributional Value Approximation
In environments with sparse rewards, such as a maze where a reward is only granted upon completion, the expected (mean) reward is often near zero, providing a poor signal for an agent's planner. SwitchTT overcomes this by predicting a categorical distribution of possible returns rather than a single scalar value.
By modeling the full distribution, the agent can distinguish between a trajectory that is guaranteed to fail and one that has a high potential for success, even if the average reward remains low. This distributional approach is integrated into a three-part system:
- Decision Transformer: Predicts the optimal actions.
- Dynamics Transformer: Acts as a "world model" to predict future states.
- Return-to-Go (RTG) Transformer: Serves as the distributional value estimator to guide the beam-search planner.
Experimental Results
We evaluated SwitchTT on the gym-mini-grid suite across 10 distinct sparse-reward tasks, including FourRooms and KeyCorridor.
- Performance: SwitchTT outperformed standard Trajectory Transformers (TT) and Decision Transformers (DT) in 80% of the tasks, achieving a 10% overall improvement in average reward.
- Efficiency: The sparse architecture enabled up to a 90% increase in training speed compared to dense models of equivalent capacity.
- Expert Scaling: Testing revealed a "sweet spot" for task allocation; 4 experts proved optimal for our 10-task suite, while further increasing the expert count led to diminishing returns and potential task-fragmentation.
Limitations and Future Directions
While SwitchTT offers massive gains in training efficiency, it is more susceptible to overfitting due to its high capacity. Furthermore, while training is faster, the planning phase—which relies on beam search to simulate future trajectories—remains a computational bottleneck. Future work will explore integrating more sophisticated search algorithms, such as Monte-Carlo Tree Search (MCTS), to better leverage the rich information provided by the distributional value estimates.
Summary updated