Title: Learning Representations in Reinforcement Learning: An Information Bottleneck Approach

Abstract: The information bottleneck principle in (Tishby et al., 2000) is an elegant and useful approach to representation learning. In this paper, we investigate the problem of representation learning in the context of reinforcement learning using the information bottleneck framework, aiming at improving the sample efficiency of the learning algorithms. We analytically derive the optimal conditional distribution of the representation, and provide a variational lower bound. Then, we maximize this lower bound with the Stein variational (SV) gradient method (originally developed in (Liu & Wang, 2016; Liu et al., 2017) ). We incorporate this framework in the advantageous actor critic algorithm (A2C) (Mnih et al., 2016) and the proximal policy optimization algorithm (PPO) (Schulman et al., 2017) . Our experimental results show that our framework can improve the sample efficiency of vanilla A2C and PPO significantly. Finally, we study the information bottleneck (IB) perspective in deep RL with the algorithm called mutual information neural estimation(MINE) (Belghazi et al., 2018) . We experimentally verify that the information extraction-compression process also exists in deep RL and our framework is capable of accelerating this process. We also analyze the relationship between MINE and our method, through this relationship, we theoretically derive an algorithm to optimize our IB framework without constructing the lower bound.

1. Introduction:

In training a reinforcement learning algorithm, an agent interacts with the environment, explores the (possibly unknown) state space, and learns a policy from the exploration sample data. In many cases, such samples are quite expensive to obtain (e.g., requires interactions with the physical environment). Hence, improving the sample efficiency of the learning algorithm is a key problem in RL and has been studied extensively in the literature. Popular techniques include experience reuse/replay, which leads to powerful off-policy algorithms (e.g., (Mnih et al., 2013; Silver et al., 2014; Van Hasselt et al., 2015; Nachum et al., 2018a; Espeholt et al., 2018 )), and model-based algorithms (e.g., (Hafner et al., 2018; Kaiser et al., 2019) ). Moreover, it is known that effective representations can greatly reduce the sample complexity in RL. This can be seen from the following motivating example: In the environment of a classical Atari game: Seaquest, it may take dozens of millions samples to converge to an optimal policy when the input states are raw images (more than 28,000 dimensions), while it takes less samples when the inputs are 128-dimension pre-defined RAM data (Sygnowski & Michalewski, 2016) . Clearly, the RAM data contain much less redundant information irrelevant to the learning process than the raw images. Thus, we argue that an efficient representation is extremely crucial to the sample efficiency.

In this paper, we try to improve the sample efficiency in RL from the perspective of representation learning using the celebrated information bottleneck framework (Tishby et al., 2000) . In standard deep learning, the experiments in (Shwartz-Ziv & Tishby, 2017) show that during the training process, the neural network first "remembers" the inputs by increasing the mutual information between the inputs and the representation variables, then compresses the inputs to efficient representation related to the learning task by discarding redundant information from inputs (decreasing the mutual information between inputs and representation variables). We call this phenomena "information extraction-compression process" "information extraction-compression process" "information extraction-compression process"(information E-C process). Our experiments shows that, similar to the results shown in (Shwartz-Ziv & Tishby, 2017) , we first (to the best of our knowledge) observe the information extraction-compression phenomena in the context of deep RL (we need to use MINE(Belghazi et al., 2018) for estimating the mutual information). This observation motivates us to adopt the information bottleneck (IB) framework in reinforcement learning, in order to accelerate the extraction-compression process. The IB framework is intended to explicitly enforce RL agents to learn an efficient representation, hence improving the sample efficiency, by discarding irrelevant information from raw input data. Our technical contributions can be summarized as follows:

1. We observe that the "information extraction-compression process" also exists in the context of deep RL (using MINE (Belghazi et al., 2018) to estimate the mutual information).

2. We derive the optimization problem of our information bottleneck framework in RL. In order to solve the optimization problem, we construct a lower bound and use the Stein variational gradient method developed in (Liu et al., 2017) to optimize the lower bound.

3. We show that our framework can accelerate the information extraction-compression process. Our experimental results also show that combining actor-critic algorithms (such as A2C, PPO) with our framework is more sample-efficient than their original versions.

4.:

We analyze the relationship between our framework and MINE, through this relationship, we theoretically derive an algorithm to optimize our IB framework without constructing the lower bound.

Finally, we note that our IB method is orthogonal to other methods for improving the sample efficiency, and it is an interesting future work to incorporate it in other off-policy and model-based algorithms.

2. Related Work:

Information bottleneck framework was first introduced in (Tishby et al., 2000) . They solve the framework by iterative Blahut Arimoto algorithm, which is infeasible to apply to deep neural networks. (Shwartz-Ziv & Tishby, 2017) tries to open the black box of deep learning from the perspective of information bottleneck, though the method they use to compute the mutual information is not precise. (Alemi et al., 2016) derives a variational information bottleneck framework, yet apart from adding prior target distribution of the representation distribution P (Z|X), they also assume that P (Z|X) itself must be a Gaussian distribution, which limits the capabilities of the representation function. (Peng et al., 2018) extends this framework to variational discriminator bottleneck to improve GANs (Goodfellow et al., 2014) , imitation learning and inverse RL.

As for improving sample-efficiency, (Mnih et al., 2013; Van Hasselt et al., 2015; Nachum et al., 2018a) mainly utilize the experience-reuse. Besides experience-reuse, (Silver et al., 2014; Fujimoto et al., 2018) tries to learn a deterministic policy, (Espeholt et al., 2018) seeks to mitigate the delay of off-policy. (Hafner et al., 2018; Kaiser et al., 2019) learn the environment model. Some other powerful techniques can be found in (Botvinick et al., 2019) .

State representation learning has been studied extensively, readers can find some classic works in the overview (Lesort et al., 2018) . Apart from this overview, (Nachum et al., 2018b) shows a theoretical foundation of maintaining the optimality of representation space. (Bellemare et al., 2019) proposes a new perspective on representation learning in RL based on geometric properties of the space of value function. (Abel et al., 2019) learns representation via information bottleneck(IB) in imitation/apprenticeship learning. To the best of our knowledge, there is no work that intends to directly use IB in basic RL algorithms.

3. Preliminaries:

A Markov decision process(MDP) is a tuple, (X , A, R, P, µ), where X is the set of states, A is the set of actions, R : X × A × X → R is the reward function, P : X × A × X →[0, 1] is the transition probability function(where P (X ′ |X, a) is the probability of transitioning to state X ′ given that the previous state is X and the agent took action a in X), and µ : X →[0, 1] is the starting state distribution. A policy π : X → P(A) is a map from states to probability distributions over actions, with π(a|X) denoting the probability of choosing action a in state X.

In reinforcement learning, we aim to select a policy π which maximizes

K(π) = E τ ∼π [ ∑ ∞ t=0 γ t R(X t , a t , X t+1 )],

with a slight abuse of notation we denote R(X t , a t , X t+1 ) = r t . Here γ ∈ [0, 1) is a discount factor, τ denotes a trajectory (X 0 , a 0 , X 1 , a 1 , ...). Define the state value function as

V π (X) = E τ ∼π [ ∑ ∞ t=0 γ t r t |X 0 = X],

which is the expected return by policy π in state X. And the state-action value function

Q π (X, a) = E τ ∼π [ ∑ ∞ t=0 γ t r t |X 0 = X, a 0 = a]

is the expected return by policy π after taking action a in state X.

Actor-critic algorithms take the advantage of both policy gradient methods and valuefunction-based methods such as the well-known A2C (Mnih et al., 2016) . Specifically, in the case that policy π(a|X; θ) is parameterized by θ, A2C uses the following equation to approximate the real policy gradient

∇ θ K(π) = ∇ θ Ĵ(θ): ∇ θ Ĵ(θ) ≈ ∞ ∑ t=0 ∇ θ [log π(a t |X t ; θ)(R t -b(X t )) + α 2 H(π(•|X t ))] = ∞ ∑ t=0 ∇ θ Ĵ(X t ; θ) (1)

where R t = ∑ ∞ i=0 γ i r t+i is the accumulated return from time step t, H(p) is the entropy of distribution p and b(X t ) is a baseline function, which is commonly replaced by V π (X t ).

A2C also includes the minimization of the mean square error between R t and value function V π (X t ). Thus in practice, the total objective function in A2C can be written as:

J(θ) ≈ ∞ ∑ t=0 log π(a t |X t ; θ)(R t -V π (X t )) -α 1 ∥R t -V π (X t )∥ 2 + α 2 H(π(•|X t )) = ∞ ∑ t=0 J(X t ; θ) (2)

where α 1 , α 2 are two coefficients.

In the context of representation learning in RL, J(X t ; θ)(including V π (X t ) and Q π (X t , a t )) can be replaced by J(Z t ; θ) where Z t is a learnable low-dimensional representation of state X t . For example, given a representation function

Z ∼ P ϕ (•|X) with parameter ϕ, define V π (Z t ; X t , ϕ) | Zt∼P ϕ (•|Xt) = V π (X t ). For simplicity, we write V π (Z t ; X t , ϕ) | Zt∼P ϕ (•|Xt) as V π (Z t ).

4 Framework

4.1. Information Bottleneck in Reinforcement Learning:

The information bottleneck framework is an information theoretical framework for extracting relevant information, or yielding a representation, that an input X ∈ X contains about an output Y ∈ Y. An optimal representation of X would capture the relevant factors and compress X by diminishing the irrelevant parts which do not contribute to the prediction of Y . In a Markovian structure X → Z → Y where X is the input, Z is representation of X and Y is the label of X, IB seeks an embedding distribution P ⋆ (Z|X) such that:

P ⋆ (Z|X) = arg max P (Z|X) I(Y, Z) -βI(X, Z) = arg max P (Z|X) H(Y ) -H(Y |Z) -βI(X, Z) = arg max P (Z|X) -H(Y |Z) -βI(X, Z) (3)

for every X ∈ X , which appears as the standard cross-entropy loss1 in supervised learning with a MI-regularizer, β is a coefficient that controls the magnitude of the regularizer.

Next we derive an information bottleneck framework in reinforcement learning. Just like the label Y in the context of supervised learning as showed in (3), we assume the supervising signal Y in RL to be the accurate value R t of a specific state X t for a fixed policy π, which can be approximated by an n-step bootstrapping function

Y t = R t = ∑ n-2 i=0 γ i r t+i + γ n-1 V π (Z t+n-1 ) in practice. Let P (Y |Z) be the following distribution: P (Y t |Z t ) ∝ exp(-α(R t -V π (Z t )) 2 ) (4)

.This assumption is heuristic but reasonable: If we have an input X t and its relative label Y t = R t , we now have X t 's representation Z t , naturally we want to train our decision function V π (Z t ) to approximate the true label Y t . If we set our target distribution to be

C • exp(-α(R t -V π (Z t )) 2 ), the probability decreases as V π (Z t ) gets far from Y t while increases as V π (Z t ) gets close to Y t .

For simplicity, we just write P (R|Z) instead of P (Y t |Z t ) in the following context.

With this assumption, equation ( 3) can be written as:

P ⋆ (Z|X) = arg max P (Z|X) E X,R,Z∼P (X,R,Z) [log P (R|Z)] -βI(X, Z) = arg max P (Z|X) E X∼P (X),Z∼P (Z|X),R∼P (R|Z) [-α(R -V π (Z)) 2 ] -βI(X, Z) (5)

The first term looks familiar with classic mean squared error in supervisd learning. In a network with representation parameter ϕ and policy-value parameter θ, policy loss Ĵ(Z; θ) in equation( 1) and IB loss in ( 5) can be jointly written as:

L(θ, ϕ) = E X∼P (X),Z∼P ϕ (Z|X) [ Ĵ(Z; θ) + E R [-α(R -V π (Z; θ)) 2 ] J(Z;θ) ] -βI(X, Z; ϕ) (6)

where I(X, Z; ϕ) denotes the MI between X and Z ∼ P ϕ (•|X). Notice that J(Z; θ) itself is a standard loss function in RL as showed in (2). Finally we get the ultimate formalization of IB framework in reinforcement learning:

P ϕ * (Z|X) = arg max P ϕ (Z|X) E X∼P (X),Z∼P ϕ (Z|X) [J(Z; θ)] -βI(X, Z; ϕ) (7)

The following theorem shows that if the mutual information I(X, Z) of our framework and common RL framework are close, then our framework is near-optimality.

Theorem Theorem Theorem 1 (Near-optimality theorem). Policy π r = π θ r , parameter ϕ r , optimal policy π ⋆ = π θ ⋆ and its relevant representation parameter ϕ ⋆ are defined as following:

θ r , ϕ r = arg min θ,ϕ E P ϕ (X,Z) [log P ϕ (Z|X) P ϕ (Z) - 1 β J(Z; θ)] (8) θ ⋆ , ϕ ⋆ = arg min θ,ϕ E P ϕ (X,Z) [- 1 β J(Z; θ)] (9) Define J π r as E P ϕ r (X,Z) [J(Z; θ r )] and J π ⋆ as E P ϕ ⋆ (X,Z) [J(Z; θ ⋆ )]. Assume that for any ϵ > 0, |I(X, Z; ϕ ⋆ ) -I(X, Z; ϕ r )| < ϵ β , we have |J π r -J π ⋆ | < ϵ.

4.2. Target Distribution Derivation and Variational Lower Bound Construction:

In this section we first derive the target distribution in (7) and then seek to optimize it by constructing a variational lower bound.

We would like to solve the optimization problem in (7):

EQUATION

Combining the derivative of L 1 and L 2 and setting their summation to 0, we can get that

P ϕ (Z|X) ∝ P ϕ (Z) exp( 1 β J(Z; θ)) (11)

We provide a rigorous derivation of (11) in the appendix(A.2). We note that though our derivation is over the representation space instead of the whole network parameter space, the optimization problem (10) and the resulting distribution ( 11) are quite similar to the one studied in (Liu et al., 2017) in the context of Bayesian inference. However, we stress that our formulation follows from the information bottleneck framework, and is mathematically different from that in (Liu et al., 2017) . In particular, the difference lies in the term L 2 , which depends on the the distribution P ϕ (Z | X) we want to optimize (while in (Liu et al., 2017) , the corresponding term is a fixed prior).

The following theorem shows that the distribution in ( 11) is an optimal target distribution (with respect to the IB objective L). The proof can be found in the appendix(A.3). Theorem Theorem Theorem 2. (Representation Improvement Theorem) Consider the objective function L(θ, ϕ) = E X∼P (X),Z∼P ϕ (Z|X) [J(Z; θ)] -βI(X, Z; ϕ), given a fixed policy-value parameter θ, representation distribution P ϕ (Z|X) and state distribution P (X). Define a new representation distribution:

P φ(Z |X) ∝ P ϕ (Z) exp( 1 β J(Z; θ)). We have L(θ, φ) ≥ L(θ, ϕ).

Though we have derived the optimal target distribution, it is still difficult to compute P ϕ (Z).

In order to resolve this problem, we construct a variational lower bound with a distribution

U (Z) which is independent of ϕ. Notice that ∫ dZP ϕ (Z) log P ϕ (Z) ≥ ∫ dZP ϕ (Z) log U (Z)

. Now, we can derive a lower bound of L(θ, ϕ) in ( 6) as follows:

L(θ, ϕ) = E X,Z [J(Z; θ) -β log P ϕ (Z|X)] + β ∫ dZP ϕ (Z) log P ϕ (Z) ≥ E X,Z [J(Z; θ) -β log P ϕ (Z|X)] + β ∫ dZP ϕ (Z) log U (Z) = E X∼P (X),Z∼P ϕ (Z|X) [J(Z; θ) -β log P ϕ (Z|X) + β log U (Z)] = L(θ, ϕ) (12)

Naturally the target distribution of maximizing the lower bound is:

P ϕ (Z|X) ∝ U (Z) exp( 1 β J(Z; θ)) (13)

4.3. Optimization by Stein Variational Gradient Descent:

Next we utilize the method in (Liu & Wang, 2016 ) (Liu et al., 2017 ) (Haarnoja et al., 2017) to optimize the lower bound.

Stein variational gradient descent(SVGD) is a non-parametric variational inference algorithm that leverages efficient deterministic dynamics to transport a set of particles {Z i } n i=1 to approximate given target distributions Q(Z). We choose SVGD to optimize the lower bound because of its ability to handle unnormalized target distributions such as (13).

Briefly, SVGD iteratively updates the "particles" {Z i } n i=1 via a direction function Φ ⋆ (•) in the unit ball of a reproducing kernel Hilbert space (RKHS) H:

EQUATION

where Φ * (•) is chosen as a direction to maximally decrease2 the KL divergence between the particles' distribution P (Z) and the target distribution

EQUATION

where P [ϵΦ] is the distribution of Z + ϵΦ(Z) and P is the distribution of Z. (Liu & Wang, 2016) showed a closed form of this direction:

EQUATION

)

where K is a kernel function(typically an RBF kernel function). Notice that C has been omitted.

In our case, we seek to minimize

D KL (P ϕ (•|X)|| U (•) exp( 1 β J(•;θ)) C ) | C= ∫ dZU (Z) exp( 1 β J(Z;θ))

, which is equivalent to maximize L(θ, ϕ), the greedy direction yields:

EQUATION

In practice we replace log U ( Ẑ) with ζ log U ( Ẑ) where ζ is a coefficient that controls the magnitude of ∇ Ẑ log U ( Ẑ). Notice that Φ(Z i ) is the greedy direction that Z i moves towards L(θ, ϕ)'s target distribution as showed in (13)(distribution that maximizes L(θ, ϕ)). This

means Φ(Z i ) is the gradient of L(Z i , θ, ϕ): ∂ L(Zi,θ,ϕ) ∂Zi ∝ Φ(Z i ).

Since our ultimate purpose is to update ϕ, by the chain rule, ∂ L(Zi,θ,ϕ)

EQUATION

Φ(Z i ) is given in equation( 17). In practice we update the policy-value parameter θ by common policy gradient algorithm since:

EQUATION

and update representation parameter ϕ by (18).

4.4. Verify the information E-C process with MINE:

This section we verify that the information E-C process exists in deep RL with MINE and our framework accelerates this process.

Mutual information neural estimation(MINE) is an algorithm that can compute mutual information(MI) between two high dimensional random variables more accurately and efficiently. Specifically, for random variables X and Z, assume T to be a function of X and Z, the calculation of I(X, Z) can be transformed to the following optimization problem:

EQUATION

The optimal function T ⋆ (X, Z) can be approximated by updating a neural network T (X, Z; η).

With the aid of this powerful tool, we would like to visualize the mutual information between input state X and its relative representation Z: Every a few update steps, we sample a batch of inputs and their relevant representations {X i , Z i } n i=1 and compute their MI with MINE, every time we train MINE(update η) we just shuffle {Z i } n i=1 and roughly assume the shuffled representations {Z shuffled i } n i=1 to be independent with {X i } n i=1 :

EQUATION

Figure( 1) is the tensorboard graph of mutual information estimation between X and Z in Atari game Pong, x-axis is update steps and y-axis is MI estimation. More details and results can be found in appendix(A.6) and (A.7). As we can see, in both A2C with our framework and common A2C, the MI first increases to encode more information from inputs("remember" the inputs), then decreases to drop irrelevant information from inputs("forget" the useless information). And clearly, our framework extracts faster and compresses faster than common A2C as showed in figure(1)(b). 

EQUATION

Combining the result with Theorem(2), we get:

exp T * (X,Z;η) = C P ϕ (Z|X) P ϕ (Z) ∝ exp( 1 β J(Z; θ)) (23)

Through this relationship, we theoretically derive an algorithm that can directly optimize our framework without constructing the lower bound, we put this derivation in the appendix(A.5).

5. Experiments:

In the experiments we show that our framework can improve the sample efficiency of basic RL algorithms(typically A2C and PPO). Our anonymous code can be found in https://github. com/AnonymousSubmittedCode/SVIB. Other results can be found in last two appendices.

In A2C with our framework, we sample Z by a network ϕ(X, ϵ) where ϵ ∼ N (•; 0, 0.1) and the number of samples from each state X is 32, readers are encouraged to take more samples if the computation resources are sufficient. We set the IB coefficient as β = 0.001. We choose two prior distributions U (Z) of our framework, the first one is uniform distribution, apparently when U (Z) is the uniform distribution, ∇ Ẑ log U ( Ẑ) | Ẑ=Z can be omitted. The second one is a Gaussian distribution, which is defined as follows: for a given state X i , sample a batch of {Z i j } n=32 j=1 , then: (Liu et al., 2017) , the kernel function in (17) we used is the Gaussian RBF kernel K(Z i , Z j ) = exp(-∥Z i -Z j ∥ 2 /h) where h = med 2 /2 log(n + 1), med denotes the median of pairwise distances between the particles {Z i j } n i=1 . As for the hyper-parameters in RL, we simply choose the default parameters in A2C of Openaibaselines(https://github.com/openai/baselines/tree/master/baselines/a2c). In summary, we implement the following four algorithms: A2C with uniform SVIB A2C with uniform SVIB A2C with uniform SVIB: Use ϕ(X, ϵ) as the embedding function, optimize by our framework(algorithm(A.4)) with U (Z) being uniform distribution.

U (Z) = N (Z; µ = 1 n ∑ n j=1 Z i j , σ 2 = 1 n ∑ n j=1 (Z i j -µ) 2 ). We also set ζ as 0.005∥∇ Ẑ 1 β J( Ẑ; θ)/∇ Ẑ log U ( Ẑ)∥ | Ẑ=Z to control the magnitude of ∇ Ẑ log U ( Ẑ) | Ẑ=Z . Following

A2C with Gaussian SVIB A2C with Gaussian SVIB A2C with Gaussian SVIB: Use ϕ(X, ϵ) as the embedding function, optimize by our framework(algorithm(A.4)) with U (Z) being Gaussian distribution. A2C A2C A2C:Regular A2C in Openai-baselines with ϕ(X) as the embedding function.

A2C with noise A2C with noise A2C with noise(For fairness):A2C with the same embedding function ϕ(X, ϵ) as A2C with our framework. We can see that A2C with our framework is more sample-efficient than both A2C and A2C with noise in nearly all 5 games. We make exponential moving average of each game to smooth the curve(In PPO-Pong, we add 21 to all four curves in order to make exponential moving average). We can see that our framework improves sample efficiency of basic A2C and PPO.

Notice that in SpaceInvaders, A2C with Gaussian SVIB is worse. We suspect that this is because the agent excessively drops information from inputs that it misses some information related to the learning process. There is a more detailed experimental discussion about this phenomena in appendix(A.7) . We also implement four PPO-based algorithms whose experimental settings are same as A2C except that we set the number of samples as 26 for the sake of computation efficiency. Results can be found in the in figure(2)(f)-(h).

6. Conclusion:

We study the information bottleneck principle in RL: We propose an optimization problem for learning the representation in RL based on the information-bottleneck framework and derive the optimal form of the target distribution. We construct a lower bound and utilize Stein Variational gradient method to optimize it. Finally, we verify that the information extraction and compression process also exists in deep RL, and our framework can accelerate this process. We also theoretically derive an algorithm based on MINE that can directly optimize our framework and we plan to study it experimentally in the future work.

A Appendix:

A.1 Proof of Theorem 1 Theorem Theorem Theorem. (Theorem 1 restated)Policy π r = π θ r , parameter ϕ r , optimal policy π ⋆ = π θ ⋆ and its relevant representation parameter ϕ ⋆ are defined as following:

θ r , ϕ r = arg min θ,ϕ E P ϕ (X,Z) [log P ϕ (Z|X) P ϕ (Z) - 1 β J(Z; θ)] (24) θ ⋆ , ϕ ⋆ = arg min θ,ϕ E P ϕ (X,Z) [- 1 β J(Z; θ)] (25) Define J π r as E P ϕ r (X,Z) [J(Z; θ r )] and J π ⋆ as E P ϕ ⋆ (X,Z) [J(Z; θ ⋆ )]. Assume that for any ϵ > 0, |I(X, Z; ϕ ⋆ ) -I(X, Z; ϕ r )| < ϵ β , we have |J π r -J π ⋆ | < ϵ.

Specifically, in value-based algorithm, this theorem also holds between expectation of two value functions. Proof Proof Proof. From equation( 24) we can get:

I(X, Z; ϕ ⋆ ) - 1 β J π ⋆ ≥ I(X, Z; ϕ r ) - 1 β J π r (26)

From equation( 25) we can get:

- 1 β J π r ≥ - 1 β J π ⋆ (27)

These two equations give us the following inequality:

EQUATION

According to the assumption, naturally we have:

|J π r -J π ⋆ | < ϵ (29)

Notice that if we use our IB framework in value-based algorithm, then the objective function J π can be defined as:

EQUATION

where R π (Z) = ∫ X∈{X ′ :ϕ(X ′ )=Z} dXR π (X) and d π is the discounted future state distribution, readers can find detailed definition of d π in the appendix of (Chen et al., 2018) . We can get:

|V π r -V π ⋆ | < ϵ (31)

A.2 Target Distribution Derivation

We show the rigorous derivation of the target distribution in (11).

Denote P as the distribution of X, P Z ϕ (Z) = P ϕ (Z) as the distribution of Z. We use P ϕ as the short hand notation for the conditional distribution P ϕ (Z|X). Moreover, we write L(θ, ϕ) = L(θ, P ϕ ) and ⟨p, q⟩ X = ∫ dXp(X)q(X). Notice that P Z ϕ (Z) = ⟨P (•), P ϕ (Z|•)⟩ X . Take the functional derivative with respect to P ϕ of the first term L 1 :

⟨ δL 1 (θ, P ϕ ) δP ϕ , Φ ⟩ XZ = ∫ dZdX δL 1 (θ, P ϕ (Z|X)) δP ϕ (Z|X) Φ(Z, X) = [ d dϵ L 1 (θ, P ϕ + ϵΦ) ] ϵ=0 = [ d dϵ ∫ dXP (X) ⟨ P ϕ (•|X) + ϵΦ(•, X), J(•; θ) -β log(P ϕ (•|X) + ϵΦ(•, X)) ⟩ Z ] ϵ=0 = ∫ dXP (X) [ ⟨ Φ(•, X), J(•; θ) -β log P ϕ (•|X) ⟩ + ⟨ P ϕ (•|X), -β Φ(•, X) P ϕ (•|X) ⟩ Z ] = ⟨ P (•)[J(•; θ) -β log P ϕ (•|•) -β], Φ(•, •) ⟩ XZ

Hence, we can see that

δL 1 (θ, P ϕ ) δP ϕ (Z|X) = P (X)[J(Z; θ) -β log P ϕ (Z|X) -β].

Then we consider the second term. By the chain rule of functional derivative, we have that

EQUATION

Combining the derivative of L 1 and L 2 and setting their summation to 0, we can get that Apparently I ⋆ (X, Z) is 0 without any constraints, yet if we use MINE to optimize our IB framework in (6), I ⋆ (X, Z) might not be 0. With the help of MINE, like what people did in supervised learning, the objective function in (6) can be written as:

EQUATION

EQUATION

The key steps to optimize L(θ, ϕ, η) is to update θ, ϕ, η iteratively as follows:

EQUATION

Yet in our experiment, these updates of θ, ϕ, η did not work at all. We suspect it might be caused by the unstability of T (X, Z; η). We have also found that the algorithm always tends to push parameter ϕ to optimize the mutual information term to 0 regardless of the essential RL loss J(Z; θ): In the early stage of training process, policy π is so bad that the agent is unable to get high reward, which means that the RL loss is extremely hard to optimize. Yet the mutual information term is relatively easier to optimize. Thus the consequence is that these updates tend to push parameter ϕ to optimize the mutual information term to 0 in the early training stage.

However, MINE's connection with our framework makes it possible to optimize T (X, Z; η) in a more deterministic way and put the RL loss into mutual information term.

According to equation( 23), T (X, Z; η) = 1 β J(Z; θ) + C ′ , this implies that we could introduce another function T in place of T (X, Z; η) for the sake of variance reduction:

T (X, Z; η) ← 1 β J(Z; θ) + T (X, Z; η) (42)

in the sense that parameter η only needs to approximate the constant C ′ (T ), the optimization steps turn out to be:

EQUATION

This algorithm has the following three potential advantages in summary:

1. We're able to optimize T (X, Z; η) in a more deterministic way instead of the form like equation( 40), which is hard to converge in reinforcement learning. 2. We prevent excessive optimization in mutual information term by putting RL loss J(Z; θ) into this term. 3. We're able to directly optimize the IB framework without constructing a variational lower bound.

Here we just analyze and derive this algorithm theoretically, implementation and experiments will be left as the future work.

Notice that we say if we directly optimize our IB framework with MINE, one of the problems is that the function T might be unstable in RL, yet in section(4.4) and experiments(A.6), we directly use MINE to visualize the MI. This is because when we optimize our framework, we need to start to update T every training step. While when we visualize the MI, we start to update T every 2000 training steps. Considering the computation efficiency, every time we start to update T when we use MINE to optimize our framework, we must update T in one step or a few steps. While when visualizing the MI, we update T in 256 steps. Besides, we reset parameter η every time we begin to update T when we visualize the MI, clearly we can't do this when optimizing our framework since it's a min-max optimization problem. We also add some additional experimental results of MI visualization in the appendix(A.7).

A.7 Additional experimental results of performance and MI visualization:

This section we add some additional experimental results about our framework.

Notice that in game MsPacman, performance of A2C with our framework is worse than regular A2C. According to the MI visualization of MsPacman in figure(5)(b), we suspect that this is because A2C with our framework drops the information from inputs so excessively that it misses some information relative to the learning process. To see it accurately, in figure(5)(b), the orange curve, which denotes A2C with our framework, from step(x-axis) 80 to 100, suddenly drops plenty of information. Meanwhile, in figure(4)(b), from step(xaxis) 80 to 100, the rewards of orange curve start to decrease.

As showed in figure(6), unlike Pong, Breakout, Qbert and some other shooting games, the frame of MsPacman contains much more information related to the reward: The walls, the ghosts and the tiny beans everywhere. Thus if the agent drops information too fast, it may hurt the performance. 

:

Mutual information I(X, Y ) is defined as ∫ dXdZP (X, Z) log P (X,Z) P (X)P (Z) , conditional entropy H(Y |Z) is defined as -∫ dY dZP (Y, Z) log P (Y |Z). In a binary-classification problem, -log P (Y |Z) = -(1 -Y ) log(1 -Ŷ (Z)) -Y log( Ŷ (Z)).

In fact, Φ * is chosen to maximize the directional derivative of F (P ) = -DKL(P ||Q), which appears to be the "gradient" of F

Figures and Tables:

Figure 1: Mutual information visualization in Pong

Figure(2)(a)-(e) show the performance of four A2C-based algorithms in 5 gym Atari games.We can see that A2C with our framework is more sample-efficient than both A2C and A2C with noise in nearly all 5 games.

Figure 2: (a)-(e)show the performance of four A2C-based algorithms, x-axis is time steps(2000 update steps for each time step) and y-axis is the average reward over 10 episodes, (f)-(h) show the performance of four PPO-based algorithms, x-axis is time steps(300 update steps for each time step). We make exponential moving average of each game to smooth the curve(In PPO-Pong, we add 21 to all four curves in order to make exponential moving average). We can see that our framework improves sample efficiency of basic A2C and PPO.

)A.3 Proof of Theorem 2 Theorem Theorem Theorem. (Theorem 2 restated)For L(θ, ϕ) = E X∼P (X),Z∼P ϕ (Z|X) [J(Z; θ)] -βI(X, Z; ϕ), given a fixed policy-value parameter θ, representation distribution P ϕ (Z|X) and state distribution P (X), define a new representation distribution:P φ(Z |X) ∝ P ϕ (Z) exp(1β J(Z; θ)), we have L(θ, φ) ≥ L(θ, ϕ).

Figure3: Mutual information visualization in Qbert. As policy π gets better, the agent might find new states, in this case, I(X, Z) might increase again because the agent needs to encode information from new states in order to learn a better policy. Yet finally, the MI always tends to decrease. Thus it follows the information E-C process.

Figure 4: Additional results of performance: Average rewards over 10 episodes

Figure 5: Additional results of MI visualization

Figure 6: The raw frame of MsPacman

Peer review (iclr2020):
This paper proposes a representation learning algorithm for RL based on the Information Bottleneck (IB) principle. This formulation leads to the observed state X being mapped to a latent variable Z ~ P(Z | X), in such a way that the standard loss function in actor-critic RL methods is augmented with a term minimizing the mutual information between X and Z (which can be seen as a form of regularization). This results in a loss that is difficult to optimize directly in the general case: the authors thus propose to approximate it through a variational bound, using Stein variational gradient descent (SVGD) for optimization, which is based on sampling multiple Z_i’s for a given state X, so as to compute an approximate gradient for the parameters of the function mapping X to Z. Experiments show that when augmenting the A2C algorithm with this technique, (1) the mutual information I(X, Z) decreases more quickly (better « compression » of the information), and (2) better sample efficiency is observed on 5 Atari games (with also encouraging results with PPO on 3 Atari games). In spite of the interesting theoretical contributions, I have to recommend rejection as the current empirical evaluation of the proposed approach is extremely limited, making it difficult to assess its benefits over more straightforward algorithms. On the positive side, the authors derive a sensible approach to IB representation learning in RL, and provide solutions to the optimization challenges it leads to. I did not have time to check all the maths in the Appendix (I only went through the derivations in A.1 and A.2), but they seem to make sense overall (though it is unclear to me if the new algorithm proposed in A.5 is a practical one, so I am not taking it into account in this evaluation). The key negative point is definitely the weak empirical evaluation. The main results are from a limited sample of 5 Atari games, when the full Atari benchmark has 10x more games and is known to exhibit high variance among games when comparing RL algorithms (the additional results from the Appendix on 3 additional games also show situations where the proposed method does not seem to help much, confirming that larger scale experiments are needed for a proper evaluation). In addition it seems like each algorithm is run only once (instead of using multiple seeds) and only over ~200K timesteps, which is three orders of magnitude lower than results typically reported on Atari. Another issue is that there is no comparison to other representation learning techniques (like those mentioned in the related work section, or the recent *Unsupervised State Representation Learning in Atari*), nor to a natural and more straightforward variant of the proposed method where Z would simply be sampled from a (learned) Gaussian distribution Z ~ N(mu(X), var(X)), which at first sight seems like an easier-to-optimize objective (using the reparameterization trick)… I may be wrong, but then this should probably be explained in the paper (I realize that the proposed approach is more general, but then it should be shown how this extra flexibility can lead to improved results). Finally, the impact on runtime performance is not analyzed: how much slower do A2C / PPO become when optimizing the mutual information term with SVGD? Overall it is really unclear that better RL results can be obtained through this technique. Another important issue is that I found the paper rather difficult to follow, due to some inconsistent / unclear notations or equations. Here are the main ones I noted: • The discount factor is not accounted for in the derivation of the objectives in eq. 1-2 (I know this is often the case in practice, but the reason for dropping it should at least be mentioned) • The jump from V^pi(X) to V^pi(Z) at the end of Section 3 is explained too succintly. It suggests that V^pi(Z) must be constant (equal to V^pi(X)) over all values of Z that may be sampled from X, which as far as I can tell is not the case in the rest of the paper. It is also unclear whether pi depends on Z or X. And the notation J(Z) makes it look like J does not depend on X, but it seems like it does because even if pi depends only on Z, by its definition V^pi(Z) actually still depends on X (this also leads to weird equations like eq. 33 where X does not appear in the right-hand side). Overall this is rather confusing. • The « for every X » at the top of p. 4 does not make sense to me, due to the term I(X, Z) in eq. 3 where X is a random variable and thus does not take a specific value. • The paragraph below eq. 4 is a bit confusing. It looks like it amounts to saying that Y is a Gaussian around V(Z)? • Eq. 5 suggests that R depends on Z, but shouldn’t it depend on X? If it depended on Z, then wouldn’t it influence the optimization since by modifying P(Z|X) we can control the distribution on Z and thus the distribution on R? • In eq. 10 it is unclear whether L1 and L2 contain the expectation, also L2 is defined as a function of both theta and phi but seems to depend only on theta • Below eq. 15 it is said that « P is the distribution of Z » but P does not appear in eq. 15 • In eq. 16 should the phi on the left hand side be phi* as in eq. 15? • Below eq. 16 it is said « Notice that C has been omitted », but it is unclear whether it was not included to alleviate notations or because it disappears naturally in the mathematical derivation of eq. 16 • The motivation for introducing zeta below eq. 17 is unclear, especially since it seems to play an important role considering that zeta = 0.005 << 1 is used in the experiments (with no explanation as to how this specific value was selected) • hat{L}(Z_i, theta, phi) (between eq. 17 and 18) does not seem to be defined • What is the motivation for using the Gaussian U(Z) as described in Section 5? In particular I find it weird that it depends on X_i, while U(Z) is supposed to replace the marginal P(Z) and not the conditional P(Z | X) Minor points: • In the definition of Y_t = R_t = sum_i=0^n-2 … above eq. 4, I think the sum should be up to n-1 for an n-step return • Eq. 4 uses R_t on the right hand term instead of Y_t which looks weird • Theorem 1 states « Assume that for any epsilon > 0, … »: « for any » should probably be « there exists », since if the inequality was true for any epsilon, it would imply both mutual informations are equal (also the formulation of the theorem does not make it clear that the last inequality is the main result) • Footnote 1 p. 4: I(X, Y) should be I(X, Z) • In eq. 15 the phi below the argmax should be in bold • Please add a reference that the reader can refer to in order to understand where eq. 20 is coming from • « Apparently » is used in a couple of places but should probably be replaced with another word • When U is uniform, how do you choose its support? • After « median of pairwise distances between the particles », I think i=1 should be j=1 • It is unclear to me what « A2C with noise is »: it is said that the same phi(X, epsilon) is used « as A2C with our framework », but is it the same phi as A2C with uniform SVIB or A2C with Gaussian SVIB? And whichever it is, how does it differ from the one it is equal to? • « we add 21 to all four curves in order to make exponential moving average »: I do not understand that sentence • « we set the number of samples as 26 for the sake of computation efficiency »: I fail to see how going from 32 to 26 is going to make a major difference in computational efficiency Update: thank you for your response, but in the absence of a revised version addressing my concerns (as well as those from the other reviewers), I cannot increase my rating