Robust Deep Reinforcement Learning against ADVERSARIAL BEHAVIOR MANIPULATION

## Abstract

Abstract This study considers the attack on reinforcement learning agents where the adversary aims to control the victim’s behavior as specified by the adversary by adding adversarial modifications to the victim’s state observation. While some attack methods reported success in manipulating the victim agent’s behavior, these methods often rely on environment-specific heuristics. In addition, all existing attack methods require white-box access to the victim’s policy. In this study, we propose a novel method for manipulating the victim agent in the black-box (i.e., the adversary is allowed to observe the victim’s state and action only) and no-box (i.e., the adversary is allowed to observe the victim’s state only) setting without requiring environment-specific heuristics. Our attack method is formulated as a bi-level optimization problem that is reduced to a distribution matching problem and can be solved by an existing imitation learning algorithm in the black-box and no-box settings. Empirical evaluations on several reinforcement learning benchmarks show that our proposed method has superior attack performance to baselines.

## 1 Introduction

Deep reinforcement learning (DRL) has been studied for applications in various fields[, , ]. Recently, there’s growing interest in applying DRL to mission-critical tasks [, , , ]. However, it is becoming widely known that well-trained DRL agents are vulnerable to adversarial attacks. Adversarial attacks on trained DRL agents thus have been researched to develop more robust agents. Most existing adversarial attacks define the adversary’s goal as degrading the performance of the victim agent, specifically minimizing the cumulative rewards obtained by the victim agent. These works have widely proposed methods to find the optimal adversary and train the agent as robust against such adversaries[, , , , ]. However, in real-world attacks, the adversary’s goal can be manipulating the victim’s behavior. For example, in attacks on autonomous vehicle agents, the adversary might aim to cause traffic jams by making the vehicle follow a specific route.

Several adversarial attacks aimed at manipulating the behavior of the victim have been proposed[, ], but they have two major limitations.
First, existing attack methodologies are designed using environment-specific heuristics. This indicates that these attack methods cannot deal with situations where detailed knowledge of the environment is not available. Second, existing attack methodologies require full information about the victim’s policy (e.g., network parameters and architecture), called the white-box setting. If the adversary can only observe state-action pairs or states resulting from the interaction between the victim’s policy and the environment, this is called the black-box or no-box setting, respectively. Existing adversarial attacks against RL agents have mostly assumed the white-box scenario. To the best of the authors’ knowledge, no behavior-targeted attack that works in the black-box or no-box setting has been investigated before.

The objective of this study is to propose a novel attack method against the RL agent that aims to manipulate the behavior of the victim agent in the black-box/no-box setting without requiring environment-specific heuristics. In the following, we refer to such an attack that aims to manipulate the behavior of the victim as a behavior-targeted attack.

**Table 1: Summary of adversarial attacks on RL agents and its access models to victim’s policy**
|  | white-box | black-box | no-box |
| --- | --- | --- | --- |
| Untargeted | [], [], [], [] | [], [] |  |
| Targeted | [], [], [], [] [], [] | SAIA in ILfD (ours) | SAIA in ILfO (ours) |

#### Related Works

Prior works have studied adversarial attacks against deep reinforcement learning (DRL) agents under two objectives, untargeted attack and targeted attack. Table 1 summarizes the existing studies with respect to the adversary’s goal and the access model to the victim agent’s policy. The discussion here focuses on adversarial attacks on RL agents in the black-box and no-box settings only. Detailed discussion on related work involving the white-box setting is shown in Appendix C.

In the untargeted attack, the adversary’s objective is to minimize the cumulative rewards earned by the victim. Several works proposed untargeted attack methods in the black-box setting. Zhao et al.[] explored the transferability of the existing white-box attack into black-box. They used seq2seq models to predict a sequence of future actions that the victim agent will perform and leveraged the sequence to adapt existing white-box attacks into black-box attacks. However, they argued that the attack performance was no different from attacks using random Gaussian noise, indicating the low transferability of white-box attacks. Zhang et al.[, ] proposed an attack method along with its optimality. They introduced the state-adversarial Markov Decision Process (SA-MDP), which enables the adversary to determine the optimal intervention to the victim’s state observation.

#### Contributions

In this study, we propose State-Adversarial Imitation Attack (SAIA), which manipulates the victim’s behavior by intervention to the state observations of the reinforcement learning agent in the black-box and no-box setting. Our idea consists of two parts: (1) inverse reinforcement learning to find the cost function using the behavior specified by the adversary, and (2) reinforcement learning to design an appropriate intervention to the victim’s state observation where the cost function designed in the first part is maximized. Our contribution can be summarized as:

- •
We propose SAIA, which is the first behavior-targeted attack in the black-box and no-box setting.
- •
We formulate the adversary’s objective as a bi-level optimization problem using inverse reinforcement learning and prove that the attack can be attained by solving a distribution matching problem without relying on environment-specific heuristics.
- •
We empirically evaluate SAIA with multiple benchmarks, showing that it outperforms the baselines in terms of attack performance.

## 2 Preliminaries

In the proposed method, the adversary achieves the attack by intervening in the victim’s state observation. To find the optimal intervention following the attack objective, we use state-adversary MDP[], which was originally designed for reward minimization attacks on DRL agents. Furthermore, in the proposed method, the adversary leverages imitation learning from a demonstration (i.e., sequence of state-action pairs), which is generated by a policy that the victim is forced to follow. We introduce the two techniques as building blocks for our method in this section.

#### Notation

We denote Markov decision process (MDP) as $(\mathcal{S},\mathcal{A},R,p,\gamma)$, where $\mathcal{S}$ is the state space, $\mathcal{A}$ is the action space, $R:\mathcal{S}\times\mathcal{A}\times\mathcal{S}\rightarrow\mathbb{R}$ is the reward function, and $\gamma\in(0,1)$ is the discount factor. We define $\mathcal{P}(\mathcal{X})$ as the set of all possible probability measures on $\mathcal{X}$, and $p:\mathcal{S}\times\mathcal{A}\rightarrow\mathcal{P}(\mathcal{S})$ is the transition probability. We denote a stationary policy as $\pi:\mathcal{S}\rightarrow\mathcal{P}(\mathcal{A})$ and a set of all stationary stochastic policies that take actions in $\mathcal{A}$ given states in $\mathcal{S}$ as $\Pi$. Also, we write $p_{0}$ for an initial state distribution and $\bar{\mathbb{R}}$ for extended real numbers $\mathbb{R}\cup\{\infty\}$.

#### State-Adversarial Markov Decision Process (SA-MDP)

Suppose a victim agent interacts with an environment and takes actions following policy $\pi$ in an MDP. Also, we suppose an adversary can intervene in the state observation of the victim agent.
[] introduced SA-MDP to deal with the situation where the adversary can arbitrarily modify the state observation of the victim agent.
Specifically, the adversary’s intervention is defined by an adversarial policy $\nu:\mathcal{S}\rightarrow\mathcal{P}(\mathcal{S})$.
Here, the adversarial policy can alter the state observed by the victim while keeping the true state in the environment unchanged. Let $\hat{s}_{t}\sim\nu(\cdot|s_{t})$ be the altered victim’s observation determined by the adversarial policy at time step $t$. The victim chooses the next action by $a_{t}\sim\pi(\cdot|\hat{s}_{t})$ while the next state is determined by the transition probability with the true state as $s_{t+1}\sim p(\cdot|s_{t},a_{t})$.

An SA-MDP can be defined as $(\mathcal{S},\mathcal{A},R,\mathcal{B},p,\gamma)$ where $\mathcal{B}$ is a mapping from a state $s\in\mathcal{S}$ to a set of states $\mathcal{B}(s)\subseteq\mathcal{S}$. $\mathcal{B}$ indicates the maximal impact the adversary can exert on the state.
Formally, $\nu(\cdot|s)\in\mathcal{B}(s)$ holds for all $s\in\mathcal{S}$ and $\mathcal{B}(s)$ is typically a set of task-specific "neighboring" states of $s$. For example, $\mathcal{B}(s)=\left\{\hat{s}\in\mathcal{S}\mid\|\hat{s}-s\|\leq\epsilon\right\}$ for some $\epsilon>0$).

Zhang et al. proved that the adversary can find the optimal adversarial policy that minimizes the cumulative reward obtained by the victim agent by solving the following MDP:

###### Lemma 1 (Lemma 1 of [ 9 ] ) .

Given an SA-MDP $M=(\mathcal{S},\mathcal{A},R,\mathcal{B},p,\gamma)$ and a fixed and stationary policy $\pi(\cdot|\cdot)$, there exists an MDP $\hat{M}=(\mathcal{S},\hat{\mathcal{A}},\hat{R},\hat{p},\gamma)$ such that the optimal policy of $\hat{M}$ is the optimal adversary $\nu$ for SA-MDP given the fixed $\pi$, where $\hat{\mathcal{A}}=\mathcal{S}$, and

$$ $\hat{R}(s,\hat{a},s^{\prime})\triangleq\mathbb{E}[\hat{r}|s,\hat{a},s^{\prime} ]=\begin{cases}-\frac{\sum_{a\in\mathcal{A}}\pi(a|\hat{a})p(s^{\prime}|s,a)R(s ,a,s^{\prime})}{\sum_{a\in\mathcal{A}}\pi(a|\hat{a})p(s^{\prime}|s,a)}&\text{ for }s,s^{\prime}\in\mathcal{S}\text{ and }\hat{a}\in\mathcal{B}(s)\subset\hat {\mathcal{A}}\\ C&\text{for }s,s^{\prime}\in\mathcal{S}\text{ and }\hat{a}\not\in\mathcal{B}(s )\end{cases}$ (1) $$

where $C$ is a large negative constant, and

$$ $\hat{p}(s^{\prime}|s,\hat{a})=\sum_{a\in\mathcal{A}}\pi(a|\hat{a})p(s^{\prime} |s,a)\quad\text{for }s,s^{\prime}\in\mathcal{S}\text{ and }\hat{a}\in\hat{ \mathcal{A}}.$ (2) $$

The reward function in $\hat{M}$ is designed to ensure that the victim does not perform actions outside of set $B(s)$ by penalizing actions falling outside of this range with a large negative reward $C$.
The important property of this lemma is two-fold.
First, the optimality of the adversary policy can be defined with this lemma, which gives a clear perspective for the “optimal” attack.
Second, this lemma allows the adversary to find the optimal policy without requiring white-box access to the victim’s policy. Reward $\hat{R}$ given by Eq. (1) contains the victim’s policy $\pi$ in its definition, so it appears to require white box access to the victim’s policy. However, since $\hat{R}$ is defined by the conditional expectation of the adversary’s reward, providing $\hat{r}=-R(s,a,s^{\prime})$ as a reward when $\hat{a}\in\mathcal{B}(s)$ is equivalent to providing $\hat{r}=\hat{R}(s,a,s^{\prime})$ as a reward in practice []. For this reason, the optimization of the adversarial policy can be attained without access to the victim’s policy.

###### Lemma 1 (Lemma 1 of [ 9 ] ) .

#### Imitation Learning from Demonstration (ILfD)

Imitation learning aims to learn a policy that mimics an expert policy from a demonstration without accessing the environmental rewards. Let $\pi_{E}$ be the expert policy and $\tau_{E}$ be a demonstration collected from $\pi_{E}$. In ILfD, $\tau_{E}$ is given as a set of state-action pairs of length $T$, $\tau_{E}=\left\{(s_{0},a_{0}),(s_{1},a_{1}),\dots,(s_{T},a_{T})\right\}$, which is generated by sampling states and actions through interactions between the expert policy $\pi_{E}$ and the environment.

Imitation learning can be solved in a two-step approach by Inverse Reinforcement Learning (IRL), which estimates a reward function from a demonstration. In the first step, we derive a reward function using inverse reinforcement learning by Eq. (3). In the second step, we apply reinforcement learning to find a policy that maximizes the reward obtained by Eq. (3), where the resulting policy is expected to imitate the expert policy. IRL and RL procedure in ILfD can be formulated as []:

$$ $\text{IRL}_{\psi}(\pi_{E})=\mathop{\rm arg~{}max}\limits_{c\in\mathbb{R}^{ \mathcal{S}\times\mathcal{A}}}-\psi(c)+\left(\min_{\pi\in\Pi}\mathbb{E}_{\pi}[ c(s,a)]\right)-\mathbb{E}_{\pi_{E}}[c(s,a)],$ (3) $$

$$ $\text{RL}(c)=\mathop{\rm arg~{}min}\limits_{\pi\in\Pi}\mathbb{E}_{\pi}[c(s,a)],$ (4) $$

where $c:\mathcal{S}\times\mathcal{A}\rightarrow\mathbb{R}$ is a cost function, $\psi:\mathbb{R}^{\mathcal{S}\times\mathcal{A}}\rightarrow\bar{\mathbb{R}}$ is a convex cost function regularization, and $\mathbb{E}_{\pi}[c(s,a)]\triangleq\mathbb{E}\left[\sum_{t=0}^{\infty}\gamma^{t
}c(s_{t},a_{t})\mid s_{0}\sim p_{0},a_{t}\sim\pi(\cdot|s_{t}),s_{t+1}\sim p(
\cdot|s_{t},a_{t})\right]$ is the expected cumulative cost.
$\mathbb{E}_{\pi_{E}}[c(s,a)]$ is not computed from the interactions between $\pi_{E}$ and the environment but from the state-action pairs sampled from $\tau_{E}$ in practical optimization.

Eq.(3) contains solving RL in its inner loop, which can be computationally expensive. To avoid this, Ho et al. proved that this bi-level optimization could be reduced to the distribution matching problem, which does not contain inner-loop RL:

$$ $\text{RL}\circ\text{IRL}_{\psi}(\pi_{E})=\mathop{\rm arg~{}min}\limits_{\pi\in \Pi}\psi^{*}(\rho_{\pi}-\rho_{\pi_{E}}).$ (5) $$

Here, $\rho_{\pi}:\mathcal{S}\times\mathcal{A}\rightarrow\mathbb{R}$ is the occupancy measure for policy $\pi$. $\rho_{\pi}$ represents the distribution of state-action pairs encountered by an agent following policy $\pi$. $\psi^{*}$ is the convex conjugate of $\psi$.
Eq.(5) indicates that imitation learning via IRL can be realized by finding a policy $\pi$ that minimizes the gap of the occupancy measures of $\pi$ and $\pi_{E}$ measured by $\psi^{*}$. The selection of $\psi^{*}$ has been investigated extensively to improve the performance of imitation learning. For example. [] employed JS divergence for its measure.

This distribution matching problem Eq.(5) has been resolved by various algorithm[, , , ]. The most basic optimization algorithm has been introduced by GAIL[]. Let $D:\mathcal{S}\times\mathcal{A}\rightarrow[0,1]$ be a discriminator that tries to distinguish whether a state-action pair is taken from the expert demonstration. Then, the distribution matching problem of Eq.5 is transformed into the following GAN-style min-max problem:

$$ $\min_{\pi}\max_{D}\mathbb{E}_{\pi}[\log(D(s,a))]+\mathbb{E}_{\pi_{E}}[\log(1-D (s,a)]$ (6) $$

In this formulation, the generator is given by $\pi$, which learns to choose actions such that the discriminator makes incorrect identifications. Training is performed alternately for the generator $\pi$ and the discriminator $D$.

#### Imitation Learning from Observation (ILfO)

ILfO is a problem setting for imitation learning where it relies solely on state transitions and $\tau_{E}$ contains state transition only: $\tau_{E}=\left\{s_{0},s_{1},\dots,s_{T}\right\}$. IRL in the ILfO setting can be formulated similarly to ILfD[]:

$$ $\text{IRLfO}_{\psi}(\pi_{E})=\mathop{\rm arg~{}max}\limits_{c\in\mathbb{R}^{ \mathcal{S}\times\mathcal{S}}}-\psi(c)+\left(\min_{\pi\in\Pi}\mathbb{E}_{\pi}[ c(s,s^{\prime})]\right)-\mathbb{E}_{\pi_{E}}[c(s,s^{\prime})]$ (7) $$

The difference from the ILfD setting is that the cost is assigned for a pair of states, $c:\mathcal{S}\times\mathcal{S}\rightarrow\mathbb{R}$, not for a state action pair.
It is proven that RL and IRLfO can be composited in a similar style to Eq.(5)[]. Due to the absence of information about actions, the performance of imitation learning in the ILfO setting is empirically known to be more challenging than the ILfD setting.

## 3 Problem Setting

In this section, we define the threat model and formulate the adversary’s objective.
In Section 3.1, we define the threat model for the behavior-targeted attack through the ILfD setting and ILfO setting.
In Section 3.2, we formulate the adversary’s objective in the behavior-targeted attack.

### 3.1 Threat Model

We outline the threat models for the behavior-targeted attack in the ILfD and ILfO settings. The attack scenario basically follows SA-MDP.
The victim agent acts in SA-MDP $M=(\mathcal{S},\mathcal{A},R,\mathcal{B},p,\gamma)$ according to a fixed victim’s policy $\pi$. The adversary trains adversarial policy $\nu$ to affect the victim agent’s state observation.

Access to Environment:
We suppose the adversary is capable of interacting with the environment. Also, it receives states $s^{\prime}\sim p(\cdot|s,a)$ at each time, which is determined by the actions selected by the victim agent and the transition probability.

Access to Victim’s Policy:
The access models to the victim’s policy are categorized into three settings: white-box, black-box, and no-box. In the white-box setting, the adversary has comprehensive access to the victim’s policy, which includes knowledge of action distributions $\pi(a|s)$ and neural network parameters. Most existing works[, , , , , , , , , ] employ the white-box setting.

In the black-box setting, the adversary’s access is limited only to observing the actions selected by the victim’s policy, $a\sim\pi(\cdot|s)$. To the best of the authors’ knowledge, only [] and [] employs the black-box setting. Our attack in the ILfD setting follows the black-box scenario.

In the no-box setting, the adversary can obtain no information about the victim’s policy, including the actions selected by the victim. What the adversary can observe is the states from the environment only. No study has considered the no-box setting before, and our attack in the ILfO setting follows the no-box scenario.

Intervention Ability on State Observations:
We suppose that the adversary can change the victim’s state observation from the true state $s$ to $\hat{s}\in\mathcal{B}(s)$. This is commonly assumed in most adversarial attacks on RL[, , ]

### 3.2 Problem Formulation

In this subsection, we consider the behavior-targeted attack following the framework of SA-MDP. In Appendix F, we formalize two other types of attacks discussed in prior works to clearly differentiate them from behavior-targeted attacks.

Let $s\in\mathcal{S}$ be the true state. In SA-MDP, the victim’s state observation is affected by the adversarial policy as $\hat{s}\sim\nu(\cdot|s)$. Then, the victim agent selects its action by $a\sim\pi(\cdot|\hat{s})$. Thus, the victim’s resulting behavior policy under the adversary’s influence is represented by the following composite:

$$ ${\pi\circ\nu}(a|s)=\sum_{\hat{s}\in\mathcal{S}}\nu(\hat{s}|s)\pi(a|\hat{s}).$ (8) $$

We refer to ${\pi\circ\nu}$ as behavior policy and formulate the adversary’s objective by using it. Unlike the untargeted (i.e., reward minimization) attack[], the targeted attack aims at controlling the behavior of the agent. More precisely, the objective of the behavior-targeted attack is to enforce the victim’s policy to mimic a target policy $\pi_{\text{tgt}}$ specified by the adversary. Let $d$ be an arbitrary distance function over probability distributions. Then, given a target policy, the optimal adversarial policy is obtained by solving the following objective for $\forall s\in\mathcal{S}$:

$$ $\min_{\nu\in\mathcal{N}}d({\pi\circ\nu}(\cdot|s),\pi_{\text{tgt}}(\cdot|s)).$ (9) $$

We consider the scenario in which the adversary does not specify the target policy itself but only the demonstration generated by the target policy. In the black box setting, where the adversary has access to information about the victim agent’s actions, the demonstration consists of state-action pairs, which correspond to the ILfD setting. In the no-box setting, where the adversary can only observe state transitions, the demonstration consists of state transitions only, which correspond to the ILfO setting.

## 4 Proposed Method

In this section, we propose methods for the behavior-targeted attack in the ILfD and ILfO settings. When the adversary’s goal is to minimize the cumulative rewards obtained by the victim agent, it is attained by learning the optimal adversarial policy $\nu$ by solving the MDP specified by Lemma1. Unfortunately, Lemma 1 cannot be used for the behavior-targeted attack because Lemma 1 takes advantage of the fact that the reward function that the adversarial policy maximizes is given by the negative of the reward function $R$ defined by SA-MDP. In the behavior-targeted attack, the adversary’s goal is to manipulate the behavior of the victim agent. So, the reward function that the adversarial policy maximizes needs to be defined based on the target policy specified by the adversary. In this section, we overcome this gap by (1) introducing a reward function that induces the target policy using inverse reinforcement learning and (2) extending Lemma 1 so that the optimal adversarial policy can be learned with arbitrary reward function.

Inverse reinforcement learning is computationally expensive due to the reinforcement learning contained in its inner loop. [] showed that the composition of inverse reinforcement learning and reinforcement learning procedure is equivalent to a state-action distribution matching problem and addressed this difficulty by solving this with a GAN-based optimization. The follow-up works leveraged this distribution matching framework to improve the efficiency of imitation learning algorithms[, , , ]. Thus, in Section 4.1, to employ these efficient imitation learning algorithms for our attack, we show that the behavior-targeted attack can also be represented as a distribution matching. In Section 4.2, we formalize inverse reinforcement learning and reinforcement learning in the ILfO setting, showing that a similar approach to the ILfD setting can be used.

### 4.1 Behavior-Targeted Attack in the ILfD setting

In the ILfD setting, the adversary’s demonstration consists of state-action pairs of length $T$, $\tau_{\text{tgt}}=\{(s_{0},a_{0}),(s_{1},a1),\dots,(s_{T-1},a_{T-1})\}$. The demonstration is generated from target policy $\pi_{\text{tgt}}$ in SA-MDP $M$.
First, we formulate the adversary’s inverse reinforcement learning and reinforcement learning to obtain the optimal adversarial policy from the demonstration:

$$ $\text{IRL}_{\psi,\nu}(\pi_{\text{tgt}})=\mathop{\rm arg~{}max}\limits_{c\in \mathbb{R}^{\mathcal{S}\times\mathcal{A}}}-\psi(c)+\left(\min_{\nu\in\mathcal{ N}}\mathbb{E}_{{\pi\circ\nu}}[c(s,a)]\right)-\mathbb{E}_{\pi_{\text{tgt}}}[c(s ,a)].$ (10) $$

$$ $\text{RL}(c)=\mathop{\rm arg~{}min}\limits_{\nu\in\mathcal{N}}\mathbb{E}_{{\pi \circ\nu}}[c(s,a)].$ (11) $$

Let $c^{*}\in\text{IRL}_{\psi,\nu}(\pi_{\text{tgt}})$ be the optimal cost function. With this cost function, the adversary obtains the optimal adversarial policy $\nu^{*}\in\text{RL}(c^{*})$.
Unlike imitation learning, which finds $\pi$ to maximize the reward, the adversary needs to find $\nu$ with $\pi$ being fixed. So, standard RL algorithms cannot be used to solve Eq.(11). Lemma 1 showed that Eq.(11) can be solved when the adversary’s objective is limited to minimize the cumulative rewards obtained from the reward function $R$: $\min_{\nu}\mathbb{E}_{{\pi\circ\nu}}[R(s,a,s^{\prime})]$. Unfortunately, Lemma 1 does not work properly with an arbitrary reward function. We extend Lemma 1 to solve Eq.(11) with arbitrary reward function as follows:

###### Lemma 2 .

Given an SA-MDP $M=(\mathcal{S},\mathcal{A},R,\mathcal{B},p,\gamma)$, a fixed and stationary policy $\pi(\cdot|\cdot)$, and the reward function $\bar{R}$ that the adversary aims to maximize, there exists an MDP $\hat{M}=(\mathcal{S},\hat{\mathcal{A}},\hat{R},\hat{p},\gamma)$ such that the optimal policy of $\hat{M}$ is the optimal adversary $\nu$ for SA-MDP, where $\hat{\mathcal{A}}=\mathcal{S}$, and

$$ $\hat{R}(s,\hat{a},s^{\prime})\triangleq\mathbb{E}[\hat{r}|s,\hat{a},s^{\prime} ]=\begin{cases}\frac{\sum_{a\in\mathcal{A}}\pi(a|\hat{a})p(s^{\prime}|s,a)\bar {R}(s,a,s^{\prime})}{\sum_{a\in\mathcal{A}}\pi(a|\hat{a})p(s^{\prime}|s,a)}& \text{for }s,s^{\prime}\in\mathcal{S}\text{ and }\hat{a}\in\mathcal{B}(s) \subset\hat{\mathcal{A}}\\ C&\text{for }s,s^{\prime}\in\mathcal{S}\text{ and }\hat{a}\not\in\mathcal{B}(s )\end{cases}$ (12) $$

where $C$ is a large negative constant, and

$$ $\hat{p}(s^{\prime}|s,\hat{a})=\sum_{a\in\mathcal{A}}\pi(a|\hat{a})p(s^{\prime} |s,a)\quad\text{for }s,s^{\prime}\in\mathcal{S}\text{ and }\hat{a}\in\hat{ \mathcal{A}}.$ (13) $$

The proof is shown in Appendix A.1. In the proof, we showed that even in maximizing arbitrarily selected rewards, the affected state $\hat{s}$ specified by the optimal adversarial policy is an element of $\mathcal{B}(s)$. Similar to the discussion for Lemma 1 in Section 2, actual optimization according to Lemma 2 does not require the calculation of $\hat{R}(s,a,s^{\prime})$. Specifically, by providing $\bar{r}=\bar{R}(s,a,s^{\prime})$ as a reward when $\hat{a}\in\mathcal{B}(s)$, the adversary can obtain the optimal adversarial policy. Since the evaluation of $\bar{R}(s,a,s^{\prime})$ does not need access to the victim’s policy, the optimization runs in the black-box setting.

###### Lemma 2 .

#### Optimization Strategy

Lemma 2 indicates that the optimal adversarial policy can be obtained by solving MDP $\hat{M}$ using standard RL methodologies.
However, the inverse reinforcement learning procedure is computationally expensive because it involves reinforcement learning in the inner loop. To make this problem tractable, we first transform the bi-level optimization of Eq.(10) and Eq.(11) into a state-action distribution matching problem in a similar style introduced in Eq.(5):

###### Proposition 1 .

Let $\mathcal{C}$ be the set of cost functions, $\psi$ be a convex function, and $\psi^{*}$ be the conjugate of $\psi$. When $\pi$ is fixed and $\mathcal{C}$ is a compact convex set, the following holds:

$$ $\textup{RL}\circ\textup{IRL}_{\psi,\nu}(\pi_{\text{tgt}})=\mathop{\rm arg~{} min}\limits_{\nu\in\mathcal{N}}\psi^{*}(\rho_{{\pi\circ\nu}}-\rho_{\pi_{\text{ tgt}}}).$ (14) $$

The proof is shown in Appendix A.2. In the proof, we first proved that the set of occupancy measures defined for the behavior policy ${\pi\circ\nu}$ is a compact convex set. With this, we use the minimax principle[] to show that the composition is equivalent to the distribution matching problem. The assumption that $\mathcal{C}$ is a compact convex set holds when cost $c(s,a)$ for any $(s,a)$ is finite, which typically holds in practice. Proposition 1 indicates that the adversary can achieve its goal by finding adversarial policy $\nu$ that minimizes the distance between occupancy measures, as measured by $\psi^{*}$.

We can solve Eq.(14) by using an appropriate imitation learning algorithm. Similar to Eq.(6), when using GAIL, for example, the adversary can solve this by alternately optimizing $\nu$ and $D$:

$$ $\min_{\nu}\max_{D}\mathbb{E}_{{\pi\circ\nu}}[\log(D(s,a))]+\mathbb{E}_{\pi_{ \text{tgt}}}[\log(1-D(s,a)].$ (15) $$

Eq.(15) is equivalent to Eq.(14) when $\psi^{*}$ is the Jensen-Shannon divergence, which can be proved immediately by a slight modification of Corollary A.1.1 in []. In the RL optimization process, the behavior policy ${\pi\circ\nu}$ obtains the reward estimated by the discriminator, $-\log D(s,a)$. With this setup, optimization of $\nu$ is attained by using any appropriate RL algorithm in MDP $\hat{M}$ specified in Lemma 2 where $\bar{R}=-\log D(s,a)$ is used as the reward function.

###### Proposition 1 .

### 4.2 Behavior-Targeted Attack in the ILfO setting

In the ILfO setting, the information that the adversary can observe about the victim is the state only, $\tau_{\text{tgt}}=\{s_{0},s_{1},\dots,s_{T-1}\}$. Suppose demonstration is generated from target policy $\pi_{\text{tgt}}$ in SA-MDP $M$. When we define the target adversarial policy $\nu_{\text{tgt}}$ as $\pi\circ\nu_{\text{tgt}}=\pi_{\text{tgt}}$, the adversary’s objective is to find the optimal adversarial policy $\nu*=\nu_{\text{tgt}}$.
Since we can regard $\tau_{\text{tgt}}$ is generated from $\nu_{\text{tgt}}$ in MDP $\hat{M}$ defined in Lamma 2, we can formulate the inverse reinforcement learning and reinforcement learning procedure to obtain the optimal adversarial policy from the demonstration in MDP $\hat{M}$ as follows:

$$ $\text{IRLfO}_{\psi}(\nu_{\text{tgt}})=\mathop{\rm arg~{}max}\limits_{c\in \mathbb{R}^{\mathcal{S}\times\mathcal{S}}}-\psi(c)+\left(\min_{\nu}\mathbb{E}_ {\nu}[c(s,s^{\prime})]\right)-\mathbb{E}_{\nu_{\text{tgt}}}[c(s,s^{\prime})].$ (16) $$

$$ $\text{RL}(c)=\mathbb{E}_{\nu}[c(s,s^{\prime})].$ (17) $$

The difference of this formulation from the ILfD setting is that the domain of cost function $c:\mathcal{S}\times\mathcal{S}\rightarrow\mathbb{R}$ and these procedures are conducted in MDP $\hat{M}$.

These two procedures can be regarded as regular imitation learning. Thus, we can composite them as Eq. (18) as shown in []:

$$ $\text{IRLfO}_{\psi,\nu}\circ\text{RL}(\nu_{\text{tgt}})=\mathop{\rm arg~{}min} \limits_{\nu\in\mathcal{N}}\psi^{*}(\rho^{s}_{\nu}-\rho^{s}_{\nu_{\text{tgt}}}),$ (18) $$

where $\rho^{s}_{\nu}$ and $\rho^{s}_{\nu_{\text{tgt}}}$ are the state-transition occupancy measures regarding adversarial policy $\nu$ and $\nu_{\text{tgt}}$, respectively.
As already discussed in Section 4.1, this optimization problem can be solved by using an appropriate ILfO algorithm, such as [, ]. The entire procedure to attain the behavior-targeted attack in the ILfD and ILfO setting is summarized in Appendix B.

## 5 Analysis of Attack Effectiveness

In this section, from a defensive perspective, we discuss the factors that influence the effectiveness of attacks using the proposed method. Using the strong convexity of the measure, we can lower-bound the effectiveness of the attack, $\psi^{*}(\rho_{{\pi\circ\nu}^{*}}-\rho_{\pi_{\text{tgt}}})$, by the following proposition:

###### Proposition 2 .

Let $\nu^{*}$ be an optimal adversarial policy. If $\psi$ is is $L$-strong convex for the norm $\mathbb{E}_{\pi_{\text{tgt}}}[(\cdot)^{2}]^{1/2}$, then the following inequality holds:

$$ $\psi^{*}(\rho_{{\pi\circ\nu}^{*}}-\rho_{\pi_{\text{tgt}}})\geq\psi^{*}(\rho_{ \pi}-\rho_{\pi_{\text{tgt}}})-\frac{1}{2L}\mathbb{E}_{\pi_{\text{tgt}}}[(\rho_ {\pi}-\rho_{{\pi\circ\nu}^{*}})^{2}].$ (19) $$

The proof is shown in Appendix A.3. In the proof, we use the properties of smooth function and optimality of $\nu^{*}$ to show the inequality. The assumption that $\psi$ is a strongly convex function holds when we adopt the JS divergence as $\psi^{*}$ as [] does. $\psi^{*}(\rho_{{\pi\circ\nu}^{*}}-\rho_{\pi_{\text{tgt}}})$ represents the divergence between the victim’s policy and the target policy after the attack, indicating higher robustness when this value is large. $\psi^{*}(\rho_{\pi}-\rho_{\pi_{\text{tgt}}})$ represents the divergence between the victim policy and the target policy before the attack. This term indicates that the more similar the victim policy is to the target policy, the more likely the attack will succeed. $\mathbb{E}_{\pi_{\text{tgt}}}[(\rho_{\pi}-\rho_{{\pi\circ\nu}^{*}})^{2}]$ represents the adversary’s intervention capability. As the coverage of $\mathcal{B}(s)$ becomes larger, the adversary’s intervention capability becomes higher, increasing the effectiveness of the attack. Thus, according to the proposition, the defender can reduce the attack performance by reducing the adversary’s intervention capability. In our experiments, we investigate how the attack performance changes when the adversary’s intervention capability, which corresponds to $\mathbb{E}_{\pi_{\text{tgt}}}[(\rho_{\pi}-\rho_{{\pi\circ\nu}^{*}})^{2}]$, is varied.

###### Proposition 2 .

## 6 Experiments

In this section, we evaluate SAIA from the following two perspectives: (i) Attack Performance: We quantitatively evaluate the attack performance of our proposed method and compare it with baselines in Meta-World[], which is a robotic simulated manipulation environment. (ii) Attacked victim agent’s trajectories: We visually represent the trajectories of the agent attacked by our proposed method and compare the trajectories before and after the attack in highway-env Parking[].

For each environment, the victim policy is trained by the SAC[] algorithm by using the reward functions defined within each environment. Considering the stability and performance, we selected the DAC[] algorithm in the ILfD setting and the OPOLO[] algorithm in the ILfO setting to train the adversarial policy. We trained the adversarial policy for 1,000,000 steps by using these algorithms. For each task, we collected eight episodes for the demonstration from an adversarial expert agent pre-trained using the SAC algorithm. All results are averages of five trials. We show the details of the environments and implementations in Appendix E.

We constrain the set of adversarial states $\mathcal{B}(s)$ using the $L_{\infty}$ norm: $\mathcal{B}(s)\triangleq\left\{\hat{s}\mid\|s-\hat{s}\|_{\infty}\leq\epsilon\right\}$ following [, , ] where $\epsilon$ represents the attack budget. In all environments, states are standardized to have a mean of 0 and a standard deviation of 1 for performance evaluation. The standardization coefficients are calculated from the experiences sampled during the training of the victim agent.

#### Attack Performance Evaluation

We use Attack Success Rates (ASR) to evaluate the attack performance of SAIA and compare them with baselines. Additionally, we demonstrate the relationship between the adversary’s intervention capability and attack performance by varying attack budget $\epsilon$. The goal of the behavior-targeted attack is to force the victim agent to follow a policy designed to attain an adversary’s task that is different from the victim’s task. The attack is thus considered successful if the adversary’s task is completed. We conduct the attack for 30 episodes by using the trained adversarial policy to measure attack success rates. We use the Meta-World environment. Meta-World is a benchmark that simulates robotic arm tasks. It contains 50 tasks, and each task shares the common state space and action space. We select eight tasks that have opposite objectives: {window-open, window-close}, {faucet-open, faucet-close}, {drawer-open, drawer-close}, {door-unlock, and door-lock}. We define the opposite of the victim’s task as the adversary’s task. When the victim’s task is "window-open," the adversary’s task is set as "window-close," for example. Task completions are evaluated based on the criteria defined in Meta-World.

#### Baselines

Since no previous studies addressed behavior-targeted attacks in the black-box or no-box setting, we used the following two settings as baselines:

(1) SA-RL for Behavior-Targeted Attack: SA-RL[] is an black-box attack method using Lemma 1. SA-RL was originally designed for the untargeted attack and is not available for the behavior-targeted attack. Thus, we extend it for the behavior-targeted attack. In this attack, we train the adversarial policy in MDP $\hat{M}$ specified by Lemma 2. We use the reward function used during the training of the target policy as $\bar{R}$ in $\hat{M}$. In our attack scenario, the adversary only has access to the demonstrations generated by the target policy and does not have access to the reward function used during training. Thus, the threat model for this attack is more advantageous to the adversary than our attack. For fair comparisons, we use the TD3[] algorithm to train the adversarial policy, which is the same algorithm used in DAC.

(2) Random Perturbation Attack: This attack modifies the victim’s state observation by random perturbations drawn from a uniform distribution. This method works as a random baseline to evaluate the attack performance.

Figure: Figure 1: Comparison of the proposed method and the baseline. value of $\epsilon$ ($x$-axis) versus attack success rate ($y$-axis). The solid lines and shaded areas in each color indicate the mean and standard deviation of the attack success rates over five different seed values, respectively.
Refer to caption: x1.png

#### Results

Figure 1 shows the attack performance of SAIA and baselines.
Surprisingly, SAIA demonstrates higher attack performance than SA-RL for the behavior-targeted attack in all tasks under the ILfD setting and in 6 out of 8 tasks under the ILfO setting.
This indicates that the reward function used for training the target policy is not necessarily optimal for learning the adversarial policy.
The attack success rates in the ILfO (no-box) setting deteriorate compared to those in the ILfD (black-box) setting. This is because the adversary in the ILfO setting lacks access to information regarding the victim’s actions.
As attack budget $\epsilon$ decreases, the attack success rate declines. As shown in Proposition 2, this indicates that lower adversary intervention capability leads to decreased attack performance.
Furthermore, the attack success rates of all attack methods vary depending on the difficulty of the task. Notably, all attack methods show lower attack success rates for door-lock and door-unlock tasks. This can be attributed to the greater disparity in the state-action distributions between the victim policy and the target policy in these tasks compared to other tasks.

#### Attacked Victim Agent’s Trajectories

Figure: Figure 2: Illustration of the attacked victim agent’s trajectories. It demonstrates successful attacks where we make a vehicle follow the trajectory specified by the adversary
Refer to caption: x9.png

While the above experiment compares the performance of our proposed method with baselines, it does not evaluate the actual behavior changes from before to after the attack. Thus, we visually evaluate the trajectories before and after the attack in the highway-env Parking environment. The highway env simulates autonomous driving, and the goal of the Parking task is to park the vehicle at a designated spot. In this environment, the adversary’s objective is to make the victim agent follow a trajectory specified by the adversary. An attack is considered successful if the attacked victim agent follows the trajectories generated by the target policy. We conduct the attack in the ILfD setting and set $\epsilon=0.15$. Figure 2 shows the trajectories before and after the attack. It can be seen that the victim policy follows the specified trajectory.

## 7 Discussion and Limitation

In this paper, we propose SAIA, a novel black-box and no-box attack that manipulates the behavior of the victim agent to evaluate the vulnerability of reinforcement learning agents. First, we formulated the adversary’s objective as a bi-level optimization combining inverse reinforcement learning and reinforcement learning. Additionally, we prove that this problem is equivalent to a state-action distribution matching problem for efficiency.
Our scope mainly focuses on attack. We derived a theoretical characterization of the adversary’s performance that helps defense against our attack, whereas this does not necessarily provide a non-obvious strategy for defense. How to train RL agents to be robust against behavior-targeted attacks presents an interesting topic for future work.

Broader Impact
RL is expected to be applied to mission-critical tasks such as autonomous driving and aerospace control. We investigate the vulnerabilities of reinforcement learning agents with the expectation of enhancing their robustness. From a negative perspective, the vulnerabilities explored in this study could potentially be exploited for attacks. However, the practical application to the real world remains challenging, and it is believed that through research into defense mechanisms, such exploitation can be prevented.

## 8 Acknowledgement

This work was partly supported by JST CREST Grant
Numbers JPMJCR21D3, JPMJCR21D3, and JSPS Grants-in-Aid for Scientific Research Grant
Numbers 23H00483, 22H00519.

## Appendix A Proofs

### A.1 Proof of Lemma 2

See 2

###### Proof.

This proof follows the approach outlined in the proof of Lemma 1 in [], with some modifications to account for the differences in our setting.

In the proof of Lemma 1 presented in [1], by substituting $-R(s,a,s^{\prime})$ with $\bar{R}(s,a,s^{\prime})$, we can derive the subsequent results:

$$ $\hat{R}(s,\hat{a},s^{\prime})=\dfrac{\sum_{a}\bar{R}(s,a,s^{\prime})p(s^{ \prime}|a,s)\pi(a|\hat{a})}{\sum_{a}p(s^{\prime}|a,s)\pi(a|\hat{a})}.$ (20) $$

Let $\overline{M}=\max_{s,a,s^{\prime}}\bar{R}(s,a,s^{\prime})$ and $\underline{M}=\min_{s,a,s^{\prime}}\bar{R}(s,a,s^{\prime})$. We Define the reward $C$ for when the adversarial policy selects an action $\hat{a}\not\in\mathcal{B}$ as follows:

$$ $C<\min\left\{\underline{M},\frac{1}{1-\gamma}\underline{M}-\frac{\gamma}{1- \gamma}\overline{M}\right\}.$ (21) $$

From the definition of $C$ and $\hat{M}$, we have for $\forall(s,\hat{a},s^{\prime})$,

$$ $C<\hat{R}(s,\hat{a},s^{\prime})\leq\hat{M},$ (22) $$

and, for $\forall\hat{a}\in\mathcal{B}(s)$, according to Eq. (20),

$$ $\underline{M}\leq\hat{R}(s,\hat{a},s^{\prime})\leq\overline{M}.$ (23) $$

MDP has at least one optimal policy, so the $\hat{M}$ has an optimal adversarial policy $\nu^{*}$, which satisfies $\hat{V}_{{\pi\circ\nu}^{*}}(s)\geq\hat{V}_{{\pi\circ\nu}}(s)$ for $\forall s,\forall\nu$. From the property of the optimal policy, $\nu^{*}$ is deterministic. Let $\mathfrak{R}\triangleq\left\{\nu\mid\forall s,\exists\hat{a}\in\mathcal{B}(s),
\nu(\hat{a}\mid s)=1\right\}$. This restricts that the adversarial policy does not take actions $\hat{a}\notin B(s)$, so $\nu^{*}\in\mathfrak{R}$. If $\nu^{*}\notin\mathfrak{R}$ at state $s^{0}$,

$$ $\displaystyle\hat{V}_{\pi 0\nu^{*}}(s^{0})$ $\displaystyle=\mathbb{E}_{\hat{p},\nu^{*}}\left[\sum_{k=0}^{\infty}\gamma^{k} \hat{r}_{t+k+1}\mid s_{t}=s^{0}\right]$ (24) $\displaystyle=C+\mathbb{E}_{\hat{p},\nu^{*}}\left[\sum_{k=1}^{\infty}\gamma^{k }\hat{r}_{t+k+1}\mid s_{t}=s^{0}\right]$ (25) $\displaystyle\leq C+\frac{\gamma}{1-\gamma}\hat{M}$ (26) $\displaystyle<\frac{1}{1-\gamma}\hat{M}$ (27) $\displaystyle\leq\mathbb{E}_{\hat{p},\nu^{\prime}}\left[\sum_{k=0}^{\infty} \gamma^{k}\hat{r}_{t+k+1}\mid s_{t}=s^{0}\right]=\hat{V}_{{\pi\circ\nu}^{ \prime}}(s^{0}).$ (28) $$

The last inequality holds for any $\nu^{\prime}\in\mathfrak{R}$. This contradicts the assumption that $\nu^{*}$ is optimal. Hence, the following analysis will only consider policies included in $\mathcal{N}$.

For any policy $\nu\in\mathfrak{R}$:

$$ $\displaystyle\hat{V}_{{\pi\circ\nu}}(s)$ $\displaystyle=\mathbb{E}_{\hat{p},\nu}\left[\sum_{k=0}^{\infty}\gamma^{k}\hat{ r}_{t+k+1}\mid s_{t}=s\right]$ (29) $\displaystyle=\mathbb{E}_{\hat{p},\nu}\left[\hat{r}_{t+1}+\gamma\sum_{k=0}^{ \infty}\gamma^{k}\hat{r}_{t+k+2}\mid s_{t}=s\right]$ (30) $\displaystyle=\sum_{\hat{a}\in\mathcal{S}}\nu(\hat{a}|s)\sum_{s^{\prime}\in \mathcal{S}}\hat{p}(s^{\prime}|s,\hat{a})\left[\hat{R}(s,\hat{a},s^{\prime})+ \gamma\mathbb{E}_{\hat{p},\nu}\left[\sum_{k=0}^{\infty}\gamma^{k}\hat{r}_{t+k+ 2}\mid s_{t+1}=s^{\prime}\right]\right]$ (31) $\displaystyle=\sum_{\hat{a}\in\mathcal{S}}\nu(\hat{a}|s)\sum_{s^{\prime}\in \mathcal{S}}\hat{p}(s^{\prime}|s,\hat{a})\left[\hat{R}(s,\hat{a},s^{\prime})+ \gamma\hat{V}_{{\pi\circ\nu}}(s^{\prime})\right].$ (32) $$

All policies in $\mathfrak{R}$ are deterministic, so we denote the deterministic action $\hat{a}$ chosen by a $\nu\in\mathfrak{R}$ at $s$ as $\nu(s)$. Then for $\forall\nu\in\mathfrak{R}$, we have

$$ $\displaystyle\hat{V}_{{\pi\circ\nu}}(s)$ $\displaystyle=\sum_{s^{\prime}\in\mathcal{S}}\hat{p}(s^{\prime}|s,\hat{a}) \left[\hat{R}(s,\hat{a},s^{\prime})+\gamma\hat{V}_{{\pi\circ\nu}}(s^{\prime})\right]$ (33) $\displaystyle=\sum_{s^{\prime}\in\mathcal{S}}\sum_{a\in\mathcal{A}}\pi(a|\hat{ a})p(s^{\prime}|s,a)\left[\frac{\sum_{a}\bar{R}(s,a,s^{\prime})p(s^{\prime}|a, s)\pi(a|\hat{a})}{\sum_{a}p(s^{\prime}|a,s)\pi(a|\hat{a})}+\gamma\hat{V}_{{\pi \circ\nu}}(s^{\prime})\right]$ (34) $\displaystyle=\sum_{a\in\mathcal{A}}\pi(a|\nu(s))\sum_{s^{\prime}\in\mathcal{S }}p(s^{\prime}|s,a)\left[\bar{R}(s,a,s^{\prime})+\gamma\hat{V}_{{\pi\circ\nu}} (s^{\prime})\right].$ (35) $$

Thus, the optimal value function is

$$ $\hat{V}_{{\pi\circ\nu}^{*}}(s)=\max_{\nu^{*}(s)\in\mathcal{B}(s)}\sum_{a\in \mathcal{A}}\pi(a|\nu^{*}(s))\sum_{s^{\prime}\in\mathcal{S}}p(s^{\prime}|s,a) \left[\bar{R}(s,a,s^{\prime})+\gamma\hat{V}_{{\pi\circ\nu}^{*}}(s^{\prime}) \right].$ (36) $$

The Bellman equation for the state value function $\tilde{V}_{{\pi\circ\nu}}(s)$ of the SA-MDP $M=(\mathcal{S},\mathcal{A},\mathcal{B},R,p,\gamma)$ is given as follows:

###### Lemma 3 (Theorem 1 of [ 9 ] ) .

Given $\pi:\mathcal{S}\rightarrow\mathcal{P}(\mathcal{A})$ and $\nu:\mathcal{S}\rightarrow\mathcal{S}$, we have

$$ $\tilde{V}_{{\pi\circ\nu}}(s)=\sum_{a\in\mathcal{A}}\pi(a|\nu(s))\sum_{s^{ \prime}\in\mathcal{S}}p(s^{\prime}|s,a)\left[R(s,a,s^{\prime})+\gamma\tilde{V} _{{\pi\circ\nu}}(s^{\prime})\right]$ (37) $$

Therefore, if the reward function is $\bar{R}$, then $\hat{V}_{{\pi\circ\nu}^{*}}=\tilde{V}_{{\pi\circ\nu}^{*}}$. So, we have

$$ $\tilde{V}_{{\pi\circ\nu}^{*}}(s)=\max_{\nu^{*}(s)\in\mathcal{B}(s)}\sum_{a\in \mathcal{A}}\pi(a|\nu^{*}(s))\sum_{s^{\prime}\in\mathcal{S}}p(s^{\prime}|s,a) \left[\bar{R}(s,a,s^{\prime})+\gamma\tilde{V}_{{\pi\circ\nu}^{*}}(s^{\prime}) \right],$ (38) $$

and $\tilde{V}_{{\pi\circ\nu}^{*}}(s)\geq\tilde{V}_{{\pi\circ\nu}}(s)$ for $\forall s,\forall\nu\in\mathfrak{R}$. Hence, $\nu^{*}$ is also the optimal $\nu$ for $\tilde{V}_{{\pi\circ\nu}}$.

∎

###### Proof.

###### Lemma 3 (Theorem 1 of [ 9 ] ) .

### A.2 Proof of Proposition 1

See 1

###### Proof.

Let $\mathcal{D}_{{\pi\circ\nu}}=\{\rho_{\pi\circ\nu}|\nu\in\mathcal{N}\}$.
If $\mathcal{D}_{{\pi\circ\nu}}$ is a compact and convex set, Eq. (14) is valid according to the proof of Proposition 3.1 in []. Thus, we prove that $\mathcal{D}_{{\pi\circ\nu}}$ is a compact and convex set.

Compactness: To prove that $\mathcal{D}_{{\pi\circ\nu}}$ is compact, we need to show that it is bounded and closed. The occupancy measure for ${\pi\circ\nu}$ is defined by

$$ $\rho_{{\pi\circ\nu}}(s,a)={\pi\circ\nu}(a|s)\sum_{t=0}^{\infty}\gamma^{t}\Pr(s _{t}=s|s_{0}\sim p_{0}(\cdot),a_{t}\sim{\pi\circ\nu}(\cdot|s_{t}),s_{t+1}\sim p (\cdot|s_{t},a_{t})).$ (39) $$

From this definition, the sum of the occupancy measures for all states $s\in\mathcal{S}$ and actions $a\in\mathcal{A}$ is $\sum_{s,a}\rho_{{\pi\circ\nu}}(s,a)=\frac{1}{1-\gamma}$. Since $\rho$ outputs always zero or positive values by definition, $\mathcal{D}_{{\pi\circ\nu}}$ is bounded.

Next, we show that $\mathcal{D}_{{\pi\circ\nu}}$ is closed.
Policy $\pi\in\Pi$ and occupancy measure $\rho\in\mathcal{D}$ have a one-to-one correspondence by Lemma 1 in []. Let $\Pi_{\nu}=\left\{\pi^{\prime}\mid\nu\in\mathcal{N},\pi^{\prime}=\pi\circ\nu\right\}$ be the set of all behavior policies.
Since $\Pi_{\nu}\subseteq\Pi$, ${\pi\circ\nu}\in\Pi_{\nu}$ and $\rho_{{\pi\circ\nu}}\in\mathcal{D}_{{\pi\circ\nu}}$ also have a one-to-one correspondence. Thus, let $\{\rho_{{\pi\circ\nu}_{1}},\rho_{{\pi\circ\nu}_{2}},\dots\}$ be any cauchy sequence with $\rho_{{\pi\circ\nu}_{n}}\in\mathcal{D}_{{\pi\circ\nu}}$. Due to the one-to-one correspondence, there exists a corresponding sequence $\{{\pi\circ\nu}_{1},{\pi\circ\nu}_{2},\dots\}$. Since $\Pi_{\nu}$ is compact, the sequence $\{{\pi\circ\nu}_{1},{\pi\circ\nu}_{2},\dots\}$ converges to ${\pi\circ\nu}\in\Pi_{\nu}$. Hence, the sequence $\{\rho_{{\pi\circ\nu}_{1}},\rho_{{\pi\circ\nu}_{2}},\dots\}$ also converges to the occupancy measure $\rho_{{\pi\circ\nu}}$ corresponding to ${\pi\circ\nu}$. Therefore, $\mathcal{D}_{{\pi\circ\nu}}$ is closed.

Convexity:
First, we show that $\Pi_{\nu}$ is a convex set. For $\forall\nu_{1}\in\mathcal{N},\forall\nu_{2}\in\mathcal{N}$ and $\lambda\in[0,1]$, we define ${\pi\circ\nu}$ as

$$ ${\pi\circ\nu}=\lambda{\pi\circ\nu}_{1}+(1-\lambda){\pi\circ\nu}_{2}.$ (40) $$

Then, we have

$$ $\displaystyle{\pi\circ\nu}$ $\displaystyle=\lambda{\pi\circ\nu}_{1}+(1-\lambda){\pi\circ\nu}_{2}$ (41) $\displaystyle=t\sum_{\hat{a}\in\mathcal{S}}\nu_{1}(\hat{a}|s)\pi(a|\hat{a})+(1 -t)\sum_{\hat{a}\in\mathcal{S}}\nu_{2}(\hat{a}|s)\pi(a|\hat{a})$ (42) $\displaystyle=\sum_{\hat{a}\in\mathcal{S}}(t\nu_{1}(\hat{a}|s)+(1-t)\nu_{2}( \hat{a}|s)\pi(a|\hat{a})).$ (43) $$

Using the convexity of $\mathcal{N}$, we have $t\nu_{1}+(1-t)\nu_{2}\in\mathcal{N}$. Thus, ${\pi\circ\nu}\in\Pi_{\nu}$ holds for any $\nu_{1}\in\mathcal{N},\nu_{2}\in\mathcal{N},and\lambda\in[0,1]$ and $\Pi_{\nu}$ is convex.

Noting that the one-to-one correspondence of $\rho_{{\pi\circ\nu}}\in\mathcal{D}_{{\pi\circ\nu}}$ and ${\pi\circ\nu}\in\Pi_{\nu}$, for any mixture policy ${\pi\circ\nu}_{\text{m}}\in\Pi_{\nu}$, we have $\rho_{{\pi\circ\nu}_{\text{m}}}\in\mathcal{D}_{{\pi\circ\nu}}$. Consequently, $\mathcal{D}_{{\pi\circ\nu}}$ is a convex set.

Based on the above, we prove the proposition following the same procedure as the proof of Proposition 3.1 in []. Let $\tilde{c}\in\text{IRL}_{\psi,\nu}(\pi_{\text{tgt}}),\widetilde{{\pi\circ\nu}}
\in\text{RL}(\tilde{c})=\text{RL}\circ\text{IRL}_{\psi,\nu}(\pi_{\text{tgt}})$. The RHS of eq. 14 is denoted by

$$ $\displaystyle{\pi\circ\nu}_{A}\in\mathop{\rm arg~{}min}\limits_{{\pi\circ\nu}} \psi^{*}(\rho_{{\pi\circ\nu}}-\rho_{\pi_{\text{tgt}}})=\mathop{\rm arg~{}min} \limits_{{\pi\circ\nu}}\max_{c}-\psi(c)+\sum_{s,a}(\rho_{{\pi\circ\nu}}(s,a)- \rho_{\pi_{\text{tgt}}}(s,a))c(s,a).$ (44) $$

We define the RHS of eq. 14 by
$\bar{L}:\mathcal{D}_{{\pi\circ\nu}}\times\mathcal{C}\rightarrow\mathbb{R}$ as follow:

$$ $\bar{L}(\rho,c)=-\psi(c)+\sum_{s,a}\rho(s,a)c(s,a)-\sum_{s,a}\rho_{\pi_{\text{ adv}}}c(s,a).$ (45) $$

We remark that $\bar{L}$ takes an occupancy measure as its argument.

To prove $\widetilde{{\pi\circ\nu}}={\pi\circ\nu}_{A}$, we utilize the minimax duality of $\bar{L}$.

Policy $\pi\in\Pi$ and occupancy measure $\rho\in\mathcal{D}$ have a one-to-one correspondence by Lemma 1 in [].
Since $\Pi_{\nu}\subseteq\Pi$, ${\pi\circ\nu}\in\Pi_{\nu}$ and $\rho_{{\pi\circ\nu}}\in\mathcal{D}_{{\pi\circ\nu}}$ also have a one-to-one correspondence.
Thus, the following relationship is established:

$$ $\rho_{{\pi\circ\nu}_{A}}\in\mathop{\rm arg~{}min}\limits_{\rho\in\mathcal{D}_{ {\pi\circ\nu}}}\max_{c\in\mathcal{C}}\bar{L}(\rho,c),$ (46) $$

$$ $\tilde{c}\in\mathop{\rm arg~{}max}\limits_{c\in\mathcal{C}}\min_{\rho\in \mathcal{D}_{{\pi\circ\nu}}}\bar{L}(\rho,c),$ (47) $$

$$ $\rho_{\widetilde{{\pi\circ\nu}}}\in\mathop{\rm arg~{}min}\limits_{\rho\in \mathcal{D}_{{\pi\circ\nu}}}\bar{L}(\rho,\tilde{c}).$ (48) $$

$\mathcal{D}_{{\pi\circ\nu}}$ is a compact convex set and $\mathcal{C}$ is also a compact convex set.
Since $\psi$ is a convex function, we have that $\bar{L}(\cdot,c)$ is convex for all $c$, and that $\bar{L}(\rho,\cdot)$ is liner for all $\rho$, so $\bar{L}(\rho,\cdot)$ is concave for all $\rho$. Due to minimax duality[], we have the following equality:

$$ $\min_{\rho\in\mathcal{D}_{{\pi\circ\nu}}}\max_{c\in\mathcal{C}}\bar{L}(\rho,c) =\max_{c\in\mathcal{C}}\min_{\rho\in\mathcal{D}_{{\pi\circ\nu}}}\bar{L}(\rho,c).$ (49) $$

Therefore, from Eq. (46) and Eq. (47), $(\rho_{{\pi\circ\nu}_{A}},\tilde{c})$ is a saddle point of $\bar{L}$, which implies that $\rho_{{\pi\circ\nu}_{A}}\in\mathop{\rm arg~{}min}\limits_{\rho\in\mathcal{D}_{
{\pi\circ\nu}}}\bar{L}(\rho,\tilde{c})$ and so $\rho_{\widetilde{{\pi\circ\nu}}}=\rho_{{\pi\circ\nu}_{A}}$.
∎

###### Proof.

### A.3 Proof of Proposition 2

See 2

###### Proof.

We define $f:\mathcal{D}_{{\pi\circ\nu}}\rightarrow\mathbb{R}$ as:

$$ $f(\rho_{{\pi\circ\nu}})=\psi^{*}(\rho_{{\pi\circ\nu}},\rho_{\pi_{\text{tgt}}}).$ (50) $$

Since $\psi$ is an L-strong convex function, its conjugate $\psi^{*}$ is a $\frac{1}{L}$-smooth function. Thus, the following holds:

$$ $\displaystyle f(\rho_{\pi})-f(\rho_{{\pi\circ\nu}^{*}})$ $\displaystyle\leq\langle\nabla f(\rho_{{\pi\circ\nu}^{*}}),\rho_{\pi}-\rho_{{ \pi\circ\nu}^{*}}\rangle+\frac{1}{2L}\|\rho_{\pi}-\rho_{{\pi\circ\nu}^{*}}\|^{2}$ (51) $\displaystyle=\frac{1}{2L}\|\rho_{\pi}-\rho_{{\pi\circ\nu}^{*}}\|^{2},$ (52) $$

where $\|\rho_{\pi}-\rho_{{\pi\circ\nu}^{*}}\|$ denotes the distance between $\rho_{\pi}$ and $\rho_{{\pi\circ\nu}^{*}}$.
The final equation is derived from the fact that, due to the optimality of $\nu^{*}$, $\nabla f=0$. Note that $\rho_{\pi}\in\mathcal{D}_{{\pi\circ\nu}}$ because when $\nu_{\text{id}}$ is a identity function, defined as $\nu(s|s)=1$, $\rho_{\pi\circ\nu_{\text{id}}}=\rho_{\pi}$.

We define $\|c\|$ as $\sqrt{\mathbb{E}_{\pi_{\text{tgt}}}[c^{2}]}$ and the following inequality is obtained:

$$ $\displaystyle f(\rho_{\pi})-f(\rho_{{\pi\circ\nu}^{*}})$ $\displaystyle\leq\frac{1}{2L}\mathbb{E}_{\pi_{\text{tgt}}}[(\rho_{\pi}-\rho_{{ \pi\circ\nu}^{*}})^{2}]$ (53) $\displaystyle\psi^{*}(\rho_{\pi}-\rho_{\pi_{\text{tgt}}})-\psi^{*}(\rho_{{\pi \circ\nu}^{*}}-\rho_{\pi_{\text{tgt}}})$ $\displaystyle\leq\frac{1}{2L}\mathbb{E}_{\pi_{\text{tgt}}}[(\rho_{\pi}-\rho_{{ \pi\circ\nu}^{*}})^{2}]$ (54) $\displaystyle\psi^{*}(\rho_{{\pi\circ\nu}^{*}}-\rho_{\pi_{\text{tgt}}})$ $\displaystyle\geq\psi^{*}(\rho_{\pi}-\rho_{\pi_{\text{tgt}}})-\frac{1}{2L} \mathbb{E}_{\pi_{\text{tgt}}}[(\rho_{\pi}-\rho_{{\pi\circ\nu}^{*}})^{2}].$ (55) $$

∎

###### Proof.

## Appendix B Algorithm

As discussed in Section 4.1 and 4.2, the adversary’s objective is solving the distribution matching problem. This problem can be solved using existing methods[, , , , ] within the MDP $\hat{M}$ in Lemma 2.

We introduce the algorithm of state-adversarial imitation attack (SAIA) in Algorithm1. In this algorithm, the adversarial policy is updated as follows: First, the adversary collects trajectories in MDP $\hat{M}$ by intervening in the fixed victim’s state observations. Next, the adversary uses these trajectories to train the adversarial policy by solving the distribution matching problem using an appropriate algorithm. Finally, the adversary prunes the adversarial policy’s neural network by using the gradients computed during this training.
We discuss the details of pruning in Appendix D and evaluate the effect in Appendix G.

Figure: Algorithm 1 State-Adversarial Imitation Learning (SAIA)

## Appendix C Related Works

In this section, we discuss prior works that proposed white-box attacks.

#### Untargeted Attack

In the untargeted attack, the adversary’s objective is to minimize the cumulative rewards earned by the victim. Several untargeted attack methods have been proposed, assuming white box access to the victim’s policy. Huang et al.[] proposed an untargeted adversarial attack method that computes adversarial perturbations using FGSM[]. Pattanaik et al.[] proposed a more potent method that uses the Q function to select actions to minimize the cumulative rewards at each state. Gleave et al.[] proposed an attack method assuming two agents exist in the environment and one of them behaves as an opponent aiming at reducing the acquired rewards of the other target agent. Sun et al.[] propose a theoretically optimal attack method that finds the optimal direction of perturbation. [] reported this attack method was more efficient than existing methods in environments with large state spaces.

#### Enchanting Attack

In the targeted attack, the adversary’s goal is to manipulate the victim so that it follows some direction made by the adversary. One type of targeted attack is the enchanting attack. This attack aims to lure the victim agent to reach a predetermined target state. Lin et al.[] first proposed this type of attack. In their approach, the adversary predicts future states and generates a sequence of actions that cause the victim to reach the target state. The adversary then crafts a sequence of perturbations to make the victim perform the sequence of actions. Tretschk et al.[] proposed an enchanting attack where adversarial perturbations to maximize adversarial rewards are heuristically designed for the attack purpose, thereby transitioning to the specified target state. Buddareddygari et al.[] proposed a different enchanting attack using visual patterns placed on physical objects in the environment so that the victim agent is directed to the target state. Unlike [] and [], which affect the victim’s state observations, this attack affects the environmental dynamics, not the victim’s state observations. Ying et al.[] proposed an enchanting attack with a universal adversarial perturbation. When any state observations are modified with this perturbation, the victim agent is forced to be guided to the target state. All of these enchanting attacks require white-box access to the victim’s policy.

#### Behavior-Targeted Attack

The other type of targeted attack is the behavior-targeted attack, which aims to manipulate not only the final destination but also the behavior in a more detailed direction by the adversary. Hussenot et al.[] proposed a behavior-targeted method that forces the victim to select the same actions as the policy specified by the adversary. More specifically, this attack precomputes a universal perturbation for each action so that the victim who observes the perturbed states takes the same action as the adversarially specified policy. One limitation of this attack is that the computation cost to precompute such universal perturbations can be large when the action space is large or continuous. Since the cost required for pre-computing perturbations is significant, applying this attack is challenging. Boloor et al.[] proposed a heuristic attack specifically designed for autonomous vehicles. They formulated an objective function with a detailed knowledge of the target task, which is not applicable to behavior-targeted attacks for general tasks. We remark that all existing behavior-targeted attacks also require white-box access to the victim’s policy.

## Appendix D Sparsifying the State Dimension to Attack by Pruning

Existing adversarial attacks on the victim’s state observation typically suppose that the adversary can change all state spaces. However, this assumption is highly restrictive in real-world attacks and often impractical for the adversary. The adversary can address this issue by limiting the attacked state dimensions in advance. However, narrowing down state dimensions that do not significantly affect the attack performance is challenging. Thus, in this section, we propose a method to attain an effective selection of states to be attacked by structured pruning.

### D.1 Sparsifying by Structured Pruning

Pruning is a technique primarily used in supervised learning to reduce the number of parameters by removing weights that have little impact. Recently, it has been shown that pruning can also improve performance in reinforcement learning[, ]. During the training of the adversarial policy, we implement structured pruning on the final layers to select and remove weights associated with state dimensions that are ineffective in an attack.

Unlike unstructured pruning, which removes individual weights regardless of their position, structured pruning removes entire structures such as filters, channels, or layers. In our attack setup, we perform structured pruning by treating weights associated with a state dimension as one unit. More specifically, in the final layer of the adversarial policy, we treat the weights in each column as a single unit for the purpose of pruning. Following [], in implementation, the adversarial policy is trained not to output the affected state $\hat{s}$ directly but to output the perturbation $\Delta=\hat{s}-s$ in our implementation. Thus, if all the weights in column $i$ become zero, the perturbation applied to the $i$-th dimension of the state will also become zero. This means that the adversary does not need to modify the $i$-th dimension of the state in the attack.

We use gradual pruning[]. This is one of the pruning methods that slowly increases the sparsity of the network during training based on the scored importance of the weights. In general, the importance is scored as magnitude-base, the absolute value of the weight. However, in adversarial attacks, absolute values of the weights do not necessarily indicate the importance of the state dimension corresponding to the weights. Thus, we use gradient-based pruning[] that scores the importance of the weights from the gradients with respect to the weights. In training the policy, gradients are calculated based on the values estimated by the value function. When these gradients are small, the corresponding state dimension is expected to have minimal impact on the attack. We compute the $L_{1}$ norm of the parameter gradients in each column and prune the column based on their values, starting with the smallest gradient. Pruning begins at 20% of the training time and continues until 80% is reached. During the rest of the training period, we keep the final sparsity of the network fixed.

### D.2 Effect of Pruning

Figure: (a) ILfD setting
Refer to caption: x10.png

In implementation, we introduced a technique to reduce the number of state dimensions to be attacked by pruning. In this subsection, we evaluate the relationship between the sparsity induced by pruning and attack success rate. Using the same settings as described in Section 6, we conducted experiments on two specific tasks: drawer-close and window-close. Additionally, we experiment with a magnitude-based scoring method and compare its performance with the gradient-based scoring method used in our proposed approach. In this experiment, we set $\epsilon=0.15$.

The result is shown in Figure 3. It indicates that we can reduce the number of attacked state dimensions without significantly lowering the attack success rate. Sparsity can be increased up to about 60% with only a gradual decline in attack success rate; however, increasing sparsity beyond this point leads to a sharp decrease in attack success rate. This suggests that there are critical state dimensions necessary for the attack, and exceeding a certain level of sparsity may exclude these essential dimensions from being targeted. Furthermore, the gradient-based approach shows superior performance compared to the magnitude-based method. This higher effectiveness can be attributed to the fact that gradients, calculated according to the values estimated from the value function, more accurately represent the critical state dimensions necessary for the attack than simply using the magnitude of the weights in the adversarial policy.

## Appendix E Experimental Details

### E.1 Environmental Details

#### Meta-World

Meta-World is a benchmark that involves performing tasks using a robot arm. It features a 39-dimensional continuous state space and a 4-dimensional continuous action space. In this experiment, we selected eight tasks from Meta-World: window-open, window-close, faucet-open, faucet-close, drawer-open, drawer-close, door-unlock, and door-lock. Each task is completed by moving a specified object to a designated position.

#### Highway-env Parking

Highway-env is a benchmark that simulates autonomous driving agents. From the various tasks included in Highway-env, we selected the Parking task, which involves parking the vehicle. In this experiment, we extended the default 6-dimensional state space, which is used for learning the victim and target policies, by adding two dimensions related to the target position, resulting in an 8-dimensional state space. Additionally, we retained the default 2-dimensional continuous action space.

### E.2 Implementation Details

In this section, we describe the implementation details. For each run of experiments, we run on a single Nvidia Tesla V100 GPU and Intel Xeon E5-2698 v4 2.2GHz 20core CPU. We show the details of the hyperparameters of SAIA and SA-RL for the behavior-targeted attack and the training of the victim agent in Table 2, 3, 4.
For each environment, the victim policy was trained by the SAC[] algorithm in advance. For the victim’s training, we use the reward functions defined within each environment, and we utilize the Stable-Baselines3 (SB3)[] library for implementation. Each victim policy was trained for 1,000,000 steps in the Meta-World environment and 400,000 steps in the Parking environment. Considering the stability and performance, we used the DAC[] algorithm in the ILfD setting and the OPOLO[] algorithm in the ILfO setting for optimization of the adversarial policy. Both are based on the TD3[] algorithm. We train the adversarial policy in 1,000,000 steps for each environment.
For each task, we collected eight episodes for the demonstration from an adversarial expert agent pre-trained using the SAC algorithm, similar to the training of the victim policy. All results are averages of five trials. In SA-RL for the behavior-targeted attack, we also train the adversarial policy in 1,000,000 steps by using the TD3 algorithm for each environment. We selected the TD3 algorithm for a fair evaluation since it is used for optimization in DAC.

## Appendix F Generalized Formulation of Attack on Reinforcement Learning

In this section, we formalize three types of attacks: (1) reward minimization attack (untargeted attack), (2) enchanting attack that lures the victim to a state specified by the adversary, and (3) behavior-targeted attack that enforces the victim to follow a policy specified by the adversary.

Reward Minimization Attack.
In this attack, the adversary aims to minimize the cumulative reward of the victim agent. Let $\mathcal{N}$ be the set of all adversarial policies. Then, given stationary $\pi$, the optimal adversarial policy is obtained by solving the following objective in the SA-MDP $M$:

$$ $\min_{\nu\in\mathcal{N}}\mathbb{E}_{{\pi\circ\nu}}[R(s,a,s^{\prime})].$ (56) $$

Enchanting attack.
In this attack, the adversary aims to lure the victim agent from its current state $s_{t}\in\mathcal{S}$ to a specified target state $s_{\text{target}}\in\mathcal{S}$ specified by the adversary after H steps[]. Given a target state, the optimal adversarial policy for the enchanting attack is obtained by solving the following objective in the SA-MDP $M$:

$$ $\begin{split}&\min_{\nu\in\mathcal{N}}\|s_{t+H}-s_{\text{target}}\|\\ &\text{subject to }a_{t+h}\sim{\pi\circ\nu}(\cdot|s_{t+h}),s_{t+h+1}\sim p( \cdot|s_{t+h},a_{t+h})\text{ where }h=0,1,2,\dots,H,\end{split}$ (57) $$

where $\|\cdot\|$ is an appropriate norm defined for the state space.

Behavior-targeted attack. Unlike the untargeted (i.e., reward minimization) attack[], the targeted attack aims at controlling the behavior of the agent. More precisely, the objective of the behavior-targeted attack is to enforce the victim’s policy to mimic a target policy $\pi_{\text{tgt}}$ specified by the adversary. Let $d$ be an arbitrary distance function over probability distributions. Then, given a target policy, the optimal adversarial policy is obtained by solving the following objective for $\forall s\in\mathcal{S}$:

$$ $\min_{\nu\in\mathcal{N}}d({\pi\circ\nu}(\cdot|s),\pi_{\text{tgt}}(\cdot|s)).$ (58) $$

## Appendix G Additional Experiments

### G.1 Impact of Demonstration Size

Figure: (a) ILfD setting
Refer to caption: x14.png

In this section, we compare the attack performance of the SAIA algorithm across different demonstration sizes. We conduct experiments with demonstration sizes of 4 episodes, 8 episodes, and 12 episodes. Other experimental settings are the same as those described in Section 6. The experimental results are presented in Figure 4. In three of the four tasks, the size of the demonstration has little impact on attack performance. However, in the door-lock task, smaller demonstrations result in lower attack performance. This is likely due to the door-lock task being more challenging compared to other tasks, making it relatively difficult to discern the behavior of the target policy, which affects the learning outcome.

**Table 2: Hyperparameters of SAIA**
| Hyperparameter | Value |
| --- | --- |
| shared parameter in ILfD and ILfO |  |
| Optimizer | Adam |
| Generator’s network architecture | MLP(256, 256, 256) |
| Discriminator’s network architecture | MLP(256, 256, 256) |
| learning rate (Meta-World) | 0.001 |
| learning rate (Parking) | 0.0001 |
| batch size | 256 |
| Discount factor $\gamma$ | 0.99 |
| $\nu$ / $Q$ update frequency | 8 / 4 |
| $D$ update frequency | 4800 |
| additional parameter in ILfO |  |
| Inverse action model update frequency | 4800 |
| Inverse action model regularization coefficient | 0.01 |

**Table 3: Hyperparameters of SA-RL for the behavior-targeted attack**
| Hyperparameter | Value |
| --- | --- |
| shared parameter in ILfD and ILfO |  |
| Optimizer | Adam |
| Policy’s network architecture | MLP(256, 256, 256) |
| learning rate | 0.001 |
| batch size | 256 |
| Discount factor $\gamma$ | 0.99 |
| $\nu$ / $Q$ update frequency | 8 / 4 |

**Table 4: Hyperparameters of victim**
| Hyperparameter | Value |
| --- | --- |
| Optimizer | Adam |
| Network architecture | MLP(256, 256, 256) |
| learning rate | 0.001 |
| batch size | 256 |
| Discount factor $\gamma$ (Meta-World) | 0.99 |
| Discount factor $\gamma$ (Parking) | 0.95 |
| Soft update coefficient $\tau$ | 0.005 |
| $\pi$ update frequency | 1 |

## Peer Reviews

confidence: 4
contribution: 3
initial_rating: 5
presentation: 3
questions: See Weakness
soundness: 3
strengths: 1. This paper studies an interesting and important problem: adversarial attacks in DRL and their defense

2. This paper provides a complete story that gives both an attack and a defense. In addition, for the attack part, they are the first black-box attack in their targeted testing time attack setting.

3. The selection of the baselines is reasonable, and the experiment results look very strong. Both the attack and defense perform significantly better than their baselines.

4. Considering the promising results, their methods seem simple and easy to implement, which makes them more practical.
summary: The paper studies the problem of deep RL under poisoning attack. It considers an adversary to manipulate the behavior of a policy used by the learning agent during testing time. It develops an efficient attack and defense in this setting and provides the theoretical insight behind its methods. The performance of its methods is verified with abundant experiments, and the experiment results seem promising.
weaknesses: 1. The explanation of the motivation is not enough. This work only explains an example of autonomous driving. It should also explain why the attack is realistic: how this attack happens in the real world and what bad things will happen under the attack. It is even better to find evidence showing that behavior manipulation attacks already threaten our world.

2. An explanation of the challenges is missing. The problem studied in this problem should not be easy, but it is beneficial to explicitly clarify exactly why the problem is hard to solve and what the challenges are.

3. This work's theoretical analysis is weak in that it doesn't provide any guarantees on their defense algorithm. Is there a chance that some guarantees can be provided under certain assumptions?

4. It is difficult to digest the result that the PGD attack performs almost identically to the random attack. I want to see more details on how the PGD attack is implemented and how much effort has been spent on tuning it. This baseline ought to be strong, but now it seems trivial. I think a more detailed investigation is necessary rather than a simple explanation.

5. It took me a while to find that the attack works during the testing time (no training happens during the attack). I think this needs to be clarified. It is also beneficial to discuss the related works on the training time DRL attacks to make the related work section complete, such as [1] and [2].

[1]: Sun, Yanchao, Da Huo, and Furong Huang. "Vulnerability-aware poisoning mechanism for online rl with unknown dynamics." arXiv preprint arXiv:2009.00774 (2020).

[2]: Xu, Yinglun, Qi Zeng, and Gagandeep Singh. "Efficient Reward Poisoning Attacks on Online Deep Reinforcement Learning." Transactions on Machine Learning Research.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 2
questions: 1. The nearly identical performance between BIA-ILfD and BIA-ILfO contradicts the established understanding that ILfO is generally more challenging than ILfD. This observation in very easy MetaWorld tasks significantly weakens the paper's empirical validation.
2. The paper fails to analyze how the quantity and quality of demonstrations affect attack performance. The use of 20 demonstrations for these MetaWorld tasks seems excessive.
3. No discussion on whether expert-level demonstrations are necessary. The assumption of having access to expert demonstrations may severely limit practical applicability.
4. Lack of limitation and efficiency analysis for the proposed attack and defences
5. Overlooks recent related work [1] about RL defences

[1] Game-Theoretic Robust Reinforcement Learning Handles Temporally-Coupled Perturbations, Liang et al, ICLR 2024
soundness: 2
strengths: 1. Shifts from action matching to behavioral imitation, enabling effective attacks under limited intervention.
2. Identifies the critical role of early-trajectory stability and action-state sensitivity in defense against behavior targeted attack
3. Provides theoretical analysis in both attack and defense methods.
summary: This paper introduces BIA (Behavior Imitation Attack), a novel attack method that forces a victim RL agent to imitate a specified target policy without requiring environment-specific heuristics or full access to the victim's policy. Rather than attempting to match actions at each individual step, BIA aims to achieve overall behavioral alignment, making it effective even when perfect action matching is impossible due to limited adversarial intervention capabilities. Additionally, the paper presents TDRT (Time-Discounted Regularization Training), the first defense framework specifically designed for behavior-targeted attacks, which applies stronger regularization in early trajectory stages and demonstrates improved robustness-performance trade-offs compared to existing untargeted defense methods.
weaknesses: See questions

---

confidence: 4
contribution: 4
initial_rating: 5
presentation: 3
questions: 1) How do the opposing goals in the tasks distribute rewards? Is one of the states (i.e. window-open) a positive reward, and the opposite negative? If that is the case, this seems identical to classic reward-min attacks, unless a formalization can be provided to differentiate the two scenarios.

2) Related to question 1, is there a way to formalize the selection process for $\pi_{tgt}$? I understand the novelty of the attack type in isolation, however, the only well-defined $\pi_{tgt}$ would be min-reward, which is the existing attack paradigm.

3) In equations 8 and 11, my understanding is that the optimization only depends on $\nu$ unless D interacts with $\pi$ in some way. Since $\pi$ is a fixed policy, why can't equation 8 be solved directly? The problem seems easier than if $\pi$ was dynamic.

4) The authors mention that there are no defense methods currently for behavior-targeted attacks, so untargeted defense methods are used. What considerations are made to adapt these methods to this setting? For instance, is the target reward used as the learning objective for PA-ATLA, or a different notion of reward?

Minor comments:\
-$\hat{p}$ is defined in eq 10 but unused in eq 9.\
-Some misspellings throughout, like the "Notaion" header in Section 3.
soundness: 2
strengths: The attention to behavior-manipulating attacks is very novel. Although the concept has been mentioned before, this work is the first to provide formalizations and a solution. 

The problem setup and theoretical contributions are clear.

The attention to both adversarial and robust angles of the problem makes a thorough contribution.
summary: The paper provides formalizations for a previously uncovered adversarial RL scenario in which an adversary is directing the victim toward some specific target behavior. Under this formulation, the paper proposes a robust policy regularizer based on the F-divergence between the policy and the composite policy+adversary. Empirical results demonstrate the effectiveness of the attacks and defenses provided.
weaknesses: A few baselines are missing which should be compared to. For defenses, there are methods [1] and [2]  and [3] that should be considered versus TDRT. For attacks, the PA-AD component of [3] should be compared to BIA-ILfD/O.

The empirical setup is unclear, as is the presentation of the results in Table 1. The information in Table 1 is confusing, for instance, the attack rewards appear to be higher-is-better (assuming boldface = best), but the boldface scores are lower than the target reward. This is more confusing when compared to Table 2, which is clearly lower-is-better for the attacks.

The description of experimental tasks is lacking--from section 7.1, it is unclear how rewards are distributed for each goal, and how they correlate to agent performance.

*[1] Xiangyu Liu, Chenghao Deng, Yanchao Sun, Yongyuan Liang, Furong Huang: Beyond Worst-case Attacks: Robust RL with Adaptive Defense via Non-dominated Policies. ICLR 2024* \
*[2] Roman Belaire, Pradeep Varakantham, Thanh Hong Nguyen, David Lo: Regret-based Defense in Adversarial Reinforcement Learning. AAMAS 2024: 2633-2640*\
*[3] Yanchao Sun, Ruijie Zheng, Yongyuan Liang, Furong Huang: Who Is the Strongest Enemy? Towards Optimal and Efficient Evasion Attacks in Deep RL. ICLR 2022*

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: 1. One of the main differentiation of this paper from existing works that the authors claimed are that behavioral manipulation is different from naive adversarial attacks that seeks to minimize rewards. While I understand this conceptually, I find it hard to imagine a situation in a real world where adversarial behavior manipulation does not somehow lead to the same scenario as reward minimization. Could the authors provide some concrete examples?

2. Related to the question above, in the contributions, the authors wrote: "TDRT is robust against attacks that do not significantly reduce rewards but greatly alter behavior". Does this assume that there are environments where rewards are not strongly correlated with sub-optimal behavior? In other words, is there an assumption that the reward function still returns a relatively high reward when the policy is suboptimal?

3. On the topic of time-discounted regularization, could the authors comment on what happens in scenarios where the RL is non-episodic or is facing an infinite horizon problem? I can understand if the authors claim that this method works for situations where the initial time steps are critical, but there are also many problems where the actions and state are equally critical in the later stages of the episode.

4. For the attack algorithm, the authors mentioned that a target policy is not needed, only access to the trajectory of the target policy is needed. In such cases when target policy is not available, is there a specific amount of trajectory that is needed for the attack to be mounted successfully?

5. In Equation 12. the formulation suggest that the loss function minimizes the victim's behavior even under the worse-case adversarial policy. How is the worse-case adversarial policy defined here?  Isn't the premise of the attack a policy that doesn't necessarily minimizes the reward but rather pushes the victim towards a target behavior?

6. In the results section for Defense, could the authors explain why the clean rewards represent rewards when the victim is trained to achieve the adversarial task without attacks? Shouldn't the clean rewards represent the victim's performance for the nominal task without any attack and wouldn't a comparison showing how the naive and adversarially trained victim policy performs in the a normal and attacks setting makes more sense? Please let me know if I misunderstand this section.

7. As mentioned in the section above, additional results on more task in the MetaWorld / MuJoCo showing the effectiveness of the proposed attack and defense method would definitely make the results more convincing.
soundness: 3
strengths: 1. Overall, the paper is relatively well written, clear and easy to follow. 

2. The problem of adversarial manipulation towards a targeted behavior and the corresponding need to defend against such attacks are not necessarily new, but I believe the way the authors formulate the adversarial problem and derive corresponding algorithm and the formulation of the time-discounted regularization is original, to the best of my knowledge. 

3. In terms of significance, I believe that this area of research (adversarial manipulation and defense for RL) is a niche (more on that below) but important area of study. More importantly, I believe any advancement in this area could also lead to advancement in other areas of RL robustness.
summary: This paper first proposes a method to mount a targeted black-box attack to adversarially manipulate a victim RL policy towards a target policy. Unlike previous works, the proposed method, leverages imitation learning and is extendable to the no-box setting and does not require environment heuristics or the creation of a target policy, but only the trajectories of the target policy is required. Additionally, the authors also developed a defense framework that is specific towards behavioral manipulation by introducing a time-discounted regularization to induce robustness of the victim policy towards adversarial manipulation while maintaining nominal performance. Experiments were shown on MuJoCo and MetaWorld environments.
weaknesses: 1. The main motivation for behavior manipulation and claim that it is different from reward minimization from adversarial point of view is a little challenging to imagine in the real world.

2. Similarly, I'm not convinced that the idea of time-discounted regularization is a generalizable method of defense. 

3. The results shown in the main paper are convincing but somewhat limited and the results in MuJoCo shown in the Appendix are somewhat mixed, which further weakens the paper's claims.

Meta-review: The reviewers agree that the paper addresses an interesting and novel problem, but the contribution falls short in terms of motivation, theoretical rigor, and empirical strength. Specific concerns include the limited applicability of the proposed methods, inadequate baseline comparisons, and a lack of compelling real-world examples to justify the problem's significance. Despite revisions during the discussion phase, these critical issues remain unresolved.

Thus, I recommend rejection.

Decision: Reject