ZHANGYUXUAN-zR commited on
Commit
1dfc199
·
verified ·
1 Parent(s): 829729b

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. parse/train/H1gBhkBFDH/H1gBhkBFDH.md +0 -0
  2. parse/train/H1gBhkBFDH/H1gBhkBFDH_content_list.json +0 -0
  3. parse/train/H1gBhkBFDH/H1gBhkBFDH_middle.json +0 -0
  4. parse/train/H1gBhkBFDH/H1gBhkBFDH_model.json +0 -0
  5. parse/train/S1x4ghC9tQ/S1x4ghC9tQ.md +345 -0
  6. parse/train/S1x4ghC9tQ/S1x4ghC9tQ_content_list.json +1896 -0
  7. parse/train/S1x4ghC9tQ/S1x4ghC9tQ_middle.json +0 -0
  8. parse/train/S1x4ghC9tQ/S1x4ghC9tQ_model.json +0 -0
  9. parse/train/rJIN_4lA-/rJIN_4lA-.md +440 -0
  10. parse/train/rJIN_4lA-/rJIN_4lA-_content_list.json +0 -0
  11. parse/train/rJIN_4lA-/rJIN_4lA-_middle.json +0 -0
  12. parse/train/rJIN_4lA-/rJIN_4lA-_model.json +0 -0
  13. parse/train/rklMnyBtPB/rklMnyBtPB.md +428 -0
  14. parse/train/rklMnyBtPB/rklMnyBtPB_content_list.json +0 -0
  15. parse/train/rklMnyBtPB/rklMnyBtPB_middle.json +0 -0
  16. parse/train/rklMnyBtPB/rklMnyBtPB_model.json +0 -0
  17. parse/train/u8X280hw1Mt/u8X280hw1Mt.md +379 -0
  18. parse/train/u8X280hw1Mt/u8X280hw1Mt_content_list.json +1971 -0
  19. parse/train/u8X280hw1Mt/u8X280hw1Mt_middle.json +0 -0
  20. parse/train/u8X280hw1Mt/u8X280hw1Mt_model.json +0 -0
  21. vlm/train/4qR3coiNaIv/0.png +3 -0
  22. vlm/train/4qR3coiNaIv/1.png +3 -0
  23. vlm/train/4qR3coiNaIv/10.png +3 -0
  24. vlm/train/4qR3coiNaIv/11.png +3 -0
  25. vlm/train/4qR3coiNaIv/12.png +3 -0
  26. vlm/train/4qR3coiNaIv/13.png +3 -0
  27. vlm/train/4qR3coiNaIv/2.png +3 -0
  28. vlm/train/4qR3coiNaIv/3.png +3 -0
  29. vlm/train/4qR3coiNaIv/4.png +3 -0
  30. vlm/train/4qR3coiNaIv/5.png +3 -0
  31. vlm/train/4qR3coiNaIv/6.png +3 -0
  32. vlm/train/4qR3coiNaIv/7.png +3 -0
  33. vlm/train/4qR3coiNaIv/8.png +3 -0
  34. vlm/train/4qR3coiNaIv/9.png +3 -0
  35. vlm/train/5GihaaZKL4/0.png +3 -0
  36. vlm/train/5GihaaZKL4/1.png +3 -0
  37. vlm/train/5GihaaZKL4/2.png +3 -0
  38. vlm/train/5GihaaZKL4/3.png +3 -0
  39. vlm/train/5GihaaZKL4/4.png +3 -0
  40. vlm/train/5GihaaZKL4/5.png +3 -0
  41. vlm/train/5GihaaZKL4/6.png +3 -0
  42. vlm/train/5GihaaZKL4/7.png +3 -0
  43. vlm/train/5GihaaZKL4/8.png +3 -0
  44. vlm/train/6vWuYzkp8d/0.png +3 -0
  45. vlm/train/6vWuYzkp8d/1.png +3 -0
  46. vlm/train/6vWuYzkp8d/10.png +3 -0
  47. vlm/train/6vWuYzkp8d/11.png +3 -0
  48. vlm/train/6vWuYzkp8d/12.png +3 -0
  49. vlm/train/6vWuYzkp8d/2.png +3 -0
  50. vlm/train/6vWuYzkp8d/3.png +3 -0
parse/train/H1gBhkBFDH/H1gBhkBFDH.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1gBhkBFDH/H1gBhkBFDH_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1gBhkBFDH/H1gBhkBFDH_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1gBhkBFDH/H1gBhkBFDH_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1x4ghC9tQ/S1x4ghC9tQ.md ADDED
@@ -0,0 +1,345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # TEMPORAL DIFFERENCE VARIATIONAL AUTO-ENCODER
2
+
3
+ Karol Gregor, George Papamakarios, Frederic Besse, Lars Buesing, Théophane Weber DeepMind {karolg, gpapamak, fbesse, lbuesing, theophane}@google.com
4
+
5
+ # ABSTRACT
6
+
7
+ To act and plan in complex environments, we posit that agents should have a mental simulator of the world with three characteristics: (a) it should build an abstract state representing the condition of the world; (b) it should form a belief which represents uncertainty on the world; (c) it should go beyond simple step-by-step simulation, and exhibit temporal abstraction. Motivated by the absence of a model satisfying all these requirements, we propose TD-VAE, a generative sequence model that learns representations containing explicit beliefs about states several steps into the future, and that can be rolled out directly without single-step transitions. TD-VAE is trained on pairs of temporally separated time points, using an analogue of temporal difference learning used in reinforcement learning.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Generative models of sequential data have received a lot of attention, due to their wide applicability in domains such as speech synthesis (van den Oord et al., 2016a; 2017), neural translation (Bahdanau et al., 2014), image captioning (Xu et al., 2015), and many others. Different application domains will often have different requirements (e.g. long term coherence, sample quality, abstraction learning, etc.), which in turn will drive the choice of the architecture and training algorithm.
12
+
13
+ Of particular interest to this paper is the problem of reinforcement learning in partially observed environments, where, in order to act and explore optimally, agents need to build a representation of the uncertainty about the world, computed from the information they have gathered so far. While an agent endowed with memory could in principle learn such a representation implicitly through model-free reinforcement learning, in many situations the reinforcement signal may be too weak to quickly learn such a representation in a way which would generalize to a collection of tasks.
14
+
15
+ Furthermore, in order to plan in a model-based fashion, an agent needs to be able to imagine distant futures which are consistent with the agent’s past. In many situations however, planning step-by-step is not a cognitively or computationally realistic approach.
16
+
17
+ To successfully address an application such as the above, we argue that a model of the agent’s experience should exhibit the following properties:
18
+
19
+ • The model should learn an abstract state representation of the data and be capable of making predictions at the state level, not just the observation level.
20
+ • The model should learn a belief state, i.e. a deterministic, coded representation of the filtering posterior of the state given all the observations up to a given time. A belief state contains all the information an agent has about the state of the world and thus about how to act optimally.
21
+ • The model should exhibit temporal abstraction, both by making ‘jumpy’ predictions (predictions several time steps into the future), and by being able to learn from temporally separated time points without backpropagating through the entire time interval.
22
+
23
+ To our knowledge, no model in the literature meets these requirements. In this paper, we develop a new model and associated training algorithm, called Temporal Difference Variational Auto-Encoder (TD-VAE), which meets all of the above requirements. We first develop TD-VAE in the sequential, non-jumpy case, by using a modified evidence lower bound (ELBO) for stochastic state space models (Krishnan et al., 2015; Fraccaro et al., 2016; Buesing et al., 2018) which relies on jointly training a filtering posterior and a local smoothing posterior. We demonstrate that on a simple task, this new inference network and associated lower bound lead to improved likelihood compared to methods classically used to train deep state-space models.
24
+
25
+ Following the intuition given by the sequential TD-VAE, we develop the full TD-VAE model, which learns from temporally extended data by making jumpy predictions into the future. We show it can be used to train consistent jumpy simulators of complex 3D environments. Finally, we illustrate how training a filtering a posterior leads to the computation of a neural belief state with good representation of the uncertainty on the state of the environment.
26
+
27
+ # 2 MODEL DESIDERATA
28
+
29
+ # 2.1 CONSTRUCTION OF A LATENT STATE-SPACE
30
+
31
+ Autoregressive models. One of the simplest way to model sequential data $( x _ { 1 } , \ldots , x _ { T } )$ is to use the chain rule to decompose the joint sequence likelihood as a product of conditional probabilities, i.e. $\begin{array} { r } { \log p ( x _ { 1 } , \dots , \dot { x _ { T } } ) = \sum _ { t } \log p ( \dot { x _ { t } } | x _ { 1 } , \dots , x _ { t - 1 } ) } \end{array}$ . This formula can be used to train an autoregressive model of data, by combining an RNN which aggregates information from the past (recursively computing an internal state $h _ { t } = f ( h _ { t - 1 } , x _ { t } ) )$ with a conditional generative model which can score the data $x _ { t }$ given the context $h _ { t }$ . This idea is used in handwriting synthesis (Graves, 2013), density estimation (Uria et al., 2016), image synthesis (van den Oord et al., 2016b), audio synthesis (van den Oord et al., 2017), video synthesis (Kalchbrenner et al., 2016), generative recall tasks (Gemici et al., 2017), and environment modeling (Oh et al., 2015; Chiappa et al., 2017).
32
+
33
+ While these models are conceptually simple and easy to train, one potential weakness is that they only make predictions in the original observation space, and don’t learn a compressed representation of data. As a result, these models tend to be computationally heavy (for video prediction, they constantly decode and re-encode single video frames). Furthermore, the model can be computationally unstable at test time since it is trained as a next step model (the RNN encoding real data), but at test time it feeds back its prediction into the RNN. Various methods have been used to alleviate this issue (Bengio et al., 2015; Lamb et al., 2016; Goyal et al., 2017; Amos et al., 2018).
34
+
35
+ State-space models. An alternative to autoregressive models are models which operate on a higher level of abstraction, and use latent variables to model stochastic transitions between states (grounded by observation-level predictions). This enables to sample state-to-state transitions only, without needing to render the observations, which can be faster and more conceptually appealing. They generally consist of decoder or prior networks, which detail the generative process of states and observations, and encoder or posterior networks, which estimate the distribution of latents given the observed data. There is a large amount of recent work on these type of models, which differ in the precise wiring of model components (Bayer & Osendorfer, 2014; Chung et al., 2015; Krishnan et al., 2015; Archer et al., 2015; Fraccaro et al., 2016; Liu et al., 2017; Serban et al., 2017; Buesing et al., 2018; Lee et al., 2018; Ha & Schmidhuber, 2018).
36
+
37
+ Let $\mathbf { z } ~ = ~ ( z _ { 1 } , \dots , z _ { T } )$ be a state sequence and $\mathbf { x } ~ = ~ ( x _ { 1 } , \dots , x _ { T } )$ an observation sequence. We assume a general form of state-space model, where the joint state and observation likelihood can be written as $\begin{array} { r } { p ( \mathbf { x } , \mathbf { z } ) = \prod _ { t } p ( z _ { t } \mid \bar { z } _ { t - 1 } ) p ( x _ { t } \mid z _ { t } ) } \end{array}$ .1 These models are commonly trained with a VAEinspired bound, by computing a posterior $q ( \mathbf { z } \mid \mathbf { x } )$ over the states given the observations. Often, the posterior is decomposed autoregressively: $\begin{array} { r } { \dot { q } ( \mathbf { \dot { z } } \vert \mathbf { x } ) = \prod _ { t } q ( z _ { t } \vert z _ { t - 1 } , \phi _ { t } ( \mathbf { x } ) ) } \end{array}$ , where $\phi _ { t }$ is a function of $( x _ { 1 } , \ldots , x _ { t } )$ for filtering posteriors or the entire sequence $\mathbf { x }$ for smoothing posteriors. This leads to the following lower bound:
38
+
39
+ $$
40
+ \log p ( \mathbf { x } ) \geq \mathbb { E } _ { \mathbf { z } \sim q ( \mathbf { z } \mid \mathbf { x } ) } \left[ \sum _ { t } \log p ( x _ { t } \mid z _ { t } ) + \log p ( z _ { t } \mid z _ { t - 1 } ) - \log q ( z _ { t } \mid z _ { t - 1 } , \phi _ { t } ( \mathbf { x } ) ) \right] .
41
+ $$
42
+
43
+ # 2.2 ONLINE CREATION OF BELIEF STATE.
44
+
45
+ A key feature of sequential models of data is that they allow to reason about the conditional distribution of the future given the past: $p ( x _ { t + 1 } , \ldots , x _ { T } \mid x _ { 1 } , \cdot \cdot \cdot , x _ { t } )$ . For reinforcement learning in partially observed environments, this distribution governs the distribution of returns given past observations, and as such, it is sufficient to derive the optimal policy. For generative sequence modeling, it enables conditional generation of data given a context sequence. For this reason, it is desirable to compute sufficient statistics $b _ { t } = b _ { t } ( x _ { 1 } , \dots , x _ { t } )$ of the future given the past, which allow to rewrite the conditional distribution as $p ( x _ { t + 1 } , \dots , x _ { T } | x _ { 1 } , \dots , x _ { t } ) \{ \approx p ( x _ { t + 1 } , \dots , x _ { T } | b _ { t } )$ . For an autoregressive model as described in section 2.1, the internal RNN state $h _ { t }$ can immediately be identified as the desired sufficient statistics $b _ { t }$ . However, for the reasons mentioned in the previous section, we would like to identify an equivalent quantity for a state-space model.
46
+
47
+ For a state-space model, the filtering distribution $p ( z _ { t } \mid x _ { 1 } , . . . , x _ { t } )$ , also known as the belief state in reinforcement learning, is sufficient to compute the conditional future distribution, due to the Markov assumption underlying the state-space model and the following derivation:
48
+
49
+ $$
50
+ p ( x _ { t + 1 } , \dots , x _ { T } \mid x _ { 1 } , \dots , x _ { t } ) = \int p ( z _ { t } \mid x _ { 1 } , \dots , x _ { t } ) p ( x _ { t + 1 } , \dots , x _ { T } \mid z _ { t } ) \mathrm { d } z _ { t } .
51
+ $$
52
+
53
+ Thus, if we train a network that extracts a code $b _ { t }$ from $( x _ { 1 } , \ldots , x _ { t } )$ so that $p ( z _ { t } | x _ { 1 } , \ldots , x _ { t } ) \approx$ $p ( \boldsymbol { z } _ { t } | \boldsymbol { b } _ { t } )$ , $b _ { t }$ would contain all the information about the state of the world the agent has, and would effectively form a neural belief state, i.e. a code fully characterizing the filtering distribution.
54
+
55
+ Classical training of state-space model does not compute a belief state: by computing a joint, autoregressive posterior $\begin{array} { r } { q ( \mathbf { z } \vert \mathbf { x } ) = \prod _ { t } q ( z _ { t } \vert z _ { t - 1 } , \mathbf { x } ) } \end{array}$ , some of the uncertainty about the marginal posterior of $z _ { t }$ may be ‘leaked’ in the sample $z _ { t - 1 }$ . Since that sample is stochastic, to obtain all information from $( x _ { 1 } , \ldots , x _ { t } )$ about $z _ { t }$ , we would need to re-sample $z _ { t - 1 }$ , which would in turn require re-sampling $z _ { t - 2 }$ all the way to $z _ { 1 }$ .
56
+
57
+ While the notion of a belief state itself and its connection to optimal policies in POMDPs is well known (Astrom, 1965; Kaelbling et al., 1998; Hauskrecht, 2000), it has often been restricted to the tabular case (Markov chain), and little work investigates computing belief states for learned deep models. A notable exception is (Igl et al., 2018), which uses a neural form of particle filtering, and represents the belief state more explicitly as a weighted collection of particles. Related to our definition of belief states as sufficient statistics is the notion of predictive state representations (PSRs) (Littman & Sutton, 2002); see also (Venkatraman et al., 2017) for a model that learns PSRs which, combined with a decoder, can predict future observations.
58
+
59
+ Our last requirement for the model is that of temporal abstraction. We postpone the discussion of this aspect until section 4.
60
+
61
+ # 3 BELIEF-STATE-BASED ELBO FOR SEQUENTIAL TD-VAE
62
+
63
+ In this section, we develop a sequential model that satisfies the requirements given in the previous section, namely (a) it constructs a latent state-space, and (b) it creates a online belief state. We consider an arbitrary state space model with joint latent and observable likelihood given by $\begin{array} { r } { p ( \mathbf { x } , \mathbf { z } ) = \prod _ { t } p ( z _ { t } \mid z _ { t - 1 } ) p ( x _ { t } \mid z _ { t } ^ { \cdot } ) } \end{array}$ , and we aim to optimize the data likelihood $\log p ( \mathbf { x } )$ . We begin by autoregressively decomposing the data likelihood as: $\begin{array} { r } { \log p ( \mathbf { x } ) = \sum _ { t } \log p ( x _ { t } \mid x _ { < t } ) } \end{array}$ . For a given $t$ , we evaluate the conditional likelihood $p ( x _ { t } \mid x _ { < t } )$ by inferring over two latent states only: $z _ { t - 1 }$ and $z _ { t }$ , as they will naturally make belief states appear for times $t - 1$ and $t$ :
64
+
65
+ $$
66
+ \begin{array} { r l } & { \log p ( x _ { t } \mid x _ { < t } ) \ge \underset { ( z _ { t - 1 } , z _ { t } ) \sim q ( z _ { t - 1 } , z _ { t } \mid x _ { \le t } ) } { \mathbb { E } } \Big [ \log p ( x _ { t } \mid z _ { t - 1 } , z _ { t } , x _ { < t } ) + \log p ( z _ { t - 1 } , z _ { t } \mid x _ { < t } ) } \\ & { \qquad \quad - \log q ( z _ { t - 1 } , z _ { t } \mid x _ { \le t } ) \Big ] . } \end{array}
67
+ $$
68
+
69
+ Because of the Markov assumptions underlying the state-space model, we can simplify $p ( x _ { t } \mid z _ { t - 1 } , z _ { t } , x _ { < t } ) = p ( x _ { t } \mid z _ { t } )$ and decompose $p ( z _ { t - 1 } , z _ { t } | x _ { < t } ) = p ( z _ { t - 1 } | x _ { < t } ) p ( z _ { t } | z _ { t - 1 } )$ . Next, we choose to decompose $q ( \boldsymbol { z } _ { t - 1 } , \boldsymbol { z } _ { t } \mid \boldsymbol { x } _ { \le t } )$ as a belief over $z _ { t }$ and a one-step smoothing distribution over $z _ { t - 1 }$ : $q ( z _ { t - 1 } , z _ { t } | x _ { \leq t } ) = q ( z _ { t } | \bar { x _ { \leq t } } ) q ( z _ { t - 1 } | z _ { t } , x _ { \leq t } )$ . We obtain the following belief-based
70
+
71
+ ELBO for state-space models:
72
+
73
+ $$
74
+ \begin{array} { c } { \log p ( x _ { t } \mid x _ { < t } ) \geq \underset { ( z _ { t - 1 } , z _ { t } ) \sim q ( z _ { t - 1 } , z _ { t } \mid x _ { \leq t } ) } { \mathbb { E } } \Big [ \log p ( x _ { t } \mid z _ { t } ) + \log p ( z _ { t - 1 } \mid x _ { < t } ) + \log p ( z _ { t } \mid z _ { t - 1 } ) } \\ { - \log q ( z _ { t } \mid x _ { \leq t } ) - \log q ( z _ { t - 1 } \mid z _ { t } , x _ { \leq t } ) \Big ] . } \end{array}
75
+ $$
76
+
77
+ Both quantities $p ( z _ { t - 1 } \mid x _ { \leq t - 1 } )$ and $q ( \boldsymbol { z } _ { t } | \boldsymbol { x } _ { \le t } )$ represent the belief state of the model at different times, so at this stage we approximate them with the same distribution $p _ { B } ( z \vert b )$ , with $b _ { t } = f ( b _ { t - 1 } , x _ { t } )$ representing the belief state code for $z _ { t }$ . Similarly, we represent the smoothing posterior over $z _ { t - 1 }$ as $q ( \bar { z } _ { t - 1 } | z _ { t } , \bar { b } _ { t - 1 } , b _ { t } )$ . We obtain the following loss:
78
+
79
+ $$
80
+ \begin{array} { r l } { - \mathcal { L } = } & { \underset { z _ { t } \sim p _ { B } ( z _ { t } \mid b _ { t } ) } { \mathbb { E } } \Big [ \log p ( x _ { t } \mid z _ { t } ) + \log p _ { B } ( z _ { t - 1 } \mid b _ { t - 1 } ) + \log p ( z _ { t } \mid z _ { t - 1 } ) } \\ & { \qquad \quad \ : z _ { t - 1 } \sim q ( z _ { t - 1 } \mid z _ { t } , b _ { t } , b _ { t - 1 } ) } \\ & { \qquad \quad \ : - \log p _ { B } ( z _ { t } \mid b _ { t } ) - \log q ( z _ { t - 1 } \mid z _ { t } , b _ { t - 1 } , b _ { t } ) \Big ] . } \end{array}
81
+ $$
82
+
83
+ We provide an intuition on the different terms of the ELBO in the next section.
84
+
85
+ # 4 TD-VAE AND JUMPY STATE MODELING
86
+
87
+ The model derived in the previous section expresses a state model $p ( z _ { t } \mid z _ { t - 1 } )$ that describes how the state of the world evolves from one time step to the next. However, in many applications, the relevant timescale for planning may not be the one at which we receive observations and execute simple actions. Imagine for example planning for a trip abroad; the different steps involved (discussing travel options, choosing a destination, buying a ticket, packing a suitcase, going to the airport, and so on), all occur at vastly different time scales (potentially months in the future at the beginning of the trip, and days during the trip). Certainly, making a plan for this situation does not involve making second-by-second decisions. This suggests that we should look for models that can imagine future states directly, without going through all intermediate states.
88
+
89
+ Beyond planning, there are several other reasons that motivate modeling the future directly. First, training signal coming from the future can be stronger than small changes happening between time steps. Second, the behavior of the model should ideally be independent from the underlying temporal sub-sampling of the data, if the latter is an arbitrary choice. Third, jumpy predictions can be computationally efficient; when predicting several steps into the future, there may be some intervals where the prediction is either easy (e.g. a ball moving straight), or the prediction is complex but does not affect later time steps — which Neitz et al. (2018) call inconsequential chaos.
90
+
91
+ There is a number of research directions that consider temporal jumps. Koutnik et al. (2014) and Chung et al. (2016) consider recurrent neural network with skip connections, making it easier to bridge distant timesteps. Buesing et al. (2018) temporally sub-sample the data and build a jumpy model (for fixed jump size) of this data; but by doing so they also drop the information contained in the skipped observations. Neitz et al. (2018) and Jayaraman et al. (2018) predict sequences with variable time-skips, by choosing as target the most predictable future frames. They predict the observations directly without learning appropriate states, and only focus on nearly fully observed problems (and therefore do not need to learn a notion of belief state). For more general problems, this is a fundamental limitation, as even if one could in principle learn a jumpy observation model $p ( x _ { t + \delta } | x _ { \leq t } )$ , it cannot be used recursively (feeding $x _ { t + \delta }$ back to the RNN and predicting $x _ { t + \delta + \delta ^ { \prime } } )$ . This is because $x _ { t + \delta }$ does not capture the full state of the system and so we would be missing information from $t$ to $t + \delta$ to fully characterize what happens after time $t + \delta$ . In addition, $x _ { t + \delta }$ might not be appropriate even as target, because some important information can only be extracted from a number of frames (potentially arbitrarily separated), such as a behavior of an agent.
92
+
93
+ # 4.1 THE TD-VAE MODEL
94
+
95
+ Motivated by the model derived in section 3, we extend sequential TD-VAE to exhibit time abstraction. We start from the same assumptions and architectural form: there exists a sequence of states $z _ { 1 } , \dots , z _ { T }$ from which we can predict the observations $x _ { 1 } , \ldots , x _ { T }$ . A forward RNN encodes a belief state $b _ { t }$ from past observations $x _ { \leq t }$ . The main difference is that, instead of relating information known at times $t$ and $t + 1$ through the states $z _ { t }$ and $z _ { t + 1 }$ , we relate two distant time steps $t _ { 1 }$ and $t _ { 2 }$ through their respective states $z _ { t _ { 1 } }$ and $z _ { t _ { 2 } }$ , and we learn a jumpy, state-to-state model $p \big ( \boldsymbol { z } _ { t _ { 2 } } \mid \boldsymbol { z } _ { t _ { 1 } } \big )$ between $z _ { t _ { 1 } }$ and $z _ { t _ { 2 } }$ . Following equation 5, the negative loss for the TD-VAE model is:
96
+
97
+ ![](images/a7723f2f0aeb62cb85ef6f1a2219b174363ded213b7cf0db50ca339574f8081b.jpg)
98
+ Figure 1: Diagram of TD-VAE. Follow the red panels for an explanation of the architecture. For succinctness, we use the notation $p _ { D }$ to denote the decoder $p ( x | z )$ , $p _ { T }$ to denote the transition distribution $p ( s _ { t _ { 2 } } | s _ { t _ { 1 } } )$ , $q _ { S }$ for the smoothing distribution and $p _ { B }$ for the belief distribution.
99
+
100
+ $$
101
+ \begin{array} { r l } & { \mathcal { L } _ { t _ { 1 } , t _ { 2 } } = \underset { ( z _ { t _ { 1 } } , z _ { t _ { 2 } } ) \sim q ( z _ { t _ { 1 } } , z _ { t _ { 2 } } \mid b _ { t _ { 1 } } , b _ { t _ { 2 } } ) } { \mathbb { E } } \bigg [ \log p ( x _ { t _ { 2 } } \mid z _ { t _ { 2 } } ) + \log p _ { B } ( z _ { t _ { 1 } } \mid b _ { t _ { 1 } } ) + \log p ( z _ { t _ { 2 } } \mid z _ { t _ { 1 } } ) } \\ & { \qquad \quad - \log p _ { B } ( z _ { t _ { 2 } } \mid b _ { t _ { 2 } } ) - \log q ( z _ { t _ { 1 } } \mid z _ { t _ { 2 } } , b _ { t _ { 1 } } , b _ { t _ { 2 } } ) \bigg ] } \end{array}
102
+ $$
103
+
104
+ To train this model, one should choose the distribution of times $t _ { 1 } , t _ { 2 }$ ; for instance, $t _ { 1 }$ can be chosen uniformly from the sequence, and $t _ { 2 } - t _ { 1 }$ uniformly over some finite range $[ 1 , D ]$ ; other approaches could be investigated. Figure 1 describes in detail the computation flow of the model.
105
+
106
+ Finally, it would be desirable to model the world with different hierarchies of state, the higher-level states predicting the same-level or lower-level states, and ideally representing more invariant or abstract information. For this reason, we also develop stacked (hierarchical) version of TD-VAE, which uses several layers of latent states. Hierarchical TD-VAE is detailed in the appendix.
107
+
108
+ # 4.2 INTUITION BEHIND TD-VAE
109
+
110
+ In this section, we provide a more intuitive explanation behind the computation and loss of the model. Assume we want to predict a future time step $t _ { 2 }$ from all the information we have up until time $t _ { 1 }$ . All relevant information up until time $t _ { 1 }$ (respectively $t _ { 2 }$ ) has been compressed into a code $b _ { t _ { 1 } }$ (respectively $b _ { t _ { 2 } }$ ). We make an observation $x _ { t }$ of the world2 at every time step $t$ , but posit the existence of a state $z _ { t }$ which fully captures the full condition of the world at time $t$ .
111
+
112
+ Consider an agent at the current time $t _ { 2 }$ . At that time, the agent can make a guess of what the state of the world is by sampling from its belief model $p _ { B } \big ( z _ { t _ { 2 } } \big | b _ { t _ { 2 } } \big )$ . Because the state $z _ { t _ { 2 } }$ should entail the corresponding observation $x _ { t _ { 2 } }$ , the agent aims to maximize $p ( x _ { t _ { 2 } } \mid z _ { t _ { 2 } } )$ (first term of the loss), with a variational bottleneck penalty $- \log p ( z _ { t _ { 2 } } \mid b _ { t _ { 2 } } )$ (second term of the loss) to prevent too much information from the current observation $x _ { t _ { 2 } }$ from being encoded into $z _ { t _ { 2 } }$ . Then follows the question ‘could the state of the world at time $t _ { 2 }$ have been predicted from the state of the world at time $t _ { 1 } ? { }$ . In order to ascertain this, the agent must estimate the state of the world at time $t _ { 1 }$ . By time $t _ { 2 }$ , the agent has aggregated observations between $t _ { 1 }$ and $t _ { 2 }$ that are informative about the state of the world at time $t _ { 1 }$ , which, together with the current guess of the state of the world $z _ { t _ { 2 } }$ , can be used to form an ex post guess of the state of the world. This is done by computing a smoothing distribution $q ( z _ { t _ { 1 } } | z _ { t _ { 2 } } , b _ { t _ { 1 } } , b _ { t _ { 2 } } )$ and drawing a corresponding sample $z _ { t _ { 1 } }$ . Having guessed states of the world $z _ { t _ { 1 } }$ and $z _ { t _ { 2 } }$ , the agent optimizes its predictive jumpy model of the world state $p ( \boldsymbol { z } _ { t _ { 2 } } \mid \boldsymbol { z } _ { t _ { 1 } } )$ (third term of the loss). Finally, it should attempt to see how predictable the revealed information was, or in other words, to assess whether the smoothing distribution $q ( z _ { t _ { 1 } } \mid z _ { t _ { 2 } } , b _ { t _ { 2 } } )$ could have been predicted from information only available at time $t _ { 1 }$ (this is indirectly predicting $z _ { t _ { 2 } }$ from the state of knowledge $b _ { t _ { 1 } }$ at time $t _ { 1 }$ - the problem we started with). The agent can do so by minimizing the KL between the smoothing distribution and the belief distribution at time $t _ { 1 }$ : $\mathbf { K } \dot { \mathbf { L } } ( q ( z _ { t _ { 1 } } \mid z _ { t _ { 2 } } , \bar { b } _ { t _ { 1 } } , b _ { t _ { 2 } } ) \mid \mid p ( z _ { t _ { 1 } } \mid b _ { t _ { 1 } } ) )$ (fourth term of the loss). Summing all the losses described so far, we obtain the TD-VAE loss.
113
+
114
+ # 4.3 CONNECTION WITH TEMPORAL-DIFFERENCE LEARNING
115
+
116
+ In reinforcement learning, the state of an agent represents a belief about the sum of discounted rewards $\begin{array} { r } { R _ { t } = \sum _ { \tau } r _ { t + \tau } \gamma ^ { \bar { \tau } } } \end{array}$ . In the classic setting, the agent only models the mean of this distribution represented by the value function $V _ { t }$ or action dependent $\mathrm { Q }$ -function $Q _ { t } ^ { a }$ (Sutton $\&$ Barto, 1998). Recently in (Bellemare et al., 2017), a full distribution over $R _ { t }$ has been considered. To estimate $V _ { t _ { 1 } }$ or $Q _ { t _ { 1 } } ^ { a }$ at time $t _ { 1 }$ , one does not usually wait to get all the rewards to compute $R _ { t _ { 1 } }$ . Instead, one uses an estimate at some future time $t _ { 2 }$ as a bootstrap to estimate $V _ { t _ { 1 } }$ or $Q _ { t _ { 1 } } ^ { a }$ (temporal difference).
117
+
118
+ In our case, the model expresses a belief $p _ { B } ( z _ { t } \vert b _ { t } )$ about possible future states instead of the sum of discounted rewards. The model trains the belief $p _ { B } \big ( z _ { t _ { 1 } } \big | b _ { t _ { 1 } } \big )$ at time $t _ { 1 }$ using belief $p _ { B } \big ( z _ { t _ { 2 } } \big | b _ { t _ { 2 } } \big )$ at some time $t _ { 2 }$ in the future. It accomplishes this by (variationally) auto-encoding a sample $z _ { t _ { 2 } }$ of the future state into a sample $z _ { t _ { 1 } }$ , using the approximate posterior distribution $q \big ( z _ { t _ { 1 } } \mid z _ { t _ { 2 } } , b _ { t _ { 1 } } , b _ { t _ { 2 } } \big )$ and the decoding distribution $p ( \boldsymbol { z } _ { t _ { 2 } } \mid \boldsymbol { z } _ { t _ { 1 } } )$ . This auto-encoding mapping translates between states at $t _ { 1 }$ and $t _ { 2 }$ , forcing beliefs at the two time steps to be consistent. Sample $z _ { t _ { 1 } }$ forms the target for training the belief $p _ { B } \big ( z _ { t _ { 1 } } \big | b _ { t _ { 1 } } \big )$ , which appears as a prior distribution over $z _ { t _ { 1 } }$ .
119
+
120
+ # 5 EXPERIMENTS.
121
+
122
+ The first experiment using sequential TD-VAE, which enables a direct comparison to related algorithms for training state-space models. Subsequent experiments use the full TD-VAE model.
123
+
124
+ # 5.1 PARTIALLY OBSERVED MINIPACMAN
125
+
126
+ We use a partially observed version of the MiniPacman environment (Racanière et al., 2017), shown in Figure 2. The agent (Pacman) navigates a maze, and tries to eat all the food while avoiding being eaten by a ghost. Pacman sees only a $5 \times 5$ window around itself. To achieve a high score, the agent needs to form a belief state that captures memory of past experience (e.g. which parts of the maze have been visited) and uncertainty on the environment (e.g. where the ghost might be).
127
+
128
+ We evaluate the performance of sequential (non-jumpy) TD-VAE on the task of modeling a sequence of the agent’s observations. We compare it with two state-space models trained using the standard ELBO of equation 1:
129
+
130
+ • A filtering model with encoder $\begin{array} { r } { q ( \mathbf { z } \mid \mathbf { x } ) = \prod _ { t } q ( z _ { t } \mid z _ { t - 1 } , b _ { t } ) } \end{array}$ , where $b _ { t } = \mathrm { R N N } ( b _ { t - 1 } , x _ { t } )$ .
131
+ • A mean-field model with encoder $\begin{array} { r } { q ( \mathbf { z } \mid \mathbf { x } ) = \prod _ { t } q ( z _ { t } \mid b _ { t } ) } \end{array}$ , where $b _ { t } = \mathrm { R N N } ( b _ { t - 1 } , x _ { t } )$ .
132
+
133
+ Figure 2 shows the ELBO and estimated negative log probability on a test set of MiniPacman sequences for each model. TD-VAE outperforms both baselines, whereas the mean-field model is the least well-performing. We note that $b _ { t }$ is a belief state for the mean-field model, but not for the filtering model; the encoder of the latter explicitly depends on the previous latent state $z _ { t - 1 }$ , hence $b _ { t }$ is not its sufficient statistics. This comparison shows that naively restricting the encoder in order to obtain a belief state hurts the performance significantly; TD-VAE overcomes this difficulty.
134
+
135
+ <table><tr><td></td><td>ELBO</td><td>-log p(x) (est.)</td></tr><tr><td>Filtering model</td><td>0.1169 ±0.0003</td><td>0.0962 ± 0.0007</td></tr><tr><td>Mean-field model</td><td>0.1987±0.0004</td><td>0.1678 ± 0.0010</td></tr><tr><td>TD-VAE</td><td>0.0773±0.0002</td><td>0.0553 ±0.0006</td></tr></table>
136
+
137
+ ![](images/dbe986c42bf2b18439142319f2b9d58e5cac11d9812c208b9c096d8581db98c1.jpg)
138
+ Figure 2: MiniPacman. Left: A full frame from the game (size $1 5 \times 1 9$ ). Pacman (green) is navigating the maze trying to eat all the food (blue) while being chased by a ghost (red). Top right: A sequence of observations, consisting of consecutive $5 \times 5$ windows around Pacman. Bottom right: ELBO and estimated negative log probability on a test set of MiniPacman sequences. Lower is better. Log probability is estimated using importance sampling with the encoder as proposal.
139
+
140
+ ![](images/53356f6d65dcaf8ab95d625cdbe7b653326dac0dcb5735d8bfb91cad38294117.jpg)
141
+ Figure 3: Moving MNIST. Left: Rows are example input sequences. Right: Jumpy rollouts from the model. We see that the model is able to roll forward by skipping frames, keeping the correct digit and the direction of motion.
142
+
143
+ # 5.2 MOVING MNIST
144
+
145
+ In this experiment, we show that the model is able to learn the state and roll forward in jumps. We consider sequences of length 20 of images of MNIST digits. For each sequence, a random digit from the dataset is chosen, as well as the direction of movement (left or right). At each time step, the digit moves by one pixel in the chosen direction, as shown in Figure 3. We train the model with $t _ { 1 }$ and $t _ { 2 }$ separated by a random amount $t _ { 2 } - t _ { 1 }$ from the interval [1, 4]. We would like to see whether the model at a given time can roll out a simulated experience in time steps $t _ { 1 } = t + \delta _ { 1 }$ , $t _ { 2 } = t _ { 1 } + \delta _ { 2 } , . . .$ with $\delta _ { 1 } , \delta _ { 2 } , \dots > 1$ , without considering the inputs in between these time points. Note that it is not sufficient to predict the future inputs $\boldsymbol { x } _ { t _ { 1 } } , \ldots$ as they do not contain information about whether the digit moves left or right. We need to sample a state that contains this information.
146
+
147
+ We roll out a sequence from the model as follows: (a) $b _ { t }$ is computed by the aggregation recurrent network from observations up to time $t$ ; (b) a state $z _ { t }$ is sampled from $p _ { B } ( z _ { t } \vert b _ { t } )$ ; (c) a sequence of states is rolled out by repeatedly sampling $z \gets z ^ { \prime } \sim p ( z ^ { \prime } | z )$ starting with $z = z _ { t }$ ; (d) each $z$ is decoded by $p ( x \mid z )$ , producing a sequence of frames. The resulting sequences are shown in Figure 3. We see that indeed the model can roll forward the samples in steps of more than one elementary time step (the sampled digits move by more than one pixel) and that it preserves the direction of motion, demonstrating that it rolls forward a state.
148
+
149
+ # 5.3 NOISY HARMONIC OSCILLATOR
150
+
151
+ We would like to demonstrate that the model can build a state even when little information is present in each observation, and that it can sample states far into the future. For this we consider a 1D sequence obtained from a noisy harmonic oscillator, as shown in Figure 4 (first and fourth rows). The frequencies, initial positions and initial velocities are chosen at random from some range. At every update, noise is added to the position and the velocity of the oscillator, but the energy is approximately preserved. The model observes a noisy version of the current position. Attempting to predict the input, which consists of one value, 100 time steps in the future would be uninformative; such a prediction wouldn’t reveal what the frequency or the magnitude of the signal is, and because the oscillator updates are noisy, the phase information would be nearly lost. Instead, we should try to predict as much as possible about the state, which consists of frequency, magnitude and position, and it is only the position that cannot be accurately predicted.
152
+
153
+ ![](images/a07734250325cb91c31f78aadcbbb6e42fa93ed686f71138d404c8ce91bcced7.jpg)
154
+ Figure 4: Skip-state prediction for 1D signal. The input is generated by a noisy harmonic oscillator. Rollouts consist of (a) a jumpy state transition with either $d t = 2 0$ or $d t = 1 0 0$ , followed by 20 state transitions with $d t = 1$ . The model is able to create a state and predict it into the future, correctly predicting frequency and magnitude of the signal.
155
+
156
+ The aggregation RNN is an LSTM; we use a hierarchical TD-VAE with two layers, where the latent variables in the higher layer are sampled first, and their results are passed to the lower layer. The belief, smoothing and state-transition distributions are feed-forward networks, and the decoder simply extracts the first component from the $z$ of the first layer. We also feed the time interval $t _ { 2 } - t _ { 1 }$ into the smoothing and state-transition distributions. We train on sequences of length 200, with $t _ { 2 } - t _ { 1 }$ taking values chosen at random from [1, 10] with probability 0.8 and from [1, 120] with probability 0.2.
157
+
158
+ We analyze what the model has learned as follows. We pick time $t _ { 1 } ~ = ~ 6 0$ and sample $z _ { t _ { 1 } } \sim$ $p _ { B } \big ( z _ { t _ { 1 } } \big | \big ) \big | b _ { t _ { 1 } } \big )$ . Then, we choose a time interval $\delta _ { t } \in \{ 2 0 , \bar { 1 } 0 0 \}$ to skip, sample from the forward model $p ( z _ { 2 } \mid z _ { 1 } , \delta _ { t } )$ to obtain $z _ { t _ { 2 } }$ at $t _ { 2 } = t _ { 1 } + \delta _ { t }$ . To see the content of this state, we roll forward 20 times with time step $\delta = 1$ and plot the result, shown in Figure 4. We see that indeed the state $z _ { t _ { 2 } }$ is predicted correctly, containing the correct frequency and magnitude of the signal. We also see that the position (phase) is predicted well for $d t = 2 0$ and less accurately for $d t = 1 0 0$ (at which point the noisiness of the system makes it unpredictable).
159
+
160
+ Finally, we show that TD-VAE training can improve the quality of the belief state. For this experiment, the harmonic oscillator has a different frequency in each interval $[ 0 , 1 0 )$ , [10, 20), [20, 120), [120, 140). The first three frequencies $f _ { 1 } , f _ { 2 } , f _ { 3 }$ are chosen at random. The final frequency $f _ { 4 }$ is chosen to be one fixed value $f _ { a }$ if $f _ { 1 } > f _ { 2 }$ and another fixed value $f _ { b }$ otherwise $f _ { a }$ and $f _ { b }$ are constants). In order to correctly model the signal in the final time interval, the model needs to learn the relation between $f _ { 1 }$ and $f _ { 2 }$ , store it over length of 100 steps, and apply it over a number of time steps (due to the noise) in the final interval. To test whether the belief state contains the information about this relationship, we train a binary classifier from the belief state to the final frequency $f _ { 4 }$ at points just before the final interval. We compare two models with the same recurrent architecture (an LSTM), but trained with different objective: next-step prediction vs TD-VAE loss. The figure on the right shows the classification accuracy for the two methods, averaged over 20 runs. We found that the longer the separating time interval (containing frequency $f _ { 3 }$ ) and the smaller the size of the LSTM, the better TD-VAE is compared to next-step predictor.
161
+
162
+ ![](images/1325d166c2f3f2e0dd2a2c55bc719503180df27d258785063eb9828ca8900b91.jpg)
163
+
164
+ # 5.4 DEEPMIND LAB ENVIRONMENT
165
+
166
+ In the final experiment, we analyze the model on a more visually complex domain. We use sequences of frames seen by an agent solving tasks in the DeepMind Lab environment (Beattie et al., 2016). We aim to demonstrate that the model holds explicit beliefs about various possible futures, and that it can roll out in jumps. We suggest functional forms inspired by convolutional DRAW: we use convolutional LSTMs for all the circles in Figure 8 and make the model 16 layers deep (except for the forward updating LSTMs which are fully connected with depth 4).
167
+
168
+ ![](images/c2368df29b05a7c8e75802a6c6eb94a47da537f30e710de4babea5b8d927c575.jpg)
169
+ Figure 5: Beliefs of the model. Left: Independent samples $z _ { 1 } , z _ { 2 } , z _ { 3 }$ from current belief; all 3 decode to roughly the same frame. Right: Multiple predicted futures for each sample. The frames are similar for each $z _ { i }$ , but different across $z _ { i }$ ’s.
170
+
171
+ ![](images/6b454271ed3815d08a88c90920955f635132ef68517a96471bc60ca8c4378d82.jpg)
172
+ Figure 6: Rollout from the model. The model was trained on steps uniformly distributed in [1, 5]. The model is able to create forward motion that skips several time steps.
173
+
174
+ We use time skips $t _ { 2 } - t _ { 1 }$ sampled uniformly from [1, 40] and analyze the content of the belief state $b$ . We take three samples $z _ { 1 } , z _ { 2 } , z _ { 3 }$ from $p _ { B } ( z \vert b )$ , which should represent three instances of possible futures. Figure 5 (left) shows that they decode to roughly the same frame. To see what they represent about the future, we draw 5 samples $\bar { z _ { i } ^ { k } } \sim p ( \hat { z } | z )$ , $k = 1 , \ldots , 5$ and decode them, as shown in Figure 5 (right). We see that for a given $i$ , the predicted samples decode to similar frames (images in the same row). However $z$ ’s for different $i$ ’s decode to different frames. This means $b$ represented a belief about several different possible futures, while different $z _ { i }$ each represent a single possible future.
175
+
176
+ Finally, we show what rollouts look like. We train on time separations $t _ { 2 } - t _ { 1 }$ chosen uniformly from [1, 5] on a task where the agent tends to move forward and rotate. Figure 6 shows 4 rollouts from the model. We see that the motion appears to go forward and into corridors and that it skips several time steps (real single step motion is slower).
177
+
178
+ # 6 CONCLUSIONS
179
+
180
+ In this paper, we argued that an agent needs a model that is different from an accurate step-by-step environment simulator. We discussed the requirements for such a model, and presented TD-VAE, a sequence model that satisfies all requirements. TD-VAE builds states from observations by bridging time points separated by random intervals. This allows the states to relate to each other directly over longer time stretches and explicitly encode the future. Further, it allows rolling out in state-space and in time steps larger than, and potentially independent of, the underlying temporal environment/data step size. In the future, we aim to apply TD-VAE to more complex settings, and investigate a number of possible uses in reinforcement learning such are representation learning and planning.
181
+
182
+ # REFERENCES
183
+
184
+ Brandon Amos, Laurent Dinh, Serkan Cabi, Thomas Rothörl, Sergio Gómez Colmenarejo, Alistair Muldal, Tom Erez, Yuval Tassa, Nando de Freitas, and Misha Denil. Learning awareness models. arXiv preprint arXiv:1804.06318, 2018.
185
+
186
+ Evan Archer, Il Memming Park, Lars Buesing, John Cunningham, and Liam Paninski. Black box variational inference for state space models. arXiv preprint arXiv:1511.07367, 2015.
187
+
188
+ Karl J Astrom. Optimal control of Markov decision processes with incomplete state estimation. Journal of mathematical analysis and applications, 10:174–205, 1965.
189
+
190
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014.
191
+
192
+ Justin Bayer and Christian Osendorfer. Learning stochastic recurrent networks. arXiv preprint arXiv:1411.7610, 2014.
193
+
194
+ Charles Beattie, Joel Z Leibo, Denis Teplyashin, Tom Ward, Marcus Wainwright, Heinrich Küttler, Andrew Lefrancq, Simon Green, Víctor Valdés, Amir Sadik, et al. DeepMind Lab. arXiv preprint arXiv:1612.03801, 2016.
195
+
196
+ Marc G Bellemare, Will Dabney, and Rémi Munos. A distributional perspective on reinforcement learning. arXiv preprint arXiv:1707.06887, 2017.
197
+
198
+ Samy Bengio, Oriol Vinyals, Navdeep Jaitly, and Noam Shazeer. Scheduled sampling for sequence prediction with recurrent neural networks. In Advances in Neural Information Processing Systems, pp. 1171–1179, 2015.
199
+
200
+ Lars Buesing, Theophane Weber, Sebastien Racaniere, SM Eslami, Danilo Rezende, David P Reichert, Fabio Viola, Frederic Besse, Karol Gregor, Demis Hassabis, et al. Learning and querying fast generative models for reinforcement learning. arXiv preprint arXiv:1802.03006, 2018.
201
+
202
+ Silvia Chiappa, Sébastien Racaniere, Daan Wierstra, and Shakir Mohamed. Recurrent environment simulators. arXiv preprint arXiv:1704.02254, 2017.
203
+
204
+ Junyoung Chung, Kyle Kastner, Laurent Dinh, Kratarth Goel, Aaron C Courville, and Yoshua Bengio. A recurrent latent variable model for sequential data. In Advances in neural information processing systems, pp. 2980–2988, 2015.
205
+
206
+ Junyoung Chung, Sungjin Ahn, and Yoshua Bengio. Hierarchical multiscale recurrent neural networks. arXiv preprint arXiv:1609.01704, 2016.
207
+
208
+ Marco Fraccaro, Søren Kaae Sønderby, Ulrich Paquet, and Ole Winther. Sequential neural models with stochastic layers. In Advances in neural information processing systems, pp. 2199–2207, 2016.
209
+
210
+ Mevlana Gemici, Chia-Chun Hung, Adam Santoro, Greg Wayne, Shakir Mohamed, Danilo J Rezende, David Amos, and Timothy Lillicrap. Generative temporal models with memory. arXiv preprint arXiv:1702.04649, 2017.
211
+
212
+ Anirudh Goyal, Alessandro Sordoni, Marc-Alexandre Côté, Nan Ke, and Yoshua Bengio. Z-forcing: Training stochastic recurrent networks. In Advances in Neural Information Processing Systems, pp. 6713–6723, 2017.
213
+
214
+ Alex Graves. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013.
215
+
216
+ Karol Gregor, Frederic Besse, Danilo Jimenez Rezende, Ivo Danihelka, and Daan Wierstra. Towards conceptual compression. In Advances In Neural Information Processing Systems, pp. 3549–3557, 2016.
217
+
218
+ David Ha and Jürgen Schmidhuber. World models. arXiv preprint arXiv:1803.10122, 2018.
219
+
220
+ Milos Hauskrecht. Value-function approximations for partially observable Markov decision processes. Journal of artificial intelligence research, 13:33–94, 2000.
221
+
222
+ Maximilian Igl, Luisa Zintgraf, Tuan Anh Le, Frank Wood, and Shimon Whiteson. Deep variational reinforcement learning for POMDPs. arXiv preprint arXiv:1806.02426, 2018.
223
+
224
+ Dinesh Jayaraman, Frederik Ebert, Alexei A Efros, and Sergey Levine. Time-agnostic prediction: Predicting predictable video frames. arXiv preprint arXiv:1808.07784, 2018.
225
+
226
+ Leslie Pack Kaelbling, Michael L Littman, and Anthony R Cassandra. Planning and acting in partially observable stochastic domains. Artificial intelligence, 101(1-2):99–134, 1998.
227
+
228
+ Nal Kalchbrenner, Aaron van den Oord, Karen Simonyan, Ivo Danihelka, Oriol Vinyals, Alex Graves, and Koray Kavukcuoglu. Video pixel networks. arXiv preprint arXiv:1610.00527, 2016.
229
+
230
+ Diederik P Kingma, Tim Salimans, Rafal Jozefowicz, Xi Chen, Ilya Sutskever, and Max Welling. Improved variational inference with inverse autoregressive flow. In Advances in Neural Information Processing Systems, pp. 4743–4751, 2016.
231
+
232
+ Jan Koutnik, Klaus Greff, Faustino Gomez, and Juergen Schmidhuber. A clockwork RNN. arXiv preprint arXiv:1402.3511, 2014.
233
+
234
+ Rahul G Krishnan, Uri Shalit, and David Sontag. Deep Kalman filters. arXiv preprint arXiv:1511.05121, 2015.
235
+
236
+ Alex Lamb, Anirudh Goyal, Ying Zhang, Saizheng Zhang, Aaron C Courville, and Yoshua Bengio. Professor forcing: A new algorithm for training recurrent networks. In Advances In Neural Information Processing Systems, pp. 4601–4609, 2016.
237
+
238
+ Alex X Lee, Richard Zhang, Frederik Ebert, Pieter Abbeel, Chelsea Finn, and Sergey Levine. Stochastic adversarial video prediction. arXiv preprint arXiv:1804.01523, 2018.
239
+
240
+ Michael L Littman and Richard S Sutton. Predictive representations of state. In Advances in neural information processing systems, pp. 1555–1561, 2002.
241
+
242
+ Hao Liu, Lirong He, Haoli Bai, and Zenglin Xu. Efficient structured inference for stochastic recurrent neural networks. 2017.
243
+
244
+ Alexander Neitz, Giambattista Parascandolo, Stefan Bauer, and Bernhard Schölkopf. Adaptive skip intervals: Temporal abstraction for recurrent dynamical models. arXiv preprint arXiv:1808.04768, 2018.
245
+
246
+ Junhyuk Oh, Xiaoxiao Guo, Honglak Lee, Richard L Lewis, and Satinder Singh. Action-conditional video prediction using deep networks in atari games. In Advances in Neural Information Processing Systems, pp. 2863–2871, 2015.
247
+
248
+ Sébastien Racanière, Théophane Weber, David Reichert, Lars Buesing, Arthur Guez, Danilo Jimenez Rezende, Adrià Puigdomènech Badia, Oriol Vinyals, Nicolas Heess, Yujia Li, et al. Imaginationaugmented agents for deep reinforcement learning. In Advances in Neural Information Processing Systems, pp. 5694–5705, 2017.
249
+
250
+ Antti Rasmus, Mathias Berglund, Mikko Honkala, Harri Valpola, and Tapani Raiko. Semi-supervised learning with ladder networks. In Advances in Neural Information Processing Systems, pp. 3546– 3554, 2015.
251
+
252
+ Iulian Vlad Serban, Alessandro Sordoni, Ryan Lowe, Laurent Charlin, Joelle Pineau, Aaron C Courville, and Yoshua Bengio. A hierarchical latent variable encoder-decoder model for generating dialogues. In AAAI, pp. 3295–3301, 2017.
253
+
254
+ Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction, volume 1. MIT press Cambridge, 1998.
255
+
256
+ Benigno Uria, Marc-Alexandre Côté, Karol Gregor, Iain Murray, and Hugo Larochelle. Neural autoregressive distribution estimation. The Journal of Machine Learning Research, 17(1):7184– 7220, 2016.
257
+
258
+ Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. WaveNet: A generative model for raw audio. arXiv preprint arXiv:1609.03499, 2016a.
259
+
260
+ Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016b.
261
+
262
+ Aaron van den Oord, Yazhe Li, Igor Babuschkin, Karen Simonyan, Oriol Vinyals, Koray Kavukcuoglu, George van den Driessche, Edward Lockhart, Luis C Cobo, Florian Stimberg, et al. Parallel waveNet: Fast high-fidelity speech synthesis. arXiv preprint arXiv:1711.10433, 2017.
263
+
264
+ Arun Venkatraman, Nicholas Rhinehart, Wen Sun, Lerrel Pinto, Martial Hebert, Byron Boots, Kris Kitani, and J Bagnell. Predictive-state decoders: Encoding the future into recurrent networks. In Advances in Neural Information Processing Systems, pp. 1172–1183, 2017.
265
+
266
+ Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In International conference on machine learning, pp. 2048–2057, 2015.
267
+
268
+ # A TD-VAE AS A MODEL OF JUMPY OBSERVATIONS
269
+
270
+ In section 3, we derive an approximate ELBO which forms the basis of the training loss of the one-step TD-VAE. One may wonder whether a similar idea may underpin the training loss of the jumpy TD-VAE. Here we show how to modify the derivation to provide an approximate ELBO for a slightly different training regime.
271
+
272
+ Assume a sequence $( x _ { 1 } , \dots , x _ { T } )$ , and an arbitrary distribution $S$ over subsequences $\begin{array} { r l } { \mathbf { x } _ { s } } & { { } = } \end{array}$ $( x _ { t _ { 1 } } , \ldots , x _ { t _ { n } } )$ of $\mathbf { x }$ . For each time index $t _ { i }$ , we suppose a state $z _ { t _ { i } }$ , and model the subsequence $\mathbf { x } _ { s }$ with a jumpy state-space model $\begin{array} { r } { p ( \mathbf { x } _ { s } ) = \prod _ { i } p ( \bar { z } _ { t _ { i } } \vert z _ { t _ { i - 1 } } ) p ( x _ { t _ { i } } \vert \bar { z _ { t _ { i } } } ) } \end{array}$ ; denote $\mathbf { z } _ { s } = ( z _ { t _ { 1 } } , \dots , z _ { t _ { n } } )$ the state subsequence. We use the exact same machinery as the next-step ELBO, except that we enrich the posterior distribution over $\mathbf { z } _ { s }$ by making it depend not only on observation subsequence $\mathbf { x } _ { s }$ , but on the entire sequence $\mathbf { x }$ . This is possible because posterior distributions can have arbitrary contexts; the observations which are part of $\mathbf { x }$ but not $\mathbf { x } _ { s }$ effectively serve as auxiliary variable for a stronger posterior. We use the full sequence $\mathbf { x }$ to form a sequence of belief states $b _ { t }$ at all time steps. We use in particular the ones computed at the subsampled times $t _ { i }$ . By following the same derivation as the one-step TD-VAE, we obtain:
273
+
274
+ $$
275
+ \begin{array} { r } { \mathbb { E } _ { S } \left[ \log p ( x _ { t _ { 1 } } , \dots , x _ { t _ { n } } ) \right] \ge \mathbb { E } _ { S } \Bigg [ \sum _ { i } \underset { ( z _ { t _ { i - 1 } } , z _ { t _ { i } } ) \sim q } { \mathbb { E } } \Big [ \log p ( x _ { t _ { i } } \mid z _ { t _ { i } } ) + \log p ( z _ { t _ { i - 1 } } \mid x _ { < t } ) } \\ { + \log p ( z _ { t _ { i } } \mid z _ { t _ { i - 1 } } ) - \log q ( z _ { t _ { i } } \mid x _ { \le t } ) } \\ { - \log q ( z _ { t _ { i - 1 } } \mid z _ { t _ { i } } , x _ { \le t } ) \Big ] \Bigg ] } \end{array}
276
+ $$
277
+
278
+ which, using the same belief approximations as the next step TD-VAE, becomes:
279
+
280
+ $$
281
+ \begin{array} { r l } { - \mathcal { L } = \mathbb { E } _ { S } \Bigg [ \sum _ { i } \underset { z _ { t _ { i - 1 } } \sim q ( z _ { t _ { i - 1 } } | z _ { t _ { i } } , b _ { t _ { i } } , b _ { t _ { i - 1 } } ) } { \mathbb { E } } \Big [ \log p ( x _ { t _ { i } } | z _ { t _ { i } } ) + \log p _ { B } ( z _ { t _ { i - 1 } } | b _ { t _ { i - 1 } } ) + \log p ( z _ { t _ { i } } | z _ { t _ { i - 1 } } ) } \\ { - \log p _ { B } ( z _ { t _ { i } } | b _ { t _ { i } } ) - \log p ( z _ { t _ { i - 1 } } | z _ { t _ { i } } , b _ { t _ { i - 1 } } , b _ { t _ { i } } ) \Big ] \Bigg ] ~ } & { } \end{array}
282
+ $$
283
+
284
+ which is the same loss as the TD-VAE for a particular choice of the sampling scheme $S$ (only sampling pairs).
285
+
286
+ # B DERIVATION OF THE TD-VAE MODEL FROM ITS DESIRED PROPERTIES
287
+
288
+ In this section we start with a general recurrent variational auto-encoder and consider how the desired properties detailed in sections 1 and 2 constrain the architecture. We will find that these constraints in fact naturally lead to the TD-VAE model.
289
+
290
+ Let us first consider a relatively general form of temporal variational auto-encoder. We consider recurrent models where the same module is applied at every step, and where outputs are sampled one at a time (so that arbitrarily long sequences can be generated). A very general form of such an architecture consist of forward-backward encoder RNNs and a forward decoder RNN (Figure 7) but otherwise allowing for all the connections. Several works (Chung et al., 2015; Lee et al., 2018; Archer et al., 2015; Fraccaro et al., 2016; Liu et al., 2017; Goyal et al., 2017; Buesing et al., 2018; Serban et al., 2017) fall into this framework.
291
+
292
+ Now let us consider our desired properties.
293
+
294
+ In order to sample forward in latent space, the encoder must not feed into the decoder or the prior of the latent variables, since observations are required to compute the encoded state, and we would therefore require the sampled observations to compute the distribution over future states and observations.
295
+
296
+ We next consider the constraint of computing a belief state $b _ { t }$ . The belief state $b _ { t }$ represents the state of knowledge up to time $t$ , and therefore cannot receive an input from the backwards decoder.
297
+
298
+ ![](images/9ccde79a74da241a8322e4e748872ad717f7306801af6ff0c458d4e963711a9f.jpg)
299
+ Figure 7: Recurrent variational auto-encoder. General recurrent variational auto-encoder, obtained by imposing recurrent structure, forward sampling and allowing all potential connections. Note that the encoder can have several alternating layers of forward and backward RNNs. Also note that the connection 1 has to be absent if the backwards encoder is used. Possible skip connections are not shown as they can directly be implemented in the RNN weights. If connections 2 are absent, the model is capable of forward sampling in latent space without going back to observations.
300
+
301
+ Furthermore, $b _ { t }$ should have an unrestricted access to information; it should ideally not be disturbed by sampling (two identical agents with the same information should compute the same information; this will not be the case if the computation involves sampling), nor go through information bottlenecks. This suggests using the forward encoder for computing the belief state.
302
+
303
+ Given the use of a decoder RNN, the information needed to predict the future could be stored in the decoder state, which may prevent the encoder from storing the full state information (in other words, the information contained in $x _ { 1 } , \ldots , x _ { t + 1 }$ about the state $z _ { t + 1 }$ could be partially stored in the decoder state and previous sample $z _ { t }$ ). This presents two options: the first is to make the prior $p ( z _ { t + 1 } | . )$ and the reconstruction $p ( x _ { t } | . )$ depend only on $z _ { t }$ , i.e. to only consider distributions $p ( z _ { t + 1 } \mid z _ { t } )$ and $p ( x _ { t } \mid z _ { t } )$ . The second is to include the decoder state in the belief state (together with the encoder state). We will choose the former option, as we our next constraint will invalidate the latter option.
304
+
305
+ Next, we argue that smoothing, or the dependence of posterior on the future, is an important property that should be part of our model. As an example, imagine a box that can contain two items $A$ and $B$ and two time points: $t _ { 1 }$ before opening the box, when we don’t know the content of the box, and $t _ { 2 }$ after opening it. We would want our latent variable to represent the content of the box. The perfect model of the content of the box is that the content doesn’t change (the same object is in the box before and after opening it). Now imagine $B$ is in the box. Our belief at $t _ { 2 }$ is high for $B$ but our belief at $t _ { 1 }$ is uncertain. If we sample this belief at $t _ { 1 }$ without considering $t _ { 2 }$ we would sample $A$ half of the time. However, then we would be learning a wrong model of the world: that $A$ goes to $B$ . To solve this problem, we should sample $t _ { 2 }$ first and then, given this value, sample $t _ { 1 }$ .
306
+
307
+ Smoothing requires the use of the backward encoder; this prevents the use of the decoder state as part of our belief state, since the decoder has access to the encoder, and the encoder depends on the future. We therefore require a latent-to-latent model $p ( z _ { t + 1 } \mid z _ { t } )$ .
308
+
309
+ We are therefore left with a forward encoder which ideally computes the belief state, a backwards encoder which - with the forward encoder - compute posteriors over states, and a state-to-state forward model. The training of the backwards encoder will be induced by its use as a posterior in the state-space model. How do then make sure the forward encoder is in fact trained to contain the belief state? To do so, we will force $p _ { B } ( z _ { t } \vert b _ { t } )$ to be close to the posterior by using a KL term between prior belief and posterior belief.
310
+
311
+ Before detailing the KL term, we need to consider how to practically run the backwards decoder.
312
+ Ideally, we would like to train the model in a nearly forward fashion, for arbitrary long sequences.
313
+
314
+ ![](images/cb25367ac7f23c0a12965cc2611fb51ea98660e1d19d401afae0641866433420.jpg)
315
+ Figure 8: Deep version of the model from Figure 1. A deep version of the model is formed by creating a layer similar to the shallow model of Figure 1 and replicating it. Both sampling and inference proceed downwards through the layers. Circles have the same meaning as in Figure 1 and are implemented using neural networks, such as LSTMs.
316
+
317
+ This prevents running the backwards inference from the end of the sequence. However if we assume that $p _ { B }$ represents our best belief about the future, we can take a sample from it as an instance of the future: $z _ { t _ { 2 } } \sim p _ { B } ( z _ { t _ { 2 } } | b _ { t _ { 2 } } )$ . It forms a type of bootstrap information. Then we can go backwards and infer what would the world have looked like given this future (e.g. the object $B$ was still in the box even if we don’t see it). Using VAE training, we sample $z _ { 1 }$ from its posterior $q ( z _ { t _ { 1 } } | z _ { t _ { 2 } } , b _ { t _ { 2 } } , b _ { t _ { 1 } } )$ (the conditioning variables are the ones we have available locally), using $p _ { B } ( z _ { t _ { 1 } } | b _ { t _ { 1 } } )$ as prior. Conversely, for $t _ { 2 }$ , we sample from $p _ { B } ( z _ { t _ { 2 } } | b _ { t _ { 2 } } )$ as posterior, but with $p \big ( \boldsymbol { z } _ { t _ { 2 } } \big | \boldsymbol { z } _ { t _ { 1 } } \big )$ as prior. We therefore obtain the VAE losses $\log q ( z _ { 1 } | z _ { 2 } , s _ { 1 } , s _ { 2 } ) - \log p _ { B } ( z _ { 1 } | s _ { 1 } )$ at $t _ { 1 }$ and $\log p _ { B } ( z _ { 2 } | s _ { 2 } ) - \log p _ { P } ( z _ { 2 } | z _ { 1 } )$ at $t _ { 2 }$ . In addition we have the reconstruction term $p _ { D } ( x _ { 2 } | z _ { 2 } )$ that grounds the latent in the input. The whole algorithm is presented in the Figure 1.
318
+
319
+ # C HIERARCHICAL MODEL
320
+
321
+ In the main paper we detailed a framework for learning models by bridging two temporally separated time points. It would be desirable to model the world with different hierarchies of state, the higherlevel states predicting the same-level or lower-level states, and ideally representing more invariant or abstract information. In this section we describe a stacked (hierarchical) version of the model.
322
+
323
+ The first part to extend to $L$ layers is the RNN that aggregates observations to produce the belief state $b$ . Here we simply use a deep LSTM, but with layer $l$ receiving inputs also from layer $l + 1$ from the previous time step. This is so that the higher layers can influence the lower ones (and vice versa). For $l = 1 , \ldots , L$ :
324
+
325
+ $$
326
+ b _ { t } ^ { l } = \mathrm { R N N } ( b _ { t } ^ { l } , b _ { t } ^ { l - 1 } , b _ { t - 1 } ^ { l + 1 } , \boldsymbol { x } _ { t } )
327
+ $$
328
+
329
+ and setting $b _ { 0 } = b _ { L }$ and $b _ { L + 1 } = \emptyset$ .
330
+
331
+ We create a deep version of the belief part of the model by stacking the shallow one, as shown in Figure 8. In the usual spirit of deep directed models, the model samples downwards, generating higher level representations before the lower level ones (closer to pixels). The model implements deep inference, that is, the posterior distribution of one layer depends on the samples from the posterior distribution in previously sampled layers. The order of inference is a design choice, and we use the same direction as that of generation, from higher to lower layers, as done for example by Gregor et al. (2016); Kingma et al. (2016); Rasmus et al. (2015). We implement the dependence of various distributions on latent variables sampled so far using a recurrent neural network that summarizes all such variables (in a given group of distributions). We don’t share the weights between different layers. Given these choices, we can allow all connections consistent with the model. Next we describe the functional forms used in our model.
332
+
333
+ # D FUNCTIONAL FORMS AND PARAMETER CHOICES
334
+
335
+ Here we describe the functional forms used in more detail. We start with those used for the harmonic oscillator experiments. Let $x _ { t }$ , $t = 1 , \dots , T$ be the input sequence. The belief state network (both is a standard LSTM network: $b _ { t } , c _ { t } = \mathrm { L S T M } ( x _ { t } , b _ { t - 1 } , c _ { t - 1 } )$ . For any arbitrary context $x$ , we denote $D$ the map from $x$ to a normal distribution with mean $\mu ( x )$ and log-standard deviation $\log \sigma ( x )$ , where $[ \mu , \log { \sigma } ] = W _ { 3 } \operatorname { t a n h } ( W _ { 1 } x + B _ { 1 } ) \sigma ( W _ { 2 } x + B _ { 2 } ) + B _ { 3 } $ , with $W _ { 1 } , W _ { 2 } , W _ { 3 }$ as weight matrices and $B _ { 1 } , B _ { 2 } , B _ { 3 }$ as biases. We use the letter $D$ for all such maps (even when they don’t share weights); weights are shared if the contexts are identical except for the time index. Consider the update for a given pair of time points $t _ { 1 } < t _ { 2 }$ . We use a two-layer hierarchical TD-VAE. A variable $v$ at layer $l$ and time $t$ is denoted $\mathbf { \widehat { v } } _ { t } ^ { l }$ . Beliefs are time $t _ { 1 }$ and $t _ { 2 }$ are denoted $b _ { t _ { 1 } } , b _ { t _ { 2 } }$ . The set of equations describing the system are as follows.
336
+
337
+ $$
338
+ \begin{array} { r l } { \frac { 1 } { 2 } } & { { } = \frac { \lambda _ { 1 } } { 3 } - \frac { \lambda _ { 2 } } { 3 } - \mathcal { B } \xi _ { 2 } , } \\ { \frac { 1 } { 2 } } & { { } = \frac { \lambda _ { 2 } } { 3 } - \frac { \lambda _ { 3 } } { 3 } - \mathcal { B } \xi _ { 2 } , } \\ { \frac { 1 } { 2 } } & { { } = \frac { \lambda _ { 1 } } { 3 } - \frac { \lambda _ { 2 } } { 3 } - \frac { \lambda _ { 3 } } { 3 } - \frac { \lambda _ { 3 } } { 3 } } \\ { \frac { 1 } { 2 } } & { { } = \frac { \lambda _ { 2 } } { 3 } - \frac { \lambda _ { 3 } } { 3 } - \frac { \lambda _ { 3 } } { 3 } } \\ { \frac { 1 } { 2 } } & { { } = \frac { \lambda _ { 1 } } { 3 } - \frac { \lambda _ { 2 } } { 3 } - \frac { \lambda _ { 3 } } { 3 } } \\ { \frac { 1 } { 2 } } & { { } = \frac { \lambda _ { 2 } } { 3 } - \frac { \lambda _ { 3 } } { 3 } - \frac { \lambda _ { 3 } } { 3 } } \\ { \frac { 1 } { 2 } } & { { } = \frac { \lambda _ { 1 } } { 3 } - \frac { \lambda _ { 2 } } { 3 } - \frac { \lambda _ { 3 } } { 3 } } \\ { \frac { 1 } { 2 } } & { { } = \frac { \lambda _ { 2 } } { 3 } - \frac { \lambda _ { 3 } } { 3 } - \frac { \lambda _ { 3 } } { 3 } } \\ { \frac { 1 } { 2 } } & { { } = \frac { \lambda _ { 1 } } { 3 } - \frac { \lambda _ { 2 } } { 3 } } \\ { \frac { 1 } { 2 } } & { { } = \frac { \lambda _ { 1 } } { 3 } - \frac { \lambda _ { 2 } } { 3 } } \\ { \frac { 1 } { 2 } } & { { } = \frac { \lambda _ { 2 } } { 3 } - \frac { \lambda _ { 3 } } { 3 } } \\ { \frac { 1 } { 2 } } & { { } = \frac { \lambda _ { 1 } } { 3 } - \frac { \lambda _ { 2 } } { 3 } } \\ { \frac { 1 } { 2 } } & { { } = \frac { \lambda _ { 1 } } { 3 } - \frac { \lambda _ { 2 } } { 3 } } \\ { \frac { 1 } { 2 } } & \end{array}
339
+ $$
340
+
341
+ The hidden layer of the $D$ maps is 50; the size of each $z _ { t } ^ { l }$ is 8. Belief states have size 50. We use the Adam optimizer with learning rate 0.0005.
342
+
343
+ The same network works for the MNIST experiment with the following modifications. Observations are pre-processed by a two hidden layer MLP with ReLU nonlinearity. The decoder $p _ { D }$ also have a two layer MLP, which outputs the logits of a Bernoulli distribution. $\delta _ { t }$ was not passed as input to any network.
344
+
345
+ For the DeepMind Lab experiments, all the circles in Figure 8 are LSTMs. Blue circles are fully connected LSTM, the others are all convolutional LSTM. We use a fully connected LSTM of size 512 and convolutional layers of size $4 \times 4 \times 2 5 6$ . All kernel sizes are $3 \times 3$ . The decoder layer has an extra canvas layer, similar to DRAW.
parse/train/S1x4ghC9tQ/S1x4ghC9tQ_content_list.json ADDED
@@ -0,0 +1,1896 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "TEMPORAL DIFFERENCE VARIATIONAL AUTO-ENCODER ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 99,
9
+ 549,
10
+ 147
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Karol Gregor, George Papamakarios, Frederic Besse, Lars Buesing, Théophane Weber DeepMind {karolg, gpapamak, fbesse, lbuesing, theophane}@google.com ",
17
+ "bbox": [
18
+ 186,
19
+ 169,
20
+ 794,
21
+ 212
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 250,
32
+ 544,
33
+ 263
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "To act and plan in complex environments, we posit that agents should have a mental simulator of the world with three characteristics: (a) it should build an abstract state representing the condition of the world; (b) it should form a belief which represents uncertainty on the world; (c) it should go beyond simple step-by-step simulation, and exhibit temporal abstraction. Motivated by the absence of a model satisfying all these requirements, we propose TD-VAE, a generative sequence model that learns representations containing explicit beliefs about states several steps into the future, and that can be rolled out directly without single-step transitions. TD-VAE is trained on pairs of temporally separated time points, using an analogue of temporal difference learning used in reinforcement learning. ",
40
+ "bbox": [
41
+ 233,
42
+ 281,
43
+ 766,
44
+ 420
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 445,
55
+ 336,
56
+ 462
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Generative models of sequential data have received a lot of attention, due to their wide applicability in domains such as speech synthesis (van den Oord et al., 2016a; 2017), neural translation (Bahdanau et al., 2014), image captioning (Xu et al., 2015), and many others. Different application domains will often have different requirements (e.g. long term coherence, sample quality, abstraction learning, etc.), which in turn will drive the choice of the architecture and training algorithm. ",
63
+ "bbox": [
64
+ 174,
65
+ 477,
66
+ 825,
67
+ 547
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Of particular interest to this paper is the problem of reinforcement learning in partially observed environments, where, in order to act and explore optimally, agents need to build a representation of the uncertainty about the world, computed from the information they have gathered so far. While an agent endowed with memory could in principle learn such a representation implicitly through model-free reinforcement learning, in many situations the reinforcement signal may be too weak to quickly learn such a representation in a way which would generalize to a collection of tasks. ",
74
+ "bbox": [
75
+ 174,
76
+ 554,
77
+ 825,
78
+ 638
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Furthermore, in order to plan in a model-based fashion, an agent needs to be able to imagine distant futures which are consistent with the agent’s past. In many situations however, planning step-by-step is not a cognitively or computationally realistic approach. ",
85
+ "bbox": [
86
+ 176,
87
+ 645,
88
+ 825,
89
+ 688
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "To successfully address an application such as the above, we argue that a model of the agent’s experience should exhibit the following properties: ",
96
+ "bbox": [
97
+ 176,
98
+ 694,
99
+ 823,
100
+ 722
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "• The model should learn an abstract state representation of the data and be capable of making predictions at the state level, not just the observation level. \n• The model should learn a belief state, i.e. a deterministic, coded representation of the filtering posterior of the state given all the observations up to a given time. A belief state contains all the information an agent has about the state of the world and thus about how to act optimally. \n• The model should exhibit temporal abstraction, both by making ‘jumpy’ predictions (predictions several time steps into the future), and by being able to learn from temporally separated time points without backpropagating through the entire time interval. ",
107
+ "bbox": [
108
+ 181,
109
+ 734,
110
+ 825,
111
+ 856
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "To our knowledge, no model in the literature meets these requirements. In this paper, we develop a new model and associated training algorithm, called Temporal Difference Variational Auto-Encoder (TD-VAE), which meets all of the above requirements. We first develop TD-VAE in the sequential, non-jumpy case, by using a modified evidence lower bound (ELBO) for stochastic state space models (Krishnan et al., 2015; Fraccaro et al., 2016; Buesing et al., 2018) which relies on jointly training a filtering posterior and a local smoothing posterior. We demonstrate that on a simple task, this new inference network and associated lower bound lead to improved likelihood compared to methods classically used to train deep state-space models. ",
118
+ "bbox": [
119
+ 174,
120
+ 868,
121
+ 825,
122
+ 924
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "",
129
+ "bbox": [
130
+ 174,
131
+ 103,
132
+ 823,
133
+ 159
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "Following the intuition given by the sequential TD-VAE, we develop the full TD-VAE model, which learns from temporally extended data by making jumpy predictions into the future. We show it can be used to train consistent jumpy simulators of complex 3D environments. Finally, we illustrate how training a filtering a posterior leads to the computation of a neural belief state with good representation of the uncertainty on the state of the environment. ",
140
+ "bbox": [
141
+ 174,
142
+ 166,
143
+ 825,
144
+ 236
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "2 MODEL DESIDERATA ",
151
+ "text_level": 1,
152
+ "bbox": [
153
+ 176,
154
+ 267,
155
+ 379,
156
+ 282
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "2.1 CONSTRUCTION OF A LATENT STATE-SPACE ",
163
+ "text_level": 1,
164
+ "bbox": [
165
+ 178,
166
+ 305,
167
+ 514,
168
+ 319
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "Autoregressive models. One of the simplest way to model sequential data $( x _ { 1 } , \\ldots , x _ { T } )$ is to use the chain rule to decompose the joint sequence likelihood as a product of conditional probabilities, i.e. $\\begin{array} { r } { \\log p ( x _ { 1 } , \\dots , \\dot { x _ { T } } ) = \\sum _ { t } \\log p ( \\dot { x _ { t } } | x _ { 1 } , \\dots , x _ { t - 1 } ) } \\end{array}$ . This formula can be used to train an autoregressive model of data, by combining an RNN which aggregates information from the past (recursively computing an internal state $h _ { t } = f ( h _ { t - 1 } , x _ { t } ) )$ with a conditional generative model which can score the data $x _ { t }$ given the context $h _ { t }$ . This idea is used in handwriting synthesis (Graves, 2013), density estimation (Uria et al., 2016), image synthesis (van den Oord et al., 2016b), audio synthesis (van den Oord et al., 2017), video synthesis (Kalchbrenner et al., 2016), generative recall tasks (Gemici et al., 2017), and environment modeling (Oh et al., 2015; Chiappa et al., 2017). ",
175
+ "bbox": [
176
+ 174,
177
+ 334,
178
+ 825,
179
+ 460
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "While these models are conceptually simple and easy to train, one potential weakness is that they only make predictions in the original observation space, and don’t learn a compressed representation of data. As a result, these models tend to be computationally heavy (for video prediction, they constantly decode and re-encode single video frames). Furthermore, the model can be computationally unstable at test time since it is trained as a next step model (the RNN encoding real data), but at test time it feeds back its prediction into the RNN. Various methods have been used to alleviate this issue (Bengio et al., 2015; Lamb et al., 2016; Goyal et al., 2017; Amos et al., 2018). ",
186
+ "bbox": [
187
+ 174,
188
+ 467,
189
+ 825,
190
+ 564
191
+ ],
192
+ "page_idx": 1
193
+ },
194
+ {
195
+ "type": "text",
196
+ "text": "State-space models. An alternative to autoregressive models are models which operate on a higher level of abstraction, and use latent variables to model stochastic transitions between states (grounded by observation-level predictions). This enables to sample state-to-state transitions only, without needing to render the observations, which can be faster and more conceptually appealing. They generally consist of decoder or prior networks, which detail the generative process of states and observations, and encoder or posterior networks, which estimate the distribution of latents given the observed data. There is a large amount of recent work on these type of models, which differ in the precise wiring of model components (Bayer & Osendorfer, 2014; Chung et al., 2015; Krishnan et al., 2015; Archer et al., 2015; Fraccaro et al., 2016; Liu et al., 2017; Serban et al., 2017; Buesing et al., 2018; Lee et al., 2018; Ha & Schmidhuber, 2018). ",
197
+ "bbox": [
198
+ 174,
199
+ 570,
200
+ 825,
201
+ 710
202
+ ],
203
+ "page_idx": 1
204
+ },
205
+ {
206
+ "type": "text",
207
+ "text": "Let $\\mathbf { z } ~ = ~ ( z _ { 1 } , \\dots , z _ { T } )$ be a state sequence and $\\mathbf { x } ~ = ~ ( x _ { 1 } , \\dots , x _ { T } )$ an observation sequence. We assume a general form of state-space model, where the joint state and observation likelihood can be written as $\\begin{array} { r } { p ( \\mathbf { x } , \\mathbf { z } ) = \\prod _ { t } p ( z _ { t } \\mid \\bar { z } _ { t - 1 } ) p ( x _ { t } \\mid z _ { t } ) } \\end{array}$ .1 These models are commonly trained with a VAEinspired bound, by computing a posterior $q ( \\mathbf { z } \\mid \\mathbf { x } )$ over the states given the observations. Often, the posterior is decomposed autoregressively: $\\begin{array} { r } { \\dot { q } ( \\mathbf { \\dot { z } } \\vert \\mathbf { x } ) = \\prod _ { t } q ( z _ { t } \\vert z _ { t - 1 } , \\phi _ { t } ( \\mathbf { x } ) ) } \\end{array}$ , where $\\phi _ { t }$ is a function of $( x _ { 1 } , \\ldots , x _ { t } )$ for filtering posteriors or the entire sequence $\\mathbf { x }$ for smoothing posteriors. This leads to the following lower bound: ",
208
+ "bbox": [
209
+ 173,
210
+ 717,
211
+ 825,
212
+ 815
213
+ ],
214
+ "page_idx": 1
215
+ },
216
+ {
217
+ "type": "equation",
218
+ "img_path": "images/ed6fc51dbd2db09a3256ce190b8356696dd952a0c10cb29fd3f22d087f04f6bd.jpg",
219
+ "text": "$$\n\\log p ( \\mathbf { x } ) \\geq \\mathbb { E } _ { \\mathbf { z } \\sim q ( \\mathbf { z } \\mid \\mathbf { x } ) } \\left[ \\sum _ { t } \\log p ( x _ { t } \\mid z _ { t } ) + \\log p ( z _ { t } \\mid z _ { t - 1 } ) - \\log q ( z _ { t } \\mid z _ { t - 1 } , \\phi _ { t } ( \\mathbf { x } ) ) \\right] .\n$$",
220
+ "text_format": "latex",
221
+ "bbox": [
222
+ 214,
223
+ 830,
224
+ 782,
225
+ 858
226
+ ],
227
+ "page_idx": 1
228
+ },
229
+ {
230
+ "type": "text",
231
+ "text": "2.2 ONLINE CREATION OF BELIEF STATE. ",
232
+ "text_level": 1,
233
+ "bbox": [
234
+ 176,
235
+ 103,
236
+ 470,
237
+ 117
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "A key feature of sequential models of data is that they allow to reason about the conditional distribution of the future given the past: $p ( x _ { t + 1 } , \\ldots , x _ { T } \\mid x _ { 1 } , \\cdot \\cdot \\cdot , x _ { t } )$ . For reinforcement learning in partially observed environments, this distribution governs the distribution of returns given past observations, and as such, it is sufficient to derive the optimal policy. For generative sequence modeling, it enables conditional generation of data given a context sequence. For this reason, it is desirable to compute sufficient statistics $b _ { t } = b _ { t } ( x _ { 1 } , \\dots , x _ { t } )$ of the future given the past, which allow to rewrite the conditional distribution as $p ( x _ { t + 1 } , \\dots , x _ { T } | x _ { 1 } , \\dots , x _ { t } ) \\{ \\approx p ( x _ { t + 1 } , \\dots , x _ { T } | b _ { t } )$ . For an autoregressive model as described in section 2.1, the internal RNN state $h _ { t }$ can immediately be identified as the desired sufficient statistics $b _ { t }$ . However, for the reasons mentioned in the previous section, we would like to identify an equivalent quantity for a state-space model. ",
244
+ "bbox": [
245
+ 173,
246
+ 130,
247
+ 825,
248
+ 270
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "For a state-space model, the filtering distribution $p ( z _ { t } \\mid x _ { 1 } , . . . , x _ { t } )$ , also known as the belief state in reinforcement learning, is sufficient to compute the conditional future distribution, due to the Markov assumption underlying the state-space model and the following derivation: ",
255
+ "bbox": [
256
+ 174,
257
+ 276,
258
+ 825,
259
+ 319
260
+ ],
261
+ "page_idx": 2
262
+ },
263
+ {
264
+ "type": "equation",
265
+ "img_path": "images/d4d6bfea538e2f12ead91ac5e67492f1d5524b815e9e69e85e8868db31829541.jpg",
266
+ "text": "$$\np ( x _ { t + 1 } , \\dots , x _ { T } \\mid x _ { 1 } , \\dots , x _ { t } ) = \\int p ( z _ { t } \\mid x _ { 1 } , \\dots , x _ { t } ) p ( x _ { t + 1 } , \\dots , x _ { T } \\mid z _ { t } ) \\mathrm { d } z _ { t } .\n$$",
267
+ "text_format": "latex",
268
+ "bbox": [
269
+ 245,
270
+ 327,
271
+ 751,
272
+ 359
273
+ ],
274
+ "page_idx": 2
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "Thus, if we train a network that extracts a code $b _ { t }$ from $( x _ { 1 } , \\ldots , x _ { t } )$ so that $p ( z _ { t } | x _ { 1 } , \\ldots , x _ { t } ) \\approx$ $p ( \\boldsymbol { z } _ { t } | \\boldsymbol { b } _ { t } )$ , $b _ { t }$ would contain all the information about the state of the world the agent has, and would effectively form a neural belief state, i.e. a code fully characterizing the filtering distribution. ",
279
+ "bbox": [
280
+ 173,
281
+ 367,
282
+ 825,
283
+ 410
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "Classical training of state-space model does not compute a belief state: by computing a joint, autoregressive posterior $\\begin{array} { r } { q ( \\mathbf { z } \\vert \\mathbf { x } ) = \\prod _ { t } q ( z _ { t } \\vert z _ { t - 1 } , \\mathbf { x } ) } \\end{array}$ , some of the uncertainty about the marginal posterior of $z _ { t }$ may be ‘leaked’ in the sample $z _ { t - 1 }$ . Since that sample is stochastic, to obtain all information from $( x _ { 1 } , \\ldots , x _ { t } )$ about $z _ { t }$ , we would need to re-sample $z _ { t - 1 }$ , which would in turn require re-sampling $z _ { t - 2 }$ all the way to $z _ { 1 }$ . ",
290
+ "bbox": [
291
+ 174,
292
+ 416,
293
+ 825,
294
+ 487
295
+ ],
296
+ "page_idx": 2
297
+ },
298
+ {
299
+ "type": "text",
300
+ "text": "While the notion of a belief state itself and its connection to optimal policies in POMDPs is well known (Astrom, 1965; Kaelbling et al., 1998; Hauskrecht, 2000), it has often been restricted to the tabular case (Markov chain), and little work investigates computing belief states for learned deep models. A notable exception is (Igl et al., 2018), which uses a neural form of particle filtering, and represents the belief state more explicitly as a weighted collection of particles. Related to our definition of belief states as sufficient statistics is the notion of predictive state representations (PSRs) (Littman & Sutton, 2002); see also (Venkatraman et al., 2017) for a model that learns PSRs which, combined with a decoder, can predict future observations. ",
301
+ "bbox": [
302
+ 173,
303
+ 492,
304
+ 825,
305
+ 606
306
+ ],
307
+ "page_idx": 2
308
+ },
309
+ {
310
+ "type": "text",
311
+ "text": "Our last requirement for the model is that of temporal abstraction. We postpone the discussion of this aspect until section 4. ",
312
+ "bbox": [
313
+ 174,
314
+ 612,
315
+ 823,
316
+ 640
317
+ ],
318
+ "page_idx": 2
319
+ },
320
+ {
321
+ "type": "text",
322
+ "text": "3 BELIEF-STATE-BASED ELBO FOR SEQUENTIAL TD-VAE",
323
+ "text_level": 1,
324
+ "bbox": [
325
+ 174,
326
+ 661,
327
+ 679,
328
+ 679
329
+ ],
330
+ "page_idx": 2
331
+ },
332
+ {
333
+ "type": "text",
334
+ "text": "In this section, we develop a sequential model that satisfies the requirements given in the previous section, namely (a) it constructs a latent state-space, and (b) it creates a online belief state. We consider an arbitrary state space model with joint latent and observable likelihood given by $\\begin{array} { r } { p ( \\mathbf { x } , \\mathbf { z } ) = \\prod _ { t } p ( z _ { t } \\mid z _ { t - 1 } ) p ( x _ { t } \\mid z _ { t } ^ { \\cdot } ) } \\end{array}$ , and we aim to optimize the data likelihood $\\log p ( \\mathbf { x } )$ . We begin by autoregressively decomposing the data likelihood as: $\\begin{array} { r } { \\log p ( \\mathbf { x } ) = \\sum _ { t } \\log p ( x _ { t } \\mid x _ { < t } ) } \\end{array}$ . For a given $t$ , we evaluate the conditional likelihood $p ( x _ { t } \\mid x _ { < t } )$ by inferring over two latent states only: $z _ { t - 1 }$ and $z _ { t }$ , as they will naturally make belief states appear for times $t - 1$ and $t$ : ",
335
+ "bbox": [
336
+ 173,
337
+ 694,
338
+ 825,
339
+ 792
340
+ ],
341
+ "page_idx": 2
342
+ },
343
+ {
344
+ "type": "equation",
345
+ "img_path": "images/c7b1b7d63b6037fe2b59e2988d64c3a1967dc7fb961afce640473f17816614d5.jpg",
346
+ "text": "$$\n\\begin{array} { r l } & { \\log p ( x _ { t } \\mid x _ { < t } ) \\ge \\underset { ( z _ { t - 1 } , z _ { t } ) \\sim q ( z _ { t - 1 } , z _ { t } \\mid x _ { \\le t } ) } { \\mathbb { E } } \\Big [ \\log p ( x _ { t } \\mid z _ { t - 1 } , z _ { t } , x _ { < t } ) + \\log p ( z _ { t - 1 } , z _ { t } \\mid x _ { < t } ) } \\\\ & { \\qquad \\quad - \\log q ( z _ { t - 1 } , z _ { t } \\mid x _ { \\le t } ) \\Big ] . } \\end{array}\n$$",
347
+ "text_format": "latex",
348
+ "bbox": [
349
+ 209,
350
+ 800,
351
+ 789,
352
+ 862
353
+ ],
354
+ "page_idx": 2
355
+ },
356
+ {
357
+ "type": "text",
358
+ "text": "Because of the Markov assumptions underlying the state-space model, we can simplify $p ( x _ { t } \\mid z _ { t - 1 } , z _ { t } , x _ { < t } ) = p ( x _ { t } \\mid z _ { t } )$ and decompose $p ( z _ { t - 1 } , z _ { t } | x _ { < t } ) = p ( z _ { t - 1 } | x _ { < t } ) p ( z _ { t } | z _ { t - 1 } )$ . Next, we choose to decompose $q ( \\boldsymbol { z } _ { t - 1 } , \\boldsymbol { z } _ { t } \\mid \\boldsymbol { x } _ { \\le t } )$ as a belief over $z _ { t }$ and a one-step smoothing distribution over $z _ { t - 1 }$ : $q ( z _ { t - 1 } , z _ { t } | x _ { \\leq t } ) = q ( z _ { t } | \\bar { x _ { \\leq t } } ) q ( z _ { t - 1 } | z _ { t } , x _ { \\leq t } )$ . We obtain the following belief-based ",
359
+ "bbox": [
360
+ 173,
361
+ 867,
362
+ 825,
363
+ 926
364
+ ],
365
+ "page_idx": 2
366
+ },
367
+ {
368
+ "type": "text",
369
+ "text": "ELBO for state-space models: ",
370
+ "bbox": [
371
+ 174,
372
+ 103,
373
+ 372,
374
+ 118
375
+ ],
376
+ "page_idx": 3
377
+ },
378
+ {
379
+ "type": "equation",
380
+ "img_path": "images/28dc121a87616141f3bd7cc314685bf6a4d84bf0d66939b213968fa21865f56e.jpg",
381
+ "text": "$$\n\\begin{array} { c } { \\log p ( x _ { t } \\mid x _ { < t } ) \\geq \\underset { ( z _ { t - 1 } , z _ { t } ) \\sim q ( z _ { t - 1 } , z _ { t } \\mid x _ { \\leq t } ) } { \\mathbb { E } } \\Big [ \\log p ( x _ { t } \\mid z _ { t } ) + \\log p ( z _ { t - 1 } \\mid x _ { < t } ) + \\log p ( z _ { t } \\mid z _ { t - 1 } ) } \\\\ { - \\log q ( z _ { t } \\mid x _ { \\leq t } ) - \\log q ( z _ { t - 1 } \\mid z _ { t } , x _ { \\leq t } ) \\Big ] . } \\end{array}\n$$",
382
+ "text_format": "latex",
383
+ "bbox": [
384
+ 192,
385
+ 125,
386
+ 805,
387
+ 186
388
+ ],
389
+ "page_idx": 3
390
+ },
391
+ {
392
+ "type": "text",
393
+ "text": "Both quantities $p ( z _ { t - 1 } \\mid x _ { \\leq t - 1 } )$ and $q ( \\boldsymbol { z } _ { t } | \\boldsymbol { x } _ { \\le t } )$ represent the belief state of the model at different times, so at this stage we approximate them with the same distribution $p _ { B } ( z \\vert b )$ , with $b _ { t } = f ( b _ { t - 1 } , x _ { t } )$ representing the belief state code for $z _ { t }$ . Similarly, we represent the smoothing posterior over $z _ { t - 1 }$ as $q ( \\bar { z } _ { t - 1 } | z _ { t } , \\bar { b } _ { t - 1 } , b _ { t } )$ . We obtain the following loss: ",
394
+ "bbox": [
395
+ 176,
396
+ 191,
397
+ 825,
398
+ 248
399
+ ],
400
+ "page_idx": 3
401
+ },
402
+ {
403
+ "type": "equation",
404
+ "img_path": "images/41aff7c07e02ac4728f7f18ee222bde63e456f9a276ba9d93dafbdfe5a4bfc7b.jpg",
405
+ "text": "$$\n\\begin{array} { r l } { - \\mathcal { L } = } & { \\underset { z _ { t } \\sim p _ { B } ( z _ { t } \\mid b _ { t } ) } { \\mathbb { E } } \\Big [ \\log p ( x _ { t } \\mid z _ { t } ) + \\log p _ { B } ( z _ { t - 1 } \\mid b _ { t - 1 } ) + \\log p ( z _ { t } \\mid z _ { t - 1 } ) } \\\\ & { \\qquad \\quad \\ : z _ { t - 1 } \\sim q ( z _ { t - 1 } \\mid z _ { t } , b _ { t } , b _ { t - 1 } ) } \\\\ & { \\qquad \\quad \\ : - \\log p _ { B } ( z _ { t } \\mid b _ { t } ) - \\log q ( z _ { t - 1 } \\mid z _ { t } , b _ { t - 1 } , b _ { t } ) \\Big ] . } \\end{array}\n$$",
406
+ "text_format": "latex",
407
+ "bbox": [
408
+ 223,
409
+ 255,
410
+ 771,
411
+ 327
412
+ ],
413
+ "page_idx": 3
414
+ },
415
+ {
416
+ "type": "text",
417
+ "text": "We provide an intuition on the different terms of the ELBO in the next section. ",
418
+ "bbox": [
419
+ 173,
420
+ 338,
421
+ 689,
422
+ 354
423
+ ],
424
+ "page_idx": 3
425
+ },
426
+ {
427
+ "type": "text",
428
+ "text": "4 TD-VAE AND JUMPY STATE MODELING ",
429
+ "text_level": 1,
430
+ "bbox": [
431
+ 174,
432
+ 375,
433
+ 537,
434
+ 391
435
+ ],
436
+ "page_idx": 3
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "The model derived in the previous section expresses a state model $p ( z _ { t } \\mid z _ { t - 1 } )$ that describes how the state of the world evolves from one time step to the next. However, in many applications, the relevant timescale for planning may not be the one at which we receive observations and execute simple actions. Imagine for example planning for a trip abroad; the different steps involved (discussing travel options, choosing a destination, buying a ticket, packing a suitcase, going to the airport, and so on), all occur at vastly different time scales (potentially months in the future at the beginning of the trip, and days during the trip). Certainly, making a plan for this situation does not involve making second-by-second decisions. This suggests that we should look for models that can imagine future states directly, without going through all intermediate states. ",
441
+ "bbox": [
442
+ 174,
443
+ 406,
444
+ 825,
445
+ 532
446
+ ],
447
+ "page_idx": 3
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "Beyond planning, there are several other reasons that motivate modeling the future directly. First, training signal coming from the future can be stronger than small changes happening between time steps. Second, the behavior of the model should ideally be independent from the underlying temporal sub-sampling of the data, if the latter is an arbitrary choice. Third, jumpy predictions can be computationally efficient; when predicting several steps into the future, there may be some intervals where the prediction is either easy (e.g. a ball moving straight), or the prediction is complex but does not affect later time steps — which Neitz et al. (2018) call inconsequential chaos. ",
452
+ "bbox": [
453
+ 174,
454
+ 539,
455
+ 825,
456
+ 636
457
+ ],
458
+ "page_idx": 3
459
+ },
460
+ {
461
+ "type": "text",
462
+ "text": "There is a number of research directions that consider temporal jumps. Koutnik et al. (2014) and Chung et al. (2016) consider recurrent neural network with skip connections, making it easier to bridge distant timesteps. Buesing et al. (2018) temporally sub-sample the data and build a jumpy model (for fixed jump size) of this data; but by doing so they also drop the information contained in the skipped observations. Neitz et al. (2018) and Jayaraman et al. (2018) predict sequences with variable time-skips, by choosing as target the most predictable future frames. They predict the observations directly without learning appropriate states, and only focus on nearly fully observed problems (and therefore do not need to learn a notion of belief state). For more general problems, this is a fundamental limitation, as even if one could in principle learn a jumpy observation model $p ( x _ { t + \\delta } | x _ { \\leq t } )$ , it cannot be used recursively (feeding $x _ { t + \\delta }$ back to the RNN and predicting $x _ { t + \\delta + \\delta ^ { \\prime } } )$ . This is because $x _ { t + \\delta }$ does not capture the full state of the system and so we would be missing information from $t$ to $t + \\delta$ to fully characterize what happens after time $t + \\delta$ . In addition, $x _ { t + \\delta }$ might not be appropriate even as target, because some important information can only be extracted from a number of frames (potentially arbitrarily separated), such as a behavior of an agent. ",
463
+ "bbox": [
464
+ 173,
465
+ 643,
466
+ 825,
467
+ 838
468
+ ],
469
+ "page_idx": 3
470
+ },
471
+ {
472
+ "type": "text",
473
+ "text": "4.1 THE TD-VAE MODEL ",
474
+ "text_level": 1,
475
+ "bbox": [
476
+ 176,
477
+ 854,
478
+ 364,
479
+ 869
480
+ ],
481
+ "page_idx": 3
482
+ },
483
+ {
484
+ "type": "text",
485
+ "text": "Motivated by the model derived in section 3, we extend sequential TD-VAE to exhibit time abstraction. We start from the same assumptions and architectural form: there exists a sequence of states $z _ { 1 } , \\dots , z _ { T }$ from which we can predict the observations $x _ { 1 } , \\ldots , x _ { T }$ . A forward RNN encodes a belief state $b _ { t }$ from past observations $x _ { \\leq t }$ . The main difference is that, instead of relating information known at times $t$ and $t + 1$ through the states $z _ { t }$ and $z _ { t + 1 }$ , we relate two distant time steps $t _ { 1 }$ and $t _ { 2 }$ through their respective states $z _ { t _ { 1 } }$ and $z _ { t _ { 2 } }$ , and we learn a jumpy, state-to-state model $p \\big ( \\boldsymbol { z } _ { t _ { 2 } } \\mid \\boldsymbol { z } _ { t _ { 1 } } \\big )$ between $z _ { t _ { 1 } }$ and $z _ { t _ { 2 } }$ . Following equation 5, the negative loss for the TD-VAE model is: ",
486
+ "bbox": [
487
+ 176,
488
+ 882,
489
+ 825,
490
+ 924
491
+ ],
492
+ "page_idx": 3
493
+ },
494
+ {
495
+ "type": "image",
496
+ "img_path": "images/a7723f2f0aeb62cb85ef6f1a2219b174363ded213b7cf0db50ca339574f8081b.jpg",
497
+ "image_caption": [
498
+ "Figure 1: Diagram of TD-VAE. Follow the red panels for an explanation of the architecture. For succinctness, we use the notation $p _ { D }$ to denote the decoder $p ( x | z )$ , $p _ { T }$ to denote the transition distribution $p ( s _ { t _ { 2 } } | s _ { t _ { 1 } } )$ , $q _ { S }$ for the smoothing distribution and $p _ { B }$ for the belief distribution. "
499
+ ],
500
+ "image_footnote": [],
501
+ "bbox": [
502
+ 186,
503
+ 111,
504
+ 815,
505
+ 445
506
+ ],
507
+ "page_idx": 4
508
+ },
509
+ {
510
+ "type": "text",
511
+ "text": "",
512
+ "bbox": [
513
+ 176,
514
+ 525,
515
+ 823,
516
+ 583
517
+ ],
518
+ "page_idx": 4
519
+ },
520
+ {
521
+ "type": "equation",
522
+ "img_path": "images/208f6f71c4bee25284afe95bfd18f408bacff4a89a8c2930ca656c3fa3edaaa9.jpg",
523
+ "text": "$$\n\\begin{array} { r l } & { \\mathcal { L } _ { t _ { 1 } , t _ { 2 } } = \\underset { ( z _ { t _ { 1 } } , z _ { t _ { 2 } } ) \\sim q ( z _ { t _ { 1 } } , z _ { t _ { 2 } } \\mid b _ { t _ { 1 } } , b _ { t _ { 2 } } ) } { \\mathbb { E } } \\bigg [ \\log p ( x _ { t _ { 2 } } \\mid z _ { t _ { 2 } } ) + \\log p _ { B } ( z _ { t _ { 1 } } \\mid b _ { t _ { 1 } } ) + \\log p ( z _ { t _ { 2 } } \\mid z _ { t _ { 1 } } ) } \\\\ & { \\qquad \\quad - \\log p _ { B } ( z _ { t _ { 2 } } \\mid b _ { t _ { 2 } } ) - \\log q ( z _ { t _ { 1 } } \\mid z _ { t _ { 2 } } , b _ { t _ { 1 } } , b _ { t _ { 2 } } ) \\bigg ] } \\end{array}\n$$",
524
+ "text_format": "latex",
525
+ "bbox": [
526
+ 214,
527
+ 585,
528
+ 784,
529
+ 646
530
+ ],
531
+ "page_idx": 4
532
+ },
533
+ {
534
+ "type": "text",
535
+ "text": "To train this model, one should choose the distribution of times $t _ { 1 } , t _ { 2 }$ ; for instance, $t _ { 1 }$ can be chosen uniformly from the sequence, and $t _ { 2 } - t _ { 1 }$ uniformly over some finite range $[ 1 , D ]$ ; other approaches could be investigated. Figure 1 describes in detail the computation flow of the model. ",
536
+ "bbox": [
537
+ 176,
538
+ 648,
539
+ 821,
540
+ 690
541
+ ],
542
+ "page_idx": 4
543
+ },
544
+ {
545
+ "type": "text",
546
+ "text": "Finally, it would be desirable to model the world with different hierarchies of state, the higher-level states predicting the same-level or lower-level states, and ideally representing more invariant or abstract information. For this reason, we also develop stacked (hierarchical) version of TD-VAE, which uses several layers of latent states. Hierarchical TD-VAE is detailed in the appendix. ",
547
+ "bbox": [
548
+ 174,
549
+ 696,
550
+ 825,
551
+ 753
552
+ ],
553
+ "page_idx": 4
554
+ },
555
+ {
556
+ "type": "text",
557
+ "text": "4.2 INTUITION BEHIND TD-VAE ",
558
+ "text_level": 1,
559
+ "bbox": [
560
+ 176,
561
+ 768,
562
+ 415,
563
+ 784
564
+ ],
565
+ "page_idx": 4
566
+ },
567
+ {
568
+ "type": "text",
569
+ "text": "In this section, we provide a more intuitive explanation behind the computation and loss of the model. Assume we want to predict a future time step $t _ { 2 }$ from all the information we have up until time $t _ { 1 }$ . All relevant information up until time $t _ { 1 }$ (respectively $t _ { 2 }$ ) has been compressed into a code $b _ { t _ { 1 } }$ (respectively $b _ { t _ { 2 } }$ ). We make an observation $x _ { t }$ of the world2 at every time step $t$ , but posit the existence of a state $z _ { t }$ which fully captures the full condition of the world at time $t$ . ",
570
+ "bbox": [
571
+ 174,
572
+ 795,
573
+ 825,
574
+ 866
575
+ ],
576
+ "page_idx": 4
577
+ },
578
+ {
579
+ "type": "text",
580
+ "text": "Consider an agent at the current time $t _ { 2 }$ . At that time, the agent can make a guess of what the state of the world is by sampling from its belief model $p _ { B } \\big ( z _ { t _ { 2 } } \\big | b _ { t _ { 2 } } \\big )$ . Because the state $z _ { t _ { 2 } }$ should entail the corresponding observation $x _ { t _ { 2 } }$ , the agent aims to maximize $p ( x _ { t _ { 2 } } \\mid z _ { t _ { 2 } } )$ (first term of the loss), with a variational bottleneck penalty $- \\log p ( z _ { t _ { 2 } } \\mid b _ { t _ { 2 } } )$ (second term of the loss) to prevent too much information from the current observation $x _ { t _ { 2 } }$ from being encoded into $z _ { t _ { 2 } }$ . Then follows the question ‘could the state of the world at time $t _ { 2 }$ have been predicted from the state of the world at time $t _ { 1 } ? { }$ . In order to ascertain this, the agent must estimate the state of the world at time $t _ { 1 }$ . By time $t _ { 2 }$ , the agent has aggregated observations between $t _ { 1 }$ and $t _ { 2 }$ that are informative about the state of the world at time $t _ { 1 }$ , which, together with the current guess of the state of the world $z _ { t _ { 2 } }$ , can be used to form an ex post guess of the state of the world. This is done by computing a smoothing distribution $q ( z _ { t _ { 1 } } | z _ { t _ { 2 } } , b _ { t _ { 1 } } , b _ { t _ { 2 } } )$ and drawing a corresponding sample $z _ { t _ { 1 } }$ . Having guessed states of the world $z _ { t _ { 1 } }$ and $z _ { t _ { 2 } }$ , the agent optimizes its predictive jumpy model of the world state $p ( \\boldsymbol { z } _ { t _ { 2 } } \\mid \\boldsymbol { z } _ { t _ { 1 } } )$ (third term of the loss). Finally, it should attempt to see how predictable the revealed information was, or in other words, to assess whether the smoothing distribution $q ( z _ { t _ { 1 } } \\mid z _ { t _ { 2 } } , b _ { t _ { 2 } } )$ could have been predicted from information only available at time $t _ { 1 }$ (this is indirectly predicting $z _ { t _ { 2 } }$ from the state of knowledge $b _ { t _ { 1 } }$ at time $t _ { 1 }$ - the problem we started with). The agent can do so by minimizing the KL between the smoothing distribution and the belief distribution at time $t _ { 1 }$ : $\\mathbf { K } \\dot { \\mathbf { L } } ( q ( z _ { t _ { 1 } } \\mid z _ { t _ { 2 } } , \\bar { b } _ { t _ { 1 } } , b _ { t _ { 2 } } ) \\mid \\mid p ( z _ { t _ { 1 } } \\mid b _ { t _ { 1 } } ) )$ (fourth term of the loss). Summing all the losses described so far, we obtain the TD-VAE loss. ",
581
+ "bbox": [
582
+ 176,
583
+ 872,
584
+ 823,
585
+ 901
586
+ ],
587
+ "page_idx": 4
588
+ },
589
+ {
590
+ "type": "text",
591
+ "text": "",
592
+ "bbox": [
593
+ 173,
594
+ 103,
595
+ 825,
596
+ 325
597
+ ],
598
+ "page_idx": 5
599
+ },
600
+ {
601
+ "type": "text",
602
+ "text": "4.3 CONNECTION WITH TEMPORAL-DIFFERENCE LEARNING ",
603
+ "text_level": 1,
604
+ "bbox": [
605
+ 174,
606
+ 345,
607
+ 601,
608
+ 358
609
+ ],
610
+ "page_idx": 5
611
+ },
612
+ {
613
+ "type": "text",
614
+ "text": "In reinforcement learning, the state of an agent represents a belief about the sum of discounted rewards $\\begin{array} { r } { R _ { t } = \\sum _ { \\tau } r _ { t + \\tau } \\gamma ^ { \\bar { \\tau } } } \\end{array}$ . In the classic setting, the agent only models the mean of this distribution represented by the value function $V _ { t }$ or action dependent $\\mathrm { Q }$ -function $Q _ { t } ^ { a }$ (Sutton $\\&$ Barto, 1998). Recently in (Bellemare et al., 2017), a full distribution over $R _ { t }$ has been considered. To estimate $V _ { t _ { 1 } }$ or $Q _ { t _ { 1 } } ^ { a }$ at time $t _ { 1 }$ , one does not usually wait to get all the rewards to compute $R _ { t _ { 1 } }$ . Instead, one uses an estimate at some future time $t _ { 2 }$ as a bootstrap to estimate $V _ { t _ { 1 } }$ or $Q _ { t _ { 1 } } ^ { a }$ (temporal difference). ",
615
+ "bbox": [
616
+ 174,
617
+ 371,
618
+ 825,
619
+ 455
620
+ ],
621
+ "page_idx": 5
622
+ },
623
+ {
624
+ "type": "text",
625
+ "text": "In our case, the model expresses a belief $p _ { B } ( z _ { t } \\vert b _ { t } )$ about possible future states instead of the sum of discounted rewards. The model trains the belief $p _ { B } \\big ( z _ { t _ { 1 } } \\big | b _ { t _ { 1 } } \\big )$ at time $t _ { 1 }$ using belief $p _ { B } \\big ( z _ { t _ { 2 } } \\big | b _ { t _ { 2 } } \\big )$ at some time $t _ { 2 }$ in the future. It accomplishes this by (variationally) auto-encoding a sample $z _ { t _ { 2 } }$ of the future state into a sample $z _ { t _ { 1 } }$ , using the approximate posterior distribution $q \\big ( z _ { t _ { 1 } } \\mid z _ { t _ { 2 } } , b _ { t _ { 1 } } , b _ { t _ { 2 } } \\big )$ and the decoding distribution $p ( \\boldsymbol { z } _ { t _ { 2 } } \\mid \\boldsymbol { z } _ { t _ { 1 } } )$ . This auto-encoding mapping translates between states at $t _ { 1 }$ and $t _ { 2 }$ , forcing beliefs at the two time steps to be consistent. Sample $z _ { t _ { 1 } }$ forms the target for training the belief $p _ { B } \\big ( z _ { t _ { 1 } } \\big | b _ { t _ { 1 } } \\big )$ , which appears as a prior distribution over $z _ { t _ { 1 } }$ . ",
626
+ "bbox": [
627
+ 174,
628
+ 462,
629
+ 825,
630
+ 560
631
+ ],
632
+ "page_idx": 5
633
+ },
634
+ {
635
+ "type": "text",
636
+ "text": "5 EXPERIMENTS. ",
637
+ "text_level": 1,
638
+ "bbox": [
639
+ 176,
640
+ 582,
641
+ 331,
642
+ 597
643
+ ],
644
+ "page_idx": 5
645
+ },
646
+ {
647
+ "type": "text",
648
+ "text": "The first experiment using sequential TD-VAE, which enables a direct comparison to related algorithms for training state-space models. Subsequent experiments use the full TD-VAE model. ",
649
+ "bbox": [
650
+ 174,
651
+ 614,
652
+ 825,
653
+ 642
654
+ ],
655
+ "page_idx": 5
656
+ },
657
+ {
658
+ "type": "text",
659
+ "text": "5.1 PARTIALLY OBSERVED MINIPACMAN ",
660
+ "text_level": 1,
661
+ "bbox": [
662
+ 176,
663
+ 661,
664
+ 472,
665
+ 676
666
+ ],
667
+ "page_idx": 5
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "We use a partially observed version of the MiniPacman environment (Racanière et al., 2017), shown in Figure 2. The agent (Pacman) navigates a maze, and tries to eat all the food while avoiding being eaten by a ghost. Pacman sees only a $5 \\times 5$ window around itself. To achieve a high score, the agent needs to form a belief state that captures memory of past experience (e.g. which parts of the maze have been visited) and uncertainty on the environment (e.g. where the ghost might be). ",
672
+ "bbox": [
673
+ 174,
674
+ 688,
675
+ 825,
676
+ 758
677
+ ],
678
+ "page_idx": 5
679
+ },
680
+ {
681
+ "type": "text",
682
+ "text": "We evaluate the performance of sequential (non-jumpy) TD-VAE on the task of modeling a sequence of the agent’s observations. We compare it with two state-space models trained using the standard ELBO of equation 1: ",
683
+ "bbox": [
684
+ 176,
685
+ 765,
686
+ 823,
687
+ 808
688
+ ],
689
+ "page_idx": 5
690
+ },
691
+ {
692
+ "type": "text",
693
+ "text": "• A filtering model with encoder $\\begin{array} { r } { q ( \\mathbf { z } \\mid \\mathbf { x } ) = \\prod _ { t } q ( z _ { t } \\mid z _ { t - 1 } , b _ { t } ) } \\end{array}$ , where $b _ { t } = \\mathrm { R N N } ( b _ { t - 1 } , x _ { t } )$ . \n• A mean-field model with encoder $\\begin{array} { r } { q ( \\mathbf { z } \\mid \\mathbf { x } ) = \\prod _ { t } q ( z _ { t } \\mid b _ { t } ) } \\end{array}$ , where $b _ { t } = \\mathrm { R N N } ( b _ { t - 1 } , x _ { t } )$ . ",
694
+ "bbox": [
695
+ 179,
696
+ 818,
697
+ 789,
698
+ 857
699
+ ],
700
+ "page_idx": 5
701
+ },
702
+ {
703
+ "type": "text",
704
+ "text": "Figure 2 shows the ELBO and estimated negative log probability on a test set of MiniPacman sequences for each model. TD-VAE outperforms both baselines, whereas the mean-field model is the least well-performing. We note that $b _ { t }$ is a belief state for the mean-field model, but not for the filtering model; the encoder of the latter explicitly depends on the previous latent state $z _ { t - 1 }$ , hence $b _ { t }$ is not its sufficient statistics. This comparison shows that naively restricting the encoder in order to obtain a belief state hurts the performance significantly; TD-VAE overcomes this difficulty. ",
705
+ "bbox": [
706
+ 173,
707
+ 867,
708
+ 825,
709
+ 924
710
+ ],
711
+ "page_idx": 5
712
+ },
713
+ {
714
+ "type": "table",
715
+ "img_path": "images/b15ac598a146db2f080167b6d9c76143029d6e68561173872b835885e924b3ce.jpg",
716
+ "table_caption": [],
717
+ "table_footnote": [],
718
+ "table_body": "<table><tr><td></td><td>ELBO</td><td>-log p(x) (est.)</td></tr><tr><td>Filtering model</td><td>0.1169 ±0.0003</td><td>0.0962 ± 0.0007</td></tr><tr><td>Mean-field model</td><td>0.1987±0.0004</td><td>0.1678 ± 0.0010</td></tr><tr><td>TD-VAE</td><td>0.0773±0.0002</td><td>0.0553 ±0.0006</td></tr></table>",
719
+ "bbox": [
720
+ 426,
721
+ 138,
722
+ 820,
723
+ 210
724
+ ],
725
+ "page_idx": 6
726
+ },
727
+ {
728
+ "type": "image",
729
+ "img_path": "images/dbe986c42bf2b18439142319f2b9d58e5cac11d9812c208b9c096d8581db98c1.jpg",
730
+ "image_caption": [
731
+ "Figure 2: MiniPacman. Left: A full frame from the game (size $1 5 \\times 1 9$ ). Pacman (green) is navigating the maze trying to eat all the food (blue) while being chased by a ghost (red). Top right: A sequence of observations, consisting of consecutive $5 \\times 5$ windows around Pacman. Bottom right: ELBO and estimated negative log probability on a test set of MiniPacman sequences. Lower is better. Log probability is estimated using importance sampling with the encoder as proposal. "
732
+ ],
733
+ "image_footnote": [],
734
+ "bbox": [
735
+ 197,
736
+ 103,
737
+ 369,
738
+ 207
739
+ ],
740
+ "page_idx": 6
741
+ },
742
+ {
743
+ "type": "image",
744
+ "img_path": "images/53356f6d65dcaf8ab95d625cdbe7b653326dac0dcb5735d8bfb91cad38294117.jpg",
745
+ "image_caption": [
746
+ "Figure 3: Moving MNIST. Left: Rows are example input sequences. Right: Jumpy rollouts from the model. We see that the model is able to roll forward by skipping frames, keeping the correct digit and the direction of motion. "
747
+ ],
748
+ "image_footnote": [],
749
+ "bbox": [
750
+ 266,
751
+ 308,
752
+ 732,
753
+ 411
754
+ ],
755
+ "page_idx": 6
756
+ },
757
+ {
758
+ "type": "text",
759
+ "text": "",
760
+ "bbox": [
761
+ 171,
762
+ 481,
763
+ 823,
764
+ 508
765
+ ],
766
+ "page_idx": 6
767
+ },
768
+ {
769
+ "type": "text",
770
+ "text": "5.2 MOVING MNIST ",
771
+ "text_level": 1,
772
+ "bbox": [
773
+ 174,
774
+ 526,
775
+ 334,
776
+ 540
777
+ ],
778
+ "page_idx": 6
779
+ },
780
+ {
781
+ "type": "text",
782
+ "text": "In this experiment, we show that the model is able to learn the state and roll forward in jumps. We consider sequences of length 20 of images of MNIST digits. For each sequence, a random digit from the dataset is chosen, as well as the direction of movement (left or right). At each time step, the digit moves by one pixel in the chosen direction, as shown in Figure 3. We train the model with $t _ { 1 }$ and $t _ { 2 }$ separated by a random amount $t _ { 2 } - t _ { 1 }$ from the interval [1, 4]. We would like to see whether the model at a given time can roll out a simulated experience in time steps $t _ { 1 } = t + \\delta _ { 1 }$ , $t _ { 2 } = t _ { 1 } + \\delta _ { 2 } , . . .$ with $\\delta _ { 1 } , \\delta _ { 2 } , \\dots > 1$ , without considering the inputs in between these time points. Note that it is not sufficient to predict the future inputs $\\boldsymbol { x } _ { t _ { 1 } } , \\ldots$ as they do not contain information about whether the digit moves left or right. We need to sample a state that contains this information. ",
783
+ "bbox": [
784
+ 173,
785
+ 553,
786
+ 825,
787
+ 678
788
+ ],
789
+ "page_idx": 6
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "We roll out a sequence from the model as follows: (a) $b _ { t }$ is computed by the aggregation recurrent network from observations up to time $t$ ; (b) a state $z _ { t }$ is sampled from $p _ { B } ( z _ { t } \\vert b _ { t } )$ ; (c) a sequence of states is rolled out by repeatedly sampling $z \\gets z ^ { \\prime } \\sim p ( z ^ { \\prime } | z )$ starting with $z = z _ { t }$ ; (d) each $z$ is decoded by $p ( x \\mid z )$ , producing a sequence of frames. The resulting sequences are shown in Figure 3. We see that indeed the model can roll forward the samples in steps of more than one elementary time step (the sampled digits move by more than one pixel) and that it preserves the direction of motion, demonstrating that it rolls forward a state. ",
794
+ "bbox": [
795
+ 173,
796
+ 684,
797
+ 825,
798
+ 782
799
+ ],
800
+ "page_idx": 6
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "5.3 NOISY HARMONIC OSCILLATOR ",
805
+ "text_level": 1,
806
+ "bbox": [
807
+ 176,
808
+ 800,
809
+ 433,
810
+ 814
811
+ ],
812
+ "page_idx": 6
813
+ },
814
+ {
815
+ "type": "text",
816
+ "text": "We would like to demonstrate that the model can build a state even when little information is present in each observation, and that it can sample states far into the future. For this we consider a 1D sequence obtained from a noisy harmonic oscillator, as shown in Figure 4 (first and fourth rows). The frequencies, initial positions and initial velocities are chosen at random from some range. At every update, noise is added to the position and the velocity of the oscillator, but the energy is approximately preserved. The model observes a noisy version of the current position. Attempting to predict the input, which consists of one value, 100 time steps in the future would be uninformative; such a prediction wouldn’t reveal what the frequency or the magnitude of the signal is, and because the oscillator updates are noisy, the phase information would be nearly lost. Instead, we should try to predict as much as possible about the state, which consists of frequency, magnitude and position, and it is only the position that cannot be accurately predicted. ",
817
+ "bbox": [
818
+ 174,
819
+ 825,
820
+ 825,
821
+ 924
822
+ ],
823
+ "page_idx": 6
824
+ },
825
+ {
826
+ "type": "image",
827
+ "img_path": "images/a07734250325cb91c31f78aadcbbb6e42fa93ed686f71138d404c8ce91bcced7.jpg",
828
+ "image_caption": [
829
+ "Figure 4: Skip-state prediction for 1D signal. The input is generated by a noisy harmonic oscillator. Rollouts consist of (a) a jumpy state transition with either $d t = 2 0$ or $d t = 1 0 0$ , followed by 20 state transitions with $d t = 1$ . The model is able to create a state and predict it into the future, correctly predicting frequency and magnitude of the signal. "
830
+ ],
831
+ "image_footnote": [],
832
+ "bbox": [
833
+ 189,
834
+ 95,
835
+ 808,
836
+ 232
837
+ ],
838
+ "page_idx": 7
839
+ },
840
+ {
841
+ "type": "text",
842
+ "text": "",
843
+ "bbox": [
844
+ 174,
845
+ 330,
846
+ 825,
847
+ 387
848
+ ],
849
+ "page_idx": 7
850
+ },
851
+ {
852
+ "type": "text",
853
+ "text": "The aggregation RNN is an LSTM; we use a hierarchical TD-VAE with two layers, where the latent variables in the higher layer are sampled first, and their results are passed to the lower layer. The belief, smoothing and state-transition distributions are feed-forward networks, and the decoder simply extracts the first component from the $z$ of the first layer. We also feed the time interval $t _ { 2 } - t _ { 1 }$ into the smoothing and state-transition distributions. We train on sequences of length 200, with $t _ { 2 } - t _ { 1 }$ taking values chosen at random from [1, 10] with probability 0.8 and from [1, 120] with probability 0.2. ",
854
+ "bbox": [
855
+ 173,
856
+ 393,
857
+ 825,
858
+ 478
859
+ ],
860
+ "page_idx": 7
861
+ },
862
+ {
863
+ "type": "text",
864
+ "text": "We analyze what the model has learned as follows. We pick time $t _ { 1 } ~ = ~ 6 0$ and sample $z _ { t _ { 1 } } \\sim$ $p _ { B } \\big ( z _ { t _ { 1 } } \\big | \\big ) \\big | b _ { t _ { 1 } } \\big )$ . Then, we choose a time interval $\\delta _ { t } \\in \\{ 2 0 , \\bar { 1 } 0 0 \\}$ to skip, sample from the forward model $p ( z _ { 2 } \\mid z _ { 1 } , \\delta _ { t } )$ to obtain $z _ { t _ { 2 } }$ at $t _ { 2 } = t _ { 1 } + \\delta _ { t }$ . To see the content of this state, we roll forward 20 times with time step $\\delta = 1$ and plot the result, shown in Figure 4. We see that indeed the state $z _ { t _ { 2 } }$ is predicted correctly, containing the correct frequency and magnitude of the signal. We also see that the position (phase) is predicted well for $d t = 2 0$ and less accurately for $d t = 1 0 0$ (at which point the noisiness of the system makes it unpredictable). ",
865
+ "bbox": [
866
+ 173,
867
+ 484,
868
+ 825,
869
+ 582
870
+ ],
871
+ "page_idx": 7
872
+ },
873
+ {
874
+ "type": "text",
875
+ "text": "Finally, we show that TD-VAE training can improve the quality of the belief state. For this experiment, the harmonic oscillator has a different frequency in each interval $[ 0 , 1 0 )$ , [10, 20), [20, 120), [120, 140). The first three frequencies $f _ { 1 } , f _ { 2 } , f _ { 3 }$ are chosen at random. The final frequency $f _ { 4 }$ is chosen to be one fixed value $f _ { a }$ if $f _ { 1 } > f _ { 2 }$ and another fixed value $f _ { b }$ otherwise $f _ { a }$ and $f _ { b }$ are constants). In order to correctly model the signal in the final time interval, the model needs to learn the relation between $f _ { 1 }$ and $f _ { 2 }$ , store it over length of 100 steps, and apply it over a number of time steps (due to the noise) in the final interval. To test whether the belief state contains the information about this relationship, we train a binary classifier from the belief state to the final frequency $f _ { 4 }$ at points just before the final interval. We compare two models with the same recurrent architecture (an LSTM), but trained with different objective: next-step prediction vs TD-VAE loss. The figure on the right shows the classification accuracy for the two methods, averaged over 20 runs. We found that the longer the separating time interval (containing frequency $f _ { 3 }$ ) and the smaller the size of the LSTM, the better TD-VAE is compared to next-step predictor. ",
876
+ "bbox": [
877
+ 174,
878
+ 588,
879
+ 531,
880
+ 741
881
+ ],
882
+ "page_idx": 7
883
+ },
884
+ {
885
+ "type": "image",
886
+ "img_path": "images/1325d166c2f3f2e0dd2a2c55bc719503180df27d258785063eb9828ca8900b91.jpg",
887
+ "image_caption": [],
888
+ "image_footnote": [],
889
+ "bbox": [
890
+ 547,
891
+ 589,
892
+ 821,
893
+ 734
894
+ ],
895
+ "page_idx": 7
896
+ },
897
+ {
898
+ "type": "text",
899
+ "text": "",
900
+ "bbox": [
901
+ 174,
902
+ 741,
903
+ 826,
904
+ 839
905
+ ],
906
+ "page_idx": 7
907
+ },
908
+ {
909
+ "type": "text",
910
+ "text": "5.4 DEEPMIND LAB ENVIRONMENT ",
911
+ "text_level": 1,
912
+ "bbox": [
913
+ 176,
914
+ 856,
915
+ 436,
916
+ 869
917
+ ],
918
+ "page_idx": 7
919
+ },
920
+ {
921
+ "type": "text",
922
+ "text": "In the final experiment, we analyze the model on a more visually complex domain. We use sequences of frames seen by an agent solving tasks in the DeepMind Lab environment (Beattie et al., 2016). We aim to demonstrate that the model holds explicit beliefs about various possible futures, and that it can roll out in jumps. We suggest functional forms inspired by convolutional DRAW: we use convolutional LSTMs for all the circles in Figure 8 and make the model 16 layers deep (except for the forward updating LSTMs which are fully connected with depth 4). ",
923
+ "bbox": [
924
+ 176,
925
+ 882,
926
+ 825,
927
+ 924
928
+ ],
929
+ "page_idx": 7
930
+ },
931
+ {
932
+ "type": "image",
933
+ "img_path": "images/c2368df29b05a7c8e75802a6c6eb94a47da537f30e710de4babea5b8d927c575.jpg",
934
+ "image_caption": [
935
+ "Figure 5: Beliefs of the model. Left: Independent samples $z _ { 1 } , z _ { 2 } , z _ { 3 }$ from current belief; all 3 decode to roughly the same frame. Right: Multiple predicted futures for each sample. The frames are similar for each $z _ { i }$ , but different across $z _ { i }$ ’s. "
936
+ ],
937
+ "image_footnote": [],
938
+ "bbox": [
939
+ 272,
940
+ 94,
941
+ 725,
942
+ 207
943
+ ],
944
+ "page_idx": 8
945
+ },
946
+ {
947
+ "type": "image",
948
+ "img_path": "images/6b454271ed3815d08a88c90920955f635132ef68517a96471bc60ca8c4378d82.jpg",
949
+ "image_caption": [
950
+ "Figure 6: Rollout from the model. The model was trained on steps uniformly distributed in [1, 5]. The model is able to create forward motion that skips several time steps. "
951
+ ],
952
+ "image_footnote": [],
953
+ "bbox": [
954
+ 323,
955
+ 294,
956
+ 673,
957
+ 415
958
+ ],
959
+ "page_idx": 8
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "",
964
+ "bbox": [
965
+ 174,
966
+ 472,
967
+ 825,
968
+ 513
969
+ ],
970
+ "page_idx": 8
971
+ },
972
+ {
973
+ "type": "text",
974
+ "text": "We use time skips $t _ { 2 } - t _ { 1 }$ sampled uniformly from [1, 40] and analyze the content of the belief state $b$ . We take three samples $z _ { 1 } , z _ { 2 } , z _ { 3 }$ from $p _ { B } ( z \\vert b )$ , which should represent three instances of possible futures. Figure 5 (left) shows that they decode to roughly the same frame. To see what they represent about the future, we draw 5 samples $\\bar { z _ { i } ^ { k } } \\sim p ( \\hat { z } | z )$ , $k = 1 , \\ldots , 5$ and decode them, as shown in Figure 5 (right). We see that for a given $i$ , the predicted samples decode to similar frames (images in the same row). However $z$ ’s for different $i$ ’s decode to different frames. This means $b$ represented a belief about several different possible futures, while different $z _ { i }$ each represent a single possible future. ",
975
+ "bbox": [
976
+ 173,
977
+ 521,
978
+ 825,
979
+ 619
980
+ ],
981
+ "page_idx": 8
982
+ },
983
+ {
984
+ "type": "text",
985
+ "text": "Finally, we show what rollouts look like. We train on time separations $t _ { 2 } - t _ { 1 }$ chosen uniformly from [1, 5] on a task where the agent tends to move forward and rotate. Figure 6 shows 4 rollouts from the model. We see that the motion appears to go forward and into corridors and that it skips several time steps (real single step motion is slower). ",
986
+ "bbox": [
987
+ 174,
988
+ 626,
989
+ 825,
990
+ 681
991
+ ],
992
+ "page_idx": 8
993
+ },
994
+ {
995
+ "type": "text",
996
+ "text": "6 CONCLUSIONS ",
997
+ "text_level": 1,
998
+ "bbox": [
999
+ 176,
1000
+ 702,
1001
+ 328,
1002
+ 718
1003
+ ],
1004
+ "page_idx": 8
1005
+ },
1006
+ {
1007
+ "type": "text",
1008
+ "text": "In this paper, we argued that an agent needs a model that is different from an accurate step-by-step environment simulator. We discussed the requirements for such a model, and presented TD-VAE, a sequence model that satisfies all requirements. TD-VAE builds states from observations by bridging time points separated by random intervals. This allows the states to relate to each other directly over longer time stretches and explicitly encode the future. Further, it allows rolling out in state-space and in time steps larger than, and potentially independent of, the underlying temporal environment/data step size. In the future, we aim to apply TD-VAE to more complex settings, and investigate a number of possible uses in reinforcement learning such are representation learning and planning. ",
1009
+ "bbox": [
1010
+ 174,
1011
+ 733,
1012
+ 825,
1013
+ 845
1014
+ ],
1015
+ "page_idx": 8
1016
+ },
1017
+ {
1018
+ "type": "text",
1019
+ "text": "REFERENCES ",
1020
+ "text_level": 1,
1021
+ "bbox": [
1022
+ 174,
1023
+ 103,
1024
+ 287,
1025
+ 117
1026
+ ],
1027
+ "page_idx": 9
1028
+ },
1029
+ {
1030
+ "type": "text",
1031
+ "text": "Brandon Amos, Laurent Dinh, Serkan Cabi, Thomas Rothörl, Sergio Gómez Colmenarejo, Alistair Muldal, Tom Erez, Yuval Tassa, Nando de Freitas, and Misha Denil. Learning awareness models. arXiv preprint arXiv:1804.06318, 2018. ",
1032
+ "bbox": [
1033
+ 174,
1034
+ 126,
1035
+ 823,
1036
+ 169
1037
+ ],
1038
+ "page_idx": 9
1039
+ },
1040
+ {
1041
+ "type": "text",
1042
+ "text": "Evan Archer, Il Memming Park, Lars Buesing, John Cunningham, and Liam Paninski. Black box variational inference for state space models. arXiv preprint arXiv:1511.07367, 2015. ",
1043
+ "bbox": [
1044
+ 169,
1045
+ 178,
1046
+ 823,
1047
+ 208
1048
+ ],
1049
+ "page_idx": 9
1050
+ },
1051
+ {
1052
+ "type": "text",
1053
+ "text": "Karl J Astrom. Optimal control of Markov decision processes with incomplete state estimation. Journal of mathematical analysis and applications, 10:174–205, 1965. ",
1054
+ "bbox": [
1055
+ 171,
1056
+ 217,
1057
+ 825,
1058
+ 246
1059
+ ],
1060
+ "page_idx": 9
1061
+ },
1062
+ {
1063
+ "type": "text",
1064
+ "text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. ",
1065
+ "bbox": [
1066
+ 171,
1067
+ 256,
1068
+ 825,
1069
+ 285
1070
+ ],
1071
+ "page_idx": 9
1072
+ },
1073
+ {
1074
+ "type": "text",
1075
+ "text": "Justin Bayer and Christian Osendorfer. Learning stochastic recurrent networks. arXiv preprint arXiv:1411.7610, 2014. ",
1076
+ "bbox": [
1077
+ 173,
1078
+ 294,
1079
+ 823,
1080
+ 324
1081
+ ],
1082
+ "page_idx": 9
1083
+ },
1084
+ {
1085
+ "type": "text",
1086
+ "text": "Charles Beattie, Joel Z Leibo, Denis Teplyashin, Tom Ward, Marcus Wainwright, Heinrich Küttler, Andrew Lefrancq, Simon Green, Víctor Valdés, Amir Sadik, et al. DeepMind Lab. arXiv preprint arXiv:1612.03801, 2016. ",
1087
+ "bbox": [
1088
+ 171,
1089
+ 333,
1090
+ 826,
1091
+ 376
1092
+ ],
1093
+ "page_idx": 9
1094
+ },
1095
+ {
1096
+ "type": "text",
1097
+ "text": "Marc G Bellemare, Will Dabney, and Rémi Munos. A distributional perspective on reinforcement learning. arXiv preprint arXiv:1707.06887, 2017. ",
1098
+ "bbox": [
1099
+ 173,
1100
+ 386,
1101
+ 825,
1102
+ 415
1103
+ ],
1104
+ "page_idx": 9
1105
+ },
1106
+ {
1107
+ "type": "text",
1108
+ "text": "Samy Bengio, Oriol Vinyals, Navdeep Jaitly, and Noam Shazeer. Scheduled sampling for sequence prediction with recurrent neural networks. In Advances in Neural Information Processing Systems, pp. 1171–1179, 2015. ",
1109
+ "bbox": [
1110
+ 173,
1111
+ 424,
1112
+ 825,
1113
+ 468
1114
+ ],
1115
+ "page_idx": 9
1116
+ },
1117
+ {
1118
+ "type": "text",
1119
+ "text": "Lars Buesing, Theophane Weber, Sebastien Racaniere, SM Eslami, Danilo Rezende, David P Reichert, Fabio Viola, Frederic Besse, Karol Gregor, Demis Hassabis, et al. Learning and querying fast generative models for reinforcement learning. arXiv preprint arXiv:1802.03006, 2018. ",
1120
+ "bbox": [
1121
+ 176,
1122
+ 477,
1123
+ 825,
1124
+ 521
1125
+ ],
1126
+ "page_idx": 9
1127
+ },
1128
+ {
1129
+ "type": "text",
1130
+ "text": "Silvia Chiappa, Sébastien Racaniere, Daan Wierstra, and Shakir Mohamed. Recurrent environment simulators. arXiv preprint arXiv:1704.02254, 2017. ",
1131
+ "bbox": [
1132
+ 171,
1133
+ 530,
1134
+ 825,
1135
+ 559
1136
+ ],
1137
+ "page_idx": 9
1138
+ },
1139
+ {
1140
+ "type": "text",
1141
+ "text": "Junyoung Chung, Kyle Kastner, Laurent Dinh, Kratarth Goel, Aaron C Courville, and Yoshua Bengio. A recurrent latent variable model for sequential data. In Advances in neural information processing systems, pp. 2980–2988, 2015. ",
1142
+ "bbox": [
1143
+ 173,
1144
+ 568,
1145
+ 825,
1146
+ 611
1147
+ ],
1148
+ "page_idx": 9
1149
+ },
1150
+ {
1151
+ "type": "text",
1152
+ "text": "Junyoung Chung, Sungjin Ahn, and Yoshua Bengio. Hierarchical multiscale recurrent neural networks. arXiv preprint arXiv:1609.01704, 2016. ",
1153
+ "bbox": [
1154
+ 171,
1155
+ 621,
1156
+ 823,
1157
+ 650
1158
+ ],
1159
+ "page_idx": 9
1160
+ },
1161
+ {
1162
+ "type": "text",
1163
+ "text": "Marco Fraccaro, Søren Kaae Sønderby, Ulrich Paquet, and Ole Winther. Sequential neural models with stochastic layers. In Advances in neural information processing systems, pp. 2199–2207, 2016. ",
1164
+ "bbox": [
1165
+ 171,
1166
+ 660,
1167
+ 828,
1168
+ 703
1169
+ ],
1170
+ "page_idx": 9
1171
+ },
1172
+ {
1173
+ "type": "text",
1174
+ "text": "Mevlana Gemici, Chia-Chun Hung, Adam Santoro, Greg Wayne, Shakir Mohamed, Danilo J Rezende, David Amos, and Timothy Lillicrap. Generative temporal models with memory. arXiv preprint arXiv:1702.04649, 2017. ",
1175
+ "bbox": [
1176
+ 173,
1177
+ 712,
1178
+ 826,
1179
+ 755
1180
+ ],
1181
+ "page_idx": 9
1182
+ },
1183
+ {
1184
+ "type": "text",
1185
+ "text": "Anirudh Goyal, Alessandro Sordoni, Marc-Alexandre Côté, Nan Ke, and Yoshua Bengio. Z-forcing: Training stochastic recurrent networks. In Advances in Neural Information Processing Systems, pp. 6713–6723, 2017. ",
1186
+ "bbox": [
1187
+ 171,
1188
+ 765,
1189
+ 826,
1190
+ 808
1191
+ ],
1192
+ "page_idx": 9
1193
+ },
1194
+ {
1195
+ "type": "text",
1196
+ "text": "Alex Graves. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013. ",
1197
+ "bbox": [
1198
+ 169,
1199
+ 818,
1200
+ 825,
1201
+ 847
1202
+ ],
1203
+ "page_idx": 9
1204
+ },
1205
+ {
1206
+ "type": "text",
1207
+ "text": "Karol Gregor, Frederic Besse, Danilo Jimenez Rezende, Ivo Danihelka, and Daan Wierstra. Towards conceptual compression. In Advances In Neural Information Processing Systems, pp. 3549–3557, 2016. ",
1208
+ "bbox": [
1209
+ 176,
1210
+ 856,
1211
+ 826,
1212
+ 898
1213
+ ],
1214
+ "page_idx": 9
1215
+ },
1216
+ {
1217
+ "type": "text",
1218
+ "text": "David Ha and Jürgen Schmidhuber. World models. arXiv preprint arXiv:1803.10122, 2018. ",
1219
+ "bbox": [
1220
+ 169,
1221
+ 909,
1222
+ 776,
1223
+ 924
1224
+ ],
1225
+ "page_idx": 9
1226
+ },
1227
+ {
1228
+ "type": "text",
1229
+ "text": "Milos Hauskrecht. Value-function approximations for partially observable Markov decision processes. Journal of artificial intelligence research, 13:33–94, 2000. ",
1230
+ "bbox": [
1231
+ 169,
1232
+ 103,
1233
+ 825,
1234
+ 132
1235
+ ],
1236
+ "page_idx": 10
1237
+ },
1238
+ {
1239
+ "type": "text",
1240
+ "text": "Maximilian Igl, Luisa Zintgraf, Tuan Anh Le, Frank Wood, and Shimon Whiteson. Deep variational reinforcement learning for POMDPs. arXiv preprint arXiv:1806.02426, 2018. ",
1241
+ "bbox": [
1242
+ 173,
1243
+ 140,
1244
+ 823,
1245
+ 170
1246
+ ],
1247
+ "page_idx": 10
1248
+ },
1249
+ {
1250
+ "type": "text",
1251
+ "text": "Dinesh Jayaraman, Frederik Ebert, Alexei A Efros, and Sergey Levine. Time-agnostic prediction: Predicting predictable video frames. arXiv preprint arXiv:1808.07784, 2018. ",
1252
+ "bbox": [
1253
+ 173,
1254
+ 176,
1255
+ 823,
1256
+ 207
1257
+ ],
1258
+ "page_idx": 10
1259
+ },
1260
+ {
1261
+ "type": "text",
1262
+ "text": "Leslie Pack Kaelbling, Michael L Littman, and Anthony R Cassandra. Planning and acting in partially observable stochastic domains. Artificial intelligence, 101(1-2):99–134, 1998. ",
1263
+ "bbox": [
1264
+ 173,
1265
+ 214,
1266
+ 823,
1267
+ 244
1268
+ ],
1269
+ "page_idx": 10
1270
+ },
1271
+ {
1272
+ "type": "text",
1273
+ "text": "Nal Kalchbrenner, Aaron van den Oord, Karen Simonyan, Ivo Danihelka, Oriol Vinyals, Alex Graves, and Koray Kavukcuoglu. Video pixel networks. arXiv preprint arXiv:1610.00527, 2016. ",
1274
+ "bbox": [
1275
+ 171,
1276
+ 251,
1277
+ 825,
1278
+ 281
1279
+ ],
1280
+ "page_idx": 10
1281
+ },
1282
+ {
1283
+ "type": "text",
1284
+ "text": "Diederik P Kingma, Tim Salimans, Rafal Jozefowicz, Xi Chen, Ilya Sutskever, and Max Welling. Improved variational inference with inverse autoregressive flow. In Advances in Neural Information Processing Systems, pp. 4743–4751, 2016. ",
1285
+ "bbox": [
1286
+ 176,
1287
+ 289,
1288
+ 825,
1289
+ 332
1290
+ ],
1291
+ "page_idx": 10
1292
+ },
1293
+ {
1294
+ "type": "text",
1295
+ "text": "Jan Koutnik, Klaus Greff, Faustino Gomez, and Juergen Schmidhuber. A clockwork RNN. arXiv preprint arXiv:1402.3511, 2014. ",
1296
+ "bbox": [
1297
+ 171,
1298
+ 339,
1299
+ 825,
1300
+ 368
1301
+ ],
1302
+ "page_idx": 10
1303
+ },
1304
+ {
1305
+ "type": "text",
1306
+ "text": "Rahul G Krishnan, Uri Shalit, and David Sontag. Deep Kalman filters. arXiv preprint arXiv:1511.05121, 2015. ",
1307
+ "bbox": [
1308
+ 171,
1309
+ 376,
1310
+ 825,
1311
+ 406
1312
+ ],
1313
+ "page_idx": 10
1314
+ },
1315
+ {
1316
+ "type": "text",
1317
+ "text": "Alex Lamb, Anirudh Goyal, Ying Zhang, Saizheng Zhang, Aaron C Courville, and Yoshua Bengio. Professor forcing: A new algorithm for training recurrent networks. In Advances In Neural Information Processing Systems, pp. 4601–4609, 2016. ",
1318
+ "bbox": [
1319
+ 174,
1320
+ 414,
1321
+ 825,
1322
+ 457
1323
+ ],
1324
+ "page_idx": 10
1325
+ },
1326
+ {
1327
+ "type": "text",
1328
+ "text": "Alex X Lee, Richard Zhang, Frederik Ebert, Pieter Abbeel, Chelsea Finn, and Sergey Levine. Stochastic adversarial video prediction. arXiv preprint arXiv:1804.01523, 2018. ",
1329
+ "bbox": [
1330
+ 169,
1331
+ 464,
1332
+ 823,
1333
+ 494
1334
+ ],
1335
+ "page_idx": 10
1336
+ },
1337
+ {
1338
+ "type": "text",
1339
+ "text": "Michael L Littman and Richard S Sutton. Predictive representations of state. In Advances in neural information processing systems, pp. 1555–1561, 2002. ",
1340
+ "bbox": [
1341
+ 173,
1342
+ 501,
1343
+ 823,
1344
+ 531
1345
+ ],
1346
+ "page_idx": 10
1347
+ },
1348
+ {
1349
+ "type": "text",
1350
+ "text": "Hao Liu, Lirong He, Haoli Bai, and Zenglin Xu. Efficient structured inference for stochastic recurrent neural networks. 2017. ",
1351
+ "bbox": [
1352
+ 171,
1353
+ 537,
1354
+ 823,
1355
+ 568
1356
+ ],
1357
+ "page_idx": 10
1358
+ },
1359
+ {
1360
+ "type": "text",
1361
+ "text": "Alexander Neitz, Giambattista Parascandolo, Stefan Bauer, and Bernhard Schölkopf. Adaptive skip intervals: Temporal abstraction for recurrent dynamical models. arXiv preprint arXiv:1808.04768, 2018. ",
1362
+ "bbox": [
1363
+ 173,
1364
+ 575,
1365
+ 823,
1366
+ 617
1367
+ ],
1368
+ "page_idx": 10
1369
+ },
1370
+ {
1371
+ "type": "text",
1372
+ "text": "Junhyuk Oh, Xiaoxiao Guo, Honglak Lee, Richard L Lewis, and Satinder Singh. Action-conditional video prediction using deep networks in atari games. In Advances in Neural Information Processing Systems, pp. 2863–2871, 2015. ",
1373
+ "bbox": [
1374
+ 173,
1375
+ 626,
1376
+ 823,
1377
+ 670
1378
+ ],
1379
+ "page_idx": 10
1380
+ },
1381
+ {
1382
+ "type": "text",
1383
+ "text": "Sébastien Racanière, Théophane Weber, David Reichert, Lars Buesing, Arthur Guez, Danilo Jimenez Rezende, Adrià Puigdomènech Badia, Oriol Vinyals, Nicolas Heess, Yujia Li, et al. Imaginationaugmented agents for deep reinforcement learning. In Advances in Neural Information Processing Systems, pp. 5694–5705, 2017. ",
1384
+ "bbox": [
1385
+ 173,
1386
+ 678,
1387
+ 826,
1388
+ 734
1389
+ ],
1390
+ "page_idx": 10
1391
+ },
1392
+ {
1393
+ "type": "text",
1394
+ "text": "Antti Rasmus, Mathias Berglund, Mikko Honkala, Harri Valpola, and Tapani Raiko. Semi-supervised learning with ladder networks. In Advances in Neural Information Processing Systems, pp. 3546– 3554, 2015. ",
1395
+ "bbox": [
1396
+ 171,
1397
+ 742,
1398
+ 825,
1399
+ 785
1400
+ ],
1401
+ "page_idx": 10
1402
+ },
1403
+ {
1404
+ "type": "text",
1405
+ "text": "Iulian Vlad Serban, Alessandro Sordoni, Ryan Lowe, Laurent Charlin, Joelle Pineau, Aaron C Courville, and Yoshua Bengio. A hierarchical latent variable encoder-decoder model for generating dialogues. In AAAI, pp. 3295–3301, 2017. ",
1406
+ "bbox": [
1407
+ 173,
1408
+ 792,
1409
+ 823,
1410
+ 837
1411
+ ],
1412
+ "page_idx": 10
1413
+ },
1414
+ {
1415
+ "type": "text",
1416
+ "text": "Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction, volume 1. MIT press Cambridge, 1998. ",
1417
+ "bbox": [
1418
+ 171,
1419
+ 843,
1420
+ 821,
1421
+ 873
1422
+ ],
1423
+ "page_idx": 10
1424
+ },
1425
+ {
1426
+ "type": "text",
1427
+ "text": "Benigno Uria, Marc-Alexandre Côté, Karol Gregor, Iain Murray, and Hugo Larochelle. Neural autoregressive distribution estimation. The Journal of Machine Learning Research, 17(1):7184– 7220, 2016. ",
1428
+ "bbox": [
1429
+ 174,
1430
+ 882,
1431
+ 826,
1432
+ 924
1433
+ ],
1434
+ "page_idx": 10
1435
+ },
1436
+ {
1437
+ "type": "text",
1438
+ "text": "Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. WaveNet: A generative model for raw audio. arXiv preprint arXiv:1609.03499, 2016a. ",
1439
+ "bbox": [
1440
+ 176,
1441
+ 103,
1442
+ 823,
1443
+ 146
1444
+ ],
1445
+ "page_idx": 11
1446
+ },
1447
+ {
1448
+ "type": "text",
1449
+ "text": "Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016b. ",
1450
+ "bbox": [
1451
+ 173,
1452
+ 155,
1453
+ 825,
1454
+ 183
1455
+ ],
1456
+ "page_idx": 11
1457
+ },
1458
+ {
1459
+ "type": "text",
1460
+ "text": "Aaron van den Oord, Yazhe Li, Igor Babuschkin, Karen Simonyan, Oriol Vinyals, Koray Kavukcuoglu, George van den Driessche, Edward Lockhart, Luis C Cobo, Florian Stimberg, et al. Parallel waveNet: Fast high-fidelity speech synthesis. arXiv preprint arXiv:1711.10433, 2017. ",
1461
+ "bbox": [
1462
+ 174,
1463
+ 193,
1464
+ 825,
1465
+ 236
1466
+ ],
1467
+ "page_idx": 11
1468
+ },
1469
+ {
1470
+ "type": "text",
1471
+ "text": "Arun Venkatraman, Nicholas Rhinehart, Wen Sun, Lerrel Pinto, Martial Hebert, Byron Boots, Kris Kitani, and J Bagnell. Predictive-state decoders: Encoding the future into recurrent networks. In Advances in Neural Information Processing Systems, pp. 1172–1183, 2017. ",
1472
+ "bbox": [
1473
+ 174,
1474
+ 244,
1475
+ 823,
1476
+ 287
1477
+ ],
1478
+ "page_idx": 11
1479
+ },
1480
+ {
1481
+ "type": "text",
1482
+ "text": "Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In International conference on machine learning, pp. 2048–2057, 2015. ",
1483
+ "bbox": [
1484
+ 174,
1485
+ 295,
1486
+ 826,
1487
+ 338
1488
+ ],
1489
+ "page_idx": 11
1490
+ },
1491
+ {
1492
+ "type": "text",
1493
+ "text": "A TD-VAE AS A MODEL OF JUMPY OBSERVATIONS ",
1494
+ "text_level": 1,
1495
+ "bbox": [
1496
+ 174,
1497
+ 102,
1498
+ 614,
1499
+ 118
1500
+ ],
1501
+ "page_idx": 12
1502
+ },
1503
+ {
1504
+ "type": "text",
1505
+ "text": "In section 3, we derive an approximate ELBO which forms the basis of the training loss of the one-step TD-VAE. One may wonder whether a similar idea may underpin the training loss of the jumpy TD-VAE. Here we show how to modify the derivation to provide an approximate ELBO for a slightly different training regime. ",
1506
+ "bbox": [
1507
+ 174,
1508
+ 132,
1509
+ 825,
1510
+ 189
1511
+ ],
1512
+ "page_idx": 12
1513
+ },
1514
+ {
1515
+ "type": "text",
1516
+ "text": "Assume a sequence $( x _ { 1 } , \\dots , x _ { T } )$ , and an arbitrary distribution $S$ over subsequences $\\begin{array} { r l } { \\mathbf { x } _ { s } } & { { } = } \\end{array}$ $( x _ { t _ { 1 } } , \\ldots , x _ { t _ { n } } )$ of $\\mathbf { x }$ . For each time index $t _ { i }$ , we suppose a state $z _ { t _ { i } }$ , and model the subsequence $\\mathbf { x } _ { s }$ with a jumpy state-space model $\\begin{array} { r } { p ( \\mathbf { x } _ { s } ) = \\prod _ { i } p ( \\bar { z } _ { t _ { i } } \\vert z _ { t _ { i - 1 } } ) p ( x _ { t _ { i } } \\vert \\bar { z _ { t _ { i } } } ) } \\end{array}$ ; denote $\\mathbf { z } _ { s } = ( z _ { t _ { 1 } } , \\dots , z _ { t _ { n } } )$ the state subsequence. We use the exact same machinery as the next-step ELBO, except that we enrich the posterior distribution over $\\mathbf { z } _ { s }$ by making it depend not only on observation subsequence $\\mathbf { x } _ { s }$ , but on the entire sequence $\\mathbf { x }$ . This is possible because posterior distributions can have arbitrary contexts; the observations which are part of $\\mathbf { x }$ but not $\\mathbf { x } _ { s }$ effectively serve as auxiliary variable for a stronger posterior. We use the full sequence $\\mathbf { x }$ to form a sequence of belief states $b _ { t }$ at all time steps. We use in particular the ones computed at the subsampled times $t _ { i }$ . By following the same derivation as the one-step TD-VAE, we obtain: ",
1517
+ "bbox": [
1518
+ 173,
1519
+ 195,
1520
+ 825,
1521
+ 335
1522
+ ],
1523
+ "page_idx": 12
1524
+ },
1525
+ {
1526
+ "type": "equation",
1527
+ "img_path": "images/42efa507ed392c6050dca5450d08ddb3870838e44bcd0dbe1b5f0baa832a6d91.jpg",
1528
+ "text": "$$\n\\begin{array} { r } { \\mathbb { E } _ { S } \\left[ \\log p ( x _ { t _ { 1 } } , \\dots , x _ { t _ { n } } ) \\right] \\ge \\mathbb { E } _ { S } \\Bigg [ \\sum _ { i } \\underset { ( z _ { t _ { i - 1 } } , z _ { t _ { i } } ) \\sim q } { \\mathbb { E } } \\Big [ \\log p ( x _ { t _ { i } } \\mid z _ { t _ { i } } ) + \\log p ( z _ { t _ { i - 1 } } \\mid x _ { < t } ) } \\\\ { + \\log p ( z _ { t _ { i } } \\mid z _ { t _ { i - 1 } } ) - \\log q ( z _ { t _ { i } } \\mid x _ { \\le t } ) } \\\\ { - \\log q ( z _ { t _ { i - 1 } } \\mid z _ { t _ { i } } , x _ { \\le t } ) \\Big ] \\Bigg ] } \\end{array}\n$$",
1529
+ "text_format": "latex",
1530
+ "bbox": [
1531
+ 220,
1532
+ 359,
1533
+ 779,
1534
+ 465
1535
+ ],
1536
+ "page_idx": 12
1537
+ },
1538
+ {
1539
+ "type": "text",
1540
+ "text": "which, using the same belief approximations as the next step TD-VAE, becomes: ",
1541
+ "bbox": [
1542
+ 173,
1543
+ 469,
1544
+ 702,
1545
+ 486
1546
+ ],
1547
+ "page_idx": 12
1548
+ },
1549
+ {
1550
+ "type": "equation",
1551
+ "img_path": "images/3d5e947016201846ce7ca51d4594dafb05802bb25ebe89eda40ec60106eb9d9b.jpg",
1552
+ "text": "$$\n\\begin{array} { r l } { - \\mathcal { L } = \\mathbb { E } _ { S } \\Bigg [ \\sum _ { i } \\underset { z _ { t _ { i - 1 } } \\sim q ( z _ { t _ { i - 1 } } | z _ { t _ { i } } , b _ { t _ { i } } , b _ { t _ { i - 1 } } ) } { \\mathbb { E } } \\Big [ \\log p ( x _ { t _ { i } } | z _ { t _ { i } } ) + \\log p _ { B } ( z _ { t _ { i - 1 } } | b _ { t _ { i - 1 } } ) + \\log p ( z _ { t _ { i } } | z _ { t _ { i - 1 } } ) } \\\\ { - \\log p _ { B } ( z _ { t _ { i } } | b _ { t _ { i } } ) - \\log p ( z _ { t _ { i - 1 } } | z _ { t _ { i } } , b _ { t _ { i - 1 } } , b _ { t _ { i } } ) \\Big ] \\Bigg ] ~ } & { } \\end{array}\n$$",
1553
+ "text_format": "latex",
1554
+ "bbox": [
1555
+ 181,
1556
+ 492,
1557
+ 828,
1558
+ 587
1559
+ ],
1560
+ "page_idx": 12
1561
+ },
1562
+ {
1563
+ "type": "text",
1564
+ "text": "which is the same loss as the TD-VAE for a particular choice of the sampling scheme $S$ (only sampling pairs). ",
1565
+ "bbox": [
1566
+ 171,
1567
+ 590,
1568
+ 823,
1569
+ 621
1570
+ ],
1571
+ "page_idx": 12
1572
+ },
1573
+ {
1574
+ "type": "text",
1575
+ "text": "B DERIVATION OF THE TD-VAE MODEL FROM ITS DESIRED PROPERTIES",
1576
+ "text_level": 1,
1577
+ "bbox": [
1578
+ 171,
1579
+ 640,
1580
+ 792,
1581
+ 656
1582
+ ],
1583
+ "page_idx": 12
1584
+ },
1585
+ {
1586
+ "type": "text",
1587
+ "text": "In this section we start with a general recurrent variational auto-encoder and consider how the desired properties detailed in sections 1 and 2 constrain the architecture. We will find that these constraints in fact naturally lead to the TD-VAE model. ",
1588
+ "bbox": [
1589
+ 174,
1590
+ 671,
1591
+ 825,
1592
+ 713
1593
+ ],
1594
+ "page_idx": 12
1595
+ },
1596
+ {
1597
+ "type": "text",
1598
+ "text": "Let us first consider a relatively general form of temporal variational auto-encoder. We consider recurrent models where the same module is applied at every step, and where outputs are sampled one at a time (so that arbitrarily long sequences can be generated). A very general form of such an architecture consist of forward-backward encoder RNNs and a forward decoder RNN (Figure 7) but otherwise allowing for all the connections. Several works (Chung et al., 2015; Lee et al., 2018; Archer et al., 2015; Fraccaro et al., 2016; Liu et al., 2017; Goyal et al., 2017; Buesing et al., 2018; Serban et al., 2017) fall into this framework. ",
1599
+ "bbox": [
1600
+ 174,
1601
+ 719,
1602
+ 825,
1603
+ 818
1604
+ ],
1605
+ "page_idx": 12
1606
+ },
1607
+ {
1608
+ "type": "text",
1609
+ "text": "Now let us consider our desired properties. ",
1610
+ "bbox": [
1611
+ 176,
1612
+ 825,
1613
+ 454,
1614
+ 839
1615
+ ],
1616
+ "page_idx": 12
1617
+ },
1618
+ {
1619
+ "type": "text",
1620
+ "text": "In order to sample forward in latent space, the encoder must not feed into the decoder or the prior of the latent variables, since observations are required to compute the encoded state, and we would therefore require the sampled observations to compute the distribution over future states and observations. ",
1621
+ "bbox": [
1622
+ 176,
1623
+ 847,
1624
+ 825,
1625
+ 888
1626
+ ],
1627
+ "page_idx": 12
1628
+ },
1629
+ {
1630
+ "type": "text",
1631
+ "text": "We next consider the constraint of computing a belief state $b _ { t }$ . The belief state $b _ { t }$ represents the state of knowledge up to time $t$ , and therefore cannot receive an input from the backwards decoder. ",
1632
+ "bbox": [
1633
+ 174,
1634
+ 895,
1635
+ 823,
1636
+ 924
1637
+ ],
1638
+ "page_idx": 12
1639
+ },
1640
+ {
1641
+ "type": "image",
1642
+ "img_path": "images/9ccde79a74da241a8322e4e748872ad717f7306801af6ff0c458d4e963711a9f.jpg",
1643
+ "image_caption": [
1644
+ "Figure 7: Recurrent variational auto-encoder. General recurrent variational auto-encoder, obtained by imposing recurrent structure, forward sampling and allowing all potential connections. Note that the encoder can have several alternating layers of forward and backward RNNs. Also note that the connection 1 has to be absent if the backwards encoder is used. Possible skip connections are not shown as they can directly be implemented in the RNN weights. If connections 2 are absent, the model is capable of forward sampling in latent space without going back to observations. "
1645
+ ],
1646
+ "image_footnote": [],
1647
+ "bbox": [
1648
+ 348,
1649
+ 109,
1650
+ 651,
1651
+ 315
1652
+ ],
1653
+ "page_idx": 13
1654
+ },
1655
+ {
1656
+ "type": "text",
1657
+ "text": "Furthermore, $b _ { t }$ should have an unrestricted access to information; it should ideally not be disturbed by sampling (two identical agents with the same information should compute the same information; this will not be the case if the computation involves sampling), nor go through information bottlenecks. This suggests using the forward encoder for computing the belief state. ",
1658
+ "bbox": [
1659
+ 174,
1660
+ 455,
1661
+ 825,
1662
+ 512
1663
+ ],
1664
+ "page_idx": 13
1665
+ },
1666
+ {
1667
+ "type": "text",
1668
+ "text": "Given the use of a decoder RNN, the information needed to predict the future could be stored in the decoder state, which may prevent the encoder from storing the full state information (in other words, the information contained in $x _ { 1 } , \\ldots , x _ { t + 1 }$ about the state $z _ { t + 1 }$ could be partially stored in the decoder state and previous sample $z _ { t }$ ). This presents two options: the first is to make the prior $p ( z _ { t + 1 } | . )$ and the reconstruction $p ( x _ { t } | . )$ depend only on $z _ { t }$ , i.e. to only consider distributions $p ( z _ { t + 1 } \\mid z _ { t } )$ and $p ( x _ { t } \\mid z _ { t } )$ . The second is to include the decoder state in the belief state (together with the encoder state). We will choose the former option, as we our next constraint will invalidate the latter option. ",
1669
+ "bbox": [
1670
+ 174,
1671
+ 520,
1672
+ 825,
1673
+ 617
1674
+ ],
1675
+ "page_idx": 13
1676
+ },
1677
+ {
1678
+ "type": "text",
1679
+ "text": "Next, we argue that smoothing, or the dependence of posterior on the future, is an important property that should be part of our model. As an example, imagine a box that can contain two items $A$ and $B$ and two time points: $t _ { 1 }$ before opening the box, when we don’t know the content of the box, and $t _ { 2 }$ after opening it. We would want our latent variable to represent the content of the box. The perfect model of the content of the box is that the content doesn’t change (the same object is in the box before and after opening it). Now imagine $B$ is in the box. Our belief at $t _ { 2 }$ is high for $B$ but our belief at $t _ { 1 }$ is uncertain. If we sample this belief at $t _ { 1 }$ without considering $t _ { 2 }$ we would sample $A$ half of the time. However, then we would be learning a wrong model of the world: that $A$ goes to $B$ . To solve this problem, we should sample $t _ { 2 }$ first and then, given this value, sample $t _ { 1 }$ . ",
1680
+ "bbox": [
1681
+ 174,
1682
+ 623,
1683
+ 825,
1684
+ 750
1685
+ ],
1686
+ "page_idx": 13
1687
+ },
1688
+ {
1689
+ "type": "text",
1690
+ "text": "Smoothing requires the use of the backward encoder; this prevents the use of the decoder state as part of our belief state, since the decoder has access to the encoder, and the encoder depends on the future. We therefore require a latent-to-latent model $p ( z _ { t + 1 } \\mid z _ { t } )$ . ",
1691
+ "bbox": [
1692
+ 174,
1693
+ 756,
1694
+ 825,
1695
+ 799
1696
+ ],
1697
+ "page_idx": 13
1698
+ },
1699
+ {
1700
+ "type": "text",
1701
+ "text": "We are therefore left with a forward encoder which ideally computes the belief state, a backwards encoder which - with the forward encoder - compute posteriors over states, and a state-to-state forward model. The training of the backwards encoder will be induced by its use as a posterior in the state-space model. How do then make sure the forward encoder is in fact trained to contain the belief state? To do so, we will force $p _ { B } ( z _ { t } \\vert b _ { t } )$ to be close to the posterior by using a KL term between prior belief and posterior belief. ",
1702
+ "bbox": [
1703
+ 174,
1704
+ 804,
1705
+ 825,
1706
+ 888
1707
+ ],
1708
+ "page_idx": 13
1709
+ },
1710
+ {
1711
+ "type": "text",
1712
+ "text": "Before detailing the KL term, we need to consider how to practically run the backwards decoder. \nIdeally, we would like to train the model in a nearly forward fashion, for arbitrary long sequences. ",
1713
+ "bbox": [
1714
+ 174,
1715
+ 895,
1716
+ 823,
1717
+ 924
1718
+ ],
1719
+ "page_idx": 13
1720
+ },
1721
+ {
1722
+ "type": "image",
1723
+ "img_path": "images/cb25367ac7f23c0a12965cc2611fb51ea98660e1d19d401afae0641866433420.jpg",
1724
+ "image_caption": [
1725
+ "Figure 8: Deep version of the model from Figure 1. A deep version of the model is formed by creating a layer similar to the shallow model of Figure 1 and replicating it. Both sampling and inference proceed downwards through the layers. Circles have the same meaning as in Figure 1 and are implemented using neural networks, such as LSTMs. "
1726
+ ],
1727
+ "image_footnote": [],
1728
+ "bbox": [
1729
+ 254,
1730
+ 92,
1731
+ 745,
1732
+ 402
1733
+ ],
1734
+ "page_idx": 14
1735
+ },
1736
+ {
1737
+ "type": "text",
1738
+ "text": "This prevents running the backwards inference from the end of the sequence. However if we assume that $p _ { B }$ represents our best belief about the future, we can take a sample from it as an instance of the future: $z _ { t _ { 2 } } \\sim p _ { B } ( z _ { t _ { 2 } } | b _ { t _ { 2 } } )$ . It forms a type of bootstrap information. Then we can go backwards and infer what would the world have looked like given this future (e.g. the object $B$ was still in the box even if we don’t see it). Using VAE training, we sample $z _ { 1 }$ from its posterior $q ( z _ { t _ { 1 } } | z _ { t _ { 2 } } , b _ { t _ { 2 } } , b _ { t _ { 1 } } )$ (the conditioning variables are the ones we have available locally), using $p _ { B } ( z _ { t _ { 1 } } | b _ { t _ { 1 } } )$ as prior. Conversely, for $t _ { 2 }$ , we sample from $p _ { B } ( z _ { t _ { 2 } } | b _ { t _ { 2 } } )$ as posterior, but with $p \\big ( \\boldsymbol { z } _ { t _ { 2 } } \\big | \\boldsymbol { z } _ { t _ { 1 } } \\big )$ as prior. We therefore obtain the VAE losses $\\log q ( z _ { 1 } | z _ { 2 } , s _ { 1 } , s _ { 2 } ) - \\log p _ { B } ( z _ { 1 } | s _ { 1 } )$ at $t _ { 1 }$ and $\\log p _ { B } ( z _ { 2 } | s _ { 2 } ) - \\log p _ { P } ( z _ { 2 } | z _ { 1 } )$ at $t _ { 2 }$ . In addition we have the reconstruction term $p _ { D } ( x _ { 2 } | z _ { 2 } )$ that grounds the latent in the input. The whole algorithm is presented in the Figure 1. ",
1739
+ "bbox": [
1740
+ 173,
1741
+ 508,
1742
+ 825,
1743
+ 648
1744
+ ],
1745
+ "page_idx": 14
1746
+ },
1747
+ {
1748
+ "type": "text",
1749
+ "text": "C HIERARCHICAL MODEL ",
1750
+ "text_level": 1,
1751
+ "bbox": [
1752
+ 176,
1753
+ 667,
1754
+ 406,
1755
+ 684
1756
+ ],
1757
+ "page_idx": 14
1758
+ },
1759
+ {
1760
+ "type": "text",
1761
+ "text": "In the main paper we detailed a framework for learning models by bridging two temporally separated time points. It would be desirable to model the world with different hierarchies of state, the higherlevel states predicting the same-level or lower-level states, and ideally representing more invariant or abstract information. In this section we describe a stacked (hierarchical) version of the model. ",
1762
+ "bbox": [
1763
+ 173,
1764
+ 699,
1765
+ 825,
1766
+ 755
1767
+ ],
1768
+ "page_idx": 14
1769
+ },
1770
+ {
1771
+ "type": "text",
1772
+ "text": "The first part to extend to $L$ layers is the RNN that aggregates observations to produce the belief state $b$ . Here we simply use a deep LSTM, but with layer $l$ receiving inputs also from layer $l + 1$ from the previous time step. This is so that the higher layers can influence the lower ones (and vice versa). For $l = 1 , \\ldots , L$ : ",
1773
+ "bbox": [
1774
+ 173,
1775
+ 761,
1776
+ 825,
1777
+ 818
1778
+ ],
1779
+ "page_idx": 14
1780
+ },
1781
+ {
1782
+ "type": "equation",
1783
+ "img_path": "images/7fc2bd4eaa1b11a3e6c9e2b43e206f7cb5dc8fe992b1d776433b2faf6087de15.jpg",
1784
+ "text": "$$\nb _ { t } ^ { l } = \\mathrm { R N N } ( b _ { t } ^ { l } , b _ { t } ^ { l - 1 } , b _ { t - 1 } ^ { l + 1 } , \\boldsymbol { x } _ { t } )\n$$",
1785
+ "text_format": "latex",
1786
+ "bbox": [
1787
+ 383,
1788
+ 823,
1789
+ 580,
1790
+ 842
1791
+ ],
1792
+ "page_idx": 14
1793
+ },
1794
+ {
1795
+ "type": "text",
1796
+ "text": "and setting $b _ { 0 } = b _ { L }$ and $b _ { L + 1 } = \\emptyset$ . ",
1797
+ "bbox": [
1798
+ 174,
1799
+ 847,
1800
+ 403,
1801
+ 862
1802
+ ],
1803
+ "page_idx": 14
1804
+ },
1805
+ {
1806
+ "type": "text",
1807
+ "text": "We create a deep version of the belief part of the model by stacking the shallow one, as shown in Figure 8. In the usual spirit of deep directed models, the model samples downwards, generating higher level representations before the lower level ones (closer to pixels). The model implements deep inference, that is, the posterior distribution of one layer depends on the samples from the posterior distribution in previously sampled layers. The order of inference is a design choice, and we use the same direction as that of generation, from higher to lower layers, as done for example by Gregor et al. (2016); Kingma et al. (2016); Rasmus et al. (2015). We implement the dependence of various distributions on latent variables sampled so far using a recurrent neural network that summarizes all such variables (in a given group of distributions). We don’t share the weights between different layers. Given these choices, we can allow all connections consistent with the model. Next we describe the functional forms used in our model. ",
1808
+ "bbox": [
1809
+ 174,
1810
+ 867,
1811
+ 825,
1812
+ 924
1813
+ ],
1814
+ "page_idx": 14
1815
+ },
1816
+ {
1817
+ "type": "text",
1818
+ "text": "",
1819
+ "bbox": [
1820
+ 173,
1821
+ 103,
1822
+ 825,
1823
+ 202
1824
+ ],
1825
+ "page_idx": 15
1826
+ },
1827
+ {
1828
+ "type": "text",
1829
+ "text": "D FUNCTIONAL FORMS AND PARAMETER CHOICES ",
1830
+ "text_level": 1,
1831
+ "bbox": [
1832
+ 174,
1833
+ 223,
1834
+ 611,
1835
+ 238
1836
+ ],
1837
+ "page_idx": 15
1838
+ },
1839
+ {
1840
+ "type": "text",
1841
+ "text": "Here we describe the functional forms used in more detail. We start with those used for the harmonic oscillator experiments. Let $x _ { t }$ , $t = 1 , \\dots , T$ be the input sequence. The belief state network (both is a standard LSTM network: $b _ { t } , c _ { t } = \\mathrm { L S T M } ( x _ { t } , b _ { t - 1 } , c _ { t - 1 } )$ . For any arbitrary context $x$ , we denote $D$ the map from $x$ to a normal distribution with mean $\\mu ( x )$ and log-standard deviation $\\log \\sigma ( x )$ , where $[ \\mu , \\log { \\sigma } ] = W _ { 3 } \\operatorname { t a n h } ( W _ { 1 } x + B _ { 1 } ) \\sigma ( W _ { 2 } x + B _ { 2 } ) + B _ { 3 } $ , with $W _ { 1 } , W _ { 2 } , W _ { 3 }$ as weight matrices and $B _ { 1 } , B _ { 2 } , B _ { 3 }$ as biases. We use the letter $D$ for all such maps (even when they don’t share weights); weights are shared if the contexts are identical except for the time index. Consider the update for a given pair of time points $t _ { 1 } < t _ { 2 }$ . We use a two-layer hierarchical TD-VAE. A variable $v$ at layer $l$ and time $t$ is denoted $\\mathbf { \\widehat { v } } _ { t } ^ { l }$ . Beliefs are time $t _ { 1 }$ and $t _ { 2 }$ are denoted $b _ { t _ { 1 } } , b _ { t _ { 2 } }$ . The set of equations describing the system are as follows. ",
1842
+ "bbox": [
1843
+ 173,
1844
+ 255,
1845
+ 825,
1846
+ 393
1847
+ ],
1848
+ "page_idx": 15
1849
+ },
1850
+ {
1851
+ "type": "equation",
1852
+ "img_path": "images/588a7e2e9306b980d35a5b6321e8e2b8ac7615837d55e7c6285e16b7486cfa97.jpg",
1853
+ "text": "$$\n\\begin{array} { r l } { \\frac { 1 } { 2 } } & { { } = \\frac { \\lambda _ { 1 } } { 3 } - \\frac { \\lambda _ { 2 } } { 3 } - \\mathcal { B } \\xi _ { 2 } , } \\\\ { \\frac { 1 } { 2 } } & { { } = \\frac { \\lambda _ { 2 } } { 3 } - \\frac { \\lambda _ { 3 } } { 3 } - \\mathcal { B } \\xi _ { 2 } , } \\\\ { \\frac { 1 } { 2 } } & { { } = \\frac { \\lambda _ { 1 } } { 3 } - \\frac { \\lambda _ { 2 } } { 3 } - \\frac { \\lambda _ { 3 } } { 3 } - \\frac { \\lambda _ { 3 } } { 3 } } \\\\ { \\frac { 1 } { 2 } } & { { } = \\frac { \\lambda _ { 2 } } { 3 } - \\frac { \\lambda _ { 3 } } { 3 } - \\frac { \\lambda _ { 3 } } { 3 } } \\\\ { \\frac { 1 } { 2 } } & { { } = \\frac { \\lambda _ { 1 } } { 3 } - \\frac { \\lambda _ { 2 } } { 3 } - \\frac { \\lambda _ { 3 } } { 3 } } \\\\ { \\frac { 1 } { 2 } } & { { } = \\frac { \\lambda _ { 2 } } { 3 } - \\frac { \\lambda _ { 3 } } { 3 } - \\frac { \\lambda _ { 3 } } { 3 } } \\\\ { \\frac { 1 } { 2 } } & { { } = \\frac { \\lambda _ { 1 } } { 3 } - \\frac { \\lambda _ { 2 } } { 3 } - \\frac { \\lambda _ { 3 } } { 3 } } \\\\ { \\frac { 1 } { 2 } } & { { } = \\frac { \\lambda _ { 2 } } { 3 } - \\frac { \\lambda _ { 3 } } { 3 } - \\frac { \\lambda _ { 3 } } { 3 } } \\\\ { \\frac { 1 } { 2 } } & { { } = \\frac { \\lambda _ { 1 } } { 3 } - \\frac { \\lambda _ { 2 } } { 3 } } \\\\ { \\frac { 1 } { 2 } } & { { } = \\frac { \\lambda _ { 1 } } { 3 } - \\frac { \\lambda _ { 2 } } { 3 } } \\\\ { \\frac { 1 } { 2 } } & { { } = \\frac { \\lambda _ { 2 } } { 3 } - \\frac { \\lambda _ { 3 } } { 3 } } \\\\ { \\frac { 1 } { 2 } } & { { } = \\frac { \\lambda _ { 1 } } { 3 } - \\frac { \\lambda _ { 2 } } { 3 } } \\\\ { \\frac { 1 } { 2 } } & { { } = \\frac { \\lambda _ { 1 } } { 3 } - \\frac { \\lambda _ { 2 } } { 3 } } \\\\ { \\frac { 1 } { 2 } } & \\end{array}\n$$",
1854
+ "text_format": "latex",
1855
+ "bbox": [
1856
+ 362,
1857
+ 424,
1858
+ 630,
1859
+ 811
1860
+ ],
1861
+ "page_idx": 15
1862
+ },
1863
+ {
1864
+ "type": "text",
1865
+ "text": "The hidden layer of the $D$ maps is 50; the size of each $z _ { t } ^ { l }$ is 8. Belief states have size 50. We use the Adam optimizer with learning rate 0.0005. ",
1866
+ "bbox": [
1867
+ 174,
1868
+ 832,
1869
+ 823,
1870
+ 861
1871
+ ],
1872
+ "page_idx": 15
1873
+ },
1874
+ {
1875
+ "type": "text",
1876
+ "text": "The same network works for the MNIST experiment with the following modifications. Observations are pre-processed by a two hidden layer MLP with ReLU nonlinearity. The decoder $p _ { D }$ also have a two layer MLP, which outputs the logits of a Bernoulli distribution. $\\delta _ { t }$ was not passed as input to any network. ",
1877
+ "bbox": [
1878
+ 174,
1879
+ 867,
1880
+ 823,
1881
+ 924
1882
+ ],
1883
+ "page_idx": 15
1884
+ },
1885
+ {
1886
+ "type": "text",
1887
+ "text": "For the DeepMind Lab experiments, all the circles in Figure 8 are LSTMs. Blue circles are fully connected LSTM, the others are all convolutional LSTM. We use a fully connected LSTM of size 512 and convolutional layers of size $4 \\times 4 \\times 2 5 6$ . All kernel sizes are $3 \\times 3$ . The decoder layer has an extra canvas layer, similar to DRAW. ",
1888
+ "bbox": [
1889
+ 174,
1890
+ 103,
1891
+ 823,
1892
+ 159
1893
+ ],
1894
+ "page_idx": 16
1895
+ }
1896
+ ]
parse/train/S1x4ghC9tQ/S1x4ghC9tQ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1x4ghC9tQ/S1x4ghC9tQ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rJIN_4lA-/rJIN_4lA-.md ADDED
@@ -0,0 +1,440 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MAINTAINING COOPERATION IN COMPLEX SOCIALDILEMMAS USING DEEP REINFORCEMENT LEARNING
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Social dilemmas are situations where individuals face a temptation to increase their payoffs at a cost to total welfare. Building artificially intelligent agents that achieve good outcomes in these situations is important because many real world interactions include a tension between selfish interests and the welfare of others. We show how to modify modern reinforcement learning methods to construct agents that act in ways that are simple to understand, nice (begin by cooperating), provokable (try to avoid being exploited), and forgiving (try to return to mutual cooperation). We show both theoretically and experimentally that such agents can maintain cooperation in Markov social dilemmas. Our construction does not require training methods beyond a modification of self-play, thus if an environment is such that good strategies can be constructed in the zero-sum case (eg. Atari) then we can construct agents that solve social dilemmas in this environment.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Bilateral cooperative relationships, where individuals face a choice to pay personal costs to give larger benefits to others, are ubiquitous in our daily lives. In such situations mutual cooperation can lead to higher payoffs for all involved but there always exists an incentive to free ride. In a seminal work Axelrod (1984) asks a practical question: since social dilemmas are so ubiquitous, how should a person behave when confronted with one? In this work we will take up a variant of that question: how can we construct artificial agents that can solve complex bilateral social dilemmas?
12
+
13
+ First, we must define what it means to ‘solve’ a social dilemma. The simplest social dilemma is the two player, repeated Prisoner’s Dilemma (PD). Here each player chooses to either cooperate or defect each turn. Mutual cooperation earns high rewards for both players. Defection improves one’s payoff but only at a larger cost to one’s partner. For the PD, Axelrod & Hamilton (1981) suggest the strategy of tit-for-tat (TFT): begin by cooperating and in later turns copy whatever your partner did in the last turn.
14
+
15
+ TFT and its variants (eg. Win-Stay-Lose-Shift, Nowak & Sigmund (1993)) have been studied extensively across many domains including the social and behavioral sciences, biology, and computer science. TFT is popular for several reasons. First, it is able to avoid exploitation by defectors while reaping the benefits of cooperation with cooperators. Second, when TFT is paired with other conditionally cooperative strategies (eg. itself) it achieves cooperative payoffs. Third, it is error correcting because after an accidental defection is provides a way to return to cooperation. Fourth, it is simple to explain to a partner and creates good incentives: if one person commits to using TFT, their partner’s best choice is to cooperate rather than try to cheat.
16
+
17
+ Our contribution is to expand the idea behind to TFT to a different environment: one shot Markov social dilemmas that require function approximation (eg. deep reinforcement learning). We will work with the standard deep RL setup: at training time, our agent is given access to the Markov social dilemma and can use RL to compute a strategy. At test time the agent is matched with an unknown partner and gets to play the game with that partner once.
18
+
19
+ We will say that the agent can solve a social dilemma if it can satisfy the four TFT properties listed above. We call our strategy approximate (because we use RL function approximation) Markov (because the game is Markov) tit-for-tat (amTFT) which we show can solve more complex Markov social dilemmas.
20
+
21
+ The first issue amTFT needs to tackle is that unlike in the PD ‘cooperation’ and ‘defection’ are no longer simple labeled strategies, but rather sequences of choices. amTFT uses modified self-play1 to learn two policies at training time: a fully cooperative policy and a ‘safe’ policy (we refer to this as defection).2
22
+
23
+ The second issue is that we are considering a setup where our agent will only play the social dilemma once at test time. Thus the goal of amTFT is to intelligently switch between the learned policies within a single game.3 amTFT performs this as follows: at each time step during test time the amTFT agent computes the gain from the action their partner actually chose compared to the one prescribed by the cooperative policy. This can be done either using a learned $Q$ function or via policy rollouts. We refer to this as a per period debit. If the total debit is below a threshold amTFT behaves according to the cooperative policy. If the debit is above the threshold, the agent switches to the defecting policy for $k$ turns and then returns to cooperation. This $k$ is computed such that the partner’s gains (debit) are smaller than the losses they incur $k$ lost turns of cooperation).
24
+
25
+ We show both analytically and experimentally that amTFT can solve Markov social dilemmas (in the Axelrod sense defined above). Our experiments using a grid-world, Coins, and a modification of an Atari game where players must learn from pixels, the Pong Player’s Dilemma also demonstrate that an important component of amTFT is defining a partner’s ‘defection’ in terms of value and not actions. This choice makes amTFT robust to a partner using one of a class of outcome-equivalent cooperative policies as well function approximation, important properties for scaling agents beyond simple games.
26
+
27
+ We note that for the purposes of this paper we define the ‘cooperative’ the policies as the ones which maximize the sum of both players’ payoff. This definition seems natural for the case of the symmetric games we study (and is the one that is typically used in eg. the literature on the evolution of cooperation). However, it is well known that human social preferences take into account distribution (eg. inequity Fehr & Schmidt (1999)), various forms of altruism (Andreoni, 1990; Peysakhovich et al., 2014), and context dependent concerns (eg. social norms, see Roth et al. (1991); Herz & Taubinsky (2014); Peysakhovich & Rand (2015) for how social norms affect economic games and can be manipulated in the lab). Thus when applying amTFT in other circumstances the correct ‘focal point’ needs to be chosen. The automatic determination of focal points is an important topic for future research but far beyond the scope of this paper. However, we note that once this focal point is determined the amTFT algorithm can be used exactly as in this paper simply by swapping out the cooperative objective function during training time.
28
+
29
+ # 1.1 RELATED WORK
30
+
31
+ A large literature on the ‘folk theorem’ asks whether in a repeated game there exists an equilibrium which maintains cooperative payoffs using strategies which take as input histories of observations (Fudenberg & Maskin, 1986; Dutta, 1995) and output stage-game actions. A computer science branch of this literature asks whether it is possible to compute such equilibria either in repeated matrix games (Littman & Stone, 2005) or in repeated Markov games (de Cote & Littman, 2008). These works are related to our questions but have two key differences: first, they focus on switching strategies across iterations of a repeated game rather than within a single game. Second, perhaps more importantly, this literature focuses on finding equilibria unlike the Axelrod setup which focuses on finding a ‘good’ strategy for a single agent. This difference in focus is starkly illustrated by TFT itself because both agents choosing TFT is not an equilibrium (since if one agent commits to TFT the partner’s best response is not TFT, but rather always cooperate).
32
+
33
+ A second related literature focuses on learning and evolution in games (Fudenberg & Levine, 1998; Sandholm & Crites, 1996; Shoham et al., 2007; Nowak, 2006; Conitzer & Sandholm, 2007) with recent examples applying deep learning to this question (Leibo et al., 2017; Perolat et al., 2017). Though there is a large component of this literature focusing on social dilemmas, these works typically are interested how properties of the environment (eg. initial states, payoffs, information, learning rules used) affect the final state of a set of agents that are governed by learning or evolutionary dynamics. This literature gives us many useful insights, but is not usually focused on the question of design of a single agent as we are.
34
+
35
+ A third literature focuses on situations where long term interactions with the same partner means that a good agent needs to either to discern a partner’s type (Littman, 2001) or be able shape the adaptation of a learning partner (Babes et al., 2008; Foerster et al., 2017b). Babes et al. (2008) use reward shaping in the Prisoner’s Dilemma to construct ‘leader’ agents that convince ‘followers’ to cooperate and Foerster et al. (2017b) uses a policy gradient learning rule which includes an explicit model of the partner’s model. These works are related to ours but deal with situations where interactions are long enough for the partner to learn (rather than a single iteration) and require either explicit knowledge about the game structure (Babes et al., 2008) or the partner’s learning rule (Foerster et al., 2017b).
36
+
37
+ There is a recent surge of interest in using deep RL to construct agents that can get high payoffs in multi-agent environments. Much of this literature focuses either on zero-sum environments (Tesauro, 1995; Silver et al., 2016; 2017; Brown et al., 2015; Kempka et al., 2016; Wu & Tian, 2016; Usunier et al., 2016) or coordination games without an incentive to defect (Lowe et al., 2017; Foerster et al., 2017a; Riedmiller et al., 2009; Tampuu et al., 2017; Peysakhovich & Lerer, 2017; Lazaridou et al., 2017; Das et al., 2017; Evtimova et al., 2017; Havrylov & Titov, 2017; Foerster et al., 2016) and uses self-play to construct agents that can achieve good outcomes.4 We show that in the presence of social dilemmas applying this self-play approach naively often leads to bad outcomes.
38
+
39
+ Finally, there is a large literature using the repeated PD to study human decision-making in social dilemmas (Fudenberg et al., 2012; Bó & Fréchette, 2011). In addition, recent work in cognitive science has begun to use more complex games and RL techniques quite related to ours (KleimanWeiner et al., 2016). However, while this work provides useful insights into potentially useful strategies the main objective of this work is to understand human decision-making, not to actively improve the construction of agents.
40
+
41
+ # 2 THE BASIC MODEL
42
+
43
+ We now turn to formalizing our main idea. We will work with a generalization of Markov decision problems:
44
+
45
+ Definition 1 (Shapley (1953)) A (finite, 2-player) Markov game consists of a set of states $S =$ $\{ s _ { 1 } , \ldots , s _ { n } \}$ ; a set of actions for each player $\mathcal { A } _ { 1 } = \{ a _ { 1 } ^ { 1 } , \ldots , \overset { } { a _ { k } ^ { 1 } } \}$ , $\mathcal { A } _ { 2 } = \{ a _ { 1 } ^ { 2 } , \ldots , a _ { k } ^ { 2 } \}$ ; a transition function $\tau : S \times A _ { 1 } \times A _ { 2 } \to \Delta ( S )$ which tells us the probability distribution on the next state as $a$ function of current state and actions; a reward function for each player $R _ { i } : S \times A _ { 1 } \times A _ { 2 } \to \mathbb { R }$ which tells us the utility that player gains from a state, action tuple. We assume rewards are bounded.
46
+
47
+ Players can choose between policies which are maps from states to probability distributions on actions $\pi _ { i } : S \to \Delta ( { \mathcal { A } } _ { i } )$ . We denote by $\Pi _ { i }$ the set of all policies for a player. Through the course of the paper we will use the notation $\pi$ to refer to some abstract policy and $\hat { \pi }$ to learned approximations of it (eg. the output of a deep RL procedure).
48
+
49
+ Definition 2 A value function for a player i inputs a state and a pair of policies $V ^ { i } ( s , \pi _ { 1 } , \pi _ { 2 } )$ and gives the expected discounted reward to that player from starting in state $s$ . We assume agents discount the future with rate $\delta$ which we subsume into the value function. A related object is the $Q$ function for a player i inputs a state, action, and a pair of policies $Q ^ { i } ( s , \pi _ { 1 } , \pi _ { 2 } )$ and gives the expected discounted reward to that player from starting in state $s$ taking action a and then continuing according to $\pi _ { 1 } , \pi _ { 2 }$ afterwards.
50
+
51
+ We will be talking about strategic agents so we often refer to the concept of a best response:
52
+
53
+ Definition 3 A policy for agent $j$ denoted $\pi _ { j }$ is a best response starting at state s to a policy $\pi _ { i }$ if for any $\pi _ { j } ^ { \prime }$ and any $s ^ { \prime }$ along the trajectory generated by these policies we have $V ^ { j } ( s ^ { \prime } , \pi _ { i } , \pi _ { j } ) \geq$ $V _ { . } ^ { j } ( s ^ { \prime } , \pi _ { i } , \pi _ { j } ^ { \prime } )$ . We denote the set of such best responses as $B R _ { j } ( \pi _ { i } , s )$ . If $\pi _ { j }$ obeys the inequality above for any choice of state s we call it a perfect best response.
54
+
55
+ The set of stable states in a game is the set of equilibria. We call a policy for player 1 and a policy for player 2 a Nash equilibrium if they are best responses to each other. We call them a Markov perfect equilibrium if they are perfect best responses.
56
+
57
+ We are interested in a special set of policies:
58
+
59
+ Definition 4 Cooperative Markov policies starting from state s $( \pi _ { 1 } ^ { C } , \pi _ { 2 } ^ { C } )$ are those which, starting from state s, maximize $V ^ { 1 } ( s , \pi _ { 1 } , \stackrel { . . } { \pi } _ { 2 } ) + V ^ { 2 } ( s , \pi _ { 1 } , \stackrel { . . } { \pi } _ { 2 } )$ . We let the set of cooperative policies be denoted by $\Pi _ { i } ^ { C } ( c )$ . Let the set of policies which are cooperative from any state be the set of perfectly cooperative policies.
60
+
61
+ A social dilemma is a game where there are no cooperative policies which form equilibria. In other words, if one player commits to always cooperate, there is a way for their partner to exploit them and earn higher rewards at their expense. Note that in a social dilemma there may be policies which achieve the payoffs of cooperative policies because they cooperate on the trajectory of play and prevent exploitation by threatening non-cooperation on states which are never reached by the trajectory.5
62
+
63
+ The state representation used plays an important role in determining whether equilibria which achieve cooperative payoffs exist. Specifically, a policy which rewards cooperation today with cooperation tomorrow must be able to remember whether cooperation happened yesterday. In both of our example games, Coins and the PPD, if the game is played from the pixels without memory maintaining cooperation is impossible. This is because the current state does not contain information about past behavior of one’s partner.
64
+
65
+ Thus, some memory is required to create policies which maintain cooperation. This memory can be learned (eg. an RNN) or it can be an explicitly designed summary statistic (our approach). However, adding memory does not remove equilibria where both players always defect, so adding memory does not imply that self-play will find policies that maintain cooperation (Foerster et al., 2017b; Sandholm & Crites, 1996). In the appendix we show that even in the simplest situation, the one memory repeated PD, always defecting equilibria can be more robust attractors than ones which maintain cooperation. amTFT is designed to get around this problem by using modified self-play to explicitly construct the cooperative and cooperation maintaining strategies as well as then switching rule. We begin with the theory behind amTFT.
66
+
67
+ # 3 APPROXIMATE MARKOV TFT
68
+
69
+ We begin with a social dilemma where pure cooperators can be exploited. We aim to construct a simple meta-policy which incentivizes cooperation along the path of play by switching intelligently between policies in response to its partner.
70
+
71
+ We assume that cooperative polices are exchangeable. That is, for any pair $( \pi _ { 1 } ^ { C } , \pi _ { 2 } ^ { C } ) , ( \pi _ { 1 } ^ { \prime C } , \pi _ { 2 } ^ { \prime C } ) \in$ $\Pi _ { i } ^ { C } ( s )$ any combination of the two (eg. $( \pi _ { 1 } ^ { C } , \pi _ { 2 } ^ { \prime C } )$ is also in $\Pi _ { i } ^ { C } ( s ) { \rangle }$ ) and that all pairs give a unique distribution of the total rewards between the two players.
72
+
73
+ If policies are not exchangeable or can give different distributions of the total payoff then in addition to having a cooperation problem, we also have a coordination problem (ie. in which particular way should agents cooperate? how should gains from cooperation be split?). This is an important question, especially if we want our agents to interact with humans, and is related to the notion of choosing focal points in coordination/bargaining games. However, a complete solution is beyond the scope of this work and will often depend on contextual factors. See eg. Schelling (1980); Roth et al. (1991);
74
+
75
+ Kleiman-Weiner et al. (2016); Peysakhovich & Lerer (2017); Bicchieri (2005) for more detailed discussion.
76
+
77
+ For the social dilemma to be solvable, there must be strategies with worse payoffs to both players. Consider an equilibrium $( \pi _ { 1 } ^ { D } , \pi _ { 2 } ^ { D } )$ which has worse payoffs for player 2. We assume that $( \pi _ { 1 } ^ { D ^ { \bullet } } , \pi _ { 2 } ^ { \bar { D } } )$ is an equilibrium even if played for a finite time, which we call $\pi ^ { \dot { D } }$ -dominance. We use $\pi ^ { D }$ -dominance to bound the payoffs of a partner during the execution of a punishment phase, thus it is a sufficient but not necessary condition. We discuss in the Appendix how this assumption can be relaxed. To define this formally, we first introduce the notation of a compound policy $\pi ^ { X _ { k } Z }$ which is a policy that behaves according to $X$ for $k$ turns and then $Z$ afterwards.
78
+
79
+ Definition 5 We say $a$ game is $\pi ^ { D }$ dominant (for player 2) if for any $k$ , any state s, and any policy $\pi _ { A }$ we have
80
+
81
+ $$
82
+ V _ { 2 } ( s , \pi _ { 1 } ^ { D _ { k } C } , \pi _ { 2 } ^ { D _ { k } C } ) \geq V _ { 2 } ( s , \pi _ { 1 } ^ { D _ { k } C } , \pi _ { 2 } ^ { A _ { k } C } ) .
83
+ $$
84
+
85
+ In theory, with access to $\pi ^ { C } , \pi ^ { D }$ , their $Q$ functions, and no noise or function approximation, we can construct amTFT as follows. Suppose the amTFT agent plays as player 1 (the reverse is symmetric).
86
+
87
+ At the start of the game the amTFT agent begins in phase $C$ . If the phase is $C$ then the agent plays according to $\pi ^ { C }$ . At each time step, if the agent is in a $C$ phase, the agent looks at the action $a _ { 2 }$ chosen by their partner. The agent computes
88
+
89
+ $$
90
+ d = Q _ { C C } ^ { 2 } ( s , \pi _ { 1 } ^ { C } ( s ) , a _ { 2 } ) - Q _ { C C } ^ { 2 } ( s , \pi _ { 1 } ^ { C } ( s ) , \pi _ { 2 } ^ { C } ( s ) ) .
91
+ $$
92
+
93
+ If $d > 0$ then starting at the next time step when state $s ^ { \prime }$ is reached the agent enters into a $D$ phase where they choose according to $\pi ^ { D }$ for $k$ periods. $k$ is computed such that
94
+
95
+ $$
96
+ V _ { 2 } ( s ^ { \prime } , \pi _ { 1 } ^ { D _ { k } C } , \pi _ { 2 } ^ { D _ { k } C } ) - V _ { 2 } ( s ^ { \prime } , \pi _ { 1 } ^ { C } , \pi _ { 2 } ^ { C } ) > \alpha d .
97
+ $$
98
+
99
+ Here $\alpha > 1$ controls how often an agent can be exploited by a pure defector. After this $k$ is over the agent returns to the $C$ phase. The amTFT strategy gives a nice guarantee:
100
+
101
+ Theorem 1 Define $\begin{array} { r } { d ^ { * } = \operatorname* { m a x } _ { A _ { 2 } , s } ( Q _ { C C } ^ { 2 } ( s , \pi _ { 1 } ^ { C } ( s ) , a ) - Q _ { C C } ^ { 2 } ( s , \pi _ { 1 } ^ { C } ( s ) , \pi _ { 2 } ^ { C } ( s ) ) ) } \end{array}$ . If for any state s we have that $\begin{array} { r } { V _ { 2 } ( s , \pi _ { 1 } ^ { C } , \pi _ { 2 } ^ { C } ) - V _ { 2 } ( s , \pi _ { 1 } ^ { D } , \pi _ { 2 } ^ { D } ) > \frac { d ^ { * } } { \delta } } \end{array}$ then if player 1 is an amTFT agent, a fully omniscient player 2 maximizes their payoffs by behaving according to $\pi _ { 2 } ^ { C }$ when 1 is in a $C$ phase and $\pi _ { 2 } ^ { D }$ when 1 is in a $D$ -phase. Thus, $i f$ agents start in the $C$ phase and there is no noise, they cooperate forever. If they start in a $D$ phase, they eventually return to a $C$ phase.
102
+
103
+ The proof is quite simple and we relegate it to the Appendix. However, we now see that amTFT has the desiderata we have asked for: it is easy to explain, it cooperates with a pure cooperator, it does not get completely exploited by a pure defector,6 and incentivizes cooperation along the trajectory of play.7
104
+
105
+ # 4 CONSTRUCTING AN AMTFT AGENT
106
+
107
+ We now use RL methods to construct the components required for amTFT by approximating the cooperative and defect policies as well as the switching policy. To construct the required policies we use self-play and two reward schedules: selfish and cooperative.
108
+
109
+ In the selfish reward schedule each agent $i$ treats the other agent just as a part of their environment and tries to maximize their own reward. We assume that RL training converges and we call the converged policies under the selfish reward schedule $\hat { \pi } _ { i } ^ { D }$ and the associated $Q$ function approximations $\hat { Q } _ { D D } ^ { i }$ . If policies converge with this training then $\hat { \pi } ^ { D }$ is a Markov equilibrium (up to function approximation).
110
+
111
+ In the cooperative reward schedule each agent gets rewards both from their own payoff and the rewards the other agent receives. That is, we modify the reward function so that it is
112
+
113
+ $$
114
+ R _ { i } ^ { C C } ( s , a _ { 1 } , a _ { 2 } ) = R _ { 1 } ( s , a _ { 1 } , a _ { 2 } ) + R _ { 2 } ( s , a _ { 1 } , a _ { 2 } ) .
115
+ $$
116
+
117
+ We call the converged policy and value function approximations $\hat { \pi } _ { i } ^ { C }$ and $\hat { Q } _ { C C } ^ { i }$ . In this paper we are agnostic to which learning algorithm is used to compute policies.
118
+
119
+ In general there can be convergence issues with selfish self-play (Fudenberg & Levine, 1998; Conitzer & Sandholm, 2007; Papadimitriou, 2007) while in the cooperative reward schedule the standard RL convergence guarantees apply. The latter is because cooperative training is equivalent to one super-agent controlling both players and trying to optimize for a single scalar reward.
120
+
121
+ With the value functions and policies in hand from the procedure above, we can construct an amTFT meta-policy. For the purposes of this construction, we consider agent 1 as the amTFT agent (but everything is symmetric). The amTFT agent keeps a memory state $( W _ { t } , b _ { t } )$ which both start at 0.
122
+
123
+ The amTFT agent sees the action $a ^ { \prime }$ of their partner at time $t$ and approximates the gain from this deviation as $\bar { D _ { t } } = \hat { Q } _ { C C } ^ { 2 } ( s , a _ { t } ^ { 2 } ) - \hat { Q } _ { C C } ^ { 2 } ( s , \pi _ { 2 } ^ { C } ( s ) )$ . To compute this debit we can either use learned $Q$ functions or we can simply use rollouts.
124
+
125
+ The amTFT agent accumulates the total payoff balance of their partner as $W _ { t } = W _ { t - 1 } + D _ { t }$ . If $W _ { t }$ is below a fixed threshold $T$ the amTFT agent chooses actions according to $\pi ^ { C }$ . If $W _ { t }$ crosses a threshold $T$ the mTFT agent uses rollouts to compute a $k$ such that the partner loses more from $\hat { \pi } ^ { D _ { k } C }$ relative to cooperation than some constant $\alpha$ times the current debit. The hyperparameters $T$ and $\alpha$ trade off robustness to approximation error and noise. Raising $T$ allows for more approximation error in the calculation of the debit but relaxes the incentive constraints on the agent’s partner. Raising $\alpha$ makes the cost of defection higher but makes false positives more costly. The algorithm is formalized below:
126
+
127
+ # Algorithm 1 Approximate Markov Tit For Tat (for Agent 1)
128
+
129
+ Input: $\hat { \pi } ^ { C } , \hat { \pi } ^ { D }$ and their $\hat { Q } ; \alpha , T$
130
+ $b \gets 0 , W \gets 0$
131
+ while Game do $\begin{array} { r } { D \gets \hat { Q } _ { C C } ^ { 2 } ( s , a ^ { 2 } ) - \hat { Q } _ { C C } ^ { 2 } ( s , \hat { \pi } _ { 2 } ^ { C } ( s ) ) } \end{array}$ . $\hat { Q }$ comes from model or rollouts if $b = 0$ then Choose $a \hat { \pi } _ { 1 } ^ { C } ( s )$ W = W + D if $b > 0$ then Choose a ← πˆD1 (s) b = b − 1 if W > T then b = ˆk(s, αT ) $\triangleright \hat { k } ( s , \alpha W )$ uses rollouts to compute length of $D$ phase W = 0
132
+
133
+ A key component of the amTFT strategy is the computation of the per period debit $D _ { t }$ . In our experiments we do this via use batched policy rollouts (a similar procedure is used to calculate the length of the $D$ phase, $k$ ). Each rollout is computed as follows:
134
+
135
+ 1. The amTFT agent has policy pairs $( \hat { \pi } _ { 1 } ^ { C } , \hat { \pi } _ { 2 } ^ { C } )$ and $( \hat { \pi } _ { 1 } ^ { D } , \hat { \pi } _ { 2 } ^ { D } )$ saved from training
136
+
137
+ 2. At time $t$ when the state was $s$ the amTFT agent compares the action chosen by their partner which we denote as $a ^ { \prime }$ to $\hat { \pi } _ { 2 } ^ { C } ( s )$
138
+
139
+ 3. If $a ^ { \prime } = \hat { \pi } _ { 2 } ^ { C } ( s )$ then $D _ { t }$ is set to 0
140
+
141
+ 4. If $a ^ { \prime } \neq \hat { \pi } _ { 2 } ^ { C } ( s )$ then the amTFT agent simulates $2 B$ replicas of the game for $M$ turns.
142
+
143
+ (a) $\mathrm { ~ I n ~ } B$ of the replicates their partner starts with $a ^ { \prime }$ and play continues according to $( \hat { \pi } _ { 1 } ^ { C } , \hat { \pi } _ { 2 } ^ { C } )$ - we call this the ‘true path’
144
+ (b) $\operatorname { I n } B$ of the replicates their partner starts with $\hat { \pi } _ { 2 } ^ { C } ( s )$ and play continues according to $( \hat { \pi } _ { 1 } ^ { C } , \hat { \pi } _ { 2 } ^ { C } )$ - we call this the ‘counterfactual path’
145
+ (c) The amTFT agent takes the difference in the average total reward to the partner from the two paths and uses that as $D _ { t }$ - this is an estimate of the reward of the one shot deviation to $a ^ { \prime }$ from the recommended strategy $\hat { \pi } _ { 2 } ^ { C } ( s )$
146
+
147
+ This procedure is an unbiased estimator of $Q _ { C C }$ in the limit of large $B$ and $M$ but is computationally intensive at test time.8 In games where an action today can only affect payoffs up to $M$ periods from now it suffices to use rollouts of length $M$ and elide the continuation value.
148
+
149
+ The value-based construction gives amTFT a particular robustness property - if the partner is not using $\hat { \pi } _ { 2 } ^ { C }$ exactly but is using a policy that is outcome equivalent to it the estimated $D _ { t }$ values will end up being 0 in expectation and so the amTFT agent will continue to cooperate. We will see in our experiments that this property is important to the success of amTFT in real Markov social dilemmas.
150
+
151
+ # 5 EXPERIMENTS
152
+
153
+ We test amTFT in two environments: one grid-world and one where agents must learn from raw pixels. In the grid-world game Coins two players move on a $5 \times 5$ board. The game has a small probability of ending in every time step, we set this so the average game length is 500 time steps. Coins of different colors appear on the board periodically, and a player receives a reward of 1 for collecting (moving over) any coin. However, if a player picks up a coin of the other player’s color, the other player loses 2 points. The payoff for each agent at the end of each game is just their own point total. The strategy which maximizes total payoff is for each player to only pick up coins of their own color; however each player is tempted to pick up the coins of the other player’s color.
154
+
155
+ We also look at an environment where strategies must be learned from raw pixels. We use the method of Tampuu et al. (2017) to alter the reward structure of Atari Pong so that whenever an agent scores a point they receive a reward of 1 and the other player receives $- 2$ . We refer to this game as the Pong Player’s Dilemma (PPD). In the PPD the only (jointly) winning move is not to play. However, a fully cooperative agent can be exploited by a defector.
156
+
157
+ We are interested in constructing general strategies which scale beyond tabular games so we use deep neural networks for state representation for both setups. We use standard setups so we relegate the details of the networks as well as the training to the appendix.
158
+
159
+ We perform both Selfish (self play with reactive agents receiving own rewards) and Cooperative (self play with both agents receiving sum of rewards) training for both games. We train 100 replicates for Coins and 18 replicates for the PPD. In both games Selfish training leads to suboptimal behavior while Cooperative training does find policies that implement socially optimal outcomes. In Coins $\hat { \pi } ^ { D }$ agents converge to picking up coins of all colors while social $\hat { \pi } ^ { \tilde { C } }$ agents learn to only pick up matching coins. In PPD selfishly trained agents learn to compete and try to score while prosocially trained agents gently hit the ball back and forth.
160
+
161
+ ![](images/ba77f5343b7aaee120e60492dd3f5f7972762cb1c278040ea69bb3fccc94a0ee.jpg)
162
+ Figure 1: In two Markov social dilemmas we find that standard self-play converges to defecting strategies while modified self-play finds cooperative, but exploitable strategies. We use the results of these two training schedules to construct $\hat { \pi } ^ { \hat { C } }$ and $\hat { \pi } ^ { D }$ .
163
+
164
+ ![](images/c32fcd1cf239dd2d16c97809598afa992e226685b7a5acf266075d08fea316bf.jpg)
165
+ Figure 2: In two Markov social dilemmas, amTFT satisfies the Axelrod desiderata: it mostly cooperates with itself, is robust against defectors, and incentivizes cooperation from its partner. The ‘Grim’ strategy based on de Cote & Littman (2008) behaves almost identically to pure defection in these social dilemmas. The result of standard self-play is $\pi ^ { D }$ . The full tournament of all strategies against each other is shown in the Appendix.
166
+
167
+ We evaluate the performance of various Markov social dilemma strategies in a tournament. To construct a matchup between two strategies we construct agents and have them play a fixed length iteration of the game. Note that at training time we use a random length game but at test time we use a fixed length one so that we can compare payoffs more efficiently. We use 1000 replicates per strategy pair to compute the average expected payoff. We compare $\hat { \pi } ^ { C } , \hat { \pi } ^ { D }$ , and amTFT.
168
+
169
+ We also compare the direct adaptation of the construction in de Cote & Littman (2008). Recall that the folk theorem algorithm maintains equilibria by threat of deviation later: if either agent’s behavior in game iteration $t$ does not accord with the cooperative policy, both agents switch to a different policy in the next repetition of the game. We adapt this to the single test game setting as follows: the agent computes policies $\hat { \pi } ^ { C } , \hat { \pi } ^ { D }$ . If their partner $j$ takes an action $a$ in a state $s$ where $a \neq \hat { \pi } _ { j } ^ { C } ( s )$ the agent switches to $\hat { \pi } ^ { D }$ forever. We call this the Grim Trigger Strategy due to its resemblance to the rPD strategy of the same name.
170
+
171
+ In both games we ask how well the strategies satisfy Axelrod’s desiderata from the introduction. Specifically, we would like to measure whether a strategy avoids exploitation, cooperates with conditional cooperators, and incentivizes its partner to cooperate.
172
+
173
+ Let $S _ { i } ( X , Y )$ be the average reward to player $i$ when a policy of type $X$ is matched with type $Y$ . The metric
174
+
175
+ $$
176
+ \operatorname { S a f e t y } ( X ) = S _ { 1 } ( X , D ) - S _ { 1 } ( D , D ) .
177
+ $$
178
+
179
+ measures how safe a strategy is from exploitation by a defector. The larger this value, the worse that $\pi ^ { X }$ is exploited by a pure defector.
180
+
181
+ We measure a strategy’s ability to achieve cooperative outcomes with policies of their same type as
182
+
183
+ $$
184
+ \operatorname { S e l f M a t c h } ( X ) = S _ { 1 } ( X , X ) .
185
+ $$
186
+
187
+ This measure can be thought of as quantifying two things. First, how much social welfare is achieved in a world where everyone behaves according to strategy $X$ . Second, while we cannot enumerate all possible conditionally cooperative strategies, in the case of Grim and amTFT this serves as an indicator of how well they would behave against a particular conditional cooperator - themselves.
188
+
189
+ Finally, we measure if $X$ incentivizes cooperation from its partner. For this we use the measure
190
+
191
+ $$
192
+ \mathrm { I n c e n t C } ( X ) = S _ { 2 } ( X , C ) - S _ { 2 } ( X , D ) .
193
+ $$
194
+
195
+ The higher this number, the better off a partner is from committing to pure cooperation rather than trying to cheat.
196
+
197
+ Figure 2 shows our metrics evaluated for the strategies of always cooperate, always defect, amTFT and Grim. Pure cooperation is fully exploitable and pure defection gets poor payoffs when matched with itself. Neither pure strategy incentivizes cooperation. amTFT avoids being exploited by defectors, does well when paired with itself and incentivizes cooperative strategies from its partner. We also see that inferring a partner’s cooperation using the value function (amTFT) is much more stable than inferring it via actions (Grim).
198
+
199
+ # 6 AMTFT AS TEACHER
200
+
201
+ The results above show that amTFT is a good strategy to employ in a mixed environment which includes some cooperators, some tit-for-tat agents and some defectors. In particular, we have shown that amTFT is not exploited by $\pi ^ { D }$ . However, what happens when amTFT’s partner is themselves a learning agent?
202
+
203
+ We consider what happens if we fix the one player (the Teacher) to use a fixed policy but let the other player be a selfish deep RL agent (the Learner). We perform the retraining in the domain of Coins.9 This retraining procedure can also be used as an additional metric of the exploitability of a given strategy, rather than asking whether $\hat { \pi } ^ { D }$ can exploit it, we ask whether a learner trying to maximize its own payoff can find some way to cheat.
204
+
205
+ Recall that when selfish RL agents played with each other, they converged to the Selfish ‘grab all coins’ strategy. We see that Learners paired with purely cooperative teachers learn to exploit the teachers, learners paired with $\hat { \pi } ^ { D }$ also learn to exploit (this learning happens much slower because a fully trained $\hat { \pi } ^ { D }$ policy is able to grab coins very quickly and thus it is hard for a blank slate agent to learn at all), however learners paired with amTFT learn to cooperate. Note that choosing amTFT as a strategy leads to higher payoffs for both the Learner and the Teacher, thus even if we only care about the payoffs accrued to our own agent we can do better with amTFT than a purely greedy strategy.
206
+
207
+ ![](images/2d14badff7a198da31e21be2f4ba5c1265a09b90888e10eb00b2bdbf834bf851.jpg)
208
+ Figure 3: Both purely selfish and purely cooperative Teachers lead Learners to exploitative strategies. However, amTFT Teachers lead Learners to cooperate and thus both agents reach a higher payoff in the long-run.
209
+
210
+ # 7 CONCLUSION
211
+
212
+ Humans are remarkably adapted to solving bilateral social dilemmas. We have focused on how to give artificial agents this capability. We have shown that amTFT can maintain cooperation and avoid exploitation in Markov games. In addition we have provided a simple construction for this strategy that requires no more than modified self-play. Thus, amTFT can be applied to social dilemmas in many environments.
213
+
214
+ Our results emphasize the importance of treating agents as fundamentally different than other parts of the environment. In particular, agents have beliefs, desires, learn, and use some form of optimization while objects follow simple fixed rules. An important future direction for constructing cooperative agents is to continue to incorporate ideas from inverse reinforcement learning (Abbeel & Ng, 2004; $\mathrm { N g }$ et al., 2000) and cognitive science (Baker et al., 2009; Kleiman-Weiner et al., 2016) to construct agents that exhibit some theory of mind.
215
+
216
+ There is a growing literature on hybrid systems which include both human and artificial agents (Crandall et al., 2017; Shirado & Christakis, 2017). In this work we have focused on defining ‘cooperation’ as maximizing the joint payoff. This assumption seems reasonable in symmetric situations such as those we have considered, however, as we discuss in the introduction it may not always be appropriate. The amTFT construction can be easily modified to allow other types of focal points simply by changing the modified reward function used in the training of the cooperative strategies (for example by using the inequity averse utility functions of Fehr & Schmidt (1999)). However moving forward in constructing agents that can interact in social dilemmas with humans will require AI designers (and their agents) to understand and adapt to human cooperative and moral intutions (Kraft-Todd et al., 2015; Yoeli et al., 2013; Hauser et al., 2014; Ouss & Peysakhovich, 2015).
217
+
218
+ # REFERENCES
219
+
220
+ Abbeel, Pieter and Ng, Andrew Y. Apprenticeship learning via inverse reinforcement learning. In Proceedings of the twenty-first international conference on Machine learning, pp. 1. ACM, 2004.
221
+
222
+ Andreoni, James. Impure altruism and donations to public goods: A theory of warm-glow giving. The economic journal, 100(401):464–477, 1990.
223
+
224
+ Axelrod, Robert and Hamilton, William Donald. The evolution of cooperation. science, 211(4489): 1390–1396, 1981.
225
+
226
+ Axelrod, Robert M. The evolution of cooperation. Basic books, 1984.
227
+
228
+ Babes, Monica, De Cote, Enrique Munoz, and Littman, Michael L. Social reward shaping in the prisoner’s dilemma. In Proceedings of the 7th international joint conference on Autonomous agents and multiagent systems-Volume 3, pp. 1389–1392. International Foundation for Autonomous Agents and Multiagent Systems, 2008.
229
+
230
+ Baker, Chris L, Saxe, Rebecca, and Tenenbaum, Joshua B. Action understanding as inverse planning. Cognition, 113(3):329–349, 2009.
231
+
232
+ Bicchieri, Cristina. The grammar of society: The nature and dynamics of social norms. Cambridge University Press, 2005.
233
+
234
+ Bó, Pedro Dal and Fréchette, Guillaume R. The evolution of cooperation in infinitely repeated games: Experimental evidence. The American Economic Review, 101(1):411–429, 2011.
235
+
236
+ Brown, Noam, Ganzfried, Sam, and Sandholm, Tuomas. Hierarchical abstraction, distributed equilibrium computation, and post-processing, with application to a champion no-limit texas hold’em agent. In Proceedings of the 2015 International Conference on Autonomous Agents and Multiagent Systems, pp. 7–15. International Foundation for Autonomous Agents and Multiagent Systems, 2015.
237
+
238
+ Conitzer, Vincent and Sandholm, Tuomas. Awesome: A general multiagent learning algorithm that converges in self-play and learns a best response against stationary opponents. Machine Learning, 67(1-2):23–43, 2007.
239
+
240
+ Crandall, Jacob W, Oudah, Mayada, Ishowo-Oloko, Fatimah, Abdallah, Sherief, Bonnefon, JeanFrançois, Cebrian, Manuel, Shariff, Azim, Goodrich, Michael A, Rahwan, Iyad, et al. Cooperating with machines. arXiv preprint arXiv:1703.06207, 2017.
241
+
242
+ Das, Abhishek, Kottur, Satwik, Moura, José MF, Lee, Stefan, and Batra, Dhruv. Learning cooperative visual dialog agents with deep reinforcement learning. arXiv preprint arXiv:1703.06585, 2017.
243
+
244
+ de Cote, Enrique Munoz and Littman, Michael L. A polynomial-time nash equilibrium algorithm for repeated stochastic games. In Proceedings of the Twenty-Fourth Conference on Uncertainty in Artificial Intelligence, pp. 419–426. AUAI Press, 2008.
245
+
246
+ Dutta, Prajit K. A folk theorem for stochastic games. Journal of Economic Theory, 66(1):1–32, 1995.
247
+
248
+ Evtimova, Katrina, Drozdov, Andrew, Kiela, Douwe, and Cho, Kyunghyun. Emergent language in a multi-modal, multi-step referential game. arXiv preprint arXiv:1705.10369, 2017.
249
+
250
+ Fehr, Ernst and Schmidt, Klaus M. A theory of fairness, competition, and cooperation. The quarterly journal of economics, 114(3):817–868, 1999.
251
+
252
+ Foerster, Jakob, Assael, Yannis, de Freitas, Nando, and Whiteson, Shimon. Learning to communicate with deep multi-agent reinforcement learning. In Advances in Neural Information Processing Systems, pp. 2137–2145, 2016.
253
+
254
+ Foerster, Jakob, Nardelli, Nantas, Farquhar, Gregory, Torr, Philip, Kohli, Pushmeet, Whiteson, Shimon, et al. Stabilising experience replay for deep multi-agent reinforcement learning. arXiv preprint arXiv:1702.08887, 2017a.
255
+
256
+ Foerster, Jakob N, Chen, Richard Y, Al-Shedivat, Maruan, Whiteson, Shimon, Abbeel, Pieter, and Mordatch, Igor. Learning with opponent-learning awareness. arXiv preprint arXiv:1709.04326, 2017b.
257
+
258
+ Fudenberg, Drew and Levine, David K. The theory of learning in games, volume 2. MIT press, 1998.
259
+
260
+ Fudenberg, Drew and Maskin, Eric. The folk theorem in repeated games with discounting or with incomplete information. Econometrica: Journal of the Econometric Society, pp. 533–554, 1986.
261
+
262
+ Fudenberg, Drew, Rand, David G, and Dreber, Anna. Slow to anger and fast to forgive: Cooperation in an uncertain world. The American Economic Review, 102(2):720–749, 2012.
263
+
264
+ Hauser, Oliver P, Rand, David G, Peysakhovich, Alexander, and Nowak, Martin A. Cooperating with the future. Nature, 511(7508):220–223, 2014.
265
+
266
+ Havrylov, Serhii and Titov, Ivan. Emergence of language with multi-agent games: Learning to communicate with sequences of symbols. arXiv preprint arXiv:1705.11192, 2017.
267
+
268
+ Herz, Holger and Taubinsky, Dmitry. What makes a price fair? an experimental study of market experience and endogenous fairness norms. University of Zurich, Department of Economics Working Paper, 128, 2014.
269
+
270
+ Kempka, Michał, Wydmuch, Marek, Runc, Grzegorz, Toczek, Jakub, and Jaskowski, Wojciech. ´ Vizdoom: A doom-based ai research platform for visual reinforcement learning. arXiv preprint arXiv:1605.02097, 2016.
271
+
272
+ Kingma, Diederik and Ba, Jimmy. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
273
+
274
+ Kleiman-Weiner, Max, Ho, Mark K, Austerweil, Joe L, Michael L, Littman, and Tenenbaum, Joshua B. Coordinate to cooperate or compete: abstract goals and joint intentions in social interaction. In Proceedings of the 38th Annual Conference of the Cognitive Science Society, 2016.
275
+
276
+ Kraft-Todd, Gordon, Yoeli, Erez, Bhanot, Syon, and Rand, David. Promoting cooperation in the field. Current Opinion in Behavioral Sciences, 3:96–101, 2015.
277
+
278
+ Lazaridou, Angeliki, Peysakhovich, Alexander, and Baroni, Marco. Multi-agent cooperation and the emergence of (natural) language. In International Conference on Learning Representations, 2017.
279
+
280
+ Leibo, Joel Z, Zambaldi, Vinicius, Lanctot, Marc, Marecki, Janusz, and Graepel, Thore. Multi-agent reinforcement learning in sequential social dilemmas. In Proceedings of the 16th Conference on Autonomous Agents and MultiAgent Systems, pp. 464–473. International Foundation for Autonomous Agents and Multiagent Systems, 2017.
281
+
282
+ Lewis, Mike, Yarats, Denis, Dauphin, Yann N, Parikh, Devi, and Batra, Dhruv. Deal or no deal? end-to-end learning for negotiation dialogues. arXiv preprint arXiv:1706.05125, 2017.
283
+
284
+ Littman, Michael L. Friend-or-foe q-learning in general-sum games. In ICML, volume 1, pp. 322–328, 2001.
285
+
286
+ Littman, Michael L and Stone, Peter. A polynomial-time nash equilibrium algorithm for repeated games. Decision Support Systems, 39(1):55–66, 2005.
287
+
288
+ Lowe, Ryan, Wu, Yi, Tamar, Aviv, Harb, Jean, Abbeel, Pieter, and Mordatch, Igor. Multi-agent actor-critic for mixed cooperative-competitive environments. arXiv preprint arXiv:1706.02275, 2017.
289
+
290
+ Mnih, Volodymyr, Kavukcuoglu, Koray, Silver, David, Rusu, Andrei A, Veness, Joel, Bellemare, Marc G, Graves, Alex, Riedmiller, Martin, Fidjeland, Andreas K, Ostrovski, Georg, et al. Humanlevel control through deep reinforcement learning. Nature, 518(7540):529–533, 2015.
291
+
292
+ Mnih, Volodymyr, Badia, Adria Puigdomenech, Mirza, Mehdi, Graves, Alex, Lillicrap, Timothy, Harley, Tim, Silver, David, and Kavukcuoglu, Koray. Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning, pp. 1928–1937, 2016.
293
+
294
+ Ng, Andrew Y, Russell, Stuart J, et al. Algorithms for inverse reinforcement learning. In Icml, pp. 663–670, 2000.
295
+
296
+ Nowak, Martin and Sigmund, Karl. A strategy of win-stay, lose-shift that outperforms tit-for-tat in the prisoner’s dilemma game. Nature, 364(6432):56, 1993.
297
+
298
+ Nowak, Martin A. Evolutionary dynamics. Harvard University Press, 2006.
299
+
300
+ Ouss, Aurélie and Peysakhovich, Alexander. When punishment doesn’t pay: ’cold glow’ and decisions to punish. Journal of Law and Economics, 58(3), 2015.
301
+
302
+ Papadimitriou, Christos H. The complexity of finding nash equilibria. Algorithmic Game Theory, pp. 29–51, 2007.
303
+
304
+ Perolat, Julien, Leibo, Joel Z, Zambaldi, Vinicius, Beattie, Charles, Tuyls, Karl, and Graepel, Thore. A multi-agent reinforcement learning model of common-pool resource appropriation. arXiv preprint arXiv:1707.06600, 2017.
305
+
306
+ Peysakhovich, Alexander and Lerer, Adam. Prosocial learning agents solve generalized stag hunts better than selfish ones. arXiv preprint arXiv:1709.02865, 2017.
307
+
308
+ Peysakhovich, Alexander and Rand, David G. Habits of virtue: Creating norms of cooperation and defection in the laboratory. Management Science, 62(3):631–647, 2015.
309
+
310
+ Peysakhovich, Alexander, Nowak, Martin A, and Rand, David G. Humans display a ’cooperative phenotype’ that is domain general and temporally stable. Nature Communications, 2014.
311
+
312
+ Riedmiller, Martin, Gabel, Thomas, Hafner, Roland, and Lange, Sascha. Reinforcement learning for robot soccer. Autonomous Robots, 27(1):55–73, 2009.
313
+
314
+ Roth, Alvin E, Prasnikar, Vesna, Okuno-Fujiwara, Masahiro, and Zamir, Shmuel. Bargaining and market behavior in jerusalem, ljubljana, pittsburgh, and tokyo: An experimental study. The American Economic Review, pp. 1068–1095, 1991.
315
+
316
+ Sandholm, Tuomas W and Crites, Robert H. Multiagent reinforcement learning in the iterated prisoner’s dilemma. Biosystems, 37(1-2):147–166, 1996.
317
+
318
+ Schelling, Thomas C. The strategy of conflict. Harvard university press, 1980.
319
+
320
+ Shapley, Lloyd S. Stochastic games. Proceedings of the national academy of sciences, 39(10): 1095–1100, 1953.
321
+
322
+ Shirado, Hirokazu and Christakis, Nicholas A. Locally noisy autonomous agents improve global human coordination in network experiments. Nature, 545(7654):370–374, 2017.
323
+
324
+ Shoham, Yoav, Powers, Rob, and Grenager, Trond. If multi-agent learning is the answer, what is the question? Artificial Intelligence, 171(7):365–377, 2007.
325
+
326
+ Silver, David, Huang, Aja, Maddison, Chris J, Guez, Arthur, Sifre, Laurent, Van Den Driessche, George, Schrittwieser, Julian, Antonoglou, Ioannis, Panneershelvam, Veda, Lanctot, Marc, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016.
327
+
328
+ Silver, David, Schrittwieser, Julian, Simonyan, Karen, Antonoglou, Ioannis, Huang, Aja, Guez, Arthur, Hubert, Thomas, Baker, Lucas, Lai, Matthew, Bolton, Adrian, et al. Mastering the game of go without human knowledge. Nature, 550(7676):354–359, 2017.
329
+
330
+ Tampuu, Ardi, Matiisen, Tambet, Kodelja, Dorian, Kuzovkin, Ilya, Korjus, Kristjan, Aru, Juhan, Aru, Jaan, and Vicente, Raul. Multiagent cooperation and competition with deep reinforcement learning. PloS one, 12(4):e0172395, 2017.
331
+
332
+ Tesauro, Gerald. Temporal difference learning and td-gammon. Communications of the ACM, 38(3): 58–68, 1995.
333
+
334
+ Usunier, Nicolas, Synnaeve, Gabriel, Lin, Zeming, and Chintala, Soumith. Episodic exploration for deep deterministic policies: An application to starcraft micromanagement tasks. arXiv preprint arXiv:1609.02993, 2016.
335
+
336
+ Williams, Ronald J. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992.
337
+
338
+ Wu, Yuxin and Tian, Yuandong. Training agent for first-person shooter game with actor-critic curriculum learning. 2016.
339
+
340
+ Yoeli, Erez, Hoffman, Moshe, Rand, David G, and Nowak, Martin A. Powering up with indirect reciprocity in a large-scale field experiment. Proceedings of the National Academy of Sciences, 110(Supplement 2):10424–10429, 2013.
341
+
342
+ # 8 APPENDIX
343
+
344
+ # 8.1 STANDARD SELF-PLAY FAILS TO DISCOVER COOPERATIVE STRATEGIES IN THEREPEATED PD
345
+
346
+ In a social dilemma there exists an equilibrium of mutual defection, and there may exist additional equilibria of conditional cooperation. Standard self-play may converge to any of these equilibria. When policy spaces are large, it is often the case that simple equilibria of constant mutual defection have larger basins of attraction than policies which maintain cooperation.
347
+
348
+ We can illustrate this with the simple example of the repeated Prisoner’s Dilemma. Consider a PD with payoffs of 0 to mutual defection, 1 for mutual cooperation, $w > 1$ for defecting on a cooperative partner and $- s$ for being defected on while cooperating. Consider the simplest possible state representation where the set of states is the pair of actions played last period and let the initial state be $( C , C )$ (this is the most optimistic possible setup). We consider RL agents that use policy gradient (results displayed here come from using Adam (Kingma & Ba, 2014), similar results were obtained with SGD though convergence speed was much more sensitive to the setting of the learning rate) to learn policies from states (last period actions) to behavior.
349
+
350
+ Note that this policy space contains TFT (cooperate after $( C , C ) , ( D , C )$ , defect otherwise), Grim Trigger (cooperate after $( C , C )$ , defect otherwise) and Pavlov or Win-Stay-Lose-Shift (cooperate after $( C , C ) , ( D , D )$ , defect otherwise (Nowak & Sigmund, 1993)) which are all cooperation maintaining strategies (though only Grim and WSLS are themselves full equilibria).
351
+
352
+ Each episode is defined as one repeated PD game which lasts a random number of periods with stopping probability of stopping .05 after each period. Policies in the game are maps from the onememory state space $\{ ( C , \bar { C } ) , ( \bar { D } , C ) , ( C , D ) , ( \bar { D } , D ) \}$ to either cooperation or not. These policies are trained using policy gradient and the REINFORCE algorithm (Williams, 1992). We vary $w$ and set $s = 1 . 5 w$ such that $( C , C )$ is the most efficient strategy always. Note that all of these parameters are well within the range where humans discover cooperative strategies in experimental applications of the repeated PD (Bó & Fréchette, 2011).
353
+
354
+ Figure 4 shows that cooperation only robustly occurs when it is a dominant strategy for both players (w < 0) and thus the game is no longer a social dilemma.10.
355
+
356
+ ![](images/3371b972d4c844b6683a3668d8a4e7ef8355deeed0c7f735c42bcee5093c9d49.jpg)
357
+ Figure 4: Results from training one-memory strategies using policy gradient in the repeated Prisoner’s Dilemma. Even in extremely favorable conditions self-play fails to discover cooperation maintaining strategies. Note that temptation payoff .5 is not a PD and here $C$ is a dominant strategy in the stage game.
358
+
359
+ # 8.2 PROOF OF MAIN THEOREM
360
+
361
+ To prove the theorem we will apply the one deviation principle. To show this, we fix player 1 to be an amTFT agent and look at player 2. Note that from the point of view of player 2 this is now a Markov game with a state representation of $( s , k )$ where if $k = 0$ player 1 behaves according to $\pi ^ { C }$ and if $k > 0$ player 1 is in the $D$ phase and thus behaves according to $\pi ^ { D _ { k } C }$ .
362
+
363
+ We consider the policy for player 2 of ‘play $\pi _ { 2 } ^ { C }$ when player 1 is in the $C$ phase and play $\pi _ { 2 } ^ { D }$ when player 1 is in the $D$ phase.’ Recall by the Principle of Optimality if there does not exist a one shot deviation $a ^ { \prime }$ at any state under which player 2 earns a higher payoff, then there does not exist a better policy than the one prescribed.
364
+
365
+ Consider starting at $k > 0$ . The suggested policy has player 2 play $\pi _ { 2 } ^ { D _ { k } C }$ . By $\pi ^ { D }$ -dominance this is the best response to $\pi _ { 1 } ^ { D _ { k } C }$ so there are no one-shot deviations in the $D$ phase.
366
+
367
+ Let us consider what happens in the $C$ phase $k = 0$ ). By the assumption of the theorem at any state $s$ we know that
368
+
369
+ $$
370
+ V _ { 2 } ( s , \pi _ { 1 } ^ { C } , \pi _ { 2 } ^ { C } ) - V _ { 2 } ( s , \pi _ { 1 } ^ { D } , \pi _ { 2 } ^ { D } ) > \frac { d ^ { * } } { \delta } .
371
+ $$
372
+
373
+ Let $\{ r _ { 2 } ^ { t } ( s , \pi _ { 1 } , \pi _ { 2 } ) \}$ be the per-period reward stream (note here each $r$ is a random variable) for player 2 induced by the policies $\pi _ { 1 } , \pi _ { 2 }$ . Since
374
+
375
+ $$
376
+ V _ { 2 } ( s , \pi _ { 1 } , \pi _ { 2 } ) = \mathbb { E } \left[ \delta ^ { t } \sum _ { t = 0 } ^ { \infty } r _ { 2 } ^ { t } ( s , \pi _ { 1 } , \pi _ { 2 } ) \right]
377
+ $$
378
+
379
+ where $\delta$ is the discount rate. Because rewards are bounded then for any $\epsilon > 0$ there exists $k$ such that
380
+
381
+ $$
382
+ | V _ { 2 } ( s , \pi _ { 1 } , \pi _ { 2 } ) - \sum _ { t = 0 } ^ { k } \delta ^ { t } r _ { 2 } ^ { t } | < \epsilon .
383
+ $$
384
+
385
+ That is, the first $k$ terms time steps approximate the full discounted expectation arbitrarily well. This also means that for some $k$
386
+
387
+ $$
388
+ V _ { 2 } ( s , \pi _ { 1 } ^ { C } , \pi _ { 2 } ^ { C } ) - V _ { 2 } ( s , \pi _ { 1 } ^ { D _ { k } C } , \pi _ { 2 } ^ { D _ { k } C } ) > \frac { d ^ { * } } { \delta } .
389
+ $$
390
+
391
+ From any state, the highest profit an agent can make from deviating from $\pi _ { 2 } ^ { C }$ with a single action with an amTFT partner is $d ^ { * }$ . However we have shown that there exists a length $k$ such that moving to $D$ for $k$ turns costs the agent more than $\frac { d ^ { * } } { \delta }$ . Therefore there is no time during the $C$ phase they wish to deviate. This completes the proof.
392
+
393
+ # 8.3 ASIDE ON $\pi ^ { D }$ -DOMINANCE
394
+
395
+ The reason we made the $\pi ^ { D }$ -dominance assumption is to bound the expected payoff of an agent playing against $\pi ^ { D _ { k } C }$ and therefore bound the necessary length of a $D$ phase after a particular deviation. However, in order to compute what the length of the $D$ phase the amTFT agent needs access to the best response policy to $\cdot \pi ^ { D _ { k } C }$ , or its associated value function. With $\pi ^ { D }$ -dominance we assume that $\pi ^ { D }$ is that best response. Even if $\pi ^ { D }$ -dominance does not strictly hold, it is likely a sufficient approximation. If necessary however, one can train an RL agent on episodes where their partner plays $\pi ^ { D _ { k } C }$ , where $k$ is observed. This allows one to approximate the best response policy to $\cdot \ d \pi ^ { D _ { k } C }$ which will then give us what we need to compute the responses to deviations from $\overset { \cdot \mathrm { ~ \wedge ~ } } { \pi } ^ { C }$ in the $D$ phase that incentivize full cooperation.
396
+
397
+ # 8.4 EXPERIMENTAL DETAILS
398
+
399
+ We used rollouts to calculate the debit to the amTFT’s partner at each time period. This estimator has good performance for both PPD and Coins given their reward structure. It is also possible to use a learned model of $Q$ . Learning a sufficiently accurate model $\hat { Q }$ is challenging for several reasons. First, it has to have very low bias, since any bias in $\hat { Q }$ will be accumulated over periods. Second, the one-shot deviation principle demands that $\hat { Q }$ be accurate for all state-action pairs, not just those sampled by the policies $( \pi ^ { C } , \pi ^ { C } )$ . Standard on-policy value function estimation will only produce accurate estimates of $Q$ at states sampled by the cooperative policies. As an example, in Coins, since the cooperative policies never collect their partner’s coins $\hat { Q }$ for these state-action pairs may be inaccurate.
400
+
401
+ We found that it was possible in Coins to learn a model $\hat { Q }$ to calculate debit without policy rollouts using the same neural network architecture that was used to train the policies. However, we found that in order to train a $\hat { Q }$ model accurate enough to work well we had to use a modified training procedure. After finishing Selfish and Cooperative training, we perform a second step of training using a fixed (converged) $\bar { \pi } ^ { C }$ . In order to sample states off the path of ${ \hat { \pi } } ^ { C }$ during this step, the learner behaves according to a mixture of $\pi ^ { C }$ , $\pi ^ { \hat { D } }$ , and random policies while the partner continues according to ${ \hat { \pi } } ^ { C }$ . $\hat { Q }$ is updated via off-policy Bellman iteration. We found this modified procedure produced a $\hat { Q }$ function that was good enough to maintain cooperation (though still not as efficient as rollouts). For more complex games, an important area for future work is to develop methodologies to compute more accurate approximations of $Q$ or combine a $\hat { Q }$ model with rollouts effectively.
402
+
403
+ # 8.4.1 COINS GAME AND TRAINING
404
+
405
+ For Coins there are four actions (up, down, left, right), and $S$ is represented as a $4 \times 5 \times 5$ binary tensor where the first two channels encode the location of the each agent and the other two channels encode the location of the coin (if any exist). At each time step if there is no coin on the board a coin is generated at a random location with a random color, with probability 0.1.
406
+
407
+ A policy $\pi ( s ; \theta ) : s \to \Delta ( a )$ is learned via the advantage actor critic algorithm. We use a multi-layer convolutional neural network to jointly approximate the policy $\pi$ and state-value function $\hat { V }$ . For this small game, a simpler model could be used, but this model generalizes directly to games with higher-dimensional 2D state spaces (e.g. environments with obstacles). For a given board size $k$ , the model has $\lceil \log _ { 2 } ( k ) \rceil + 1$ repeated layers, each consisting of a 2D convolution with kernel size 3, followed by batch normalization and ReLU. The first layer has stride 1, while the successive layers each have stride 2, which decreases the width and height from $k$ to $\lceil k / 2 \rceil$ while doubling the number of channels. For the $5 \times 5$ board, channel sizes are 13, 26, 52, 104. From these 104 features, $\pi$ is computed via a linear layer with 4 outputs with softmax, to compute a distribution over actions, while the value function is computed via a single-output linear layer.
408
+
409
+ The actor and critic are updated episodically with a common learning rate - at the end of each game we update the model on a batch of episodes via
410
+
411
+ $$
412
+ \Delta \theta _ { i } = \lambda \left( A _ { t } \frac { \partial V ( s _ { t } ) } { \partial \theta _ { i } } + \tilde { A } _ { t } \log \pi ( s _ { t } , a _ { t } ) \frac { \partial \pi ( s _ { t } , a _ { t } ) } { \partial \theta _ { i } } \right)
413
+ $$
414
+
415
+ where $A$ is the advantage
416
+
417
+ $$
418
+ A _ { t } = r _ { t } + \delta V \big ( s _ { t + 1 } \big ) - V \big ( s _ { t } \big )
419
+ $$
420
+
421
+ and $\tilde { A }$ is the advantaged normalized over all episodes and periods in the batch
422
+
423
+ $$
424
+ \tilde { A } _ { t } = \frac { A _ { t } - | A | } { \sigma ( A ) } .
425
+ $$
426
+
427
+ We train with a learning rate of 0.001, continuation probability .998 (i.e. games last on average 500 steps), discount rate 0.98, and a batch size of 32. We train for a total of 40, 000 games.
428
+
429
+ # 8.4.2 PONG PLAYER DILEMMA TRAINING
430
+
431
+ We use the arcade learning environment modified for 2-player play as proposed in Tampuu et al. (2017), with modified rewards of $+ 1$ for scoring a point and -2 for being scored on. We train policies directly from pixels, using the pytorch-a3c package https://github.com/ikostrikov/ pytorch-a3c.
432
+
433
+ Policies are trained directly from pixels via A3C (Mnih et al., 2016). Inputs are rescaled to $4 2 \mathbf { x } 4 2$ and normalized, and we augment the state with the difference between successive frames with a frame skip of 8. We use 38 threads for A3C, over a total of 38,000 games (1,000 per thread). We use the default settings from pytorch-a3c: a discount rate of 0.99, learning rate of 0.0001, 20-step returns, and entropy regularization weight of 0.01.
434
+
435
+ The policy is implemented as a convolutional neural network with four layers, following pytorch-a3c. Each layer uses a 3x3 kernel with stride 2, followed by ELU. The network has two heads for the actor and critic. We elide the LSTM layer used in the pytorch-a3c library, as we found it to be unnecessary.
436
+
437
+ # 8.4.3 TOURNAMENT RESULTS
438
+
439
+ ![](images/0cee11c68bd416b300927f0eb69e1df91205ba3ddbccc6dfa97b554df88ecf0b.jpg)
440
+ Figure 5: Results of the tournament in two Markov social dilemmas. Each cell contains the average total reward of the row strategy against the column strategy. amTFT achieves close to cooperative payoffs with itself and achieves close to the defect payoff against defectors. Its partner also receives a higher payoff for cooperation than defection.
parse/train/rJIN_4lA-/rJIN_4lA-_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rJIN_4lA-/rJIN_4lA-_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rJIN_4lA-/rJIN_4lA-_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rklMnyBtPB/rklMnyBtPB.md ADDED
@@ -0,0 +1,428 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ADVERSARIAL ROBUSTNESS AGAINST THE UNION OF MULTIPLE PERTURBATION MODELS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Owing to the susceptibility of deep learning systems to adversarial attacks, there has been a great deal of work in developing (both empirically and certifiably) robust classifiers, but the vast majority has defended against single types of attacks. Recent work has looked at defending against multiple attacks, specifically on the MNIST dataset, yet this approach used a relatively complex architecture, claiming that standard adversarial training can not apply because it “overfits” to a particular norm. In this work, we show that it is indeed possible to adversarially train a robust model against a union of norm-bounded attacks, by using a natural generalization of the standard PGD-based procedure for adversarial training to multiple threat models. With this approach, we are able to train standard architectures which are robust against $\ell _ { \infty }$ , $\ell _ { 2 }$ , and $\ell _ { 1 }$ attacks, outperforming past approaches on the MNIST dataset and providing the first CIFAR10 network trained to be simultaneously robust against $( \ell _ { \infty } , \ell _ { 2 } , \ell _ { 1 } )$ threat models, which achieves adversarial accuracy of $4 6 . 1 \%$ against the union of $( \ell _ { \infty } , \ell _ { 2 } , \ell _ { 1 } )$ perturbations with radius $\epsilon = ( 0 . 0 3 , \dot { 0 . 5 } , 1 2 )$ .
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Machine learning algorithms have been shown to be susceptible to adversarial examples (Szegedy et al., 2014) through the existence of data points which can be adversarially perturbed to be misclassified, but are “close enough” to the original example to be imperceptible to the human eye. Methods to generate adversarial examples, or “attacks”, typically rely on gradient information, and most commonly use variations of projected gradient descent (PGD) to maximize the loss within a small perturbation region, usually referred to as the adversary’s threat model. Since then, a number of heuristic defenses have been proposed to defend against this phenomenon, e.g. distillation (Papernot et al., 2016) or more recently logit-pairing (Kannan et al., 2018). However, as time goes by, the original robustness claims of these defenses typically don’t hold up to more advanced adversaries or more thorough attacks (Carlini & Wagner, 2017; Engstrom et al., 2018; Mosbach et al., 2018). One heuristic defense that seems to have survived (to this day) is to use adversarial training against a PGD adversary (Madry et al., 2018), which remains quite popular due to its simplicity and apparent empirical robustness. The method continues to perform well in empirical benchmarks even when compared to recent work in provable defenses, although it comes with no formal guarantees.
12
+
13
+ Some recent work, however, pointed out that adversarial training against $\ell _ { \infty }$ perturbations “overfits” to the $\ell _ { \infty }$ threat model, and used this as motivation to propose a more complicated architecture in order to achieve robustness to multiple perturbation types on the MNIST dataset (Schott et al., 2019).
14
+
15
+ In this work, we offer a alternative viewpoint: while adversarial training can overfit to the individual threat models, we show that it is indeed possible to use adversarial training to learn a model which is simultaneously robust against multiple types of $\ell _ { p }$ norm bounded attacks (we consider $\ell _ { \infty }$ , $\ell _ { 2 }$ , and $\ell _ { 1 }$ attacks, but the approach can apply to more general attacks). First, we show while simple generalizations of adversarial training to multiple threat models can achieve some degree of robustness against the union of these threat models, the performance is inconsistent and converges to suboptimal tradeoffs which may not actually minimize the robust objective. Second, we propose a slightly modified PGD-based algorithm called multi steepest descent (MSD) for adversarial training which more naturally incorporates the different perturbations within the PGD iterates, further improving the adversarial training approach by directly minimizing the robust optimization objective. Third, we show empirically that our approach improves upon past work by being applicable to standard network architectures, easily scaling beyond the MNIST dataset, and outperforming past results on robustness against multiple perturbation types.
16
+
17
+ # 2 RELATED WORK
18
+
19
+ After their original introduction, one of the first widely-considered attacks against deep networks had been the Fast Gradient Sign Method (Goodfellow et al., 2015), which showed that a single, small step in the direction of the sign of the gradient could sometimes fool machine learning classifiers. While this worked to some degree, the Basic Iterative Method (Kurakin et al., 2017) (now typically referred to as the PGD attack) was significantly more successful at creating adversarial examples, and now lies at the core of many papers. Since then, a number of improvements and adaptations have been made to the base PGD algorithm to overcome heuristic defenses and create stronger adversaries. Adversarial attacks were thought to be safe under realistic transformations (Lu et al., 2017) until the attack was augmented to be robust to them (Athalye et al., 2018b). Adversarial examples generated using PGD on surrogate models can transfer to black box models (Papernot et al., 2017). Utilizing core optimization techniques such as momentum can greatly improve the attack success rate and transferability, and was the winner of the NIPS 2017 competition on adversarial examples (Dong et al., 2018). Uesato et al. (2018) showed that a number of ImageNet defenses were not as robust as originally thought, and Athalye et al. (2018a) defeated many of the heuristic defenses submitted to ICLR 2018 shortly after the reviewing cycle ended, all with stronger PGD variations.
20
+
21
+ Throughout this cycle of attack and defense, some defenses were uncovered that remain robust to this day. The aforementioned PGD attack, and the related defense known as adversarial training with a PGD adversary (which incorporates PGD-attacked examples into the training process) has so far remained empirically robust (Madry et al., 2018). Verification methods to certify robustness properties of networks were developed, utilizing techniques such as SMT solvers (Katz et al., 2017), SDP relaxations (Raghunathan et al., 2018b), and mixed-integer linear programming (Tjeng et al., 2019), the last of which has recently been successfully scaled to reasonably sized networks. Other work has folded verification into the training process to create provably robust networks (Wong & Kolter, 2018; Raghunathan et al., 2018a), some of which have also been scaled to even larger networks (Wong et al., 2018; Mirman et al., 2018; Gowal et al., 2018). Although some of these could potentially be extended to apply to multiple perturbations simultaneously, most of these works have focused primarily on defending against and verifying only a single type of adversarial perturbation at a time.
22
+
23
+ Last but most relevant to this work are adversarial defenses that attempt to be robust against multiple types of attacks simultaneously. Schott et al. (2019) used multiple variational autoencoders to construct a complex architecture for the MNIST dataset that is not as easily attacked by $\ell _ { \infty }$ , $\ell _ { 2 }$ , and $\ell _ { 0 }$ adversaries. Importantly, Schott et al. (2019) compare to adversarial training with an $\ell _ { \infty }$ -bounded PGD adversary as described by Madry et al. (2018), claiming that the adversarial training defense overfits to the $\ell _ { \infty }$ metric, and they do not consider other forms of adversarial training. Following this, a number of concurrent papers have since been released. While not studied as a defense, Kang et al. (2019) study the transferability of adversarial robustness between models trained against different threat models. Croce & Hein (2019) propose a provable adversarial defense against all $\ell _ { p }$ norms for $p \geq 1$ using a regularization term. Finally, Tramer & Boneh (2019) study the theoretical and \` empirical trade-offs of adversarial robustness in various settings when defending against multiple adversaries, however, they use a rotation and translation adversary instead of an $\ell _ { 2 }$ adversary for CIFAR10.
24
+
25
+ Contributions In this work we demonstrate the effectiveness of adversarial training for learning models that are robust against a union of multiple perturbation models. First, we show that while simple aggregations of different adversarial attacks can achieve robustness against multiple perturbations models without resorting to complex architectures, the results are inconsistent across datasets and make suboptimal tradeoffs between the threat models. Second, we propose a modified PGD iteration that more naturally considers multiple perturbation models within the inner optimization loop of adversarial training. Third, we evaluate all approaches on the MNIST and CIFAR10 datasets, showing that our proposed generalizations of adversarial training can significantly outperform past approaches for the union of $\ell _ { \infty }$ , $\ell _ { 2 }$ , and $\ell _ { 1 }$ attacks. Specifically, on MNIST, our model achieves $5 8 . 7 \%$ (individually $6 3 . 7 \%$ , $8 2 . 6 \%$ , $6 2 . 3 \%$ adversarial accuracy against the union of all three attacks $( \ell _ { \infty } , \ell _ { 2 } , \ell _ { 1 } )$
26
+
27
+ ![](images/d1b8e0b3dac47e0af4857a63a01e0d2863aaa605b9963441982b649afb99476d.jpg)
28
+ Figure 1: (left) A depiction of the steepest descent directions for $\ell _ { \infty }$ , $\ell _ { 2 }$ , and $\ell _ { 1 }$ norms. The gradient is the black arrow, and the $\alpha$ radius step sizes and their corresponding steepest descent directions $\ell _ { \infty }$ , $\ell _ { 2 }$ , and $\ell _ { 1 }$ are shown in blue, red, and green respectively. (right) An example of the projection back to an $\ell _ { 2 }$ ball of radius $\epsilon$ after a steepest descent step from the starting perturbation $\delta$ . The steepest descent step is the black arrow, and the corresponding projection back onto the $\ell _ { 2 }$ ball is red arrow.
29
+
30
+ for $\epsilon = ( 0 . 3 , 1 . 5 , 1 2 )$ respectively, substantially improving upon the multiple-perturbation-model robustness described in Schott et al. (2019) and also improving upon the simpler aggregations of multiple adversarial attacks. Unlike past work, we also train a CIFAR10 model, which achieves $4 6 . 1 \%$ (individually $4 7 . 6 \%$ , $6 4 . 3 \%$ , $5 3 . 4 \%$ adversarial accuracy against the union of all three attacks $( \ell _ { \infty } , \ell _ { 2 } , \ell _ { 1 } )$ for $\epsilon = ( 0 . 0 3 , 0 . 5 , 1 2 )$ . Finally, for completeness, we also draw relevant comparisons to concurrent work, and show that the relative advantage of our approach still holds.
31
+
32
+ # 3 OVERVIEW OF ADVERSARIAL TRAINING
33
+
34
+ Adversarial training is an approach to learn a classifier which minimizes the worst case loss within some perturbation region (the threat model). Specifically, for some network $f _ { \theta }$ parameterized by $\theta$ , loss function $\ell$ , and training data $\{ x _ { i } , y _ { i } \} _ { i = 1 \ldots n }$ , the robust optimization problem of minimizing the worst case loss within $\ell _ { p }$ norm-bounded perturbations with radius $\epsilon$ is
35
+
36
+ $$
37
+ \operatorname* { m i n } _ { \theta } \sum _ { i } \operatorname* { m a x } _ { \delta \in \Delta _ { p , \epsilon } } \ell ( f _ { \theta } ( x _ { i } + \delta ) , y _ { i } ) ,
38
+ $$
39
+
40
+ where $\Delta _ { p , \epsilon } = \{ \delta : \| \delta \| _ { p } \leq \epsilon \}$ is the $\ell _ { p }$ ball with radius $\epsilon$ centered around the origin. To simplify the notation, we will abbreviate $\ell ( f _ { \theta } ( x + \delta ) , y ) = \ell ( x + \delta ; \theta )$ .
41
+
42
+ # 3.1 SOLVING THE INNER OPTIMIZATION PROBLEM
43
+
44
+ We first look at solving the inner maximization problem, namely
45
+
46
+ $$
47
+ \operatorname* { m a x } _ { \delta \in \Delta _ { p , \epsilon } } \ell ( x + \delta ; \theta ) .
48
+ $$
49
+
50
+ This is the problem addressed by the “attackers” in the space of adversarial examples, hoping that the classifier can be tricked by the optimal perturbed image, $x + \delta ^ { \star }$ . Typical solutions solve this problem by running a form of projected gradient descent, which iteratively takes steps in the gradient direction to increase the loss followed by a projection step back onto the feasible region, the $\ell _ { p }$ ball. Since the gradients at the example points themselves (i.e., $\delta = 0$ ) are typically too small to make efficient progress, more commonly used is a variation called projected steepest descent.
51
+
52
+ Steepest descent For some norm $\| \cdot \| _ { p }$ and step size $\alpha$ , the direction of steepest descent on the loss function $\ell$ for a perturbation $\delta$ is
53
+
54
+ $$
55
+ \boldsymbol { v } _ { p } ( \delta ) = \underset { \| \boldsymbol { v } \| _ { p } \leq \alpha } { \arg \operatorname* { m a x } } \boldsymbol { v } ^ { T } \nabla \ell ( \boldsymbol { x } + \delta ; \theta ) .
56
+ $$
57
+
58
+ Then, instead of taking gradient steps, steepest descent uses the following iteration
59
+
60
+ $$
61
+ \delta ^ { ( t + 1 ) } = \delta ^ { ( t ) } + v _ { p } ( \delta ^ { ( t ) } ) .
62
+ $$
63
+
64
+ In practice, the norm used in steepest descent is typically taken to be the same $\ell _ { p }$ norm used to define the perturbation region $\Delta _ { p , \epsilon }$ . However, depending on the norm used, the direction of steepest descent can be quite different from the actual gradient (Figure 1). Note that a single steepest descent step with respect to the $\ell _ { \infty }$ norm reduces to $\bar { v _ { \infty } ( x ) } = \alpha \cdot \bar { \mathrm { s i g n } ( \nabla \ell ( x + \delta ; \theta ) ) }$ , better known in the adversarial examples literature as the Fast Gradient Sign Method (Goodfellow et al., 2015).
65
+
66
+ Projections The second component of projected steepest descent for adversarial examples is to project iterates back onto the $\ell _ { p }$ ball around $x$ . Specifically, projected steepest descent performs the following iteration
67
+
68
+ $$
69
+ \delta ^ { ( t + 1 ) } = \mathcal { P } _ { \Delta _ { p , \epsilon } } \left( \delta ^ { ( t ) } + v _ { p } ( \delta ^ { ( t ) } ) \right)
70
+ $$
71
+
72
+ where $\mathcal { P } _ { \Delta _ { p , \epsilon } } ( \delta )$ is the standard projection operator that finds the perturbation $\delta ^ { \prime } \in \Delta _ { p , \epsilon }$ that is “closest” in Euclidean space to the input $\delta$ , defined as
73
+
74
+ $$
75
+ \begin{array} { r } { \mathcal { P } _ { \Delta _ { p , \epsilon } } ( \delta ) = \underset { \delta ^ { \prime } \in \Delta _ { p , \epsilon } } { \arg \operatorname* { m i n } } \Vert \delta - \delta ^ { \prime } \Vert _ { 2 } ^ { 2 } . } \end{array}
76
+ $$
77
+
78
+ Visually, a depiction of this procedure (steepest descent followed by a projection onto the perturbation region) for an $\ell _ { 2 }$ adversary can be found in Figure 1. If we instead project the steepest descent directions with respect to the $\ell _ { \infty }$ norm onto the $\ell _ { \infty }$ ball of allowable perturbations, the projected steepest descent iteration reduces to
79
+
80
+ $$
81
+ \begin{array} { r l } & { \delta ^ { ( t + 1 ) } = P _ { \Delta _ { \infty , \epsilon } } ( \delta ^ { ( t ) } + v _ { \infty } ( \delta ^ { ( t ) } ) ) } \\ & { \qquad = \underset { [ - \epsilon , \epsilon ] } { \mathrm { c l i p } } \left( \delta ^ { ( t ) } + \alpha \cdot \mathrm { s i g n } ( \nabla \ell ( x + \delta ^ { ( t ) } ; \theta ) ) \right) } \end{array}
82
+ $$
83
+
84
+ where $\mathrm { c l i p } _ { [ - \epsilon , + \epsilon ] }$ “clips” the input to lie within the range $[ - \epsilon , \epsilon ]$ . This is exactly the Basic Iterative Method used in Kurakin et al. (2017), typically referred to in the literature as an $\ell _ { \infty }$ PGD adversary.
85
+
86
+ # 3.2 SOLVING THE OUTER OPTIMIZATION PROBLEM
87
+
88
+ We next look at how to solve the outer optimization problem, or the problem of learning the weights $\theta$ that minimize the loss of our classifier. While many approaches have been proposed in the literature, we will focus on a heuristic called adversarial training, which has generally worked well in practice.
89
+
90
+ Adversarial training Although solving the min-max optimization problem may seem daunting, a classical result known as Danskin’s theorem (Danskin, 1967) says that the gradient of a maximization problem is equal to the gradient of the objective evaluated at the optimum. For learning models that minimize the robust optimization problem from Equation (1), this means that
91
+
92
+ $$
93
+ \nabla _ { \theta } \left( \sum _ { i } \operatorname* { m a x } _ { \delta \in \Delta _ { p , \epsilon } } \ell ( x _ { i } + \delta ; \theta ) \right) = \sum _ { i } \nabla _ { \theta } \ell ( x _ { i } + \delta ^ { * } ( x _ { i } ) ; \theta )
94
+ $$
95
+
96
+ where $\begin{array} { r } { \delta ^ { * } ( x _ { i } ) = \arg \operatorname* { m a x } _ { \delta \in \Delta _ { p , \epsilon } } \ell ( x _ { i } + \delta ; \theta ) } \end{array}$ . In other words, this means that in order to backpropagate through the robust optimization problem, we can solve the inner maximization and backpropagate through the solution. Adversarial training does this by empirically maximizing the inner problem with a PGD adversary. Note that since the inner problem is not solved exactly, Danskin’s theorem does not strictly apply. However, in practice, adversarial training does seem to provide good empirical robustness, at least when evaluated against the $\ell _ { p }$ threat model it was trained against.
97
+
98
+ # 4 ADVERSARIAL TRAINING FOR MULTIPLE PERTURBATION MODELS
99
+
100
+ We can now consider the core of this work, adversarial training procedures against multiple threat models. More formally, let $s$ represent a set of threat models, such that $p \in { \mathcal { S } }$ corresponds to the $\ell _ { p }$ perturbation model $\Delta _ { p , \epsilon }$ , and let $\begin{array} { r } { \Delta _ { \mathcal { S } } = \bigcup _ { p \in \mathcal { S } } \Delta _ { p , \epsilon } } \end{array}$ be the union of all perturbation models in $s$ Note that the $\epsilon$ chosen for each ball is not typically the same, but we still use the same notation $\epsilon$ for simplicity, since the context will always make clear which $\ell _ { p }$ -ball we are talking about. Then, the generalization of the robust optimization problem in Equation (1) to multiple perturbation models is
101
+
102
+ $$
103
+ \operatorname* { m i n } _ { \theta } \sum _ { i } \operatorname* { m a x } _ { \delta \in \Delta _ { S } } \ell ( x _ { i } + \delta ; \theta ) .
104
+ $$
105
+
106
+ The key difference is in the inner maximization, where the worst case adversarial loss is now taken over multiple $\ell _ { p }$ perturbation models. In order to perform adversarial training, using the same motivational idea from Danskin’s theorem, we can backpropagate through the inner maximization by first finding (empirically) the optimal perturbation,
107
+
108
+ $$
109
+ \delta ^ { * } = \underset { \delta \in \Delta _ { \mathscr { s } } } { \arg \operatorname* { m a x } } \ell ( \boldsymbol { x } + \boldsymbol { \delta } ; \boldsymbol { \theta } ) .
110
+ $$
111
+
112
+ To find the optimal perturbation over the union of threat models, we begin by considering straightforward generalizations of standard adversarial training, which will use PGD to approximately solve the inner maximization over multiple adversaries.
113
+
114
+ # 4.1 SIMPLE COMBINATIONS OF MULTIPLE PERTURBATIONS
115
+
116
+ First, we study two simple approaches to generalizing adversarial training to multiple threat models. These methods can perform reasonably well in practice and are competitive with existing approaches without relying on complicated architectures. While these methods work to some degree, we later find empirically that these methods do not necessarily minimize the worst-case performance, and can converge to unexpected tradeoffs between multiple threat models.
117
+
118
+ Worst-case perturbation One way to generalize adversarial training to multiple threat models is to use each threat model independently, and train on the adversarial perturbation that achieved the maximum loss. Specifically, for each adversary $p \in S$ , we solve the innermost maximization with an $\ell _ { p }$ PGD adversary to get an approximate worst-case perturbation $\delta _ { p }$ ,
119
+
120
+ $$
121
+ \delta _ { p } = \underset { \delta \in \Delta _ { p , \epsilon } } { \arg \operatorname* { m a x } } \ell ( x + \delta ; \theta ) ,
122
+ $$
123
+
124
+ and then approximate the maximum over all adversaries as
125
+
126
+ $$
127
+ \delta ^ { * } \approx \operatorname * { a r g m a x } _ { \delta _ { p } } \ell ( x + \delta _ { p } ; \theta ) .
128
+ $$
129
+
130
+ When $| S | = 1$ , then this reduces to standard adversarial training. Note that if each PGD adversary solved their subproblem from Equation (11) exactly, then this is exactly the optimal perturbation $\delta ^ { \star }$ .
131
+
132
+ PGD augmentation with all perturbations Another way to generalize adversarial training is to train on all the adversarial perturbations for all $p \in S$ to form a larger adversarial dataset. Specifically, instead of solving the robust problem for multiple adversaries in Equation (9), we instead solve
133
+
134
+ $$
135
+ \operatorname* { m i n } _ { \theta } \sum _ { i } \sum _ { p \in S } \operatorname* { m a x } _ { \delta \in \Delta _ { p , \epsilon } } \ell ( x _ { i } + \delta ; \theta )
136
+ $$
137
+
138
+ by using individual $\ell _ { p }$ PGD adversaries to approximate the inner maximization for each threat model.
139
+ Again, this reduces to standard adversarial training when $| S | = 1$ .
140
+
141
+ While these methods work reasonably well in practice (which is shown later in Section 5), both approaches solve the inner maximization problem independently for each adversary, so each individual PGD adversary is not taking advantage of the fact that the perturbation region is enlarged by other threat models. To take advantage of the full perturbation region, we propose a modification to standard adversarial training, which combines information from all considered threat models into a single PGD adversary that is potentially stronger than the combination of independent adversaries.
142
+
143
+ # 4.2 MULTI STEEPEST DESCENT
144
+
145
+ To create a PGD adversary with full knowledge of the perturbation region, we propose an algorithm that incorporates the different threat models within each step of projected steepest descent. Rather than generating adversarial examples for each threat model with separate PGD adversaries, the core idea is to create a single adversarial perturbation by simultaneously maximizing the worst case loss over all threat models at each projected steepest descent step. We call our method multi steepest descent (MSD), which can be summarized as the following iteration:
146
+
147
+ $$
148
+ \begin{array} { r l } & { \delta _ { p } ^ { ( t + 1 ) } = P _ { \Delta _ { p , \epsilon } } ( \delta ^ { ( t ) } + v _ { p } ( \delta ^ { ( t ) } ) ) \mathrm { f o r } p \in \mathcal { S } } \\ & { \delta ^ { ( t + 1 ) } = \arg \operatorname* { m a x } _ { \mathbf { \delta } } \ell ( x + \delta _ { p } ^ { ( t + 1 ) } ) } \\ & { \qquad \delta _ { p } ^ { ( t + 1 ) } } \end{array}
149
+ $$
150
+
151
+ Algorithm 1 Multi steepest descent for learning classifiers that are simultaneously robust to $\ell _ { p }$ attacks for $p \in S$
152
+
153
+ <table><tr><td>Input: classifier fe,data x,labels y Parameters: Ep,αp for p E S,maximum iterations T,loss function l 8(0)=0 fort=0...T-1do</td></tr><tr><td>for p ∈ S do s+1 = P△p,(s(t) + Up(δ(t))</td></tr><tr><td>end for</td></tr><tr><td>δ(t+1) =arg max(t+1) e(f(x +δ(t+1),y)</td></tr><tr><td>end for return 8(T)</td></tr><tr><td></td></tr></table>
154
+
155
+ The key difference here is that at each iteration of MSD, we choose a projected steepest descent direction that maximizes the loss over all attack models $p \in { \mathcal { S } }$ , whereas standard adversarial training and the simpler approaches use comparatively myopic PGD subroutines that only use one threat model at a time. The full algorithm is in Algorithm 1, and can be used as a drop in replacement for standard PGD adversaries to learn robust classifiers with adversarial training. We direct the reader to Appendix A for a complete description of steepest descent directions and projection operators for $\ell _ { \infty }$ , $\ell _ { 2 }$ , and $\ell _ { 1 }$ norms1.
156
+
157
+ # 5 RESULTS
158
+
159
+ In this section, we present experimental results on using generalizations of adversarial training to achieve simultaneous robustness to $\ell _ { \infty }$ , $\ell _ { 2 }$ , and $\ell _ { 1 }$ perturbations on the MNIST and CIFAR10 datasets. Our primary goal is to show that adversarial training can in fact be adapted to a union of perturbation models using standard architectures to achieve competitive results, without the pitfalls described by Schott et al. (2019). Our results improve upon the state-of-the-art in three key ways. First, we can use simpler, standard architectures for image classifiers, without relying on complex architectures or input binarization. Second, our method is able to learn a single MNIST model which is simultaneously robust to all three threat models, whereas previous work was only robust against two at a time. Finally, our method is easily scalable to datasets beyond MNIST, providing the first CIFAR10 model trained to be simultaneously robust against $\ell _ { \infty }$ , $\ell _ { 2 }$ , and $\ell _ { 1 }$ adversaries.
160
+
161
+ We trained models using both the simple generalizations of adversarial training to multiple adversaries and also using MSD. Since the analysis by synthesis model is not scalable to CIFAR10, we additionally trained CIFAR10 models against individual PGD adversaries to measure the changes and tradeoffs in universal robustness. We evaluated these models with a broad suite of both gradient and non-gradient based attacks using Foolbox2 (the same attacks used by Schott et al. (2019)), and also incorporated all the PGD-based adversaries discussed in this paper. All aggregate statistics that combine multiple attacks compute the worst case error rate over all attacks for each example.
162
+
163
+ Summaries of these results at specific thresholds can be found in Tables 1 and 2, where B-ABS and ABS refer to binarized and non-binarized versions of the analysis by synthesis models from Schott et al. (2019), $P _ { p }$ refers to a model trained against a PGD adversary with respect to the $p$ - norm, Worst-PGD and PGD-Aug refer to models trained using the worst-case and data augmentation generalizations of adversarial training, and MSD refers to models trained using multi steepest descent. Full tables containing the complete breakdown of these numbers over all individual attacks used in the evaluation are in Appendix C. We report the results against individual attacks and threat models for completeness, however note that the goal of all these algorithms is to minimize the robust optimization objective from Equation (9). While there may be different implicit tradeoffs between individual threat models, in the end, the most meaningful metric for measuring the effective performance is the robust optimization objective, or the performance against the union of all attacks.
164
+
165
+ Table 1: Summary of adversarial accuracy results for MNIST (higher is better)
166
+
167
+ <table><tr><td rowspan="2"></td><td colspan="6"></td><td rowspan="2">PGD Aug</td><td rowspan="2">MSD</td></tr><tr><td>P</td><td>P2</td><td>P</td><td>B-ABS4</td><td>ABS4</td><td>Worst PGD</td></tr><tr><td>Clean Accuracy</td><td>99.1%</td><td>99.4%</td><td>98.9%</td><td>99%</td><td>99%</td><td>98.9%</td><td>99.1%</td><td>98.2%</td></tr><tr><td>l attacks (∈=0.3)</td><td>90.3%</td><td>0.4%</td><td>0.0%</td><td>77%</td><td>8%</td><td>68.4%</td><td>83.7%</td><td>63.7%</td></tr><tr><td>l2 attacks (∈= 1.5)</td><td>45.3%</td><td>87.0%</td><td>70.3%</td><td>39%</td><td>80%</td><td>82.1%</td><td>75.0%</td><td>82.6%</td></tr><tr><td>l1 attacks (∈ = 12)</td><td>1.4%</td><td>43.4%</td><td>71.8%</td><td>82%</td><td>78%</td><td>54.6%</td><td>15.6%</td><td>62.3%</td></tr><tr><td> All Attacks</td><td>1.4%</td><td>0.4%</td><td>0.0%</td><td>39%</td><td>8%</td><td>53.7%</td><td>15.6%</td><td>58.7%</td></tr></table>
168
+
169
+ # 5.1 EXPERIMENTAL SETUP
170
+
171
+ Architectures and hyperparameters For MNIST, we use a four layer convolutional network with two convolutional layers consisting of 32 and $6 4 5 \times 5$ filters and 2 units of padding, followed by a fully connected layer with 1024 hidden units, where both convolutional layers are followed by $2 \times 2$ Max Pooling layers and ReLU activations (this is the same architecture used by Madry et al. (2018)). This is in contrast to past work on MNIST, which relied on per-class variational autoencoders to achieve robustness against multiple threat models (Schott et al., 2019), which was also not easily scalable to larger datasets. Since our methods have the same complexity as standard adversarial training, they also easily apply to standard CIFAR10 architectures, and in this paper we use the well known pre-activation version of the ResNet18 architecture consisting of nine residual units with two convolutional layers each (He et al., 2016).
172
+
173
+ A complete description of the hyperparameters used is in Appendix B, with hyperparameters for PGD adversaries in Appendix B.1, and hyperparameters for adversarial training in Appendix B.2. All reported $\epsilon$ are for images scaled to be between the range $[ 0 , 1 ]$ . All experiments can be run on modern GPU hardware (e.g. a single 1080ti).
174
+
175
+ Attacks used for evaluation To evaluate the model, we incorporate the attacks from Schott et al. (2019) as well as our PGD based adversaries using projected steepest descent, however we provide a short description here. Note that we exclude attacks based on gradient estimation, since the gradient for the standard architectures used here are readily available.
176
+
177
+ For $\ell _ { \infty }$ attacks, although we find the $\ell _ { \infty }$ PGD adversary to be quite effective, for completeness, we additionally use the Foolbox implementations of Fast Gradient Sign Method (Goodfellow et al., 2015), PGD adversary (Madry et al., 2018), and the Momentum Iterative Method (Dong et al., 2018).
178
+
179
+ For $\ell _ { 2 }$ attacks, in addition to the $\ell _ { 2 }$ PGD adversary, we use the Foolbox implementations of the same PGD adversary, the Gaussian noise attack (Rauber et al., 2017), the boundary attack (Brendel et al., 2017), DeepFool (Moosavi-Dezfooli et al., 2016), the pointwise attack (Schott et al., 2019), DDN based attack (Rony et al., 2018), and C&W attack (Carlini & Wagner, 2017).
180
+
181
+ For $\ell _ { 1 }$ attacks, we use both the $\ell _ { 1 }$ PGD adversary as well as additional Foolbox implementations of $\ell _ { 0 }$ attacks at the same radius, namely the salt $\&$ pepper attack (Rauber et al., 2017) and the pointwise attack (Schott et al., 2019). Note that an $\ell _ { 1 }$ adversary with radius $\epsilon$ is strictly stronger than an $\ell _ { 0 }$ adversary with the same radius, and so we choose to explicitly defend against $\ell _ { 1 }$ perturbations instead of the $\ell _ { 0 }$ perturbations considered by Schott et al. (2019).
182
+
183
+ We make 10 random restarts for each of the evaluation results mentioned hereon for both MNIST and CIFAR10 3. We encourage future work in this area to incorporate the same, since the success of all attacks, specially decision based or gradient free ones, is observed to increase significantly over restarts.
184
+
185
+ ![](images/6c80349c9d86e7301fa97302df16486d315b97b60660253e42b6ea37c40dcfa2.jpg)
186
+ Figure 2: Robustness curves showing the adversarial accuracy for the MNIST model trained with MSD, PGD-Aug, Worst-PGD against $\ell _ { \infty }$ (left), $\ell _ { 2 }$ (middle), and $\ell _ { 1 }$ (right) threat models over a range of epsilon.
187
+
188
+ Table 2: Summary of adversarial accuracy results for CIFAR10 (higher is better)
189
+
190
+ <table><tr><td></td><td>P</td><td>P2</td><td>P1</td><td>Worst-PGD</td><td>PGD-Aug</td><td>MSD</td></tr><tr><td>Clean accuracy</td><td>83.3%</td><td>90.2%</td><td>73.3%</td><td>81.0%</td><td>84.6%</td><td>81.7%</td></tr><tr><td>lo attacks (∈ = 0.03)</td><td>50.7%</td><td>28.3%</td><td>0.2%</td><td>44.9%</td><td>42.5%</td><td>47.6%</td></tr><tr><td>l2 attacks (∈ = 0.5)</td><td>57.3%</td><td>61.6%</td><td>0.0%</td><td>61.7%</td><td>65.0%</td><td>64.3%</td></tr><tr><td>l1 attacks (ε= 12)</td><td>16.0%</td><td>46.6%</td><td>7.9%</td><td>39.4%</td><td>54.0%</td><td>53.4%</td></tr><tr><td>All attacks</td><td>15.6%</td><td>27.5%</td><td>0.0%</td><td>34.9%</td><td>40.6%</td><td>46.1%</td></tr></table>
191
+
192
+ # 5.2 MNIST
193
+
194
+ We first present results on the MNIST dataset, which are summarized in Table 1 (a more detailed breakdown over each individual attack is in Appendix C.1). While considered an “easy” dataset, we note that the previous state-of-the-art result for multiple threat models on MNIST (and our primary comparison) is only able to defend against two out of three threat models at a time (Schott et al., 2019) using comparatively complex variational autoencoder architectures. The model trained with MSD achieves the best performance against all attacks, achieving an error rate of $5 8 . 7 \%$ (individually $6 3 . 7 \%$ , $8 2 . 6 \%$ , and $6 2 . { \overset { - } { 3 } } ) \%$ against the union of $( \ell _ { \infty } , \ell _ { 2 }$ , and $\ell _ { 1 }$ ) perturbations with radius $\epsilon = ( 0 . 3 ,$ , 1.5, 12). Complete robustness curves over a range of epsilons over each threat model can be found in Figure 2. A comparison of our results with concurrent work (Tramer & Boneh, 2019) can be found in \` Appendix D.
195
+
196
+ # 5.3 CIFAR10
197
+
198
+ Next, we present results on the CIFAR10 dataset, which are summarized in Table 2 (a more detailed breakdown over each individual attack is in Appendix C.2). Our MSD approach reaches the best performance against the union of attacks, and achieves $4 6 . 1 \%$ (individually $4 7 . 6 \% , 6 4 . 3 \% , 5 3 . 4 \% )$ adversarial accuracy against the union of $( \ell _ { \infty } , \ell _ { 2 } , \ell _ { 1 } )$ perturbations of size $\epsilon = ( 0 . 0 3 , 0 . 5 , 1 2 )$ . Interestingly, note that the $P _ { 1 }$ model trained against an $\ell _ { 1 }$ PGD adversary is not very robust when evaluated against other attacks, even though it can defend reasonably well against the $\ell _ { 1 }$ PGD attack in isolation (Table 4 in Appendix C.2). Complete robustness curves over a range of epsilons over each threat model can be found in Figure 3. A comparison of our results with concurrent work (Tramer & \` Boneh, 2019) can be found in Appendix D. While adversarial defenses are generally not intended to defend against attacks outside of the threat model, we show some experiments exploring this aspect in Appendix E.
199
+
200
+ ![](images/c97a82d48e4a31e818d806fdd31575b9736c7adf6ac5fe24ed06e5917fd00b2d.jpg)
201
+ Figure 3: Robustness curves showing the adversarial accuracy for the CIFAR10 model trained with MSD, PGD-Aug, Worst-PGD against $\ell _ { \infty }$ (left), $\ell _ { 2 }$ (middle), and $\ell _ { 1 }$ (right) threat models over a range of epsilon.
202
+
203
+ On tradeoffs and variability of the simpler defenses One major drawback to the simpler methods for generalizing adversarial training to multiple threat models is their variability and unclear tradeoffs over different settings. For example, on MNIST we see that the data augmentation approach fails to reduce the robust optimization objective: the $\ell _ { \infty }$ threat model dominates the training process and we get a suboptimal tradeoff between threat models which isn’t robust to the union. Similarly, on CIFAR10 we see that the worst-case approach for adversarial training also converges to a model which has suboptimal robust performance against the union of threat models. This highlights the inconsistency of the simpler generalizations of adversarial training: depending on the dataset and the threat models, they may not ultimately minimize the robust optimization objective from Equation (9), and the tradeoffs may vary significantly with the problem setting. On the other hand, in both problem settings, we find MSD is consistent at finding a more optimal tradeoff which minimizes the worst-case loss in the union of the threat models. As a result, rather than using one of the simpler methods and convergence to a potentially unclear tradeoff between threat models, we recommend using MSD which directly minimizes the worst case performance among the specified threat models.
204
+
205
+ # 6 CONCLUSION
206
+
207
+ In this paper, we showed that adversarial training can be quite effective when training against a union of multiple perturbation models. We compare two simple generalizations of adversarial training and an improved adversarial training procedure, multi steepest descent, which incorporates the different perturbation models directly into the direction of steepest descent. MSD based adversarial training procedure is able to outperform past approaches, demonstrating that adversarial training can in fact learn networks that are robust to multiple perturbation models simultaneously (as long as they are included in the threat model) while being scalable beyond MNIST and using standard architectures.
208
+
209
+ # REFERENCES
210
+
211
+ Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In Proceedings of the 35th International Conference on Machine Learning, ICML 2018, July 2018a. URL https://arxiv.org/abs/ 1802.00420.
212
+
213
+ Anish Athalye, Logan Engstrom, Andrew Ilyas, and Kevin Kwok. Synthesizing robust adversarial examples. In Jennifer Dy and Andreas Krause (eds.), Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pp. 284–293, Stockholmsmssan, Stockholm Sweden, 10–15 Jul 2018b. PMLR. URL http: //proceedings.mlr.press/v80/athalye18b.html.
214
+
215
+ Wieland Brendel, Jonas Rauber, and Matthias Bethge. Decision-based adversarial attacks: Reliable attacks against black-box machine learning models. arXiv preprint arXiv:1712.04248, 2017.
216
+
217
+ Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In Security and Privacy (SP), 2017 IEEE Symposium on, pp. 39–57. IEEE, 2017.
218
+
219
+ Pin-Yu Chen, Yash Sharma, Huan Zhang, Jinfeng Yi, and Cho-Jui Hsieh. Ead: Elastic-net attacks to deep neural networks via adversarial examples, 2017.
220
+
221
+ Francesco Croce and Matthias Hein. Provable robustness against all adversarial lp-perturbations for ${ \tt p } { \geq } 1$ . CoRR, abs/1905.11213, 2019. URL http://arxiv.org/abs/1905.11213.
222
+
223
+ John M Danskin. The theory of max-min and its application to weapons allocation problems, volume 5. Springer Science & Business Media, 1967.
224
+
225
+ Yinpeng Dong, Fangzhou Liao, Tianyu Pang, Hang Su, Jun Zhu, Xiaolin Hu, and Jianguo Li. Boosting adversarial attacks with momentum. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018.
226
+
227
+ John Duchi, Shai Shalev-Shwartz, Yoram Singer, and Tushar Chandra. Efficient projections onto the l1-ball for learning in high dimensions. In Proceedings of the 25th International Conference on Machine Learning, ICML ’08, pp. 272–279, New York, NY, USA, 2008. ACM. ISBN 978- 1-60558-205-4. doi: 10.1145/1390156.1390191. URL http://doi.acm.org/10.1145/ 1390156.1390191.
228
+
229
+ Logan Engstrom, Andrew Ilyas, and Anish Athalye. Evaluating and understanding the robustness of adversarial logit pairing. arXiv preprint arXiv:1807.10272, 2018.
230
+
231
+ Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations, 2015. URL http:// arxiv.org/abs/1412.6572.
232
+
233
+ Sven Gowal, Krishnamurthy Dvijotham, Robert Stanforth, Rudy Bunel, Chongli Qin, Jonathan Uesato, Relja Arandjelovic, Timothy A. Mann, and Pushmeet Kohli. On the effectiveness of interval bound propagation for training verifiably robust models. CoRR, abs/1810.12715, 2018. URL http://arxiv.org/abs/1810.12715.
234
+
235
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European conference on computer vision, pp. 630–645. Springer, 2016.
236
+
237
+ Daniel Kang, Yi Sun, Tom Brown, Dan Hendrycks, and Jacob Steinhardt. Transfer of adversarial robustness between perturbation types. arXiv preprint arXiv:1905.01034, 2019.
238
+
239
+ Harini Kannan, Alexey Kurakin, and Ian J. Goodfellow. Adversarial logit pairing. CoRR, abs/1803.06373, 2018. URL http://arxiv.org/abs/1803.06373.
240
+
241
+ Guy Katz, Clark Barrett, David Dill, Kyle Julian, and Mykel Kochenderfer. Reluplex: An efficient smt solver for verifying deep neural networks. arXiv preprint arXiv:1702.01135, 2017.
242
+
243
+ Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. ICLR Workshop, 2017. URL https://arxiv.org/abs/1607.02533.
244
+
245
+ Jiajun Lu, Hussein Sibai, Evan Fabry, and David Forsyth. No need to worry about adversarial examples in object detection in autonomous vehicles. arXiv preprint arXiv:1707.03501, 2017.
246
+
247
+ Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id $=$ rJzIBfZAb.
248
+
249
+ Matthew Mirman, Timon Gehr, and Martin Vechev. Differentiable abstract interpretation for provably robust neural networks. In International Conference on Machine Learning (ICML), 2018. URL https://www.icml.cc/Conferences/2018/Schedule?showEvent $= 2 4 7 7$ .
250
+
251
+ Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: a simple and accurate method to fool deep neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2574–2582, 2016.
252
+
253
+ Marius Mosbach, Maksym Andriushchenko, Thomas Trost, Matthias Hein, and Dietrich Klakow. Logit pairing methods can fool gradient-based attacks. arXiv preprint arXiv:1810.12042, 2018.
254
+
255
+ Nicolas Papernot, Patrick McDaniel, Xi Wu, Somesh Jha, and Ananthram Swami. Distillation as a defense to adversarial perturbations against deep neural networks. In Security and Privacy (SP), 2016 IEEE Symposium on, pp. 582–597. IEEE, 2016.
256
+
257
+ Nicolas Papernot, Patrick McDaniel, Ian Goodfellow, Somesh Jha, Z. Berkay Celik, and Ananthram Swami. Practical black-box attacks against machine learning. In Proceedings of the 2017 ACM on Asia Conference on Computer and Communications Security, ASIA CCS ’17, pp. 506–519, New York, NY, USA, 2017. ACM. ISBN 978-1-4503-4944-4. doi: 10.1145/3052973.3053009. URL http://doi.acm.org/10.1145/3052973.3053009.
258
+
259
+ Aditi Raghunathan, Jacob Steinhardt, and Percy Liang. Certified defenses against adversarial examples. In International Conference on Learning Representations, 2018a. URL https: //openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ Bys4ob-Rb.
260
+
261
+ Aditi Raghunathan, Jacob Steinhardt, and Percy S Liang. Semidefinite relaxations for certifying robustness to adversarial examples. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 10900–10910. Curran Associates, Inc., 2018b. URL http://papers.nips.cc/paper/8285-semidefinite-relaxations-forcertifying-robustness-to-adversarial-examples.pdf.
262
+
263
+ Jonas Rauber, Wieland Brendel, and Matthias Bethge. Foolbox: A python toolbox to benchmark the robustness of machine learning models. arXiv preprint arXiv:1707.04131, 2017. URL http://arxiv.org/abs/1707.04131.
264
+
265
+ Jer´ ome Rony, Luiz G. Hafemann, Luiz S. Oliveira, Ismail Ben Ayed, Robert Sabourin, and Eric ˆ Granger. Decoupling direction and norm for efficient gradient-based L2 adversarial attacks and defenses. CoRR, abs/1811.09600, 2018. URL http://arxiv.org/abs/1811.09600.
266
+
267
+ Lukas Schott, Jonas Rauber, Matthias Bethge, and Wieland Brendel. Towards the first adversarially robust neural network model on MNIST. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id ${ . } =$ S1EHOsC9tX.
268
+
269
+ Leslie N Smith. A disciplined approach to neural network hyper-parameters: Part 1–learning rate, batch size, momentum, and weight decay. arXiv preprint arXiv:1803.09820, 2018.
270
+
271
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In International Conference on Learning Representations, 2014. URL http://arxiv.org/abs/1312.6199.
272
+
273
+ Vincent Tjeng, Kai Y. Xiao, and Russ Tedrake. Evaluating robustness of neural networks with mixed integer programming. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ HyGIdiRqtm.
274
+
275
+ Florian Tramer and Dan Boneh. Adversarial training and robustness for multiple perturbations. \` arXiv preprint arXiv:1904.13000, 2019.
276
+
277
+ Jonathan Uesato, Brendan O’Donoghue, Pushmeet Kohli, and Aaron van den Oord. Adversarial risk and the dangers of evaluating against weak attacks. In Jennifer Dy and Andreas Krause (eds.), Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pp. 5025–5034, Stockholmsmssan, Stockholm Sweden, 10–15 Jul 2018. PMLR. URL http://proceedings.mlr.press/v80/uesato18a.html.
278
+
279
+ Eric Wong and Zico Kolter. Provable defenses against adversarial examples via the convex outer adversarial polytope. In International Conference on Machine Learning, pp. 5283–5292, 2018.
280
+
281
+ Eric Wong, Frank Schmidt, Jan Hendrik Metzen, and J. Zico Kolter. Scaling provable adversarial defenses. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 8410–8419. Curran Associates, Inc., 2018. URL http://papers.nips.cc/paper/8060-scaling-provableadversarial-defenses.pdf.
282
+
283
+ Algorithm 2 Projection of some perturbation $\delta \in \mathbb { R } ^ { n }$ onto the $\ell _ { 1 }$ ball with radius . We use $| \cdot |$ to denote element-wise absolute value.
284
+
285
+ <table><tr><td>Input:perturbation δ,radius ∈ Sort |δ| into γ : γ1 ≥ γ2 ≥·.: ≥ γn</td></tr><tr><td>ρ:=max{j∈[n]:γi-³(∑²=1r-e)&gt;0}</td></tr><tr><td>n:=¹(∑²=1γi-∈)</td></tr><tr><td>zi := sign(δi)max{γi-n,O} for i=1...n</td></tr><tr><td>return z</td></tr></table>
286
+
287
+ # A STEEPEST DESCENT AND PROJECTIONS FOR $\ell _ { \infty }$ , $\ell _ { 2 }$ , AND $\ell _ { 1 }$ ADVERSARIES
288
+
289
+ In this section, we show what the steepest descent and projection steps are for $\ell _ { p }$ adversaries for $p \in \{ \infty , 2 , 1 \}$ ; these are standard results, but included for a complete description of the algorithms. Note that this differs slightly from the adversaries considered in Schott et al. (2019): while they used an $\ell _ { 0 }$ adversary, we opted to use an $\ell _ { 1 }$ adversary with the same radius. The $\ell _ { 0 }$ ball with radius $\epsilon$ is contained within an $\ell _ { 1 }$ ball with the same radius, so achieving robustness against an $\ell _ { 1 }$ adversary is strictly more difficult.
290
+
291
+ $\ell _ { \infty }$ space The direction of steepest descent with respect to the $\ell _ { \infty }$ norm is
292
+
293
+ $$
294
+ v _ { \infty } ( \delta ) = \alpha \cdot \mathrm { s i g n } ( \nabla l ( x + \delta ; \theta ) )
295
+ $$
296
+
297
+ and the projection operator onto $\Delta _ { \infty , \epsilon }$ is
298
+
299
+ $$
300
+ \mathcal { P } _ { \Delta _ { \infty , \epsilon } } ( \delta ) = \mathrm { c l i p } _ { [ - \epsilon , \epsilon ] } ( \delta )
301
+ $$
302
+
303
+ $\ell _ { 2 }$ space The direction of steepest descent with respect to the $\ell _ { 2 }$ norm is
304
+
305
+ $$
306
+ v _ { 2 } ( \delta ) = \alpha \cdot \frac { \nabla \ell ( x + \delta ; \theta ) } { \| \nabla \ell ( x + \delta ; \theta ) \| _ { 2 } }
307
+ $$
308
+
309
+ and the projection operator onto the $\ell _ { 2 }$ ball around $x$ is
310
+
311
+ $$
312
+ \mathcal { P } _ { \Delta _ { 2 , \epsilon } } ( \delta ) = \epsilon \cdot \frac { \delta } { \operatorname* { m a x } \{ \epsilon , \| \delta \| _ { 2 } \} }
313
+ $$
314
+
315
+ $\ell _ { 1 }$ space The direction of steepest descent with respect to the $\ell _ { 1 }$ norm is
316
+
317
+ $$
318
+ v _ { 1 } ( \delta ) = \alpha \cdot \mathrm { s i g n } \left( \frac { \partial \ell ( x + \delta ; \theta ) } { \partial \delta _ { i ^ { \star } } } \right) \cdot e _ { i ^ { \star } }
319
+ $$
320
+
321
+ where
322
+
323
+ $$
324
+ \boldsymbol { i } ^ { \star } = \arg \operatorname* { m a x } _ { i } | \nabla l ( \boldsymbol { x } + \boldsymbol { \delta } ; \boldsymbol { \theta } ) _ { i } |
325
+ $$
326
+
327
+ and $e _ { i ^ { * } }$ is a unit vector with a one in position $i ^ { * }$ . Finally, the projection operator onto the $\ell _ { 1 }$ ball,
328
+
329
+ $$
330
+ \mathcal { P } _ { \Delta _ { 1 , \epsilon } } ( \delta ) = \underset { \delta ^ { \prime } : \| \delta ^ { \prime } \| _ { 1 } \le \epsilon } { \arg \operatorname* { m i n } } \| \delta - \delta ^ { \prime } \| _ { 2 } ^ { 2 } ,
331
+ $$
332
+
333
+ can be solved with Algorithm 2, and we refer the reader to Duchi et al. (2008) for its derivation.
334
+
335
+ # A.1 ENHANCED $\ell _ { 1 }$ STEEPEST DESCENT STEP
336
+
337
+ Note that the steepest descent step for $\ell _ { 1 }$ only updates a single coordinate per step. This can be quite inefficient, as pointed out by Tramer & Boneh (2019). To tackle this issue, and also empirically \` improve the attack success rate, Tramer & Boneh (2019) instead select the top \` $k$ coordinates according to Equation 20 to update. In this work, we adopt a similar but slightly modified scheme: we randomly sample $k$ to be some integer within some range $[ k _ { 1 } , k _ { 2 } ]$ , and update each coordinate with step size $\alpha ^ { \prime } \bar { = } \alpha / k$ . We find that the randomness induced by varying the number of coordinates aids in avoiding the gradient masking problem observed by Tramer & Boneh (2019). \`
338
+
339
+ # A.2 RESTRICTING THE STEEPEST DESCENT COORDINATE
340
+
341
+ The steepest descent direction for both the $\ell _ { 0 }$ and $\ell _ { 1 }$ norm end up selecting a single coordinate direction to move the perturbation. However, if the perturbation is already at the boundary of pixel space (for MNIST, this is the range [0,1] for each pixel), then it’s possible for the PGD adversary to get stuck in a loop trying to use the same descent direction to escape pixel space. To avoid this, we only allow the steepest descent directions for these two attacks to choose coordinates that keep the image in the range of real pixels.
342
+
343
+ # B EXPERIMENTAL DETAILS
344
+
345
+ # B.1 HYPERPARAMETERS FOR PGD ADVERSARIES
346
+
347
+ In this section, we describe the parameters used for all PGD adversaries in this paper.
348
+
349
+ MNIST The $\ell _ { \infty }$ adversary used a step size $\alpha = 0 . 0 1$ within a radius of $\epsilon = 0 . 3$ for 50 iterations.
350
+
351
+ The $\ell _ { 2 }$ adversary used a step size $\alpha = 0 . 1$ within a radius of $\epsilon = 1 . 5$ for 100 iterations.
352
+
353
+ The $\ell _ { 1 }$ adversary used a step size of $\alpha = 0 . 0 5$ within a radius of $\epsilon = 1 2$ for 50 iterations. By default the attack is run with two restarts, once starting with $\delta = 0$ and once by randomly initializing $\delta$ in the allowable perturbation ball. $k _ { 1 } = 5$ , $k _ { 2 } = 2 0$ as described in A.1.
354
+
355
+ The MSD adversary used step sizes of $\alpha = ( 0 . 0 1 , 0 . 2 , 0 . 0 5 )$ for the $( \ell _ { \infty } , \ell _ { 2 } , \ell _ { 1 } )$ directions within a radius of $\epsilon = ( 0 . 3 , 1 . 5 , 1 2 )$ for 100 iterations.
356
+
357
+ At test time, we increase the number of iterations to (100, 200, 100) for $( \ell _ { \infty } , \ell _ { 2 } , \ell _ { 1 } )$ .
358
+
359
+ CIFAR10 The $\ell _ { \infty }$ adversary used a step size $\alpha = 0 . 0 0 3$ within a radius of $\epsilon = 0 . 0 3$ for 40 iterations.
360
+
361
+ The $\ell _ { 2 }$ adversary used a step size $\alpha = 0 . 0 5$ within a radius of $\epsilon = 0 . 5$ for 50 iterations.
362
+
363
+ The $\ell _ { 1 }$ adversary used a step size $\alpha = 0 . 1$ within a radius of $\epsilon = 1 2$ for 50 iterations. $k _ { 1 } = 5$ , $k _ { 2 } = 2 0$ as described in A.1.
364
+
365
+ The MSD adversary used step sizes of $\alpha = ( 0 . 0 0 3 , 0 . 0 5 , 0 . 0 5 )$ for the $( \ell _ { \infty } , \ell _ { 2 } , \ell _ { 1 } )$ directions within a radius of $\epsilon = ( 0 . 0 3 , 0 . 3 , 1 2 )$ for 50 iterations. Note that the MSD model trained for $\ell _ { 2 }$ radius of 0.3 is in fact robust to a higher radius of 0.5.
366
+
367
+ # B.2 TRAINING HYPERPARAMETERS
368
+
369
+ In this section, we describe the parameters used for adversarial training. For all the models, we used the SGD optimizer with momentum 0.9 and weight decay $5 \cdot 1 0 ^ { - 4 } $ .
370
+
371
+ MNIST We train the models to a maximum of 20 epochs. We used a variation of the learning rate schedule from Smith (2018), which is piecewise linear from 0 to 0.1 over the first 7 epochs, down to 0.001 over the next 8 epochs, and finally back down to 0.0001 in the last 5 epochs.
372
+
373
+ CIFAR10 We used a variation of the learning rate schedule from Smith (2018) to achieve superconvergence in 50 epochs, which is piecewise linear from 0 to 0.1 over the first 20 epochs, down to 0.005 over the next 20 epochs, and finally back down to 0 in the last 10 epochs.
374
+
375
+ # C EXTENDED RESULTS
376
+
377
+ Here, we show the full tables which break down the overall adversarial error rates over individual attacks for both MNIST and CIFAR10, along with robustness curves for all models in the paper.
378
+
379
+ Table 3: Summary of adversarial accuracy results for MNIST
380
+
381
+ <table><tr><td rowspan="2"></td><td colspan="5"></td><td rowspan="2">Worst</td><td colspan="2">PGD</td></tr><tr><td>P</td><td>P2</td><td>P1</td><td>B-ABS</td><td>ABS PGD</td><td>Aug</td><td>MSD</td></tr><tr><td>Clean Accuracy</td><td>99.1%</td><td>99.4%</td><td>98.9%</td><td>99%</td><td>99%</td><td>98.9%</td><td>99.1%</td><td>98.2%</td></tr><tr><td>PGD-lo</td><td>90.3%</td><td>0.4%</td><td>0.0%</td><td>1</td><td>1</td><td>68.4%</td><td>83.7%</td><td>63.7%</td></tr><tr><td>FGSM</td><td>94.9%</td><td>68.6%</td><td>6.4%</td><td>85%</td><td>34%</td><td>82.4%</td><td>90.9%</td><td>81.8%</td></tr><tr><td>PGD-Foolbox</td><td>92.1%</td><td>8.5%</td><td>0.1%</td><td>86%</td><td>13%</td><td>72.1%</td><td>85.7%</td><td>67.9%</td></tr><tr><td>MIM</td><td>92.3%</td><td>14.5%</td><td>0.1%</td><td>85%</td><td>17%</td><td>73.9%</td><td>87.3%</td><td>71.0%</td></tr><tr><td>l attacks (∈ = 0.3)</td><td>90.3%</td><td>0.4%</td><td>0.0%</td><td>77%</td><td>8%</td><td>68.4%</td><td>83.7%</td><td>63.7%</td></tr><tr><td>PGD-l2</td><td>83.8%</td><td>87.0%</td><td>70.8%</td><td>1</td><td>-</td><td>85.3%</td><td>87.9%</td><td>84.2%</td></tr><tr><td>PGD-Foolbox</td><td>93.4%</td><td>89.7%</td><td>74.4%</td><td>63%</td><td>87%</td><td>86.9%</td><td>91.5%</td><td>86.9%</td></tr><tr><td>Gaussian Noise</td><td>98.9%</td><td>99.6%</td><td>98.0%</td><td>89%</td><td>98%</td><td>97.4%</td><td>99.0%</td><td>97.8%</td></tr><tr><td>Boundary Attack</td><td>52.6%</td><td>92.1%</td><td>83.0%</td><td>91%</td><td>83%</td><td>86.9%</td><td>79.1%</td><td>88.6%</td></tr><tr><td>DeepFool</td><td>95.1%</td><td>92.2%</td><td>76.5%</td><td>41%</td><td>83%</td><td>87.9%</td><td>93.5%</td><td>87.9%</td></tr><tr><td>Pointwise Attack</td><td>74.3%</td><td>97.4%</td><td>96.6%</td><td>87%</td><td>94%</td><td>92.7%</td><td>89.0%</td><td>95.1%</td></tr><tr><td>DDN</td><td>82.7%</td><td>87.0%</td><td>70.8%</td><td>-</td><td></td><td>85.1%</td><td>85.2%</td><td>84.3%</td></tr><tr><td>CWL2</td><td>88.2%</td><td>88.1%</td><td>75.5%</td><td>1</td><td>=</td><td>85.2%</td><td>87.5%</td><td>85.1%</td></tr><tr><td>l2 attacks (∈ = 1.5)</td><td>45.3%</td><td>87.0%</td><td>70.3%</td><td>39%</td><td>80%</td><td>82.1%</td><td>75.0%</td><td>82.6%</td></tr><tr><td>PGD-l1</td><td>51.8%</td><td>49.9%</td><td>71.8%</td><td>1</td><td>1</td><td>66.5%</td><td>57.4%</td><td>64.8%</td></tr><tr><td>Salt &amp; Pepper</td><td>55.5%</td><td>96.3%</td><td>95.6%</td><td>96%</td><td>95%</td><td>86.4%</td><td>71.9%</td><td>92.2%</td></tr><tr><td>Pointwise Attack</td><td>2.4%</td><td>66.4%</td><td>85.2%</td><td>82%</td><td>78%</td><td>60.1%</td><td>17.1%</td><td>72.8%</td></tr><tr><td>l1 attacks (∈ =12)</td><td>1.4%</td><td>43.4%</td><td>71.8%</td><td>82%</td><td>78%</td><td>54.6%</td><td>15.6%</td><td>62.3%</td></tr><tr><td>All attacks</td><td>1.4%</td><td>0.4%</td><td>0.0%</td><td>39%</td><td>8%</td><td>53.7%</td><td>15.6%</td><td>58.7%</td></tr></table>
382
+
383
+ # C.1 MNIST RESULTS
384
+
385
+ Expanded table of results Table 3 contains the full table of results for all attacks on all models on the MNIST dataset. All attacks were run on a subset of the first 1000 test examples with 10 random restarts, with the exception of Boundary Attack, which by default makes 25 trials per iteration, and DDN attack, which does not benefit from restarts owing to a deterministic starting point. Note that the results for B-ABS and ABS models are from Schott et al. (2019), which uses gradient estimation techniques whenever a gradient is needed, and the robustness against all attacks for B-ABS and ABS is an upper bound based on the reported results. Further, these models are not evaluated with restarts, pushing the reported results even higher than actual.
386
+
387
+ # C.2 CIFAR10 RESULTS
388
+
389
+ Expanded table of results Table 4 contains the full table of results for all attacks on all models on the CIFAR10 dataset. All attacks were run on a subset of the first 1000 test examples with 10 random restarts, with the exception of Boundary Attack, which by default makes 25 trials per iteration, and DDN attack, which does not benefit from restarts owing to a deterministic starting point. Further note that salt $\&$ pepper and pointwise attacks in the $\ell _ { 1 }$ section are technically $\ell _ { 0 }$ attacks, but produce perturbations in the $\ell _ { 1 }$ ball. Finally, it is clear here that while the training against an $\ell _ { 1 }$ PGD adversary defends against said PGD adversary, it does not seem to transfer to robustness against other attacks.
390
+
391
+ # D COMPARISON WITH CONCURRENT WORK
392
+
393
+ In this section we compare the results of our trained MSD model with that of Tramer & Boneh (2019), \` who study the theoretical and empirical trade-offs of adversarial robustness in various settings when defending against multiple adversaries. Training methods presented by them in their comparisons, namely $A d v _ { a v g }$ and $A d v _ { m a x }$ closely resemble the naive approaches discussed in this paper: PGDAug and Worst-PGD respectively. We use the results as is from their work, and additionally compare the position of our MSD models at the revised thresholds used by Tramer & Boneh (2019) without \` specially retraining them.
394
+
395
+ The results of Tables 5 and 6 show that the relative advantage of MSD over naive techniques does hold up. While we do make a comparison to the most relevant concurrent work for completeness, the following differences can bias the robust accuracies reported for the MSD models to relatively lower than expected (and correspondingly, the robust accuracies reported for the other models are relatively higher than expected):
396
+
397
+ Table 4: Summary of adversarial accuracy results for CIFAR10
398
+
399
+ <table><tr><td></td><td>P</td><td>P2</td><td>P1</td><td>Worst-PGD</td><td>PGD-Aug</td><td>MSD</td></tr><tr><td>Cleanaccuracy</td><td>83.3%</td><td>90.2%</td><td>73.3%</td><td>81.0%</td><td>84.6%</td><td>81.7%</td></tr><tr><td>PGD-lo</td><td>50.3%</td><td>48.4%</td><td>29.8%</td><td>44.9%</td><td>42.8%</td><td>49.8%</td></tr><tr><td rowspan="3">FGSM PGD-Foolbox</td><td>57.4%</td><td>43.4%</td><td>12.7%</td><td>54.9%</td><td>51.9%</td><td>55.0%</td></tr><tr><td>52.3%</td><td>28.5%</td><td>0.6%</td><td>48.9%</td><td>44.6%</td><td>49.8%</td></tr><tr><td>52.7%</td><td>30.4%</td><td>0.7%</td><td>49.9%</td><td>46.1%</td><td>50.6%</td></tr><tr><td>loo attacks (∈ = 0.03)</td><td>50.7%</td><td>28.3%</td><td>0.2%</td><td>44.9%</td><td>42.5%</td><td>47.6%</td></tr><tr><td rowspan="8">PGD-l2 PGD-Foolbox Gaussian Noise Boundary Attack</td><td>59.0%</td><td>62.1%</td><td>28.9%</td><td>64.1%</td><td>66.9%</td><td>66.0%</td></tr><tr><td>61.6%</td><td>64.1%</td><td>4.9%</td><td>65.0%</td><td>68.0%</td><td>66.4%</td></tr><tr><td>82.2%</td><td>89.8%</td><td>62.3%</td><td>81.3%</td><td>84.3%</td><td>81.8%</td></tr><tr><td>65.5%</td><td>67.9%</td><td>2.3%</td><td>64.4%</td><td>69.2%</td><td>67.9%</td></tr><tr><td>62.2% Pointwise Attack</td><td>67.3%</td><td>0.9%</td><td>64.4%</td><td>67.4%</td><td>65.7%</td></tr><tr><td>80.4%</td><td>88.6%</td><td>46.2%</td><td>78.9%</td><td>83.8%</td><td>81.4%</td></tr><tr><td>60.0%</td><td>63.5%</td><td>0.1%</td><td>64.5%</td><td>67.7%</td><td>66.2%</td></tr><tr><td>62.0%</td><td>71.6%</td><td>0.1%</td><td>66.9%</td><td>71.5%</td><td>68.7%</td></tr><tr><td>l2 attacks (∈ = 0.05)</td><td>57.3%</td><td>61.6%</td><td>0.0%</td><td>61.7%</td><td>65.0%</td><td>64.3%</td></tr><tr><td>PGD-l1</td><td>16.5%</td><td>49.2%</td><td>69.1%</td><td>39.5%</td><td>54.0%</td><td>53.4%</td></tr><tr><td>Salt &amp; Pepper</td><td>63.4%</td><td>74.2%</td><td>35.5%</td><td>75.2%</td><td>80.7%</td><td>75.6%</td></tr><tr><td>Pointwise Attack</td><td>49.6%</td><td>62.4%</td><td>8.4%</td><td>63.3%</td><td>77.0%</td><td>72.8%</td></tr><tr><td>l1 attacks (∈=12)</td><td>16.0%</td><td>46.6%</td><td>7.9%</td><td>39.4%</td><td>54.0%</td><td>53.4%</td></tr><tr><td>All attacks</td><td>15.6%</td><td>27.5%</td><td>0.0%</td><td>34.9%</td><td>40.6%</td><td>46.1%</td></tr></table>
400
+
401
+ Table 5: Comparison with contemporary work on MNIST (higher is better). Results for all models except MSD are taken as is from Tramer & Boneh (2019) \`
402
+
403
+ <table><tr><td></td><td>Vanilla</td><td>Advo</td><td>AdU1</td><td>Adu2</td><td>Advaug</td><td>Adumax</td><td>MSD</td></tr><tr><td>Clean accuracy</td><td>99.4%</td><td>99.1%</td><td>98.9%</td><td>98.5%</td><td>97.3%</td><td>97.2%</td><td>98.2%</td></tr><tr><td>loo attacks (∈= 0.3)</td><td>0.0%</td><td>91.1%</td><td>0.0%</td><td>0.4%</td><td>76.7%</td><td>71.7%</td><td>63.7%</td></tr><tr><td>l2 attacks (∈= 2.0)</td><td>12.4%</td><td>12.1%</td><td>50.6%</td><td>71.8%</td><td>58.3%</td><td>56.0%</td><td>67.4%</td></tr><tr><td>l1 attacks (ε = 10)</td><td>8.5%</td><td>11.3%</td><td>78.5%</td><td>68.0%</td><td>53.9%</td><td>62.6%</td><td>70.0%</td></tr><tr><td>All attacks</td><td>0.0%</td><td>6.8%</td><td>0.0%</td><td>0.4%</td><td>49.9%</td><td>52.4%</td><td>60.9%</td></tr></table>
404
+
405
+ 1. Use of random restarts: We observe in our experiments that using up to 10 restarts for all our attacks leads to a decrease in model accuracy from 5 to $10 \%$ across all models. Tramer & \` Boneh do not mention restarting their attacks for these models and so the results for models apart from MSD in Tables 5, 6 could potentially be lowered with random restarts.
406
+ 2. Different training and testing thresholds: The MSD model for the MNIST dataset was trained at $\epsilon = ( 0 . 3 , 1 . 5 , 1 2 )$ for the $\ell _ { \infty }$ , $\ell _ { 2 }$ , $\ell _ { 1 }$ perturbation balls respectively, while Tramer\` & Boneh (2019) tested at $\epsilon = ( 0 . 3 , 2 . 0 , 1 0 )$ . This may lower the robust accuracy at these thresholds for the MSD model, since it was not trained for that particular threshold. Likewise, the MSD model for CIFAR10 was also trained at $\epsilon = ( 0 . 0 3 , 0 . 0 5 , 1 2 )$ for the $\ell _ { \infty }$ , $\ell _ { 2 } , \ell _ { 1 }$ perturbation balls respectively, while Tramer & Boneh (2019) tested at \` $\begin{array} { r } { \epsilon = ( \frac { 4 } { 2 5 5 } , 0 , \frac { 2 0 0 0 } { 2 5 5 } ) } \end{array}$ 2000255 ).
407
+ 3. Different perturbation models: For the CIFAR10 results in Table 6, $A d v _ { a v g }$ & $A d v _ { m a x }$ models are trained and tested only for $\ell _ { 1 }$ and $\ell _ { \infty }$ adversarial perturbations, whereas the MSD model is robust to the union of $\ell _ { 1 } , \ell _ { 2 }$ and $\ell _ { \infty }$ , achieving a much harder task.
408
+ 4. Larger Suite of Attacks Used: The attacks used by Tramer & Boneh are PGD, EAD \` (Chen et al., 2017) and Pointwise Attack (Schott et al., 2019) for $\ell _ { 1 }$ ; PGD, C&W (Carlini & Wagner, 2017) and Boundary Attack (Brendel et al., 2017) for $\ell _ { 2 }$ ; and PGD for $\ell _ { \infty }$ adversaries. We use a more expansive suite of attacks as shown in Appendix C. Some of the attacks like DDN, which proved to be strong adversaries in most cases, were not considered
409
+
410
+ Table 6: Comparison with contemporary work on CIFAR10 (higher is better). Results for all models except MSD are taken as is from Tramer & Boneh (2019) \`
411
+
412
+ <table><tr><td></td><td>Vanilla</td><td>Advo</td><td>AdU1</td><td>Advavg</td><td>Advmax</td><td>MSD</td></tr><tr><td>Clean accuracy</td><td>95.7%</td><td>92.0%</td><td>90.8%</td><td>91.1%</td><td>91.2%</td><td>82.1%</td></tr><tr><td>loattacks(∈= 288 4</td><td>0.0%</td><td>71.0%</td><td>53.4%</td><td>64.1%</td><td>65.7%</td><td>65.6%</td></tr><tr><td>l1 attacks (ε = 255 All attacks</td><td>0.0% 0.0%</td><td>16.4% 16.4%</td><td>66.2% 53.1%</td><td>60.8% 59.4%</td><td>62.5% 61.1%</td><td>62.0% 61.7%</td></tr></table>
413
+
414
+ Table 7: Performance on CIFAR-10-C
415
+
416
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Accuracy</td></tr><tr><td rowspan=1 colspan=1>Standard model</td><td rowspan=1 colspan=1>66.0%</td></tr><tr><td rowspan=1 colspan=1>PP2P1</td><td rowspan=1 colspan=1>75.0%82.7%57.8%</td></tr><tr><td rowspan=1 colspan=1>Worst-PGDPGD-AugMSD</td><td rowspan=1 colspan=1>70.8%76.8%74.2%</td></tr></table>
417
+
418
+ by Tramer & Boneh (2019) and thus were only used to attack the MSD models in Tables 5 \` and 6.
419
+
420
+ # E ATTACKS OUTSIDE THE THREAT MODEL
421
+
422
+ In this section, we present some additional experiments exploring the performance of our model on attacks which lie beyond the threat model. Note that there is no principled reason why we would believe this to be the case (as most adversarial defenses tend to not generalize beyond the threat model defended against), and this is presented for exploratory reasons.
423
+
424
+ Common corruptions We measure the performance of all the models on CIFAR-10-C, which is a CIFAR10 benchmark which has had common corruptions applied to it (e.g. noise, blur, and compression). We report the results in Table 7. We find that that, apart from the $P _ { 1 }$ model, the rest achieve some improved robustness against these common corruptions above the standard CIFAR10 model.
425
+
426
+ Defending against $\ell _ { 1 }$ and $\ell _ { \infty }$ and evaluating on $\ell _ { 2 }$ We also briefly study what happens when one trains against $\ell _ { 1 }$ and $\ell _ { \infty }$ threat models, while evaluating against the $\ell _ { 2 }$ adversary. Specifically, we take the MSD approach on MNIST and simply remove the $\ell _ { 2 }$ adversary from the threat model. This results in a model which has its $\ell _ { 1 }$ and $\ell _ { \infty }$ robust performance against a PGD adversary drop by $1 \%$ and its $\ell _ { 2 }$ robust performance against a PGD adversary (which it was not trained for) drops by $2 \%$ in comparison to the original MSD approach on all three threat models.
427
+
428
+ As a result, we empirically observe that including the $\ell _ { 2 }$ threat model in this setting actually improved overall robustness against all three threat models. Unsurprisingly, the $\ell _ { 2 }$ performance drops to some degree, but the model does not lose all of its robustness.
parse/train/rklMnyBtPB/rklMnyBtPB_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rklMnyBtPB/rklMnyBtPB_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rklMnyBtPB/rklMnyBtPB_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/u8X280hw1Mt/u8X280hw1Mt.md ADDED
@@ -0,0 +1,379 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # EQCO: EQUIVALENT RULES FOR SELF-SUPERVISED CONTRASTIVE LEARNING
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ In this paper, we propose a method, named EqCo (Equivalent Rules for Contrastive Learning), to make self-supervised learning irrelevant to the number of negative samples in the contrastive learning framework. Inspired by the InfoMax principle, we point that the margin term in contrastive loss needs to be adaptively scaled according to the number of negative pairs in order to keep steady mutual information bound and gradient magnitude. EqCo bridges the performance gap among a wide range of negative sample sizes, so that we can use only a few negative pairs (e.g. 16 per query) to perform self-supervised contrastive training on large-scale vision datasets like ImageNet, while with almost no accuracy drop. This is quite a contrast to the widely used large batch training or memory bank mechanism in current practices. Equipped with EqCo, our simplified MoCo (SiMo) achieves comparable accuracy with MoCo v2 on ImageNet (linear evaluation protocol) while only involves 16 negative pairs per query instead of 65536, suggesting that large quantities of negative samples might not be a critical factor in contrastive learning frameworks.
8
+
9
+ # 1 INTRODUCTION AND BACKGROUND
10
+
11
+ Self-supervised learning has recently received much attention in the field of visual representation learning (Hadsell et al. (2006); Dosovitskiy et al. (2014); Oord et al. (2018); Bachman et al. (2019); Henaff et al. (2019); Wu et al. (2018); Tian et al. (2019); He et al. (2020); Misra & Maaten (2020); ´ Grill et al. (2020); Cao et al. (2020); Tian et al. (2020)), as its potential to learn universal representations from unlabeled data. Among various self-supervised methods, one of the most promising research paths is contrastive learning (Oord et al. (2018)), which has been demonstrated to achieve comparable or even better performances than supervised training for many downstream tasks such as image classification, object detection, and semantic segmentation (Chen et al., $2 0 2 0 \mathrm { c }$ ; He et al., 2020; Chen et al., 2020a;b).
12
+
13
+ The core idea of contrastive learning is briefly summarized as follows: first, extracting a pair of embedding vectors $( \mathbf { q } ( I ) , \mathbf { k } ( I ) )$ (named query and key respectively) from the two augmented views of each instance $I$ ; then, learning to maximize the similarity of each positive pair $( \mathbf { q } ( I ) , \mathbf { k } ( I ) )$ while pushing the negative pairs $( \mathbf { q } ( I ) , \mathbf { k } ( I ^ { \prime } ) )$ (i.e., query and key extracted from different instances accordingly) away from each other. To learn the representation, an InfoNCE loss (Oord et al. (2018); Wu et al. (2018)) is conventionally employed in the following formulation (slightly modified with an additional margin term):
14
+
15
+ $$
16
+ \mathcal { L } _ { N C E } = \underset { \mathbf { q } \sim \mathcal { D } , \mathbf { k } _ { 0 } \sim \mathcal { D } ^ { \prime } ( \mathbf { q } ) , \mathbf { k } _ { i } \sim \mathcal { D } ^ { \prime } } { \mathbb { E } } \left[ - \log \frac { e ^ { ( \mathbf { q } ^ { \top } \mathbf { k } _ { 0 } - m ) / \tau } } { e ^ { ( \mathbf { q } ^ { \top } \mathbf { k } _ { 0 } - m ) / \tau } + \sum _ { i = 1 } ^ { K } e ^ { \mathbf { q } ^ { \top } \mathbf { k } _ { i } / \tau } } \right] ,
17
+ $$
18
+
19
+ where $\mathbf { q }$ and $\mathbf { k } _ { i }$ $( i = 0 , \ldots , K )$ stand for the query and keys sampled from the two (augmented) data distributions $\mathcal { D }$ and $\mathcal { D } ^ { \prime }$ respectively. Specifically, $\mathbf { k } _ { 0 }$ is associated to the same instance as q’s while other $\mathbf { k } _ { i } \mathbf { s }$ not; hence we name $\mathbf { k } _ { 0 }$ and $\mathbf { k } _ { i }$ $\because 0$ ) positive sample and negative samples respectively in the remaining text, in which $K$ is the number of negative samples (or pairs) for each query. The temperature $\tau$ and the margin $m$ are hyper-parameters. In most previous works, $m$ is trivially set to zero (e.g. Oord et al. (2018); He et al. (2020); Chen et al. (2020a); Tian et al. (2020)) or some handcraft values (e.g. Xie et al. (2020)). In the following text, we mainly study contrastive learning frameworks with InfoNCE loss as in Eq. 1 unless otherwise specified.
20
+
21
+ In contrastive learning research, it has been widely believed that enlarging the number of negative samples $K$ boosts the performance (Henaff et al. (2019); Tian et al. (2019); Bachman et al. (2019)). ´ For example, in MoCo (He et al. (2020)) the ImageNet accuracy rises from $5 4 . 7 \%$ to $6 0 . 6 \%$ under linear classification protocol when $K$ grows from 256 to 65536. Such observation further drives a line of studies how to effectively optimize under a number of negative pairs, such as memory bank methods (Wu et al. (2018); He et al. (2020)) and large batch training (Chen et al. (2020a)), either of which empirically reports superior performances when $K$ becomes large. Analogously, in the field of supervised metric learning (Deng et al. (2019); Wang et al. (2018); Sun et al. (2020); Wang et al. (2020)), loss in the similar form as Eq. 1 is often applied on a lot of negative pairs for hard negative mining. Besides, there are also a few theoretical studies supporting the viewpoint. For instance, Oord et al. (2018) points out that the mutual information between the positive pair tends to increase with the number of negative pairs $K$ ; Wang $\&$ Isola (2020) find that the negative pairs encourage features’ uniformity on the hypersphere; Chuang et al. (2020) suggests that large $K$ leads to more precise estimation of the debiased contrastive loss; etc.
22
+
23
+ Despite the above empirical or theoretical evidence, however, we point out that the reason for using many negative pairs is still less convincing. First, unlike the metric learning mentioned above, in self-supervised learning, the negative terms $\mathbf { k } _ { i }$ in Eq. 1 include both “true negative” (whose underlying class label is different from the query’s, similarly hereinafter) and “false negative” samples, since the actual ground truth label is not available. So, intuitively large K should not always be beneficial because the risk of false negative samples also increases (known as class collision problem). Arora et al. (2019) thus theoretically concludes that a large number of negative samples could not necessarily help. Second, some recent works have proven that by introducing new architectures (e.g., a predictor network in BYOL (Grill et al., 2020)), or designing new loss functions (e.g., Caron et al. (2020a); Ermolov et al. (2020)), state-of-the-art performance can still be obtained even without any explicit negative pairs. In conclusion, it is still an open question whether large quantities of negative samples are essential to contrastive learning.
24
+
25
+ After referring to the above two aspects, we rise a question: is a large $\kappa$ really essential in the contrastive learning framework? We propose to rethink the question from a different view: note that in Eq. 1, there are three hyper-parameters: the number of negative samples $K$ , temperature $\tau$ , and margin $m$ . In most of previous empirical studies (He et al. (2020); Chen et al. (2020a)), only $K$ is changed while $\tau$ and $m$ are usually kept constant. Do the optimal hyper-parameters of $\tau$ and $m$ varies with $K ?$ If so, the performance gains observed from larger $K \mathrm { s }$ may be a wrong interpretation – merely brought by suboptimal hyper-parameters’ choices for small $K \mathrm { s }$ , rather than much of an essential.
26
+
27
+ In the paper, we investigate the relationship among three hyper-parameters and suggest an equivalent rule:
28
+
29
+ $$
30
+ m = \tau { \log } { \frac { \alpha } { K } } ,
31
+ $$
32
+
33
+ where $\alpha$ is a constant. We find that if the margin $m$ is adaptively adjusted based on the above rule, the performance of contrastive learning is irrelevant to the size of $K$ , in a very large range (e.g. $K \ge 1 6 )$ . For example, in MoCo framework, by introducing EqCo the performance gap between $K \ : = \ : 2 5 6$ and $K = 6 5 5 3 6$ (the best configuration reported in He et al. (2020)) almost disappears (from $6 . 1 \%$ decrease to $0 . 2 \%$ ). We call this method “Equivalent Rules for Contrastive learning” $( E q C o )$ . For completeness, as the other part of EqCo we point that adjusting the learning rate according to the conventional linear scaling rule satisfies the equivalence for different number of queries per batch.
34
+
35
+ Theoretically, following the InfoMax principle (Linsker (1988)) and the derivation in CPC (Oord et al. (2018)), we prove that in $E q C o$ , the lower bound of the mutual information keeps steady under various numbers of negative samples $K$ . Moreover, from the back-propagation perspective, we further prove that in such configuration the upper bound of the gradient norm is also free of
36
+
37
+ $K$ ’s scale. The proposed equivalent rule implies that, by assigning $\alpha = K _ { 0 }$ , it can “mimic” the optimization behavior under $K _ { 0 }$ negative samples even if the physical number of negatives $K \neq K _ { 0 }$ .
38
+
39
+ The “equivalent” methodology of EqCo follows the well-known linear scaling rule (Krizhevsky (2014); Goyal et al. (2017)), which suggests scalinif the loss satisfies with the linear averaged form: $\begin{array} { r } { L = \frac { 1 } { N } \sum _ { i = 1 } ^ { N } f ( x _ { i } ; \theta ) } \end{array}$ portional to the batch size. However, linear scaling includes two batch sizes (number of queries and keys respectively) while linear scaling rule only involves one, in addition to the nonlinearity of the keys in InfoNCE loss. In the experiments of SimCLR (Chen et al. (2020a)), learning rates under different batch sizes are adjusted with linear scaling rule, but the accuracy gap is still very large $5 7 . 5 \% @$ batch $= 2 5 6$ vs. $6 4 + \% \textcircled { a }$ batc $_ { 1 = 8 1 9 2 }$ , 100 epochs training).
40
+
41
+ EqCo challenges the belief that self-supervised contrastive learning requires large quantities of negative pairs to obtain competitive performance, making it possible to design simpler algorithms. We thus present SiMo, a simplified contrastive learning framework based on $M o C o \ \nu 2$ (Chen et al. (2020c)). SiMo is elegant, efficient, free of large batch training and memory bank; moreover, it can achieve superior performances over state-of-the-art even if the number of negative pairs is extremely small (e.g. 16), without bells and whistles.
42
+
43
+ The contributions of our paper are summarized as follows:
44
+
45
+ • We challenge the widely accepted belief that on large-scale vision datasets like ImageNet, large size of negative samples is critical for contrastive learning. We interpret it from a different view: it may be because the hyper-parameters are not set to the optimum. • We propose EqCo, an equivalent rule to adaptively set hyper-parameters between small and large numbers of negative samples, which proves to bridge the performance gap. • We present SiMo, a simpler but stronger baseline for contrastive learning.
46
+
47
+ # 2 EQCO: EQUIVALENT RULES FOR CONTRASTIVE LEARNING
48
+
49
+ In this section we introduce EqCo. We mainly consider the circumstance of optimizing the InfoNCE loss (Eq. 1) with SGD. For each batch of training, there are two meanings of the concept “batch size”, i.e., the size of negative samples/pairs $K$ per query, and the number of queries (or positive pairs) $N$ per batch. Hence our equivalent rules accordingly consist of two parts, which will be introduced in the next subsections.
50
+
51
+ # 2.1 THE CASE OF NEGATIVE PAIRS
52
+
53
+ Our derivation is mainly inspired by the model of Contrastive Predictive Coding (CPC) (Oord et al. (2018)), in which InfoNCE loss is interpreted as a mutual information estimator. We further extend the method so that it is applicable to InfoNCE loss with a margin term (Eq. 1), which is not considered in Oord et al. (2018).
54
+
55
+ Following the concept in Oord et al. (2018), given a query embedding q (namely the context in Oord et al. (2018)) and suppose $K + 1$ random key embeddings $\textbf { x } = \{ \mathbf { x } _ { i } \} _ { i = 0 , \dots , K }$ , where there exists exactly one entry (e.g., ${ \bf x } _ { i }$ ) sampled from the conditional distribution $\mathbf { P } ( \mathbf { x } _ { i } | \mathbf { q } )$ while others (e.g., $\mathbf { x } _ { j }$ ) sampled from the “proposal” distribution $\mathrm { P } ( \mathbf { x } _ { j } )$ independently. According to which entry corresponds to the conditional distribution, we therefore defines $K + 1$ candidate distributions for $\mathbf { x }$ (denoted by $\{ H _ { i } \} _ { i = 0 , . . . , K } )$ , where the probability density of $\mathbf { x }$ under $H _ { i }$ is $\begin{array} { r } { \mathrm { P } _ { H _ { i } } ( \mathbf { x } ) = \mathrm { P } ( \mathbf { x } _ { i } | \mathbf { q } ) \prod _ { j \neq i } \mathrm { P } ( \mathbf { x } _ { j } ) } \end{array}$ . So, given the observed data $X = \{ \mathbf { k } _ { 0 } , \ldots , \mathbf { k } _ { K } \}$ of $\mathbf { x }$ , the probability where $\mathbf { x }$ is sampled from $H _ { 0 }$ rather than other candidates is thus derived with Bayes theorem:
56
+
57
+ $$
58
+ \begin{array} { r l } & { \mathrm { P r } [ { \bf x } \sim H _ { 0 } | { \bf q } , X ] = \frac { { \bf P } ^ { + } { \bf P } _ { H _ { 0 } } ( X ) } { { \bf P } ^ { + } { \bf P } _ { H _ { 0 } } ( X ) + { \bf P } ^ { - } \sum _ { i = 1 } ^ { K } { \bf P } _ { H _ { i } } ( X ) } } \\ & { \qquad = \frac { \frac { { \bf P } ^ { + } } { { \bf P } ^ { - } } \frac { { \bf P } ( { \bf k } _ { 0 } | { \bf q } ) } { { \bf P } ( { \bf k } _ { 0 } ) } } { \frac { { \bf P } ^ { + } } { { \bf P } ^ { - } } \frac { { \bf P } ( { \bf k } _ { 0 } | { \bf q } ) } { { \bf P } ( { \bf k } _ { 0 } ) } + \sum _ { i = 1 } ^ { K } \frac { { \bf P } ( { \bf k } _ { i } | { \bf q } ) } { { \bf P } ( { \bf k } _ { i } ) } } , } \end{array}
59
+ $$
60
+
61
+ where we denote $\mathrm { P } ^ { + }$ and $\mathrm { { \bf P } } ^ { - }$ as the prior probabilities of $H _ { 0 }$ and $H _ { i } ( i > 0 )$ respectively. We point that Eq. 2 introduces a generalized form to that in Oord et al. (2018) by taking the priors into account. Referring to the notations in Eq. 1, we suppose that $H _ { 0 }$ is the ground truth distribution of $\mathbf { x }$ (since $\mathbf { k } _ { 0 }$ is the only positive sample). By modeling the density ratio $\begin{array} { r } { \tilde { \bf P } ( \bar { \bf k } _ { i } | { \bf q } ) / { \bf P } ( \bf k _ { i } ) \propto \boldsymbol { e } ^ { \bf q ^ { \top } \bf k } \boldsymbol { i } / \tau ( i = 0 , \ldots , K ) } \end{array}$ and letting $\mathrm { P } ^ { + } / \mathrm { P } ^ { - } = e ^ { - m / \tau }$ , the negative log-likelihood $\mathcal { L } _ { o p t } \triangleq \mathbb { E } _ { \mathbf { q } , X } \ - \log \operatorname* { P r } [ x \sim H _ { 0 } | \mathbf { q } , X ]$ can be regarded as the optimal value of $\mathcal { L } _ { N C E }$ .
62
+
63
+ Similar to the methodology of Oord et al. (2018), we explore the lower bound of $\mathcal { L } _ { o p t }$ :
64
+
65
+ $$
66
+ \begin{array} { l } { \mathcal { L } _ { o p t } = \underset { \mathbf { q } \sim \mathcal { D } , \mathbf { k } _ { 0 } \sim \mathcal { D } ^ { \prime } ( \mathbf { q } ) , \mathbf { k } _ { i } \sim \mathcal { D } ^ { \prime } } { \mathbb { E } } \log \left( 1 + e ^ { m / \tau } \frac { \mathbf { P } ( \mathbf { k } _ { 0 } ) } { \mathbf { \bar { P } } \left( \mathbf { k } _ { 0 } | \mathbf { q } \right) } \underset { i = 1 } { \overset { K } { \sum } } \frac { \mathbf { P } ( \mathbf { k } _ { i } | \mathbf { q } ) } { \mathbf { \bar { P } } \left( \mathbf { k } _ { i } \right) } \right) } \\ { \approx \underset { \mathbf { q } \sim \mathcal { D } , \mathbf { k } _ { 0 } \sim \mathcal { D } ^ { \prime } ( \mathbf { q } ) } { \mathbb { E } } \log \left( 1 + K e ^ { m / \tau } \frac { \mathbf { P } \left( \mathbf { k } _ { 0 } \right) } { \mathbf { \bar { P } } \left( \mathbf { k } _ { 0 } | \mathbf { q } \right) } \left( \underset { \mathbf { k } _ { i } \sim \mathcal { D } ^ { \prime } } { \mathbb { E } } \frac { \mathbf { \bar { P } } \left( \mathbf { k } _ { i } | \mathbf { q } \right) } { \mathbf { \bar { P } } \left( \mathbf { k } _ { i } \right) } \right) \right) } \\ { = \underset { \mathbf { q } \sim \mathcal { D } , \mathbf { k } _ { 0 } \sim \mathcal { D } ^ { \prime } ( \mathbf { q } ) } { \mathbb { E } } \log \left( 1 + K e ^ { m / \tau } \frac { \mathbf { \bar { P } } \left( \mathbf { k } _ { 0 } \right) } { \mathbf { \bar { P } } \left( \mathbf { k } _ { 0 } | \mathbf { q } \right) } \right) } \\ { \geq \log \left( 1 + K e ^ { m / \tau } \right) - \mathcal { Z } ( \mathbf { k } _ { 0 } , \mathbf { q } ) , } \end{array}
67
+ $$
68
+
69
+ where $\mathcal { T } ( \cdot , \cdot )$ means mutual information. The approximation in the second row is guaranteed by Law of Large Numbers as well as the fact $\mathbf { P } ( \mathbf { k } _ { i } | \mathbf { \bar { q } } ) \approx \mathbf { P } ( \mathbf { k } _ { i } )$ since $\mathbf { k } _ { i } ( i > 0 )$ and $\mathbf { q }$ are “almost” independent. The inequality in the last row is resulted from $\mathbf { P } ( \mathbf { k } _ { 0 } | \mathbf { q } ) \ge \mathbf { P } ( \mathbf { k } _ { 0 } )$ as $\mathbf { k } _ { 0 }$ and $\mathbf { q }$ are extracted from the same instance. Therefore the lower bound of the mutual information (noted as $f _ { \mathrm { b o u n d } } ( m , K ) )$ between the positive pair $( \mathbf { k } _ { 0 } , \mathbf { q } )$ is:
70
+
71
+ $$
72
+ \begin{array} { r l r } & { } & { \mathcal { Z } ( { \bf k } _ { 0 } , { \bf q } ) \ge f _ { \mathrm { b o u n d } } ( m , K ) \triangleq \log ( 1 + K e ^ { m / \tau } ) - \mathcal { L } _ { o p t } } \\ & { } & { \approx \log ( 1 + K e ^ { m / \tau } ) - \underset { { \bf q } \sim \mathcal { D } , { \bf k } _ { 0 } \sim \mathcal { D } ^ { \prime } ( { \bf q } ) } { \mathbb { E } } \log \left( 1 + K e ^ { m / \tau } \frac { { \bf P } ( { \bf k } _ { 0 } ) } { { \bf P } ( { \bf k } _ { 0 } | { \bf q } ) } \right) . } \end{array}
73
+ $$
74
+
75
+ So, minimizing $\mathcal { L } _ { N C E }$ (Eq. 1) towards $\mathcal { L } _ { o p t }$ implies maximizing the lower bound of the mutual information, which is also satisfied when $\bar { m } \neq 0$ . In the case of $m = 0$ , the result is consistent with that in Oord et al. (2018). Oord et al. (2018) further points out the bound increases with $K$ , which indicates larger $K$ encourages to learn more mutual information thus could help to improve the performance.
76
+
77
+ Nevertheless, different from Oord et al. (2018) our model does not require $m$ to be zero, so the lower bound in Eq. 4 is also a function of $e ^ { m / \tau }$ . Thus we have the following theorem:
78
+
79
+ Theorem 1. (Main, EqCo for negative pairs) The mutual information lower bound of InfoNCE loss in Eq. 1 is irrelevant to the number of negative pairs $K$ , if
80
+
81
+ $$
82
+ m = \tau { \log } { \frac { \alpha } { K } } ,
83
+ $$
84
+
85
+ where $\alpha$ is a constant coefficient. And in the circumstances the bound is given by:
86
+
87
+ $$
88
+ f _ { \mathrm { b o u n d } } \left( \tau \mathrm { l o g } \frac { \alpha } { K } , K \right) \approx \mathrm { l o g } ( 1 + \alpha ) - \underset { \mathbf { q } \sim \mathcal { D } , \mathbf { k } _ { 0 } \sim \mathcal { D } ^ { \prime } ( \mathbf { q } ) } { \mathbb { E } } \mathrm { l o g } \left( 1 + \alpha \frac { \mathbf { P } ( \mathbf { k } _ { 0 } ) } { \mathbf { P } ( \mathbf { k } _ { 0 } | \mathbf { q } ) } \right) \approx f _ { \mathrm { b o u n d } } ( 0 , \alpha ) ,
89
+ $$
90
+
91
+ which can be immediately obtained by substituting Eq. 5 into Eq. 4. We name Eq. 5 as “equivalent condition”.
92
+
93
+ Theorem 1 suggests a property of equivalency: under the condition of Eq. 5, no matter what the number of physical negative pairs $K$ is, the optimal solution of $\mathcal { L } _ { N C E }$ (Eq. 1) is “equivalent” in the sense of the same mutual information lower bound. The bound is controlled by a hyper-parameter $\alpha$ rather than $K$ . Eq. 6 further implies that the lower bound also correlates to the configuration of $K = \alpha$ without margin, which suggests we can “mimic” the InfoNCE loss’s behavior of $K = K _ { 0 }$ under a different physical negative sample size $K _ { 1 }$ , just by applying Eq. 5 with $\alpha = K _ { 0 }$ . It inspires us to simplify the existing state-of-the-art frameworks (e.g. MoCo (He et al. (2020))) with fewer negative samples but as accurate as the original configurations, which will be introduced next.
94
+
95
+ We empirically validate Theorem 1 as follows. Notice that $f _ { \mathrm { b o u n d } }$ is difficult to calculate directly because $\mathcal { L } _ { o p t }$ is not known. Instead, we plot the empirical mutual information lower bound $\hat { f } _ { \mathrm { { b o u n d } } } ( m , K ) \triangleq \log ( 1 + K e ^ { m / \tau } ) - \mathcal { L } _ { N C E }$ . So, we have $\hat { f } _ { \mathrm { { b o u n d } } } \leq f _ { \mathrm { { b o u n d } } }$ ; when $\mathcal { L } _ { N C E }$ converges to the optimum $\mathcal { L } _ { o p t }$ , $\hat { f } _ { \mathrm { b o u n d } }$ is an approximation of $f _ { \mathrm { b o u n d } }$ . In Fig. 1, we plot the evolution of $\hat { f } _ { \mathrm { { b o u n d } } }$ during the training of $M o C o \ \nu 2$ under different configurations. Obviously, when it converges, without EqCo $\hat { f } _ { \mathrm { b o u n d } }$ keeps increasing with the number of negative pairs $K$ ; in contrast, after applying the equivalent condition (Eq. 5) $\hat { f } _ { \mathrm { { b o u n d } } }$ converges to almost the same value under different $K \mathrm { s }$ . The empirical results are thus consistent with Theorem 1.
96
+
97
+ ![](images/cca9754868e1b928436bbfd2defab666939fbe5da68708c15cab39390939d953.jpg)
98
+ Figure 1: Evolution of the empirical mutual information lower bound $\hat { f } _ { \mathrm { { b o u n d } } }$ during training. We use $\alpha = 6 5 5 3 6$ for EqCo. Results are evaluated with MoCo $\nu 2$ on ImageNet. Refer to Theorem 1 for details. Best viewed in color.
99
+
100
+ Remarks 1. The equivalent condition in Eq. 5 suggests the margin $m$ is inversely correlated with $K$ . It is intuitive, because the larger $K$ is, the more risks of class collision (Arora et al. (2019)) it suffers from, so we need to avoid over-penalty for negative samples near the query, thus smaller $m$ is used; in contrast, if $K$ is very small, we use larger $m$ to exploit more “hard” negative samples.
101
+
102
+ Besides, recall that the margin term $e ^ { m / \tau }$ is defined as the ratio of the prior probabilities $\mathrm { P ^ { - } / P ^ { + } }$ in Eq. 2. If the equivalent condition Eq. 5 satisfies, i.e., $\mathsf { P } ^ { - } / \mathsf { P } ^ { + } = \alpha / K$ , we have $\mathsf { P } ^ { + } = 1 / ( 1 + \alpha )$ (notice that $K \mathsf { P } ^ { - } + \mathsf { P } ^ { + } \equiv 1 ,$ ), suggesting that the prior probability of the ground truth distribution $H _ { 0 }$ is supposed to be a constant ignoring the number of negative samples $K$ . While in previous works (usually without the margin term, or $m = 0$ ) we have $\mathbf { \bar { P } } ^ { + } = 1 / ( \mathbf { \bar { K } } + 1 )$ . It is hard to distinguish which prior is more reasonable. However at least, we intuitively suppose keeping a constant prior for the ground truth distribution may help to keep the optimal choices of hyper-parameters steady under different $K \mathrm { s }$ , which is also consistent with our empirical observations.
103
+
104
+ Remarks 2. In Theorem 1, it is worth noting that $K$ refers to the number of negative samples per query. In the conventional batched training scheme, negative samples for different queries could be either (fully or partially) shared or isolated, i.e., the total number of distinguishing negatives samples per batch could be different, which is not ruled by Theorem 1. However, we empirically find the differences in implementation do not result in much of the performance variation.
105
+
106
+ The following theorem further supports the equivalent rule (Theorem 1) from back-propagation view:
107
+
108
+ Theorem 2. Given the equivalent condition (Eq. 5) and a query embedding q as well as the corresponding positive sample $\mathbf { k } _ { 0 }$ , for $\mathcal { L } _ { N C E }$ in Eq. 1 the expectation of the gradient norm w.r.t. $\mathbf { q }$ is bounded by 2:
109
+
110
+ $$
111
+ \underset { \mathbf { k } _ { i } \sim \mathcal { D } ^ { \prime } } { \mathbb { E } } \left. \frac { \mathrm { d } \mathcal { L } _ { N C E } } { \mathrm { d } \mathbf { q } } \right. \leq \frac { 2 } { \tau } \left( 1 - \frac { \exp ( \mathbf { q } ^ { \top } \mathbf { k } _ { 0 } / \tau ) } { \exp ( \mathbf { q } ^ { \top } \mathbf { k } _ { 0 } / \tau ) + \alpha \mathbb { E } _ { \mathbf { k } _ { i } \sim \mathcal { D } ^ { \prime } } [ \exp ( \mathbf { q } ^ { \top } \mathbf { k } _ { i } / \tau ) ] } \right) .
112
+ $$
113
+
114
+ Please refer to the Appendix A.1 for the detailed proof. Note that we assume the embedding vectors are normalized, i.e., $\| \mathbf { k } _ { i } \| = 1 ( i = 0 , \cdot \cdot \cdot , K )$ , which is also a convention in recent contrastive learning works.
115
+
116
+ Theorem 2 indicates that, equipped with the equivalent rule (Eq. 5), the upper bound of the gradient norm is irrelevant to the number of negative samples $K$ . Fig. 4 (see the Appendix A.2) further validates our theory: the gradient norm becomes much more steady after using EqCo under different $K \mathrm { s }$ . Since the size of $K$ affects little on the gradient magnitude, gradient scaling techniques, e.g. linear scaling rule, are not required specifically for different $K \mathrm { s } .$ . Eq. 7 also implies that the temperature $\tau$ significantly affects the gradient norm even EqCo is applied – it is why we only recommend to modify $m$ for equivalence (Eq. 5), though the mutual information lower bound is determined by $e ^ { m / \tau }$ as a whole.
117
+
118
+ # 2.2 THE CASE OF POSITIVE PAIRS
119
+
120
+ In practice the InfoNCE loss (Eq. 1) is usually optimized with batched SGD, which can be represented as empirical risk minimization:
121
+
122
+ $$
123
+ \mathcal { L } _ { N C E } ^ { \mathrm { b a t c h } } = \frac { 1 } { N } \sum _ { j = 1 } ^ { N } \mathcal { L } _ { N C E } ^ { ( j ) } ( \mathbf { q } _ { j } , \mathbf { k } _ { j , 0 } ) ,
124
+ $$
125
+
126
+ where $N$ is the number of queries (or positive pairs) per batch; $( { \bf q } _ { j } , { \bf k } _ { j , 0 } ) \sim ( { \cal D } , { \cal D } ^ { \prime } ( { \bf q } _ { j } ) )$ is the $j$ -th positive pair, and ndependent of each $\mathcal { L } _ { N C E } ^ { ( j ) } ( \mathbf { q } _ { j } , \mathbf { k } _ { j , 0 } )$ is the corresponding loss. For different is sampled independently. Hence, Eq. $j$ , 8 $\mathcal { L } _ { N C E } ^ { ( j ) }$ is (almost)es the form ${ \bf q } _ { j }$ of linear scaling rule (Krizhevsky (2014); Goyal et al. (2017)), suggesting that the learning rate should be adjusted proportional to the number of queries $N$ per batch.
127
+
128
+ Remarks 3. Previous work like SimCLR (Chen et al. (2020a)) also proposes to apply linear scaling rule. 3 The difference is, in SimCLR it does not clarify the concept of “batch size” refers to the number of queries or the number of keys. However in our paper, we explicitly point that the linear scaling rule needs to be applied corresponding to the number of queries per batch $( N )$ rather than $K$ .
129
+
130
+ # 2.3 EMPIRICAL EVALUATION
131
+
132
+ In this subsection we conduct experiments on the three state-of-the-art self-supervised contrastive learning frameworks – MoCo (He et al. (2020)), MoCo v2 (Chen et al. (2020c)) and SimCLR (Chen et al. (2020a)) to verify our theory in Sec. 2.1 and Sec. 2.2. We propose to alter $K$ and $N$ separately to examine the correctness of our equivalent rules.
133
+
134
+ Implementation details. We follow most of the training and evaluation settings recommended in the original papers respectively. The only difference is, for SimCLR, we adopt SGD with momentum rather than LARS (You et al. (2017)) as the optimizer. We use ResNet-50 (He et al. (2016)) as the default network architecture. 128-d features are employed for query and key embeddings. Unless specially mentioned, all models are trained on ImageNet (Deng et al. (2009)) for 200 epochs without using the ground truth labels. We report the top-1 accuracy under the conventional linear evaluation protocol according to the original paper respectively. The number of queries per batch $( N )$ is set to 256 by default. All models are trained with 8 GPUs.
135
+
136
+ It is worth noting the way we alter the number of negative samples $K$ independent of $N$ during training. For MoCo and MoCo v2, we simply need to set the size of the memory bank to $K$ . Specially, if $K < N$ , in the current batch the memory bank is actually composed of $K$ random keys sampled from the previous batch. While for SimCLR, if $K < N$ we random sample $K$ negative keys for each query independently. We do not study the case that $K > N$ for SimCLR. We mainly consider the ease of implementation in designing the strategies; as mentioned in Remarks 2 (Sec. 2.1), it does not affect the empirical conclusion.
137
+
138
+ ![](images/9106e601f0206f530101eae52fac3353abbbe4e5df8a80590ccee54ac565a8ad.jpg)
139
+ Figure 2: Comparisons with/without $E q C o$ under different number of negative samples (noted by $K _ { \cdot }$ ). Results are evaluated with ImageNet top-1 accuracy using linear evaluation protocol. In EqCo, we set $\alpha = 6 5 5 3 6$ for MoCo and MoCo v2, and $\alpha = 2 5 6$ for SimCLR (except for one data point with $\alpha = 4 0 9 6$ , as noted in the legend). Best viewed in color.
140
+
141
+ Quantitative results. Fig. 2 illustrates the effect of our equivalent rule under different $K \mathrm { s }$ . Our experiments start with the best configurations (i.e. $K \ : \ : = \ : 6 5 5 3 6$ for MoCo and MoCo v2, and $K = 2 5 6$ for $\mathrm { S i m C L R ^ { 4 } }$ ), then we gradually reduce $K$ and benchmark the performance. Results in Fig. 2 indicates that, without $\mathrm { E q C o }$ the accuracy significantly drops if $K$ becomes very small (e.g. $K < 6 4$ ). While with EqCo, by setting $\alpha$ to “mimic” the optimal $K$ , the performance surprisingly keeps steady under a wide range of $K \mathrm { s }$ . Fig. 2(b) further shows that in SimCLR, by setting $\alpha$ to a number larger than the physical batch size (e.g. 4096 vs. 256), the accuracy significantly improves from $6 2 . 0 \%$ to $6 5 . 3 \%$ , 5 suggesting the benefit of EqCo especially when the memory is limited. The comparison fully demonstrates EqCo is essential especially when the number of negative pairs is small.
142
+
143
+ Besides, Table 1 compares the results of MoCo $\nu 2$ under different number of queries $N$ , while $K \ : = \ : 6 5 5 3 6$ is fixed. It is clear that, with linear scaling rule (Krizhevsky (2014); Goyal et al. (2017)), the final performance is almost unchanged under different $N$ , suggesting the effectiveness of our equivalent rule for $N$ .
144
+
145
+ <table><tr><td rowspan=1 colspan=1>N(K = 65536)</td><td rowspan=1 colspan=1>256</td><td rowspan=1 colspan=1>512</td><td rowspan=1 colspan=1>1024</td></tr><tr><td rowspan=1 colspan=1>Top-1 accuracy (%)</td><td rowspan=1 colspan=1>67.5</td><td rowspan=1 colspan=1>67.5</td><td rowspan=1 colspan=1>67.4</td></tr></table>
146
+
147
+ Table 1: ImageNet accuracy (MoCo v2) vs. the number of queries per batch $( N )$ ). The learning rates during training are adjusted with linear scaling rule.
148
+
149
+ # 3 SIMO: A SIMPLER BUT STRONGER BASELINE
150
+
151
+ EqCo inspires us to rethink the design of contrastive learning frameworks. The previous state-ofthe-arts like MoCo and SimCLR heavily rely on large quantities of negative pairs to obtain high performances, hence implementation tricks such as memory bank and large batch training are introduced, which makes the system complex and tends to be costly. Thanks to $\mathrm { E q C o }$ , we are able to design a simpler contrastive learning framework with fewer negative pairs.
152
+
153
+ ![](images/99f3fae3131dfe8dc528521a4f6f40daf9e4132960d054ceeb22d941644caaf7.jpg)
154
+ Figure 3: SiMo with/without EqCo
155
+
156
+ Table 2: State-of-the-art InfoNCE-based frameworks
157
+
158
+ <table><tr><td>Method</td><td>Epochs</td><td>Top-1 (%)</td></tr><tr><td>CPC v2 (Henaff etal.,2019) CMC (Tian et al.,2019)</td><td>200</td><td>63.8</td></tr><tr><td>SimCLR (Chen et al.,2020a)</td><td>240 200</td><td>66.2 66.6</td></tr><tr><td>MoCo v2 (Chen et al.,2020c)</td><td>200</td><td>67.5</td></tr><tr><td>InfoMin Aug.(Tian et al. (2020))</td><td>200</td><td>70.1</td></tr><tr><td>SiMo(K=16,α=256)</td><td>200</td><td>68.1</td></tr><tr><td>SiMo (K= 256,α= 256)</td><td>200</td><td>68.0</td></tr><tr><td>SiMo (K= 256,α= 65536)</td><td>200</td><td>68.5</td></tr><tr><td>PIRL(Misra&amp;Maaten,2020)</td><td>800</td><td>63.6</td></tr><tr><td>SimCLR(Chen et al.,2020a)</td><td>1000</td><td>69.3</td></tr><tr><td>MoCo v2 (Chen et al.,2020c)</td><td>800</td><td>71.1</td></tr><tr><td>InfoMin Aug.(Tian et al.(2020))</td><td>800</td><td>73.0</td></tr><tr><td>SiMo(K=256,α=256)</td><td>800</td><td>71.8</td></tr><tr><td>SiMo(K= 256,α=65536)</td><td>800</td><td>72.1</td></tr></table>
159
+
160
+ We propose SiMo, a simplified variant of MoCo v2 (Chen et al. (2020c)) equipped with $\mathrm { E q C o }$ . We follow most of the design in Chen et al. (2020c), where the key differences are as follows:
161
+
162
+ Memory bank. MoCo, MoCo v2 and SimCLR ${ \tt V } 2 ^ { \mathrm { ~ 6 ~ } }$ (Chen et al. (2020b)) employ memory bank to maintain large number of negative embeddings $\mathbf { k } _ { i }$ , in which there is a side effect: every positive embedding $\mathbf { k } _ { 0 }$ is always extracted from a “newer” network than the negatives’ in the same batch, which could harm the performance. In SiMo, we thus cancel the memory bank as we only rely on a few negative samples per batch. Instead, we use the momentum encoder to extract both positive and negative key embeddings from the current batch.
163
+
164
+ Shuffling BN vs. Sync BN. In MoCo v1/v2, shuffling BN (He et al. (2020)) is proposed to remove the obvious dissimilarities of the BN (Ioffe & Szegedy (2015)) statistics between the positive (from current mini-batch) and the negatives (from memory bank), so that the model can make predictions based on the semantic information of images rather than the BN statistics. In contrast, since the positive and negatives are from the same batch in SiMo, therefore, we use sync BN (Peng et al. (2018)) for simplicity and more stable statistics. Sync BN is also used in SimCLR (Chen et al. (2020a)) and SimCLR v2 (Chen et al. (2020b)).
165
+
166
+ There are a few other differences, including 1) we use a BN attached to each of the fully-connected layers; 2) we introduce a warm-up stage at the beginning of the training, which follows the methodology in SimCLR (Chen et al. (2020a)). Apart from all the differences mentioned above, the architecture and the training (including data augmentations) details in SiMo are exactly the same as MoCo v2’s. In the following text, the number of queries per batch (N) is set to 256, and the backbone network is ResNet-50 by default.
167
+
168
+ Quantitative results. First, we empirically demonstrate the necessity of $E q C o$ in SiMo framework. We choose the number of negative samples $K \ : = \ : 2 5 6$ as the baseline, then reduce $K$ to evaluate the performance. Fig. 3 shows the result on ImageNet using linear evaluation protocol. Without EqCo, the accuracy significantly drops when $K$ is very small. In contrast, using EqCo to “mimic” the case of large $K$ (by setting $\alpha$ to 256), the accuracy almost keeps steady even under very small $K \mathrm { s }$ .
169
+
170
+ Table 2 further compares our SiMo with state-of-the-art self-supervised contrastive learning methods on ImageNet. 7 Using only 16 negative samples per query, SiMo outperforms MoCo v2 ( $6 8 . 1 \%$ vs. $6 7 . 5 \%$ ). If we increase $\alpha$ to 65536 to “simulate” the case under huge number of negative pairs, the accuracy further increases to $6 8 . 5 \%$ . Moreover, when we extend the training epochs to 800, we get the accuracy of $7 2 . 1 \%$ , surpassing the baseline MoCo v2 by $1 . 0 \%$ . The only entry that surpasses our results is InfoMin Aug. (Tian et al. (2020)), which is mainly focuses on data generation and orthogonal to ours. The experiments indicate that SiMo is a simpler but more powerful baseline for self-supervised contrastive learning. Readers can refer to the Appendix B for more experimental results of SiMo.
171
+
172
+ # 4 LIMITATIONS AND FUTURE WORK
173
+
174
+ Theorem 1 suggests that given the equivalent condition (Eq. 5), InfoNCE losses under various $K \mathrm { s }$ are “equivalent” in the sense of the same mutual information lower bound, which is also backed up with the experiments in Fig. 1. However, Fig. 2 (a) shows that if $K$ is smaller than a certain value (e.g. $K \leq 1 6$ ), some frameworks like $M o C o \ \nu 2$ start to degrade significantly even with $\mathrm { E q C o }$ ; while for other frameworks like SiMo (Fig. 3), the accuracy almost keeps steady for very small $K \mathrm { s }$ . Tschannen et al. (2019) also point that the principle of InfoMax cannot explain all the phenomena in contrastive learning. We will investigate the problem in the future, e.g. from other viewpoints such as gradient noise brought by small $K \mathrm { s }$ (Fig. 4 in Appendix A.2 gives some insights).
175
+
176
+ Though the formulation of Eq. 1 is very common in the field of supervised metric learning, which is usually named margin softmax cross-entropy loss (Deng et al., 2019; Wang et al., 2018; Sun et al., 2020). Nevertheless, unfortunately, our equivalent rule seems invalid to be generalized to those problems (e.g. face recognition). The major issue lies in the approximation in Eq. 3, we need the negative samples $\mathbf { k } _ { i }$ to be independent of the query q, which is not satisfied in supervised tasks.
177
+
178
+ According to Fig. 2 and Fig. 3, the benefits of EqCo become significant if $K$ is sufficiently small (e.g. $K < 6 4$ ). But in practice, for modern computing devices (e.g. GPUs) it is not that difficult to use $\sim 2 5 6$ negative pairs per query. Applying EqCo to “simulate” more negative pairs via adjusting $\alpha$ can further boost the performance, however, whose accuracy gains become relatively marginal. For example, in Table 2 under 200 epochs training, SiMo with $\alpha \ : = \ : 6 5 5 3 6$ outperforms that of $\alpha = 2 5 6$ by only $0 . 5 \%$ . It could be a fundamental limitation of InfoNCE loss. We will investigate the problem in the future.
179
+
180
+ # REFERENCES
181
+
182
+ Sanjeev Arora, Hrishikesh Khandeparkar, Mikhail Khodak, Orestis Plevrakis, and Nikunj Saunshi. A theoretical analysis of contrastive unsupervised representation learning. arXiv preprint arXiv:1902.09229, 2019.
183
+
184
+ Philip Bachman, R Devon Hjelm, and William Buchwalter. Learning representations by maximizing mutual information across views. In Advances in Neural Information Processing Systems, pp. 15535–15545, 2019.
185
+
186
+ Yue Cao, Zhenda Xie, Bin Liu, Yutong Lin, Zheng Zhang, and Han Hu. Parametric instance classification for unsupervised visual feature learning. arXiv preprint arXiv:2006.14618, 2020.
187
+
188
+ Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments. arXiv preprint arXiv:2006.09882, 2020a.
189
+
190
+ Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments. Advances in Neural Information Processing Systems, 33, 2020b.
191
+
192
+ Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. arXiv preprint arXiv:2002.05709, 2020a.
193
+
194
+ Ting Chen, Simon Kornblith, Kevin Swersky, Mohammad Norouzi, and Geoffrey E Hinton. Big self-supervised models are strong semi-supervised learners. Advances in Neural Information Processing Systems, 33, 2020b.
195
+
196
+ Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020c.
197
+
198
+ Ching-Yao Chuang, Joshua Robinson, Lin Yen-Chen, Antonio Torralba, and Stefanie Jegelka. Debiased contrastive learning. arXiv preprint arXiv:2007.00224, 2020.
199
+
200
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248–255. Ieee, 2009.
201
+
202
+ Jiankang Deng, Jia Guo, Niannan Xue, and Stefanos Zafeiriou. Arcface: Additive angular margin loss for deep face recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4690–4699, 2019.
203
+
204
+ Alexey Dosovitskiy, Jost Tobias Springenberg, Martin Riedmiller, and Thomas Brox. Discriminative unsupervised feature learning with convolutional neural networks. In Advances in neural information processing systems, pp. 766–774, 2014.
205
+
206
+ Aleksandr Ermolov, Aliaksandr Siarohin, Enver Sangineto, and Nicu Sebe. Whitening for selfsupervised representation learning. arXiv preprint arXiv:2007.06346, 2020.
207
+
208
+ Priya Goyal, Piotr Dollar, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, An-´ drew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch sgd: Training imagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017.
209
+
210
+ Jean-Bastien Grill, Florian Strub, Florent Altche, Corentin Tallec, Pierre H Richemond, Elena ´ Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Daniel Guo, Mohammad Gheshlaghi Azar, et al. Bootstrap your own latent: A new approach to self-supervised learning. arXiv preprint arXiv:2006.07733, 2020.
211
+
212
+ Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’06), volume 2, pp. 1735–1742. IEEE, 2006.
213
+
214
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
215
+
216
+ Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9729–9738, 2020.
217
+
218
+ Olivier J Henaff, Aravind Srinivas, Jeffrey De Fauw, Ali Razavi, Carl Doersch, SM Eslami, and ´ Aaron van den Oord. Data-efficient image recognition with contrastive predictive coding. arXiv preprint arXiv:1905.09272, 2019.
219
+
220
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
221
+
222
+ Alex Krizhevsky. One weird trick for parallelizing convolutional neural networks. arXiv preprint arXiv:1404.5997, 2014.
223
+
224
+ Tsung-Yi Lin, Piotr Dollar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. ´ Feature pyramid networks for object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2117–2125, 2017.
225
+
226
+ Ralph Linsker. Self-organization in a perceptual network. Computer, 21(3):105–117, 1988.
227
+
228
+ Ishan Misra and Laurens van der Maaten. Self-supervised learning of pretext-invariant representations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6707–6717, 2020.
229
+
230
+ Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
231
+
232
+ Chao Peng, Tete Xiao, Zeming Li, Yuning Jiang, Xiangyu Zhang, Kai Jia, Gang Yu, and Jian Sun. Megdet: A large mini-batch object detector. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 6181–6189, 2018.
233
+
234
+ Ben Poole, Sherjil Ozair, Aaron van den Oord, Alexander A Alemi, and George Tucker. On variational bounds of mutual information. arXiv preprint arXiv:1905.06922, 2019.
235
+
236
+ Yifan Sun, Changmao Cheng, Yuhan Zhang, Chi Zhang, Liang Zheng, Zhongdao Wang, and Yichen Wei. Circle loss: A unified perspective of pair similarity optimization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6398–6407, 2020.
237
+
238
+ Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. arXiv preprint arXiv:1906.05849, 2019.
239
+
240
+ Yonglong Tian, Chen Sun, Ben Poole, Dilip Krishnan, Cordelia Schmid, and Phillip Isola. What makes for good views for contrastive learning. arXiv preprint arXiv:2005.10243, 2020.
241
+
242
+ Michael Tschannen, Josip Djolonga, Paul K Rubenstein, Sylvain Gelly, and Mario Lucic. On mutual information maximization for representation learning. arXiv preprint arXiv:1907.13625, 2019.
243
+
244
+ Hao Wang, Yitong Wang, Zheng Zhou, Xing Ji, Dihong Gong, Jingchao Zhou, Zhifeng Li, and Wei Liu. Cosface: Large margin cosine loss for deep face recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 5265–5274, 2018.
245
+
246
+ Tongzhou Wang and Phillip Isola. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. arXiv preprint arXiv:2005.10242, 2020.
247
+
248
+ Xun Wang, Haozhi Zhang, Weilin Huang, and Matthew R Scott. Cross-batch memory for embedding learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6388–6397, 2020.
249
+
250
+ Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via nonparametric instance discrimination. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3733–3742, 2018.
251
+
252
+ Jiahao Xie, Xiaohang Zhan, Ziwei Liu, Yew Soon Ong, and Chen Change Loy. Delving into interimage invariance for unsupervised visual representations. arXiv preprint arXiv:2008.11702, 2020.
253
+
254
+ Yang You, Igor Gitman, and Boris Ginsburg. Large batch training of convolutional networks. arXiv preprint arXiv:1708.03888, 2017.
255
+
256
+ # A DETAILS ABOUT THEOREM 2
257
+
258
+ # A.1 PROOF OF EQ. 7
259
+
260
+ Given the equivalent condition (Eq. 5) and a query embedding q as well as the corresponding positive sample $\mathbf { k } _ { 0 }$ , for $\mathcal { L } _ { N C E }$ in Eq. 1 the expectation of the gradient norm w.r.t. $\mathbf { q }$ is bounded by:
261
+
262
+ $$
263
+ \underset { \mathbf { k } _ { i } \sim \mathcal { D } ^ { \prime } } { \mathbb { E } } \left. \frac { \mathrm { d } \mathcal { L } _ { N C E } } { \mathrm { d } \mathbf { q } } \right. \leq \frac { 2 } { \tau } \left( 1 - \frac { \exp ( \mathbf { q } ^ { \top } \mathbf { k } _ { 0 } / \tau ) } { \exp ( \mathbf { q } ^ { \top } \mathbf { k } _ { 0 } / \tau ) + \alpha \mathbb { E } _ { \mathbf { k } _ { i } \sim \mathcal { D } ^ { \prime } } [ \exp ( \mathbf { q } ^ { \top } \mathbf { k } _ { i } / \tau ) ] } \right) .
264
+ $$
265
+
266
+ Proof. For simplicity, we denote the term $\exp ( \mathbf { q } ^ { \top } \mathbf { k } _ { i } / \tau )$ as $s _ { i } ( i = 0 , \ldots , K )$ . Then $\mathcal { L } _ { N C E }$ can be rewritten as:
267
+
268
+ $$
269
+ \mathcal { L } _ { N C E } = - \log \frac { s _ { 0 } } { s _ { 0 } + \frac { \alpha } { K } \sum _ { i = 1 } ^ { K } s _ { i } }
270
+ $$
271
+
272
+ The gradient of $\mathcal { L } _ { N C E }$ with respect to $\mathbf { q }$ is easily to derived:
273
+
274
+ $$
275
+ \frac { \mathrm { d } \mathcal { L } _ { N C E } } { \mathrm { d } \mathbf { q } } = - \frac { 1 } { \tau } \left( 1 - \frac { s _ { 0 } } { s _ { 0 } + \frac { \alpha } { K } \sum _ { i = 1 } ^ { K } s _ { i } } \right) \mathbf { k } _ { 0 } + \frac { \alpha } { \tau K } \sum _ { i = 1 } ^ { K } \frac { s _ { 0 } } { s _ { 0 } + \frac { \alpha } { K } \sum _ { i = 1 } ^ { K } s _ { i } } \mathbf { k } _ { i } ,
276
+ $$
277
+
278
+ Owing to the Triangle Inequality and the fact that $\mathbf { k } _ { i } ( i = 0 , \ldots , K )$ is normalized, the norm of gradient is bounded by:
279
+
280
+ $$
281
+ \begin{array} { r l } { \displaystyle \left\| \frac { \mathrm { d } \mathcal { L } _ { N C E } } { \mathrm { d } \mathbf { q } } \right\| \leq \left| \frac { 1 } { \tau } \left( 1 - \frac { s _ { 0 } } { s _ { 0 } + \frac { \alpha } { K } \sum _ { i = 1 } ^ { K } s _ { i } } \right) \right| \cdot \| \mathbf { k } _ { 0 } \| + \displaystyle \sum _ { i = 1 } ^ { K } \left| \frac { \alpha } { \tau K } \frac { s _ { i } } { s _ { 0 } + \frac { \alpha } { K } \sum _ { i = 1 } ^ { K } s _ { i } } \right| \cdot \| \mathbf { k } _ { i } \| } & { } \\ { \displaystyle } & { = \frac { 1 } { \tau } \left( 1 - \frac { s _ { 0 } } { s _ { 0 } + \frac { \alpha } { K } \sum _ { i = 1 } ^ { K } s _ { i } } \right) + \frac { 1 } { \tau } \sum _ { i = 1 } ^ { K } \frac { \frac { \alpha } { K } s _ { i } } { s _ { 0 } + \frac { \alpha } { K } \sum _ { i = 1 } ^ { K } s _ { i } } } \\ { \displaystyle } & { = \frac { 2 } { \tau } \left( 1 - \frac { s _ { 0 } } { s _ { 0 } + \frac { \alpha } { K } \sum _ { i = 1 } ^ { K } s _ { i } } \right) } \end{array}
282
+ $$
283
+
284
+ Since the cosine similarity between q and $\mathbf { k } _ { i } ( i = 1 , \ldots , K )$ is bounded in $[ - 1 , 1 ]$ , we know the expectation of $\mathbb { E } _ { \mathbf { k } _ { i } \sim \mathcal { D } ^ { \prime } } \left[ s _ { i } \right]$ exists. According to Inequality (12) and Jensen’s Inequality, we have:
285
+
286
+ $$
287
+ \begin{array} { r l } { \underset { \mathbf { k } _ { i } \sim \mathcal { D } ^ { \prime } } { \mathbb { E } } \left[ \frac { 2 } { \tau } \left( 1 - \frac { s _ { 0 } } { s _ { 0 } + \frac { \alpha } { K } \sum _ { i = 1 } ^ { K } s _ { i } } \right) \right] } & { = \frac { 2 } { \tau } \left( 1 - \underset { \mathbf { k } _ { i } \sim \mathcal { D } ^ { \prime } } { \mathbb { E } } \left[ \frac { s _ { 0 } } { s _ { 0 } + \frac { \alpha } { K } \sum _ { i = 1 } ^ { K } s _ { i } } \right] \right) } \\ & { \leq \frac { 2 } { \tau } \left( 1 - \frac { s _ { 0 } } { s _ { 0 } + \alpha \mathbb { E } _ { \mathbf { k } _ { i } \sim \mathcal { D } ^ { \prime } } \left[ s _ { i } \right] } \right) } \end{array}
288
+ $$
289
+
290
+ Replacing $s _ { i }$ by $\exp ( \mathbf { q } ^ { \top } \mathbf { k } _ { i } / \tau )$ , the proof of Theorem 2 is completed.
291
+
292
+ ![](images/333fde6018cd5d18409f22ed2d80aac94c549f355e51d621b841868a960d9cb6.jpg)
293
+ Figure 4: The means (solid line) and variances (ribbon, $\pm \sigma ,$ ) of $\| \mathrm { d } \mathcal { L } _ { N C E } / \mathrm { d } \pmb { q } \|$ under different $K \mathrm { s }$ . We train a normal MoCo v2 for 200 epochs and show the statistics at different epochs.
294
+
295
+ # B MORE EXPERIMENTS ON SIMO
296
+
297
+ For the following experiments of this section, we report the top-1 accuracy of SiMo on ImageNet (Deng et al., 2009) under the linear evaluation protocol. The backbone of SiMo is ResNet-50 (He et al., 2016) and we train SiMo for 200 epochs unless noted otherwise.
298
+
299
+ # B.1 ABLATION ON MOMENTUM UPDATE
300
+
301
+ In MoCo (He et al., 2020) and MoCo v2 (Chen et al., 2020c), the key encoder is updated by the following rule:
302
+
303
+ $$
304
+ \theta _ { k } = \beta \theta _ { k } + \left( 1 - \beta \right) \theta _ { q }
305
+ $$
306
+
307
+ where $\theta _ { q }$ and $\theta _ { k }$ stand for the weights of query encoder and key encoder respectively, and $\beta$ is the momentum coefficient. For SiMo, we also adopt the momentum update and use the key encoder to compute the features of positive sample and negative samples.
308
+
309
+ In Table 3, we report the results of SiMo with different momentum coefficients. The number of training epochs is set to be 100, so the top-1 accuracy of baseline $\beta = 0 . 9 9 9 )$ drops to $6 4 . 4 \%$ . Compared to the baseline, SiMo without momentum update ( $\beta = 0$ ) is inferior, showing the advantage of momentum update.
310
+
311
+ Table 3: Ablation on momentum update.
312
+
313
+ <table><tr><td rowspan=1 colspan=1>β</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0.999</td></tr><tr><td rowspan=1 colspan=1>Accuracy (%)</td><td rowspan=1 colspan=1>62.1</td><td rowspan=1 colspan=1>64.4</td></tr></table>
314
+
315
+ # B.2 ABLATION ON BN
316
+
317
+ Table 4 shows the performance of SiMo equipped with shuffling BN or Sync BN. Likewise, we train SiMo for 100 epochs. It is easy to check out that SiMo with shuffling BN struggles to perform well. Besides, compared to MoCo v2, SiMo with shuffling BN degrades significantly, and we conjecture that it is because the MLP structure of SiMo is more suitable for Sync BN, rather than shuffling BN.
318
+
319
+ Table 4: Sync BN vs. shuffling BN.
320
+
321
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Shuffling BN</td><td rowspan=1 colspan=1>Sync BN</td></tr><tr><td rowspan=1 colspan=1>Accuracy (%)</td><td rowspan=1 colspan=1>58.8</td><td rowspan=1 colspan=1>64.4</td></tr></table>
322
+
323
+ # B.3 SIMO WITH DIFFERENT $\alpha$
324
+
325
+ As shown in Sec.2.1, $\alpha$ is related to the lower bound of mutual information. Table 5 reveals how accuracy of SiMo varies with the choice of $\alpha$ . As we increase $\alpha$ to 65536, the accuracy tends to improve, in accordance with the Eq.6. However, when $\alpha$ is too large (e.g., 262144), the performance slightly drops by $0 . 2 \%$ .
326
+
327
+ Table 5: SiMo with different $\alpha$ .
328
+
329
+ <table><tr><td rowspan=1 colspan=1>α</td><td rowspan=1 colspan=1>256</td><td rowspan=1 colspan=1>1024</td><td rowspan=1 colspan=1>4096</td><td rowspan=1 colspan=1>16384</td><td rowspan=1 colspan=1>65536</td><td rowspan=1 colspan=1>262144</td></tr><tr><td rowspan=1 colspan=1>Accuracy (%)</td><td rowspan=1 colspan=1>68.0</td><td rowspan=1 colspan=1>68.1</td><td rowspan=1 colspan=1>68.1</td><td rowspan=1 colspan=1>68.4</td><td rowspan=1 colspan=1>68.5</td><td rowspan=1 colspan=1>68.3</td></tr></table>
330
+
331
+ Similar results can be found in MoCo v2. We increase $K$ to 262144 in MoCo v2, the accuracy also descends (in Table 6).
332
+
333
+ Table 6: MoCo v2 with different $K$ .
334
+
335
+ <table><tr><td rowspan=1 colspan=1>K</td><td rowspan=1 colspan=1>256</td><td rowspan=1 colspan=1>1024</td><td rowspan=1 colspan=1>4096</td><td rowspan=1 colspan=1>16384</td><td rowspan=1 colspan=1>65536</td><td rowspan=1 colspan=1>262144</td></tr><tr><td rowspan=1 colspan=1>Accuracy (%)</td><td rowspan=1 colspan=1>67.0</td><td rowspan=1 colspan=1>67.1</td><td rowspan=1 colspan=1>67.6</td><td rowspan=1 colspan=1>67.3</td><td rowspan=1 colspan=1>67.5</td><td rowspan=1 colspan=1>67.4</td></tr></table>
336
+
337
+ # B.4 SIMO WITH WIDER MODELS
338
+
339
+ Results using wider models are presented in Table 7. For SiMo, the performance is further boosted with wider models (more channels). For instance, SiMo with ResNet-50 $( 2 \mathbf { x } )$ and ResNet-50 (4x) outperforms the baseline $( 6 8 . 5 \% )$ by $2 \%$ and $3 . 8 \%$ respectively.
340
+
341
+ <table><tr><td>Architecture</td><td>Param. (M)</td><td>α</td><td>Top-1 (%)</td></tr><tr><td>ResNet-50 (2x)</td><td>94</td><td>256</td><td>70.2</td></tr><tr><td>ResNet-50 (2x)</td><td>94</td><td>65536</td><td>70.5</td></tr><tr><td>ResNet-50 (4x)</td><td>375</td><td>256</td><td>71.9</td></tr><tr><td>ResNet-50 (4x)</td><td>375</td><td>65536</td><td>72.3</td></tr></table>
342
+
343
+ Table 7: SiMo with wider models. All models are trained with 200 epochs.
344
+
345
+ # B.5 TRANSFER TO OBJECT DETECTION
346
+
347
+ Setup We utilize FPN (Lin et al., 2017) with a stack of $4 \ 3 \times 3$ convolution layers in R-CNN head to validate the effectiveness of SiMo. Following the MoCo training protocol, we fine-tune with synchronized batch-normalization (Peng et al., 2018) across GPUs. The additional initialized layers are also equipped with BN for stable training. To effectively validate the transferability of the features, the training schedule is set to be 12 epochs (known as $1 \times$ ), in which learning rate is initialized as 0.2 and decreased at 7 and 11 epochs with a factor of 0.1. The image scales are random sampled of [640, 800] pixels during training and fixed with 800 at inference.
348
+
349
+ Results Table 8 summarizes the fine-tuning results on COCO val2017 of different pre-training methods. Random initialization indicates training COCO from scratch, and supervised represents conventional pre-training with ImageNet labels. Compared with MoCo, SiMo achieves competitive performance without large quantities of negative pairs. It is also on a par with the supervised counterpart and significantly outperforms random initialized one.
350
+
351
+ Table 8: Object detection fine-tuned on COCO.
352
+
353
+ <table><tr><td>pre-train</td><td>AP</td><td>AP50</td><td>AP75</td><td>APs</td><td>APm</td><td>AP</td></tr><tr><td>random init</td><td>31.4</td><td>49.4</td><td>34.0</td><td>17.9</td><td>32.3</td><td>41.6</td></tr><tr><td>supervised</td><td>39.0</td><td>59.1</td><td>42.6</td><td>22.4</td><td>42.2</td><td>50.6</td></tr><tr><td>MoCo v2</td><td>39.1</td><td>59.2</td><td>42.5</td><td>23.3</td><td>42.1</td><td>50.8</td></tr><tr><td>SiMo</td><td>39.0</td><td>59.2</td><td>42.3</td><td>22.9</td><td>41.8</td><td>50.5</td></tr></table>
354
+
355
+ # C A TOY EVALUATION OF EQCO
356
+
357
+ To evaluate the effectiveness of $\mathrm { E q C o }$ as mutual information (MI) estimator, following the configuration of Poole et al. (2019), we estimate the MI lower bound of between two simple random vectors.
358
+
359
+ Specifically, given that $( X , Y )$ are drawn from the known correlated Gaussian distribution, we calculate the lower bound of MI between $X$ and $Y$ based on their embedding. $X$ is a 20-dimensional random variables drawn from a standard Gaussian distribution. And we sampled $Y$ with the following rule:
360
+
361
+ $$
362
+ Y = \rho X + \sqrt { 1 - \rho ^ { 2 } } \epsilon
363
+ $$
364
+
365
+ where $\rho$ is a the given correlation coefficient and $\epsilon$ is a random variable sampled from a standard Gaussian distribution and independent from $X$ . With a known $\rho$ , the ground truth MI between $X$ and $Y$ is easy to compute:
366
+
367
+ $$
368
+ { \mathcal { T } } \left( X , Y \right) = - { \frac { d } { 2 } } \log \left( 1 - \rho ^ { 2 } \right)
369
+ $$
370
+
371
+ Here, $d$ is the dimension of $X$ and $Y$ , and as mentioned above we set $d = 2 0$ .
372
+
373
+ To embed $X$ and $Y$ , we adopt two MLPs respectively, and each MLP has 1 hidden layer of 256 units, followed by ReLU activation function. We use Adam optimizer with learning rate of 0.0005 to optimize InfoNCE or EqCo for 5000 steps. For each training iteration, $K$ pairs of $( X , Y )$ are independently sampled, which means there are $K - 1$ negative samples for each query. After training, the weights of MLPs are frozen and we repeat estimating the lower bound of MI for 1000 times to reduce the estimating variance. For experiments with EqCo, we set the $\alpha = 5 1 2$ .
374
+
375
+ As shown in Table 9, $\mathcal { T } _ { N C E }$ varies with $K$ , while $\mathcal { T } _ { E q C o }$ remains steady. Especially, when the ground truth MI is relatively large (e.g., 8, 10), significant differences between EqCo and InfoNCE can be observed. The experiment further validates the effectiveness of $\mathrm { E q C o }$ .
376
+
377
+ <table><tr><td colspan="5">K</td></tr><tr><td></td><td>64</td><td>128</td><td>256</td><td>512</td></tr><tr><td>Mutual Information=2.0 INCE</td><td>1.7</td><td>1.8</td><td>1.9</td><td>1.9</td></tr><tr><td>IEqCo</td><td>1.9</td><td>1.9</td><td>1.9</td><td>1.9</td></tr><tr><td>Mutual Information = 4.0 INCE</td><td>2.9</td><td>3.2</td><td>3.4</td><td>3.6</td></tr><tr><td>IEqCo Mutual Information = 6.0</td><td>3.8</td><td>3.7</td><td>3.6</td><td>3.6</td></tr><tr><td>INCE</td><td>3.6</td><td>4.1</td><td>4.5</td><td>4.9</td></tr><tr><td>IEqCo</td><td>5.1</td><td>5.0</td><td>4.9</td><td>4.9</td></tr><tr><td>Mutual Information=8.0</td><td></td><td></td><td></td><td></td></tr><tr><td>INCE</td><td>3.9</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>4.6</td><td>5.1</td><td>5.6</td></tr><tr><td>IEqCo</td><td>5.8</td><td>5.7</td><td>5.7</td><td>5.6</td></tr><tr><td>Mutual Information= 10.0</td><td></td><td></td><td></td><td></td></tr><tr><td>INCE IEqCo</td><td>4.1</td><td>4.7</td><td>5.4</td><td>6.0</td></tr></table>
378
+
379
+ Table 9: Estimating mutual information by InfoNCE and $\mathrm { E q C o }$ with different batch size and various ground truth mutual information.
parse/train/u8X280hw1Mt/u8X280hw1Mt_content_list.json ADDED
@@ -0,0 +1,1971 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "EQCO: EQUIVALENT RULES FOR SELF-SUPERVISED CONTRASTIVE LEARNING ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 823,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 171,
20
+ 398,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 236,
32
+ 544,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "In this paper, we propose a method, named EqCo (Equivalent Rules for Contrastive Learning), to make self-supervised learning irrelevant to the number of negative samples in the contrastive learning framework. Inspired by the InfoMax principle, we point that the margin term in contrastive loss needs to be adaptively scaled according to the number of negative pairs in order to keep steady mutual information bound and gradient magnitude. EqCo bridges the performance gap among a wide range of negative sample sizes, so that we can use only a few negative pairs (e.g. 16 per query) to perform self-supervised contrastive training on large-scale vision datasets like ImageNet, while with almost no accuracy drop. This is quite a contrast to the widely used large batch training or memory bank mechanism in current practices. Equipped with EqCo, our simplified MoCo (SiMo) achieves comparable accuracy with MoCo v2 on ImageNet (linear evaluation protocol) while only involves 16 negative pairs per query instead of 65536, suggesting that large quantities of negative samples might not be a critical factor in contrastive learning frameworks. ",
40
+ "bbox": [
41
+ 233,
42
+ 270,
43
+ 764,
44
+ 477
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION AND BACKGROUND",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 512,
55
+ 503,
56
+ 529
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Self-supervised learning has recently received much attention in the field of visual representation learning (Hadsell et al. (2006); Dosovitskiy et al. (2014); Oord et al. (2018); Bachman et al. (2019); Henaff et al. (2019); Wu et al. (2018); Tian et al. (2019); He et al. (2020); Misra & Maaten (2020); ´ Grill et al. (2020); Cao et al. (2020); Tian et al. (2020)), as its potential to learn universal representations from unlabeled data. Among various self-supervised methods, one of the most promising research paths is contrastive learning (Oord et al. (2018)), which has been demonstrated to achieve comparable or even better performances than supervised training for many downstream tasks such as image classification, object detection, and semantic segmentation (Chen et al., $2 0 2 0 \\mathrm { c }$ ; He et al., 2020; Chen et al., 2020a;b). ",
63
+ "bbox": [
64
+ 174,
65
+ 546,
66
+ 825,
67
+ 672
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "The core idea of contrastive learning is briefly summarized as follows: first, extracting a pair of embedding vectors $( \\mathbf { q } ( I ) , \\mathbf { k } ( I ) )$ (named query and key respectively) from the two augmented views of each instance $I$ ; then, learning to maximize the similarity of each positive pair $( \\mathbf { q } ( I ) , \\mathbf { k } ( I ) )$ while pushing the negative pairs $( \\mathbf { q } ( I ) , \\mathbf { k } ( I ^ { \\prime } ) )$ (i.e., query and key extracted from different instances accordingly) away from each other. To learn the representation, an InfoNCE loss (Oord et al. (2018); Wu et al. (2018)) is conventionally employed in the following formulation (slightly modified with an additional margin term): ",
74
+ "bbox": [
75
+ 173,
76
+ 679,
77
+ 825,
78
+ 776
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "equation",
84
+ "img_path": "images/02803e38b55b4eb50c2e068728b83b949947329ab7939332edbe89acdc933361.jpg",
85
+ "text": "$$\n\\mathcal { L } _ { N C E } = \\underset { \\mathbf { q } \\sim \\mathcal { D } , \\mathbf { k } _ { 0 } \\sim \\mathcal { D } ^ { \\prime } ( \\mathbf { q } ) , \\mathbf { k } _ { i } \\sim \\mathcal { D } ^ { \\prime } } { \\mathbb { E } } \\left[ - \\log \\frac { e ^ { ( \\mathbf { q } ^ { \\top } \\mathbf { k } _ { 0 } - m ) / \\tau } } { e ^ { ( \\mathbf { q } ^ { \\top } \\mathbf { k } _ { 0 } - m ) / \\tau } + \\sum _ { i = 1 } ^ { K } e ^ { \\mathbf { q } ^ { \\top } \\mathbf { k } _ { i } / \\tau } } \\right] ,\n$$",
86
+ "text_format": "latex",
87
+ "bbox": [
88
+ 263,
89
+ 786,
90
+ 732,
91
+ 830
92
+ ],
93
+ "page_idx": 0
94
+ },
95
+ {
96
+ "type": "text",
97
+ "text": "where $\\mathbf { q }$ and $\\mathbf { k } _ { i }$ $( i = 0 , \\ldots , K )$ stand for the query and keys sampled from the two (augmented) data distributions $\\mathcal { D }$ and $\\mathcal { D } ^ { \\prime }$ respectively. Specifically, $\\mathbf { k } _ { 0 }$ is associated to the same instance as q’s while other $\\mathbf { k } _ { i } \\mathbf { s }$ not; hence we name $\\mathbf { k } _ { 0 }$ and $\\mathbf { k } _ { i }$ $\\because 0$ ) positive sample and negative samples respectively in the remaining text, in which $K$ is the number of negative samples (or pairs) for each query. The temperature $\\tau$ and the margin $m$ are hyper-parameters. In most previous works, $m$ is trivially set to zero (e.g. Oord et al. (2018); He et al. (2020); Chen et al. (2020a); Tian et al. (2020)) or some handcraft values (e.g. Xie et al. (2020)). In the following text, we mainly study contrastive learning frameworks with InfoNCE loss as in Eq. 1 unless otherwise specified. ",
98
+ "bbox": [
99
+ 174,
100
+ 839,
101
+ 825,
102
+ 924
103
+ ],
104
+ "page_idx": 0
105
+ },
106
+ {
107
+ "type": "text",
108
+ "text": "",
109
+ "bbox": [
110
+ 173,
111
+ 103,
112
+ 823,
113
+ 132
114
+ ],
115
+ "page_idx": 1
116
+ },
117
+ {
118
+ "type": "text",
119
+ "text": "In contrastive learning research, it has been widely believed that enlarging the number of negative samples $K$ boosts the performance (Henaff et al. (2019); Tian et al. (2019); Bachman et al. (2019)). ´ For example, in MoCo (He et al. (2020)) the ImageNet accuracy rises from $5 4 . 7 \\%$ to $6 0 . 6 \\%$ under linear classification protocol when $K$ grows from 256 to 65536. Such observation further drives a line of studies how to effectively optimize under a number of negative pairs, such as memory bank methods (Wu et al. (2018); He et al. (2020)) and large batch training (Chen et al. (2020a)), either of which empirically reports superior performances when $K$ becomes large. Analogously, in the field of supervised metric learning (Deng et al. (2019); Wang et al. (2018); Sun et al. (2020); Wang et al. (2020)), loss in the similar form as Eq. 1 is often applied on a lot of negative pairs for hard negative mining. Besides, there are also a few theoretical studies supporting the viewpoint. For instance, Oord et al. (2018) points out that the mutual information between the positive pair tends to increase with the number of negative pairs $K$ ; Wang $\\&$ Isola (2020) find that the negative pairs encourage features’ uniformity on the hypersphere; Chuang et al. (2020) suggests that large $K$ leads to more precise estimation of the debiased contrastive loss; etc. ",
120
+ "bbox": [
121
+ 174,
122
+ 138,
123
+ 825,
124
+ 333
125
+ ],
126
+ "page_idx": 1
127
+ },
128
+ {
129
+ "type": "text",
130
+ "text": "Despite the above empirical or theoretical evidence, however, we point out that the reason for using many negative pairs is still less convincing. First, unlike the metric learning mentioned above, in self-supervised learning, the negative terms $\\mathbf { k } _ { i }$ in Eq. 1 include both “true negative” (whose underlying class label is different from the query’s, similarly hereinafter) and “false negative” samples, since the actual ground truth label is not available. So, intuitively large K should not always be beneficial because the risk of false negative samples also increases (known as class collision problem). Arora et al. (2019) thus theoretically concludes that a large number of negative samples could not necessarily help. Second, some recent works have proven that by introducing new architectures (e.g., a predictor network in BYOL (Grill et al., 2020)), or designing new loss functions (e.g., Caron et al. (2020a); Ermolov et al. (2020)), state-of-the-art performance can still be obtained even without any explicit negative pairs. In conclusion, it is still an open question whether large quantities of negative samples are essential to contrastive learning. ",
131
+ "bbox": [
132
+ 174,
133
+ 339,
134
+ 825,
135
+ 507
136
+ ],
137
+ "page_idx": 1
138
+ },
139
+ {
140
+ "type": "text",
141
+ "text": "After referring to the above two aspects, we rise a question: is a large $\\kappa$ really essential in the contrastive learning framework? We propose to rethink the question from a different view: note that in Eq. 1, there are three hyper-parameters: the number of negative samples $K$ , temperature $\\tau$ , and margin $m$ . In most of previous empirical studies (He et al. (2020); Chen et al. (2020a)), only $K$ is changed while $\\tau$ and $m$ are usually kept constant. Do the optimal hyper-parameters of $\\tau$ and $m$ varies with $K ?$ If so, the performance gains observed from larger $K \\mathrm { s }$ may be a wrong interpretation – merely brought by suboptimal hyper-parameters’ choices for small $K \\mathrm { s }$ , rather than much of an essential. ",
142
+ "bbox": [
143
+ 173,
144
+ 513,
145
+ 825,
146
+ 625
147
+ ],
148
+ "page_idx": 1
149
+ },
150
+ {
151
+ "type": "text",
152
+ "text": "In the paper, we investigate the relationship among three hyper-parameters and suggest an equivalent rule: ",
153
+ "bbox": [
154
+ 173,
155
+ 632,
156
+ 823,
157
+ 660
158
+ ],
159
+ "page_idx": 1
160
+ },
161
+ {
162
+ "type": "equation",
163
+ "img_path": "images/054752b6d957f234992366cb4309e5e6374da1c3d4dd827c86f61a6f8b0f8bda.jpg",
164
+ "text": "$$\nm = \\tau { \\log } { \\frac { \\alpha } { K } } ,\n$$",
165
+ "text_format": "latex",
166
+ "bbox": [
167
+ 452,
168
+ 660,
169
+ 545,
170
+ 688
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "where $\\alpha$ is a constant. We find that if the margin $m$ is adaptively adjusted based on the above rule, the performance of contrastive learning is irrelevant to the size of $K$ , in a very large range (e.g. $K \\ge 1 6 )$ . For example, in MoCo framework, by introducing EqCo the performance gap between $K \\ : = \\ : 2 5 6$ and $K = 6 5 5 3 6$ (the best configuration reported in He et al. (2020)) almost disappears (from $6 . 1 \\%$ decrease to $0 . 2 \\%$ ). We call this method “Equivalent Rules for Contrastive learning” $( E q C o )$ . For completeness, as the other part of EqCo we point that adjusting the learning rate according to the conventional linear scaling rule satisfies the equivalence for different number of queries per batch. ",
177
+ "bbox": [
178
+ 173,
179
+ 693,
180
+ 825,
181
+ 806
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "Theoretically, following the InfoMax principle (Linsker (1988)) and the derivation in CPC (Oord et al. (2018)), we prove that in $E q C o$ , the lower bound of the mutual information keeps steady under various numbers of negative samples $K$ . Moreover, from the back-propagation perspective, we further prove that in such configuration the upper bound of the gradient norm is also free of ",
188
+ "bbox": [
189
+ 174,
190
+ 811,
191
+ 825,
192
+ 868
193
+ ],
194
+ "page_idx": 1
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "$K$ ’s scale. The proposed equivalent rule implies that, by assigning $\\alpha = K _ { 0 }$ , it can “mimic” the optimization behavior under $K _ { 0 }$ negative samples even if the physical number of negatives $K \\neq K _ { 0 }$ . ",
199
+ "bbox": [
200
+ 173,
201
+ 103,
202
+ 823,
203
+ 132
204
+ ],
205
+ "page_idx": 2
206
+ },
207
+ {
208
+ "type": "text",
209
+ "text": "The “equivalent” methodology of EqCo follows the well-known linear scaling rule (Krizhevsky (2014); Goyal et al. (2017)), which suggests scalinif the loss satisfies with the linear averaged form: $\\begin{array} { r } { L = \\frac { 1 } { N } \\sum _ { i = 1 } ^ { N } f ( x _ { i } ; \\theta ) } \\end{array}$ portional to the batch size. However, linear scaling includes two batch sizes (number of queries and keys respectively) while linear scaling rule only involves one, in addition to the nonlinearity of the keys in InfoNCE loss. In the experiments of SimCLR (Chen et al. (2020a)), learning rates under different batch sizes are adjusted with linear scaling rule, but the accuracy gap is still very large $5 7 . 5 \\% @$ batch $= 2 5 6$ vs. $6 4 + \\% \\textcircled { a }$ batc $_ { 1 = 8 1 9 2 }$ , 100 epochs training). ",
210
+ "bbox": [
211
+ 173,
212
+ 138,
213
+ 825,
214
+ 267
215
+ ],
216
+ "page_idx": 2
217
+ },
218
+ {
219
+ "type": "text",
220
+ "text": "EqCo challenges the belief that self-supervised contrastive learning requires large quantities of negative pairs to obtain competitive performance, making it possible to design simpler algorithms. We thus present SiMo, a simplified contrastive learning framework based on $M o C o \\ \\nu 2$ (Chen et al. (2020c)). SiMo is elegant, efficient, free of large batch training and memory bank; moreover, it can achieve superior performances over state-of-the-art even if the number of negative pairs is extremely small (e.g. 16), without bells and whistles. ",
221
+ "bbox": [
222
+ 174,
223
+ 273,
224
+ 825,
225
+ 357
226
+ ],
227
+ "page_idx": 2
228
+ },
229
+ {
230
+ "type": "text",
231
+ "text": "The contributions of our paper are summarized as follows: ",
232
+ "bbox": [
233
+ 174,
234
+ 364,
235
+ 557,
236
+ 378
237
+ ],
238
+ "page_idx": 2
239
+ },
240
+ {
241
+ "type": "text",
242
+ "text": "• We challenge the widely accepted belief that on large-scale vision datasets like ImageNet, large size of negative samples is critical for contrastive learning. We interpret it from a different view: it may be because the hyper-parameters are not set to the optimum. • We propose EqCo, an equivalent rule to adaptively set hyper-parameters between small and large numbers of negative samples, which proves to bridge the performance gap. • We present SiMo, a simpler but stronger baseline for contrastive learning. ",
243
+ "bbox": [
244
+ 215,
245
+ 391,
246
+ 825,
247
+ 489
248
+ ],
249
+ "page_idx": 2
250
+ },
251
+ {
252
+ "type": "text",
253
+ "text": "2 EQCO: EQUIVALENT RULES FOR CONTRASTIVE LEARNING ",
254
+ "text_level": 1,
255
+ "bbox": [
256
+ 174,
257
+ 510,
258
+ 699,
259
+ 526
260
+ ],
261
+ "page_idx": 2
262
+ },
263
+ {
264
+ "type": "text",
265
+ "text": "In this section we introduce EqCo. We mainly consider the circumstance of optimizing the InfoNCE loss (Eq. 1) with SGD. For each batch of training, there are two meanings of the concept “batch size”, i.e., the size of negative samples/pairs $K$ per query, and the number of queries (or positive pairs) $N$ per batch. Hence our equivalent rules accordingly consist of two parts, which will be introduced in the next subsections. ",
266
+ "bbox": [
267
+ 174,
268
+ 542,
269
+ 825,
270
+ 613
271
+ ],
272
+ "page_idx": 2
273
+ },
274
+ {
275
+ "type": "text",
276
+ "text": "2.1 THE CASE OF NEGATIVE PAIRS ",
277
+ "text_level": 1,
278
+ "bbox": [
279
+ 176,
280
+ 631,
281
+ 431,
282
+ 646
283
+ ],
284
+ "page_idx": 2
285
+ },
286
+ {
287
+ "type": "text",
288
+ "text": "Our derivation is mainly inspired by the model of Contrastive Predictive Coding (CPC) (Oord et al. (2018)), in which InfoNCE loss is interpreted as a mutual information estimator. We further extend the method so that it is applicable to InfoNCE loss with a margin term (Eq. 1), which is not considered in Oord et al. (2018). ",
289
+ "bbox": [
290
+ 174,
291
+ 659,
292
+ 823,
293
+ 714
294
+ ],
295
+ "page_idx": 2
296
+ },
297
+ {
298
+ "type": "text",
299
+ "text": "Following the concept in Oord et al. (2018), given a query embedding q (namely the context in Oord et al. (2018)) and suppose $K + 1$ random key embeddings $\\textbf { x } = \\{ \\mathbf { x } _ { i } \\} _ { i = 0 , \\dots , K }$ , where there exists exactly one entry (e.g., ${ \\bf x } _ { i }$ ) sampled from the conditional distribution $\\mathbf { P } ( \\mathbf { x } _ { i } | \\mathbf { q } )$ while others (e.g., $\\mathbf { x } _ { j }$ ) sampled from the “proposal” distribution $\\mathrm { P } ( \\mathbf { x } _ { j } )$ independently. According to which entry corresponds to the conditional distribution, we therefore defines $K + 1$ candidate distributions for $\\mathbf { x }$ (denoted by $\\{ H _ { i } \\} _ { i = 0 , . . . , K } )$ , where the probability density of $\\mathbf { x }$ under $H _ { i }$ is $\\begin{array} { r } { \\mathrm { P } _ { H _ { i } } ( \\mathbf { x } ) = \\mathrm { P } ( \\mathbf { x } _ { i } | \\mathbf { q } ) \\prod _ { j \\neq i } \\mathrm { P } ( \\mathbf { x } _ { j } ) } \\end{array}$ . So, given the observed data $X = \\{ \\mathbf { k } _ { 0 } , \\ldots , \\mathbf { k } _ { K } \\}$ of $\\mathbf { x }$ , the probability where $\\mathbf { x }$ is sampled from $H _ { 0 }$ rather than other candidates is thus derived with Bayes theorem: ",
300
+ "bbox": [
301
+ 173,
302
+ 720,
303
+ 825,
304
+ 835
305
+ ],
306
+ "page_idx": 2
307
+ },
308
+ {
309
+ "type": "equation",
310
+ "img_path": "images/42192e28410748e53921acdbab47f90276dc611f9dcdf732b8bc0f01f120e017.jpg",
311
+ "text": "$$\n\\begin{array} { r l } & { \\mathrm { P r } [ { \\bf x } \\sim H _ { 0 } | { \\bf q } , X ] = \\frac { { \\bf P } ^ { + } { \\bf P } _ { H _ { 0 } } ( X ) } { { \\bf P } ^ { + } { \\bf P } _ { H _ { 0 } } ( X ) + { \\bf P } ^ { - } \\sum _ { i = 1 } ^ { K } { \\bf P } _ { H _ { i } } ( X ) } } \\\\ & { \\qquad = \\frac { \\frac { { \\bf P } ^ { + } } { { \\bf P } ^ { - } } \\frac { { \\bf P } ( { \\bf k } _ { 0 } | { \\bf q } ) } { { \\bf P } ( { \\bf k } _ { 0 } ) } } { \\frac { { \\bf P } ^ { + } } { { \\bf P } ^ { - } } \\frac { { \\bf P } ( { \\bf k } _ { 0 } | { \\bf q } ) } { { \\bf P } ( { \\bf k } _ { 0 } ) } + \\sum _ { i = 1 } ^ { K } \\frac { { \\bf P } ( { \\bf k } _ { i } | { \\bf q } ) } { { \\bf P } ( { \\bf k } _ { i } ) } } , } \\end{array}\n$$",
312
+ "text_format": "latex",
313
+ "bbox": [
314
+ 320,
315
+ 842,
316
+ 676,
317
+ 930
318
+ ],
319
+ "page_idx": 2
320
+ },
321
+ {
322
+ "type": "text",
323
+ "text": "where we denote $\\mathrm { P } ^ { + }$ and $\\mathrm { { \\bf P } } ^ { - }$ as the prior probabilities of $H _ { 0 }$ and $H _ { i } ( i > 0 )$ respectively. We point that Eq. 2 introduces a generalized form to that in Oord et al. (2018) by taking the priors into account. Referring to the notations in Eq. 1, we suppose that $H _ { 0 }$ is the ground truth distribution of $\\mathbf { x }$ (since $\\mathbf { k } _ { 0 }$ is the only positive sample). By modeling the density ratio $\\begin{array} { r } { \\tilde { \\bf P } ( \\bar { \\bf k } _ { i } | { \\bf q } ) / { \\bf P } ( \\bf k _ { i } ) \\propto \\boldsymbol { e } ^ { \\bf q ^ { \\top } \\bf k } \\boldsymbol { i } / \\tau ( i = 0 , \\ldots , K ) } \\end{array}$ and letting $\\mathrm { P } ^ { + } / \\mathrm { P } ^ { - } = e ^ { - m / \\tau }$ , the negative log-likelihood $\\mathcal { L } _ { o p t } \\triangleq \\mathbb { E } _ { \\mathbf { q } , X } \\ - \\log \\operatorname* { P r } [ x \\sim H _ { 0 } | \\mathbf { q } , X ]$ can be regarded as the optimal value of $\\mathcal { L } _ { N C E }$ . ",
324
+ "bbox": [
325
+ 173,
326
+ 102,
327
+ 825,
328
+ 194
329
+ ],
330
+ "page_idx": 3
331
+ },
332
+ {
333
+ "type": "text",
334
+ "text": "Similar to the methodology of Oord et al. (2018), we explore the lower bound of $\\mathcal { L } _ { o p t }$ : ",
335
+ "bbox": [
336
+ 171,
337
+ 198,
338
+ 740,
339
+ 214
340
+ ],
341
+ "page_idx": 3
342
+ },
343
+ {
344
+ "type": "equation",
345
+ "img_path": "images/6d92da356992151da914fc5274e5a44aedc0a073f0c766c8da2ee9f5dbd0d847.jpg",
346
+ "text": "$$\n\\begin{array} { l } { \\mathcal { L } _ { o p t } = \\underset { \\mathbf { q } \\sim \\mathcal { D } , \\mathbf { k } _ { 0 } \\sim \\mathcal { D } ^ { \\prime } ( \\mathbf { q } ) , \\mathbf { k } _ { i } \\sim \\mathcal { D } ^ { \\prime } } { \\mathbb { E } } \\log \\left( 1 + e ^ { m / \\tau } \\frac { \\mathbf { P } ( \\mathbf { k } _ { 0 } ) } { \\mathbf { \\bar { P } } \\left( \\mathbf { k } _ { 0 } | \\mathbf { q } \\right) } \\underset { i = 1 } { \\overset { K } { \\sum } } \\frac { \\mathbf { P } ( \\mathbf { k } _ { i } | \\mathbf { q } ) } { \\mathbf { \\bar { P } } \\left( \\mathbf { k } _ { i } \\right) } \\right) } \\\\ { \\approx \\underset { \\mathbf { q } \\sim \\mathcal { D } , \\mathbf { k } _ { 0 } \\sim \\mathcal { D } ^ { \\prime } ( \\mathbf { q } ) } { \\mathbb { E } } \\log \\left( 1 + K e ^ { m / \\tau } \\frac { \\mathbf { P } \\left( \\mathbf { k } _ { 0 } \\right) } { \\mathbf { \\bar { P } } \\left( \\mathbf { k } _ { 0 } | \\mathbf { q } \\right) } \\left( \\underset { \\mathbf { k } _ { i } \\sim \\mathcal { D } ^ { \\prime } } { \\mathbb { E } } \\frac { \\mathbf { \\bar { P } } \\left( \\mathbf { k } _ { i } | \\mathbf { q } \\right) } { \\mathbf { \\bar { P } } \\left( \\mathbf { k } _ { i } \\right) } \\right) \\right) } \\\\ { = \\underset { \\mathbf { q } \\sim \\mathcal { D } , \\mathbf { k } _ { 0 } \\sim \\mathcal { D } ^ { \\prime } ( \\mathbf { q } ) } { \\mathbb { E } } \\log \\left( 1 + K e ^ { m / \\tau } \\frac { \\mathbf { \\bar { P } } \\left( \\mathbf { k } _ { 0 } \\right) } { \\mathbf { \\bar { P } } \\left( \\mathbf { k } _ { 0 } | \\mathbf { q } \\right) } \\right) } \\\\ { \\geq \\log \\left( 1 + K e ^ { m / \\tau } \\right) - \\mathcal { Z } ( \\mathbf { k } _ { 0 } , \\mathbf { q } ) , } \\end{array}\n$$",
347
+ "text_format": "latex",
348
+ "bbox": [
349
+ 271,
350
+ 220,
351
+ 727,
352
+ 358
353
+ ],
354
+ "page_idx": 3
355
+ },
356
+ {
357
+ "type": "text",
358
+ "text": "where $\\mathcal { T } ( \\cdot , \\cdot )$ means mutual information. The approximation in the second row is guaranteed by Law of Large Numbers as well as the fact $\\mathbf { P } ( \\mathbf { k } _ { i } | \\mathbf { \\bar { q } } ) \\approx \\mathbf { P } ( \\mathbf { k } _ { i } )$ since $\\mathbf { k } _ { i } ( i > 0 )$ and $\\mathbf { q }$ are “almost” independent. The inequality in the last row is resulted from $\\mathbf { P } ( \\mathbf { k } _ { 0 } | \\mathbf { q } ) \\ge \\mathbf { P } ( \\mathbf { k } _ { 0 } )$ as $\\mathbf { k } _ { 0 }$ and $\\mathbf { q }$ are extracted from the same instance. Therefore the lower bound of the mutual information (noted as $f _ { \\mathrm { b o u n d } } ( m , K ) )$ between the positive pair $( \\mathbf { k } _ { 0 } , \\mathbf { q } )$ is: ",
359
+ "bbox": [
360
+ 174,
361
+ 361,
362
+ 823,
363
+ 433
364
+ ],
365
+ "page_idx": 3
366
+ },
367
+ {
368
+ "type": "equation",
369
+ "img_path": "images/7b768a827846db834384551401d9384d14c5921d8329e624155ca16481aada1f.jpg",
370
+ "text": "$$\n\\begin{array} { r l r } & { } & { \\mathcal { Z } ( { \\bf k } _ { 0 } , { \\bf q } ) \\ge f _ { \\mathrm { b o u n d } } ( m , K ) \\triangleq \\log ( 1 + K e ^ { m / \\tau } ) - \\mathcal { L } _ { o p t } } \\\\ & { } & { \\approx \\log ( 1 + K e ^ { m / \\tau } ) - \\underset { { \\bf q } \\sim \\mathcal { D } , { \\bf k } _ { 0 } \\sim \\mathcal { D } ^ { \\prime } ( { \\bf q } ) } { \\mathbb { E } } \\log \\left( 1 + K e ^ { m / \\tau } \\frac { { \\bf P } ( { \\bf k } _ { 0 } ) } { { \\bf P } ( { \\bf k } _ { 0 } | { \\bf q } ) } \\right) . } \\end{array}\n$$",
371
+ "text_format": "latex",
372
+ "bbox": [
373
+ 187,
374
+ 435,
375
+ 790,
376
+ 493
377
+ ],
378
+ "page_idx": 3
379
+ },
380
+ {
381
+ "type": "text",
382
+ "text": "So, minimizing $\\mathcal { L } _ { N C E }$ (Eq. 1) towards $\\mathcal { L } _ { o p t }$ implies maximizing the lower bound of the mutual information, which is also satisfied when $\\bar { m } \\neq 0$ . In the case of $m = 0$ , the result is consistent with that in Oord et al. (2018). Oord et al. (2018) further points out the bound increases with $K$ , which indicates larger $K$ encourages to learn more mutual information thus could help to improve the performance. ",
383
+ "bbox": [
384
+ 174,
385
+ 497,
386
+ 825,
387
+ 568
388
+ ],
389
+ "page_idx": 3
390
+ },
391
+ {
392
+ "type": "text",
393
+ "text": "Nevertheless, different from Oord et al. (2018) our model does not require $m$ to be zero, so the lower bound in Eq. 4 is also a function of $e ^ { m / \\tau }$ . Thus we have the following theorem: ",
394
+ "bbox": [
395
+ 174,
396
+ 573,
397
+ 823,
398
+ 604
399
+ ],
400
+ "page_idx": 3
401
+ },
402
+ {
403
+ "type": "text",
404
+ "text": "Theorem 1. (Main, EqCo for negative pairs) The mutual information lower bound of InfoNCE loss in Eq. 1 is irrelevant to the number of negative pairs $K$ , if ",
405
+ "bbox": [
406
+ 171,
407
+ 618,
408
+ 823,
409
+ 647
410
+ ],
411
+ "page_idx": 3
412
+ },
413
+ {
414
+ "type": "equation",
415
+ "img_path": "images/1e9e9a8b61e7924b8106d916cb4b1578b86b5ff25462d13647c891209ec8e297.jpg",
416
+ "text": "$$\nm = \\tau { \\log } { \\frac { \\alpha } { K } } ,\n$$",
417
+ "text_format": "latex",
418
+ "bbox": [
419
+ 452,
420
+ 651,
421
+ 545,
422
+ 679
423
+ ],
424
+ "page_idx": 3
425
+ },
426
+ {
427
+ "type": "text",
428
+ "text": "where $\\alpha$ is a constant coefficient. And in the circumstances the bound is given by: ",
429
+ "bbox": [
430
+ 176,
431
+ 683,
432
+ 710,
433
+ 698
434
+ ],
435
+ "page_idx": 3
436
+ },
437
+ {
438
+ "type": "equation",
439
+ "img_path": "images/cdf4222fa364eb9f4438e055a1a7a29d43f26c67ba9d389ea042d78c16c31519.jpg",
440
+ "text": "$$\nf _ { \\mathrm { b o u n d } } \\left( \\tau \\mathrm { l o g } \\frac { \\alpha } { K } , K \\right) \\approx \\mathrm { l o g } ( 1 + \\alpha ) - \\underset { \\mathbf { q } \\sim \\mathcal { D } , \\mathbf { k } _ { 0 } \\sim \\mathcal { D } ^ { \\prime } ( \\mathbf { q } ) } { \\mathbb { E } } \\mathrm { l o g } \\left( 1 + \\alpha \\frac { \\mathbf { P } ( \\mathbf { k } _ { 0 } ) } { \\mathbf { P } ( \\mathbf { k } _ { 0 } | \\mathbf { q } ) } \\right) \\approx f _ { \\mathrm { b o u n d } } ( 0 , \\alpha ) ,\n$$",
441
+ "text_format": "latex",
442
+ "bbox": [
443
+ 196,
444
+ 702,
445
+ 781,
446
+ 737
447
+ ],
448
+ "page_idx": 3
449
+ },
450
+ {
451
+ "type": "text",
452
+ "text": "which can be immediately obtained by substituting Eq. 5 into Eq. 4. We name Eq. 5 as “equivalent condition”. ",
453
+ "bbox": [
454
+ 176,
455
+ 741,
456
+ 825,
457
+ 770
458
+ ],
459
+ "page_idx": 3
460
+ },
461
+ {
462
+ "type": "text",
463
+ "text": "Theorem 1 suggests a property of equivalency: under the condition of Eq. 5, no matter what the number of physical negative pairs $K$ is, the optimal solution of $\\mathcal { L } _ { N C E }$ (Eq. 1) is “equivalent” in the sense of the same mutual information lower bound. The bound is controlled by a hyper-parameter $\\alpha$ rather than $K$ . Eq. 6 further implies that the lower bound also correlates to the configuration of $K = \\alpha$ without margin, which suggests we can “mimic” the InfoNCE loss’s behavior of $K = K _ { 0 }$ under a different physical negative sample size $K _ { 1 }$ , just by applying Eq. 5 with $\\alpha = K _ { 0 }$ . It inspires us to simplify the existing state-of-the-art frameworks (e.g. MoCo (He et al. (2020))) with fewer negative samples but as accurate as the original configurations, which will be introduced next. ",
464
+ "bbox": [
465
+ 173,
466
+ 776,
467
+ 825,
468
+ 890
469
+ ],
470
+ "page_idx": 3
471
+ },
472
+ {
473
+ "type": "text",
474
+ "text": "We empirically validate Theorem 1 as follows. Notice that $f _ { \\mathrm { b o u n d } }$ is difficult to calculate directly because $\\mathcal { L } _ { o p t }$ is not known. Instead, we plot the empirical mutual information lower bound $\\hat { f } _ { \\mathrm { { b o u n d } } } ( m , K ) \\triangleq \\log ( 1 + K e ^ { m / \\tau } ) - \\mathcal { L } _ { N C E }$ . So, we have $\\hat { f } _ { \\mathrm { { b o u n d } } } \\leq f _ { \\mathrm { { b o u n d } } }$ ; when $\\mathcal { L } _ { N C E }$ converges to the optimum $\\mathcal { L } _ { o p t }$ , $\\hat { f } _ { \\mathrm { b o u n d } }$ is an approximation of $f _ { \\mathrm { b o u n d } }$ . In Fig. 1, we plot the evolution of $\\hat { f } _ { \\mathrm { { b o u n d } } }$ during the training of $M o C o \\ \\nu 2$ under different configurations. Obviously, when it converges, without EqCo $\\hat { f } _ { \\mathrm { b o u n d } }$ keeps increasing with the number of negative pairs $K$ ; in contrast, after applying the equivalent condition (Eq. 5) $\\hat { f } _ { \\mathrm { { b o u n d } } }$ converges to almost the same value under different $K \\mathrm { s }$ . The empirical results are thus consistent with Theorem 1. ",
475
+ "bbox": [
476
+ 173,
477
+ 895,
478
+ 823,
479
+ 924
480
+ ],
481
+ "page_idx": 3
482
+ },
483
+ {
484
+ "type": "image",
485
+ "img_path": "images/cca9754868e1b928436bbfd2defab666939fbe5da68708c15cab39390939d953.jpg",
486
+ "image_caption": [
487
+ "Figure 1: Evolution of the empirical mutual information lower bound $\\hat { f } _ { \\mathrm { { b o u n d } } }$ during training. We use $\\alpha = 6 5 5 3 6$ for EqCo. Results are evaluated with MoCo $\\nu 2$ on ImageNet. Refer to Theorem 1 for details. Best viewed in color. "
488
+ ],
489
+ "image_footnote": [],
490
+ "bbox": [
491
+ 209,
492
+ 103,
493
+ 787,
494
+ 306
495
+ ],
496
+ "page_idx": 4
497
+ },
498
+ {
499
+ "type": "text",
500
+ "text": "",
501
+ "bbox": [
502
+ 173,
503
+ 386,
504
+ 825,
505
+ 479
506
+ ],
507
+ "page_idx": 4
508
+ },
509
+ {
510
+ "type": "text",
511
+ "text": "Remarks 1. The equivalent condition in Eq. 5 suggests the margin $m$ is inversely correlated with $K$ . It is intuitive, because the larger $K$ is, the more risks of class collision (Arora et al. (2019)) it suffers from, so we need to avoid over-penalty for negative samples near the query, thus smaller $m$ is used; in contrast, if $K$ is very small, we use larger $m$ to exploit more “hard” negative samples. ",
512
+ "bbox": [
513
+ 174,
514
+ 494,
515
+ 825,
516
+ 551
517
+ ],
518
+ "page_idx": 4
519
+ },
520
+ {
521
+ "type": "text",
522
+ "text": "Besides, recall that the margin term $e ^ { m / \\tau }$ is defined as the ratio of the prior probabilities $\\mathrm { P ^ { - } / P ^ { + } }$ in Eq. 2. If the equivalent condition Eq. 5 satisfies, i.e., $\\mathsf { P } ^ { - } / \\mathsf { P } ^ { + } = \\alpha / K$ , we have $\\mathsf { P } ^ { + } = 1 / ( 1 + \\alpha )$ (notice that $K \\mathsf { P } ^ { - } + \\mathsf { P } ^ { + } \\equiv 1 ,$ ), suggesting that the prior probability of the ground truth distribution $H _ { 0 }$ is supposed to be a constant ignoring the number of negative samples $K$ . While in previous works (usually without the margin term, or $m = 0$ ) we have $\\mathbf { \\bar { P } } ^ { + } = 1 / ( \\mathbf { \\bar { K } } + 1 )$ . It is hard to distinguish which prior is more reasonable. However at least, we intuitively suppose keeping a constant prior for the ground truth distribution may help to keep the optimal choices of hyper-parameters steady under different $K \\mathrm { s }$ , which is also consistent with our empirical observations. ",
523
+ "bbox": [
524
+ 173,
525
+ 558,
526
+ 825,
527
+ 672
528
+ ],
529
+ "page_idx": 4
530
+ },
531
+ {
532
+ "type": "text",
533
+ "text": "Remarks 2. In Theorem 1, it is worth noting that $K$ refers to the number of negative samples per query. In the conventional batched training scheme, negative samples for different queries could be either (fully or partially) shared or isolated, i.e., the total number of distinguishing negatives samples per batch could be different, which is not ruled by Theorem 1. However, we empirically find the differences in implementation do not result in much of the performance variation. ",
534
+ "bbox": [
535
+ 173,
536
+ 688,
537
+ 825,
538
+ 758
539
+ ],
540
+ "page_idx": 4
541
+ },
542
+ {
543
+ "type": "text",
544
+ "text": "The following theorem further supports the equivalent rule (Theorem 1) from back-propagation view: ",
545
+ "bbox": [
546
+ 173,
547
+ 763,
548
+ 823,
549
+ 792
550
+ ],
551
+ "page_idx": 4
552
+ },
553
+ {
554
+ "type": "text",
555
+ "text": "Theorem 2. Given the equivalent condition (Eq. 5) and a query embedding q as well as the corresponding positive sample $\\mathbf { k } _ { 0 }$ , for $\\mathcal { L } _ { N C E }$ in Eq. 1 the expectation of the gradient norm w.r.t. $\\mathbf { q }$ is bounded by 2: ",
556
+ "bbox": [
557
+ 174,
558
+ 806,
559
+ 825,
560
+ 849
561
+ ],
562
+ "page_idx": 4
563
+ },
564
+ {
565
+ "type": "equation",
566
+ "img_path": "images/bd82c4f4462a12c3085fa7127324b904203a7b6594f99da88c3a9d3f22c30541.jpg",
567
+ "text": "$$\n\\underset { \\mathbf { k } _ { i } \\sim \\mathcal { D } ^ { \\prime } } { \\mathbb { E } } \\left. \\frac { \\mathrm { d } \\mathcal { L } _ { N C E } } { \\mathrm { d } \\mathbf { q } } \\right. \\leq \\frac { 2 } { \\tau } \\left( 1 - \\frac { \\exp ( \\mathbf { q } ^ { \\top } \\mathbf { k } _ { 0 } / \\tau ) } { \\exp ( \\mathbf { q } ^ { \\top } \\mathbf { k } _ { 0 } / \\tau ) + \\alpha \\mathbb { E } _ { \\mathbf { k } _ { i } \\sim \\mathcal { D } ^ { \\prime } } [ \\exp ( \\mathbf { q } ^ { \\top } \\mathbf { k } _ { i } / \\tau ) ] } \\right) .\n$$",
568
+ "text_format": "latex",
569
+ "bbox": [
570
+ 251,
571
+ 853,
572
+ 746,
573
+ 890
574
+ ],
575
+ "page_idx": 4
576
+ },
577
+ {
578
+ "type": "text",
579
+ "text": "Please refer to the Appendix A.1 for the detailed proof. Note that we assume the embedding vectors are normalized, i.e., $\\| \\mathbf { k } _ { i } \\| = 1 ( i = 0 , \\cdot \\cdot \\cdot , K )$ , which is also a convention in recent contrastive learning works. ",
580
+ "bbox": [
581
+ 176,
582
+ 103,
583
+ 821,
584
+ 145
585
+ ],
586
+ "page_idx": 5
587
+ },
588
+ {
589
+ "type": "text",
590
+ "text": "Theorem 2 indicates that, equipped with the equivalent rule (Eq. 5), the upper bound of the gradient norm is irrelevant to the number of negative samples $K$ . Fig. 4 (see the Appendix A.2) further validates our theory: the gradient norm becomes much more steady after using EqCo under different $K \\mathrm { s }$ . Since the size of $K$ affects little on the gradient magnitude, gradient scaling techniques, e.g. linear scaling rule, are not required specifically for different $K \\mathrm { s } .$ . Eq. 7 also implies that the temperature $\\tau$ significantly affects the gradient norm even EqCo is applied – it is why we only recommend to modify $m$ for equivalence (Eq. 5), though the mutual information lower bound is determined by $e ^ { m / \\tau }$ as a whole. ",
591
+ "bbox": [
592
+ 173,
593
+ 152,
594
+ 825,
595
+ 265
596
+ ],
597
+ "page_idx": 5
598
+ },
599
+ {
600
+ "type": "text",
601
+ "text": "2.2 THE CASE OF POSITIVE PAIRS ",
602
+ "text_level": 1,
603
+ "bbox": [
604
+ 176,
605
+ 282,
606
+ 426,
607
+ 297
608
+ ],
609
+ "page_idx": 5
610
+ },
611
+ {
612
+ "type": "text",
613
+ "text": "In practice the InfoNCE loss (Eq. 1) is usually optimized with batched SGD, which can be represented as empirical risk minimization: ",
614
+ "bbox": [
615
+ 174,
616
+ 309,
617
+ 820,
618
+ 337
619
+ ],
620
+ "page_idx": 5
621
+ },
622
+ {
623
+ "type": "equation",
624
+ "img_path": "images/4053d3faab87f67755e7bad009a1bd3139ff348b67ff6d385c0ff80022ea0ceb.jpg",
625
+ "text": "$$\n\\mathcal { L } _ { N C E } ^ { \\mathrm { b a t c h } } = \\frac { 1 } { N } \\sum _ { j = 1 } ^ { N } \\mathcal { L } _ { N C E } ^ { ( j ) } ( \\mathbf { q } _ { j } , \\mathbf { k } _ { j , 0 } ) ,\n$$",
626
+ "text_format": "latex",
627
+ "bbox": [
628
+ 383,
629
+ 344,
630
+ 612,
631
+ 390
632
+ ],
633
+ "page_idx": 5
634
+ },
635
+ {
636
+ "type": "text",
637
+ "text": "where $N$ is the number of queries (or positive pairs) per batch; $( { \\bf q } _ { j } , { \\bf k } _ { j , 0 } ) \\sim ( { \\cal D } , { \\cal D } ^ { \\prime } ( { \\bf q } _ { j } ) )$ is the $j$ -th positive pair, and ndependent of each $\\mathcal { L } _ { N C E } ^ { ( j ) } ( \\mathbf { q } _ { j } , \\mathbf { k } _ { j , 0 } )$ is the corresponding loss. For different is sampled independently. Hence, Eq. $j$ , 8 $\\mathcal { L } _ { N C E } ^ { ( j ) }$ is (almost)es the form ${ \\bf q } _ { j }$ of linear scaling rule (Krizhevsky (2014); Goyal et al. (2017)), suggesting that the learning rate should be adjusted proportional to the number of queries $N$ per batch. ",
638
+ "bbox": [
639
+ 173,
640
+ 397,
641
+ 825,
642
+ 472
643
+ ],
644
+ "page_idx": 5
645
+ },
646
+ {
647
+ "type": "text",
648
+ "text": "Remarks 3. Previous work like SimCLR (Chen et al. (2020a)) also proposes to apply linear scaling rule. 3 The difference is, in SimCLR it does not clarify the concept of “batch size” refers to the number of queries or the number of keys. However in our paper, we explicitly point that the linear scaling rule needs to be applied corresponding to the number of queries per batch $( N )$ rather than $K$ . ",
649
+ "bbox": [
650
+ 174,
651
+ 487,
652
+ 825,
653
+ 558
654
+ ],
655
+ "page_idx": 5
656
+ },
657
+ {
658
+ "type": "text",
659
+ "text": "2.3 EMPIRICAL EVALUATION ",
660
+ "text_level": 1,
661
+ "bbox": [
662
+ 176,
663
+ 575,
664
+ 390,
665
+ 589
666
+ ],
667
+ "page_idx": 5
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "In this subsection we conduct experiments on the three state-of-the-art self-supervised contrastive learning frameworks – MoCo (He et al. (2020)), MoCo v2 (Chen et al. (2020c)) and SimCLR (Chen et al. (2020a)) to verify our theory in Sec. 2.1 and Sec. 2.2. We propose to alter $K$ and $N$ separately to examine the correctness of our equivalent rules. ",
672
+ "bbox": [
673
+ 174,
674
+ 602,
675
+ 825,
676
+ 657
677
+ ],
678
+ "page_idx": 5
679
+ },
680
+ {
681
+ "type": "text",
682
+ "text": "Implementation details. We follow most of the training and evaluation settings recommended in the original papers respectively. The only difference is, for SimCLR, we adopt SGD with momentum rather than LARS (You et al. (2017)) as the optimizer. We use ResNet-50 (He et al. (2016)) as the default network architecture. 128-d features are employed for query and key embeddings. Unless specially mentioned, all models are trained on ImageNet (Deng et al. (2009)) for 200 epochs without using the ground truth labels. We report the top-1 accuracy under the conventional linear evaluation protocol according to the original paper respectively. The number of queries per batch $( N )$ is set to 256 by default. All models are trained with 8 GPUs. ",
683
+ "bbox": [
684
+ 173,
685
+ 672,
686
+ 825,
687
+ 785
688
+ ],
689
+ "page_idx": 5
690
+ },
691
+ {
692
+ "type": "text",
693
+ "text": "It is worth noting the way we alter the number of negative samples $K$ independent of $N$ during training. For MoCo and MoCo v2, we simply need to set the size of the memory bank to $K$ . Specially, if $K < N$ , in the current batch the memory bank is actually composed of $K$ random keys sampled from the previous batch. While for SimCLR, if $K < N$ we random sample $K$ negative keys for each query independently. We do not study the case that $K > N$ for SimCLR. We mainly consider the ease of implementation in designing the strategies; as mentioned in Remarks 2 (Sec. 2.1), it does not affect the empirical conclusion. ",
694
+ "bbox": [
695
+ 173,
696
+ 792,
697
+ 825,
698
+ 848
699
+ ],
700
+ "page_idx": 5
701
+ },
702
+ {
703
+ "type": "image",
704
+ "img_path": "images/9106e601f0206f530101eae52fac3353abbbe4e5df8a80590ccee54ac565a8ad.jpg",
705
+ "image_caption": [
706
+ "Figure 2: Comparisons with/without $E q C o$ under different number of negative samples (noted by $K _ { \\cdot }$ ). Results are evaluated with ImageNet top-1 accuracy using linear evaluation protocol. In EqCo, we set $\\alpha = 6 5 5 3 6$ for MoCo and MoCo v2, and $\\alpha = 2 5 6$ for SimCLR (except for one data point with $\\alpha = 4 0 9 6$ , as noted in the legend). Best viewed in color. "
707
+ ],
708
+ "image_footnote": [],
709
+ "bbox": [
710
+ 181,
711
+ 108,
712
+ 813,
713
+ 308
714
+ ],
715
+ "page_idx": 6
716
+ },
717
+ {
718
+ "type": "text",
719
+ "text": "",
720
+ "bbox": [
721
+ 176,
722
+ 405,
723
+ 823,
724
+ 446
725
+ ],
726
+ "page_idx": 6
727
+ },
728
+ {
729
+ "type": "text",
730
+ "text": "Quantitative results. Fig. 2 illustrates the effect of our equivalent rule under different $K \\mathrm { s }$ . Our experiments start with the best configurations (i.e. $K \\ : \\ : = \\ : 6 5 5 3 6$ for MoCo and MoCo v2, and $K = 2 5 6$ for $\\mathrm { S i m C L R ^ { 4 } }$ ), then we gradually reduce $K$ and benchmark the performance. Results in Fig. 2 indicates that, without $\\mathrm { E q C o }$ the accuracy significantly drops if $K$ becomes very small (e.g. $K < 6 4$ ). While with EqCo, by setting $\\alpha$ to “mimic” the optimal $K$ , the performance surprisingly keeps steady under a wide range of $K \\mathrm { s }$ . Fig. 2(b) further shows that in SimCLR, by setting $\\alpha$ to a number larger than the physical batch size (e.g. 4096 vs. 256), the accuracy significantly improves from $6 2 . 0 \\%$ to $6 5 . 3 \\%$ , 5 suggesting the benefit of EqCo especially when the memory is limited. The comparison fully demonstrates EqCo is essential especially when the number of negative pairs is small. ",
731
+ "bbox": [
732
+ 173,
733
+ 462,
734
+ 825,
735
+ 602
736
+ ],
737
+ "page_idx": 6
738
+ },
739
+ {
740
+ "type": "text",
741
+ "text": "Besides, Table 1 compares the results of MoCo $\\nu 2$ under different number of queries $N$ , while $K \\ : = \\ : 6 5 5 3 6$ is fixed. It is clear that, with linear scaling rule (Krizhevsky (2014); Goyal et al. (2017)), the final performance is almost unchanged under different $N$ , suggesting the effectiveness of our equivalent rule for $N$ . ",
742
+ "bbox": [
743
+ 173,
744
+ 608,
745
+ 825,
746
+ 664
747
+ ],
748
+ "page_idx": 6
749
+ },
750
+ {
751
+ "type": "table",
752
+ "img_path": "images/fdfd6c31f01e27b1dfb0e51ca6e92e790e469956ce43071b7216e43f4d0af5b3.jpg",
753
+ "table_caption": [],
754
+ "table_footnote": [],
755
+ "table_body": "<table><tr><td rowspan=1 colspan=1>N(K = 65536)</td><td rowspan=1 colspan=1>256</td><td rowspan=1 colspan=1>512</td><td rowspan=1 colspan=1>1024</td></tr><tr><td rowspan=1 colspan=1>Top-1 accuracy (%)</td><td rowspan=1 colspan=1>67.5</td><td rowspan=1 colspan=1>67.5</td><td rowspan=1 colspan=1>67.4</td></tr></table>",
756
+ "bbox": [
757
+ 330,
758
+ 678,
759
+ 666,
760
+ 709
761
+ ],
762
+ "page_idx": 6
763
+ },
764
+ {
765
+ "type": "text",
766
+ "text": "Table 1: ImageNet accuracy (MoCo v2) vs. the number of queries per batch $( N )$ ). The learning rates during training are adjusted with linear scaling rule. ",
767
+ "bbox": [
768
+ 174,
769
+ 718,
770
+ 825,
771
+ 747
772
+ ],
773
+ "page_idx": 6
774
+ },
775
+ {
776
+ "type": "text",
777
+ "text": "3 SIMO: A SIMPLER BUT STRONGER BASELINE ",
778
+ "text_level": 1,
779
+ "bbox": [
780
+ 174,
781
+ 776,
782
+ 584,
783
+ 792
784
+ ],
785
+ "page_idx": 6
786
+ },
787
+ {
788
+ "type": "text",
789
+ "text": "EqCo inspires us to rethink the design of contrastive learning frameworks. The previous state-ofthe-arts like MoCo and SimCLR heavily rely on large quantities of negative pairs to obtain high performances, hence implementation tricks such as memory bank and large batch training are introduced, which makes the system complex and tends to be costly. Thanks to $\\mathrm { E q C o }$ , we are able to design a simpler contrastive learning framework with fewer negative pairs. ",
790
+ "bbox": [
791
+ 174,
792
+ 808,
793
+ 823,
794
+ 837
795
+ ],
796
+ "page_idx": 6
797
+ },
798
+ {
799
+ "type": "text",
800
+ "text": "",
801
+ "bbox": [
802
+ 174,
803
+ 103,
804
+ 823,
805
+ 146
806
+ ],
807
+ "page_idx": 7
808
+ },
809
+ {
810
+ "type": "image",
811
+ "img_path": "images/99f3fae3131dfe8dc528521a4f6f40daf9e4132960d054ceeb22d941644caaf7.jpg",
812
+ "image_caption": [
813
+ "Figure 3: SiMo with/without EqCo "
814
+ ],
815
+ "image_footnote": [],
816
+ "bbox": [
817
+ 176,
818
+ 171,
819
+ 428,
820
+ 321
821
+ ],
822
+ "page_idx": 7
823
+ },
824
+ {
825
+ "type": "table",
826
+ "img_path": "images/5d432471fbff305df2e8be03d6a814fb56631f1442d185c9ef452871c1a9c02e.jpg",
827
+ "table_caption": [
828
+ "Table 2: State-of-the-art InfoNCE-based frameworks "
829
+ ],
830
+ "table_footnote": [],
831
+ "table_body": "<table><tr><td>Method</td><td>Epochs</td><td>Top-1 (%)</td></tr><tr><td>CPC v2 (Henaff etal.,2019) CMC (Tian et al.,2019)</td><td>200</td><td>63.8</td></tr><tr><td>SimCLR (Chen et al.,2020a)</td><td>240 200</td><td>66.2 66.6</td></tr><tr><td>MoCo v2 (Chen et al.,2020c)</td><td>200</td><td>67.5</td></tr><tr><td>InfoMin Aug.(Tian et al. (2020))</td><td>200</td><td>70.1</td></tr><tr><td>SiMo(K=16,α=256)</td><td>200</td><td>68.1</td></tr><tr><td>SiMo (K= 256,α= 256)</td><td>200</td><td>68.0</td></tr><tr><td>SiMo (K= 256,α= 65536)</td><td>200</td><td>68.5</td></tr><tr><td>PIRL(Misra&amp;Maaten,2020)</td><td>800</td><td>63.6</td></tr><tr><td>SimCLR(Chen et al.,2020a)</td><td>1000</td><td>69.3</td></tr><tr><td>MoCo v2 (Chen et al.,2020c)</td><td>800</td><td>71.1</td></tr><tr><td>InfoMin Aug.(Tian et al.(2020))</td><td>800</td><td>73.0</td></tr><tr><td>SiMo(K=256,α=256)</td><td>800</td><td>71.8</td></tr><tr><td>SiMo(K= 256,α=65536)</td><td>800</td><td>72.1</td></tr></table>",
832
+ "bbox": [
833
+ 477,
834
+ 152,
835
+ 795,
836
+ 325
837
+ ],
838
+ "page_idx": 7
839
+ },
840
+ {
841
+ "type": "text",
842
+ "text": "We propose SiMo, a simplified variant of MoCo v2 (Chen et al. (2020c)) equipped with $\\mathrm { E q C o }$ . We follow most of the design in Chen et al. (2020c), where the key differences are as follows: ",
843
+ "bbox": [
844
+ 174,
845
+ 361,
846
+ 823,
847
+ 390
848
+ ],
849
+ "page_idx": 7
850
+ },
851
+ {
852
+ "type": "text",
853
+ "text": "Memory bank. MoCo, MoCo v2 and SimCLR ${ \\tt V } 2 ^ { \\mathrm { ~ 6 ~ } }$ (Chen et al. (2020b)) employ memory bank to maintain large number of negative embeddings $\\mathbf { k } _ { i }$ , in which there is a side effect: every positive embedding $\\mathbf { k } _ { 0 }$ is always extracted from a “newer” network than the negatives’ in the same batch, which could harm the performance. In SiMo, we thus cancel the memory bank as we only rely on a few negative samples per batch. Instead, we use the momentum encoder to extract both positive and negative key embeddings from the current batch. ",
854
+ "bbox": [
855
+ 174,
856
+ 405,
857
+ 825,
858
+ 489
859
+ ],
860
+ "page_idx": 7
861
+ },
862
+ {
863
+ "type": "text",
864
+ "text": "Shuffling BN vs. Sync BN. In MoCo v1/v2, shuffling BN (He et al. (2020)) is proposed to remove the obvious dissimilarities of the BN (Ioffe & Szegedy (2015)) statistics between the positive (from current mini-batch) and the negatives (from memory bank), so that the model can make predictions based on the semantic information of images rather than the BN statistics. In contrast, since the positive and negatives are from the same batch in SiMo, therefore, we use sync BN (Peng et al. (2018)) for simplicity and more stable statistics. Sync BN is also used in SimCLR (Chen et al. (2020a)) and SimCLR v2 (Chen et al. (2020b)). ",
865
+ "bbox": [
866
+ 173,
867
+ 496,
868
+ 825,
869
+ 593
870
+ ],
871
+ "page_idx": 7
872
+ },
873
+ {
874
+ "type": "text",
875
+ "text": "There are a few other differences, including 1) we use a BN attached to each of the fully-connected layers; 2) we introduce a warm-up stage at the beginning of the training, which follows the methodology in SimCLR (Chen et al. (2020a)). Apart from all the differences mentioned above, the architecture and the training (including data augmentations) details in SiMo are exactly the same as MoCo v2’s. In the following text, the number of queries per batch (N) is set to 256, and the backbone network is ResNet-50 by default. ",
876
+ "bbox": [
877
+ 174,
878
+ 601,
879
+ 825,
880
+ 684
881
+ ],
882
+ "page_idx": 7
883
+ },
884
+ {
885
+ "type": "text",
886
+ "text": "Quantitative results. First, we empirically demonstrate the necessity of $E q C o$ in SiMo framework. We choose the number of negative samples $K \\ : = \\ : 2 5 6$ as the baseline, then reduce $K$ to evaluate the performance. Fig. 3 shows the result on ImageNet using linear evaluation protocol. Without EqCo, the accuracy significantly drops when $K$ is very small. In contrast, using EqCo to “mimic” the case of large $K$ (by setting $\\alpha$ to 256), the accuracy almost keeps steady even under very small $K \\mathrm { s }$ . ",
887
+ "bbox": [
888
+ 173,
889
+ 700,
890
+ 825,
891
+ 784
892
+ ],
893
+ "page_idx": 7
894
+ },
895
+ {
896
+ "type": "text",
897
+ "text": "Table 2 further compares our SiMo with state-of-the-art self-supervised contrastive learning methods on ImageNet. 7 Using only 16 negative samples per query, SiMo outperforms MoCo v2 ( $6 8 . 1 \\%$ vs. $6 7 . 5 \\%$ ). If we increase $\\alpha$ to 65536 to “simulate” the case under huge number of negative pairs, the accuracy further increases to $6 8 . 5 \\%$ . Moreover, when we extend the training epochs to 800, we get the accuracy of $7 2 . 1 \\%$ , surpassing the baseline MoCo v2 by $1 . 0 \\%$ . The only entry that surpasses our results is InfoMin Aug. (Tian et al. (2020)), which is mainly focuses on data generation and orthogonal to ours. The experiments indicate that SiMo is a simpler but more powerful baseline for self-supervised contrastive learning. Readers can refer to the Appendix B for more experimental results of SiMo. ",
898
+ "bbox": [
899
+ 173,
900
+ 790,
901
+ 825,
902
+ 861
903
+ ],
904
+ "page_idx": 7
905
+ },
906
+ {
907
+ "type": "text",
908
+ "text": "",
909
+ "bbox": [
910
+ 174,
911
+ 103,
912
+ 825,
913
+ 159
914
+ ],
915
+ "page_idx": 8
916
+ },
917
+ {
918
+ "type": "text",
919
+ "text": "4 LIMITATIONS AND FUTURE WORK ",
920
+ "text_level": 1,
921
+ "bbox": [
922
+ 176,
923
+ 179,
924
+ 490,
925
+ 195
926
+ ],
927
+ "page_idx": 8
928
+ },
929
+ {
930
+ "type": "text",
931
+ "text": "Theorem 1 suggests that given the equivalent condition (Eq. 5), InfoNCE losses under various $K \\mathrm { s }$ are “equivalent” in the sense of the same mutual information lower bound, which is also backed up with the experiments in Fig. 1. However, Fig. 2 (a) shows that if $K$ is smaller than a certain value (e.g. $K \\leq 1 6$ ), some frameworks like $M o C o \\ \\nu 2$ start to degrade significantly even with $\\mathrm { E q C o }$ ; while for other frameworks like SiMo (Fig. 3), the accuracy almost keeps steady for very small $K \\mathrm { s }$ . Tschannen et al. (2019) also point that the principle of InfoMax cannot explain all the phenomena in contrastive learning. We will investigate the problem in the future, e.g. from other viewpoints such as gradient noise brought by small $K \\mathrm { s }$ (Fig. 4 in Appendix A.2 gives some insights). ",
932
+ "bbox": [
933
+ 174,
934
+ 210,
935
+ 825,
936
+ 323
937
+ ],
938
+ "page_idx": 8
939
+ },
940
+ {
941
+ "type": "text",
942
+ "text": "Though the formulation of Eq. 1 is very common in the field of supervised metric learning, which is usually named margin softmax cross-entropy loss (Deng et al., 2019; Wang et al., 2018; Sun et al., 2020). Nevertheless, unfortunately, our equivalent rule seems invalid to be generalized to those problems (e.g. face recognition). The major issue lies in the approximation in Eq. 3, we need the negative samples $\\mathbf { k } _ { i }$ to be independent of the query q, which is not satisfied in supervised tasks. ",
943
+ "bbox": [
944
+ 174,
945
+ 329,
946
+ 825,
947
+ 400
948
+ ],
949
+ "page_idx": 8
950
+ },
951
+ {
952
+ "type": "text",
953
+ "text": "According to Fig. 2 and Fig. 3, the benefits of EqCo become significant if $K$ is sufficiently small (e.g. $K < 6 4$ ). But in practice, for modern computing devices (e.g. GPUs) it is not that difficult to use $\\sim 2 5 6$ negative pairs per query. Applying EqCo to “simulate” more negative pairs via adjusting $\\alpha$ can further boost the performance, however, whose accuracy gains become relatively marginal. For example, in Table 2 under 200 epochs training, SiMo with $\\alpha \\ : = \\ : 6 5 5 3 6$ outperforms that of $\\alpha = 2 5 6$ by only $0 . 5 \\%$ . It could be a fundamental limitation of InfoNCE loss. We will investigate the problem in the future. ",
954
+ "bbox": [
955
+ 174,
956
+ 406,
957
+ 825,
958
+ 503
959
+ ],
960
+ "page_idx": 8
961
+ },
962
+ {
963
+ "type": "text",
964
+ "text": "REFERENCES ",
965
+ "text_level": 1,
966
+ "bbox": [
967
+ 176,
968
+ 103,
969
+ 287,
970
+ 117
971
+ ],
972
+ "page_idx": 9
973
+ },
974
+ {
975
+ "type": "text",
976
+ "text": "Sanjeev Arora, Hrishikesh Khandeparkar, Mikhail Khodak, Orestis Plevrakis, and Nikunj Saunshi. A theoretical analysis of contrastive unsupervised representation learning. arXiv preprint arXiv:1902.09229, 2019. ",
977
+ "bbox": [
978
+ 174,
979
+ 126,
980
+ 825,
981
+ 167
982
+ ],
983
+ "page_idx": 9
984
+ },
985
+ {
986
+ "type": "text",
987
+ "text": "Philip Bachman, R Devon Hjelm, and William Buchwalter. Learning representations by maximizing mutual information across views. In Advances in Neural Information Processing Systems, pp. 15535–15545, 2019. ",
988
+ "bbox": [
989
+ 173,
990
+ 176,
991
+ 821,
992
+ 218
993
+ ],
994
+ "page_idx": 9
995
+ },
996
+ {
997
+ "type": "text",
998
+ "text": "Yue Cao, Zhenda Xie, Bin Liu, Yutong Lin, Zheng Zhang, and Han Hu. Parametric instance classification for unsupervised visual feature learning. arXiv preprint arXiv:2006.14618, 2020. ",
999
+ "bbox": [
1000
+ 171,
1001
+ 226,
1002
+ 821,
1003
+ 256
1004
+ ],
1005
+ "page_idx": 9
1006
+ },
1007
+ {
1008
+ "type": "text",
1009
+ "text": "Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments. arXiv preprint arXiv:2006.09882, 2020a. ",
1010
+ "bbox": [
1011
+ 173,
1012
+ 263,
1013
+ 823,
1014
+ 306
1015
+ ],
1016
+ "page_idx": 9
1017
+ },
1018
+ {
1019
+ "type": "text",
1020
+ "text": "Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments. Advances in Neural Information Processing Systems, 33, 2020b. ",
1021
+ "bbox": [
1022
+ 173,
1023
+ 314,
1024
+ 825,
1025
+ 357
1026
+ ],
1027
+ "page_idx": 9
1028
+ },
1029
+ {
1030
+ "type": "text",
1031
+ "text": "Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. arXiv preprint arXiv:2002.05709, 2020a. ",
1032
+ "bbox": [
1033
+ 169,
1034
+ 364,
1035
+ 823,
1036
+ 395
1037
+ ],
1038
+ "page_idx": 9
1039
+ },
1040
+ {
1041
+ "type": "text",
1042
+ "text": "Ting Chen, Simon Kornblith, Kevin Swersky, Mohammad Norouzi, and Geoffrey E Hinton. Big self-supervised models are strong semi-supervised learners. Advances in Neural Information Processing Systems, 33, 2020b. ",
1043
+ "bbox": [
1044
+ 176,
1045
+ 401,
1046
+ 823,
1047
+ 444
1048
+ ],
1049
+ "page_idx": 9
1050
+ },
1051
+ {
1052
+ "type": "text",
1053
+ "text": "Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020c. ",
1054
+ "bbox": [
1055
+ 171,
1056
+ 452,
1057
+ 823,
1058
+ 482
1059
+ ],
1060
+ "page_idx": 9
1061
+ },
1062
+ {
1063
+ "type": "text",
1064
+ "text": "Ching-Yao Chuang, Joshua Robinson, Lin Yen-Chen, Antonio Torralba, and Stefanie Jegelka. Debiased contrastive learning. arXiv preprint arXiv:2007.00224, 2020. ",
1065
+ "bbox": [
1066
+ 171,
1067
+ 488,
1068
+ 823,
1069
+ 518
1070
+ ],
1071
+ "page_idx": 9
1072
+ },
1073
+ {
1074
+ "type": "text",
1075
+ "text": "Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248–255. Ieee, 2009. ",
1076
+ "bbox": [
1077
+ 174,
1078
+ 526,
1079
+ 821,
1080
+ 569
1081
+ ],
1082
+ "page_idx": 9
1083
+ },
1084
+ {
1085
+ "type": "text",
1086
+ "text": "Jiankang Deng, Jia Guo, Niannan Xue, and Stefanos Zafeiriou. Arcface: Additive angular margin loss for deep face recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4690–4699, 2019. ",
1087
+ "bbox": [
1088
+ 173,
1089
+ 577,
1090
+ 823,
1091
+ 619
1092
+ ],
1093
+ "page_idx": 9
1094
+ },
1095
+ {
1096
+ "type": "text",
1097
+ "text": "Alexey Dosovitskiy, Jost Tobias Springenberg, Martin Riedmiller, and Thomas Brox. Discriminative unsupervised feature learning with convolutional neural networks. In Advances in neural information processing systems, pp. 766–774, 2014. ",
1098
+ "bbox": [
1099
+ 173,
1100
+ 627,
1101
+ 823,
1102
+ 671
1103
+ ],
1104
+ "page_idx": 9
1105
+ },
1106
+ {
1107
+ "type": "text",
1108
+ "text": "Aleksandr Ermolov, Aliaksandr Siarohin, Enver Sangineto, and Nicu Sebe. Whitening for selfsupervised representation learning. arXiv preprint arXiv:2007.06346, 2020. ",
1109
+ "bbox": [
1110
+ 169,
1111
+ 678,
1112
+ 823,
1113
+ 708
1114
+ ],
1115
+ "page_idx": 9
1116
+ },
1117
+ {
1118
+ "type": "text",
1119
+ "text": "Priya Goyal, Piotr Dollar, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, An-´ drew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch sgd: Training imagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017. ",
1120
+ "bbox": [
1121
+ 174,
1122
+ 714,
1123
+ 823,
1124
+ 758
1125
+ ],
1126
+ "page_idx": 9
1127
+ },
1128
+ {
1129
+ "type": "text",
1130
+ "text": "Jean-Bastien Grill, Florian Strub, Florent Altche, Corentin Tallec, Pierre H Richemond, Elena ´ Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Daniel Guo, Mohammad Gheshlaghi Azar, et al. Bootstrap your own latent: A new approach to self-supervised learning. arXiv preprint arXiv:2006.07733, 2020. ",
1131
+ "bbox": [
1132
+ 173,
1133
+ 766,
1134
+ 825,
1135
+ 821
1136
+ ],
1137
+ "page_idx": 9
1138
+ },
1139
+ {
1140
+ "type": "text",
1141
+ "text": "Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’06), volume 2, pp. 1735–1742. IEEE, 2006. ",
1142
+ "bbox": [
1143
+ 173,
1144
+ 830,
1145
+ 821,
1146
+ 873
1147
+ ],
1148
+ "page_idx": 9
1149
+ },
1150
+ {
1151
+ "type": "text",
1152
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016. ",
1153
+ "bbox": [
1154
+ 174,
1155
+ 881,
1156
+ 823,
1157
+ 924
1158
+ ],
1159
+ "page_idx": 9
1160
+ },
1161
+ {
1162
+ "type": "text",
1163
+ "text": "Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9729–9738, 2020. ",
1164
+ "bbox": [
1165
+ 176,
1166
+ 103,
1167
+ 823,
1168
+ 146
1169
+ ],
1170
+ "page_idx": 10
1171
+ },
1172
+ {
1173
+ "type": "text",
1174
+ "text": "Olivier J Henaff, Aravind Srinivas, Jeffrey De Fauw, Ali Razavi, Carl Doersch, SM Eslami, and ´ Aaron van den Oord. Data-efficient image recognition with contrastive predictive coding. arXiv preprint arXiv:1905.09272, 2019. ",
1175
+ "bbox": [
1176
+ 178,
1177
+ 152,
1178
+ 821,
1179
+ 195
1180
+ ],
1181
+ "page_idx": 10
1182
+ },
1183
+ {
1184
+ "type": "text",
1185
+ "text": "Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. ",
1186
+ "bbox": [
1187
+ 173,
1188
+ 203,
1189
+ 823,
1190
+ 232
1191
+ ],
1192
+ "page_idx": 10
1193
+ },
1194
+ {
1195
+ "type": "text",
1196
+ "text": "Alex Krizhevsky. One weird trick for parallelizing convolutional neural networks. arXiv preprint arXiv:1404.5997, 2014. ",
1197
+ "bbox": [
1198
+ 174,
1199
+ 238,
1200
+ 823,
1201
+ 267
1202
+ ],
1203
+ "page_idx": 10
1204
+ },
1205
+ {
1206
+ "type": "text",
1207
+ "text": "Tsung-Yi Lin, Piotr Dollar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. ´ Feature pyramid networks for object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2117–2125, 2017. ",
1208
+ "bbox": [
1209
+ 174,
1210
+ 273,
1211
+ 823,
1212
+ 318
1213
+ ],
1214
+ "page_idx": 10
1215
+ },
1216
+ {
1217
+ "type": "text",
1218
+ "text": "Ralph Linsker. Self-organization in a perceptual network. Computer, 21(3):105–117, 1988. ",
1219
+ "bbox": [
1220
+ 168,
1221
+ 324,
1222
+ 772,
1223
+ 340
1224
+ ],
1225
+ "page_idx": 10
1226
+ },
1227
+ {
1228
+ "type": "text",
1229
+ "text": "Ishan Misra and Laurens van der Maaten. Self-supervised learning of pretext-invariant representations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6707–6717, 2020. ",
1230
+ "bbox": [
1231
+ 173,
1232
+ 345,
1233
+ 823,
1234
+ 388
1235
+ ],
1236
+ "page_idx": 10
1237
+ },
1238
+ {
1239
+ "type": "text",
1240
+ "text": "Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018. ",
1241
+ "bbox": [
1242
+ 171,
1243
+ 395,
1244
+ 821,
1245
+ 425
1246
+ ],
1247
+ "page_idx": 10
1248
+ },
1249
+ {
1250
+ "type": "text",
1251
+ "text": "Chao Peng, Tete Xiao, Zeming Li, Yuning Jiang, Xiangyu Zhang, Kai Jia, Gang Yu, and Jian Sun. Megdet: A large mini-batch object detector. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 6181–6189, 2018. ",
1252
+ "bbox": [
1253
+ 176,
1254
+ 431,
1255
+ 821,
1256
+ 474
1257
+ ],
1258
+ "page_idx": 10
1259
+ },
1260
+ {
1261
+ "type": "text",
1262
+ "text": "Ben Poole, Sherjil Ozair, Aaron van den Oord, Alexander A Alemi, and George Tucker. On variational bounds of mutual information. arXiv preprint arXiv:1905.06922, 2019. ",
1263
+ "bbox": [
1264
+ 169,
1265
+ 481,
1266
+ 823,
1267
+ 511
1268
+ ],
1269
+ "page_idx": 10
1270
+ },
1271
+ {
1272
+ "type": "text",
1273
+ "text": "Yifan Sun, Changmao Cheng, Yuhan Zhang, Chi Zhang, Liang Zheng, Zhongdao Wang, and Yichen Wei. Circle loss: A unified perspective of pair similarity optimization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6398–6407, 2020. ",
1274
+ "bbox": [
1275
+ 176,
1276
+ 516,
1277
+ 823,
1278
+ 560
1279
+ ],
1280
+ "page_idx": 10
1281
+ },
1282
+ {
1283
+ "type": "text",
1284
+ "text": "Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. arXiv preprint arXiv:1906.05849, 2019. ",
1285
+ "bbox": [
1286
+ 173,
1287
+ 566,
1288
+ 823,
1289
+ 595
1290
+ ],
1291
+ "page_idx": 10
1292
+ },
1293
+ {
1294
+ "type": "text",
1295
+ "text": "Yonglong Tian, Chen Sun, Ben Poole, Dilip Krishnan, Cordelia Schmid, and Phillip Isola. What makes for good views for contrastive learning. arXiv preprint arXiv:2005.10243, 2020. ",
1296
+ "bbox": [
1297
+ 173,
1298
+ 602,
1299
+ 823,
1300
+ 632
1301
+ ],
1302
+ "page_idx": 10
1303
+ },
1304
+ {
1305
+ "type": "text",
1306
+ "text": "Michael Tschannen, Josip Djolonga, Paul K Rubenstein, Sylvain Gelly, and Mario Lucic. On mutual information maximization for representation learning. arXiv preprint arXiv:1907.13625, 2019. ",
1307
+ "bbox": [
1308
+ 171,
1309
+ 637,
1310
+ 823,
1311
+ 667
1312
+ ],
1313
+ "page_idx": 10
1314
+ },
1315
+ {
1316
+ "type": "text",
1317
+ "text": "Hao Wang, Yitong Wang, Zheng Zhou, Xing Ji, Dihong Gong, Jingchao Zhou, Zhifeng Li, and Wei Liu. Cosface: Large margin cosine loss for deep face recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 5265–5274, 2018. ",
1318
+ "bbox": [
1319
+ 176,
1320
+ 674,
1321
+ 823,
1322
+ 717
1323
+ ],
1324
+ "page_idx": 10
1325
+ },
1326
+ {
1327
+ "type": "text",
1328
+ "text": "Tongzhou Wang and Phillip Isola. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. arXiv preprint arXiv:2005.10242, 2020. ",
1329
+ "bbox": [
1330
+ 171,
1331
+ 724,
1332
+ 823,
1333
+ 753
1334
+ ],
1335
+ "page_idx": 10
1336
+ },
1337
+ {
1338
+ "type": "text",
1339
+ "text": "Xun Wang, Haozhi Zhang, Weilin Huang, and Matthew R Scott. Cross-batch memory for embedding learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6388–6397, 2020. ",
1340
+ "bbox": [
1341
+ 173,
1342
+ 760,
1343
+ 823,
1344
+ 803
1345
+ ],
1346
+ "page_idx": 10
1347
+ },
1348
+ {
1349
+ "type": "text",
1350
+ "text": "Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via nonparametric instance discrimination. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3733–3742, 2018. ",
1351
+ "bbox": [
1352
+ 173,
1353
+ 809,
1354
+ 823,
1355
+ 853
1356
+ ],
1357
+ "page_idx": 10
1358
+ },
1359
+ {
1360
+ "type": "text",
1361
+ "text": "Jiahao Xie, Xiaohang Zhan, Ziwei Liu, Yew Soon Ong, and Chen Change Loy. Delving into interimage invariance for unsupervised visual representations. arXiv preprint arXiv:2008.11702, 2020. ",
1362
+ "bbox": [
1363
+ 173,
1364
+ 859,
1365
+ 821,
1366
+ 888
1367
+ ],
1368
+ "page_idx": 10
1369
+ },
1370
+ {
1371
+ "type": "text",
1372
+ "text": "Yang You, Igor Gitman, and Boris Ginsburg. Large batch training of convolutional networks. arXiv preprint arXiv:1708.03888, 2017. ",
1373
+ "bbox": [
1374
+ 174,
1375
+ 895,
1376
+ 823,
1377
+ 924
1378
+ ],
1379
+ "page_idx": 10
1380
+ },
1381
+ {
1382
+ "type": "text",
1383
+ "text": "A DETAILS ABOUT THEOREM 2 ",
1384
+ "text_level": 1,
1385
+ "bbox": [
1386
+ 176,
1387
+ 102,
1388
+ 460,
1389
+ 118
1390
+ ],
1391
+ "page_idx": 11
1392
+ },
1393
+ {
1394
+ "type": "text",
1395
+ "text": "A.1 PROOF OF EQ. 7 ",
1396
+ "text_level": 1,
1397
+ "bbox": [
1398
+ 174,
1399
+ 132,
1400
+ 333,
1401
+ 148
1402
+ ],
1403
+ "page_idx": 11
1404
+ },
1405
+ {
1406
+ "type": "text",
1407
+ "text": "Given the equivalent condition (Eq. 5) and a query embedding q as well as the corresponding positive sample $\\mathbf { k } _ { 0 }$ , for $\\mathcal { L } _ { N C E }$ in Eq. 1 the expectation of the gradient norm w.r.t. $\\mathbf { q }$ is bounded by: ",
1408
+ "bbox": [
1409
+ 173,
1410
+ 159,
1411
+ 825,
1412
+ 189
1413
+ ],
1414
+ "page_idx": 11
1415
+ },
1416
+ {
1417
+ "type": "equation",
1418
+ "img_path": "images/4e9dd7afe9254eacf97b084c3151b2db904103176a1bc5de4502b650a4d4d17e.jpg",
1419
+ "text": "$$\n\\underset { \\mathbf { k } _ { i } \\sim \\mathcal { D } ^ { \\prime } } { \\mathbb { E } } \\left. \\frac { \\mathrm { d } \\mathcal { L } _ { N C E } } { \\mathrm { d } \\mathbf { q } } \\right. \\leq \\frac { 2 } { \\tau } \\left( 1 - \\frac { \\exp ( \\mathbf { q } ^ { \\top } \\mathbf { k } _ { 0 } / \\tau ) } { \\exp ( \\mathbf { q } ^ { \\top } \\mathbf { k } _ { 0 } / \\tau ) + \\alpha \\mathbb { E } _ { \\mathbf { k } _ { i } \\sim \\mathcal { D } ^ { \\prime } } [ \\exp ( \\mathbf { q } ^ { \\top } \\mathbf { k } _ { i } / \\tau ) ] } \\right) .\n$$",
1420
+ "text_format": "latex",
1421
+ "bbox": [
1422
+ 251,
1423
+ 194,
1424
+ 746,
1425
+ 231
1426
+ ],
1427
+ "page_idx": 11
1428
+ },
1429
+ {
1430
+ "type": "text",
1431
+ "text": "Proof. For simplicity, we denote the term $\\exp ( \\mathbf { q } ^ { \\top } \\mathbf { k } _ { i } / \\tau )$ as $s _ { i } ( i = 0 , \\ldots , K )$ . Then $\\mathcal { L } _ { N C E }$ can be rewritten as: ",
1432
+ "bbox": [
1433
+ 173,
1434
+ 244,
1435
+ 823,
1436
+ 272
1437
+ ],
1438
+ "page_idx": 11
1439
+ },
1440
+ {
1441
+ "type": "equation",
1442
+ "img_path": "images/708a9f493ca6bff6ee26869725a5b3bba161ceafce374e8d48a8970954b537f6.jpg",
1443
+ "text": "$$\n\\mathcal { L } _ { N C E } = - \\log \\frac { s _ { 0 } } { s _ { 0 } + \\frac { \\alpha } { K } \\sum _ { i = 1 } ^ { K } s _ { i } }\n$$",
1444
+ "text_format": "latex",
1445
+ "bbox": [
1446
+ 387,
1447
+ 268,
1448
+ 611,
1449
+ 304
1450
+ ],
1451
+ "page_idx": 11
1452
+ },
1453
+ {
1454
+ "type": "text",
1455
+ "text": "The gradient of $\\mathcal { L } _ { N C E }$ with respect to $\\mathbf { q }$ is easily to derived: ",
1456
+ "bbox": [
1457
+ 173,
1458
+ 311,
1459
+ 570,
1460
+ 328
1461
+ ],
1462
+ "page_idx": 11
1463
+ },
1464
+ {
1465
+ "type": "equation",
1466
+ "img_path": "images/5d13e96e5c9d2520eebf6619dd50c83fdfbfab4ba983b07121952f29f0f49534.jpg",
1467
+ "text": "$$\n\\frac { \\mathrm { d } \\mathcal { L } _ { N C E } } { \\mathrm { d } \\mathbf { q } } = - \\frac { 1 } { \\tau } \\left( 1 - \\frac { s _ { 0 } } { s _ { 0 } + \\frac { \\alpha } { K } \\sum _ { i = 1 } ^ { K } s _ { i } } \\right) \\mathbf { k } _ { 0 } + \\frac { \\alpha } { \\tau K } \\sum _ { i = 1 } ^ { K } \\frac { s _ { 0 } } { s _ { 0 } + \\frac { \\alpha } { K } \\sum _ { i = 1 } ^ { K } s _ { i } } \\mathbf { k } _ { i } ,\n$$",
1468
+ "text_format": "latex",
1469
+ "bbox": [
1470
+ 245,
1471
+ 343,
1472
+ 751,
1473
+ 387
1474
+ ],
1475
+ "page_idx": 11
1476
+ },
1477
+ {
1478
+ "type": "text",
1479
+ "text": "Owing to the Triangle Inequality and the fact that $\\mathbf { k } _ { i } ( i = 0 , \\ldots , K )$ is normalized, the norm of gradient is bounded by: ",
1480
+ "bbox": [
1481
+ 174,
1482
+ 396,
1483
+ 826,
1484
+ 428
1485
+ ],
1486
+ "page_idx": 11
1487
+ },
1488
+ {
1489
+ "type": "equation",
1490
+ "img_path": "images/77557a1c8e0febc74eb0e68c0578fe5eded7a58b48d3895fbcf72fb6d2e8d5d5.jpg",
1491
+ "text": "$$\n\\begin{array} { r l } { \\displaystyle \\left\\| \\frac { \\mathrm { d } \\mathcal { L } _ { N C E } } { \\mathrm { d } \\mathbf { q } } \\right\\| \\leq \\left| \\frac { 1 } { \\tau } \\left( 1 - \\frac { s _ { 0 } } { s _ { 0 } + \\frac { \\alpha } { K } \\sum _ { i = 1 } ^ { K } s _ { i } } \\right) \\right| \\cdot \\| \\mathbf { k } _ { 0 } \\| + \\displaystyle \\sum _ { i = 1 } ^ { K } \\left| \\frac { \\alpha } { \\tau K } \\frac { s _ { i } } { s _ { 0 } + \\frac { \\alpha } { K } \\sum _ { i = 1 } ^ { K } s _ { i } } \\right| \\cdot \\| \\mathbf { k } _ { i } \\| } & { } \\\\ { \\displaystyle } & { = \\frac { 1 } { \\tau } \\left( 1 - \\frac { s _ { 0 } } { s _ { 0 } + \\frac { \\alpha } { K } \\sum _ { i = 1 } ^ { K } s _ { i } } \\right) + \\frac { 1 } { \\tau } \\sum _ { i = 1 } ^ { K } \\frac { \\frac { \\alpha } { K } s _ { i } } { s _ { 0 } + \\frac { \\alpha } { K } \\sum _ { i = 1 } ^ { K } s _ { i } } } \\\\ { \\displaystyle } & { = \\frac { 2 } { \\tau } \\left( 1 - \\frac { s _ { 0 } } { s _ { 0 } + \\frac { \\alpha } { K } \\sum _ { i = 1 } ^ { K } s _ { i } } \\right) } \\end{array}\n$$",
1492
+ "text_format": "latex",
1493
+ "bbox": [
1494
+ 194,
1495
+ 450,
1496
+ 776,
1497
+ 585
1498
+ ],
1499
+ "page_idx": 11
1500
+ },
1501
+ {
1502
+ "type": "text",
1503
+ "text": "Since the cosine similarity between q and $\\mathbf { k } _ { i } ( i = 1 , \\ldots , K )$ is bounded in $[ - 1 , 1 ]$ , we know the expectation of $\\mathbb { E } _ { \\mathbf { k } _ { i } \\sim \\mathcal { D } ^ { \\prime } } \\left[ s _ { i } \\right]$ exists. According to Inequality (12) and Jensen’s Inequality, we have: ",
1504
+ "bbox": [
1505
+ 176,
1506
+ 594,
1507
+ 825,
1508
+ 626
1509
+ ],
1510
+ "page_idx": 11
1511
+ },
1512
+ {
1513
+ "type": "equation",
1514
+ "img_path": "images/d362e262a1c619eceea626549d8e2e82b2a826abecf6ee20ba8af76ed5093434.jpg",
1515
+ "text": "$$\n\\begin{array} { r l } { \\underset { \\mathbf { k } _ { i } \\sim \\mathcal { D } ^ { \\prime } } { \\mathbb { E } } \\left[ \\frac { 2 } { \\tau } \\left( 1 - \\frac { s _ { 0 } } { s _ { 0 } + \\frac { \\alpha } { K } \\sum _ { i = 1 } ^ { K } s _ { i } } \\right) \\right] } & { = \\frac { 2 } { \\tau } \\left( 1 - \\underset { \\mathbf { k } _ { i } \\sim \\mathcal { D } ^ { \\prime } } { \\mathbb { E } } \\left[ \\frac { s _ { 0 } } { s _ { 0 } + \\frac { \\alpha } { K } \\sum _ { i = 1 } ^ { K } s _ { i } } \\right] \\right) } \\\\ & { \\leq \\frac { 2 } { \\tau } \\left( 1 - \\frac { s _ { 0 } } { s _ { 0 } + \\alpha \\mathbb { E } _ { \\mathbf { k } _ { i } \\sim \\mathcal { D } ^ { \\prime } } \\left[ s _ { i } \\right] } \\right) } \\end{array}\n$$",
1516
+ "text_format": "latex",
1517
+ "bbox": [
1518
+ 241,
1519
+ 647,
1520
+ 754,
1521
+ 729
1522
+ ],
1523
+ "page_idx": 11
1524
+ },
1525
+ {
1526
+ "type": "text",
1527
+ "text": "Replacing $s _ { i }$ by $\\exp ( \\mathbf { q } ^ { \\top } \\mathbf { k } _ { i } / \\tau )$ , the proof of Theorem 2 is completed. ",
1528
+ "bbox": [
1529
+ 171,
1530
+ 741,
1531
+ 627,
1532
+ 758
1533
+ ],
1534
+ "page_idx": 11
1535
+ },
1536
+ {
1537
+ "type": "image",
1538
+ "img_path": "images/333fde6018cd5d18409f22ed2d80aac94c549f355e51d621b841868a960d9cb6.jpg",
1539
+ "image_caption": [
1540
+ "Figure 4: The means (solid line) and variances (ribbon, $\\pm \\sigma ,$ ) of $\\| \\mathrm { d } \\mathcal { L } _ { N C E } / \\mathrm { d } \\pmb { q } \\|$ under different $K \\mathrm { s }$ . We train a normal MoCo v2 for 200 epochs and show the statistics at different epochs. "
1541
+ ],
1542
+ "image_footnote": [],
1543
+ "bbox": [
1544
+ 173,
1545
+ 136,
1546
+ 821,
1547
+ 529
1548
+ ],
1549
+ "page_idx": 12
1550
+ },
1551
+ {
1552
+ "type": "text",
1553
+ "text": "B MORE EXPERIMENTS ON SIMO ",
1554
+ "text_level": 1,
1555
+ "bbox": [
1556
+ 176,
1557
+ 102,
1558
+ 470,
1559
+ 118
1560
+ ],
1561
+ "page_idx": 13
1562
+ },
1563
+ {
1564
+ "type": "text",
1565
+ "text": "For the following experiments of this section, we report the top-1 accuracy of SiMo on ImageNet (Deng et al., 2009) under the linear evaluation protocol. The backbone of SiMo is ResNet-50 (He et al., 2016) and we train SiMo for 200 epochs unless noted otherwise. ",
1566
+ "bbox": [
1567
+ 173,
1568
+ 136,
1569
+ 825,
1570
+ 179
1571
+ ],
1572
+ "page_idx": 13
1573
+ },
1574
+ {
1575
+ "type": "text",
1576
+ "text": "B.1 ABLATION ON MOMENTUM UPDATE ",
1577
+ "text_level": 1,
1578
+ "bbox": [
1579
+ 176,
1580
+ 199,
1581
+ 470,
1582
+ 214
1583
+ ],
1584
+ "page_idx": 13
1585
+ },
1586
+ {
1587
+ "type": "text",
1588
+ "text": "In MoCo (He et al., 2020) and MoCo v2 (Chen et al., 2020c), the key encoder is updated by the following rule: ",
1589
+ "bbox": [
1590
+ 173,
1591
+ 227,
1592
+ 825,
1593
+ 257
1594
+ ],
1595
+ "page_idx": 13
1596
+ },
1597
+ {
1598
+ "type": "equation",
1599
+ "img_path": "images/3cf0599f1817cd7d22730b9337cf6717d094b821efef4e791d3c436f16dd7fdf.jpg",
1600
+ "text": "$$\n\\theta _ { k } = \\beta \\theta _ { k } + \\left( 1 - \\beta \\right) \\theta _ { q }\n$$",
1601
+ "text_format": "latex",
1602
+ "bbox": [
1603
+ 421,
1604
+ 281,
1605
+ 576,
1606
+ 299
1607
+ ],
1608
+ "page_idx": 13
1609
+ },
1610
+ {
1611
+ "type": "text",
1612
+ "text": "where $\\theta _ { q }$ and $\\theta _ { k }$ stand for the weights of query encoder and key encoder respectively, and $\\beta$ is the momentum coefficient. For SiMo, we also adopt the momentum update and use the key encoder to compute the features of positive sample and negative samples. ",
1613
+ "bbox": [
1614
+ 176,
1615
+ 314,
1616
+ 825,
1617
+ 357
1618
+ ],
1619
+ "page_idx": 13
1620
+ },
1621
+ {
1622
+ "type": "text",
1623
+ "text": "In Table 3, we report the results of SiMo with different momentum coefficients. The number of training epochs is set to be 100, so the top-1 accuracy of baseline $\\beta = 0 . 9 9 9 )$ drops to $6 4 . 4 \\%$ . Compared to the baseline, SiMo without momentum update ( $\\beta = 0$ ) is inferior, showing the advantage of momentum update. ",
1624
+ "bbox": [
1625
+ 173,
1626
+ 363,
1627
+ 825,
1628
+ 420
1629
+ ],
1630
+ "page_idx": 13
1631
+ },
1632
+ {
1633
+ "type": "table",
1634
+ "img_path": "images/0b21fbf80c0078218590af80761db7673d72a76275ce7a790d384fa7d2f24180.jpg",
1635
+ "table_caption": [
1636
+ "Table 3: Ablation on momentum update. "
1637
+ ],
1638
+ "table_footnote": [],
1639
+ "table_body": "<table><tr><td rowspan=1 colspan=1>β</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0.999</td></tr><tr><td rowspan=1 colspan=1>Accuracy (%)</td><td rowspan=1 colspan=1>62.1</td><td rowspan=1 colspan=1>64.4</td></tr></table>",
1640
+ "bbox": [
1641
+ 387,
1642
+ 436,
1643
+ 609,
1644
+ 468
1645
+ ],
1646
+ "page_idx": 13
1647
+ },
1648
+ {
1649
+ "type": "text",
1650
+ "text": "B.2 ABLATION ON BN ",
1651
+ "text_level": 1,
1652
+ "bbox": [
1653
+ 174,
1654
+ 526,
1655
+ 344,
1656
+ 541
1657
+ ],
1658
+ "page_idx": 13
1659
+ },
1660
+ {
1661
+ "type": "text",
1662
+ "text": "Table 4 shows the performance of SiMo equipped with shuffling BN or Sync BN. Likewise, we train SiMo for 100 epochs. It is easy to check out that SiMo with shuffling BN struggles to perform well. Besides, compared to MoCo v2, SiMo with shuffling BN degrades significantly, and we conjecture that it is because the MLP structure of SiMo is more suitable for Sync BN, rather than shuffling BN. ",
1663
+ "bbox": [
1664
+ 173,
1665
+ 554,
1666
+ 825,
1667
+ 612
1668
+ ],
1669
+ "page_idx": 13
1670
+ },
1671
+ {
1672
+ "type": "table",
1673
+ "img_path": "images/34b572ce46bbf596949dc475ca7ff45fd83461f0b5f314152a47158ab0b49470.jpg",
1674
+ "table_caption": [
1675
+ "Table 4: Sync BN vs. shuffling BN. "
1676
+ ],
1677
+ "table_footnote": [],
1678
+ "table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Shuffling BN</td><td rowspan=1 colspan=1>Sync BN</td></tr><tr><td rowspan=1 colspan=1>Accuracy (%)</td><td rowspan=1 colspan=1>58.8</td><td rowspan=1 colspan=1>64.4</td></tr></table>",
1679
+ "bbox": [
1680
+ 348,
1681
+ 628,
1682
+ 648,
1683
+ 660
1684
+ ],
1685
+ "page_idx": 13
1686
+ },
1687
+ {
1688
+ "type": "text",
1689
+ "text": "B.3 SIMO WITH DIFFERENT $\\alpha$ ",
1690
+ "text_level": 1,
1691
+ "bbox": [
1692
+ 174,
1693
+ 718,
1694
+ 398,
1695
+ 733
1696
+ ],
1697
+ "page_idx": 13
1698
+ },
1699
+ {
1700
+ "type": "text",
1701
+ "text": "As shown in Sec.2.1, $\\alpha$ is related to the lower bound of mutual information. Table 5 reveals how accuracy of SiMo varies with the choice of $\\alpha$ . As we increase $\\alpha$ to 65536, the accuracy tends to improve, in accordance with the Eq.6. However, when $\\alpha$ is too large (e.g., 262144), the performance slightly drops by $0 . 2 \\%$ . ",
1702
+ "bbox": [
1703
+ 174,
1704
+ 746,
1705
+ 825,
1706
+ 803
1707
+ ],
1708
+ "page_idx": 13
1709
+ },
1710
+ {
1711
+ "type": "table",
1712
+ "img_path": "images/53d0fcbfc7c2fc8b490abbcd2af4c9cc3a2a86185db089b38e10e34e598bf9b1.jpg",
1713
+ "table_caption": [
1714
+ "Table 5: SiMo with different $\\alpha$ . "
1715
+ ],
1716
+ "table_footnote": [],
1717
+ "table_body": "<table><tr><td rowspan=1 colspan=1>α</td><td rowspan=1 colspan=1>256</td><td rowspan=1 colspan=1>1024</td><td rowspan=1 colspan=1>4096</td><td rowspan=1 colspan=1>16384</td><td rowspan=1 colspan=1>65536</td><td rowspan=1 colspan=1>262144</td></tr><tr><td rowspan=1 colspan=1>Accuracy (%)</td><td rowspan=1 colspan=1>68.0</td><td rowspan=1 colspan=1>68.1</td><td rowspan=1 colspan=1>68.1</td><td rowspan=1 colspan=1>68.4</td><td rowspan=1 colspan=1>68.5</td><td rowspan=1 colspan=1>68.3</td></tr></table>",
1718
+ "bbox": [
1719
+ 267,
1720
+ 819,
1721
+ 728,
1722
+ 851
1723
+ ],
1724
+ "page_idx": 13
1725
+ },
1726
+ {
1727
+ "type": "text",
1728
+ "text": "Similar results can be found in MoCo v2. We increase $K$ to 262144 in MoCo v2, the accuracy also descends (in Table 6). ",
1729
+ "bbox": [
1730
+ 174,
1731
+ 895,
1732
+ 823,
1733
+ 924
1734
+ ],
1735
+ "page_idx": 13
1736
+ },
1737
+ {
1738
+ "type": "table",
1739
+ "img_path": "images/89132f3be019d53018fcaa31a23b9d7f67a1a1b545e7b4872b7ac6758b6ded2c.jpg",
1740
+ "table_caption": [
1741
+ "Table 6: MoCo v2 with different $K$ . "
1742
+ ],
1743
+ "table_footnote": [],
1744
+ "table_body": "<table><tr><td rowspan=1 colspan=1>K</td><td rowspan=1 colspan=1>256</td><td rowspan=1 colspan=1>1024</td><td rowspan=1 colspan=1>4096</td><td rowspan=1 colspan=1>16384</td><td rowspan=1 colspan=1>65536</td><td rowspan=1 colspan=1>262144</td></tr><tr><td rowspan=1 colspan=1>Accuracy (%)</td><td rowspan=1 colspan=1>67.0</td><td rowspan=1 colspan=1>67.1</td><td rowspan=1 colspan=1>67.6</td><td rowspan=1 colspan=1>67.3</td><td rowspan=1 colspan=1>67.5</td><td rowspan=1 colspan=1>67.4</td></tr></table>",
1745
+ "bbox": [
1746
+ 272,
1747
+ 101,
1748
+ 727,
1749
+ 132
1750
+ ],
1751
+ "page_idx": 14
1752
+ },
1753
+ {
1754
+ "type": "text",
1755
+ "text": "B.4 SIMO WITH WIDER MODELS ",
1756
+ "text_level": 1,
1757
+ "bbox": [
1758
+ 174,
1759
+ 185,
1760
+ 419,
1761
+ 200
1762
+ ],
1763
+ "page_idx": 14
1764
+ },
1765
+ {
1766
+ "type": "table",
1767
+ "img_path": "images/8a15bcb51a325ed80ef2787833160e8571ca88802cc82b92d12e658a5126235f.jpg",
1768
+ "table_caption": [
1769
+ "Results using wider models are presented in Table 7. For SiMo, the performance is further boosted with wider models (more channels). For instance, SiMo with ResNet-50 $( 2 \\mathbf { x } )$ and ResNet-50 (4x) outperforms the baseline $( 6 8 . 5 \\% )$ by $2 \\%$ and $3 . 8 \\%$ respectively. "
1770
+ ],
1771
+ "table_footnote": [],
1772
+ "table_body": "<table><tr><td>Architecture</td><td>Param. (M)</td><td>α</td><td>Top-1 (%)</td></tr><tr><td>ResNet-50 (2x)</td><td>94</td><td>256</td><td>70.2</td></tr><tr><td>ResNet-50 (2x)</td><td>94</td><td>65536</td><td>70.5</td></tr><tr><td>ResNet-50 (4x)</td><td>375</td><td>256</td><td>71.9</td></tr><tr><td>ResNet-50 (4x)</td><td>375</td><td>65536</td><td>72.3</td></tr></table>",
1773
+ "bbox": [
1774
+ 315,
1775
+ 267,
1776
+ 681,
1777
+ 342
1778
+ ],
1779
+ "page_idx": 14
1780
+ },
1781
+ {
1782
+ "type": "text",
1783
+ "text": "Table 7: SiMo with wider models. All models are trained with 200 epochs. ",
1784
+ "bbox": [
1785
+ 253,
1786
+ 352,
1787
+ 743,
1788
+ 366
1789
+ ],
1790
+ "page_idx": 14
1791
+ },
1792
+ {
1793
+ "type": "text",
1794
+ "text": "B.5 TRANSFER TO OBJECT DETECTION ",
1795
+ "text_level": 1,
1796
+ "bbox": [
1797
+ 174,
1798
+ 395,
1799
+ 457,
1800
+ 409
1801
+ ],
1802
+ "page_idx": 14
1803
+ },
1804
+ {
1805
+ "type": "text",
1806
+ "text": "Setup We utilize FPN (Lin et al., 2017) with a stack of $4 \\ 3 \\times 3$ convolution layers in R-CNN head to validate the effectiveness of SiMo. Following the MoCo training protocol, we fine-tune with synchronized batch-normalization (Peng et al., 2018) across GPUs. The additional initialized layers are also equipped with BN for stable training. To effectively validate the transferability of the features, the training schedule is set to be 12 epochs (known as $1 \\times$ ), in which learning rate is initialized as 0.2 and decreased at 7 and 11 epochs with a factor of 0.1. The image scales are random sampled of [640, 800] pixels during training and fixed with 800 at inference. ",
1807
+ "bbox": [
1808
+ 173,
1809
+ 420,
1810
+ 825,
1811
+ 520
1812
+ ],
1813
+ "page_idx": 14
1814
+ },
1815
+ {
1816
+ "type": "text",
1817
+ "text": "Results Table 8 summarizes the fine-tuning results on COCO val2017 of different pre-training methods. Random initialization indicates training COCO from scratch, and supervised represents conventional pre-training with ImageNet labels. Compared with MoCo, SiMo achieves competitive performance without large quantities of negative pairs. It is also on a par with the supervised counterpart and significantly outperforms random initialized one. ",
1818
+ "bbox": [
1819
+ 174,
1820
+ 535,
1821
+ 823,
1822
+ 606
1823
+ ],
1824
+ "page_idx": 14
1825
+ },
1826
+ {
1827
+ "type": "table",
1828
+ "img_path": "images/eba47c305e1ba26dd28dcba3db364fac9097a14899be90bb42331564aeb9c034.jpg",
1829
+ "table_caption": [
1830
+ "Table 8: Object detection fine-tuned on COCO. "
1831
+ ],
1832
+ "table_footnote": [],
1833
+ "table_body": "<table><tr><td>pre-train</td><td>AP</td><td>AP50</td><td>AP75</td><td>APs</td><td>APm</td><td>AP</td></tr><tr><td>random init</td><td>31.4</td><td>49.4</td><td>34.0</td><td>17.9</td><td>32.3</td><td>41.6</td></tr><tr><td>supervised</td><td>39.0</td><td>59.1</td><td>42.6</td><td>22.4</td><td>42.2</td><td>50.6</td></tr><tr><td>MoCo v2</td><td>39.1</td><td>59.2</td><td>42.5</td><td>23.3</td><td>42.1</td><td>50.8</td></tr><tr><td>SiMo</td><td>39.0</td><td>59.2</td><td>42.3</td><td>22.9</td><td>41.8</td><td>50.5</td></tr></table>",
1834
+ "bbox": [
1835
+ 294,
1836
+ 619,
1837
+ 699,
1838
+ 693
1839
+ ],
1840
+ "page_idx": 14
1841
+ },
1842
+ {
1843
+ "type": "text",
1844
+ "text": "C A TOY EVALUATION OF EQCO ",
1845
+ "text_level": 1,
1846
+ "bbox": [
1847
+ 174,
1848
+ 748,
1849
+ 462,
1850
+ 766
1851
+ ],
1852
+ "page_idx": 14
1853
+ },
1854
+ {
1855
+ "type": "text",
1856
+ "text": "To evaluate the effectiveness of $\\mathrm { E q C o }$ as mutual information (MI) estimator, following the configuration of Poole et al. (2019), we estimate the MI lower bound of between two simple random vectors. ",
1857
+ "bbox": [
1858
+ 174,
1859
+ 781,
1860
+ 825,
1861
+ 824
1862
+ ],
1863
+ "page_idx": 14
1864
+ },
1865
+ {
1866
+ "type": "text",
1867
+ "text": "Specifically, given that $( X , Y )$ are drawn from the known correlated Gaussian distribution, we calculate the lower bound of MI between $X$ and $Y$ based on their embedding. $X$ is a 20-dimensional random variables drawn from a standard Gaussian distribution. And we sampled $Y$ with the following rule: ",
1868
+ "bbox": [
1869
+ 173,
1870
+ 830,
1871
+ 825,
1872
+ 887
1873
+ ],
1874
+ "page_idx": 14
1875
+ },
1876
+ {
1877
+ "type": "equation",
1878
+ "img_path": "images/42787800b6592f7a3c0af6d6e607e2148c2b9e45207a80222f8a9d0d6a54f6b7.jpg",
1879
+ "text": "$$\nY = \\rho X + \\sqrt { 1 - \\rho ^ { 2 } } \\epsilon\n$$",
1880
+ "text_format": "latex",
1881
+ "bbox": [
1882
+ 423,
1883
+ 905,
1884
+ 576,
1885
+ 925
1886
+ ],
1887
+ "page_idx": 14
1888
+ },
1889
+ {
1890
+ "type": "text",
1891
+ "text": "where $\\rho$ is a the given correlation coefficient and $\\epsilon$ is a random variable sampled from a standard Gaussian distribution and independent from $X$ . With a known $\\rho$ , the ground truth MI between $X$ and $Y$ is easy to compute: ",
1892
+ "bbox": [
1893
+ 173,
1894
+ 103,
1895
+ 825,
1896
+ 146
1897
+ ],
1898
+ "page_idx": 15
1899
+ },
1900
+ {
1901
+ "type": "equation",
1902
+ "img_path": "images/eab74a872a3f460fc2dbe3c4f5afda2e19a3dd1be78e1247fb062699df694dc0.jpg",
1903
+ "text": "$$\n{ \\mathcal { T } } \\left( X , Y \\right) = - { \\frac { d } { 2 } } \\log \\left( 1 - \\rho ^ { 2 } \\right)\n$$",
1904
+ "text_format": "latex",
1905
+ "bbox": [
1906
+ 400,
1907
+ 161,
1908
+ 596,
1909
+ 193
1910
+ ],
1911
+ "page_idx": 15
1912
+ },
1913
+ {
1914
+ "type": "text",
1915
+ "text": "Here, $d$ is the dimension of $X$ and $Y$ , and as mentioned above we set $d = 2 0$ . ",
1916
+ "bbox": [
1917
+ 173,
1918
+ 202,
1919
+ 681,
1920
+ 217
1921
+ ],
1922
+ "page_idx": 15
1923
+ },
1924
+ {
1925
+ "type": "text",
1926
+ "text": "To embed $X$ and $Y$ , we adopt two MLPs respectively, and each MLP has 1 hidden layer of 256 units, followed by ReLU activation function. We use Adam optimizer with learning rate of 0.0005 to optimize InfoNCE or EqCo for 5000 steps. For each training iteration, $K$ pairs of $( X , Y )$ are independently sampled, which means there are $K - 1$ negative samples for each query. After training, the weights of MLPs are frozen and we repeat estimating the lower bound of MI for 1000 times to reduce the estimating variance. For experiments with EqCo, we set the $\\alpha = 5 1 2$ . ",
1927
+ "bbox": [
1928
+ 173,
1929
+ 223,
1930
+ 825,
1931
+ 309
1932
+ ],
1933
+ "page_idx": 15
1934
+ },
1935
+ {
1936
+ "type": "text",
1937
+ "text": "As shown in Table 9, $\\mathcal { T } _ { N C E }$ varies with $K$ , while $\\mathcal { T } _ { E q C o }$ remains steady. Especially, when the ground truth MI is relatively large (e.g., 8, 10), significant differences between EqCo and InfoNCE can be observed. The experiment further validates the effectiveness of $\\mathrm { E q C o }$ . ",
1938
+ "bbox": [
1939
+ 174,
1940
+ 314,
1941
+ 825,
1942
+ 357
1943
+ ],
1944
+ "page_idx": 15
1945
+ },
1946
+ {
1947
+ "type": "table",
1948
+ "img_path": "images/816f7c95d54c35d232d05c2601d821b946eb16778054c6aca8477a7d79d3bd9e.jpg",
1949
+ "table_caption": [],
1950
+ "table_footnote": [],
1951
+ "table_body": "<table><tr><td colspan=\"5\">K</td></tr><tr><td></td><td>64</td><td>128</td><td>256</td><td>512</td></tr><tr><td>Mutual Information=2.0 INCE</td><td>1.7</td><td>1.8</td><td>1.9</td><td>1.9</td></tr><tr><td>IEqCo</td><td>1.9</td><td>1.9</td><td>1.9</td><td>1.9</td></tr><tr><td>Mutual Information = 4.0 INCE</td><td>2.9</td><td>3.2</td><td>3.4</td><td>3.6</td></tr><tr><td>IEqCo Mutual Information = 6.0</td><td>3.8</td><td>3.7</td><td>3.6</td><td>3.6</td></tr><tr><td>INCE</td><td>3.6</td><td>4.1</td><td>4.5</td><td>4.9</td></tr><tr><td>IEqCo</td><td>5.1</td><td>5.0</td><td>4.9</td><td>4.9</td></tr><tr><td>Mutual Information=8.0</td><td></td><td></td><td></td><td></td></tr><tr><td>INCE</td><td>3.9</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>4.6</td><td>5.1</td><td>5.6</td></tr><tr><td>IEqCo</td><td>5.8</td><td>5.7</td><td>5.7</td><td>5.6</td></tr><tr><td>Mutual Information= 10.0</td><td></td><td></td><td></td><td></td></tr><tr><td>INCE IEqCo</td><td>4.1</td><td>4.7</td><td>5.4</td><td>6.0</td></tr></table>",
1952
+ "bbox": [
1953
+ 310,
1954
+ 369,
1955
+ 687,
1956
+ 611
1957
+ ],
1958
+ "page_idx": 15
1959
+ },
1960
+ {
1961
+ "type": "text",
1962
+ "text": "Table 9: Estimating mutual information by InfoNCE and $\\mathrm { E q C o }$ with different batch size and various ground truth mutual information. ",
1963
+ "bbox": [
1964
+ 173,
1965
+ 619,
1966
+ 821,
1967
+ 648
1968
+ ],
1969
+ "page_idx": 15
1970
+ }
1971
+ ]
parse/train/u8X280hw1Mt/u8X280hw1Mt_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/u8X280hw1Mt/u8X280hw1Mt_model.json ADDED
The diff for this file is too large to render. See raw diff
 
vlm/train/4qR3coiNaIv/0.png ADDED

Git LFS Details

  • SHA256: 08840c09b93ab7b3512a8ad834335130e1bc93f90418f35170ac959b22f2e3a2
  • Pointer size: 131 Bytes
  • Size of remote file: 517 kB
vlm/train/4qR3coiNaIv/1.png ADDED

Git LFS Details

  • SHA256: e6ca6971125823713c8c82a18dcd2f4f2cfcff6b203138caf3c35898cb453ea3
  • Pointer size: 131 Bytes
  • Size of remote file: 544 kB
vlm/train/4qR3coiNaIv/10.png ADDED

Git LFS Details

  • SHA256: 124234bb0a4da6dbe6cd6eb66cc66ca62b0fb45e63519344a8c9e4c8f1a5d48f
  • Pointer size: 131 Bytes
  • Size of remote file: 519 kB
vlm/train/4qR3coiNaIv/11.png ADDED

Git LFS Details

  • SHA256: 8538d313e5ac74cb9c77a1eb904b71fa642cc0dd2fbe7b7c86461960b429314b
  • Pointer size: 131 Bytes
  • Size of remote file: 180 kB
vlm/train/4qR3coiNaIv/12.png ADDED

Git LFS Details

  • SHA256: 3f15bb7224e347418d30d461c5da5e8dbec02581560a35af5a527211eeb946e1
  • Pointer size: 131 Bytes
  • Size of remote file: 373 kB
vlm/train/4qR3coiNaIv/13.png ADDED

Git LFS Details

  • SHA256: 4585e238dc33d8d5cf89415e7dd93b1a1669c3b3582fc4f7f6f5a67aac3ff414
  • Pointer size: 131 Bytes
  • Size of remote file: 131 kB
vlm/train/4qR3coiNaIv/2.png ADDED

Git LFS Details

  • SHA256: 2dbab7ea2a140b2baeba2efa714f091235f5ceafd601c1baf37481d7eaafa769
  • Pointer size: 131 Bytes
  • Size of remote file: 555 kB
vlm/train/4qR3coiNaIv/3.png ADDED

Git LFS Details

  • SHA256: beb7a5b67ba7dbdfce2fa7ecd8b9fbcd086d1bc8f4b8e4f3b276912bf6e947be
  • Pointer size: 131 Bytes
  • Size of remote file: 595 kB
vlm/train/4qR3coiNaIv/4.png ADDED

Git LFS Details

  • SHA256: e582869bf40013593fad6ddcf99d08549be974ace115518117521a953d89729e
  • Pointer size: 131 Bytes
  • Size of remote file: 547 kB
vlm/train/4qR3coiNaIv/5.png ADDED

Git LFS Details

  • SHA256: 2d20ed4150dd3dd368872630b34a0edb3d0c9eba72a85620ae9ecfdcd888fd47
  • Pointer size: 131 Bytes
  • Size of remote file: 572 kB
vlm/train/4qR3coiNaIv/6.png ADDED

Git LFS Details

  • SHA256: 62f1646bb2a155a90cde4bcb87518b3260e8dfe72d75051efcb75260bf42fc78
  • Pointer size: 131 Bytes
  • Size of remote file: 596 kB
vlm/train/4qR3coiNaIv/7.png ADDED

Git LFS Details

  • SHA256: 39bd100526c8da14ede780bf468e01e634e62e518ecea42cc67360a9d2e567bd
  • Pointer size: 131 Bytes
  • Size of remote file: 562 kB
vlm/train/4qR3coiNaIv/8.png ADDED

Git LFS Details

  • SHA256: 24753aa6f8f19c488564ece4da558a09e88c1dbad546ed9de2328613f62d6224
  • Pointer size: 131 Bytes
  • Size of remote file: 588 kB
vlm/train/4qR3coiNaIv/9.png ADDED

Git LFS Details

  • SHA256: b57bd57773dfe6aa619f018e45cef27bc37fc08c73e5dbf03fc882992bc11381
  • Pointer size: 131 Bytes
  • Size of remote file: 513 kB
vlm/train/5GihaaZKL4/0.png ADDED

Git LFS Details

  • SHA256: 49812858e2ab1a30c6cbfaab0ab18c96892603bb3f25f6222550fd6770024395
  • Pointer size: 131 Bytes
  • Size of remote file: 462 kB
vlm/train/5GihaaZKL4/1.png ADDED

Git LFS Details

  • SHA256: a0c97d9af0fd46a6c5447e32bffca38f71108a1b3b7e90ce2e5f5e9edb14cfc1
  • Pointer size: 131 Bytes
  • Size of remote file: 438 kB
vlm/train/5GihaaZKL4/2.png ADDED

Git LFS Details

  • SHA256: 7a04cc73a3b8b396eb52c22117232b5100e4318ae8512d0b99c8b4e670aa70cd
  • Pointer size: 131 Bytes
  • Size of remote file: 467 kB
vlm/train/5GihaaZKL4/3.png ADDED

Git LFS Details

  • SHA256: 66e9dedc729e19375dd03b77d5adc1a766375739cb6759826554e5dc8fff9c88
  • Pointer size: 131 Bytes
  • Size of remote file: 407 kB
vlm/train/5GihaaZKL4/4.png ADDED

Git LFS Details

  • SHA256: d2df6043d5087f69380e141fa15ea52ecab5e2d8701c55fed5ba63beac0a4f3c
  • Pointer size: 131 Bytes
  • Size of remote file: 415 kB
vlm/train/5GihaaZKL4/5.png ADDED

Git LFS Details

  • SHA256: cfe612824e4fca1c3a77acef7d72274ca70c77043d3c7e2f9ecd346cd4e9a04b
  • Pointer size: 131 Bytes
  • Size of remote file: 297 kB
vlm/train/5GihaaZKL4/6.png ADDED

Git LFS Details

  • SHA256: de9121eb752ea5f2492b87efc008b761d6c18922261f6d48fd593f25a7c57cb3
  • Pointer size: 131 Bytes
  • Size of remote file: 372 kB
vlm/train/5GihaaZKL4/7.png ADDED

Git LFS Details

  • SHA256: 33b7c230e1e8bee527d38ef8a8395120fb8f56ab2c093f17225f2ba9b69bcd65
  • Pointer size: 131 Bytes
  • Size of remote file: 534 kB
vlm/train/5GihaaZKL4/8.png ADDED

Git LFS Details

  • SHA256: 9ac571b2117842e8506e9bd04ef1babdd6c53d44d7d601e7ea9107c9d307db7d
  • Pointer size: 131 Bytes
  • Size of remote file: 425 kB
vlm/train/6vWuYzkp8d/0.png ADDED

Git LFS Details

  • SHA256: 9bc0b259ef95d1ce7cb7ea12b91ffa82e5866203cb94821c7f7b333417b7bc49
  • Pointer size: 131 Bytes
  • Size of remote file: 500 kB
vlm/train/6vWuYzkp8d/1.png ADDED

Git LFS Details

  • SHA256: 5755fc19ed9a4bf49f5e7996103087d467958b29e58e582d1b60465c9752492f
  • Pointer size: 131 Bytes
  • Size of remote file: 899 kB
vlm/train/6vWuYzkp8d/10.png ADDED

Git LFS Details

  • SHA256: 2c9efe5201956f471c9219f5730a71c8644496228a642233de02b696a3ffa844
  • Pointer size: 131 Bytes
  • Size of remote file: 555 kB
vlm/train/6vWuYzkp8d/11.png ADDED

Git LFS Details

  • SHA256: 52bff9f76417f797cbecb7ef0ff7d19722b68cee3f28919ca87e1795387f28db
  • Pointer size: 131 Bytes
  • Size of remote file: 556 kB
vlm/train/6vWuYzkp8d/12.png ADDED

Git LFS Details

  • SHA256: a1189488c91dbdc95a7f9102442f8980fa58ce50622fd6d930e296b6681061a3
  • Pointer size: 131 Bytes
  • Size of remote file: 461 kB
vlm/train/6vWuYzkp8d/2.png ADDED

Git LFS Details

  • SHA256: b61d0cf224f6bc6ca38e10aef6061a96b333b5c52d8154741c5413783cbf3bd7
  • Pointer size: 131 Bytes
  • Size of remote file: 499 kB
vlm/train/6vWuYzkp8d/3.png ADDED

Git LFS Details

  • SHA256: 8f917cf69e93da4ffb3c9930bcefffba090536fd82c9e38b9552112839403955
  • Pointer size: 131 Bytes
  • Size of remote file: 483 kB