1 Introduction & Related Work
Reinforcement learning (RL) algorithms  have demonstrated success in a variety of tasks, be it traditional board games, video game control, or robotic locomotion . Most algorithms rely on directly interacting with the environment in which they should perform and switch back and forth between training a policy and using it to collect further data. In batch RL, algorithms are constrained to work with a single dataset of transitions obtained from the system, which is much closer to how practitioners can use RL in real-world control tasks due to safety concerns. However, most works still make unrealistic assumptions about how the dataset was obtained - datasets are often collected by uniform random policies, ensuring that the data reflects the entire transition dynamics of the system well. Only very recently, scientific literature has been concerned with deriving policies from datasets that have been collected under sub-optimal exploration settings, moving closer to real-world problems where large datasets have often been collected under a few operational policies already in existence. This setting is commonly referred to as offline RL [2, 3, 4, 5].
While other works in this area usually train an additional generative model to mimic the behavior policies and then impose a penalty based on some divergence measure between the trained and behavior policy in action space during training, we will in the following present a much simpler, population-based learning algorithm, which constrains the behavior directly in policy weight space. After developing our approach, we show empirically that it performs well compared to other offline RL algorithms.
2 The Industrial Benchmark
As the motivation for the general offline RL problem class is derived from realistic assumptions about real-world control problems, we also choose the benchmark environment to reflect problems often encountered in such tasks: The industrial benchmark (IB) 
has been developed to include many aspects commonly found in industrial control problems, such as high-dimensional state and action spaces which are only partially observable, heteroscedastic transition noise, delayed rewards, and multiple opposing reward components that need trade-off. While not being a simulation of a specific industrial system, the IB poses similar hardness and complexity as most of these environments do. An open source implementation is available online111https://github.com/siemens/industrialbenchmark.
The observable part of the state space is in each time step comprised of the three steerings velocity , gain , and shift , the setpoint , and the two reward components fatigue and consumption . The actions given by the policy can be interpreted as proposed changes in the three steerings, i.e., . While the steerings are updated in a deterministic fashion based on the actions, the reward components are influenced by multiple, complex, stochastic sub-dynamics, which are invisible to the agent. For a detailed mathematical description of the sub-dynamics, we refer to . As the reward components are influenced not only by the observable state at some fixed time, but also by past states, the effective state space that a policy or transition model has to consider, grows. While the actual, observable state space contains only six variables per time step, usually the 30 most recent time steps are combined to form a 180-dimensional state space on which models and policies are trained. The reward is computed as .
3 Weight Space Behavior Constraining
In the offline RL setting, we have to take into account that the method used to estimate policy performance might not be fully trustworthy. Instead, we assume that the performance estimate can only be true for policies which are by some metric close to the policies that generated the dataset, since otherwise corresponding transitions have not been seen in the data and can thus not be predicted reliably. While most offline RL methods are model-free (e.g.[2, 3, 4]), recent works have shown that using a transition model can improve performance as well as increase the stability of learning . Since model-based approaches are regarded to be more data-efficient than model-free ones , it seems straightforward that they have an advantage in the offline RL setting since it is innately data-limited. Most published offline RL methods have trained additional representations of the behavior policies that generated the data and use it during training to compare action distributions of original and trained policies in order to penalize divergences. In this work we take the novel approach of constraining the behavior of the trained policy in weight space instead. In the following, we derive our algorithm, Weight Space Behavior Constraining (WSBC), and show experimentally that it is not only much simpler, but also that it can be much more efficient to constrain the policies in this way, and that it outperforms previous algorithms across a variety of datasets.
3.1 Transition Models
We train neural models parameterized by of the transition dynamics based on the dataset containing transitions: . Due to the delayed reward effects, we employ recurrent networks (single recurrent cell with units and nonlinearity, followed by a linear layer). During training, we use the past time step states to construct the hidden state of the model and then predict the next future steps without the real states from the dataset, but instead with its own state predictions and the actions of the corresponding time steps in the dataset. This method of overshooting instead of only predicting the single next time step helps the model to predict long rollouts more accurately, since it learns to use its own prediction of the current step for future predictions as well. The models are trained via gradient descent on a maximum likelihood objective:
where , , and and extract the state prediction and the new hidden state from the output of the model . We train transition models.
3.2 Policy Search
We aim to find neural policies parameterized by , which will assign the best possible action given the current state history in a deterministic fashion: . The policies have a single hidden layer of size with nonlinearity. We estimate their performance by conducting rollouts of the policies through the trained transition model ensemble. Similarly to the model training, we use past states to build up the hidden state and then predict steps into the future. However, this time the actions are not determined by the dataset, but instead by the policy candidate based on the state predictions of the model. We obtain a conservative estimate of the return by taking the minimum over members in the ensemble in each step:
Since we do not trust our model-ensemble to predict the policy performance with a reasonable degree of accuracy for policies that deviate strongly from those that generated the data, we need to restrict the policy search to only include policies that behave similarly to the generating policies. A common approach used in this context is to augment the loss by a term that penalizes divergence from the behavior policy in the action distribution:
Instances of such algorithms are for example BRAC or BEAR [3, 4], which estimate with a Q-function and use the KL divergence or the maximum mean discrepancy as , respectively. We will however constrain the policies strictly in their weight space, by clipping weights that are further away than by some norm from the weights of the behavior policy , which is trained directly from the dataset:
The chosen model-rollout based approach of estimating policy performance has been shown to increase data efficiency and lower the variance in the trained policies
. However in long horizon rollouts, a gradient based policy search can be cumbersome: Since returns are estimated based on entire trajectories instead of individual state-action pairs (as in value functions), the credit assignment to individual actions is much harder. When the gradient is not only computed with respect to the action samples, but rather computed backwards throughout the model, we can also be faced with exploding or vanishing gradients due to the long horizon. To avoid these issues altogether, we search policies by particle swarm optimization (PSO), which doesn’t require any gradients and makes few assumptions about the optimization problem. PSO instead uses neighborhood information to systematically search for well performing regions in a potentially very large policy space. It has thus been well established as a method for learning neural policies in a model-rollout context . Each particle’s (policy’s) position at iteration
is represented by its weight vector. Every particle also has a velocity. Both are updated via:
where and are constants, and are random vectors, is the best position in which particle has been up to iteration , and is the best position that ’s neighborhood has seen up to iteration . During policy search we use particles and a ring neighborhood  of size to balance global and local search. The rollouts are conducted with and with the L1 norm to constrain policy weights.
We perform experiments on 16 datasets collected on the IB with different behavior policies to ensure broad applicability of our algorithm and compare performance with different model-free and model-based offline RL algorithms. We report tenth percentile performances in Table 1, since we cannot know a priori which policies will perform well. The datasets are collected with the same three deterministic baseline policies as : , each augmented with six different degrees of -greedy exploration . The bad and mediocre policies aim to drive the system to a fixed point in the steering space, which is characteristic for controllers in many industrial systems. The optimized policy is more complex, however still interpretable, and constitutes a realistic example of an expert-crafted policy:
4.1 Alternatives & Ablation
We briefly compare the proposed approach with a direct penalty in action space which is factored into the loss function: Similarly to MOOSE
, we train a variational autoencoderto obtain a policy model from the dataset and use it to derive a penalty based on the mean squared reconstruction error, which we use instead of the direct weight space constraining:
We scale so that in the initial PSO population . In Fig. 1 (a-c), we report return, action space penalty, and fitness of both approaches, and find that our approach produces policies with lower action space penalty and consequently better combined fitness (as by Eq. 6) and return than the direct action space constrained policy search.
Furthermore, we alter the parameter
and redo the experiments on all datasets to investigate the sensitivity of the algorithm with respect to the hyperparameter. We calculate the average rank compared to MOOSE, BCQ, BEAR, and BRAC-v[2, 3, 4, 5], and report results in Figure 1 (d).
In this paper, we presented a novel approach to offline RL: Instead of the plethora of ways in which a penalty based on the action distribution of a policy can be derived, we constrain the policy directly in its weight space. Even though our method doesn’t explicitly constrain equality in the actions output by a policy, our experiments show that it does so implicitly, and that the effect can be much stronger than explicit behavior regularization. We compare our algorithm on the IB against other state of the art offline RL algorithms and find that we can outperform most of them reliably, even though the performance naturally depends on the chosen hyperparameter , which is however a common problem all of the offline RL methods share.
-  Sutton, Richard S., and Andrew G. Barto. Reinforcement learning: An introduction. MIT press, 2018.
Fujimoto, Scott, David Meger, and Doina Precup. ”Off-policy deep reinforcement learning without exploration.” International Conference on Machine Learning. PMLR, 2019.
-  Kumar, Aviral, et al. ”Stabilizing off-policy Q-learning via bootstrapping error reduction.” NeurIPS, 2019.
-  Wu, Yifan, George Tucker, and Ofir Nachum. ”Behavior regularized offline reinforcement learning.” arXiv preprint arXiv:1911.11361 (2019).
-  Swazinna, Phillip, Steffen Udluft, and Thomas Runkler. ”Overcoming Model Bias for Robust Offline Deep Reinforcement Learning.” arXiv preprint arXiv:2008.05533 (2020).
Hein, Daniel, et al. ”Particle swarm optimization for generating interpretable fuzzy reinforcement learning policies.” Engineering Applications of Artificial Intelligence 65 (2017): 87-98.
-  Li, Yuxi. ”Deep reinforcement learning: An overview.” arXiv preprint arXiv:1701.07274 (2017).
-  Hein, Daniel, et al. ”A benchmark environment motivated by industrial control problems.” 2017 IEEE Symposium Series on Computational Intelligence (SSCI). IEEE, 2017.