Offline Meta-Reinforcement Learning with Flow-Based Task Inference and Adaptive Correction of Feature Overgeneralization

Min Wang, Xin R. Li, H.j. Bennis

Abstract

Offline meta-reinforcement learning (OMRL) combines the strengths of learning from diverse datasets in offline RL with the adaptability of meta-RL. However, OMRL still suffers from significant extrapolation errors due to out-of-distribution (OOD) actions, often exacerbated by complex task distributions. This paper identifies "feature overgeneralization" as a primary driver of these errors when using decomposed Q-values. We propose FLORA (FLOw-based task infeRence and Adaptive correction), which utilizes normalizing flows for precise task representation and an adaptive correction mechanism to mitigate estimation biases. Our results demonstrate that FLORA achieves superior adaptation and stability across various complex robotic manipulation benchmarks.

Introduction: The Challenge of Offline Meta-RL

Offline Meta-Reinforcement Learning (OMRL) is often considered the "holy grail" of robot learning, aiming to train agents on static, pre-collected datasets that can instantly adapt to brand-new tasks. Despite its promise, two major hurdles remain:

  1. Extrapolation Error: In offline settings, agents frequently encounter OOD actions. If the agent overestimates the value of these actions, the policy collapses.
  2. Task Ambiguity: Offline data is often multi-modal and "messy," making it difficult for standard encoders (which typically assume simple Gaussian priors) to accurately infer the true task context.

The Feature Overgeneralization Phenomenon

A common technique for fast adaptation in meta-RL is decomposing the Q-value into feature components (representing dynamics) and weight components (representing rewards), such as Successor Features ($Q = \psi^T W$). While this decomposition aids convergence in high-quality data scenarios, the authors discovered it often leads to catastrophic failure in complex offline tasks.

This failure is rooted in feature overgeneralization: when the feature network encounters OOD samples, it produces massive estimation biases. As shown in the figure below, decomposed Q-values (red) exhibit significantly higher and more volatile estimated errors compared to standard Q-networks (blue) across different tasks.

Estimated Q Error over time for Drawer-Close and Door-Close tasks. Decomposed Q-values (red) exhibit significantly higher extrapolation error compared to non-decomposed versions (blue).

Further analysis reveals that this error is strongly correlated with the policy's divergence from the behavior policy ($D_{KL}(\pi_\phi, \pi_\beta)$). As the agent attempts to explore actions outside the dataset, the decomposed Q-function's error increases exponentially, leading to policy degeneration.

Relationship between Estimated Q error and policy divergence ($D_{KL}(\pi_\phi, \pi_\beta)$). As the policy deviates further from the behavior policy, the error in decomposed Q-values increases sharply.

The FLORA Framework

To address these challenges, FLORA introduces two key innovations:

Flow-Based Task Inference (FTI)

Traditional methods often use Variational Autoencoders (VAEs) with simple Gaussian priors for task inference. However, real-world offline data is frequently multi-modal. FLORA employs Normalizing Flows (specifically planar flows) to model the task distribution. By applying a chain of invertible transformations, FLORA can represent highly complex, multi-modal posterior distributions, capturing the nuances of diverse offline datasets much more accurately.

Adaptive Correction of Overgeneralization (ACO)

To mitigate feature overgeneralization, FLORA uses double-feature learning to estimate epistemic uncertainty ($\sigma$). It then constructs a "belief distribution" for the target value: $\tilde{\Psi} = \bar{\psi} + \alpha \sigma$.

Crucially, the conservatism parameter $\alpha$ is not fixed. FLORA uses a multi-armed bandit strategy with a return feedback mechanism. If the agent's performance improves, it adjusts $\alpha$ to be less conservative; if returns drop (likely due to OOD errors), it increases conservatism to stabilize learning.

Experimental Results

FLORA was evaluated on the Meta-World and MuJoCo (Point-Robot) benchmarks, significantly outperforming established baselines like FOCAL, IDAQ, and UNICORN:

  • Success Rates: In Meta-World tasks such as Faucet-Close and Faucet-Open, FLORA achieved a 100% success rate. In the challenging Door-Unlock task, it reached 98.27%, while baselines often lagged by 10-20%.
  • Adaptation Speed: In the Point-Robot-Wind environment, which features varying dynamics, FLORA demonstrated superior few-shot adaptation, reaching near-optimal performance faster than competitors.
  • Robustness: Statistical t-tests confirmed that FLORA's improvements are significant (p < 0.05) with lower performance variance compared to other methods.

Conclusion and Future Work

FLORA effectively addresses the "decomposition dilemma" in offline meta-RL by identifying and correcting feature overgeneralization. While the use of Normalizing Flows and double-feature learning increases computational overhead, the gains in stability and adaptation are substantial. Future research will explore more complex flow architectures and the application of FLORA to high-dimensional visual inputs.

Summary updated

BibTeX
@inproceedings{wang2026offline,
  author = {Min Wang and Xin R. Li and Mingzhong Wang and H.J. Bennis},
  title = {{Offline Meta-Reinforcement Learning with Flow-Based Task Inference and Adaptive Correction of Feature Overgeneralization}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i31.39845},
}
Figure