Learning Representations in Reinforcement Learning: An Information Bottleneck Approach
Year: 2019

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.

heading: 1 Introduction
text: 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 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.

heading: 2 Related Work
text: 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.

heading: 3 Preliminaries
text: 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 γ
tR(Xt, at, Xt+1)], with a slight abuse of notation we denote R(Xt, at, Xt+1) = rt. Here γ ∈ [0, 1) is a discount factor, τ denotes a trajectory (X0, a0, X1, a1, ...). Define the state value function as V π(X) = Eτ∼π[ ∑∞ t=0 γ
trt|X0 = X], which is the expected return by policy π in state X. And the state-action value function Qπ(X, a) = Eτ∼π[ ∑∞ t=0 γ
trt|X0 = X, a0 = 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(π) = ∇θĴ(θ):
∇θĴ(θ) ≈ ∞∑ t=0 ∇θ[log π(at|Xt; θ)(Rt − b(Xt)) + α2H(π(·|Xt))] = ∞∑ t=0 ∇θĴ(Xt; θ) (1)
where Rt = ∑∞ i=0 γ irt+i is the accumulated return from time step t, H(p) is the entropy of distribution p and b(Xt) is a baseline function, which is commonly replaced by V π(Xt). A2C also includes the minimization of the mean square error between Rt and value function V π(Xt). Thus in practice, the total objective function in A2C can be written as: J(θ) ≈ ∞∑ t=0 log π(at|Xt; θ)(Rt − V π(Xt))− α1 ∥Rt − V π(Xt)∥2 + α2H(π(·|Xt)) = ∞∑ t=0 J(Xt; θ)
(2)
where α1, α2 are two coefficients. In the context of representation learning in RL, J(Xt; θ)(including V π(Xt) and Qπ(Xt, at)) can be replaced by J(Zt; θ) where Zt is a learnable low-dimensional representation of state Xt. For example, given a representation function Z ∼ Pϕ(·|X) with parameter ϕ, define V π(Zt;Xt, ϕ) |Zt∼Pϕ(·|Xt)= V π(Xt). For simplicity, we write V π(Zt;Xt, ϕ) |Zt∼Pϕ(·|Xt) as V π(Zt).

heading: 4 Framework
text: 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 Rt of a specific state Xt for a fixed policy π, which can be approximated by an n-step bootstrapping function Yt = Rt = ∑n−2 i=0 γ
irt+i + γn−1V π(Zt+n−1) in practice. Let P (Y |Z) be the following distribution:
P (Yt|Zt) ∝ exp(−α(Rt − V π(Zt))2) (4)
.This assumption is heuristic but reasonable: If we have an input Xt and its relative label Yt = Rt, we now have Xt’s representation Zt, naturally we want to train our decision function V π(Zt) to approximate the true label Yt. If we set our target distribution to be C · exp(−α(Rt − V π(Zt))2), the probability decreases as V π(Zt) gets far from Yt while increases as V π(Zt) gets close to Yt. For simplicity, we just write P (R|Z) instead of P (Yt|Zt) in the following context. With this assumption, equation (3) can be written as:
P ⋆(Z|X) = arg max P (Z|X) EX,R,Z∼P (X,R,Z)[logP (R|Z)]− βI(X,Z)
= arg max P (Z|X)
EX∼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 Ĵ(Z; θ) in equation(1) and IB loss in (5) can be jointly written as:
L(θ, ϕ) = EX∼P (X),Z∼Pϕ(Z|X)[Ĵ(Z; θ) + ER[−α(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) EX∼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 1 (Near-optimality theorem). Policy πr = πθr , parameter ϕr, optimal policy π⋆ = πθ⋆ and its relevant representation parameter ϕ⋆ are defined as following:
θr, ϕr = argmin θ,ϕ EPϕ(X,Z)[log Pϕ(Z|X) Pϕ(Z) − 1 β J(Z; θ)] (8)
θ⋆, ϕ⋆ = argmin θ,ϕ
EPϕ(X,Z)[− 1
β J(Z; θ)] (9)
Define Jπr as EPϕr (X,Z)[J(Z; θr)] and Jπ ⋆ as EPϕ⋆ (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.
1Mutual 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) logP (Y |Z). In a binary-classification problem,
− logP (Y |Z) = −(1− Y ) log(1− Ŷ (Z))− Y log(Ŷ (Z)).
We would like to solve the optimization problem in (7): max
Pϕ(Z|X) EX∼P (X),Z∼Pϕ(Z|X)[J(Z; θ)− β logPϕ(Z|X)︸ ︷︷ ︸
L1(θ,ϕ)
+β logPϕ(Z)︸ ︷︷ ︸ L2(θ,ϕ) ] (10)
Combining the derivative of L1 and L2 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 L2, 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 2. (Representation Improvement Theorem) Consider the objective function L(θ, ϕ) = EX∼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) logPϕ(Z) ≥ ∫ dZPϕ(Z) logU(Z). Now, we can derive a lower bound of L(θ, ϕ) in (6) as follows:
L(θ, ϕ) = EX,Z [J(Z; θ)− β logPϕ(Z|X)] + β ∫ dZPϕ(Z) logPϕ(Z)
≥ EX,Z [J(Z; θ)− β logPϕ(Z|X)] + β ∫ dZPϕ(Z) logU(Z)
= EX∼P (X),Z∼Pϕ(Z|X)[J(Z; θ)− β logPϕ(Z|X) + β logU(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 {Zi}ni=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” {Zi}ni=1 via a direction function Φ⋆(·) in the unit ball of a reproducing kernel Hilbert space (RKHS) H:
Zi ← Zi + ϵΦ⋆(Zi) (14) where Φ∗(·) is chosen as a direction to maximally decrease2 the KL divergence between the particles’ distribution P (Z) and the target distribution Q(Z) = Q̂(Z)C (Q̂ is unnormalized
2In fact, Φ∗ is chosen to maximize the directional derivative of F (P ) = −DKL(P ||Q), which appears to be the ”gradient” of F
distribution, C is normalized coefficient) in the sense that
Φ⋆ ← argmax ϕ∈H {− d dϵ DKL(P[ϵϕ]||Q) s.t. ∥Φ∥H ≤ 1} (15)
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:
Φ(Zi) = EZj∼P [K(Zj , Zi)∇Ẑ log Q̂(Ẑ) |Ẑ=Zj +∇ẐK(Ẑ, Zi) |Ẑ=Zj ] (16)
where K is a kernel function(typically an RBF kernel function). Notice that C has been omitted.
In our case, we seek to minimize DKL(Pϕ(·|X)|| U(·) exp( 1β J(·;θ)) C ) |C=∫ dZU(Z) exp( 1β J(Z;θ)) , which is equivalent to maximize L̂(θ, ϕ), the greedy direction yields:
Φ(Zi) = EZj∼Pϕ(·|X)[K(Zj , Zi)∇Ẑ( 1
β J(Ẑ; θ) + logU(Ẑ)) |Ẑ=Zj +∇ẐK(Ẑ, Zi) |Ẑ=Zj ] (17)
In practice we replace logU(Ẑ) with ζ logU(Ẑ) where ζ is a coefficient that controls the magnitude of ∇Ẑ logU(Ẑ). Notice that Φ(Zi) is the greedy direction that Zi moves towards L̂(θ, ϕ)’s target distribution as showed in (13)(distribution that maximizes L̂(θ, ϕ)). This means Φ(Zi) is the gradient of L̂(Zi, θ, ϕ): ∂L̂(Zi,θ,ϕ)∂Zi ∝ Φ(Zi).
Since our ultimate purpose is to update ϕ, by the chain rule, ∂L̂(Zi,θ,ϕ)∂ϕ ∝ Φ(Zi) ∂Zi ∂ϕ . Then
for L̂(θ, ϕ) = EPϕ(X,Z)[L̂(Z, θ, ϕ)]:
∂L̂(θ, ϕ)
∂ϕ ∝ EX∼P (X),Zi∼Pϕ(·|X)[Φ(Zi) ∂Zi ∂ϕ ] (18)
Φ(Zi) is given in equation(17). In practice we update the policy-value parameter θ by common policy gradient algorithm since:
∂L̂(θ, ϕ)
∂θ = EPϕ(X,Z)[
∂J(Z; θ)
∂θ ] (19)
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:
I(X,Z) = max T
EP (X,Z)[T ]− log(EP (X)⊗P (Z)[expT ]) (20)
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 {Xi, Zi}ni=1 and compute their MI with MINE, every time we train MINE(update η) we just shuffle {Zi}ni=1 and roughly assume the shuffled representations {Zshuffledi }ni=1 to be independent with {Xi}ni=1:
I(X,Z) ≈ max η
1
n n∑ i=1 [T (Xi, Zi; η)]− log( 1 n n∑ i=1 [expT (Xi,Z shuffled i ;η)]) (21)
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).
After completing the visualization of MI with MINE, we analyze the relationship between our framework and MINE. According to (Belghazi et al., 2018), the optimal function T ∗ in (20) goes as follows:
expT ∗(X,Z;η) = C Pϕ(X,Z)
P (X)Pϕ(Z) s.t. C = EP (X)⊗Pϕ(Z)[exp
T∗ ] (22)
Combining the result with Theorem(2), we get:
expT ∗(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).

heading: 5 Experiments
text: 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, ∇Ẑ logU(Ẑ) |Ẑ=Z can be omitted. The second one is a Gaussian distribution, which is defined as follows: for a given state Xi, sample a batch of {Zij}n=32j=1 , then: U(Z) = N (Z;µ = 1n ∑n j=1 Z i j , σ 2 = 1n ∑n j=1(Z i j − µ)2).
We also set ζ as 0.005∥∇Ẑ 1 βJ(Ẑ; θ)/∇Ẑ logU(Ẑ)∥ |Ẑ=Z to control the magnitude of
∇Ẑ logU(Ẑ) |Ẑ=Z . Following (Liu et al., 2017), the kernel function in (17) we used is the Gaussian RBF kernel K(Zi, Zj) = exp(−∥Zi − Zj∥2/h) where h = med2/2 log(n + 1), med denotes the median of pairwise distances between the particles {Zij}ni=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: Use ϕ(X, ϵ) as the embedding function, optimize by our framework(algorithm(A.4)) with U(Z) being uniform distribution. A2C with Gaussian SVIB: Use ϕ(X, ϵ) as the embedding function, optimize by our framework(algorithm(A.4)) with U(Z) being Gaussian distribution. A2C:Regular A2C in Openai-baselines with ϕ(X) as the embedding function. A2C with noise(For fairness):A2C with the same embedding function ϕ(X, ϵ) as A2C with our framework. 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.
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).

heading: 6 Conclusion
text: 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.

heading: A Appendix
text: A.1 Proof of Theorem 1
Theorem. (Theorem 1 restated)Policy πr = πθr , parameter ϕr, optimal policy π⋆ = πθ⋆ and its relevant representation parameter ϕ⋆ are defined as following:
θr, ϕr = argmin θ,ϕ EPϕ(X,Z)[log Pϕ(Z|X) Pϕ(Z) − 1 β J(Z; θ)] (24)
θ⋆, ϕ⋆ = argmin θ,ϕ
EPϕ(X,Z)[− 1
β J(Z; θ)] (25)
Define Jπr as EPϕr (X,Z)[J(Z; θr)] and Jπ ⋆ as EPϕ⋆ (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. 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:
β(I(X,Z;ϕ⋆)− I(X,Z;ϕr)) ≥ Jπ ⋆ − Jπ r ≥ 0 (28)
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:
Jπ = V π = (1− γ)−1 ∫ X dXdπ(X)Rπ(X)
= (1− γ)−1 ∫ X dXdπ(X)[ ∫ Z dZPϕ(Z|X)Rπ(Z)] (30)
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, PZϕ (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 PZϕ (Z) = ⟨P (·), Pϕ(Z|·)⟩X . Take the functional derivative with respect to Pϕ of the first term L1:⟨ δL1(θ, Pϕ)
δPϕ ,Φ ⟩ XZ = ∫ dZdX δL1(θ, Pϕ(Z|X)) δPϕ(Z|X) Φ(Z,X) = [ d dϵ L1(θ, Pϕ + ϵΦ) ] ϵ=0
=
[ d
dϵ
∫ dXP (X) ⟨ Pϕ(·|X) + ϵΦ(·, X), J(·; θ)− β log(Pϕ(·|X) + ϵΦ(·, X)) ⟩ Z ] ϵ=0
= ∫ dXP (X) [⟨ Φ(·, X), J(·; θ)− β logPϕ(·|X) ⟩ + ⟨ Pϕ(·|X),−β
Φ(·, X) Pϕ(·|X) ⟩ Z ] = ⟨ P (·)[J(·; θ)− β logPϕ(·|·)− β],Φ(·, ·) ⟩ XZ
Hence, we can see that
δL1(θ, Pϕ) δPϕ(Z|X) = P (X)[J(Z; θ)− β logPϕ(Z|X)− β].
Then we consider the second term. By the chain rule of functional derivative, we have that
δL2(θ, Pϕ) δPϕ(Z|X) =
⟨ δL2(θ, Pϕ)
δPZϕ (·) , δPZϕ (·) δPϕ(Z|X) ⟩ Ẑ = β ⟨ 1 + logPZϕ (·), δPZϕ (·) δPϕ(Z|X) ⟩ Ẑ
= β ∫ dẐ(1 + logPZϕ (Ẑ))δ(Ẑ − Z)P (X) = βP (X)(1 + logPZϕ (Z)) (32)
Combining the derivative of L1 and L2 and setting their summation to 0, we can get that
Pϕ(Z|X) ∝ Pϕ(Z) exp( 1
β J(Z; θ)) (33)
A.3 Proof of Theorem 2
Theorem. (Theorem 2 restated)For L(θ, ϕ) = EX∼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(θ, ϕ).
Proof. Define I(X) as:
I(X) = ∫ Z dZPϕ̂(Z|X) = ∫ Z dZPϕ(Z) exp( 1 β J(Z; θ)) (34)
L(θ, ϕ̂) = EX{EZ∼Pϕ̂(Z|X)[J(Z; θ)]− βEZ∼Pϕ̂(Z|X)[log Pϕ(Z) exp(
1 βJ(Z; θ))
I(X)Pϕ̂(Z) ]}
= EX{βEZ∼Pϕ̂(Z|X)[log I(X)]− βEZ∼Pϕ̂(Z|X)[log Pϕ(Z)
Pϕ̂(Z) ]}
= βEX [log I(X)]− βEX,Z∼Pϕ̂(X,Z)[log Pϕ(Z)
Pϕ̂(Z) ]
= βEX [log I(X)]− βEZ∼Pϕ̂(Z)[log Pϕ(Z)
Pϕ̂(Z) ]
= βEX∼P (X)[log I(X)] + βDKL(Pϕ̂(Z)||Pϕ(Z)) (35)
L(θ, ϕ) = EX{βEZ∼Pϕ(Z|X)[log exp( 1
β J(Z; θ))] + βEZ∼Pϕ(Z|X) log
Pϕ(Z)
Pϕ(Z|X) }
= EX{βEZ∼Pϕ(Z|X)[log Pϕ(Z) exp(
1 βJ(Z; θ))
Pϕ(Z|X)I(X) ] + β log I(X)}
= βEX [log I(X)] + βEX∼P (X),Z∼Pϕ(Z|X)[log Pϕ̂(Z|X) Pϕ(Z|X) ]
= βEX∼P (X)[log I(X)]− βEX∼P (X)[DKL(Pϕ(Z|X)||Pϕ̂(Z|X))] (36)
L(θ, ϕ̂)− L(θ, ϕ) = βDKL(Pϕ̂(Z)||Pϕ(Z)) + βEX∼P (X)[DKL(Pϕ(Z|X)||Pϕ̂(Z|X))] (37)
According to the positivity of the KL-divergence, we have L(θ, ϕ̂) ≥ L(θ, ϕ).
A.4 Algorithm
Algorithm 1 Information-bottleneck-based state abstraction in RL θ, ϕ← initialize network parameters β, ζ ← initialize hyper-parameters in (17) ϵ← learning rate M ← number of samples from Pϕ(·|X) repeat
Draw a batch of data {Xt, at, Rt, Xt+1}nt=1 from environment for each Xt ∈ {Xt}nt=1 do
Draw M samples {Zti}Mi=1 from Pϕ(·|Xt) end for Get the batch of data D = {Xt, {Zti}Mi=1, at, Rt, Xt+1}nt=1 Compute the representation gradients ∇ϕL(θ, ϕ) in D according to (18) Compute the RL gradients ∇θL(θ, ϕ) in D according to (19) Update ϕ: ϕ← ϕ+ ϵ∇ϕL(θ, ϕ) Update θ: θ ← θ + ϵ∇θL(θ, ϕ)
until Convergence
A.5 Integrate MINE to our framework
MINE can also be applied to the problem of minimizing the MI between Z and X where Z is generated by a neural network Pϕ(·|X):
I⋆(X,Z) = min ϕ max η EPϕ(X,Z)[T (X,Z; η)]− log(EP (X)⊗Pϕ(Z)[exp T (X,Z;η)]) (38)
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:
L(θ, ϕ, η) =min η {EPϕ(X,Z)[J(Z; θ)]︸ ︷︷ ︸
RL loss term
−βEPϕ(X,Z)[T (X,Z; η)]
+ β log(EP (X)⊗Pϕ(Z)[exp T (X,Z;η)])} (39)
The key steps to optimize L(θ, ϕ, η) is to update θ, ϕ, η iteratively as follows:
ηt+1 ← argmin ηt −EPϕt (X,Z)[T (X,Z; ηt)] + log(EP (X)⊗Pϕt (Z)[exp T (X,Z;ηt)])︸ ︷︷ ︸ mutual information term
(40)
θt+1, ϕt+1 ← argmax θt,ϕt L(θt, ϕt, ηt+1) (41)
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:
θt+1, ϕt+1, ηt+1 ← argmax θt,ϕt argmin ηt {−βEPϕt (X,Z)[T̂ (X,Z; ηt)]+
β log(EP (X)⊗Pϕt (Z)[exp T̂ (X,Z;ηt)+ 1 β J(Z;θt)])} (43)
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.
A.6 Study the information-bottleneck perspective in RL
Now we introduce the experimental settings of MI visualization. And we show that the agent in RL usually tends to follow the information E-C process. We compare the MI(I(X,Z)) between A2C and A2C with our framework. Every 2000 update steps(2560 frames each step), we re-initialize the parameter η, then sample a batch of inputs and their relevant representations {Xi, Zi = ϕ(Xi, ϵ)}ni=1, n = 64, and compute the MI with MINE. The learning rate of updating η is same as openai-baselines’ A2C: 0.0007, training steps is 256 and the network architecture can be found in our code file ”policy.py”. Figure(3) is the MI visualization in game Qbert. Note that there is a certain degree of fluctuations in the curve. This is because that unlike supervised learning, the distribution of datasets and learning signals Rπ(X) keep changing in reinforcement learning: Rπ(X) changes with policy π and when π 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 we can say that the agent in RL usually tends to follow the information E-C process.
We argue that it’s unnecessary to compute I(Z, Y ) like (Shwartz-Ziv & Tishby, 2017): According to (3), if the training loss continually decreases in supervised learning(Reward continually increases as showed in figure(2)(a) in reinforcement learning), I(Z, Y ) must increase gradually. 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.

Review summaries:
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 this paper, the authors proposed to utilize variational lower bound of mutual information for learning representations in Reinforcement learning. To optimize the proposed variational lower bound with a more flexible encoding network, the author proposed to utilize stein variational gradient descent (or amortized svgd). Instead of learning the representation separately, the authors incorporate the framework into PPO or A2C, which yields a joint training framework for policy optimization.