Heterogeneous Knowledge for Augmented Modular Reinforcement Learning

Lorenz Wolf, Mirco Musolesi

Abstract

Existing modular Reinforcement Learning (RL) architectures are generally based on reusable components, also allowing for "plug-and-play" integration. However, these modules are homogeneous in nature - in fact, they essentially provide policies obtained via RL through the maximization of individual reward functions. Consequently, such solutions still lack the ability to integrate and process multiple types of information (i.e., heterogeneous knowledge representations), such as rules, sub-goals, and skills from various sources. In this paper, we discuss several practical examples of heterogeneous knowledge and propose Augmented Modular Reinforcement Learning (AMRL) to address these limitations. Our framework uses a selector to combine heterogeneous modules and seamlessly incorporate different types of knowledge representations and processing mechanisms. Our results demonstrate the performance and efficiency improvements, also in terms of generalization, which can be achieved by augmenting traditional modular RL with heterogeneous knowledge sources and processing mechanisms. Finally, we examine the safety, robustness, and interpretability issues stemming from the introduction of knowledge heterogeneity.

Introduction

Standard Reinforcement Learning (RL) typically follows a "blank slate" approach, where an agent learns tasks from scratch through trial and error. While effective in controlled settings, this paradigm is often inefficient and potentially dangerous in real-world environments where exploration can lead to catastrophic failures. Modular RL was introduced to mitigate these issues by breaking tasks into reusable sub-skills. However, most existing frameworks are limited by homogeneity: they treat every module as a standard RL policy.

In contrast, human intelligence is fundamentally heterogeneous, drawing from traffic laws (rules), memories of past experiences (retrieval), and physical coordination (skills). This paper introduces Augmented Modular Reinforcement Learning (AMRL), a unified framework designed to "plug-and-play" these fundamentally different types of information into a single, cohesive decision-making agent.

The AMRL Framework

AMRL acts as a container for diverse knowledge modules, allowing an agent to leverage multiple information sources simultaneously. The core of the architecture is a Selector mechanism that observes the environment and determines how to combine suggestions from various modules.

The AMRL framework architecture, illustrating how the selector integrates diverse knowledge modules ranging from safety rules to pre-trained skills.

Heterogeneous Knowledge Representations

The framework supports four primary types of modules, categorized by their source and processing mechanism:

  • Logic-based Rules: Human-designed "if-then" statements (e.g., safety constraints).
  • Trajectory Databases: Retrieval systems that suggest actions based on successful historical paths.
  • Pre-trained Skills: Specialized RL policies previously trained on specific sub-tasks.
  • Dynamic RL: A learner module that adapts to the current task in real-time.
Categorization of heterogeneous knowledge by source, representation, and processing mechanism.

Selection Strategies

The Selector is the "brain" of AMRL, deciding which module's advice to follow. The authors explore two primary strategies:

  1. Hard Selection: The agent selects exactly one module at each timestep using a differentiable Gumbel-Softmax approach.
  2. Soft Selection: The agent creates a weighted average of all module suggestions. This "Soft Selection" proved to be the superior method, particularly when dealing with noisy or uninformative knowledge sources, as it allows the agent to effectively ignore irrelevant modules.

Additionally, AMRL incorporates Module Prioritization, a safety feature where high-confidence modules (such as safety rules) can mask or veto dangerous actions proposed by other modules, ensuring safe exploration.

Experimental Evaluation

The framework was evaluated across discrete and continuous environments, including MiniGrid (navigation and hazard avoidance) and OpenAI Robotics Fetch (robotic manipulation). AMRL was compared against standard RL baselines like PPO and SAC, as well as existing knowledge-augmented methods like KIAN and KoGuN.

Key Results

  • Sample Efficiency: In the DoorKey 8x8 environment, AMRL achieved near-perfect rewards while standard baselines failed to make meaningful progress within the same training budget.
  • Enhanced Safety: In LavaCrossing, AMRL significantly reduced unsafe actions during training compared to PPO and other augmented methods by leveraging rule-based safety masks.
  • Continuous Control: In the robotic PickAndPlace task, AMRL reached near-optimal success rates within 200k steps, far outperforming standard SAC.
  • Robustness to Noise: AMRL maintained high performance even when "garbage" modules (random noise) were added, demonstrating the selector's ability to filter out low-quality information.

Discussion and Interpretability

A significant advantage of AMRL is its inherent interpretability. By analyzing the selector's weights, researchers can observe exactly which module influenced a specific decision. For instance, in navigation tasks, the selector clearly shifts weight from an "Unlock Skill" to a "Dynamic RL" module the moment a door is opened.

While AMRL is robust, its performance still depends on the existence of at least some useful knowledge. Future work aims to scale the selector to handle a larger number of modules and explore the integration of Large Language Models (LLMs) as sophisticated reasoning modules within the AMRL framework.

Conclusion

AMRL demonstrates that augmenting modular RL with heterogeneous knowledge sources—ranging from hard-coded rules to retrieved trajectories—leads to significant gains in efficiency, safety, and robustness. By moving beyond homogeneous policy modules, AMRL provides a more flexible and interpretable path toward general-purpose robotic agents.

Summary updated

BibTeX
@article{wolf2025heterogeneous,
  author = {Lorenz Wolf and Mirco Musolesi},
  title = {{Heterogeneous Knowledge for Augmented Modular Reinforcement Learning}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=eme87YbiND},
}
Figure