Scenario-assisted Deep Reinforcement Learning

Raz Yerushalmi, Guy Amir, Achiya Elyasaf, David Harel, Guy Katz, Assaf Marron

Abstract

Deep Reinforcement Learning (DRL) has demonstrated remarkable success in complex decision-making tasks, yet its "black box" nature makes it difficult to guarantee adherence to safety, ethics, or engineering constraints. This paper proposes Scenario-Assisted DRL, a hybrid approach that integrates Scenario-Based Modeling (SBM) into the DRL training loop. By utilizing a rule-based specification layer to monitor and penalize prohibited actions, we can train agents that are more transparent and compliant without sacrificing long-term performance. We demonstrate this approach on a network congestion control task, significantly reducing rule violations while maintaining performance parity, albeit at the cost of increased training time.

Introduction

Deep Reinforcement Learning is widely used for autonomous systems, yet its lack of transparency poses challenges for safety-critical applications. Traditional methods for enforcing rules involve "reward engineering"—manually crafting complex reward functions to discourage unwanted behaviors. This process is often brittle, difficult to tune, and requires complete retraining if requirements change. There is a significant gap between the flexibility of DRL and the rigorous, rule-based specifications used in classical software engineering.

Methodology: Scenario-Assisted DRL

The core innovation of this work is the integration of a rule-based specification layer directly into the standard DRL training cycle. This is achieved through Scenario-Based Modeling (SBM).

Scenario-Based Modeling (SBM)

SBM is a formalism where multiple "scenario objects" run in parallel to describe desired or forbidden behaviors. A key feature of SBM is its ability to block specific events. For example, a scenario can be written to prevent an agent from repeatedly increasing a resource request if it has already done so multiple times.

The Modified Training Loop

In the proposed architecture, the SBM model acts as a supervisor. When the DRL agent selects an action, the SBM model evaluates the current state to determine if that action is "blocked" according to the specified rules.

The Scenario-Assisted DRL training loop integrates an SBM layer to modify rewards based on behavioral constraints.

If the agent attempts a forbidden action, the environment overrides the standard reward with a penalty. This penalty signals to the agent that the specific behavior is undesirable in the current context, effectively "teaching" the agent to respect the constraint while it learns to optimize its primary objective.

Case Study: Internet Congestion Control

To evaluate the effectiveness of Scenario-Assisted DRL, the researchers applied it to Aurora, a DRL-based algorithm for internet congestion control. The goal was to enforce a "fairness" constraint: preventing the agent from becoming a "bandwidth hog" by excessively increasing its sending rate.

They compared two agents:

  1. $A_O$ (Original Agent): Trained using the standard Aurora framework.
  2. $A_E$ (SBM-Enhanced Agent): Trained with an additional SBM layer enforcing the fairness rule.

Key Results

The integration of SBM led to a dramatic improvement in rule compliance. While the original agent ($A_O$) violated the fairness constraint in approximately 9%–11% of its actions, the SBM-enhanced agent ($A_E$) reduced violations to just 0.34%.

Performance and the "Convergence Tax"

Crucially, the $A_E$ agent eventually reached the same level of cumulative reward as the original agent, indicating that it successfully learned to optimize network throughput while respecting the fairness rules. However, this compliance comes with a significant increase in training complexity.

Comparison of training rewards over time for the original agent ($A_O$) and the SBM-enhanced agent ($A_E$).

As shown in the training curves, the original agent ($A_O$) converges relatively quickly (around 3,000 epochs). In contrast, the SBM-enhanced agent ($A_E$) requires significantly more exploration to find an optimal policy that also satisfies the constraints, converging after approximately 40,000 epochs. This "convergence tax" represents the added difficulty of learning within a restricted behavioral envelope.

Conclusion and Future Work

Scenario-Assisted DRL provides a promising path toward more transparent and reliable autonomous systems. By separating behavioral constraints into a modular SBM layer, engineers can specify rules in an intuitive, human-readable format that is easier to audit and modify than neural network weights.

While effective, the current model has limitations: the SBM layer does not yet "see" the full environment state, and the reward interface is limited to simple penalties. Future work will focus on expanding the SBM layer's state awareness and exploring more nuanced feedback mechanisms to further improve the scalability and efficiency of this hybrid training approach.

Summary updated

BibTeX
@inproceedings{yerushalmi2022scenario,
  author = {Raz Yerushalmi and Guy Amir and Achiya Elyasaf and David Harel and Guy Katz and Assaf Marron},
  title = {{Scenario-assisted Deep Reinforcement Learning}},
  booktitle = {MODELSWARD},
  year = {2022},
  url = {https://openreview.net/forum?id=OqYhclHOyE},
}
Figure