Abstract
Classical theory in reinforcement learning (RL) predominantly focuses on the single task setting, where an agent learns to solve a task through trial-and-error experience, given access to data only from that task. However, many recent empirical works have demonstrated the significant practical benefits of leveraging a joint representation trained across multiple, related tasks. In this work we theoretically analyze such a setting, formalizing the concept of task relatedness as a shared state-action representation that admits linear dynamics in all the tasks. We introduce the Shared-MatrixRL algorithm for the setting of Multitask MatrixRL. In the presence of $P$ episodic tasks of dimension $d$ sharing a joint $r \ll d$ low-dimensional representation, we show the regret on the the $P$ tasks can be improved from $O(PHd\sqrt{NH})$ to $O((Hd\sqrt{rP} + HP\sqrt{rd})\sqrt{NH})$ over $N$ episodes of horizon $H$. These gains coincide with those observed in other linear models in contextual bandits and RL. In contrast with previous work that have studied multi task RL in other function approximation models, we show that in the presence of bilinear optimization oracle and finite state action spaces there exists a computationally efficient algorithm for multitask MatrixRL via a reduction to quadratic programming. We also develop a simple technique to shave off a $\sqrt{H}$ factor from the regret upper bounds of some episodic linear problems.
Introduction
Standard reinforcement learning (RL) theory typically centers on a single agent learning a single task in isolation. However, real-world applications—ranging from robotics to complex gaming environments—often involve families of related tasks. For instance, an agent learning to navigate different rooms in a building should not need to relearn the fundamental laws of physics or basic movement for each new room. The core challenge lies in formalizing "task relatedness" to allow for rigorous mathematical analysis of how shared knowledge accelerates learning.
While multi-task learning has been explored in supervised learning and bandits, RL presents unique difficulties due to the exploration-exploitation trade-off: an agent's actions actively determine the data it collects. This paper addresses the Multitask MatrixRL setting, providing a theoretical foundation to prove that joint representation learning significantly reduces the cost of learning (regret) compared to independent task learning.
Methods
Shared Structure Model
The authors build upon MatrixRL, a model-based approach where transition dynamics are represented by a matrix. They introduce a Shared Structure Model where the transition matrix $M^*_p$ for any task $p \in [P]$ is factorized as: $$M^*_p = B^* A^*_p$$ Here, $B^* \in \mathbb{R}^{d \times r}$ is a shared projection matrix (the representation) mapping high-dimensional state-action features into a low-dimensional space of dimension $r$. The matrix $A^*_p \in \mathbb{R}^{r \times d'}$ represents the task-specific dynamics within that low-dimensional latent space. This structure implies that while tasks differ, they share a common underlying feature representation.
The Shared-MatrixRL Algorithm
The proposed algorithm, Shared-MatrixRL, jointly estimates the shared representation $B^*$ and the task-specific matrices $A^*_p$ by solving a global quadratic objective. It utilizes these estimates to construct "optimistic" value functions, which guide exploration across all tasks simultaneously.
To improve the theoretical bounds, the authors introduce a "lazy" version of the standard Determinant Lemma. This mathematical refinement allows them to "shave off" a factor of $\sqrt{H}$ (where $H$ is the task horizon) from the regret bounds, resulting in tighter guarantees than previous episodic linear models.
Key Results and Insights
Regret Bounds and Scaling
The primary contribution is a significant improvement in the cumulative regret across $P$ tasks over $N$ episodes.
- Independent Learning: Regret scales as $\tilde{O}(PHd\sqrt{NH})$.
- Shared-MatrixRL: Regret scales as $\tilde{O}((Hd\sqrt{rP} + HP\sqrt{rd})\sqrt{NH})$.
When the shared dimension $r$ is much smaller than the feature dimension $d$ ($r \ll d$), and the number of tasks $P$ is large, the second term dominates. This effectively replaces a factor of $d$ with $\sqrt{rd}$, confirming that the agent spends significantly less time exploring high-dimensional spaces once the shared structure is identified. Information sharing allows data from one task to refine the representation used by all others.
Computational Tractability
While joint optimization over matrices is typically non-convex, the authors demonstrate that for finite state-action spaces, finding an optimistic policy can be reduced to a Quadratically Constrained Linear Program (QCLP). This ensures that the algorithm is not just theoretically sound but also computationally efficient in these settings.
Discussion and Future Work
Despite these advances, several limitations remain. The current algorithm requires knowledge of the initial states of all tasks at the start of each episode to maintain global optimism. Future research might explore Thompson Sampling to relax this requirement. Additionally, while the computational proof holds for finite spaces, extending these efficiency gains to continuous state-action spaces remains an open challenge. Finally, extending these representation gains to model-free algorithms like Q-learning is a natural next step for the field.
Summary updated