Active Inference and Reinforcement Learning: A Unified Inference on Continuous State and Action Spaces Under Partial Observability

Parvin Malekzadeh, Konstantinos N. PlataniotisNeural Computation 2024

TL;DR

This paper unifies Active Inference (AIF) and Reinforcement Learning (RL) to tackle complex decision-making problems in partially observable environments with continuous state and action spaces. By extending the Expected Free Energy (EFE) concept to a belief state-action policy and introducing a unified policy iteration framework, the authors enable agents to learn optimal policies that balance reward maximization with information-seeking exploration, even in reward-free scenarios.

What Problem Does This Paper Address?

Many real-world decision-making problems involve agents that cannot fully observe their environment. These are known as Partially Observable Markov Decision Processes (POMDPs). Traditional Reinforcement Learning (RL) often struggles in these scenarios, as it typically assumes full observability and relies heavily on well-defined reward signals. Active Inference (AIF), on the other hand, is naturally suited for POMDPs and incorporates exploration by minimizing uncertainty. However, AIF has been limited to discrete state/action spaces due to computational challenges. This paper bridges this gap by proposing a unified framework that combines the strengths of RL and AIF, enabling agents to learn effectively in continuous state and action spaces under partial observability, while also promoting robust exploration.

Methods

The core of this work lies in a "unified inference" framework that merges RL and AIF. Key methodological contributions include:

  • Extended Expected Free Energy (EFE): The authors extend the AIF concept of EFE to a stochastic belief state-action policy for infinite-horizon POMDPs with continuous spaces. This unified objective function balances reward maximization (exploitation) and information gain (exploration).
  • Unified Policy Iteration: A computationally efficient algorithm is introduced to optimize the unified objective function. This framework generalizes policy iteration guarantees from MDPs to POMDPs, ensuring convergence to an optimal policy.
  • Unified Actor-Critic: Building on the unified policy iteration, a novel actor-critic algorithm is presented that unifies approaches for both MDPs and POMDPs. This allows for the application of advanced RL techniques to POMDPs.
  • Deep Learning Approximations: To handle continuous state and action spaces, the authors employ deep neural networks (DNNs) to approximate various components, including the generative model, variational posterior, belief state-action EFE, and policy. This includes model-free, model-based, and hybrid actor-critic approaches.

Datasets

The experimental evaluations were conducted on four continuous-space Roboschool tasks from the PyBullet environment: HalfCheetah, Walker2d, Hopper, and Ant. These tasks were modified to create partially observable versions by:

  • Partial State Information: Restricting agent observations to velocities only.
  • Noisy State Information: Adding zero-mean Gaussian noise to the original states.

These modified tasks are denoted as {Hopper, Ant, Walker-2d, Cheetah}-{P} for partial observations and {Hopper, Ant, Walker-2d, Cheetah}-{N} for noisy observations.

Key Insights and Ideas

  • Bridging RL and AIF: The paper demonstrates a strong theoretical connection between RL and AIF, showing how their objectives can be unified. This opens doors for leveraging insights from both fields to solve complex problems.
  • Information Gain as Intrinsic Reward: The framework explicitly incorporates information gain as an intrinsic reward, which is crucial for effective exploration in partially observable environments. This is shown to be more robust than prediction-error-based exploration methods.
  • Reward-Free Learning: The unified framework allows agents to learn effectively even in the absence of extrinsic rewards, by focusing on information gain. This is particularly valuable in scenarios where designing reward functions is challenging.
  • Belief State Representation is Key: The use of belief states, rather than raw history, significantly improves computational and memory efficiency, especially in long-horizon or high-dimensional problems.
  • Unified Policy Iteration for POMDPs: The proposed policy iteration framework extends guarantees from MDPs to POMDPs, providing a solid theoretical foundation for learning in these complex environments.

Key Results

  • Superior Performance: The proposed G-SAC and G-Dreamer algorithms consistently outperformed existing state-of-the-art methods (SAC, Dreamer, VRM, Recurrent Model-Free) on partially observable and noisy Roboschool tasks.
  • Sample Efficiency: The information gain term in G-SAC and G-Dreamer significantly enhanced sample efficiency, allowing them to reach performance levels comparable to or exceeding the oracle State-SAC (which has access to true states) with fewer steps.
  • Robustness to Noise: Belief state inference-based approaches (G-SAC, G-Dreamer, VRM, Dreamer) demonstrated greater robustness to noisy observations compared to memory-based baselines.
  • Stochastic Policy Benefits: Ablation studies showed that learning a stochastic policy with policy entropy maximization significantly improved training stability and reduced premature convergence, especially in challenging tasks.
  • Model-Based vs. Model-Free: Hybrid approaches (G-Dreamer-SAC) showed benefits by combining the sample efficiency of model-based learning with the robustness of model-free learning.

Limitations and Future Work

  • Scaling to High-Dimensional Environments (Images): The paper acknowledges that scaling AIF to high-dimensional environments, particularly those based on images, remains a challenge. Accurate variational posteriors and generative models are needed to reconstruct observations in detail.
  • State-Consistency Loss: The authors suggest incorporating a state-consistency loss, inspired by self-supervised learning methods, as a potential solution for improving image-based AIF.
  • Multi-Task Learning: Future research could explore the impact of information-seeking exploration in multi-task settings, where agents might transfer knowledge across tasks.

Summary updated

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
HalfCheetah · PG-SACmean cumulative extrinsic reward (return)3859+921 vs baselinepartial-observability · observation=velocity-only
Source quote
L1399: 3859
HalfCheetah · NG-SACmean cumulative extrinsic reward (return)3655+717 vs baselinenoisy-observations · noise-sigma=0.05 · observation=Gaussian noise
Source quote
L1407: 3655
Hopper · PG-SACmean cumulative extrinsic reward (return)2468+687 vs baselinepartial-observability · observation=velocity-only
Source quote
L1415: 2468
Reported baseline / comparator measurements (3)
BenchmarkMethodMetricScoreProtocol / Evidence
HalfCheetah · PVRM baselinemean cumulative extrinsic reward (return)2938partial-observability · observation=velocity-only
Source quote
L1398: 2938
HalfCheetah · NVRM baselinemean cumulative extrinsic reward (return)2170noisy-observations · noise-sigma=0.05 · observation=Gaussian noise
Source quote
L1406: 2170
Hopper · PVRM baselinemean cumulative extrinsic reward (return)1781partial-observability · observation=velocity-only
Source quote
L1414: 1781
BibTeX
@article{malekzadeh2024active,
  author = {Parvin Malekzadeh and Konstantinos N. Plataniotis},
  title = {{Active Inference and Reinforcement Learning: A Unified Inference on Continuous State and Action Spaces Under Partial Observability}},
  journal = {Neural Computation},
  year = {2024},
  url = {https://openreview.net/forum?id=3JKEfjZ5XY},
}
Figure