Effects of Safety State Augmentation on Safe Exploration
Abstract
Safe exploration is a challenging and important problem in model-free reinforcement learning (RL).
Often the safety cost is sparse and unknown, which unavoidablyleads to constraint violations — a phenomenon ideally to be avoided in safetycritical applications.
We tackle this problem by augmenting the state-space with asafety state, which is nonnegative if and only if the constraint is satisfied.
The valueof this state also serves as a distance toward constraint violation, while its initialvalue indicates the available safety budget.
This idea allows us to derive policiesfor scheduling the safety budget during training.
We call our approach Simmer(Safe policy IMproveMEnt for RL) to reflect the careful nature of these schedules.
We apply this idea to two safe RL problems: RL with constraints imposed on anaverage cost, and RL with constraints imposed on a cost with probability one.
Ourexperiments suggest that simmering a safe algorithm can improve safety duringtraining for both settings.
We further show that Simmer can stabilize training andimprove the performance of safe RL with average constraints.
Introduction
Reinforcement learning (RL) is a framework for sequential decision-making that makes minimalprior assumptions about the environment where the agent has to act or make the decisions [42].
The policy for taking the actions is learned through interactions with the environment over time.
RL has seen recent successes in playing video games with a computer [29], board games with ahuman [38] and is on a path toward real-life applications such as video compression [43] and plasmacontrol [17].
There are still, however, some unsolved challenges for a successful deployment of
RL such as efficient learning of constrained or safe Markov Decision Processes (MDPs) [3].
Theconstraints are typically modeled by a discounted sum of nonnegative costs that have to be smallerthan some pre-defined value called the safety budget .
Exploration is a crucial component of RL and is still an active area of research [22, 37, 31].
In thecontext of safe RL, while exploring we do not want to incur the safety cost and constraint violationsmaking exploration a harder task.
We can distinguish two main research directions for minimizingconstraint violation in safe RL: a model-based approach (which includes partially and fully known environments) and a model-free approach.
In the model-free case, which we focus on, the agent would almost certainly visit unsafe regions to learn the safe policy, and therefore it is next to impossible to avoidconstraint violations completely.
The general goal, in this case, is to minimize the number of violationsduring training.
For example, [8] use a conservative safety critic and rejection sampling to choosea “safer” action, [45] design a curriculum learning approach, where the teacher resets the studentviolating safety constraints, and [18] learns to reset the policy if the safety constraint is violated [18].
In this work, we aim to improve model-free safe reinforcement learning by augmenting the state-spacewith one state encapsulating the safety information.
This safety state is initialized with the safety budget and the value of the safety state can serve as a measure of distance to the unsafe region.
Thisform of the safety state was proposed in [15] and introduced in RL [40], where a safe RL algorithmwith probability one constraints was derived.
In this paper, we take a closer look at the purposes ofthe safety state in a broader context.
First, we claim that safety state augmentation is often crucialfor the averaged constrained problem as well and provide examples of such occurrences.
In someparticular problems, the use of safety state augmentation may potentially be avoided, however, thiscan be said about any state in the environment.
Second, our main suggestion is that schedulingthe safety budget at different training epochs can improve the algorithm’s performance.
Our claimextends equally over averaged and almost surely constrained reinforcement learning problems.
Inparticular, we achieve the state of the art performance on some environments in the safety gymbenchmark.
Further, we claim that scheduling the initial safety budget can lead to reducing safetyconstraint violations during training for safe RL with probability one constraints.
We design twoalgorithms automatically tuning the safety budget, one is based on a classical control engineering PIcontroller, while the other uses Q learning to decide on the safety budget.
Related work.
Many of the current safe RL methods are extensions of the most successful RLalgorithms:
Trust region policy optimization (TRPO) [35], proximal policy optimization (PPO)
[36],soft actor-critic (SAC) [20] etc.
Safe versions of TRPO, PPO, and SAC with a Lagrangian approachwere first presented in [34], which is still considered to be one of the major baselines.
A directextension of TRPO by adding constraints to the trust region update was proposed in [1].
Model-basedapproaches were also considered cf.
[33, 13, 24, 27] and most of them took a Bayesian approachto model one-step transitions.
To our best knowledge, the most successful approaches for safereinforcement learning to date are PID-Lagrangian [41] and LAMBDA [4].
The former viewsthe Lagrangian multiplier update as another control problem and employs a PID controller to it(cf.
Specifically, the authors link the multiplier update to integral control and add proportionaland derivative controllers to achieve a superior behavior.
On the other hand, [4] is a model-basedapproach that uses Bayesian world models to enhance safety.
A recent work [26] formulatedsafe RL as inference resulting in a sample efficient off-policy approach.
Some approaches took aslightly different approach to formulate safety, e.g., [28] proposed a two-player framework withthe cooperating task agent and safety agents, [14] proposed a safety layer that would be applied afterthe action is computed using a classical policy, [21] define a probabilistic shield for safety.
We alsonote [49, 23] that consider safe deployment of RL policies in real-life settings.
Other formulations of safe reinforcement learning were considered in the literature.
For example, [11,13, 48] proposed to use conditional-value-at risk (CVaR) constraints, while [40, 9] proposed to enforceconstraints with probability one.
Further, as we discussed above eliminating the number of constraintviolations typically requires strong assumptions, e.g., finite state space [44], [47] [39], knowledgeof a partial model [25] or initial safe policy [6].
These results are in the spirit of safe RL with controltheoretic notions [12, 7, 30, 10, 2, 16, 19], which make significant prior assumptions to guaranteesafety.
Finally, we note that the closest algorithm in the literature to our method is the curriculum learning approach to Safe RL from [45].
Due to space limitations we discuss these differences in Appendix.
Simmer: Safe policy improvement for reinforcement learning2.1 MDP with safety state augmentation
We consider a constrained reinforcement learning setting defined for a Markov Decision Process(MDP)
M = ⟨S , A , P , r, γ r ⟩ with transition probability P : S ×
A × S → [0 , 1] acting on state Sand A spaces, with the reward r : S ×
A × S → R + ( R + stands for the nonnegative orthant [0 , + ∞ ) )and the discount factor γ r ∈ (0 , 1] .
The MDP is endowed with the following optimization problemmax
[Equation]
E
[Equation] t [Equation] γ tr r ( s t , a t , s t +1 ) , subject to: g (cid:32)
[Equation]
(cid:88) t
[Equation]
γ tl l ( s t , a t , s t +1 ) (cid:33) ≤ d , (1) with the time horizon T > 0 , the safety discount factor γ l ∈ (0 , 1] , the safety cost l : S × A × S → 82 R m + , and the inequality should be understood as the element-wise comparison.
The statisticg ( · ) : R m + → R m + is a design choice and there exits many different possibilities (e.g., CVaR, chanceconstraints etc [11]).
In this paper, we consider two most relevant options, from our point of view: a) aconstraint with probability one, i.e., g po ( z ) =
P ( z ≥ 0) − 1 , b) a constraint on average g av ( z ) =
E z .
Similarly to [40], we augment the safety state information into the state-space by introducing thestate z t = γ − t ( d − (cid:80) t − 1 k =
γ kl l ( s k , a k , s k +1 )) , which has the following update z t +1 =
( z t −l ( s t , a t , s t +1 ))
/γ l , with z 0 = d .
Noting that the update is Markovian this state can be easilyaugmented into the MDP.
The variable z t has the interpretation of the remaining safety budget, and bydefinition enforcing the constraint on z T is equivalent to enforcing the constraint on the accumulatedcost.
Now we can rewrite the safe RL problem as follows:
[Equation]
[Equation]
subject to
[Equation]
While [40] considered only the case g po ( z ) , we argue that the case of g av ( z ) deserves additionalattention in the context of safety state augmentation.
For completeness, we review the main points ofthe approach [40] in Appendix.
Note that the policy now also depends on the safety state z and thisfeature deserves a more thorough discussion.
2.2 Do we need the safety state?
[Figure]
As a simple demonstration consider the cartoon in Figure 1.
A robot needs to reach the goal whilecrossing the hazards region, which is marked by the red circle, and the safety cost is acquired forevery time unit spent in the region.
Both green and blue paths are safe, i.e., satisfy the constraint.
However, at the crossing of these paths robot needs to know which path it took to this state.
Switchingfrom the green path to the blue one will lead to a constraint violation.
Standard safe RL algorithmswill have trouble with such scenarios while adding the safety state solves the issue.
We confirmthis observation in our experiments.
and blue paths are safe, i.e., satisfy the constraint.
However, at the crossing of these paths robot needs to know which path it took to this state.
Switching from the green path to the blue one will lead to constraint violations.
Let us now discuss how this logic can be mathematically formalized.
This problem is well studiedin the optimal control literature in the context of problems with known dynamics and with terminalor end-point constraints.
In the deterministic case, this problem reduces to the standard maximumprinciple with end-point constraints [46].
Further, [40] showed that having the policy depending onthe remaining safety budget is crucial for safe reinforcement learning with probability one constraints.
The problem was also studied in the context of stochastic diffusions [32], where the authors derivedthe representation of the optimal value function.
In both cases, it was shown that the optimal policydepends on the whole state, which in our case includes the safety state z .
While in some cases onemay not need to augment the safety state, in many situations it is critical.
2.3 Simmering Safe Reinforcement Learning
In this paper, we propose to use the initial safety budget d as another tuning dial for the algorithms.
Specifically, we will exploit the link between the safety budget d with the initial state of the safetystate.
We argue that adjustment of d during training from some initial value d start to the target valued target can lead to improved exploration in terms of safety and performance.
Let us now present the mathematical formulation.
At every epoch k we pick a test safety budget d k ,collect the data set D k , compute the returns E D k (cid:80) T − 1 t =
γ tr r ( s t , a t ) and the costs ˆ g D k ( z T ) , wherethe function ˆ g D k ( · ) is the empirical mean or the maximum for the averaged and the probability one constrained problems, respectively.
Using this information we aim at solving the following problemat every epoch
but we only apply a pre-determined number of gradient steps):
[Equation]
where s 0 ∈ S 0 and z
=
d k are the initial states of the augmented MDP.
Note that for off-policyalgorithms the data set D k can potentially grow with epochs, while for on-policy algorithms thedata set D k will be emptied on every epoch.
The key steps of our approach are as follows:
• Let there be a finite number of test safety budgets,
i
e., we assume that d k can take the
following values { d 0 , ref , . .
, d K − 1 , ref } with d start = d 0 , ref and d target =
d K − 1 , ref ;
• We assume that the value d start = d 0 , ref is such that the task can be solved;
• At for every k we perform only one epoch of optimization solving Problem 3.
Now we can find d k to achieve our goals and as we will show in the next section the problem of safetyduring training can be formalized as a two-level decision-making problem.
However, we will showthat even a naïve approach of scheduling d k can lead to improvement in performance and safety.
2.4 Application: Simmering for safety during training
Exploration can often lead to constraint violation during training due to the inherent stochasticity ofexploration.
While there is a significant effort in research for safe exploration it typically requiressignificant prior assumptions on MDPs.
We propose to embrace the philosophy of classical reinforcement learning and proceed with minimal assumptions.
We propose to choose the test safety budgetd k using another decision-making problem:
[Equation]
where z kT ( d target ) is the violation of the target constraint obtained as a result of solving one epoch of
Problem 3, the action set is [ − δ d , δ d ] and δ d is pre-determined, clip ( x, y, z ) clips the value x to alower bound y and an upper bound z , i.e., the function returns y if x ≤ y , z if z ≤ x and x otherwise.
The intuition behind our formulation is quite straightforward.
Assume we start with a very strictsafety budget d start training with which does not lead to significant violations with respect to thetarget safety budget d target .
Then by gradually increasing the safety budget d from d start to d target ,we can reduce the number of constraint violations during training.
We see this formulation as the firststep toward eliminating safety violations during training.
We formalized our problem as reinforcement learning over a partially observable process with thenon-stationary observations of the learning process.
This two-level RL problem allows us to usea broad spectrum of tools available in sequential decision-making differing our approach from theexisting in the literature.
However, solving Problem 4 appears to be a daunting task, especially inthe online setting as we intend.
Hence, we will employ heuristic solutions, which may prove moreeffective than the quest to find an optimal solution.
Intuitively, a gradual increase in d k by assigningscheduling increasing reference values (denoted by d ref k ) would less likely lead to constraint violationdue to stricter exploration constraints.
However, fixing the schedule a priori limits the ability ofthe algorithm to react to constraint violations.
To alleviate this issue we propose two approaches: PI
Simmer (PI-controlled safety budget) and Q Simmer (Online Q-learning with non-stationary rewards).
In both cases the intuition is similar.
If the current accumulated costs are well below the safety budgetd ref k , then we are very safe and the safety budget can be further increased.
If the accumulated costsare around the safety budget, then we could stay at the same level or increase the safety budget.
Ifthe current accumulated costs are well above the safety budget d ref k , then the safety budget should bedecreased. This intuition is based on our previous empirical observations, i.e., lower safety budgetswould often cause lower initial bursts in accumulated safety costs. We hypothesize that the policy canquickly learn “extremely unsafe” actions thus providing low safety cost bursts for low safety budgets. Inputs: { d ref k } N − 1 k =0 - safety budget schedule, hyper-parameters - K p , K i , δ d .
Set d 0 = d ref0 ; for k = 0 , . . .
, N − 1 do
Perform one epoch of learning for the safe policy with d k and get the statistic ˆ g
( z T ( d k )) ;
Compute the error term
e k
=
d ref k − ˆ g ( z T ( d k )) ;
Compute action u raw k
=
K p e k
(cid:124)
(cid:123)(cid:122) (cid:125) P-Part + K
i
k
(cid:88)
i = k − T
i e i (cid:124) (cid:123)(cid:122) (cid:125) I-Part ;
Set d k +1 =
clip ( u raw k , − δ d , δ d ) + d k ; end
PI Simmer.
The idea for the PI controller is quite intuitive it takes the error term e = d ref − cand uses it for action computation.
P stands for proportional control and links the error terms withactions by multiplying the error term by the gain K .
The proportional part delivers a brute forcecontrol by having a large control magnitude for large errors, but it is not effective if the instantaneouserror values become small.
Proportional control cannot achieve zero error e tracking.
This happenssince zero error results in a zero proportional action and hence the control over the error is lost.
To deliver zero error, integral control is typically used, which sums up previous error terms anduses this sum to determine actions instead of the error.
The integral term can be seen as “actionacceleration” (or “momentum”) term which is large if the past errors are large.
This can potentiallycause unwanted behaviors (such as, oscillations) if the corresponding gain K
i is too large.
Bothgains K , K i are usually chosen by tuning.
PI controller can solve many hard control problems, butthere are some implementation and engineering tricks and improvements.
We introduce a simplifiedversion in Algorithm 1.
We provide a full version of the algorithm and rules-of-thumb for the choiceof hyper-parameters in our ablation studies in Appendix.
Q Simmer.
Consider an MDP with the states { d ref0 , . . .
, d ref K − 1 } , which for simplicity of notationwe denote { 0 , . . .
, K − 1 } , with the actions { a − 1 , a 0 , a +1 } , where the action a +1 moves the states
=
i to the state s = i + 1 , a − 1 moves the state s =
i to the state s =
i − 1 and the action a 0 doesnot transfer the state.
Note that the action a +1 is defined for all i < K − 1 and the action a − 1 isdefined for all i > 0 .
Our design for the rewards of this MDP is guided by the following intuition.
We are not safe
We are borderline safe
We are very safe
[Equation]
5) where o
= ˆ g ( z T ( d k )) is a safety violation statistic (over an epoch) of the safe RL algorithm, δ is asignificance violation threshold.
We use a Q-learning update to learn the Q function:
[Equation]
(6) where l r is the learning rate and get the action with ε -greedy exploration strategy:
[Equation]
with probability
[Equation]
random with probability
[Equation] We summarize the approach as Algorithm 2.
Experiments
3.1 Baselines, environments and code base
Environments: We use the safe pendulum environment defined in [13], we also use the custom-madesafety gym environment with deterministic constraints, which we call static point goal [48]. In
Algorithm 2:
Input: { d ref k } K − 1 k =0 - an a priori chosen state space; hyper-parameters - N , τ , l r ,
, ε ; Initialize do safe get accordingly; end [Figure] this environment with 46 states and two actions, a large hazard circle is placed before the goal andforces the agent to go around it to reach the goal similarly to our cartoon in Figure 1.
We provideadditional details in Figure 2 and Appendix.
The rest of our tests are performed on the safety gymbenchmarks [34].
Code base: Our code is based on two repositories: safety starter agents [34], and PID Lagrangian [41].
We have implemented the safety state augmentation following the description in [40]. We use defaultparameters for both code bases unless stated otherwise. Computational resources: We performed all computations on a PC equipped with 512GB of RAM,two Intel Xeon E5 CPUs, and four 16GB NVIDIA Tesla V100 GPUs. Baselines ( • ) and our algorithms ( ■ ):
• CPO, Lagrangian PPO (L-PPO) and TRPO (L-TRPO).
Standard baselines from [34].• PID-Lagrangian.
An algorithm stabilizing L-PPO learning [41].• LAMBDA.
A model-based method showing great performance on Safety Gym [4].•
PO-PPO PPO-based algorithm with probability one constraints from [40].
206 ■ PI-Simmer - Scheduling safety budget using PI controller for PO-PPO; 207 ■ Q-Simmer - Scheduling safety budget using Q learning for PO-PPO; 208 ■ L-PPO (PID-L) w SA - L-PPO (PID-L) solving Problem 2 with safety state augmentation.
209 ■ Simmer L-PPO (PID-L) - L-PPO (PID-L) w SA and safety budget scheduling.
[Table]
3.2 Improving Safety During Training for Pendulum Swing-Up
Improving safety during training is more suited for almost surely safe RL and we will take PO PPO asour baseline.
In this setting, we can aim to reduce the number of individual trajectories that violate theconstraints, and thus we can avoid estimating the statistic g .
For PI Simmer we chose the followinghyper-parameters K = 0 .
01 , K i = 0 .
005 , K
aw = 0 .
01 and τ = 0 .
The parameter K aw resetsthe integral term avoiding the accumulation of error - the higher the value the more aggressive is reset.
The parameter τ is the Polyak update for the error term, which pre-processes the error term for the PIcontroller.
We discuss these parameters in detail in Appendix.
We also note that except for an initialburst of violations both our approaches manage to keep the number of violations quite low.
Overall wefound that low values for K and K i are beneficial to avoid overreaction to constraint violations.
In thiscase, keeping the value of K aw low is advisable as the action saturation does not occur too often.
Finally, keeping τ close to one will force the controller to react to most of the constraint violations.
For Q Simmer we chose δ = 1 , τ = 0 .
995 , l r = 0 .
05 , and ε = 0 .
It appears that a fast learning rate herecan allow for learning, sufficiently fast forgetting of past rewards, but also to avoid catastrophic forgetting.
As we consider a finite state MDP we can avoid using sophisticated techniques for online learningand use the simplest one — tuning learning rate.
We chose δ and τ to avoid frequent state transitions.
[Figure]
We compare our algorithm to PO PPO in terms of the number of trajectories with constraint violations,and returns, and compare the progression of the schedule d test k .
Naturally, some individual trajectoriesstill violate the constraint, but the number can be significantly reduced using Simmer RL as Figure 3suggests.
While PI Simmer outperforms Q Simmer in these runs, it is worth mentioning that PI
Simmer uses more prior information than Q Simmer.
Indeed, while composing a schedule is not hard,we still have to identify the switch points, which are learned by Q Simmer.
We perform ablationstudies on the parameters and discuss their choice in more detail in Appendix.
3.3 Guiding Exploration by Scheduling Safety Constraints
[Figure]
We now turn our attention to safe RL with constraints imposed on average costs.
We test theperformance of Simmer L-PPO and L-PPO w SA on the swing-up pendulum environment and presenttraining results in Figure 4.
Here we use safety starter agents as a base learner for all algorithms.
Themajor observations are that L-PPO w SA delivers almost no constraint violations with respect tothe mean cost estimate, and therefore using Q Simmer and PI Simmer becomes redundant.
In themeantime, L-PPO has even trouble to converge.
Note that we have used the same hyper-parametersfor all algorithms , which are default parameters in safety starter agents and the learning rate 0 .
While the behavior of the L-PPO algorithm can certainly be improved with tuning, we note thatsimply augmenting the safety state leads to improved performance as well as stability of the algorithm.
Further, we observe that Simmer L-PPO leads to a fewer number of violations, however, the rate ofviolations for the safety budget of 35 is fairly similar to L-PPO w SA.
Interestingly, a similar picture occurs with more advanced baselines such as PID Lagrangian [41] andmore complicated environments.
Here, we used the static point goal environment designed in [48],where a large static hazard region is placed in front of the goal, which is similar to our motivational
[Figure] example in Figure 1.
The results for PID-L and PID-L with state augmentation are depicted in Figures 5a and 5b, respectively, suggest that the presence of the safety state stabilizes training and leadsto a more consistent constraint satisfaction for different safety budgets d .
Note that hyper-parametersfor all the runs are the same for both algorithms.
We further apply the naïve simmer approach to bothbaselines with results depicted in Figure 5c.
In both cases, the safety budget takes values 1 , 5 , 10 ,
[Figure]
and
[Figure]
and increased after equal time intervals. Note that in both cases now training curves arequite stable, although state augmentation delivers an extra boost. In all our experiments we used thesame hyper-parameters for all versions of PID-L, i.e., K = 0 .
1 , K i = 0 .
01 , γ l = 0 . 99 .
Overall, our experiments suggest that safety during training with constraints imposed on averagecosts becomes a much easier problem with safety state augmentation.
Indeed, even intuitively everyoutlier trajectory with a large constraint violation should bias the average cost and should instructthe algorithm not to follow this path.
We note that in both cases above we have sparse costs, i.e.,the agent encounters unsafe regions and incurs costs while navigating toward the goal.
While analgorithm without the safety state will receive information on constraint violation after an episode,the safety state would constantly inform the algorithm of the distance toward a violation.
This isone of the reasons why safety state augmentation can learn the task better.
Note that simmeringadditionally offers fewer constraint violations while training.
These results suggest that simmeringsafe RL together with state augmentation delivers overall safer solutions with stable training curves.
3.4 Tests on safety gym benchmarks
We finally test our approach on more challenging environments from the safety gym benchmark:
PointPush1, PointGoal1 and PointButton1 in Figures 6a, 6b, 6c respectively, and CarPush1, CarGoal
CarButton1 in Figures 7a, 7b,7c, respectively.
The hyper-parameters and the tuning specifics can befound in Appendix.
Again we use a naïve schedule increasing the safety budget from 10 to 25 in 5unit increments.
We observe that Simmer PID-L and PID-L outperform other baselines significantlyin terms of the return while delivering safe policies.
Simmer PID-L does perform very similarly to
PID-L in terms of returns but generally outperforms PID-L in terms of safety costs and cost rates.
Wenote that our results for PointGoal1 are consistent with the results from [41].
Conclusion
We augment the safety information into the state space and show how we can effectively use it toimprove safe exploration.
The safety state is nonnegative if and only if the constraint is satisfied and
[Figure]
L
[Figure]
PPO L-TRPO
CPO Lambda
Simmer PID-L
Safety budget
PID
[Figure]
L
[Figure]
L-PPO L-TRPO CPO Lambda Simmer PID-L
Safety budget
PID
[Figure]
L
[Figure]
L
[Figure]
Lambda
Simmer PID
[Figure]
Safety
[Figure]
therefore it can serve as a distance toward constraint violations. We argue that the optimal policymust depend on this information to achieve safe performance.
We validate this argument usingintuitive examples, references to theoretical results, and experiments. We do not doubt that safetystate augmentation is needed for effective safe RL. Safety state augmentation and simmering show superior performance on pendulum swing-up andstatic point goal tasks for average constrained problems.
We further tuned PID Lagrangian toshow very strong performance on safety gym benchmarks, which has not been previously reported.
Simmer PID Lagrangian shows competitive performance in terms of returns to PID Lagrangian andoutperforms all baselines (including PID Lagrangian) in terms of the cost rate and the costs.
Further,using state augmentation for the average constrained problems appears to be quite beneficial as well.
Scheduling the safety budget can stabilize safe algorithms without state augmentation, but using bothstate augmentation and simmering improves performance and safety.
We achieve this performanceand safety boost at the expense of sample efficiency since we effectively learn a series of safe policies.
Simmering RL algorithms with probability one constraints can significantly reduce safety violationsduring training.
We illustrate this feature by developing two algorithms for safe learning.
Thefirst one is based on a PI controller and allows for adjustment of a pre-defined learning scheduledepending on the estimated training cost.
The second one is based on online Q learning and learnsto adjust the safety budget automatically.
Both approaches have some advantages and limitations.
PI simmering is more effective if there is a reasonable safety budget schedule, while Q simmeringrequires less prior knowledge to learn.
Our algorithmic development focused on probability one constraints for two reasons.
First, sinceprobability one constraints have to be imposed on all trajectories we can simply count the numberof violations and do need to resort to empirical estimates of the mean cost (as we need in the [Figure] Returns [Figure]
Safety [Figure] [Figure] [Figure]
[Figure]
[Figure]
[Figure]
Cost Rates (
[Figure]
CarPush
Simmer PID-L
Safety budget
PID-L
[Figure]
L
[Figure]
PPO L
[Figure]
TRPO
CPO Lambda
Simmer PID-L
Safety budget
PID-L
[Figure]
average constrained problem).
Second, it appears that in the average constrained case with “simple”environments (such as pendulum swing-up and static point goal), we can track the constraint quiteefficiently after the initial (and unavoidable) burst in constraint violations.
Thus our experimentssuggest that PI Simmer and Q Simmer are simply redundant for the average constrained RL.
Augmenting the safety state and scheduling the safety budget does not solve all the problems insafe exploration.
First, an initial burst of constraint violations is an inevitable reality of using ourmodel-free approach.
It appears that lowering the initial safety budget lowers the initial burst ofconstraint violations, but does not completely solve the problem.
We do not see how to address thislimitation without making further assumptions about the environment.
Second, it is noticeable that theperformance on the PointPush1 environment is quite noisy for both PID-L and Simmer PID-L. Thisis because some seeds achieve very good performance (return of 15) and some seeds do not (return of5), while the learning curves appear to be stable.
This suggests that the learning procedure is at alocal maximum.
In our point of view, this calls for a more sophisticated algorithm for explorationseeking maximal return.
This may help achieve stable performance in this environment.
Beyondthese limitations, one can also list safety violations caused by variance and disturbances, lack ofprovable safety guarantees, etc.
Studying these limitations is outside of the scope of this paper.
We have tested PI-Simmer and Q-Simmer on a rather simple in terms of the state and action spaces environment.
We foresee that in a more complex setting the main problemwould be learning the agent’s behavior, but our algorithmic development would remain valid.
Nevertheless, it would be interesting to extend this approach to a more complex setting.
Checklist
For all authors...
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s
contributions and scope?
[Yes]
(b) Did you describe the limitations of your work?
[Yes]
(c) Did you discuss any potential negative societal impacts of your work?
[N/A]
(d) Have you read the ethics review guidelines and ensured that your paper conforms to
them?
[Yes]
If you are including theoretical results...
(a) Did you state the full set of assumptions of all theoretical results?
[N/A]
(b) Did you include complete proofs of all theoretical results?
[N/A]
If you ran experiments...
(a) Did you include the code, data, and instructions needed to reproduce the main experi-
mental results (either in the supplemental material or as a URL)?
[Yes]
(b) Did you specify all the training details (e.g., data splits, hyperparameters,
how they
were chosen)?
[Yes]
(c) Did you report error bars (e
g., with respect to the random seed after running experiments multiple times)?
[Yes] We reported the error bars over all the runs across
different seeds
(d) Did you include the total amount of compute and the type of resources used (e g., typeof GPUs, internal cluster, or cloud provider)?
[Yes] We use a PC equipped with 512GB of RAM, two Intel Xeon E5 CPUs, and four 16GB NVIDIA Tesla V100 GPUs
If you are using existing assets (e g., code, data, models) or curating/releasing new assets...
(a) If your work uses existing assets, did you cite the creators?
[Yes] We use the code from
safety starter agents, safety gym by open AI [34], PID Lagrangian method [41].
(b) Did you mention the license of the assets?
[No] All the libraries are under MIT Licence.
(c) Did you include any new assets either in the supplemental material or as a URL?
[No]
(d) Did you discuss whether and how consent was obtained from people whose data you’re
using/curating?
[N/A]
(e) Did you discuss whether the data you are using/curating contains personally identifiable
information or offensive content?
[N/A]
If you used crowdsourcing or conducted research with human subjects...
(a) Did you include the full text of instructions given to participants and screenshots, if
applicable?
[N/A]
(b) Did you describe any potential participant risks, with links to Institutional Review
Board (IRB) approvals, if applicable?
[N/A]
(c) Did you include the estimated hourly wage paid to participants and the total amount
spent on participant compensation?
[N/A]