Datasets:
Add files using upload-large-folder tool
Browse files- md/train/-kfLEqppEm_/-kfLEqppEm_.md +660 -0
- md/train/B1xDq2EFDH/B1xDq2EFDH.md +224 -0
- md/train/BJxhijAcY7/BJxhijAcY7.md +543 -0
- md/train/Bke96sC5tm/Bke96sC5tm.md +300 -0
- md/train/Bkg3g2R9FX/Bkg3g2R9FX.md +643 -0
- md/train/ByIAPUcee/ByIAPUcee.md +232 -0
- md/train/F8whUO8HNbP/F8whUO8HNbP.md +305 -0
- md/train/HJNJws0cF7/HJNJws0cF7.md +283 -0
- md/train/HJgcvJBFvB/HJgcvJBFvB.md +433 -0
- md/train/HkxBJT4YvB/HkxBJT4YvB.md +265 -0
- md/train/LZDiWaC9CGL/LZDiWaC9CGL.md +341 -0
- md/train/SJgIPJBFvH/SJgIPJBFvH.md +0 -0
- md/train/SkxxIs0qY7/SkxxIs0qY7.md +346 -0
- md/train/VD_ozqvBy4W/VD_ozqvBy4W.md +375 -0
- md/train/WsfXFxqZXRO/WsfXFxqZXRO.md +470 -0
- md/train/crAi7c41xTh/crAi7c41xTh.md +0 -0
- md/train/nQxCYIFk7Rz/nQxCYIFk7Rz.md +0 -0
- md/train/ryCM8zWRb/ryCM8zWRb.md +259 -0
- md/train/uqv8-U4lKBe/uqv8-U4lKBe.md +322 -0
- md/train/vvi7KqHQiA/vvi7KqHQiA.md +289 -0
md/train/-kfLEqppEm_/-kfLEqppEm_.md
ADDED
|
@@ -0,0 +1,660 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CONVEX REGULARIZATION IN MONTE-CARLO TREE SEARCH
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Monte-Carlo planning and Reinforcement Learning (RL) are essential to sequential decision making. The recent AlphaGo and AlphaZero algorithms have shown how to successfully combine these two paradigms to solve large scale sequential decision problems. These methodologies exploit a variant of the well-known UCT algorithm to trade off the exploitation of good actions and the exploration of unvisited states, but their empirical success comes at the cost of poor sample-efficiency and high computation time. In this paper, we overcome these limitations by studying the benefit of convex regularization in Monte-Carlo Tree Search (MCTS) to drive exploration efficiently and to improve policy updates, as already observed in RL. First, we introduce a unifying theory on the use of generic convex regularizers in MCTS, deriving the first regret analysis of regularized MCTS and showing that it guarantees an exponential convergence rate. Second, we exploit our theoretical framework to introduce novel regularized backup operators for MCTS, based on the relative entropy of the policy update and on the Tsallis entropy of the policy. We provide an intuitive demonstration of the effect of each regularizer empirically verifying the consequence of our theoretical results on a toy problem. Finally, we show how our framework can easily be incorporated in AlphaGo and AlphaZero, and we empirically show the superiority of convex regularization w.r.t. representative baselines, on well-known RL problems across several Atari games.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Monte-Carlo Tree Search (MCTS) is a well-known algorithm to solve decision-making problems through the combination of Monte-Carlo planning with an incremental tree structure (Coulom, 2006). Although standard MCTS is only suitable for problems with discrete state and action spaces, recent advances have shown how to enable MCTS in continuous problems (Silver et al., 2016; Yee et al., 2016). Most remarkably, AlphaGo (Silver et al., 2016) and AlphaZero (Silver et al., 2017b;a) couple MCTS with neural networks trained using Reinforcement Learning (RL) (Sutton & Barto, 1998) methods, e.g., Deep $Q$ -Learning (Mnih et al., 2015), to speed up learning of large scale problems with continuous state space. In particular, a neural network is used to compute value function estimates of states as a replacement of time-consuming Monte-Carlo rollouts, and another neural network is used to estimate policies as a probability prior for the therein introduced PUCT action selection method, a variant of well-known UCT sampling strategy commonly used in MCTS for exploration (Kocsis et al., 2006). Despite AlphaGo and AlphaZero achieving state-of-the-art performance in games with high branching factor like Go (Silver et al., 2016) and Chess (Silver et al., 2017a), both methods suffer from poor sample-efficiency, mostly due to the polynomial convergence rate of PUCT (Xiao et al., 2019). This problem, combined with the high computational time to evaluate the deep neural networks, significantly hinder the applicability of both methodologies.
|
| 12 |
+
|
| 13 |
+
In this paper, we provide a unified theory of the use of convex regularization in MCTS, which proved to be an efficient solution for driving exploration and stabilizing learning in RL (Schulman et al., 2015; 2017a; Haarnoja et al., 2018; Buesing et al., 2020). In particular, we show how a regularized objective function in MCTS can be seen as an instance of the Legendre-Fenchel transform, similar to previous findings on the use of duality in RL (Mensch & Blondel, 2018; Geist et al., 2019; Nachum & Dai, 2020) and game theory (Shalev-Shwartz & Singer, 2006; Pavel, 2007). Establishing our theoretical framework, we can derive the first regret analysis of regularized MCTS, and prove that a generic convex regularizer guarantees an exponential convergence rate to the solution of the regularized objective function, which improves on the polynomial rate of PUCT. These results provide a theoretical ground for the use of arbitrary entropy-based regularizers in MCTS until now limited to maximum entropy (Xiao et al., 2019), among which we specifically study the relative entropy of policy updates, drawing on similarities with trust-region and proximal methods in RL (Schulman et al., 2015; 2017b), and the Tsallis entropy, used for enforcing the learning of sparse policies (Lee et al., 2018). Moreover, we provide an empirical analysis of the toy problem introduced in Xiao et al. (2019) to intuitively evince the practical consequences of our theoretical results for each regularizer. Finally, we empirically evaluate the proposed operators in AlphaGo and AlphaZero on problems of increasing complexity, from classic RL problems to an extensive analysis of Atari games, confirming the benefit of our novel operators compared to maximum entropy and, in general, the superiority of convex regularization in MCTS w.r.t. classic methods.
|
| 14 |
+
|
| 15 |
+
# 2 PRELIMINARIES
|
| 16 |
+
|
| 17 |
+
# 2.1 MARKOV DECISION PROCESSES
|
| 18 |
+
|
| 19 |
+
We consider the classical definition of a finite-horizon Markov Decision Process (MDP) as a 5- tuple $\mathcal { M } = \langle \mathcal { S } , \mathcal { A } , \mathcal { R } , \mathcal { P } , \gamma \rangle$ , where $s$ is the state space, $\mathcal { A }$ is the finite discrete action space, $\mathcal { R } : \mathcal { S } \times \mathcal { A } \times \mathcal { S } \to \mathbb { R }$ is the reward function, $\mathcal { P } : \mathcal { S } \times \mathcal { A } \mathcal { S }$ is the transition kernel, and $\gamma \in [ 0 , 1 )$ is the discount factor. A policy $\pi \in \Pi : \mathcal { S } \times \mathcal { A } \mathbb { R }$ is a probability distribution of the event of executing an action $a$ in a state $s$ . A policy $\pi$ induces a value function corresponding to the expected cumulative discounted reward collected by the agent when executing action $a$ in state s, and following the policy π thereafter: Qπ(s, a) , E -P∞k=0 γkri+k+1|si = s, ai = a, π, timal policy $\pi ^ { * }$ , which is the policy that maximizes the expected cumulative discounted reward. The optimal policy corresponds to the one satisfying the optimal Bellman equation (Bellman, 1954) $\begin{array} { r } { Q ^ { * } ( s , a ) \triangleq \int _ { S } \mathcal { P } ( s ^ { \prime } | s , a ) \left[ \mathcal { R } ( s , a , s ^ { \prime } ) + \gamma \operatorname* { m a x } _ { a ^ { \prime } } Q ^ { * } ( s ^ { \prime } , a ^ { \prime } ) \right] d s ^ { \prime } } \end{array}$ , and is the fixed point of the optimal Bellman operator $\begin{array} { r } { \mathcal { T } ^ { * } Q ( s , a ) \triangleq \int _ { S } \mathcal { P } ( s ^ { \prime } | s , a ) \left[ \mathcal { R } ( s , a , s ^ { \prime } ) + \gamma \operatorname* { m a x } _ { a ^ { \prime } } Q ( s ^ { \prime } , a ^ { \prime } ) \right] d s ^ { \prime } } \end{array}$ . Additionally, we define the Bellman operator under the policy $\pi$ as ${ \mathcal { T } } _ { \pi } Q ( s , a )$ , $\begin{array} { r } { \int _ { \mathcal { S } } \mathcal { P } ( s ^ { \prime } | s , a ) \left[ \mathcal { R } ( s , a , s ^ { \prime } ) + \gamma \int _ { \mathcal { A } } \pi ( a ^ { \prime } | s ^ { \prime } ) Q ( s ^ { \prime } , a ^ { \prime } ) d a ^ { \prime } \right] d s ^ { \prime } } \end{array}$ , the optimal value function $V ^ { \ast } ( s )$ , $\operatorname* { m a x } _ { a \in \mathcal { A } } Q ^ { * } ( s , a )$ , and the value function under the policy $\pi$ as $V ^ { \pi } ( s ) \triangleq \operatorname* { m a x } _ { a \in \mathcal { A } } Q ^ { \pi } ( s , a )$ .
|
| 20 |
+
|
| 21 |
+
# 2.2 MONTE-CARLO TREE SEARCH AND UPPER CONFIDENCE BOUNDS FOR TREES
|
| 22 |
+
|
| 23 |
+
Monte-Carlo Tree Search (MCTS) is a planning strategy based on a combination of Monte-Carlo sampling and tree search to solve MDPs. MCTS builds a tree where the nodes are the visited states of the MDP, and the edges are the actions executed in each state. MCTS converges to the optimal policy (Kocsis et al., 2006; Xiao et al., 2019), iterating over a loop composed of four steps:
|
| 24 |
+
|
| 25 |
+
1. Selection: starting from the root node, a tree-policy is executed to navigate the tree until a node with unvisited children, i.e. expandable node, is reached;
|
| 26 |
+
2. Expansion: the reached node is expanded according to the tree policy;
|
| 27 |
+
3. Simulation: run a rollout, e.g. Monte-Carlo simulation, from the visited child of the current node to the end of the episode;
|
| 28 |
+
4. Backup: use the collected reward to update the action-values $Q ( \cdot )$ of the nodes visited in the trajectory from the root node to the expanded node.
|
| 29 |
+
|
| 30 |
+
The tree-policy used to select the action to execute in each node needs to balance the use of already known good actions, and the visitation of unknown states. The Upper Confidence bounds for Trees (UCT) sampling strategy (Kocsis et al., 2006) extends the use of the well-known UCB1 sampling strategy for multi-armed bandits (Auer et al., 2002), to MCTS. Considering each node corresponding to a state $s \in S$ as a different bandit problem, UCT selects an action $a \in { \mathcal { A } }$ applying an upper bound to the action-value function
|
| 31 |
+
|
| 32 |
+
$$
|
| 33 |
+
\mathrm { U C T } ( s , a ) = Q ( s , a ) + \epsilon \sqrt { \frac { \log N ( s ) } { N ( s , a ) } } ,
|
| 34 |
+
$$
|
| 35 |
+
|
| 36 |
+
where $N ( s , a )$ is the number of executions of action $a$ in state $s$ , $\begin{array} { r } { N ( s ) = \sum _ { a } N ( s , a ) } \end{array}$ , and $\epsilon$ is a constant parameter to tune exploration. UCT asymptotically converges to the optimal action-value function $Q ^ { * }$ , for all states and actions, with the probability of executing a suboptimal action at the root node approaching 0 with a polynomial rate $\textstyle { \dot { O } } ( { \frac { 1 } { t } } )$ , for a simulation budget $t$ (Kocsis et al., 2006; Xiao et al., 2019).
|
| 37 |
+
|
| 38 |
+
# 3 REGULARIZED MONTE-CARLO TREE SEARCH
|
| 39 |
+
|
| 40 |
+
The success of RL methods based on entropy regularization comes from their ability to achieve state-of-the-art performance in decision making and control problems, while enjoying theoretical guarantees and ease of implementation (Haarnoja et al., 2018; Schulman et al., 2015; Lee et al., 2018). However, the use of entropy regularization is MCTS is still mostly unexplored, although its advantageous exploration and value function estimation would be desirable to reduce the detrimental effect of high-branching factor in AlphaGo and AlphaZero. To the best of our knowledge, the MENTS algorithm (Xiao et al., 2019) is the first and only method to combine MCTS and entropy regularization. In particular, MENTS uses a maximum entropy regularizer in AlphaGo, proving an exponential convergence rate to the solution of the respective softmax objective function and achieving state-of-the-art performance in some Atari games (Bellemare et al., 2013). In the following, motivated by the success in RL and the promising results of MENTS, we derive a unified theory of regularization in MCTS based on the Legendre-Fenchel transform (Geist et al., 2019), that generalizes the use of maximum entropy of MENTS to an arbitrary convex regularizer. Notably, our theoretical framework enables to rigorously motivate the advantages of using maximum entropy and other entropy-based regularizers, such as relative entropy or Tsallis entropy, drawing connections with their RL counterparts TRPO (Schulman et al., 2015) and Sparse DQN (Lee et al., 2018), as MENTS does with Soft Actor-Critic (SAC) (Haarnoja et al., 2018).
|
| 41 |
+
|
| 42 |
+
# 3.1 LEGENDRE-FENCHEL TRANSFORM
|
| 43 |
+
|
| 44 |
+
Consider an MDP $\mathcal { M } = \langle \mathcal { S } , \mathcal { A } , \mathcal { R } , \mathcal { P } , \gamma \rangle$ , as previously defined. Let $\Omega : \Pi \mathbb { R }$ be a strongly convex function. For a policy $\pi _ { s } = \pi ( \cdot | s )$ and $\bar { Q } _ { s } = Q ( \bar { s } , \cdot ) \in \mathbb { R } ^ { 4 }$ , the Legendre-Fenchel transform (or convex conjugate) of $\Omega$ is $\Omega ^ { * } : \mathbb { R } ^ { A } \xrightarrow [ ] { } \mathbb { R }$ , defined as:
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
\Omega ^ { \ast } ( Q _ { s } ) \triangleq \operatorname* { m a x } _ { \pi _ { s } \in \Pi _ { s } } \mathcal { T } _ { \pi _ { s } } Q _ { s } - \tau \Omega ( \pi _ { s } ) ,
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
where the temperature $\tau$ specifies the strength of regularization. Among the several properties of the Legendre-Fenchel transform, we use the following (Mensch & Blondel, 2018; Geist et al., 2019).
|
| 51 |
+
|
| 52 |
+
Proposition 1 Let $\Omega$ be strongly convex.
|
| 53 |
+
|
| 54 |
+
• Unique maximizing argument: $\nabla \Omega ^ { * }$ is Lipschitz and satisfies
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
\nabla \Omega ^ { * } ( Q _ { s } ) = \arg \operatorname* { m a x } _ { \pi _ { s } \in \Pi _ { s } } \mathcal { T } _ { \pi _ { s } } Q _ { s } - \tau \Omega ( \pi _ { s } ) .
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
• Boundedness: if there are constants $L _ { \Omega }$ and $U _ { \Omega }$ such that for all $\pi _ { s } \in \Pi _ { s }$ , we have $L _ { \Omega } \leq$ $\Omega ( \pi _ { s } ) \leq U _ { \Omega }$ , then
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\operatorname* { m a x } _ { a \in \mathcal { A } } Q _ { s } ( a ) - \tau U _ { \Omega } \le \Omega ^ { * } ( Q _ { s } ) \le \operatorname* { m a x } _ { a \in \mathcal { A } } Q _ { s } ( a ) - \tau L _ { \Omega } .
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
• Contraction: for any $Q _ { 1 } , Q _ { 2 } \in \mathbb { R } ^ { S \times A }$
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\parallel \Omega ^ { * } ( Q _ { 1 } ) - \Omega ^ { * } ( Q _ { 2 } ) \parallel _ { \infty } \leq \gamma \parallel Q _ { 1 } - Q _ { 2 } \parallel _ { \infty } .
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
Although the Legendre-Fenchel transform $\Omega ^ { * }$ applies to every strongly convex function, for the purpose of this work we only consider a representative set of entropic regularizers.
|
| 73 |
+
|
| 74 |
+
# 3.2 REGULARIZED BACKUP AND TREE POLICY
|
| 75 |
+
|
| 76 |
+
In MCTS, each node of the tree represents a state $s \in S$ and contains a visitation count $N ( s , a )$ . Given a trajectory, we define $n \big ( s _ { T } \big )$ as the leaf node corresponding to the reached state $s _ { T }$ . Let $s _ { 0 } , a _ { 0 } , s _ { 1 } , a _ { 1 } . . . , s _ { T }$ be the state action trajectory in a simulation, where $n { \left( { { s _ { T } } } \right) }$ is a leaf node of $\tau$ . Whenever a node $n { \left( { { s _ { T } } } \right) }$ is expanded, the respective action values (Equation 6) are initialized as $Q _ { \Omega } ( s _ { T } , a ) = 0$ , and $\dot { N } ( \dot { s } _ { T } , a ) = 0$ for all $a \in { \mathcal { A } }$ . For all nodes in the trajectory, the visitation count is updated by $N ( s _ { t } , a _ { t } ) = N ( s _ { t } , a _ { t } ) + 1$ , and the action-values by
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
Q _ { \Omega } ( s _ { t } , a _ { t } ) = \left\{ \begin{array} { l l } { r ( s _ { t } , a _ { t } ) + \gamma \rho } & { \mathrm { i f ~ } t = T } \\ { r ( s _ { t } , a _ { t } ) + \gamma \Omega ^ { * } ( Q _ { \Omega } ( s _ { t + 1 } ) / \tau ) ) } & { \mathrm { i f ~ } t < T } \end{array} \right.
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
where $Q _ { \Omega } ( s _ { t + 1 } ) \in \mathbb { R } ^ { A }$ with components $Q _ { \Omega } ( s _ { t + 1 } , a ) , \forall a \in \mathcal { A }$ , and $\rho$ is an estimate returned from an evaluation function computed in $s _ { T }$ , e.g. a discounted cumulative reward averaged over multiple rollouts, or the value-function of node $n ( s _ { T + 1 } )$ returned by a value-function approximator, e.g. a neural network pretrained with deep $Q$ -learning (Mnih et al., 2015), as done in (Silver et al., 2016; Xiao et al., 2019). We revisit the E2W sampling strategy limited to maximum entropy regularization (Xiao et al., 2019) and, through the use of the convex conjugate in Equation (6), we derive a novel sampling strategy that generalizes to any convex regularizer
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\pi _ { t } ( a _ { t } | s _ { t } ) = ( 1 - \lambda _ { s _ { t } } ) \nabla \Omega ^ { \ast } ( Q _ { \Omega } ( s _ { t } ) / \tau ) ( a _ { t } ) + \frac { \lambda _ { s _ { t } } } { | \mathcal { A } | } ,
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
where $\lambda _ { s _ { t } } = \epsilon | \boldsymbol { \mathcal { A } } | \big / \mathrm { l o g } ( \sum _ { a } N ( s _ { t } , a ) + 1 )$ with $\epsilon > 0$ as an exploration parameter, and $\nabla \Omega ^ { * }$ depends on the measure in use (see Table 1 for maximum, relative, and Tsallis entropy). We call this sampling strategy Extended Empirical Exponential Weight (E3W) to highlight the extension of E2W from maximum entropy to a generic convex regularizer.
|
| 89 |
+
|
| 90 |
+
# 3.3 CONVERGENCE RATE TO REGULARIZED OBJECTIVE
|
| 91 |
+
|
| 92 |
+
We show that the regularized value $V _ { \Omega }$ can be effectively estimated at the root state $s \in { \mathcal { S } }$ , with the assumption that each node in the tree has a $\sigma ^ { 2 }$ -subgaussian distribution. This result extends the analysis provided in (Xiao et al., 2019), which is limited to the use of maximum entropy.
|
| 93 |
+
|
| 94 |
+
Theorem 1 At the root node s where $N ( s )$ is the number of visitations, with $\epsilon > 0$ , $V _ { \Omega } ( s )$ is the estimated value, with constant $C$ and $\hat { C }$ , we have
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
\mathbb { P } ( | V _ { \Omega } ( s ) - V _ { \Omega } ^ { * } ( s ) | > \epsilon ) \le C \exp \{ - \frac { N ( s ) \epsilon } { \hat { C } \sigma ( \log ( 2 + N ( s ) ) ) ^ { 2 } } \} ,
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
where $V _ { \Omega } ( s ) = \Omega ^ { * } ( Q _ { s } )$ and $V _ { \Omega } ^ { * } ( s ) = \Omega ^ { * } ( Q _ { s } ^ { * } )$ . From this theorem, we obtain that the convergence rate of choosing the best action $a ^ { * }$ at the root node, when using the E3W strategy, is exponential.
|
| 101 |
+
|
| 102 |
+
Theorem 2 Let $a _ { t }$ be the action returned by E3W at step t. For large enough t and constants $C , { \hat { C } }$
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
\mathbb { P } ( a _ { t } \neq a ^ { * } ) \leq C t \exp \{ - \frac { t } { \hat { C } \sigma ( \log ( t ) ) ^ { 3 } } \} .
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
# 4 ENTROPY-REGULARIZATION BACKUP OPERATORS
|
| 109 |
+
|
| 110 |
+
From the introduction of a unified view of generic strongly convex regularizers as backup operators in MCTS, we narrow the analysis to entropy-based regularizers. For each entropy function, Table 1 shows the Legendre-Fenchel transform and the maximizing argument, which can be respectively replaced in our backup operation (Equation 6) and sampling strategy E3W (Equation 7). Using maximum entropy retrieves the maximum entropy MCTS problem introduced in the MENTS algorithm (Xiao et al., 2019). This approach closely resembles the maximum entropy RL framework used to encourage exploration (Haarnoja et al., 2018; Schulman et al., 2017a). We introduce two novel MCTS algorithms based on the minimization of relative entropy of the policy update, inspired by trust-region (Schulman et al., 2015) and proximal optimization methods (Schulman et al., 2017b) in RL, and on the maximization of Tsallis entropy, which has been more recently introduced in RL as an effective solution to enforce the learning of sparse policies (Lee et al., 2018). We call these algorithms RENTS and TENTS. Contrary to maximum and relative entropy, the definition of the
|
| 111 |
+
|
| 112 |
+
Legendre-Fenchel and maximizing argument of Tsallis entropy is non-trivial, being
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
\begin{array} { r l } & { ~ \Omega ^ { * } ( Q _ { t } ) = \tau \cdot \mathrm { s p m a x } ( Q _ { t } ( s , \cdot ) / \tau ) , } \\ & { ~ \nabla \Omega ^ { * } ( Q _ { t } ) = \operatorname* { m a x } \Bigg ( \displaystyle \frac { Q _ { t } ( s , a ) } { \tau } - \displaystyle \frac { \sum _ { a \in { \mathcal { K } } } Q _ { t } ( s , a ) / \tau - 1 } { | { \mathcal { K } } | } , 0 \Bigg ) , } \end{array}
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
where spmax is defined for any function $f : \mathcal { S } \times \mathcal { A } \mathbb { R }$ as
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\operatorname { s p m a x } ( f ( s , \cdot ) ) \triangleq \sum _ { a \in { \mathcal { K } } } \left( { \frac { f ( s , a ) ^ { 2 } } { 2 } } - { \frac { ( \sum _ { a \in { \mathcal { K } } } f ( s , a ) - 1 ) ^ { 2 } } { 2 | K | ^ { 2 } } } \right) + { \frac { 1 } { 2 } } ,
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
and $\kappa$ is the set of actions that satisfy $\begin{array} { r } { 1 + i f ( s , a _ { i } ) > \sum _ { j = 1 } ^ { i } f ( s , a _ { j } ) } \end{array}$ , with $a _ { i }$ indicating the action with the $i$ -th largest value of $f ( s , a )$ (Lee et al., 2018).
|
| 125 |
+
|
| 126 |
+
Table 1: List of entropy regularizers with Legendre-Fenchel transforms and maximizing arguments.
|
| 127 |
+
|
| 128 |
+
<table><tr><td>Entropy</td><td>Regularizer Ω2(πs)</td><td>Legendre-Fenchel Ω*(Q s)</td><td> Max argument VΩ*(Qs)</td></tr><tr><td rowspan="2">Maximum</td><td rowspan="2">∑π(a|s)logπ(a|s)</td><td>log∑e Q(s,a) T</td><td>Q(s,a) e T</td></tr><tr><td>Qt(s,a)</td><td>Ωe Q(s,b) T Qt(s,a)</td></tr><tr><td rowspan="2">Relative</td><td rowspan="2">DkL(πt(a|s)llπt-1(a|s))log∑aTt-1(als)e</td><td rowspan="2">T</td><td>Tt-1(a|s)e T</td></tr><tr><td>∑Tt-1(b|s)e Qt(s,b) T</td></tr><tr><td>Tsallis</td><td>( π(a|s) -1)</td><td>Equation (10)</td><td>Equation (11)</td></tr></table>
|
| 129 |
+
|
| 130 |
+
# 4.1 REGRET ANALYSIS
|
| 131 |
+
|
| 132 |
+
At the root node, let each children node $i$ be assigned with a random variable $X _ { i }$ , with mean value $V _ { i }$ , while the quantities related to the optimal branch are denoted by $^ *$ , e.g. mean value $V ^ { * }$ . At each nthe root node, at timestep n, is defined as RUCTn = nV ∗ − Pnt=1 Vit . Similarly, we define the regret timestep $n$ , the mean value of variable $X _ { i }$ is $V _ { i _ { n } }$ . The pseudo-regret (Coquelin $\&$ Munos, 2007) at of $\mathrm { E } 3 \mathrm { W }$ at the root node of the tree as
|
| 133 |
+
|
| 134 |
+
$$
|
| 135 |
+
R _ { n } = n V ^ { * } - \sum _ { t = 1 } ^ { n } V _ { i _ { t } } = n V ^ { * } - \sum _ { t = 1 } ^ { n } \mathbb { I } ( i _ { t } = i ) V _ { i _ { t } } = n V ^ { * } - \sum _ { i } V _ { i } \sum _ { t = 1 } ^ { n } { \hat { \pi } } _ { t } ( a _ { i } | s ) ,
|
| 136 |
+
$$
|
| 137 |
+
|
| 138 |
+
where $\hat { \pi } _ { t } ( \cdot )$ is the policy at time step $t$ , and $\mathbb { I } ( \cdot )$ is the indicator function.
|
| 139 |
+
|
| 140 |
+
Theorem 3 Let $\begin{array} { r } { \kappa _ { i } = \nabla \Omega ^ { * } ( a _ { i } | s ) + \frac { L } { p } \sqrt { \dot { C } \sigma ^ { 2 } \log \frac { C } { \delta } } / 2 n _ { i } } \end{array}$ , and $\begin{array} { r } { \chi _ { i } = \nabla \Omega ^ { * } ( a _ { i } | s ) - \frac { L } { p } \sqrt { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } / 2 n } , } \end{array}$ where $\nabla \Omega ^ { * } ( . | s )$ is the policy with respect to the mean value vector $V ( \cdot )$ at the root node s. For any $\delta > 0$ , with probability at least $1 - \delta$ , ∃ constant $L , p , C , { \hat { C } }$ so that the pseudo regret $R _ { n }$ satisfies
|
| 141 |
+
|
| 142 |
+
$$
|
| 143 |
+
n V ^ { * } - n \sum _ { i } V _ { i } \Big ( \kappa _ { i } + \frac { L } { p } \big ( \frac { \tau ( U _ { \Omega } - L _ { \Omega } ) } { 1 - \gamma } \big ) \Big ) \leq R _ { n } \leq n V ^ { * } - n \sum _ { i } V _ { i } \Big ( \chi _ { i } - \frac { L } { p } \big ( \frac { \tau ( U _ { \Omega } - L _ { \Omega } ) } { 1 - \gamma } \big ) \Big ) .
|
| 144 |
+
$$
|
| 145 |
+
|
| 146 |
+
This theorem provides bounds for the regret of E3W using a generic convex regularizer $\Omega$ ; thus, we can easily retrieve from it the regret bound for each entropy regularizer. Let $\begin{array} { r } { m = \operatorname* { m i n } _ { a } \nabla \Omega ^ { * } ( a | s ) } \end{array}$ .
|
| 147 |
+
|
| 148 |
+
Corollary 1 Maximum entropy: $\begin{array} { r } { n V ^ { * } - \tilde { n } \sum _ { i } V _ { i } \Big ( \kappa _ { i } + L \big ( \frac { \tau \log | A | } { 1 - \gamma } \big ) \Big ) \leq R _ { n } \leq n V ^ { * } - n \sum _ { i } V _ { i } \Big ( \chi _ { i } - L \big ( \frac { \tau \log | A | } { 1 - \gamma } \big ) \Big ) . } \end{array}$
|
| 149 |
+
|
| 150 |
+
$\begin{array} { r } { n V ^ { * } - \tilde { n } \sum _ { i } V _ { i } \Big ( \kappa _ { i } + L \big ( \frac { \tau ^ { \langle \log | A | - \frac { 1 } { m } \rangle } } { 1 - \gamma } \big ) \Big ) \leq R _ { n } \leq n V ^ { * } - n \sum _ { i } V _ { i } \Big ( \chi _ { i } - L \big ( \frac { \tau ( \log | A | - \frac { 1 } { m } ) } { 1 - \gamma } \big ) \Big ) . } \end{array}$
|
| 151 |
+
|
| 152 |
+
# Corollary 3 Tsallis entropy:
|
| 153 |
+
|
| 154 |
+
$$
|
| 155 |
+
\begin{array} { r } { n V ^ { * } - n \sum _ { i } V _ { i } \Big ( \kappa _ { i } + \frac { L } { 2 } \big ( \frac { | A | - 1 } { 2 | A | } \frac { \tau } { 1 - \gamma } \big ) \Big ) \leq R _ { n } \leq n V ^ { * } - n \sum _ { i } V _ { i } \Big ( \chi _ { i } - \frac { L } { 2 } \big ( \frac { | A | - 1 } { 2 | A | } \frac { \tau } { 1 - \gamma } \big ) \Big ) . } \end{array}
|
| 156 |
+
$$
|
| 157 |
+
|
| 158 |
+
Remarks. The regret bound of UCT and its variance have already been analyzed for nonregularized MCTS with binary tree (Coquelin & Munos, 2007). On the contrary, our regret bound analysis in Theorem 3 applies to generic regularized MCTS. From the specialized bounds in the corollaries, we observe that the maximum and relative entropy share similar results, although the bounds for relative entropy are slightly smaller due to $\textstyle { \frac { 1 } { m } }$ . Remarkably, the bounds for Tsallis entropy become tighter for increasing number of actions, which translates in limited regret in problems with high branching factor. This result establishes the advantage of Tsallis entropy in complex problems w.r.t. to other entropy regularizers, as empirically confirmed by the positive results in several Atari games described in Section 5.
|
| 159 |
+
|
| 160 |
+
# 4.2 ERROR ANALYSIS
|
| 161 |
+
|
| 162 |
+
We analyse the error of the regularized value estimate at the root node $n ( s )$ w.r.t. the optimal value: $\varepsilon _ { \Omega } = \dot { V _ { \Omega } } ( s ) - \dot { V ^ { \ast } } ( s )$ .
|
| 163 |
+
|
| 164 |
+
Theorem 4 For any $\delta > 0$ and generic convex regularizer $\Omega$ , with some constant $C , { \hat { C } }$ , with probability at least $1 - \delta$ , $\varepsilon _ { \Omega }$ satisfies
|
| 165 |
+
|
| 166 |
+
$$
|
| 167 |
+
- \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } - \frac { \tau ( U _ { \Omega } - L _ { \Omega } ) } { 1 - \gamma } \leq \varepsilon _ { \Omega } \leq \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } .
|
| 168 |
+
$$
|
| 169 |
+
|
| 170 |
+
To give a better understanding of the effect of each entropy regularizer in Table 1, we specialize the bound in Equation 14 to each of them. From (Lee et al., 2018), we know that for maximum entropy $\begin{array} { r } { \Omega ( { \boldsymbol \pi } _ { t } ) \stackrel { - } { = } \sum _ { a } \pi _ { t } \log \pi _ { t } } \end{array}$ , we have $- \log | \mathcal { A } | \ \leq \ \Omega ( \pi _ { t } ) \ \leq \ 0$ ; for relative entropy $\Omega ( \pi _ { t } ) =$ $\mathrm { K L } ( \pi _ { t } | | \pi _ { t - 1 } )$ , if we define $m = \mathrm { m i n } _ { a } \pi _ { t - 1 } ( a | s )$ , then we can derive $0 \leq \Omega ( \pi _ { t } ) \leq - \log | \mathcal { A } | +$ $\log { \frac { 1 } { m } }$ ; and for Tsallis entropy $\Omega ( \pi _ { t } ) = { \textstyle { \frac { 1 } { 2 } } } ( \parallel \pi _ { t } \parallel _ { 2 } ^ { 2 } - 1 )$ , we have $- \frac { | \ r _ { A } | - 1 } { 2 | \ r _ { A } | } \le \Omega ( \pi _ { t } ) \le 0$ . Then,
|
| 171 |
+
|
| 172 |
+
Corollary 5 relative entropy error: − $- \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log { \frac { C } { \delta } } } { 2 N ( s ) } } - \frac { \tau ( \log | A | - \log \frac { 1 } { m } ) } { 1 - \gamma } \leq \varepsilon _ { \Omega } \leq \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } .$
|
| 173 |
+
|
| 174 |
+
Corollary 6 Tsallis entropy error: $- \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } - \frac { | A | - 1 } { 2 | A | } \frac { \tau } { 1 - \gamma } \leq \varepsilon _ { \Omega } \leq \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } .$
|
| 175 |
+
|
| 176 |
+
These results show that when the number of actions $| { \cal { A } } |$ is large, TENTS enjoys the smallest error;
|
| 177 |
+
moreover, we also see that lower bound of RENTS is always smaller than for MENTS.
|
| 178 |
+
|
| 179 |
+
# 5 EMPIRICAL EVALUATION
|
| 180 |
+
|
| 181 |
+
In this section, we empirically evaluate the benefit of the proposed entropy-based MCTS regularizers. First, we complement our theoretical analysis with an empirical study of the synthetic tree toy problem introduced in Xiao et al. (2019), which serves as a simple scenario to give an interpretable demonstration of the effects of our theoretical results in practice. Second, we compare to AlphaGo and AlphaZero (Silver et al., 2016; 2017a), recently introduced to enable MCTS to solve large scale problems with high branching factor. Our implementation is a simplified version of the original algorithms, where we remove various tricks in favor of better interpretability. For the same reason, we do not compare with the most recent and state-of-the-art variant of AlphaZero known as MuZero (Schrittwieser et al., 2019), as this is a slightly different solution highly tuned to maximize performance, and a detailed description of its implementation is not available.
|
| 182 |
+
|
| 183 |
+
# 5.1 SYNTHETIC TREE
|
| 184 |
+
|
| 185 |
+
This toy problem is introduced in Xiao et al. (2019) to highlight the improvement of MENTS over UCT. It consists of a tree with branching factor $k$ and depth $d$ . Each edge of the tree is assigned a random value between 0 and 1. At each leaf, a Gaussian distribution is used as an evaluation function resembling the return of random rollouts. The mean of the Gaussian distribution is the sum of the values assigned to the edges connecting the root node to the considered leaf, while the standard deviation is $\bar { \sigma } = 0 . 0 5 ^ { 1 }$ . For stability, all the means are normalized between 0 and 1. As in Xiao et al. (2019), we create 5 trees on which we perform 5 different runs in each, resulting in 25 experiments, for all the combinations of branching factor $k = \{ 2 , 4 , 6 , 8 , 1 0 , 1 2 , 1 4 , 1 6 \}$ and depth $d = \{ 1 , 2 , 3 , 4 , 5 \}$ , computing: (i) the value estimation error at the root node w.r.t. the regularized optimal value: $\begin{array} { r } { \varepsilon _ { \Omega } = V _ { \Omega } - V * ; } \end{array}$ (ii) the value estimation error at the root node w.r.t. the unregularized optimal value: $\varepsilon _ { \mathrm { U C T } } = V _ { \Omega } - V * _ { \mathrm { U C T } } $ ; (iii) the regret $R$ as in Equation (13). For a fair comparison, we use fixed $\tau = 0 . 1$ and $\epsilon = 0 . 1$ across all algorithms. Figure 1 and 2 show how UCT and each regularizer behave for different configurations of the tree. We observe that, while RENTS and MENTS converge slower for increasing tree sizes, TENTS is robust w.r.t. the size of the tree and almost always converges faster than all other methods to the respective optimal value. Notably, the optimal value of TENTS seems to be very close to the one of UCT, i.e. the optimal value of the unregularized objective, and also converges faster than the one estimated by UCT, while MENTS and RENTS are considerably further from this value. In terms of regret, UCT explores less than the regularized methods and it is less prone to high regret, at the cost of slower convergence time. Nevertheless, the regret of TENTS is the smallest between the ones of the other regularizers, which seem to explore too much. These results show a general superiority of TENTS in this toy problem, also confirming our theoretical findings about the advantage of TENTS in terms of approximation error (Corollary 6) and regret (Corollary 3), in problems with many actions.
|
| 186 |
+
|
| 187 |
+

|
| 188 |
+
Figure 1: For each algorithm, we show the convergence of the value estimate at the root node to the respective optimal value (top), to the UCT optimal value (middle), and the regret (bottom).
|
| 189 |
+
|
| 190 |
+

|
| 191 |
+
Figure 2: For different branching factor $k$ (rows) and depth $d$ (columns), the heatmaps show: the absolute error of the value estimate at the root node after the last simulation of each algorithm w.r.t. the respective optimal value (a), and w.r.t. the optimal value of UCT (b); regret at the root node (c).
|
| 192 |
+
|
| 193 |
+

|
| 194 |
+
Figure 3: Cumulative rewards of AlphaZero with UCT and entropy-based operators, in CartPole (a) and Acrobot (b). Results are averaged over 5 and 10 seeds and show $9 5 \%$ confidence intervals.
|
| 195 |
+
|
| 196 |
+
# 5.2 ENTROPY-REGULARIZED ALPHAZERO
|
| 197 |
+
|
| 198 |
+
In its standard form, AlphaZero (Silver et al., 2017a) uses the PUCT sampling strategy, a variant of UCT (Kocsis et al., 2006) that samples actions according to the policy
|
| 199 |
+
|
| 200 |
+
$$
|
| 201 |
+
\mathit { P U C T } ( s , a ) = { Q } ( s , a ) + \epsilon { P } ( s , a ) { \frac { \sqrt { N ( s ) } } { 1 + N ( s , a ) } } ,
|
| 202 |
+
$$
|
| 203 |
+
|
| 204 |
+
where $P$ is a prior probability on action selection, and $\epsilon$ is an exploration constant. A value network and a policy network are used to compute, respectively, the action-value function $Q$ and the prior policy $P$ . We use a single neural network, with 2 hidden layers composed of 128 ELU units, and two output layer respectively for the action-value function and the policy. We run 500 AlphaZero episodes, where each episode is composed of 300 steps. A step consists of running 32 MCTS simulations from the root node, as defined in Section 2, using the action-value function computed by the value network instead of using Monte-Carlo rollouts. At the end of each cycle, the average action-value of the root node is computed and stored, the tree is expanded using the given sampling strategy, and the root node is updated with the reached node. At the end of the episode, a minibatch of 32 samples is built from the 300 stored action-values, and the network is trained with one step of gradient descent using RMSProp with learning rate 0.001. The entropy-regularized variants of AlphaZero can be simply derived replacing the average backup operator, with the desired entropy function, and replacing PUCT with E3W using the respective maximizing argument and $\epsilon = 0 . 1$ .
|
| 205 |
+
|
| 206 |
+
Cartpole and Acrobot. Figure 3 shows the cumulative reward of standard AlphaZero based on PUCT, and the three entropy-regularized variants, on the Cartpole and Acrobot discrete control problems (Brockman et al., 2016). While standard AlphaZero clearly lacks good convergence and stability, the entropy-based variants behave differently according to the problem. First, although not significantly superior, RENTS exhibits the most stable learning and faster convergence, confirming the benefit of relative entropy in control problems as already known for trust-region methods in RL (Schulman et al., 2015). Second, considering the small number of discrete actions in the problems, TENTS cannot benefit from the learning of sparse policies and shows slightly unstable learning in Cartpole, even though the overall performance is satisfying in both problems. Last, MENTS solves the problems slightly slower than RENTS, but reaches the same final performance. Although the results on these simple problems are not conclusive to assert the superiority of one method over the other, they definitely confirm the advantage of regularization in MCTS, and hint at the benefit of the use of relative entropy in control problems. Further analysis on more complex control problems will be desirable (e.g. MuJoCo (Todorov et al., 2012)), but the need to account for continuous actions, a non-trivial setting for MCTS, makes it out of the scope of this paper.
|
| 207 |
+
|
| 208 |
+
Table 2: Average score in Atari over 100 seeds per game. Bold denotes no statistically significant difference to the highest mean (t-test, $p < 0 . 0 5$ ). Bottom row shows # no difference to highest mean.
|
| 209 |
+
|
| 210 |
+
<table><tr><td></td><td>UCT</td><td>MaxMCTS</td><td>MENTS</td><td>RENTS</td><td>TENTS</td></tr><tr><td>Alien</td><td>1, 486.80</td><td>1,461.10</td><td>1, 508.60</td><td>1,547.80</td><td>1, 568.60</td></tr><tr><td>Amidar</td><td>115.62</td><td>124.92</td><td>123.30</td><td>125.58</td><td>121.84</td></tr><tr><td>Asterix</td><td>4,855.00</td><td>5,484.50</td><td>5,576.00</td><td>5,743.50</td><td>5,647.00</td></tr><tr><td>Asteroids</td><td>873.40</td><td>899.60</td><td>1,414.70</td><td>1,486.40</td><td>1,642.10</td></tr><tr><td>Atlantis</td><td>35,182.00</td><td>35,720.00</td><td>36,277.00</td><td>35,314.00</td><td>35,756.00</td></tr><tr><td>BankHeist</td><td>475.50</td><td>458.60</td><td>622.30</td><td>636.70</td><td>631.40</td></tr><tr><td>BeamRider</td><td>2,616.72</td><td>2,661.30</td><td>2,822.18</td><td>2,558.94</td><td>2,804.88</td></tr><tr><td>Breakout</td><td>303.04</td><td>296.14</td><td>309.03</td><td>300.35</td><td>316.68</td></tr><tr><td>Centipede</td><td>1, 782.18</td><td>1,728.69</td><td>2,012.86</td><td>2,253.42</td><td>2,258.89</td></tr><tr><td>DemonAttack</td><td>579.90</td><td>640.80</td><td>1,044.50</td><td>1,124.70</td><td>1,113.30</td></tr><tr><td>Enduro</td><td>129.28</td><td>124.20</td><td>128.79</td><td>134.88</td><td>132.05</td></tr><tr><td>Frostbite</td><td>1,244.00</td><td>1,332.10</td><td>2,388.20</td><td>2,369.80</td><td>2,260.60</td></tr><tr><td>Gopher</td><td>3,348.40</td><td>3,303.00</td><td>3,536.40</td><td>3,372.80</td><td>3,447.80</td></tr><tr><td>Hero</td><td>3,009.95</td><td>3,010.55</td><td>3,044.55</td><td>3,077.20</td><td>3,074.00</td></tr><tr><td>MsPacman</td><td>1,940.20</td><td>1,907.10</td><td>2,018.30</td><td>2,190.30</td><td>2,094.40</td></tr><tr><td>Phoenix</td><td>2,747.30</td><td>2,626.60</td><td>3,098.30</td><td>2,582.30</td><td>3,975.30</td></tr><tr><td>Qbert</td><td>7,987.25</td><td>8,033.50</td><td>8,051.25</td><td>8,254.00</td><td>8,437.75</td></tr><tr><td>Robotank</td><td>11.43</td><td>11.00</td><td>11.59</td><td>11.51</td><td>11.47</td></tr><tr><td>Seaquest</td><td>3,276.40</td><td>3,217.20</td><td>3,312.40</td><td>3,345.20</td><td>3,324.40</td></tr><tr><td>Solaris</td><td>895.00</td><td>923.20</td><td>1, 118.20</td><td>1,115.00</td><td>1,127.60</td></tr><tr><td>SpaceInvaders</td><td>778.45</td><td>835.90</td><td>832.55</td><td>867.35</td><td>822.95</td></tr><tr><td>WizardOfWor</td><td>685.00</td><td>666.00</td><td>1,211.00</td><td>1,241.00</td><td>1,231.00</td></tr><tr><td>#Highest mean</td><td>6/22</td><td>7/22</td><td>17/22</td><td>16/22</td><td>22/22</td></tr></table>
|
| 211 |
+
|
| 212 |
+
# 5.3 ENTROPY-REGULARIZED ALPHAGO
|
| 213 |
+
|
| 214 |
+
The learning time of AlphaZero can be slow in problems with high branching factor, due to the need of a large number of MCTS simulations for obtaining good estimates of the randomly initialized action-values. To overcome this problem, AlphaGo (Silver et al., 2016) initializes the action-values using the values retrieved from a pretrained network, which is kept fixed during the training.
|
| 215 |
+
|
| 216 |
+
Atari. Atari 2600 (Bellemare et al., 2013) is a popular benchmark for testing deep RL methodologies (Mnih et al., 2015; Van Hasselt et al., 2016; Bellemare et al., 2017) but still relatively disregarded in MCTS. We use a Deep $Q$ -Network, pretrained using the same experimental setting of Mnih et al. (2015), to initialize the action-value function of each node after expansion as $Q _ { i n i t } ^ { - } ( s , a ) = \left( Q ( s , a ) - V ( s ) \right) / \tau$ , for MENTS and TENTS, as done in Xiao et al. (2019). For RENTS we init Qi $\mathbf { \Phi } _ { n i t } ( s , a ) = \log { P _ { \mathrm { p r i o r } } ( a | s ) ) } + \left( Q ( s , a ) - V ( s ) \right) / \tau$ , where $P _ { \mathrm { p r i o r } }$ is the Boltzmann distribution induced by action-values $Q ( s , . )$ computed from the network. Each experimental run consists of 512 MCTS simulations. The temperature $\tau$ is optimized for each algorithm and game via grid-search between 0.01 and 1. The discount factor is $\gamma = 0 . 9 9$ , and for PUCT the exploration constant is $c = 0 . 1$ . Table 2 shows the performance, in terms of cumulative reward, of standard AlphaGo with PUCT and our three regularized versions, on 22 Atari games. Moreover, we test also AlphaGo using the MaxMCTS backup (Khandelwal et al., 2016) for further comparison with classic baselines. We observe that regularized MCTS dominates other baselines, in particular TENTS achieves the highest scores in all the 22 games, showing that sparse policies are more effective in Atari. This can be explained by Corollary 6 which shows that Tsallis entropy can lead to a lower error at the root node even with a high number of actions compared to relative or maximum entropy.
|
| 217 |
+
|
| 218 |
+
# 6 CONCLUSION
|
| 219 |
+
|
| 220 |
+
We introduced a theory of convex regularization in Monte-Carlo Tree Search (MCTS) based on the Legendre-Fenchel transform. Exploiting this theoretical framework, we studied the regret of MCTS when using a generic strongly convex regularizer, and we proved that it has an exponential convergence rate. We use these results to motivate the use of entropy regularization in MCTS, particularly considering maximum, relative, and Tsallis entropy. Finally, we test regularized MCTS algorithms in discrete control problems and Atari games, showing its advantages over other methods.
|
| 221 |
+
|
| 222 |
+
# REFERENCES
|
| 223 |
+
|
| 224 |
+
Peter Auer, Nicolo Cesa-Bianchi, and Paul Fischer. Finite-time analysis of the multiarmed bandit problem. Machine learning, 47(2-3):235–256, 2002.
|
| 225 |
+
|
| 226 |
+
Marc G Bellemare, Yavar Naddaf, Joel Veness, and Michael Bowling. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, 47: 253–279, 2013.
|
| 227 |
+
|
| 228 |
+
Marc G Bellemare, Will Dabney, and Remi Munos. A distributional perspective on reinforcement ´ learning. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 449–458. JMLR. org, 2017.
|
| 229 |
+
|
| 230 |
+
Richard Bellman. The theory of dynamic programming. Technical report, Rand corp santa monica ca, 1954.
|
| 231 |
+
|
| 232 |
+
Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. arXiv preprint arXiv:1606.01540, 2016.
|
| 233 |
+
|
| 234 |
+
Lars Buesing, Nicolas Heess, and Theophane Weber. Approximate inference in discrete distributions with monte carlo tree search and value functions. In International Conference on Artificial Intelligence and Statistics, pp. 624–634. PMLR, 2020.
|
| 235 |
+
|
| 236 |
+
Guillaume Chaslot, Mark Winands, Jaap Van Den Herik, Jos Uiterwijk, and Bruno Bouzy. Progressive strategies for monte-carlo tree search. New Mathematics and Natural Computation, 4(03): 343–357, 2008.
|
| 237 |
+
|
| 238 |
+
Benjamin E Childs, James H Brodeur, and Levente Kocsis. Transpositions and move groups in monte carlo tree search. In 2008 IEEE Symposium On Computational Intelligence and Games. IEEE, 2008.
|
| 239 |
+
|
| 240 |
+
Pierre-Arnaud Coquelin and Remi Munos. Bandit algorithms for tree search. ´ arXiv preprint cs/0703062, 2007.
|
| 241 |
+
|
| 242 |
+
Remi Coulom. Efficient selectivity and backup operators in monte-carlo tree search. In ´ International conference on computers and games, pp. 72–83. Springer, 2006.
|
| 243 |
+
|
| 244 |
+
Matthieu Geist, Bruno Scherrer, and Olivier Pietquin. A theory of regularized markov decision processes. In International Conference on Machine Learning, pp. 2160–2169, 2019.
|
| 245 |
+
|
| 246 |
+
Sylvain Gelly and David Silver. Combining online and offline knowledge in uct. In Proceedings of the 24th international conference on Machine learning, pp. 273–280. ACM, 2007.
|
| 247 |
+
|
| 248 |
+
Sylvain Gelly and Yizao Wang. Exploration exploitation in go: Uct for monte-carlo go. In NIPS: Neural Information Processing Systems Conference On-line trading of Exploration and Exploitation Workshop, 2006.
|
| 249 |
+
|
| 250 |
+
Jean-Bastien Grill, Florent Altche, Yunhao Tang, Thomas Hubert, Michal Valko, Ioannis ´ Antonoglou, and Remi Munos. Monte-carlo tree search as regularized policy optimization. ´ arXiv preprint arXiv:2007.12509, 2020.
|
| 251 |
+
|
| 252 |
+
Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In International Conference on Machine Learning, pp. 1861–1870, 2018.
|
| 253 |
+
|
| 254 |
+
David P Helmbold and Aleatha Parker-Wood. All-moves-as-first heuristics in monte-carlo go. In IC-AI, pp. 605–610, 2009.
|
| 255 |
+
|
| 256 |
+
Jean-Baptiste Hoock, Chang-Shing Lee, Arpad Rimmel, Fabien Teytaud, Mei-Hui Wang, and Oliver Teytaud. Intelligent agents for the game of go. IEEE Computational Intelligence Magazine, 2010.
|
| 257 |
+
|
| 258 |
+
Piyush Khandelwal, Elad Liebman, Scott Niekum, and Peter Stone. On the analysis of complex backup strategies in monte carlo tree search. In International Conference on Machine Learning, 2016.
|
| 259 |
+
|
| 260 |
+
Levente Kocsis, Csaba Szepesvari, and Jan Willemson. Improved monte-carlo search, 2006. ´
|
| 261 |
+
|
| 262 |
+
Toma´s Kozelek. Methods of mcts and the game arimaa, 2009. ˇ
|
| 263 |
+
|
| 264 |
+
Kyungjae Lee, Sungjoon Choi, and Songhwai Oh. Sparse markov decision processes with causal sparse tsallis entropy regularization for reinforcement learning. IEEE Robotics and Automation Letters, 3(3):1466–1473, 2018.
|
| 265 |
+
|
| 266 |
+
Richard J Lorentz. Improving monte–carlo tree search in havannah. In International Conference on Computers and Games, pp. 105–115. Springer, 2010.
|
| 267 |
+
|
| 268 |
+
Jincheng Mei, Chenjun Xiao, Ruitong Huang, Dale Schuurmans, and Martin Muller. On princi- ¨ pled entropy exploration in policy optimization. In Proceedings of the 28th International Joint Conference on Artificial Intelligence, pp. 3130–3136. AAAI Press, 2019.
|
| 269 |
+
|
| 270 |
+
Arthur Mensch and Mathieu Blondel. Differentiable dynamic programming for structured prediction and attention. In International Conference on Machine Learning, pp. 3462–3471, 2018.
|
| 271 |
+
|
| 272 |
+
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015.
|
| 273 |
+
|
| 274 |
+
Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International conference on machine learning, pp. 1928–1937, 2016.
|
| 275 |
+
|
| 276 |
+
William H Montgomery and Sergey Levine. Guided policy search via approximate mirror descent. In Advances in Neural Information Processing Systems, pp. 4008–4016, 2016.
|
| 277 |
+
|
| 278 |
+
Ofir Nachum and Bo Dai. Reinforcement learning via fenchel-rockafellar duality. CoRR, abs/2001.01866, 2020.
|
| 279 |
+
|
| 280 |
+
Vlad Niculae and Mathieu Blondel. A regularized framework for sparse and structured neural attention. In Advances in Neural Information Processing Systems, pp. 3338–3348, 2017.
|
| 281 |
+
|
| 282 |
+
Lacra Pavel. An extension of duality to a game-theoretic framework. Automatica, 43(2):226 – 237, 2007.
|
| 283 |
+
|
| 284 |
+
Gavin Adrian Rummery. Problem solving with reinforcement learning. PhD thesis, University of Cambridge Ph. D. dissertation, 1995.
|
| 285 |
+
|
| 286 |
+
Julian Schrittwieser, Ioannis Antonoglou, Thomas Hubert, Karen Simonyan, Laurent Sifre, Simon Schmitt, Arthur Guez, Edward Lockhart, Demis Hassabis, Thore Graepel, Timothy Lillicrap, and David Silver. Mastering atari, go, chess and shogi by planning with a learned model, 2019.
|
| 287 |
+
|
| 288 |
+
John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In International Conference on Machine Learning (ICML), pp. 1889–1897, 2015.
|
| 289 |
+
|
| 290 |
+
John Schulman, Xi Chen, and Pieter Abbeel. Equivalence between policy gradients and soft qlearning. arXiv preprint arXiv:1704.06440, 2017a.
|
| 291 |
+
|
| 292 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017b.
|
| 293 |
+
|
| 294 |
+
Shai Shalev-Shwartz and Yoram Singer. Convex repeated games and fenchel duality. Advances in neural information processing systems, 19:1265–1272, 2006.
|
| 295 |
+
|
| 296 |
+
David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. nature, 529(7587):484, 2016.
|
| 297 |
+
|
| 298 |
+
David Silver, Thomas Hubert, Julian Schrittwieser, Ioannis Antonoglou, Matthew Lai, Arthur Guez, Marc Lanctot, Laurent Sifre, Dharshan Kumaran, Thore Graepel, et al. Mastering chess and shogi by self-play with a general reinforcement learning algorithm. arXiv preprint arXiv:1712.01815, 2017a.
|
| 299 |
+
|
| 300 |
+
David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, et al. Mastering the game of go without human knowledge. Nature, 550(7676):354–359, 2017b.
|
| 301 |
+
|
| 302 |
+
Richard S Sutton and Andrew G Barto. Introduction to reinforcement learning, volume 135. MIT press Cambridge, 1998.
|
| 303 |
+
|
| 304 |
+
Gerald Tesauro, VT Rajan, and Richard Segal. Bayesian inference in monte-carlo tree search. arXiv preprint arXiv:1203.3519, 2012.
|
| 305 |
+
|
| 306 |
+
Fabien Teytaud and Olivier Teytaud. On the huge benefit of decisive moves in monte-carlo tree search algorithms. In Proceedings of the 2010 IEEE Conference on Computational Intelligence and Games, pp. 359–364. IEEE, 2010.
|
| 307 |
+
|
| 308 |
+
E. Todorov, T. Erez, and Y. Tassa. Mujoco: A physics engine for model-based control. In 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 5026–5033, 2012.
|
| 309 |
+
|
| 310 |
+
David Tom. Investigating uct and rave: Steps towards a more robust method, 2010.
|
| 311 |
+
|
| 312 |
+
Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double q learning. In Thirtieth AAAI conference on artificial intelligence, 2016.
|
| 313 |
+
|
| 314 |
+
Tom Vodopivec, Spyridon Samothrakis, and Branko Ster. On monte carlo tree search and reinforcement learning. Journal of Artificial Intelligence Research, 60:881–936, 2017.
|
| 315 |
+
|
| 316 |
+
Martin J Wainwright. High-dimensional statistics: A non-asymptotic viewpoint, volume 48. Cambridge University Press, 2019.
|
| 317 |
+
|
| 318 |
+
Chenjun Xiao, Ruitong Huang, Jincheng Mei, Dale Schuurmans, and Martin Muller. Maximum ¨ entropy monte-carlo planning. In Advances in Neural Information Processing Systems, pp. 9516– 9524, 2019.
|
| 319 |
+
|
| 320 |
+
Timothy Yee, Viliam Lisy, Michael H Bowling, and S Kambhampati. Monte carlo tree search in \` continuous action spaces with execution uncertainty. In IJCAI, pp. 690–697, 2016.
|
| 321 |
+
|
| 322 |
+
# A RELATED WORK
|
| 323 |
+
|
| 324 |
+
Entropy regularization is a common tool for controlling exploration in Reinforcement Learning (RL) and has lead to several successful methods (Schulman et al., 2015; Haarnoja et al., 2018; Schulman et al., 2017a; Mnih et al., 2016). Typically specific forms of entropy are utilized such as maximum entropy (Haarnoja et al., 2018) or relative entropy (Schulman et al., 2015). This approach is an instance of the more generic duality framework, commonly used in convex optimization theory. Duality has been extensively studied in game theory (Shalev-Shwartz & Singer, 2006; Pavel, 2007) and more recently in RL, for instance considering mirror descent optimization (Montgomery & Levine, 2016; Mei et al., 2019), drawing the connection between MCTS and regularized policy optimization (Grill et al., 2020), or formalizing the RL objective via Legendre-Rockafellar duality (Nachum & Dai, 2020). Recently (Geist et al., 2019) introduced regularized Markov Decision Processes, formalizing the RL objective with a generalized form of convex regularization, based on the Legendre-Fenchel transform. In this paper, we provide a novel study of convex regularization in MCTS, and derive relative entropy (KL-divergence) and Tsallis entropy regularized MCTS algorithms, i.e. RENTS and TENTS respectively. Note that the recent maximum entropy MCTS algorithm MENTS (Xiao et al., 2019) is a special case of our generalized regularized MCTS. Unlike MENTS, RENTS can take advantage of any action distribution prior, in the experiments the prior is derived using Deep $Q$ -learning (Mnih et al., 2015). On the other hand, TENTS allows for sparse action exploration and thus higher dimensional action spaces compared to MENTS. In experiments, both RENTS and TENTS outperform MENTS.
|
| 325 |
+
|
| 326 |
+
Several works focus on modifying classical MCTS to improve exploration. UCB1-tuned (Auer et al., 2002) modifies the upper confidence bound of UCB1 to account for variance in order to improve exploration. (Tesauro et al., 2012) proposes a Bayesian version of UCT, which obtains better estimates of node values and uncertainties given limited experience. Many heuristic approaches based on specific domain knowledge have been proposed, such as adding a bonus term to value estimates (Gelly & Wang, 2006; Teytaud & Teytaud, 2010; Childs et al., 2008; Kozelek, 2009; Chaslot et al., 2008) or prior knowledge collected during policy search (Gelly & Silver, 2007; Helmbold & Parker-Wood, 2009; Lorentz, 2010; Tom, 2010; Hoock et al., 2010). (Khandelwal et al., 2016) formalizes and analyzes different on-policy and off-policy complex backup approaches for MCTS planning based on RL techniques. (Vodopivec et al., 2017) proposes an approach called SARSAUCT, which performs the dynamic programming backups using SARSA (Rummery, 1995). Both (Khandelwal et al., 2016) and (Vodopivec et al., 2017) directly borrow value backup ideas from RL to estimate the value at each tree node, but they do not provide any proof of convergence.
|
| 327 |
+
|
| 328 |
+
# B PROOFS
|
| 329 |
+
|
| 330 |
+
Let $\hat { r }$ and $r$ be respectively the average and the the expected reward at the leaf node, and the reward distribution at the leaf node be $\sigma ^ { 2 }$ -sub-Gaussian.
|
| 331 |
+
|
| 332 |
+
Lemma 1 For the stochastic bandit problem E3W guarantees that, for $t \geq 4$ ,
|
| 333 |
+
|
| 334 |
+
$$
|
| 335 |
+
\mathbb { P } \big ( \mathrm { \normalfont ~ } r - \hat { r } _ { t } \mathrm { \normalfont ~ } _ { \infty } \ge \frac { 2 \sigma } { \log ( 2 + t ) } \big ) \le 4 | A | \exp \Big ( - \frac { t } { ( \log ( 2 + t ) ) ^ { 3 } } \Big ) .
|
| 336 |
+
$$
|
| 337 |
+
|
| 338 |
+
Proof 1 Let us define $N _ { t } ( a )$ as the number of times action a have been chosen until time $t$ , and Nˆt(a) = Pts=1 πs(a), where πs(a) is the E3W policy at time step s. By choosing λs = l $\begin{array} { r } { \lambda _ { s } = \frac { \left. A \right. } { \log \left( 1 + s \right) } } \end{array}$ og(1+s) , it follows that for all $a$ and $t \geq 4$ ,
|
| 339 |
+
|
| 340 |
+
$$
|
| 341 |
+
\begin{array} { l } { \displaystyle \hat { N } _ { t } ( a ) = \sum _ { s = 1 } ^ { t } \pi _ { s } ( a ) \geq \sum _ { s = 1 } ^ { t } \frac { 1 } { \log ( 1 + s ) } \geq \sum _ { s = 1 } ^ { t } \frac { 1 } { \log ( 1 + s ) } - \frac { s / ( s + 1 ) } { ( \log ( 1 + s ) ) ^ { 2 } } } \\ { \displaystyle \geq \int _ { 1 } ^ { 1 + t } \frac { 1 } { \log ( 1 + s ) } - \frac { s / ( s + 1 ) } { ( \log ( 1 + s ) ) ^ { 2 } } d s = \frac { 1 + t } { \log ( 2 + t ) } - \frac { 1 } { \log 2 } \geq \frac { t } { 2 \log ( 2 + t ) } . } \end{array}
|
| 342 |
+
$$
|
| 343 |
+
|
| 344 |
+
From Theorem $2 . I 9$ in Wainwright (2019), we have the following concentration inequality:
|
| 345 |
+
|
| 346 |
+
$$
|
| 347 |
+
\mathbb { P } ( | N _ { t } ( a ) - \hat { N } _ { t } ( a ) | > \epsilon ) \le 2 \exp \{ - \frac { \epsilon ^ { 2 } } { 2 \sum _ { s = 1 } ^ { t } \sigma _ { s } ^ { 2 } } \} \le 2 \exp \{ - \frac { 2 \epsilon ^ { 2 } } { t } \} ,
|
| 348 |
+
$$
|
| 349 |
+
|
| 350 |
+
where $\sigma _ { s } ^ { 2 } \le 1 / 4$ is the variance of a Bernoulli distribution with $p = \pi _ { s } ( k )$ at time step $s$ . We define the event
|
| 351 |
+
|
| 352 |
+
$$
|
| 353 |
+
E _ { \epsilon } = \{ \forall a \in \mathcal { A } , | \hat { N } _ { t } ( a ) - N _ { t } ( a ) | \leq \epsilon \} ,
|
| 354 |
+
$$
|
| 355 |
+
|
| 356 |
+
and consequently
|
| 357 |
+
|
| 358 |
+
$$
|
| 359 |
+
\mathbb { P } ( | \hat { N } _ { t } ( a ) - N _ { t } ( a ) | \geq \epsilon ) \leq 2 | A | \exp ( - \frac { 2 \epsilon ^ { 2 } } { t } ) .
|
| 360 |
+
$$
|
| 361 |
+
|
| 362 |
+
Conditioned on the event $E _ { \epsilon }$ , for $\begin{array} { r } { \epsilon = \frac { t } { 4 \log ( 2 + t ) } } \end{array}$ , we have $\begin{array} { r } { N _ { t } ( a ) \geq \frac { t } { 4 \log ( 2 + t ) } } \end{array}$ . For any action a by the definition of sub-gaussian,
|
| 363 |
+
|
| 364 |
+
$$
|
| 365 |
+
\mathbb { P } \Bigg ( \vert r ( a ) - \hat { r } _ { t } ( a ) \vert > \sqrt { \frac { 8 \sigma ^ { 2 } \log ( \frac { 2 } { \delta } ) \log ( 2 + t ) } { t } } \Bigg ) \leq \mathbb { P } \Bigg ( \vert r ( a ) - \hat { r } _ { t } ( a ) \vert > \sqrt { \frac { 2 \sigma ^ { 2 } \log ( \frac { 2 } { \delta } ) } { N _ { t } ( a ) } } \Bigg ) \leq \delta
|
| 366 |
+
$$
|
| 367 |
+
|
| 368 |
+
by choosing a $\delta$ satisfying $\begin{array} { r } { \log ( \frac { 2 } { \delta } ) = \frac { 1 } { ( \log ( 2 + t ) ) ^ { 3 } } } \end{array}$ , we have
|
| 369 |
+
|
| 370 |
+
$$
|
| 371 |
+
\mathbb { P } \Bigg ( | r ( a ) - \hat { r } _ { t } ( a ) | > \sqrt { \frac { 2 \sigma ^ { 2 } \log \left( \frac { 2 } { \delta } \right) } { N _ { t } ( a ) } } \Bigg ) \leq 2 \exp \Bigg ( - \frac { 1 } { ( \log ( 2 + t ) ) ^ { 3 } } \Bigg ) .
|
| 372 |
+
$$
|
| 373 |
+
|
| 374 |
+
Therefore, for $t \geq 2$
|
| 375 |
+
|
| 376 |
+
$$
|
| 377 |
+
\begin{array} { r l } & { \mathbb { P } \Bigg ( \| r - \hat { r } _ { t } \| _ { \infty } > \frac { 2 \sigma } { \log ( 2 + t ) } \Bigg ) \leq \mathbb { P } \Bigg ( \| r - \hat { r } _ { t } \| _ { \infty } > \frac { 2 \sigma } { \log ( 2 + t ) } \Bigg | E _ { \epsilon } \Bigg ) + \mathbb { P } ( E _ { \epsilon } ^ { C } ) } \\ & { \leq \displaystyle \sum _ { k } \Bigg ( \mathbb { P } \Bigg ( | r ( a ) - \hat { r } _ { t } ( a ) | > \frac { 2 \sigma } { \log ( 2 + t ) } \Bigg ) + \mathbb { P } ( E _ { \epsilon } ^ { C } ) \leq 2 | A | \exp \Bigg ( - \frac { 1 } { ( \log ( 2 + t ) ) ^ { 3 } } \Bigg ) \Bigg ) } \\ & { + 2 | A | \exp \Bigg ( - \frac { t } { ( \log ( 2 + t ) ) ^ { 3 } } \Bigg ) = 4 | A | \exp \Bigg ( - \frac { t } { ( \log ( 2 + t ) ) ^ { 3 } } \Bigg ) . } \end{array}
|
| 378 |
+
$$
|
| 379 |
+
|
| 380 |
+
Lemma 2 Given two policies $\pi ^ { ( 1 ) } = \nabla \Omega ^ { * } ( r ^ { ( 1 ) } )$ and $\pi ^ { ( 2 ) } = \nabla \Omega ^ { * } ( r ^ { ( 2 ) } ) , \exists L ,$ , such that
|
| 381 |
+
|
| 382 |
+
$$
|
| 383 |
+
\parallel \pi ^ { ( 1 ) } - \pi ^ { ( 2 ) } \parallel _ { p } \leq L \parallel r ^ { ( 1 ) } - r ^ { ( 2 ) } \parallel _ { p } .
|
| 384 |
+
$$
|
| 385 |
+
|
| 386 |
+
Proof 2 This comes directly from the fact that $\pi = \nabla \Omega ^ { * } ( r )$ is Lipschitz continuous with $\ell ^ { p \ }$ -norm. Note that $p$ has different values according to the choice of regularizer. Refer to Niculae & Blondel (2017) for a discussion of each norm using Shannon entropy and Tsallis entropy regularizer. Relative entropy shares the same Properties with Shannon Entropy.
|
| 387 |
+
|
| 388 |
+
Lemma 3 Consider the E3W policy applied to a tree. At any node s of the tree with depth $d _ { \mathrm { { z } } }$ , Let us define $N _ { t } ^ { * } ( s , a ) = \pi ^ { * } ( a | s ) . t$ , and $\begin{array} { r } { \hat { N } _ { t } ( s , a ) = \sum _ { s = 1 } ^ { t } \pi _ { s } ( a | s ) } \end{array}$ , where $\pi _ { k } ( a | s )$ is the policy at time step $k$ . There exists some $C$ and $\hat { C }$ such that
|
| 389 |
+
|
| 390 |
+
$$
|
| 391 |
+
\mathbb { P } \big ( | \hat { N } _ { t } ( s , a ) - N _ { t } ^ { * } ( s , a ) | > \frac { C t } { \log t } \big ) \leq \hat { C } | A | t \exp \{ - \frac { t } { ( \log t ) ^ { 3 } } \} .
|
| 392 |
+
$$
|
| 393 |
+
|
| 394 |
+
Proof 3 We denote the following event,
|
| 395 |
+
|
| 396 |
+
$$
|
| 397 |
+
E _ { r _ { k } } = \{ \| r ( s ^ { \prime } , . ) - { \hat { r } } _ { k } ( s ^ { \prime } , . ) \| _ { \infty } < { \frac { 2 \sigma } { \log ( 2 + k ) } } \} .
|
| 398 |
+
$$
|
| 399 |
+
|
| 400 |
+
Thus, conditioned on the event $\textstyle \bigcap _ { i = 1 } ^ { t } E _ { r _ { t } }$ and for $t \geq 4 ,$ , we bound $\vert \hat { N } _ { t } ( s , a ) - N _ { t } ^ { \ast } ( s , a ) \vert$ as
|
| 401 |
+
|
| 402 |
+
$$
|
| 403 |
+
\begin{array} { r l } { \sum _ { k \in \partial _ { s } } \sum _ { i = 1 } ^ { N } \sum _ { j = 1 } ^ { N } \sum _ { k = 0 } ^ { N } \exp _ { i } ^ { - \beta } \sum _ { k = 0 } ^ { N } ( k ) \sum _ { k = 1 } ^ { N } \exp _ { i } ^ { - \beta } ( k ) \sum _ { k = 1 } ^ { N } \exp _ { i } ^ { - \beta } ( k ) \sum _ { k = 1 } ^ { N } } & { } \\ & { \leq \sum _ { k = 1 } ^ { N } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } ( k ) \exp _ { i } ^ { - \beta } \sum _ { k = 1 } ^ { N } } \\ & { \leq \sum _ { k = 1 } ^ { N } \sum _ { i = 0 } ^ { N } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \sum _ { k = 1 } ^ { N } } \\ & { \leq \sum _ { k = 1 } ^ { N } \sum _ { i = 0 } ^ { N } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \sum _ { k = 1 } ^ { N } \sum _ { i = 0 } ^ { N } \exp _ { i } ^ { - \beta } } \\ & \leq \sum _ { k = 1 } ^ { N } \sum _ { i = 0 } ^ { N } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \sum _ { k = 1 } ^ { N } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \sum _ { k = 1 } ^ { N } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \sum _ { k = 1 } ^ { N } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ { - \beta } \exp _ { i } ^ - \beta \end{array}
|
| 404 |
+
$$
|
| 405 |
+
|
| 406 |
+
for some constant $C$ depending on $| A | , p , d , \sigma , L$ , and $\gamma$ . Finally,
|
| 407 |
+
|
| 408 |
+
$$
|
| 409 |
+
\begin{array} { r l } { { \mathbb { P } ( | \hat { N _ { t } } ( s , a ) - N _ { t } ^ { * } ( s , a ) | \geq \frac { C t } { \log t } ) \leq \sum _ { i = 1 } ^ { t } \mathbb { P } ( E _ { r _ { t } } ^ { c } ) = \displaystyle \sum _ { i = 1 } ^ { t } 4 | A | \exp ( - \frac { t } { ( \log ( 2 + t ) ) ^ { 3 } } ) } } \\ & { \leq 4 | A | t \exp ( - \frac { t } { ( \log ( 2 + t ) ) ^ { 3 } } ) } \\ & { = O ( t \exp ( - \frac { t } { ( \log ( t ) ) ^ { 3 } } ) ) . } \end{array}
|
| 410 |
+
$$
|
| 411 |
+
|
| 412 |
+
Lemma 4 Consider the $E 3 W$ policy applied to a tree. $A t$ any node s of the tree, Let us define $N _ { t } ^ { * } ( s , a ) = \pi ^ { * } ( a | s ) . t$ , and $N _ { t } ( s , a )$ as the number of times action $a$ have been chosen until time step $t$ . There exists some $C$ and $\hat { C }$ such that
|
| 413 |
+
|
| 414 |
+
$$
|
| 415 |
+
\mathbb { P } \big ( | N _ { t } ( s , a ) - N _ { t } ^ { * } ( s , a ) | > \frac { C t } { \log t } \big ) \le \hat { C } t \exp \{ - \frac { t } { ( \log t ) ^ { 3 } } \} .
|
| 416 |
+
$$
|
| 417 |
+
|
| 418 |
+
Proof 4 Based on the result from Lemma $^ 3$ , we have
|
| 419 |
+
|
| 420 |
+
$$
|
| 421 |
+
\begin{array} { r l } & { \mathbb { P } \big ( | N _ { t } ( s , a ) - N _ { t } ^ { * } ( s , a ) | > ( 1 + C ) \displaystyle \frac { t } { \log t } \big ) \leq C t \exp \{ - \displaystyle \frac { t } { ( \log t ) ^ { 3 } } \} } \\ & { \leq \mathbb { P } \big ( | \hat { N } _ { t } ( s , a ) - N _ { t } ^ { * } ( s , a ) | > \displaystyle \frac { C t } { \log t } \big ) + \mathbb { P } \big ( | N _ { t } ( s , a ) - \hat { N } _ { t } ( s , a ) | > \displaystyle \frac { t } { \log t } \big ) } \\ & { \leq 4 | A | t \exp \{ - \displaystyle \frac { t } { ( \log ( 2 + t ) ) ^ { 3 } } \} + 2 | A | \exp \{ - \displaystyle \frac { t } { ( \log ( 2 + t ) ) ^ { 2 } } \} ( L e m m a 3 a n d ( \log ( 2 + t ) ) ) } \\ & { \leq O ( t \exp ( - \displaystyle \frac { t } { ( \log t ) ^ { 3 } } ) ) . } \end{array}
|
| 422 |
+
$$
|
| 423 |
+
|
| 424 |
+
Theorem 1 At the root node s of the tree, defining $N ( s )$ as the number of visitations and $V _ { \Omega ^ { * } } ( s )$ as the estimated value at node $s$ , for $\epsilon > 0$ , we have
|
| 425 |
+
|
| 426 |
+
$$
|
| 427 |
+
\mathbb { P } ( | V _ { \Omega } ( s ) - V _ { \Omega } ^ { * } ( s ) | > \epsilon ) \le C \exp \{ - \frac { N ( s ) \epsilon } { \hat { C } ( \log ( 2 + N ( s ) ) ) ^ { 2 } } \} .
|
| 428 |
+
$$
|
| 429 |
+
|
| 430 |
+
Proof 5 We prove this concentration inequality by induction. When the depth of the tree is $D = 1$ , from Proposition $^ { l }$ , we get
|
| 431 |
+
|
| 432 |
+
$$
|
| 433 |
+
\left| V _ { \Omega } ( s ) - V _ { \Omega } ^ { * } ( s ) \right| = \mid \Omega ^ { * } ( Q _ { \Omega } ( s , . ) ) - \Omega ^ { * } ( Q _ { \Omega } ^ { * } ( s , . ) ) \mid \mid _ { \infty } \le \gamma \mid \mid \hat { r } - r ^ { * } \mid _ { \infty } ( C o n t r a c t i o n )
|
| 434 |
+
$$
|
| 435 |
+
|
| 436 |
+
where $\hat { r }$ is the average rewards and $r ^ { * }$ is the mean reward. So that
|
| 437 |
+
|
| 438 |
+
$$
|
| 439 |
+
\mathbb { P } ( | V _ { \Omega } ( s ) - V _ { \Omega } ^ { * } ( s ) | > \epsilon ) \le \mathbb { P } ( \gamma \parallel \hat { r } - r ^ { * } \parallel _ { \infty } > \epsilon ) .
|
| 440 |
+
$$
|
| 441 |
+
|
| 442 |
+
From Lemma $^ { l }$ , with $\begin{array} { r } { \epsilon = \frac { 2 \sigma \gamma } { \log ( 2 + N ( s ) ) } } \end{array}$ , we have
|
| 443 |
+
|
| 444 |
+
$$
|
| 445 |
+
\begin{array} { r l } & { \mathbb { P } ( | V _ { \Omega } ( s ) - V _ { \Omega } ^ { * } ( s ) | > \epsilon ) \le \mathbb { P } ( \gamma \parallel \hat { r } - r ^ { * } \parallel _ { \infty } > \epsilon ) \le 4 | A | \exp \{ - \frac { N ( s ) \epsilon } { 2 \sigma \gamma ( \log ( 2 + N ( s ) ) ) ^ { 2 } } \} } \\ & { \quad \quad \quad = C \exp \{ - \frac { N ( s ) \epsilon } { \hat { C } ( \log ( 2 + N ( s ) ) ) ^ { 2 } } \} . } \end{array}
|
| 446 |
+
$$
|
| 447 |
+
|
| 448 |
+
Let assume we have the concentration bound at the depth $D - 1$ , Let us define $V _ { \Omega } ( s _ { a } ) = Q _ { \Omega } ( s , a )$ , where $s _ { a }$ is the state reached taking action $a$ from state s. then at depth $D - 1$
|
| 449 |
+
|
| 450 |
+
$$
|
| 451 |
+
\mathbb { P } ( | V _ { \Omega } ( s _ { a } ) - V _ { \Omega } ^ { * } ( s _ { a } ) | > \epsilon ) \le C \exp \{ - \frac { N ( s _ { a } ) \epsilon } { \hat { C } ( \log ( 2 + N ( s _ { a } ) ) ) ^ { 2 } } \} .
|
| 452 |
+
$$
|
| 453 |
+
|
| 454 |
+
Now at the depth $D$ , because of the Contraction Property, we have
|
| 455 |
+
|
| 456 |
+
$$
|
| 457 |
+
\begin{array} { r l } & { | V _ { \Omega } ( s ) - V _ { \Omega } ^ { * } ( s ) | \leq \gamma \parallel Q _ { \Omega } ( s , . ) - Q _ { \Omega } ^ { * } ( s , . ) \parallel _ { \infty } } \\ & { \qquad = \gamma | Q _ { \Omega } ( s , a ) - Q _ { \Omega } ^ { * } ( s , a ) | . } \end{array}
|
| 458 |
+
$$
|
| 459 |
+
|
| 460 |
+
So that
|
| 461 |
+
|
| 462 |
+
$$
|
| 463 |
+
\begin{array} { r l r } & { } & { { \mathbb { P } } ( | V _ { \Omega } ( s ) - V _ { \Omega } ^ { * } ( s ) | > \epsilon ) \leq { \mathbb { P } } ( \gamma \parallel Q _ { \Omega } ( s , a ) - Q _ { \Omega } ^ { * } ( s , a ) \parallel > \epsilon ) } \\ & { } & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { } & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { } & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { } & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \hat { C } _ { a } ( \log ( 2 + N ( s ) ) ) ^ { 2 } } \end{array}
|
| 464 |
+
$$
|
| 465 |
+
|
| 466 |
+
From $( I 7 )$ , we can have $\begin{array} { r } { \operatorname* { l i m } _ { t \to \infty } N ( s _ { a } ) = \infty } \end{array}$ because if $\exists L , N ( s _ { a } ) \ < \ L$ , we can find $\epsilon > 0$ for which (17) is not satisfied. From Lemma 4, when $N ( s )$ is large enough, we have $N ( s _ { a } ) $ $\pi ^ { * } ( a | s ) N ( s )$ (for example $\begin{array} { r } { N ( s _ { a } ) > \frac { 1 } { 2 } \pi ^ { * } ( a | s ) N ( s ) ) } \end{array}$ , that means we can find $C$ and $\hat { C }$ that satisfy
|
| 467 |
+
|
| 468 |
+
$$
|
| 469 |
+
\mathbb { P } ( | V _ { \Omega } ( s ) - V _ { \Omega } ^ { * } ( s ) | > \epsilon ) \le C \exp \{ - \frac { N ( s ) \epsilon } { \hat { C } ( \log ( 2 + N ( s ) ) ) ^ { 2 } } \} .
|
| 470 |
+
$$
|
| 471 |
+
|
| 472 |
+
Lemma 5 At any node s of the tree, $N ( s )$ is the number of visitations. We define the event
|
| 473 |
+
|
| 474 |
+
$$
|
| 475 |
+
E _ { s } = \{ \forall a i n \boldsymbol { A } , | N ( s , a ) - N ^ { * } ( s , a ) | < \frac { N ^ { * } ( s , a ) } { 2 } \} w h e r e \ N ^ { * } ( s , a ) = \pi ^ { * } ( a | s ) N ( s ) ,
|
| 476 |
+
$$
|
| 477 |
+
|
| 478 |
+
where $\epsilon > 0$ and $V _ { \Omega ^ { * } } ( s )$ is the estimated value at node $s$ . We have
|
| 479 |
+
|
| 480 |
+
$$
|
| 481 |
+
\mathbb { P } ( | V _ { \Omega } ( s ) - V _ { \Omega } ^ { * } ( s ) | > \epsilon | E _ { s } ) \le C \exp \{ - \frac { N ( s ) \epsilon } { \hat { C } ( \log ( 2 + N ( s ) ) ) ^ { 2 } } \} .
|
| 482 |
+
$$
|
| 483 |
+
|
| 484 |
+
Proof 6 The proof is the same as in Theorem 2. We prove the concentration inequality by induction. When the depth of the tree is $D = 1$ , from Proposition $^ { l }$ , we get
|
| 485 |
+
|
| 486 |
+
$$
|
| 487 |
+
\left| V _ { \Omega } ( s ) - V _ { \Omega } ^ { * } ( s ) \right| = \left\| \ \Omega ^ { * } ( Q _ { \Omega } ( s , . ) ) - \Omega ^ { * } ( Q _ { \Omega } ^ { * } ( s , . ) ) \ \right\| \leq \gamma \ \left\| \ \hat { r } - r ^ { * } \ \right\| _ { \infty } \left( C o n t r a c t i o n \ P r o p e r t i o n s \right) ,
|
| 488 |
+
$$
|
| 489 |
+
|
| 490 |
+
where $\hat { r }$ is the average rewards and $r ^ { * }$ is the mean rewards. So that
|
| 491 |
+
|
| 492 |
+
$$
|
| 493 |
+
\mathbb { P } ( | V _ { \Omega } ( s ) - V _ { \Omega } ^ { * } ( s ) | > \epsilon ) \le \mathbb { P } ( \gamma \parallel \hat { r } - r ^ { * } \parallel _ { \infty } > \epsilon ) .
|
| 494 |
+
$$
|
| 495 |
+
|
| 496 |
+
From Lemma $^ { l }$ , with $\begin{array} { r } { \epsilon = \frac { 2 \sigma \gamma } { \log ( 2 + N ( s ) ) } } \end{array}$ and given $E _ { s }$ , we have
|
| 497 |
+
|
| 498 |
+
$$
|
| 499 |
+
\begin{array} { r l } & { \mathbb { P } ( | V _ { \Omega } ( s ) - V _ { \Omega } ^ { * } ( s ) | > \epsilon ) \le \mathbb { P } ( \gamma \parallel \hat { r } - r ^ { * } \parallel _ { \infty } > \epsilon ) \le 4 | A | \exp \{ - \frac { N ( s ) \epsilon } { 2 \sigma \gamma ( \log ( 2 + N ( s ) ) ) ^ { 2 } } \} } \\ & { \quad \quad \quad = C \exp \{ - \frac { N ( s ) \epsilon } { \hat { C } ( \log ( 2 + N ( s ) ) ) ^ { 2 } } \} . } \end{array}
|
| 500 |
+
$$
|
| 501 |
+
|
| 502 |
+
Let assume we have the concentration bound at the depth $D - 1$ , Let us define $V _ { \Omega } ( s _ { a } ) = Q _ { \Omega } ( s , a )$ , where $s _ { a }$ is the state reached taking action a from state $s$ , then at depth $D - 1$
|
| 503 |
+
|
| 504 |
+
$$
|
| 505 |
+
\mathbb { P } ( | V _ { \Omega } ( s _ { a } ) - V _ { \Omega } ^ { * } ( s _ { a } ) | > \epsilon ) \le C \exp \{ - \frac { N ( s _ { a } ) \epsilon } { \hat { C } ( \log ( 2 + N ( s _ { a } ) ) ) ^ { 2 } } \} .
|
| 506 |
+
$$
|
| 507 |
+
|
| 508 |
+
Now at depth $D$ , because of the Contraction Property and given $E _ { s }$ , we have
|
| 509 |
+
|
| 510 |
+
$$
|
| 511 |
+
\begin{array} { r l } & { | V _ { \Omega } ( s ) - V _ { \Omega } ^ { * } ( s ) | \leq \gamma \parallel Q _ { \Omega } ( s , . ) - Q _ { \Omega } ^ { * } ( s , . ) \parallel _ { \infty } } \\ & { \qquad = \gamma | Q _ { \Omega } ( s , a ) - Q _ { \Omega } ^ { * } ( s , a ) | ( \exists a , s a t i s f t e d ) . } \end{array}
|
| 512 |
+
$$
|
| 513 |
+
|
| 514 |
+
So that
|
| 515 |
+
|
| 516 |
+
$$
|
| 517 |
+
\begin{array} { r l } & { \mathbb { P } ( | V _ { \Omega } ( s ) - V _ { \Omega } ^ { * } ( s ) | > \epsilon ) \leq \mathbb { P } ( \gamma \parallel Q _ { \Omega } ( s , a ) - Q _ { \Omega } ^ { * } ( s , a ) \parallel > \epsilon ) } \\ & { \qquad \leq C _ { a } \exp \{ - \frac { N ( s _ { a } ) \epsilon } { \hat { C } _ { a } ( \log ( 2 + N ( s _ { a } ) ) ) ^ { 2 } } \} } \\ & { \qquad \leq C _ { a } \exp \{ - \frac { N ( s _ { a } ) \epsilon } { \hat { C } _ { a } ( \log ( 2 + N ( s ) ) ) ^ { 2 } } \} } \\ & { \qquad \leq C \exp \{ - \frac { N ( s ) \epsilon } { \hat { C } ( \log ( 2 + N ( s ) ) ) ^ { 2 } } \} ( b e c a u s e o f E _ { s } ) } \end{array}
|
| 518 |
+
$$
|
| 519 |
+
|
| 520 |
+
Theorem 2 Let $a _ { t }$ be the action returned by algorithm E3W at iteration t. Then for t large enough, with some constants $C , { \hat { C } }$ ,
|
| 521 |
+
|
| 522 |
+
$$
|
| 523 |
+
\mathbb { P } ( a _ { t } \neq a ^ { * } ) \leq C t \exp \{ - \frac { t } { \hat { C } \sigma ( \log ( t ) ) ^ { 3 } } \} .
|
| 524 |
+
$$
|
| 525 |
+
|
| 526 |
+
Proof 7 Let us define event $E _ { s }$ as in Lemma 5. Let $a ^ { * }$ be the action with largest value estimate at the root node state $s$ . The probability that $E 3 W$ selects a sub-optimal arm at s is
|
| 527 |
+
|
| 528 |
+
$$
|
| 529 |
+
\begin{array} { r l } & { \displaystyle \mathbb { P } ( a _ { t } \neq a ^ { * } ) \leq \sum _ { a } \mathbb { P } ( V _ { \Omega } ( s _ { a } ) ) > V _ { \Omega } ( s _ { a ^ { * } } ) | E _ { s } ) + \mathbb { P } ( E _ { s } ^ { c } ) } \\ & { \displaystyle = \sum _ { a } \mathbb { P } ( ( V _ { \Omega } ( s _ { a } ) - V _ { \Omega } ^ { * } ( s _ { a } ) ) - ( V _ { \Omega } ( s _ { a ^ { * } } ) - V _ { \Omega } ^ { * } ( s _ { a ^ { * } } ) ) \geq V _ { \Omega } ^ { * } ( s _ { a ^ { * } } ) - V _ { \Omega } ^ { * } ( s _ { a } ) | E _ { s } ) + \mathbb { P } ( E _ { s } ^ { c } ) . } \end{array}
|
| 530 |
+
$$
|
| 531 |
+
|
| 532 |
+
Let us define $\Delta = V _ { \Omega } ^ { * } ( s _ { a ^ { * } } ) - V _ { \Omega } ^ { * } ( s _ { a } )$ , therefore for $\Delta > 0$ , we have
|
| 533 |
+
|
| 534 |
+
$$
|
| 535 |
+
\begin{array} { r l } & { \displaystyle \mathbb { P } ( a _ { t } \neq a ^ { * } ) \leq \sum _ { a } \mathbb { P } ( ( V _ { \Omega } ( s _ { a } ) - V _ { \Omega } ^ { * } ( s _ { a } ) ) - ( V _ { \Omega } ( s _ { a ^ { * } } ) - V _ { \Omega } ^ { * } ( s _ { a ^ { * } } ) ) \geq \Delta | E _ { s } ) + \mathbb { P } ( E _ { s } ^ { c } ) } \\ & { \leq \displaystyle \sum _ { a } \mathbb { P } ( | V _ { \Omega } ( s _ { a } ) - V _ { \Omega } ^ { * } ( s _ { a } ) | \geq \alpha \Delta | E _ { s } ) + \mathbb { P } ( | V _ { \Omega } ( s _ { a ^ { * } } ) - V _ { \Omega } ^ { * } ( s _ { a ^ { * } } ) | \geq \beta \Delta | E _ { s } ) + \mathbb { P } ( E _ { s } ^ { c } ) } \\ & { \leq \displaystyle \sum _ { a } C _ { a } \exp \{ - \frac { N ( s ) ( \alpha \Delta ) } { \hat { C } _ { a } ( \log ( 2 + N ( s ) ) ) ^ { 2 } } \} + C _ { a ^ { * } } \exp \{ - \frac { N ( s ) ( \beta \Delta ) } { \hat { C } _ { a ^ { * } } ( \log ( 2 + N ( s ) ) ) ^ { 2 } } \} + \mathbb { P } ( E _ { s } ^ { c } ) , } \end{array}
|
| 536 |
+
$$
|
| 537 |
+
|
| 538 |
+
where $\alpha + \beta = 1 , \alpha > 0 , \beta > 0 ,$ , and $N ( s )$ is the number of visitations the root node s. Let us define $\begin{array} { r } { \frac { 1 } { \hat { C } } = \operatorname* { m i n } \{ \frac { ( \alpha \Delta ) } { { C } _ { a } } , \frac { ( \beta \Delta ) } { { C } _ { a ^ { * } } } \} } \end{array}$ , and $\begin{array} { r } { C = \frac { 1 } { | A | } \operatorname* { m a x } \{ C _ { a } , C _ { a ^ { * } } \} } \end{array}$ we have
|
| 539 |
+
|
| 540 |
+
$$
|
| 541 |
+
\mathbb { P } ( a \neq a ^ { * } ) \leq C \exp \{ - \frac { t } { \hat { C } \sigma ( \log ( 2 + t ) ) ^ { 2 } } \} + \mathbb { P } ( E _ { s } ^ { c } ) .
|
| 542 |
+
$$
|
| 543 |
+
|
| 544 |
+
From Lemma 4, $\exists C ^ { ' } , \hat { C } ^ { \prime }$ for which
|
| 545 |
+
|
| 546 |
+
$$
|
| 547 |
+
\mathbb { P } ( E _ { s } ^ { c } ) \le C ^ { ' } t \exp \{ - \frac { t } { \hat { C } ^ { ' } ( \log ( t ) ) ^ { 3 } } \} ,
|
| 548 |
+
$$
|
| 549 |
+
|
| 550 |
+
so that
|
| 551 |
+
|
| 552 |
+
$$
|
| 553 |
+
\mathbb { P } ( a \neq a ^ { * } ) \leq O ( t \exp \{ - \frac { t } { ( \log ( t ) ) ^ { 3 } } \} ) .
|
| 554 |
+
$$
|
| 555 |
+
|
| 556 |
+
Theorem 3 Consider an $E 3 W$ policy applied to the tree. Let $\begin{array} { r } { \kappa _ { i } = \nabla \Omega ^ { * } ( a _ { i } | s ) + \frac { L } { p } \sqrt { { \hat { C } } \sigma ^ { 2 } \log \frac { C } { \delta } / 2 n } , } \end{array}$ $\begin{array} { r } { \chi _ { i } = \nabla \Omega ^ { * } ( a _ { i } | s ) - \frac { L } { p } \sqrt { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } / 2 n } , } \end{array}$ , where $\nabla \Omega ^ { * } ( . | s )$ is the policy with respect to the mean value vector $V ( \cdot )$ at the root node s. For any $\delta > 0$ , with probability at least $1 - \delta$ , ∃ constant $L , p , C , { \hat { C } }$ so that the pseudo regret $R _ { n }$ satisfies
|
| 557 |
+
|
| 558 |
+
$$
|
| 559 |
+
n V ^ { * } - n \sum _ { i } V _ { i } \Big ( \kappa _ { i } + \frac { L } { p } \big ( \frac { \tau ( U _ { \Omega } - L _ { \Omega } ) } { 1 - \gamma } \big ) \Big ) \leq R _ { n } \leq n V ^ { * } - n \sum _ { i } V _ { i } \Big ( \chi _ { i } - \frac { L } { p } \big ( \frac { \tau ( U _ { \Omega } - L _ { \Omega } ) } { 1 - \gamma } \big ) \Big ) .
|
| 560 |
+
$$
|
| 561 |
+
|
| 562 |
+
Proof 8 From Lemma 2 given two policies $\pi ^ { ( 1 ) } = \nabla \Omega ^ { * } ( r ^ { ( 1 ) } )$ and $\pi ^ { ( 2 ) } = \nabla \Omega ^ { * } ( r ^ { ( 2 ) } ) , \exists L ,$ , such that
|
| 563 |
+
|
| 564 |
+
$$
|
| 565 |
+
\parallel \pi ^ { ( 1 ) } - \pi ^ { ( 2 ) } \parallel _ { p } \leq L \parallel r ^ { ( 1 ) } - r ^ { ( 2 ) } \parallel _ { p } \leq L \frac { 1 } { p } \parallel r ^ { ( 1 ) } - r ^ { ( 2 ) } \parallel _ { \infty } .
|
| 566 |
+
$$
|
| 567 |
+
|
| 568 |
+
From (13), we have the regret
|
| 569 |
+
|
| 570 |
+
$$
|
| 571 |
+
R _ { n } = n V ^ { * } - \sum _ { i } V _ { i } \sum _ { t = 1 } ^ { n } { \hat { \pi } } _ { t } ( a _ { i } | s ) ,
|
| 572 |
+
$$
|
| 573 |
+
|
| 574 |
+
where $\hat { \pi } _ { t } ( \cdot )$ is the policy at time step $t$ , and $\mathbb { I } ( \cdot )$ is the indicator function. $V ^ { * }$ is the optimal branch at the root node, $V _ { i }$ is the mean value function of the branch with respect to action $i$ , $V ( \cdot )$ is the $| A |$
|
| 575 |
+
|
| 576 |
+
vector of value function at the root node. $\hat { V } ( \cdot )$ is the $| A |$ estimation vector of value function at the root node. $\pi ( . | s ) = \nabla \Omega ^ { * } ( V ( \cdot ) )$ is the policy with respect to the $V ( \cdot )$ vector at the root node.
|
| 577 |
+
|
| 578 |
+
Then for any $\delta > 0$ , with probability at least $1 - \delta$ , we have
|
| 579 |
+
|
| 580 |
+
$$
|
| 581 |
+
\begin{array} { l } { \displaystyle \lvert \pi ( a _ { i } \vert s ) - \hat { \pi } _ { t } ( a _ { i } \vert s ) \rvert \le \parallel \pi ( . \vert s ) - \hat { \pi } _ { t } ( . \vert s ) \parallel _ { \infty } \le \displaystyle \frac { L } { p } \parallel V ( \cdot ) - \hat { V } ( \cdot ) \parallel _ { \infty } ( L e m m a 2 ) } \\ { \displaystyle \le \displaystyle \frac { L } { p } \lvert V ( \cdot ) - \hat { V } ( \cdot ) \rvert \le \displaystyle \frac { L } { p } \biggl ( \frac { \tau ( U _ { \Omega } - L _ { \Omega } ) } { 1 - \delta } + \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } \biggr ) ( T h e o r e m 4 ) } \end{array}
|
| 582 |
+
$$
|
| 583 |
+
|
| 584 |
+
So that
|
| 585 |
+
|
| 586 |
+
$$
|
| 587 |
+
\tau ( a _ { i } | s ) - \frac { L } { p } \Bigg ( \frac { \tau ( U _ { \Omega } - L _ { \Omega } ) } { 1 - \delta } + \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } \Bigg ) \leq \hat { \pi } _ { t } ( a _ { i } | s ) \leq \pi ( a _ { i } | s ) + \frac { L } { p } \Bigg ( \frac { \tau ( U _ { \Omega } - L _ { \Omega } ) } { 1 - \delta } + \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } \Bigg ) .
|
| 588 |
+
$$
|
| 589 |
+
|
| 590 |
+
so that
|
| 591 |
+
|
| 592 |
+
$$
|
| 593 |
+
\begin{array} { l } { \displaystyle \mathfrak { l } _ { n } = n V ^ { * } - \sum _ { i } V _ { i } \sum _ { t = 1 } ^ { n } \hat { \pi } _ { t } ( a _ { i } | s ) \le n V ^ { * } - \sum _ { i } V _ { i } \sum _ { t = 1 } ^ { n } \left( \pi ( a _ { i } | s ) - \displaystyle \frac { L } { p } \big ( \displaystyle \frac { \tau ( U _ { \Omega } - L _ { \Omega } ) } { 1 - \delta } + \sqrt { \displaystyle \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 n } } \big ) \right) } \\ { \displaystyle \mathfrak { l } _ { n } \le n V ^ { * } - \sum _ { i } V _ { i } \sum _ { t = 1 } ^ { n } \left( \pi ( a _ { i } | s ) - \displaystyle \frac { L } { p } \big ( \displaystyle \frac { \tau ( U _ { \Omega } - L _ { \Omega } ) } { 1 - \delta } + \sqrt { \displaystyle \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 n } } \big ) \right) } \\ { \displaystyle \mathfrak { l } _ { n } \le n V ^ { * } - n \sum _ { i } V _ { i } \left( \pi ( a _ { i } | s ) - \displaystyle \frac { L } { p } \big ( \displaystyle \frac { \tau ( U _ { \Omega } - L _ { \Omega } ) } { 1 - \delta } + \sqrt { \displaystyle \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 n } } \big ) \right) } \end{array}
|
| 594 |
+
$$
|
| 595 |
+
|
| 596 |
+
And
|
| 597 |
+
|
| 598 |
+
$$
|
| 599 |
+
\begin{array} { l } { { R _ { n } \geq n V ^ { \ast } - \displaystyle \sum _ { i } V _ { i } \sum _ { t = 1 } ^ { n } \left( \pi ( a _ { i } | s ) + \frac { L } { p } \big ( \frac { \tau ( U _ { \Omega } - L _ { \Omega } ) } { 1 - \delta } + \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 n } } \big ) \right) } } \\ { { R _ { n } \geq n V ^ { \ast } - n \displaystyle \sum _ { i } V _ { i } \Big ( \pi ( a _ { i } | s ) + \frac { L } { p } \big ( \frac { \tau ( U _ { \Omega } - L _ { \Omega } ) } { 1 - \delta } + \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 n } } \big ) \Big ) } } \end{array}
|
| 600 |
+
$$
|
| 601 |
+
|
| 602 |
+
In case of Maximum Entropy and Relative Entropy $p = 1$ , because
|
| 603 |
+
|
| 604 |
+
$$
|
| 605 |
+
\parallel \pi ^ { ( 1 ) } - \pi ^ { ( 2 ) } \parallel _ { \infty } \leq L \parallel r ^ { ( 1 ) } - r ^ { ( 2 ) } \parallel _ { \infty } .
|
| 606 |
+
$$
|
| 607 |
+
|
| 608 |
+
So that we have for MENTS
|
| 609 |
+
|
| 610 |
+
$$
|
| 611 |
+
n V ^ { * } - n \sum _ { i } V _ { i } \Big ( \kappa _ { i } + L \big ( \frac { \tau \log | A | } { 1 - \gamma } \big ) \Big ) \leq R _ { n } \leq n V ^ { * } - n \sum _ { i } V _ { i } \Big ( \chi _ { i } - L \big ( \frac { \tau \log | A | } { 1 - \gamma } \big ) \Big ) .
|
| 612 |
+
$$
|
| 613 |
+
|
| 614 |
+
For RENTS, we have
|
| 615 |
+
|
| 616 |
+
$$
|
| 617 |
+
\imath V ^ { * } - n \sum _ { i } V _ { i } \Big ( \kappa _ { i } + L \big ( \frac { \tau ( \log | A | - \frac { 1 } { m } ) } { 1 - \gamma } \big ) \Big ) \leq R _ { n } \leq n V ^ { * } - n \sum _ { i } V _ { i } \Big ( \chi _ { i } - L \big ( \frac { \tau ( \log | A | - \frac { 1 } { m } ) } { 1 - \gamma } \big ) \Big )
|
| 618 |
+
$$
|
| 619 |
+
|
| 620 |
+
where $\begin{array} { r } { m = \operatorname* { m i n } _ { a } \pi ( a | s ) } \end{array}$
|
| 621 |
+
|
| 622 |
+
In case of Tsallis Entropy $p = 2$ ( Niculae & Blondel (2017)), so that
|
| 623 |
+
|
| 624 |
+
$$
|
| 625 |
+
n V ^ { * } - n \sum _ { i } V _ { i } \Big ( \kappa _ { i } + \frac { L } { 2 } \big ( \frac { | A | - 1 } { 2 | A | } \frac { \tau } { 1 - \gamma } \big ) \Big ) \leq R _ { n } \leq n V ^ { * } - n \sum _ { i } V _ { i } \Big ( \chi _ { i } - \frac { L } { 2 } \big ( \frac { | A | - 1 } { 2 | A | } \frac { \tau } { 1 - \gamma } \big ) \Big )
|
| 626 |
+
$$
|
| 627 |
+
|
| 628 |
+
Before derive the next theorem, we state here the Theorem 2 in Geist et al. (2019)
|
| 629 |
+
|
| 630 |
+
• Boundedness: for two constants $L _ { \Omega }$ and $U _ { \Omega }$ such that for all $\pi \in \Pi$ , we have $L _ { \Omega } \leq \Omega ( \pi ) \leq$ $U _ { \Omega }$ , then
|
| 631 |
+
|
| 632 |
+
$$
|
| 633 |
+
V ^ { \ast } ( s ) - \frac { \tau ( U _ { \Omega } - L _ { \Omega } ) } { 1 - \gamma } \leq V _ { \Omega } ^ { \ast } ( s ) \leq V ^ { \ast } ( s ) .
|
| 634 |
+
$$
|
| 635 |
+
|
| 636 |
+
Where $\tau$ is the temperature and $\gamma$ is the discount constant.
|
| 637 |
+
|
| 638 |
+
Theorem 4 For any $\delta > 0$ , with probability at least $1 - \delta$ , the $\varepsilon _ { \Omega }$ satisfies
|
| 639 |
+
|
| 640 |
+
$$
|
| 641 |
+
- \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } - \frac { \tau ( U _ { \Omega } - L _ { \Omega } ) } { 1 - \gamma } \leq \varepsilon _ { \Omega } \leq \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } .
|
| 642 |
+
$$
|
| 643 |
+
|
| 644 |
+
Proof 9 From Theorem 2, let us define $\begin{array} { r } { \delta = C \exp \{ - \frac { 2 N ( s ) \epsilon ^ { 2 } } { \hat { C } \sigma ^ { 2 } } \} } \end{array}$ , so that $\begin{array} { r } { \epsilon = \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log { \frac { C } { \delta } } } { 2 N ( s ) } } } \end{array}$ then for any $\delta > 0$ , we have
|
| 645 |
+
|
| 646 |
+
$$
|
| 647 |
+
\mathbb { P } ( | V _ { \Omega } ( s ) - V _ { \Omega } ^ { * } ( s ) | \le \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } ) \ge 1 - \delta .
|
| 648 |
+
$$
|
| 649 |
+
|
| 650 |
+
Then, for any $\delta > 0$ , with probability at least $1 - \delta$ , we have
|
| 651 |
+
|
| 652 |
+
$$
|
| 653 |
+
\begin{array} { l } { \displaystyle | V _ { \Omega } ( s ) - V _ { \Omega } ^ { * } ( s ) | \leq \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } } \\ { - \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } \leq V _ { \Omega } ( s ) - V _ { \Omega } ^ { * } ( s ) \leq \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } } \\ { - \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } + V _ { \Omega } ^ { * } ( s ) \leq V _ { \Omega } ( s ) \leq \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } + V _ { \Omega } ^ { * } ( s ) . } \end{array}
|
| 654 |
+
$$
|
| 655 |
+
|
| 656 |
+
From Proposition $I$ , we have
|
| 657 |
+
|
| 658 |
+
$$
|
| 659 |
+
- \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } + V ^ { * } ( s ) - \frac { \tau ( U _ { \Omega } - L _ { \Omega } ) } { 1 - \gamma } \leq V _ { \Omega } ( s ) \leq \sqrt { \frac { \hat { C } \sigma ^ { 2 } \log \frac { C } { \delta } } { 2 N ( s ) } } + V ^ { * } ( s ) .
|
| 660 |
+
$$
|
md/train/B1xDq2EFDH/B1xDq2EFDH.md
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ANALYTICAL MOMENT REGULARIZER FOR TRAINING ROBUST NETWORKS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Despite the impressive performance of deep neural networks (DNNs) on numerous learning tasks, they still exhibit uncouth behaviours. One puzzling behaviour is the subtle sensitive reaction of DNNs to various noise attacks. Such a nuisance has strengthened the line of research around developing and training noise-robust networks. In this work, we propose a new training regularizer that aims to minimize the probabilistic expected training loss of a DNN subject to a generic Gaussian input. We provide an efficient and simple approach to approximate such a regularizer for arbitrarily deep networks. This is done by leveraging the analytic expression of the output mean of a shallow neural network, avoiding the need for memory and computation expensive data augmentation. We conduct extensive experiments on LeNet and AlexNet on various datasets including MNIST, CIFAR10, and CIFAR100 to demonstrate the effectiveness of our proposed regularizer. In particular, we show that networks that are trained with the proposed regularizer benefit from a boost in robustness against Gaussian noise to an equivalent amount of performing 3-21 folds of noisy data augmentation. Moreover, we empirically show on several architectures and datasets that improving robustness against Gaussian noise, by using the new regularizer, can improve the overall robustness against 6 other types of attacks by two orders of magnitude.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Deep neural networks (DNNs) have emerged as generic models that can be trained to perform impressively well in a variety of learning tasks ranging from object recognition (He et al., 2016) and semantic segmentation (Long et al., 2015) to speech recognition (Hinton et al., 2012) and bioinformatics (Angermueller et al., 2016). Despite their increasing popularity, flexibility, generality, and performance, DNNs have been recently shown to be quite susceptible to small imperceptible input noise (Szegedy et al., 2014; Moosavi-Dezfooli et al., 2016; Goodfellow et al., 2015). Such analysis gives a clear indication that even state-of-the-art DNNs may lack robustness. Consequently, there has been an ever-growing interest in the machine learning community to study this uncanny behaviour. In particular, the work of (Goodfellow et al., 2015; Moosavi-Dezfooli et al., 2016) demonstrates that there are systematic approaches to constructing adversarial attacks that result in misclassification errors with high probability. Even more peculiarly, some noise perturbations seem to be doubly agnostic (Moosavi-Dezfooli et al., 2017), i.e. there exist deterministic perturbations that can result in misclassification errors with high probability when applied to different networks, irrespective of the input (denoted network and input agnostic).
|
| 12 |
+
|
| 13 |
+
Understanding this degradation in performance under adversarial attacks is of tremendous importance, especially for real-world DNN deployment, e.g. self-driving cars/drones and equipment for the visually impaired. A standard and popular means to alleviate this nuisance is noisy data augmentation in training, i.e. a DNN is exposed to noisy input images during training so as to bolster its robustness during inference. Several works have demonstrated that DNNs can in fact benefit from such augmentation (Moosavi-Dezfooli et al., 2016; Goodfellow et al., 2015). However, data augmentation in general might not be sufficient for two reasons. (1) Particularly with high-dimensional input noise, the amount of data augmentation necessary to sufficiently capture the noise space will be very large, which will increase training time. (2) Data augmentation with high energy noise can negatively impact the performance on noise-free test examples. This can be explained by the fundamental trade-off between accuracy and robustness (Tsipras et al., 2018; Boopathy et al., 2019). It can also arise from the fact that augmentation forces the DNN to have the same prediction for two vastly different versions of the same input, noise-free and a substantially corrupted version.
|
| 14 |
+
|
| 15 |
+
Therefore, in this paper, we propose a new regularizer for noise-robust networks to circumvent the aforementioned setbacks of data augmentation.
|
| 16 |
+
|
| 17 |
+
A natural objective for training against attacks sampled from a distribution $\mathcal { D }$ , that bypasses the need for data augmentation, is the expected loss under this distribution. Since a closed-form expression is generally difficult to obtain or an approximate surrogate is expensive to evaluate (Monte Carlo estimates), we propose instead a closely related objective that is the loss of the expected predictions of the network under $\mathcal { D }$ -distributed adversarial noise. Since it has been shown that Gaussian noise can be adversarial (Bibi et al., 2018) and that such noise is widely studied in applications such as image processing, we restrict the focus in this paper to the case where $\mathcal { D }$ is Gaussian. While this may seem to be too restrictive, we later show that improving the robustness of networks against Gaussian attacks also improves the robustness against a family of other types of attacks. However, even under such an assumption, only a memory and computationally expensive (expensive due to two-stage network linearization), closed-form approximate surrogate for network expected predictions exists (Bibi et al., 2018).
|
| 18 |
+
|
| 19 |
+
Contributions. (i) We formalize a new regularizer that is a function of the probabilistic first moment of the output of a DNN to train robust DNNs against noise sampled from distribution $\mathcal { D }$ . (ii) Under the special choice of Gaussian attacks, i.e. $\mathcal { D }$ is Gaussian, we show how the first moment expression can be evaluated very efficiently during training for an arbitrary deep DNN by bypassing the need to perform memory and computationally expensive two-stage linearization. (iii) Extensive experiments using LeNet (LeCun et al., 1999) and AlexNet (Krizhevsky et al., 2012) architectures on MNIST (LeCun, 1998), CIFAR10, and CIFAR100 (Krizhevsky & Hinton, 2009) datasets demonstrate that a substantial enhancement in robustness can be achieved when using our regularizer in training. In fact, in the majority of the experiments, the improvement is better than training on the same dataset, augmented with 3 to 21 times Gaussian noisy data. Interestingly, the results suggest an excellent trade-off between accuracy and robustness. Moreover, we show that networks that are trained to be robust against Gaussian attacks using our proposed regularizer enjoy orders of magnitude boost in robustness against a family of other types of attacks.
|
| 20 |
+
|
| 21 |
+
# 2 RELATED WORK
|
| 22 |
+
|
| 23 |
+
Despite the impressive performance of DNNs on various tasks, they have been shown to be very sensitive to certain types of noise, commonly referred to as adversarial examples, particularly in the recognition task (Moosavi-Dezfooli et al., 2016; Goodfellow et al., 2015). Adversarial examples can be viewed as small imperceptible noise that, once added to the input of a DNN, its performance is severely degraded. This finding has incited interest in studying/measuring the robustness of DNNs.
|
| 24 |
+
|
| 25 |
+
The literature is rich with work that aims to unify and understand the notion of network robustness. For instance, Szegedy et al. (2014) suggested a spectral stability analysis for a wide class of DNNs by measuring the Lipschitz constant of the affine transformation describing a fully-connected or a convolutional layer. This result was extended to compute an upper bound for a composition of layers, i.e. a DNN. However, this measure sets an upper bound on the robustness over the entire input domain and does not take into account the noise distribution. Later, Fawzi et al. (2017a) defined robustness as the mean support of the minimum adversarial perturbation, which is now the most common definition for robustness. Not only was robustness studied against adversarial perturbations but also against geometric transformations to the input. Fawzi et al. (2018) emphasized the independence of the robustness measure to the ground truth class labels and that it should only depend on the classifier and the dataset distribution. Subsequently, two different metrics to measure DNN robustness were proposed: one for general adversarial attacks and another for noise sampled from uniform distribution. Recently, Gilmer et al. (2018) showed the trade-off between robustness and test error from a theoretical point of view on a simple classification problem with hyperspheres.
|
| 26 |
+
|
| 27 |
+
On the other hand, and based on various robustness analyses, several works proposed various approaches in building networks that are robust against noise sampled from well known distributions and against generic adversarial attacks. For instance, Grosse et al. (2017) proposed a model that was trained to classify adversarial examples with statistical hypothesis testing on the distribution of the dataset. Another approach is to perform statistical analysis on the latent feature space instead (Li & Li, 2017; Feinman et al., 2017), or train a DNN that rejects adversarial attacks (Lu et al., 2017). Moreover, the geometry of the decision boundaries of DNN classifiers was studied by Fawzi et al. (2017b) to infer a simple curvature test for this purpose. Using this method, one can restore the original label and classify the input correctly. Restoring the original input using defense mechanisms, which can only detect adversarial examples, can be done by denoising (ridding it from its adversarial nature) so long as the noise perturbation is well-known and modeled apriori (Zhu et al., 2016). A fresh approach to robustness was proposed by Zantedeschi et al. (2017), where they showed that using bounded ReLUs (if augmented with Gaussian noise) to limit the output range can improve robustness. A different work proposed to distill the learned knowledge from a deep model to retrain a similar model architecture as a means to improving robustness (Papernot et al., 2016). This training approach is one of many adversarial training strategies for robustness Makhzani et al. (2016). More closely to our work is (Cisse et al., 2017), where a new training regularizer was proposed for a large family of DNNs. The proposed regularizer softly enforces that the upper bound of the Lipshitz constant of the output of the network to be less than or equal to one. Moreover and very recently, the work of Bibi et al. (2018) has derived analytic expressions for the output mean and covariance of networks in the form of (Affine, ReLU, Affine) under a generic Gaussian input. This work also demonstrates how a (memory and computation expensive) two-stage linearization can be employed to locally approximate a deep network with a two layer one, thus enabling the application of the derived expressions on the approximated shallower network.
|
| 28 |
+
|
| 29 |
+

|
| 30 |
+
Figure 1: Overview of the proposed graph for training Gaussian robust networks. The yellow block corresponds to an arbitrary network $\Phi ( . , \theta )$ viewed as the composition of two subnetworks separated by a ReLU. The stream on the bottom computes the output mean $\mu _ { 4 }$ of the network $\Phi ( : , \theta )$ assuming that (i) the noise input distribution is independent Gaussian with variances $\sigma _ { x } ^ { 2 }$ , and (ii) $\Omega ( . ~ : ~ \theta _ { 2 } )$ is approximated by a linear function. This evaluation for the output mean is efficient as it only requires an extra forward pass (bottom stream), as opposed to other methods that employ computationally and memory intensive network linearizations or data augmentation.
|
| 31 |
+
|
| 32 |
+
Most prior work requires data augmentation, training new architectures that distill knowledge, or detect adversaries a priori, resulting in expensive training routines that may be ineffective in the presence of several input noise types. To this end, we address these limitations through our new regularizer that aims to fundamentally tackle Gaussian input noise without data augmentation and, as a consequence, improves overall robustness against other types of attacks.
|
| 33 |
+
|
| 34 |
+
# 3 METHODOLOGY
|
| 35 |
+
|
| 36 |
+
Background on Network Moments. Networks with a single hidden layer of the form (Affine, ReLU, Affine) can be written in the functional form $\mathbf { g } ( \mathbf { x } ) = \bar { \mathbf { B } } \mathrm { m a x } \left( \mathbf { A } \mathbf { x } + \mathbf { \bar { c } } _ { 1 } , \mathbf { 0 } _ { p } \right) + \mathbf { c } _ { 2 }$ . The max(.) is an element-wise operator, $\textbf { A } \in \mathbb { R } ^ { p \times n }$ , and $\textbf { B } \in \mathbb { R } ^ { d \times p }$ . Thus, $\mathbf { g } : \mathbb { R } ^ { n } \mathbb { R } ^ { d }$ . Given that $\mathbf { x } \sim \mathcal { N } \left( \mu _ { x } , \Sigma _ { x } \right)$ , Bibi et al. (2018) showed that:
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
\begin{array} { r } { \mathbf { T h e o r e m 1 textit { T h e f i r s t m o m e n t } } o f g ( \mathbf { x } ) \ i s \mathbb { E } [ \mathbf { g } ( \mathbf { x } ) ] = \mathbf { B } \left( \mu _ { 2 } \odot \Phi \left( \frac { \mu _ { 2 } } { \sigma _ { 2 } } \right) + \sigma _ { 2 } \odot \varphi \left( \frac { \mu _ { 2 } } { \sigma _ { 2 } } \right) \right) + \mathbf { c } _ { 2 } . } \end{array}
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
Note that $\mu _ { 2 } = \mathbf { A } \mu _ { x } + \mathbf { c } _ { 1 }$ , $\sigma _ { 2 } = \sqrt { \mathrm { d i a g } \left( \Sigma _ { 2 } \right) } .$ , $\Sigma _ { 2 } = \mathbf { A } \Sigma _ { x } \mathbf { A } ^ { \top }$ , $\Phi$ and $\varphi$ are the standard Gaussian cumulative (CDF) and density (PDF) functions, respectively. The vector multiplication and division are element-wise operations. Lastly, $\mathrm { d i a g ( . ) }$ extracts the diagonal elements of a matrix into a vector. For ease of notation, we let $\begin{array} { r } { \mu _ { 3 } = \dot { T } ( \mu _ { 2 } , \dot { \sigma } _ { 2 } ) = ( \mu _ { 2 } \odot \Phi ( \frac { \mu _ { 2 } } { \sigma _ { 2 } } \bar { ) } + \sigma _ { 2 } \odot \varphi ( \frac { \mu _ { 2 } } { \sigma _ { 2 } } ) ) } \end{array}$ .
|
| 43 |
+
|
| 44 |
+
To extend the results of Theorem (1) to deeper models, a two-stage linearization was proposed in Bibi et al. (2018), where $( \mathbf { A } , \mathbf { B } )$ and $( \mathbf { c } _ { 1 } , \mathbf { c } _ { 2 } )$ are taken to be the Jacobians and biases of the first order Taylor approximation to the two network functions around a ReLU layer in a DNN. Refer to Bibi et al. (2018) for more details about this expression and the proposed linearization.
|
| 45 |
+
|
| 46 |
+
Proposed Robust Training Regularizer. To propose an alternative to noisy data augmentation to address its drawbacks, one has to realize that this augmentation strategy aims to minimize the expected training loss of a DNN when subjected to noisy input distribution $\mathcal { D }$ through sampling. In fact, it minimizes an empirical loss that approximates this expected loss when enough samples are present during training. When sampling is insufficient (a drawback of data augmentation in highdimensions), this approximation is too loose and robustness can suffer. However, if we have access to an analytic expression for the expected loss, expensive data augmentation can be averted. This is the key motivation of the paper. Mathematically, the training loss can be modeled as
|
| 47 |
+
|
| 48 |
+
$$
|
| 49 |
+
\operatorname* { m i n } _ { \theta } \ \sum _ { i = 1 } ^ { N } \Big ( \ell \left( \Phi ( \mathbf { x } _ { i } ; \theta ) , y _ { i } \right) + \alpha \mathbb { E } _ { \mathbf { n } \sim \mathcal { D } } \left[ \ell \left( \Phi ( \mathbf { x } _ { i } + \mathbf { n } ; \theta ) , y _ { i } \right) \right] \Big ) .
|
| 50 |
+
$$
|
| 51 |
+
|
| 52 |
+
Here, $\Phi : \mathbb { R } ^ { n } \mathbb { R } ^ { d }$ is any arbitrary network with parameters $\theta , \ell$ is the loss function, $\{ ( \mathbf { x } _ { i } , y _ { i } ) \} _ { i = 1 } ^ { N }$ are the noise-free data-label training pairs, and $\alpha \geq 0$ is a trade off parameter. While the first term in Equation 1 is the standard empirical loss commonly used for training, the second term is often replaced with its Monte Carlo estimate through data augmentation. That is, for each training example $\mathbf { x } _ { i }$ , the second term is approximated with an empirical average of $\tilde { N }$ noisy examples of $\mathbf { x } _ { i }$ such that $\begin{array} { r } { \mathbb { E } _ { \mathbf { n } \sim \mathcal { D } } [ \ell \left( \boldsymbol { \Phi } ( \mathbf { x } _ { i } + \mathbf { n } ; \boldsymbol { \theta } ) , y _ { i } \right) ] \approx \frac { 1 } { \tilde { N } } \sum _ { j = 1 } ^ { \tilde { N } } \ell \left( \boldsymbol { \Phi } ( \mathbf { x } _ { i } + \mathbf { n } _ { j } ; \boldsymbol { \theta } ) , y _ { i } \right) . } \end{array}$ . This will increase the size of the dataset by a factor of $\tilde { N }$ , which will in turn increase training complexity. As discussed earlier, network performance on the noise-free examples can also be negatively impacted. Note that obtaining a closed form expression for the second term in Equation 1 for some of the popularly used losses $\ell$ is more complicated than deriving expressions for the output mean of the network $\Phi$ itself, e.g. in Theorem (1). Therefore, we propose to replace this loss with the following surrogate
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
\operatorname* { m i n } _ { \theta } \ \sum _ { i = 1 } ^ { N } \Big ( \ell \left( \Phi ( \mathbf { x } _ { i } ; \theta ) , y _ { i } \right) + \alpha \ell \left( \mathbb { E } _ { \mathbf { n } \sim \mathcal { D } } \left[ \Phi ( \mathbf { x } _ { i } + \mathbf { n } ; \theta ) \right] , y _ { i } \right) . \Big )
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
Because of Jensen’s inequality, Equation 2 is a lower bound to Eq Equation 1 when $\ell$ is convex, which is the case for most popular losses including $\ell _ { 2 }$ -loss and cross-entropy loss. The proposed second term in Equation 2 encourages that the output mean of the network $\Phi$ of every noisy example $( \mathbf { x } _ { i } + \mathbf { n } )$ matches the correct class label $y _ { i }$ . This regularizer will stimulate a separation among the output mean of the classes if the training data is subjected to noise sampled from $\mathcal { D }$ . Having access to an analytic expression for these means will prompt a simple inexpensive training, where the actual size of the training set is unaffected and augmentation is avoided. This form of regularization is proposed to replace data augmentation.
|
| 59 |
+
|
| 60 |
+
While a closed-form expression for the second term of Equation 2 might be infeasible for a general network $\Phi ( . )$ , an expensive approximation can be attained. In particular, Theorem Equation 1 provides an analytic expression to evaluate the second term in Equation 2, for when $\mathcal { D }$ is Gaussian and when the network is approximated by a two-stage linearization procedure as $\Phi ( \mathbf { x } ) \approx \mathbf { B } \mathrm { m a x } \left( \mathbf { A } \mathbf { x } + \mathbf { c } _ { 1 } , \mathbf { 0 } _ { p } \right) + \mathbf { c } _ { 2 }$ . However, it is not clear how to utilize such a result to regularize networks during training with Equation 2 as a loss. This is primarily due to the computationally expensive and memory intensive network linearization proposed in Bibi et al. (2018). Specifically, the linearization parameters $\left( \mathbf { A } , \mathbf { B } , \mathbf { c } _ { 1 } , \mathbf { c } _ { 2 } \right)$ are a function of the network parameters, $\theta$ , which are updated with every gradient descent step on Equation 2; thus, two-stage linearization has to be performed in every $\theta$ update step, which is infeasible.
|
| 61 |
+
|
| 62 |
+
On an Efficient Approximation to Equation 2. The loss in Equation 2 proposes a generic approach to train robust arbitrary networks against noise sampled from an arbitrary distribution $\mathcal { D }$ . Since the problem in its general setting is too broad for detailed analysis, we restrict the scope of this work to the class of networks, which are most popularly used and parameterized by $\theta$ , $\bar { \Phi ( . ; \theta ) } : \mathbb { R } ^ { n } \to \mathbb { R } ^ { d }$ with ReLUs as nonlinear activations. Moreover, since random Gaussian noise was shown to exhibit an adversarial nature Bibi et al. (2018); Rauber et al. (2017); Franceschi et al. (2018), and it is one of the most well studied noise models for the useful properties it exhibits, we restrict $\mathcal { D }$ to the case of Gaussian noise. In particular, $\mathcal { D }$ is independent zero-mean Gaussian noise at the input, i.e. $\mathbf { n } \sim \mathcal { D } = \mathcal { N } \left( \mathbf { 0 } , \Sigma _ { x } = \mathrm { D i a g } \left( \sigma _ { x } ^ { 2 } \right) \right)$ , where $\sigma _ { x } ^ { 2 } \in \mathbb { R } ^ { n }$ is a vector of variances and $\mathrm { D i a g ( . ) }$ reshapes the vector elements into a diagonal matrix. Generally, it is still difficult to compute the second term in Equation 2 under Gaussian noise for arbitrary networks. However, if we have access to an inexpensive approximation of the network, avoiding the computationally and memory expensive network linearization in Bibi et al. (2018), an approximation to the second term in Equation 2 can be used for efficient robust training directly on $\theta$ .
|
| 63 |
+
|
| 64 |
+
Consider the $l ^ { \mathrm { t h } }$ ReLU layer in $\Phi ( . ; \theta )$ . the network can be expressed as $\begin{array} { r l } { \Phi ( . ; \theta ) } & { { } = } \end{array}$ $\Omega ( \mathrm { R e L U } _ { l } ( \Upsilon ( . , \theta _ { 1 } ) ) ; \theta _ { 2 } )$ . Note that the parameters of the overall network $\Phi ( . ; \theta )$ is the union of the parameters of the two subnetworks $\Upsilon ( . ; \theta _ { 1 } )$ and $\Omega ( . ; \theta _ { 2 } )$ , i.e. $\theta = \theta _ { 1 } \cup \theta _ { 2 }$ . Throughout this work and to simplify the analysis, we set $l = 1$ . With such a choice of $l$ , the first subnetwork $\Upsilon ( . , \theta _ { 1 } )$ is affine with $\bar { \theta _ { 1 } } = \{ \mathbf { A } , \mathbf { c } _ { 1 } \}$ . However, the second subnetwork $\Omega ( . , \theta _ { 2 } )$ is not linear in general, and thus, one can linearize $\Omega ( . , \theta _ { 2 } )$ at $\mathbb { E } _ { \mathbf { n } \sim \mathcal { N } ( \mathbf { 0 } , \Sigma _ { x } ) } \left[ \mathrm { R e L U } _ { 1 } \left( \Upsilon \left( \mathbf { x } _ { i } + \mathbf { n } ; \theta _ { 1 } \right) \right) \right] = T ( \mu _ { 2 } , \sigma _ { 2 } ) = \mu _ { 3 }$ . Note that $\mu _ { 3 }$ is the output mean after the ReLU and $\mu _ { 2 } = \mathbf { A } \mathbf { x } _ { i } + \mathbf { c } _ { 1 }$ , since $\Upsilon ( \mathbf { x } _ { i } + \mathbf { n } ; \theta _ { 1 } ) = \mathbf { A } \left( \mathbf { x } _ { i } + \mathbf { n } \right) + \mathbf { c } _ { 1 }$ . Both $T ( . , . )$ and $\sigma _ { 2 }$ are defined in Equation 1. Thus, linearizing $\Omega$ at $\mu _ { 3 }$ with linearization parameters $\mathbf { ( B , c _ { 2 } ) }$ being the Jacobian of $\Omega$ and ${ \bf c } _ { 2 } = \Omega ( \mu _ { 3 } , \theta _ { 2 } ) - { \bf B } \mu _ { 3 }$ , we have that, for any point $\mathbf { v } _ { i }$ close to $\mu _ { 3 }$ : $\Omega ( \mathbf { v } _ { i } , \mathbf { \bar { \theta } } _ { 2 } ) \approx \mathbf { B } \mathbf { v } _ { i } + \mathbf { c } _ { 2 }$ . While computing $\mathbf { ( B , c _ { 2 } ) }$ through linearization is generally very expensive, computing the approximation to Equation 2 requires explicit access to neither $\mathbf { B }$ nor $\mathbf { c } _ { 2 }$ . Note that this second term for $l = 1$ is given as:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\begin{array} { r l } & { \quad \ell \left( \mathbb { E } _ { \mathbf { n } \sim \mathcal { N } ( \mathbf { 0 } , \Sigma _ { x } ) } [ \Phi ( \mathbf { x } _ { i } + \mathbf { n } ; \boldsymbol { \theta } ) ] , y _ { i } \right) = \ell \left( \mathbb { E } _ { \mathbf { z } _ { i } \sim \mathcal { N } ( \mathbf { x } _ { i } , \Sigma _ { x } ) } [ \Omega \left( \mathrm { R e L U } _ { 1 } \left( \Upsilon ( \mathbf { z } _ { i } ; \boldsymbol { \theta } _ { 1 } ) \right) ; \boldsymbol { \theta } _ { 2 } \right) ] , y _ { i } \right) } \\ & { = \ell \left( \mathbb { E } _ { \mathbf { z } _ { i } \sim \mathcal { N } ( \mathbf { x } _ { i } , \Sigma _ { x } ) } [ \Omega \left( \mathrm { R e L U } _ { 1 } \left( \mathbf { A } \mathbf { z } _ { i } + \mathbf { c } _ { 1 } \right) ; \boldsymbol { \theta } _ { 2 } \right) ] , y _ { i } \right) } \\ & { \approx \ell \left( \mathbb { E } _ { \mathbf { z } _ { i } \sim \mathcal { N } ( \mathbf { x } _ { i } , \Sigma _ { x } ) } [ \mathbf { B } \left( \mathrm { R e L U } _ { 1 } \left( \mathbf { A } \mathbf { z } _ { i } + \mathbf { c } _ { 1 } \right) \right) + \mathbf { c } _ { 2 } ] , y _ { i } \right) } \\ & { = \ell \left( \mathbf { B } \mu _ { 3 } + \mathbf { c } _ { 2 } , y _ { i } \right) = \ell \left( \Omega ( \mu _ { 3 } , \boldsymbol { \theta } _ { 2 } ) , y _ { i } \right) . } \end{array}
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
The approximation follows from the assumption that the input to the second subnetwork $\Omega ( . ; \theta _ { 2 } )$ , i.e. $\mathbf { v } _ { i } = \mathrm { R e L U } _ { 1 } \left( \mathbf { A } \mathbf { z } _ { i } + \mathbf { c } _ { 1 } \right) )$ , is close to the point of linearization $\mu _ { 3 }$ such that $\Omega ( \mathbf { v } _ { i } ; \theta _ { 2 } ) \approx \mathbf { B } \mathbf { v } _ { i } + \mathbf { c } _ { 2 }$ . Or simply, that the input to $\Omega$ is close to the mean inputs, i.e. $\mu _ { 3 }$ , to $\Omega$ under Gaussian noise. The penultimate equality follows from the linearity of the expectation. As for the last equality, $\mathbf { ( B , c _ { 2 } ) }$ are the linearization parameters of $\Omega$ at $\mu _ { 3 }$ , where $\mathbf { c } _ { 2 } = \mathbf { \bar { \Omega } } ( \mu _ { 3 } , \theta _ { 2 } ) - \mathbf { B } \mu _ { 3 }$ by the first order Taylor approximation. Thus, computing the second term of Equation 2 according to Equation 3 can be simply approximated by a forward pass of $\mu _ { 3 }$ through the second network $\Omega$ . As for computing $\mu _ { 3 } = T ( \mu _ { 2 } , \sigma _ { 2 } )$ , note that $\mu _ { 2 } = \mathbf { A } \mathbf { x } _ { i } + \mathbf { c } _ { 1 }$ in Equation 3, which is equivalent to a forward pass of $\mathbf { x } _ { i }$ through the first subnetwork because $\Upsilon ( . , \theta _ { 1 } )$ is linear with $\theta _ { 1 } = \{ \bar { \bf A } , { \bf c } _ { 1 } \}$ . Moreover, since $\sigma _ { 2 } =$ $\sqrt { \mathrm { d i a g } \left( \mathbf { A } \Sigma _ { x } \mathbf { A } ^ { \top } \right) }$ , we have: $\sigma _ { 2 } = \sqrt { \operatorname { d i a g } \left( \mathbf { A D i a g } \left( \sigma _ { x } ^ { 2 } \right) \mathbf { A } ^ { \top } \right) } = \sqrt { \left( \mathbf { A } \odot \mathbf { A } \right) \sigma _ { x } ^ { 2 } }$ . The expression for $\sigma _ { 2 }$ can be efficiently computed by simply squaring the linear parameters in the first subnetwork and performing a forward pass of the input noise variance $\sigma _ { x } ^ { 2 }$ through $\Upsilon$ without the bias $\mathbf { c } _ { 1 }$ and taking the element-wise square root. Lastly, it is straightforward to compute $T ( \mu _ { 2 } , \sigma _ { 2 } )$ as it is an elementwise function in Equation 1. The overall computational graph in Figure 1 shows a summary of the computation needed to evaluate the loss in Equation 2 using only forward passes through the two subnetworks $\Upsilon$ and $\Omega$ . It is now possible with the proposed efficient approximation of our proposed regularizer in Equation 2 to efficiently train networks on noisy training examples that are corrupted with noise $\bar { \mathcal { N } } ( \mathbf { 0 } , \bar { \Sigma } _ { x } )$ without any form of prohibitive data augmentation.
|
| 71 |
+
|
| 72 |
+
# 4 EXPERIMENTS
|
| 73 |
+
|
| 74 |
+
In this section, we conduct experiments on multiple network architectures and datasets to demonstrate the effectiveness of our proposed regularizer in training more robust networks, especially in comparison with data augmentation. To standardize robustness evaluation, we first propose a new unified robustness metric against additive noise from a general distribution $\mathcal { D }$ and later specialize it when $\mathcal { D }$ is Gaussian. Lastly, we show that networks trained with our proposed regularizer not only outperform in robustness networks trained with Gaussian augmented data. Moreover, we show that such networks are also much more magnitudes times robust against other types of attacks.
|
| 75 |
+
|
| 76 |
+
On the Robustness Evaluation Metric. While there is a consensus on the definition of robustness in the presence of adversarial attacks, as the smallest perturbation required to fool a network, i.e. to change its prediction, it is not straightforward to extend such a definition to additive noise sampled from a distribution $\mathcal { D }$ . In particular, the work of Fawzi et al. (2018) tried to address this difficulty by defining the robustness of a classifier around an example x as the distance between x and the closest decision boundary. However, this definition is difficult to compute in practice and is not scalable, as it requires solving a generally nonconvex optimization problem for every testing example $\mathbf { x }$ that may also suffer from poor local minima. To remedy these drawbacks, we present a new robustness metric for generic additive noise.
|
| 77 |
+
|
| 78 |
+

|
| 79 |
+
Figure 2: General trade-off between accuracy and robustness on LeNet. We see, in all plots, that the accuracy tends to be negatively correlated with robustness over varying noise levels and amount of augmentation. Baseline refers to training with neither data augmentation nor our regularizer. However, it is hard to compare the performance of our method against data augmentation from these plots as we can only compare the robustness of models with similar noise-free testing accuracy.
|
| 80 |
+
|
| 81 |
+
Robustness Against Additive Noise. Consider a classifier $\Psi ( . )$ with $\psi ( \mathbf { x } ) = \arg \operatorname* { m a x } _ { i } \Psi _ { i } ( \mathbf { x } )$ as the predicted class label for the example $\mathbf { x }$ regardless of the correct class label $y _ { i }$ . We define the robustness on a sample $\mathbf { x }$ against a generic additive noise sampled from a distribution $\mathcal { D }$ as
|
| 82 |
+
|
| 83 |
+
$$
|
| 84 |
+
\Re _ { \mathcal { D } } ( \mathbf { x } ) = \mathbb { P } _ { \mathbf { n } \sim \mathcal { D } } \{ \psi ( \mathbf { x } + \mathbf { n } ) = \psi ( \mathbf { x } ) \} .
|
| 85 |
+
$$
|
| 86 |
+
|
| 87 |
+
Here, the proposed robustness metric $\Re _ { \mathcal { D } } ( \mathbf { x } )$ measures the probability of the classifier to preserve the original prediction of the noise-free example $\psi ( \mathbf { x } )$ after adding noise, $\psi ( \mathbf { x } + \mathbf { n } )$ , from distribution $\mathcal { D }$ . Therefore, the robustness over a testing dataset $\tau$ can be defined as the expected robustness over the test dataset: $\Re _ { \mathcal { D } } ( \mathcal { T } ) = \mathbb { E } _ { \mathbf { x } \sim \mathcal { T } } \left[ \Re _ { \mathcal { D } } ( \mathbf { x } ) \right]$ . Inspired by Franceschi et al. (2018), for ease, we relax Equation 4 from the probability of preserving the prediction score to a 0/1 robustness over $m$ - randomly sampled examples from $\mathcal { D }$ . That is, $\Re _ { \mathcal { D } } ( { \bf x } ) = 1$ means that, among $m$ randomly sampled noise from $\mathcal { D }$ added to $\mathbf { x }$ , none changed the prediction from $\psi ( \mathbf { x } )$ . However, if a single example of these $m$ samples changed the prediction from $\psi ( \mathbf { x } )$ , we set $\Re _ { \mathcal { D } } ( { \bf x } ) = 0$ . Thus, the robustness score is the average of this measure over the testing dataset $\tau$ .
|
| 88 |
+
|
| 89 |
+
Robustness Against Gaussian Noise. For additive Gaussian noise, i.e. $\mathcal { D } ~ = ~ \mathcal { N } ( \mathbf { 0 } , \Sigma _ { x } ~ =$ Diag $\left( \sigma _ { x } ^ { 2 } \right)$ ), robustness is averaged over a range of testing variances $\sigma _ { x } ^ { 2 }$ . We restrict $\sigma _ { x }$ to 30 evenly sampled values in $[ 0 , 0 . 5 ]$ , where this set is denoted as $\mathcal { A } ^ { 1 }$ . In practice, this is equivalent to sampling $m$ Gaussian examples for each $\sigma _ { x } \in { \mathcal { A } }$ , and if none of the $m$ samples changes the prediction of the classifier $\psi$ from the original noise-free example, the robustness for that sample at that $\sigma _ { x }$ noise level is set to 1 and then averaged over the complete testing set. Then, the robustness is the average over multiple $\sigma _ { x } \in { \mathcal { A } }$ . To make the computation even more efficient, instead of sampling a large number of Gaussian noise samples $( m )$ , we only sample a single noise sample with the average√ energy over $\mathcal { D }$ . That is, we sample a single $\mathbf { n }$ of norm $\mathbf { \bar { \mathbf { \rho } } } _ { \| \mathbf { n } \| _ { 2 } } = \mathbf { \bar { \sigma } } \sigma _ { x } \sqrt { n }$ . This is due to the fact that
|
| 90 |
+
|
| 91 |
+
Experimental Setup. In this section, we demonstrate the effectiveness of the proposed regularizer in improving robustness. Several experiments are performed with our objective Equation 2, where we strike a comparison with data augmentation approaches.
|
| 92 |
+
|
| 93 |
+
Architecture Details. The input images in MNIST (gray-scale) and CIFAR (colored) are squares with sides equal to 28 and 32, respectively. Since AlexNet was originally trained on ImageNet of sides equal to 224, we will marginally alter the implementation of AlexNet in TorchVision Marcel & Rodriguez (2010) to accommodate for this difference. First, we change the number of hidden units in the first fully-connected layer (in LeNet to 4096, AlexNet to 256, LeNet on MNIST to 3136). For AlexNet, we changed all pooling kernel sizes from 3 to 2 and the padding size of conv1 from 2 to 5. Second, we swapped each maxpool with the preceding ReLU, which makes training and inference more efficient. Third, we enforce that the first layer in all the models is a convolution followed by ReLU as discussed earlier. Lastly, to simplify analysis, we removed all dropout layers. We leave the details of the optimization hyper-parameters to the appendix.
|
| 94 |
+
|
| 95 |
+

|
| 96 |
+
Figure 3: Fair robustness comparison of LeNet with data augmentation and our regularizer. We only report results for models with a test accuracy that is at least as good as the accuracy of the baseline with a tolerance: $0 \%$ , $0 . 3 9 \%$ , and $0 . 7 5 \%$ for MNIST, CIFAR10, CIFAR100, respectively. Only the models with the highest robustness are presented. Training with our regularizer can attain similar/better robustness than 21-fold noisy data augmentation on MNIST and CIFAR100, while maintaining a high noise-free test accuracy.
|
| 97 |
+
|
| 98 |
+
Results. For each model and dataset, we compare baseline models, i.e. models trained with noisefree data and without our regularization, with two others: one using data augmentation and another using our proposed regularizer. Each of the latter has two configurable variables: the level of noise controlled by $\textstyle { \mathcal { \sigma } } _ { x } ^ { 2 }$ during training, and the amount of noise controlled by the trade-off coefficient $\alpha$ in Equation 2 or $\tilde { N }$ (number of added noisy training examples) in the case of augmentation.
|
| 99 |
+
|
| 100 |
+
Accuracy vs. Robustness. We start by demonstrating that data augmentation tends to improve the robustness, as captured by $\Re ( \mathcal { T } )$ over the test set, at the expense of decreasing the testing accuracy on the noise-free examples. Realizing this is essential for a fair comparison, as one would need to compare the robustness of networks that only have similar noise-free testing accuracies. To this end, we ran 60 training experiments with data augmentation on LeNet with three datasets (MNIST, CIFAR10, and CIFAR100), four augmentation levels $( \tilde { N } \in \{ 2 , 6 , 1 1 , 2 1 \} )$ , and five noise levels $( \sigma _ { x } \in \mathcal { A } = \{ 0 . 1 2 5 , 0 . 2 5 , 0 . 3 2 5 , 0 . 5 , 1 . 0 \} )$ . In contrast, we ran robust training experiments using Equation 2 with the trade-off coefficient $\overset { \cdot } { \alpha } \in \{ 0 . 5 , 1 , 1 . 5 , 2 , 5 , 1 0 , 2 0 \}$ on the same datasets, but we extended the noise levels $\sigma _ { x }$ to include the extreme noise regime of $\sigma _ { x } \in \{ 2 , 5 , 1 0 , 2 0 \}$ . These noise levels are too large to be used for data augmentation, especially since $\mathbf { x } \in [ 0 , 1 ] ^ { n }$ ; however, as we will see, they are still beneficial for our proposed regularizer. Figure 2 shows both the testing accuracy and robustness as measured by $\Re ( \mathcal { T } )$ over a varying range of training $\sigma _ { x }$ for the data augmentation approach of LeNet on MNIST, CIFAR-10 and CIFAR-100. It is important to note here that the main goal of these plots is not to compare the robustness score, but rather, to demonstrate a very important trend. In particular, increasing the training $\sigma _ { x }$ for each approach degrades testing accuracy on noise-free data. However, the degradation in our approach is much more graceful since the trained LeNet model was never directly exposed to individually corrupted examples during training as opposed to the data augmentation approach. Note that our regularizer enforces the separation between the expected output prediction analytically. Moreover, the robustness of both methods consistently improves as the training $\sigma _ { x }$ increases. This trend holds even on the easiest dataset (MNIST). Interestingly, models trained with our regularizer enjoy an improvement in testing accuracy over the baseline model. Such behaviour only emerges with a large factor of augmentation, $\tilde { N } = 2 \bar { 1 }$ , and a small enough training $\sigma _ { x }$ on MNIST. This indicates that models can benefit from better accuracy with a good approximation of Equation 1 through our proposed objective or through extensive Monte Carlo estimation. However, as $\underset { \cdots } { \sigma } { _ { x } }$ increases, Monte Carlo estimates of the second term in Equation 1 via data augmentation (with $\ddot { N } = 2 1$ ) is no longer enough to capture the noise.
|
| 101 |
+
|
| 102 |
+
Robustness Comparison. For fair comparison, it is essential to only compare the robustness of networks that achieve similar testing accuracy, since perfect robustness is attainable with a deterministic classifier that assigns the same class label regardless of the input. In fact, we proposed a unified robustness metric for the reason that most commonly used metrics are disassociated from
|
| 103 |
+
|
| 104 |
+
<table><tr><td></td><td>g</td><td>PGD</td><td>LBFGS</td><td>FGSM</td><td>DF2</td><td>GNR</td><td>ACC</td></tr><tr><td rowspan="6">EE nenen JSINW</td><td>0</td><td>1.02 × 10-03</td><td>5.50×10-04</td><td>2.24×10-02</td><td>5.91×10-04</td><td>77.45</td><td>98.50</td></tr><tr><td>0.125</td><td>3.36×10-01</td><td>3.43×10-01</td><td>8.19 ×10-01</td><td>2.05×10-01</td><td>93.14</td><td>97.50</td></tr><tr><td>0.250</td><td>4.58×10-01</td><td>4.31×10-01</td><td>1.21</td><td>2.63×10-01</td><td>95.64</td><td>98.75</td></tr><tr><td>0.325</td><td>4.21×10-01</td><td>4.51 ×10-01</td><td>1.17</td><td>2.33×10-01</td><td>96.75</td><td>97.50</td></tr><tr><td>1.0</td><td>5.44×10-01</td><td>5.22×10-01</td><td>1.34</td><td>2.95×10-01</td><td>97.32</td><td>99.00</td></tr><tr><td></td><td></td><td></td><td>-05</td><td></td><td></td><td></td></tr><tr><td rowspan="5">A neeae CEITIIIO</td><td>0</td><td>2.30×10-05</td><td>2.50 × 10-05</td><td>1.50 ×10</td><td>2.10×10-05</td><td>29.69</td><td>34.75</td></tr><tr><td>0.12</td><td>3.64×10-04</td><td>2.83×10-04</td><td>5.06×10-04</td><td>2.16×10-04</td><td>31.65</td><td>33.50</td></tr><tr><td>0.250</td><td>4.37 ×10-04</td><td>3.86×10-04</td><td>6.50×10-04</td><td>2.47×10-04</td><td>32.85</td><td>32.25</td></tr><tr><td>0.325</td><td>5.37×10-04</td><td>4.04×10-04</td><td>7.29 ×10-04</td><td>3.18×10-04</td><td>33.84</td><td>34.25</td></tr><tr><td>1.0</td><td>4.92×10-04</td><td>3.26×10-04</td><td>6.50×10-04</td><td>2.85×10-04</td><td>34.65</td><td>35.50</td></tr></table>
|
| 105 |
+
|
| 106 |
+
Table 1: Gaussian robustness improves overall robustness. We report the robustness metrics corresponding to various attacks (PGD, LBFGS, FGSM, and DF2), our proposed GNR metric, and the test accuracy ACC for LeNet and AlexNet networks trained on MNIST and CIFAR100 using our proposed regularizer with noise variance $\sigma$ in training. Note that $\sigma = 0$ corresponds to baseline models trained without our regularizer. We observe that training networks with our proposed regularizer (designed for additive Gaussian attacks) not only improves the robustness against Gaussian attacks but also against 6 other types of attacks which 4 of them listed here and the others are left for appendix.
|
| 107 |
+
|
| 108 |
+
the ground-truth labels and only consider model predictions. Therefore, we filtered out the results from Figure 2 by removing all the experiments that achieved lower test accuracy than the baseline model. Figure 3 summarizes these results for LeNet. Now, we can clearly see the difference between training with data augmentation and our approach. For MNIST (Figure 3a), we achieved the same robustness as 21-fold data augmentation without feeding the network with any noisy examples during training and while preserving the same baseline accuracy. Interestingly, for CIFAR10 (Figure 3b), our method is twice as robust as the best robustness achieved via data augmentation. Moreover, for CIFAR100 (Figure 3c), we are able to outperform data augmentation by around $5 \%$ . Finally, for extra validation, we also conducted the same experiments with AlexNet on CIFAR10 and CIFAR100 which can be found in the appendix. We can see that our proposed regularizer can improve robustness by $1 5 \%$ on CIFAR10 and around $2 5 \%$ on CIFAR100. It is interesting to note that for CIFAR10, data augmentation could not improve the robustness of the trained models without drastically degrading the testing accuracy on the noise-free examples. Moreover, it is interesting to observe that the best robustness achieved through data augmentation is even worse than the baseline. This could be due to the trade-off coefficient $\alpha$ in Equation 1.
|
| 109 |
+
|
| 110 |
+
Towards General Robustness via Gaussian Robustness. Here, we investigate whether improving robustness to Gaussian input noise can improve robustness against other types of attacks. Specifically, we compare the robustness of models trained using our proposed regularizer (robust again Gaussian attacks) with baseline models subject to different types of attacks: Projected Gradient Descent (PGD) and LBFGS attacks Szegedy et al. (2014), Fast Sign Gradient Method (FGSM) Goodfellow et al. (2015), and DeepFool L2Attack (DF2) Moosavi-Dezfooli et al. (2016) as provide by Rauber et al. (2017). For all these attacks, we report the minimum energy perturbation that can change the network prediction. We also report our Gaussian Network Robustness (GNR) metric, which is the Gaussian version of Equation 4 along with the testing accuracy (ACC). We perform experiments on LeNet on MNIST, CIFAR10 and CIFAR100 datasets and on AlexNet on both CIFAR10 and CIFAR100. Due to space constraints, we show the robustness results for only LeNet on MNIST and AlexNet of CIFAR100 and leave the rest along with two other types of attacks for the appendix. Table 1 shows that improving GNR through our data augmentation free regularizer can significantly improve all robustness metrics. For instance, comparing LeNet trained with our proposed regularizer against LeNet trained without any regularization, i.e. $\sigma = 0$ , we see that robustness against all types of attacks improves by almost two orders of magnitude, while maintaining a similar testing accuracy. A similar improvement in performance is consistently present for AlexNet on CIFAR100.
|
| 111 |
+
|
| 112 |
+
# 5 CONCLUSION
|
| 113 |
+
|
| 114 |
+
Addressing the sensitivity problem of deep neural networks to adversarial perturbation is of great importance to the machine learning community. However, building robust classifiers against this noises is computationally expensive, as it is generally done through the means of data augmentation. We propose a generic lightweight analytic regularizer, which can be applied to any deep neural network with a ReLU activation after the first affine layer. It is designed to increase the robustness of the trained models under additive Gaussian noise. We demonstrate this with multiple architectures and datasets and show that it outperforms data augmentation without observing any noisy examples.
|
| 115 |
+
|
| 116 |
+
# REFERENCES
|
| 117 |
+
|
| 118 |
+
Christof Angermueller, Tanel Parnamaa, Leopold Parts, and Oliver Stegle. Deep learning for com- ¨ putational biology. Molecular Systems Biology, 2016.
|
| 119 |
+
|
| 120 |
+
Adel Bibi, Modar Alfadly, and Bernard Ghanem. Analytic expressions for probabilistic moments of pl-dnn with gaussian input. In Computer Vision and Patter Recognition Conference (CVPR18), 2018.
|
| 121 |
+
|
| 122 |
+
Akhilan Boopathy, Tsui-Wei Weng, Pin-Yu Chen, Sijia Liu, and Luca Daniel. Cnn-cert: An efficient framework for certifying robustness of convolutional neural networks. In Association for the Advancement of Artificial Intelligence (AAAI19), 2019.
|
| 123 |
+
|
| 124 |
+
Moustapha Cisse, Piotr Bojanowski, Edouard Grave, Yann Dauphin, and Nicolas Usunier. Parseval networks: Improving robustness to adversarial examples. In International Conference on Machine Learning (ICML17), 2017.
|
| 125 |
+
|
| 126 |
+
Alhussein Fawzi, Seyed Mohsen Moosavi Dezfooli, and Pascal Frossard. The robustness of deep networks - a geometric perspective. IEEE Signal Processing Magazine, 2017a.
|
| 127 |
+
|
| 128 |
+
Alhussein Fawzi, Seyed-Mohsen Moosavi-Dezfooli, Pascal Frossard, and Stefano Soatto. Classification regions of deep neural networks. CoRR, 2017b.
|
| 129 |
+
|
| 130 |
+
Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Analysis of classifiers’ robustness to adversarial perturbations. Machine Learning, 2018.
|
| 131 |
+
|
| 132 |
+
Reuben Feinman, Ryan R Curtin, Saurabh Shintre, and Andrew B Gardner. Detecting adversarial samples from artifacts. CoRR, 2017.
|
| 133 |
+
|
| 134 |
+
Jean-Yves Franceschi, Alhussein Fawzi, and Omar Fawzi. Robustness of classifiers to uniform $\ell _ { p }$ and gaussian noise. Proceedings of Machine Learning Research (PMLR18), 2018.
|
| 135 |
+
|
| 136 |
+
Justin Gilmer, Luke Metz, Fartash Faghri, Samuel S Schoenholz, Maithra Raghu, Martin Wattenberg, and Ian Goodfellow. Adversarial spheres. CoRR, 2018.
|
| 137 |
+
|
| 138 |
+
Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. International Conference on Learning Representations (ICLR15), 2015.
|
| 139 |
+
|
| 140 |
+
Kathrin Grosse, Praveen Manoharan, Nicolas Papernot, Michael Backes, and Patrick McDaniel. On the (statistical) detection of adversarial examples. CoRR, 2017.
|
| 141 |
+
|
| 142 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Computer Vision and Patter Recognition Conference (CVPR16), 2016.
|
| 143 |
+
|
| 144 |
+
Geoffrey Hinton, Li Deng, Dong Yu, George E Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 2012.
|
| 145 |
+
|
| 146 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. International Conference on Learning Representations (ICLR15), 2015.
|
| 147 |
+
|
| 148 |
+
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009.
|
| 149 |
+
|
| 150 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Conference on Neural Information Processing Systems (NeurIPS12), 2012.
|
| 151 |
+
|
| 152 |
+
Yann LeCun. The mnist database of handwritten digits. http://yann. lecun. com/exdb/mnist/, 1998.
|
| 153 |
+
|
| 154 |
+
Yann LeCun, Patrick Haffner, Leon Bottou, and Yoshua Bengio. Object recognition with gradient- ´ based learning. Shape, contour and grouping in computer vision, 1999.
|
| 155 |
+
|
| 156 |
+
Xin Li and Fuxin Li. Adversarial examples detection in deep networks with convolutional filter statistics. In International Conference on Computer Vision (ICCV17), 2017.
|
| 157 |
+
|
| 158 |
+
Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Computer Vision and Patter Recognition Conference (CVPR15), 2015.
|
| 159 |
+
|
| 160 |
+
Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. CoRR, 2017.
|
| 161 |
+
|
| 162 |
+
Jiajun Lu, Theerasit Issaranon, and David Forsyth. Safetynet: Detecting and rejecting adversarial examples robustly. In International Conference On Computer Vision (ICCV17), 2017.
|
| 163 |
+
|
| 164 |
+
Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, and Ian Goodfellow. Adversarial autoencoders. In ICLR, 2016.
|
| 165 |
+
|
| 166 |
+
Sebastien Marcel and Yann Rodriguez. Torchvision the machine-vision package of torch. In ´ Proceedings of the 18th ACM International Conference on Multimedia, 2010.
|
| 167 |
+
|
| 168 |
+
Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: A simple and accurate method to fool deep neural networks. In Computer Vision and Patter Recognition Conference (CVPR16), 2016.
|
| 169 |
+
|
| 170 |
+
Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In Computer Vision and Patter Recognition Conference (CVPR17), 2017.
|
| 171 |
+
|
| 172 |
+
Nicolas Papernot, Patrick McDaniel, Xi Wu, Somesh Jha, and Ananthram Swami. Distillation as a defense to adversarial perturbations against deep neural networks. In IEEE Symposium on Security and Privacy (SP16), 2016.
|
| 173 |
+
|
| 174 |
+
Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In Conference on Neural Information Processing Systems Workshops (NeurIPSW17), 2017.
|
| 175 |
+
|
| 176 |
+
Jonas Rauber, Wieland Brendel, and Matthias Bethge. Foolbox v0.8.0: A python toolbox to benchmark the robustness of machine learning models. CoRR, 2017.
|
| 177 |
+
|
| 178 |
+
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 (ICLR14), 2014.
|
| 179 |
+
|
| 180 |
+
Dimitris Tsipras, Shibani Santurkar, Logan Engstrom, Alexander Turner, and Aleksander Madry. Robustness may be at odds with accuracy. stat, 2018.
|
| 181 |
+
|
| 182 |
+
Valentina Zantedeschi, Maria-Irina Nicolae, and Ambrish Rawat. Efficient defenses against adversarial attacks. In ACM Workshop on AI and Security, 2017.
|
| 183 |
+
|
| 184 |
+
Fengyuan Zhu, Guangyong Chen, and Pheng-Ann Heng. From noise modeling to blind image denoising. In Computer Vision and Patter Recognition Conference (CVPR16), 2016.
|
| 185 |
+
|
| 186 |
+
# A EXPERIMENTAL SETUP AND DETAILS.
|
| 187 |
+
|
| 188 |
+
All experiments, are conducted using PyTorch version 0.4.1 Paszke et al. (2017). All hyperparameters are fixed and Table 2 we report the setup for the two optimizers. In particular, we use the Adam optimizaer Kingma & Ba (2015) with $\beta _ { 1 } = 0 . 9 , \beta _ { 2 } = 0 . 9 9 9$ , $\epsilon = 1 0 ^ { \div 8 }$ with amsgrad set to False. The second optimizer is SGD Loshchilov & Hutter (2017) with momentum $\scriptstyle 1 = 0 . 9$ , dampening $= 0$ , with Nesterov acceleration. In each experiment, we randomly split the training dataset into $10 \%$ validation and $90 \%$ training and monitor the validation loss after each epoch. If validation loss did not improve for lr patience epochs, we reduce the learning rate by multiplying it by lr factor. We start with an initial learning rate of lr initial. The training is terminated only if the validation loss did not improve for loss patience number of epochs or if the training reached 100 epochs. We report the results of the model with the best validation loss.
|
| 189 |
+
|
| 190 |
+
Table 2: Lists the training optimization hyper-parameters.
|
| 191 |
+
|
| 192 |
+
<table><tr><td rowspan=1 colspan=6>Hyper-parameter</td><td rowspan=1 colspan=1>LeNet</td><td rowspan=1 colspan=1>AlexNet</td></tr><tr><td rowspan=7 colspan=6>optimizerminibatch_sizelr_initiallr_patiencelr_factorloss-patienceweight_decay</td><td rowspan=1 colspan=1>er</td><td rowspan=1 colspan=1>Adam</td></tr><tr><td rowspan=1 colspan=2>oatch_si2</td><td rowspan=1 colspan=1>e</td><td rowspan=1 colspan=1>1000</td><td rowspan=1 colspan=1>128</td></tr><tr><td rowspan=1 colspan=1>0.0001</td><td rowspan=1 colspan=1>0.1</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>5</td></tr><tr><td rowspan=1 colspan=1>0.9</td><td rowspan=1 colspan=1>0.5</td></tr><tr><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>20</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0.0005</td></tr></table>
|
| 193 |
+
|
| 194 |
+
# B EXAMPLES ON NOISE LEVELS
|
| 195 |
+
|
| 196 |
+
Figure 4 provides examples of the different levels of noise on a given digit 8.
|
| 197 |
+
|
| 198 |
+

|
| 199 |
+
Figure 4: This Figure shows an example of the noise level over varying level of input $\sigma$ on the digit 8. In particular, one can observe that with $\sigma$ large than 0.7 the among of noise is severe even for the human level. Training on such extreme noise levels will deem data augmentation to be difficult.
|
| 200 |
+
|
| 201 |
+
# C A COMMENT ON THE ROBUSTNESS METRIC
|
| 202 |
+
|
| 203 |
+
We measure the robustness against Gaussian noise by averaging over a range of input noise levels, where at each level for each image, we consider it misclassified if the probability of it being misclassified is greater than a certain threshold. The final robustness is the average over multiple testing $\sigma _ { x }$ . This is special case of the more general case in Equation (4). We then report the area under the curve of the robustness with varying testing $\sigma _ { x }$ as shown in Figure 6. The area under this curve thus represents the overall robustness of a given model under several varying input noise standard deviation $\sigma _ { x }$ .
|
| 204 |
+
|
| 205 |
+
# D OTHER ROBUSTNESS METRICS
|
| 206 |
+
|
| 207 |
+
We report the robustness of several architectures over several datasets with and without our trained regularizer. We show that our proposed efficient regularizer not only improves the robustness against Gaussin noise attacks but againts several other types of attacks. Table 3 summarizes the types of attacks used for robustness evaluation.
|
| 208 |
+
|
| 209 |
+

|
| 210 |
+
Figure 5: The robustness is a function of the ratio of the orange area to the blue area in the white circle.
|
| 211 |
+
|
| 212 |
+

|
| 213 |
+
Figure 6: The robustness is thus measured as the area under the curve of testing accuracy versus input noise level (standard deviation).
|
| 214 |
+
|
| 215 |
+

|
| 216 |
+
Figure 7: Fair robustness comparison of AlexNet with data augmentation and our regularizer. The reported models trained with our regularizer on CIFAR10 and CIFAR100 on all training $\sigma _ { x }$ are within $1 . 6 8 \%$ and $4 . 8 3 \%$ of the baseline accuracy, respectively. The models trained with the proposed regularizer achieve better robustness than 11-fold and 6-fold noisy data augmentation on CIFAR10 and CIFAR100, respectively.
|
| 217 |
+
|
| 218 |
+
Table 3: The table lists all the attacks performed.
|
| 219 |
+
|
| 220 |
+
<table><tr><td>Attack Abbreviation</td><td>AttackName</td></tr><tr><td>PGD LBF</td><td>Projected Gradient Descent</td></tr><tr><td>GSM</td><td>LBFGS Attack FGSM</td></tr><tr><td>AGA</td><td>Additive Gaussian Noise Attack</td></tr><tr><td>AUA</td><td>AdditiveUniformNoiseAttack</td></tr><tr><td>DF2</td><td>DeepFool l2 Attack</td></tr></table>
|
| 221 |
+
|
| 222 |
+
<table><tr><td rowspan=1 colspan=1>ACC</td><td rowspan=1 colspan=1>09'86598609:2600'66</td><td rowspan=1 colspan=1>30.99122255</td><td rowspan=1 colspan=1>78.285850358398986860</td><td rowspan=1 colspan=1>730:2900'2930.5506'99</td><td rowspan=1 colspan=1>3530322533550</td></tr><tr><td rowspan=1 colspan=1>GNN</td><td rowspan=1 colspan=1>24225317599657326</td><td rowspan=1 colspan=1>2077800039.2031405</td><td rowspan=1 colspan=1>E87242706:00</td><td rowspan=1 colspan=1>353105098.29</td><td rowspan=1 colspan=1>696753368505820953</td></tr><tr><td rowspan=1 colspan=1>P</td><td rowspan=1 colspan=1>10-01X169 10-01X89710-01038720-01 X067</td><td rowspan=1 colspan=1>£0-013£0-0011X591 11×590×86[</td><td rowspan=1 colspan=1>×1333 ×81I15</td><td rowspan=1 colspan=1>8</td><td rowspan=1 colspan=1>0 10-0I X 81820-0131801 X917</td></tr><tr><td rowspan=1 colspan=1>AAA</td><td rowspan=1 colspan=1>20-01 X 65780%68333</td><td rowspan=1 colspan=1>10-0I X 66'910-0I X08°2 1</td><td rowspan=1 colspan=1>10-01 × 00'910-0I X 9694443</td><td rowspan=1 colspan=1>10-0I X86*210-01 X278</td><td rowspan=1 colspan=1>10-01 X39110-01X107</td></tr><tr><td rowspan=1 colspan=1>AAA</td><td rowspan=1 colspan=1>20-01 X 8975737</td><td rowspan=1 colspan=1>£0-01X29710-01 X82'910-0I X 26210-0I × ∠9'990'[</td><td rowspan=1 colspan=1>10-01 X 90'9I0-0IX80'9TO-OI×1</td><td rowspan=1 colspan=1>10-0I X892</td><td rowspan=1 colspan=1>20-013335 10-0I X 66T</td></tr><tr><td rowspan=1 colspan=1>SSS</td><td rowspan=1 colspan=1>20-012710-0I X 61'81215184</td><td rowspan=1 colspan=1>£0-0I X291 20-012755</td><td rowspan=1 colspan=1>25-21225035-213250XI67</td><td rowspan=1 colspan=1>0- 20-0IX58%2133508</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>ERT</td><td rowspan=1 colspan=1>10-011000 10-01X 11110-01X 111</td><td rowspan=1 colspan=1>90-013830 20-01100030--0[ × 99'[</td><td rowspan=1 colspan=1>£0-01 X 79.011-111150 £0-11 3 39:51</td><td rowspan=1 colspan=1>10-05[1 70</td><td rowspan=1 colspan=1>10- 50-013 950233 330</td></tr><tr><td rowspan=1 colspan=1>PPG</td><td rowspan=1 colspan=1>£0-01X70110-0I X89510-01X110-01X1</td><td rowspan=1 colspan=1>90-01X218 20-11270 20-113330</td><td rowspan=1 colspan=1>90-01X2£0-01 X 22720-010580£0-01 X 9555</td><td rowspan=1 colspan=1>10-111105</td><td rowspan=1 colspan=1>20-01X005 10-0132210-111 2304-11 1 76.5</td></tr><tr><td rowspan=1 colspan=1>b</td><td rowspan=1 colspan=1>10500000976001</td><td rowspan=1 colspan=1>10110000970001</td><td rowspan=1 colspan=1>0051297600</td><td rowspan=1 colspan=1>00509760</td><td rowspan=1 colspan=1>10000801</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>LSINNuoGNe</td><td rowspan=1 colspan=1>01TIITuo</td><td rowspan=1 colspan=1>00ICTIAITuoGNe</td><td rowspan=1 colspan=1>CIIIIIIuoJEere</td><td rowspan=1 colspan=1>001CTIAITuo</td></tr></table>
|
| 223 |
+
|
| 224 |
+
corresponds to baseline models trained without our regularizer. We observe that training networks with our proposed reg
|
md/train/BJxhijAcY7/BJxhijAcY7.md
ADDED
|
@@ -0,0 +1,543 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SIGNSGD WITH MAJORITY VOTE IS COMMUNICATION EFFICIENT AND FAULT TOLERANT
|
| 2 |
+
|
| 3 |
+
Jeremy Bernstein1∗, Jiawei Zhao12∗, Kamyar Azizzadenesheli3, Anima Anandkumar1 1Caltech, 2Nanjing University of Aeronautics and Astronautics, 3UC Irvine bernstein@caltech.edu, jiaweizhao@nuaa.edu.cn, kazizzad@uci.edu, anima@caltech.edu
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Training neural networks on large datasets can be accelerated by distributing the workload over a network of machines. As datasets grow ever larger, networks of hundreds or thousands of machines become economically viable. The time cost of communicating gradients limits the effectiveness of using such large machine counts, as may the increased chance of network faults. We explore a particularly simple algorithm for robust, communication-efficient learning—SIGNSGD. Workers transmit only the sign of their gradient vector to a server, and the overall update is decided by a majority vote. This algorithm uses $3 2 \times$ less communication per iteration than full-precision, distributed SGD. Under natural conditions verified by experiment, we prove that SIGNSGD converges in the large and mini-batch settings, establishing convergence for a parameter regime of ADAM as a byproduct. Aggregating sign gradients by majority vote means that no individual worker has too much power. We prove that unlike SGD, majority vote is robust when up to $50 \%$ of workers behave adversarially. The class of adversaries we consider includes as special cases those that invert or randomise their gradient estimate. On the practical side, we built our distributed training system in Pytorch. Benchmarking against the state of the art collective communications library (NCCL), our framework—with the parameter server housed entirely on one machine—led to a $2 5 \%$ reduction in time for training resnet50 on Imagenet when using 15 AWS $\mathtt { p 3 . 2 x 1 }$ arge machines.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
The most powerful supercomputer in the world is currently a cluster of over 27,000 GPUs at Oak Ridge National Labs (TOP500, 2018). Distributed algorithms designed for such large-scale systems typically involve both computation and communication: worker nodes compute intermediate results locally, before sharing them with their peers. When devising new machine learning algorithms for distribution over networks of thousands of workers, we posit the following desiderata:
|
| 12 |
+
|
| 13 |
+
D1 fast algorithmic convergence; D3 communication efficiency;
|
| 14 |
+
D2 good generalisation performance; D4 robustness to network faults.
|
| 15 |
+
|
| 16 |
+
When seeking an algorithm that satisfies all four desiderata D1–4, inevitably some tradeoff must be made. Stochastic gradient descent (SGD) naturally satisfies D1–2, and this has buoyed recent advances in deep learning. Yet when it comes to large neural network models with hundreds of millions of parameters, distributed SGD can suffer large communication overheads. To make matters worse, any faulty SGD worker can corrupt the entire model at any time by sending an infinite gradient, meaning that SGD without modification is not robust.
|
| 17 |
+
|
| 18 |
+
A simple algorithm with aspirations towards all desiderata D1–4 is as follows: workers send the sign of their gradient up to the parameter server, which aggregates the signs and sends back only the majority decision. We refer to this algorithm as SIGNSGD with majority vote. All communication to and from the parameter server is compressed to one bit, so the algorithm certainly gives us D3. What’s more, in deep learning folklore sign based methods are known to perform well, indeed inspiring the popular RMSPROP and ADAM optimisers (Balles & Hennig, 2018), giving hope for D1. As far as robustness goes, aggregating gradients by a majority vote denies any individual worker too much power, suggesting it may be a natural way to achieve D4.
|
| 19 |
+
|
| 20 |
+

|
| 21 |
+
Figure 1: Toy experiments. SIGNSGD with majority vote is run on a 1000-dimensional quadratic with $\mathcal { N } ( 0 , 1 )$ noise added to each gradient component. Adversarial experiments are run with 27 total workers. These plots may be reproduced in a web browser by running this Jupyter notebook.
|
| 22 |
+
|
| 23 |
+
In this work, we make the above aspirations rigorous. Whilst D3 is immmediate, we provide the first convergence guarantees for SIGNSGD in the mini-batch setting, providing theoretical grounds for D1. We show how theoretically the behaviour of SIGNSGD changes as gradients move from high to low signal-to-noise ratio. We also extend the theory of majority vote to show that it achieves a notion of Byzantine fault tolerance. A distributed algorithm is Byzantine fault tolerant (Blanchard et al., 2017) if its convergence is robust when up to $50 \%$ of workers behave adversarially. The class of adversaries we consider contains interesting special cases, such as robustness to a corrupted worker sending random bits, or a worker that inverts their gradient estimate. Though our adversarial model is not the most general, it is interesting as a model of network faults, and so gives us D4.
|
| 24 |
+
|
| 25 |
+
Next, we embark on a large-scale empirical validation of our theory. We implement majority vote in the Pytorch deep learning framework, using CUDA kernels to bit pack sign tensors down to one bit. Our results provide experimental evidence for D1–D4. Comparing our framework to NCCL (the state of the art communications library), we were able to speed up Imagenet training by $2 5 \%$ when distributing over 7 to 15 AWS p3.2xlarge machines, albeit at a slight loss in generalisation.
|
| 26 |
+
|
| 27 |
+
Finally, in an interesting twist, the theoretical tools we develop may be brought to bear on a seemingly unrelated problem in the machine learning literature. Reddi et al. (2018) proved that the extremely popular ADAM optimiser in general does not converge in the mini-batch setting. This result belies the success of the algorithm in a wide variety of practical applications. SIGNSGD is equivalent to a special case of ADAM, and we establish the convergence rate of mini-batch SIGNSGD for a large class of practically realistic objectives. Therefore, we expect that these tools should carry over to help understand the success modes of ADAM. Our insight is that gradient noise distributions in practical problems are often unimodal and symmetric because of the Central Limit Theorem, yet Reddi et al. (2018)’s construction relies on bimodal noise distributions.
|
| 28 |
+
|
| 29 |
+
# 2 RELATED WORK
|
| 30 |
+
|
| 31 |
+
For decades, neural network researchers have adapted biologically inspired algorithms for efficient hardware implementation. Hopfield (1982), for example, considered taking the sign of the synaptic weights of his memory network for readier adaptation into integrated circuits. This past decade, neural network research has focused on training feedforward networks by gradient descent (LeCun et al., 2015). It is natural to ask what practical efficiency may accompany simply taking the sign of the backpropagated gradient. In this section, we explore related work pertaining to this question.
|
| 32 |
+
|
| 33 |
+
Deep learning: whilst stochastic gradient descent (SGD) is the workhorse of machine learning (Robbins & Monro, 1951), algorithms like RMSPROP (Tieleman & Hinton, 2012) and ADAM (Kingma & Ba, 2015) are also extremely popular neural net optimisers. These algorithms have their roots in the RPROP optimiser (Riedmiller & Braun, 1993), which is a sign-based method similar to SIGNSGD except for a component-wise adaptive learning rate.
|
| 34 |
+
|
| 35 |
+
<table><tr><td>Algorithm 1 SIGNUM with majority vote,the proposed algorithm for distributed optimisation. Good default setings for the tested machine learning problems are n = 0.Oool and β = O.9, though tuning is recommended.All operations on vectors are element-wise. Settng β = O yields SIGNSGD.</td></tr><tr><td>Require: learning rate n > O, momentum constant β ∈ [0,1),weight decay 入 ≥ 0, mini-batch size n,initial point x held by each of M workers,initial momentum Um ← O on mth worker</td></tr><tr><td>repeat on mth worker</td></tr><tr><td>gm← 1 stochasticGradient(x) >mini-batch gradient n i=1</td></tr><tr><td>Um↑ (1-β)gm+βvm >update momentum push sign(Um) to server > send sign momentum</td></tr><tr><td>on server M</td></tr><tr><td>V← sign(Um) V aggregate sign momenta m push sign(V) to each worker 二 >broadcast majority vote</td></tr><tr><td>on every worker</td></tr><tr><td>x←x-n(sign(V)+入x) > update parameters</td></tr><tr><td>until convergence</td></tr><tr><td></td></tr></table>
|
| 36 |
+
|
| 37 |
+
Non-convex optimisation: parallel to (and oftentimes in isolation from) advances in deep learning practice, a sophisticated optimisation literature has developed. Nesterov & Polyak (2006) proposed cubic regularisation as an algorithm that can escape saddle points and provide guaranteed convergence to local minima of non-convex functions. This has been followed up by more recent works such as NATASHA (Allen-Zhu, 2017) that use other theoretical tricks to escape saddle points. It is still unclear how relevant these works are to deep learning, since it is not clear to what extent saddle points are an obstacle in practical problems. We avoid this issue altogether and satisfy ourselves with establishing convergence to critical points.
|
| 38 |
+
|
| 39 |
+
Gradient compression: prior work on gradient compression generally falls into two camps. In the first camp, algorithms like QSGD (Alistarh et al., 2017), TERNGRAD (Wen et al., 2017) and ATOMO (Wang et al., 2018) use stochastic quantisation schemes to ensure that the compressed stochastic gradient remains an unbiased approximation to the true gradient. These works are therefore able to bootstrap existing SGD convergence theory. In the second camp, more heuristic algorithms like 1BITSGD (Seide et al., 2014) and deep gradient compression (Lin et al., 2018) pay less attention to theoretical guarantees and focus more on practical performance. These algorithms track quantisation errors and feed them back into subsequent updates. The commonality between the two camps is an effort to, one way or another, correct for bias in the compression.
|
| 40 |
+
|
| 41 |
+
SIGNSGD with majority vote takes a different approach to these two existing camps. In directly employing the sign of the stochastic gradient, the algorithm unabashedly uses a biased approximation of the stochastic gradient. Carlson et al. (2016) and Bernstein et al. (2018) provide theoretical and empirical evidence that signed gradient schemes can converge well in spite of their biased nature. Their theory only applies in the large batch setting, meaning the theoretical results are less relevant to deep learning practice. Still Bernstein et al. (2018) showed promising experimental results in the mini-batch setting. An appealing feature of majority vote is that it naturally leads to compression in both directions of communication between workers and parameter server. As far as we are aware, all existing gradient compression schemes lose compression before scattering results back to workers.
|
| 42 |
+
|
| 43 |
+
Byzantine fault tolerant optimisation: the problem of modifying SGD to make it Byzantine fault tolerant has recently attracted interest in the literature (Yin et al., 2018). For example, Blanchard et al. (2017) proposed KRUM, which operates by detecting and excluding outliers in the gradient aggregation. Alistarh et al. (2018) propose BYZANTINESGD which instead focuses on detecting and eliminating adversaries. Clearly both these strategies incur overheads, and eliminating adversaries precludes the possibility that they might reform. El Mhamdi et al. (2018) point out that powerful adversaries may steer convergence to bad local minimisers. We see majority vote as a natural way to protect against less malign faults such as network errors, and thus satisfy ourselves with convergence guarantees to critical points without placing guarantees on their quality.
|
| 44 |
+
|
| 45 |
+

|
| 46 |
+
Figure 2: Gradient distributions for resnet18 on Cifar-10 at mini-batch size 128. At the start of epochs 0, 1 and 5, we do a full pass over the data and collect the gradients for three randomly chosen weights (left, middle, right). In all cases the distribution is close to unimodal and symmetric.
|
| 47 |
+
|
| 48 |
+
# 3 THEORY
|
| 49 |
+
|
| 50 |
+
# 3.1 ASSUMPTIONS
|
| 51 |
+
|
| 52 |
+
We aim to develop an optimisation theory that is relevant for real problems in deep learning. For this reason, we are careful about the assumptions we make. For example, we do not assume convexity because neural network loss functions are typically not convex. Though we allow our objective function to be non-convex, we insist on a lower bound to enable meaningful convergence results.
|
| 53 |
+
|
| 54 |
+
Assumption 1 (Lower bound). For all $x$ and some constant $f ^ { * }$ , we have objective value $f ( x ) \geq f ^ { * }$
|
| 55 |
+
|
| 56 |
+
Our next two assumptions of Lipschitz smoothness and bounded variance are standard in the stochastic optimisation literature (Allen-Zhu, 2017). That said, we give them in a component-wise form. This allows our convergence results to encode information not just about the total noise level and overall smoothness, but also about how these quantities are distributed across dimension.
|
| 57 |
+
|
| 58 |
+
Assumption 2 (Smooth). Let $g ( x )$ denote the gradient of the objective $f ( . )$ evaluated at point $x$ . Then $\forall x , y$ we require that for some non-negative constant $\vec { L } : = [ L _ { 1 } , . . . , L _ { d } ]$
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
\Big | f ( y ) - \big [ f ( x ) + g ( x ) ^ { T } ( y - x ) \big ] \Big | \leq \frac { 1 } { 2 } \sum _ { i } L _ { i } ( y _ { i } - x _ { i } ) ^ { 2 } .
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
Assumption 3 (Variance bound). Upon receiving query $x \in \mathbb { R } ^ { d }$ , the stochastic gradient oracle gives us an independent, unbiased estimate $\tilde { g }$ that has coordinate bounded variance:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\begin{array} { r } { \mathbb { E } [ \tilde { g } ( x ) ] = g ( x ) , \qquad \mathbb { E } \left[ ( \tilde { g } ( x ) _ { i } - g ( x ) _ { i } ) ^ { 2 } \right] \leq \sigma _ { i } ^ { 2 } } \end{array}
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
for a vector of non-negative constants $\vec { \sigma } : = [ \sigma _ { 1 } , . . , \sigma _ { d } ]$ .
|
| 71 |
+
|
| 72 |
+
Our final assumption is non-standard. We assume that the gradient noise is unimodal and symmetric. Clearly, Gaussian noise is a special case. Note that even for a moderate mini-batch size, we expect the central limit theorem to kick in rendering typical gradient noise distributions close to Gaussian. See Figure 2 for noise distributions measured whilst training resnet18 on Cifar-10.
|
| 73 |
+
|
| 74 |
+
Assumption 4 (Unimodal, symmetric gradient noise). At any given point $x$ , each component of the stochastic gradient vector $\tilde { g } ( x )$ has a unimodal distribution that is also symmetric about the mean.
|
| 75 |
+
|
| 76 |
+
Showing how to work with this assumption is a key theoretical contribution of this work. Combining Assumption 4 with an old tail bound of Gauss (1823) yields Lemma 1, which will be crucial for guaranteeing mini-batch convergence of SIGNSGD. As will be explained in Section 3.3, this result also constitutes a convergence proof for a parameter regime of ADAM. This suggests that Assumption 4 may more generally be a theoretical fix for Reddi et al. (2018)’s non-convergence proof of mini-batch ADAM, a fix which does not involve modifying the ADAM algorithm itself.
|
| 77 |
+
|
| 78 |
+

|
| 79 |
+
Figure 3: Signal-to-noise ratio (SNR) whilst training resnet18 on Cifar-10 at batch size 128. At the start of each epoch we compute the SNR for every gradient component. We plot summary statistics like the mean over weights and the max. By roughly epoch 40, all gradient components have passed below the critical line (see Theorem 1) and remain there for the rest of training.
|
| 80 |
+
|
| 81 |
+
# 3.2 MINI-BATCH CONVERGENCE OF SIGNSGD
|
| 82 |
+
|
| 83 |
+
With our assumptions in place, we move on to presenting our theoretical results, which are all proved in Appendix C. Our first result establishes the mini-batch convergence behaviour of SIGNSGD. We will first state the result and make some remarks. We provide intuition for the proof in Section 3.3.
|
| 84 |
+
|
| 85 |
+
Theorem 1 (Non-convex convergence rate of mini-batch SIGNSGD). Run the following algorithm for $K$ iterations under Assumptions $^ { l }$ to $^ { 4 }$ : $x _ { k + 1 } = x _ { k } - \eta \mathrm { s i g n } ( \tilde { g } _ { k } )$ . Set the learning rate, $\eta _ { ; }$ , and mini-batch size, $n$ , as
|
| 86 |
+
|
| 87 |
+
$$
|
| 88 |
+
\eta = \sqrt { \frac { f _ { 0 } - f _ { * } } { \| \vec { L } \| _ { 1 } K } } , \qquad n = 1 .
|
| 89 |
+
$$
|
| 90 |
+
|
| 91 |
+
Let $H _ { k }$ be the set of gradient components at step $k$ with large signal-to-noise ratio $\begin{array} { r } { S _ { i } : = \frac { | g _ { k , i } | } { \sigma _ { i } } } \end{array}$ , i.e. $H _ { k } : = { \Big \{ } i { \Big | } S _ { i } > { \frac { 2 } { \sqrt { 3 } } } { \Big \} }$ . We refer to $\textstyle { \frac { 2 } { \sqrt { 3 } } }$ as the ‘critical SNR’. Then we have
|
| 92 |
+
|
| 93 |
+
$$
|
| 94 |
+
\frac { 1 } { K } \sum _ { k = 0 } ^ { K - 1 } \mathbb { E } \left[ \sum _ { i \in { \cal H } _ { k } } \left. g _ { k , i } \right. + \sum _ { i \notin { \cal H } _ { k } } \frac { g _ { k , i } ^ { 2 } } { \sigma _ { i } } \right] \leq 3 \sqrt { \frac { \| \vec { L } \| _ { 1 } ( f _ { 0 } - f _ { * } ) } { N } } .
|
| 95 |
+
$$
|
| 96 |
+
|
| 97 |
+
where $N = K$ is the total number of stochastic gradient calls up to step $K$ .
|
| 98 |
+
|
| 99 |
+
Theorem 1 provides a bound on the average gradient norm. The right hand side of the bound decays like O $\left( \textstyle { \frac { 1 } { \sqrt { N } } } \right)$ , establishing convergence to points of the objective where the gradient vanishes.
|
| 100 |
+
|
| 101 |
+
Remark 1: mini-batch SIGNSGD attains the same O $\scriptstyle \left( { \frac { 1 } { \sqrt { N } } } \right)$ non-convex convergence rate as SGD.
|
| 102 |
+
|
| 103 |
+
Remark 2: the gradient appears as a mixed norm: an $\ell _ { 1 }$ norm for high SNR components, and a weighted $\ell _ { 2 }$ norm for low SNR compoenents.
|
| 104 |
+
|
| 105 |
+
Remark 3: we wish to understand the dimension dependence of our bound. We may simplify matters by assuming that, during the entire course of optimisation, every gradient component lies in the low SNR regime. Figure 3 shows that this is almost true when training a resnet18 model. In this limit, the bound becomes:
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
\frac { 1 } { K } \sum _ { k = 0 } ^ { K - 1 } \mathbb { E } \left[ \sum _ { i = 1 } ^ { d } \frac { g _ { k , i } ^ { 2 } } { \sigma _ { i } } \right] \leq 3 \sqrt { \frac { \| \vec { L } \| _ { 1 } ( f _ { 0 } - f _ { * } ) } { N } } .
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
Further assume that we are in a well-conditioned setting, meaning that the variance is distributed uniformly across dimension $\begin{array} { r } ( \sigma _ { i } ^ { 2 } = \frac { \sigma ^ { 2 } } { d } \ \end{array}$ ), and every weight has the same smoothness constant $\boldsymbol { L } _ { i } =$ $L$ ). $\sigma ^ { 2 }$ is the total variance bound, and $L$ is the conventional Lipschitz smoothness. These are the
|
| 112 |
+
|
| 113 |
+
quantities which appear in the standard analysis of SGD. Then we get
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
\frac { 1 } { K } \sum _ { k = 0 } ^ { K - 1 } \mathbb { E } \| g _ { k } \| _ { 2 } ^ { 2 } \leq 3 \sigma \sqrt { \frac { L ( f _ { 0 } - f _ { * } ) } { N } } .
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
The factors of dimension $d$ have conveniently cancelled. This illustrates that there are problem geometries where mini-batch SIGNSGD does not pick up an unfavourable dimension dependence.
|
| 120 |
+
|
| 121 |
+
# 3.3 THE SUBTLETIES OF MINI-BATCH CONVERGENCE
|
| 122 |
+
|
| 123 |
+
Intuitively, the convergence analysis of SIGNSGD depends on the probability that a given bit of the sign stochastic gradient vector is incorrect, or $\mathbb { P } [ \mathrm { s i g n } ( \tilde { g } _ { i } ) \neq \mathrm { s i g n } ( g _ { i } ) ]$ . Lemma 1 provides a bound on this quantity under Assumption 4 (unimodal symmetric gradient noise).
|
| 124 |
+
|
| 125 |
+
Lemma 1 (Bernstein et al. (2018)). Let $\tilde { g } _ { i }$ be an unbiased stochastic approximation to gradient component $g _ { i }$ , with variance bounded by $\sigma _ { i } ^ { 2 }$ . Further assume that the noise distribution is unimodal and symmetric. Define signal-to-noise ratio $\begin{array} { r } { S _ { i } : = \frac { | g _ { i } | } { \sigma _ { i } } } \end{array}$ |gi| . Then we have that
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
\begin{array} { r } { \mathbb { P } [ \mathrm { s i g n } ( \tilde { g } _ { i } ) \neq \mathrm { s i g n } ( g _ { i } ) ] \leq \left\{ \begin{array} { l l } { \frac { 2 } { 9 } \frac { 1 } { S _ { i } ^ { 2 } } \quad } & { i f S _ { i } > \frac { 2 } { \sqrt { 3 } } , } \\ { \frac { 1 } { 2 } - \frac { S _ { i } } { 2 \sqrt { 3 } } \quad } & { o t h e r w i s e } \end{array} \right. } \end{array}
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
which is in all cases less than or equal to $\frac { 1 } { 2 }$
|
| 132 |
+
|
| 133 |
+
The bound characterises how the failure probability of a sign bit depends on the signal-to-noise ratio (SNR) of that gradient component. Intuitively as the SNR decreases, the quality of the sign estimate should degrade. The bound is important since it tells us that, under conditions of unimodal symmetric gradient noise, even at extremely low SNR we still have that $\mathbb { P } [ \mathrm { s i g n } ( \tilde { g } _ { i } ) \neq \mathrm { s i g n } ( g _ { i } ) ] \leq \frac { 1 } { 2 }$ . This means that even when the gradient is very small compared to the noise, the sign stochastic gradient still tells us, on average, useful information about the true gradient direction, allowing us to guarantee convergence as in Theorem 1.
|
| 134 |
+
|
| 135 |
+
Without Assumption 4, the mini-batch algorithm may not converge. This is best appreciated with a simple example. Consider a stochastic gradient component $\tilde { g }$ with bimodal noise:
|
| 136 |
+
|
| 137 |
+
$$
|
| 138 |
+
\tilde { g } = \left\{ \begin{array} { l l } { 5 0 } & { \mathrm { w i t h ~ p r o b a b i l i t y ~ 0 . 1 ; } } \\ { - 1 } & { \mathrm { w i t h ~ p r o b a b i l i t y ~ 0 . 9 . } } \end{array} \right.
|
| 139 |
+
$$
|
| 140 |
+
|
| 141 |
+
The true gradient $g = \mathbb { E } [ \tilde { g } ] = 4 . 1$ is positive. But the sign gradient $\mathrm { s i g n } ( \tilde { g } )$ is negative with probability 0.9. Therefore SIGNSGD will tend to move in the wrong direction for this noise distribution.
|
| 142 |
+
|
| 143 |
+
Note that SIGNSGD is a special case of the ADAM algorithm (Balles & Hennig, 2018). To see this, set $\beta _ { 1 } = \beta _ { 2 } = \epsilon = 0$ in ADAM, and the ADAM update becomes:
|
| 144 |
+
|
| 145 |
+
$$
|
| 146 |
+
- \frac { \tilde { g } } { \sqrt { \tilde { g } ^ { 2 } } } = - \frac { \tilde { g } } { | \tilde { g } | } = - \mathrm { s i g n } ( \tilde { g } )
|
| 147 |
+
$$
|
| 148 |
+
|
| 149 |
+
This correspondence suggests that Assumption 4 should be useful for obtaining mini-batch convergence guarantees for ADAM. Note that when Reddi et al. (2018) construct toy divergence examples for ADAM, they rely on bimodal noise distributions which violate Assumption 4.
|
| 150 |
+
|
| 151 |
+
We conclude this section by noting that without Assumption 4, SIGNSGD can still be guaranteed to converge. The trick is to use a “large” batch size that grows with the number of iterations. This will ensure that the algorithm stays in the high SNR regime where the failure probability of the sign bit is low. This is the approach taken by both Carlson et al. (2016) and Bernstein et al. (2018).
|
| 152 |
+
|
| 153 |
+
# 3.4 ROBUSTNESS OF CONVERGENCE
|
| 154 |
+
|
| 155 |
+
We will now study SIGNSGD’s robustness when distributed by majority vote. We model adversaries as machines that may manipulate their stochastic gradient as follows.
|
| 156 |
+
|
| 157 |
+
Definition 1 (Blind multiplicative adversary). A blind multiplicative adversary may manipulate their stochastic gradient estimate $\tilde { g } _ { t }$ at iteration $t$ by element-wise multiplying $\tilde { g } _ { t }$ with any vector $v _ { t }$ of their choice. The vector $v _ { t }$ must be chosen before observing $\tilde { g } _ { t }$ , so the adversary is ‘blind’. Some interesting members of this class are:
|
| 158 |
+
|
| 159 |
+
(i) adversaries that arbitrarily rescale their stochastic gradient estimate;
|
| 160 |
+
|
| 161 |
+
(ii) adversaries that randomise the sign of each coordinate of the stochastic gradient;
|
| 162 |
+
|
| 163 |
+
(iii) adversaries that invert their stochastic gradient estimate.
|
| 164 |
+
|
| 165 |
+
SGD is certainly not robust to rescaling since an adversary could set the gradient to infinity and corrupt the entire model. Our algorithm, on the other hand, is robust to all adversaries in this class. For ease of analysis, here we derive large batch results. We make sure to give results in terms of sample complexity $N$ (and not iteration number $K$ ) to enable fair comparison with other algorithms.
|
| 166 |
+
|
| 167 |
+
Theorem 2 (Non-convex convergence rate of majority vote with adversarial workers). Run algorithm 1 for $K$ iterations under Assumptions $^ { l }$ to 4. Switch off momentum and weight decay $\beta = \lambda = 0$ ). Set the learning rate, $\eta$ , and mini-batch size, $n ,$ , for each worker as
|
| 168 |
+
|
| 169 |
+
$$
|
| 170 |
+
\eta = \sqrt { \frac { f _ { 0 } - f _ { * } } { \| L \| _ { 1 } K } } , \qquad n = K .
|
| 171 |
+
$$
|
| 172 |
+
|
| 173 |
+
Assume that a fraction $\alpha < \textstyle { \frac { 1 } { 2 } }$ of the $M$ workers behave adversarially according to Definition 1. Then majority vote converges at rate:
|
| 174 |
+
|
| 175 |
+
$$
|
| 176 |
+
\left[ \frac { 1 } { K } \sum _ { k = 0 } ^ { K - 1 } \mathbb { E } \left\| g _ { k } \right\| _ { 1 } \right] ^ { 2 } \leq \frac { 4 } { \sqrt { N } } \left[ \frac { 1 } { 1 - 2 \alpha } \frac { \| \vec { \sigma } \| _ { 1 } } { \sqrt { M } } + \sqrt { \| L \| _ { 1 } ( f _ { 0 } - f ^ { * } ) } \right] ^ { 2 }
|
| 177 |
+
$$
|
| 178 |
+
|
| 179 |
+
where $N = K ^ { 2 }$ is the total number of stochastic gradient calls per worker up to step $K$
|
| 180 |
+
|
| 181 |
+
The result is intuitive: provided there are more machines sending honest gradients than adversarial gradients, we expect that the majority vote should come out correct on average.
|
| 182 |
+
|
| 183 |
+
Remark 1: if we switch off adversaries by setting the proportion of adversaries $\alpha = 0$ , this result reduces to Theorem 2 in (Bernstein et al., 2018). In this case, we note the $\textstyle { \frac { 1 } { \sqrt { M } } }$ variance reduction that majority vote obtains by distributing over $M$ machines, similar to distributed SGD.
|
| 184 |
+
|
| 185 |
+
Remark 2: the convergence rate degrades as we ramp up $\alpha$ from 0 to $\frac { 1 } { 2 }$
|
| 186 |
+
|
| 187 |
+
Remark 3: from an optimisation theory perspective, the large batch size is an advantage. This is because when using a large batch size, fewer iterations and rounds of communication are theoreti-√ cally needed to reach a desired accuracy, since only $\sqrt { N }$ iterations are needed to reach $N$ samples. But from a practical perspective, workers may be unable to handle such a large batch size in a timely manner. It should be possible to extend the result to the mini-batch setting by combining the techniques of Theorems 1 and 2, but we leave this for future work.
|
| 188 |
+
|
| 189 |
+
# 4 EXPERIMENTS
|
| 190 |
+
|
| 191 |
+
For our experiments, we distributed SIGNUM (Algorithm 1) by majority vote. SIGNUM is the momentum counterpart of SIGNSGD, where each worker maintains a momentum and transmits the sign momentum to the parameter server at each step. The addition of momentum to SIGNSGD is proposed and studied in (Balles & Hennig, 2018; Bernstein et al., 2018).
|
| 192 |
+
|
| 193 |
+
We built SIGNUM with majority vote in the Pytorch deep learning framework (Paszke et al., 2017) using the Gloo (2018) communication library. Unfortunately Pytorch and Gloo do not natively support 1-bit tensors, therefore we wrote our own compression code to bit-pack a sign tensor down to an efficient 1-bit representation. We obtained a performance boost by fusing together smaller tensors, which saved on compression and communication costs.
|
| 194 |
+
|
| 195 |
+

|
| 196 |
+
Figure 4: Timing breakdown for distributing on the cloud. Left: comparing communication (including compression) for training resnet50. Right: comparing communication (including compression) and computation. resnet50 results use 7 p3.2xlarge machines for training Imagenet, each at batch size 128. alexnet uses $7 { \mathrm { p } } 3$ .2xlarge machines for Imagenet, each at batch size 64. QRNN uses $3 \mathrm { p } 3 . 1 6 \mathrm { x } 1$ arge machines for training WikiText $- 1 0 3$ , each at batch size 240.
|
| 197 |
+
|
| 198 |
+

|
| 199 |
+
Figure 5: Imagenet comparison of SIGNUM with majority vote and SGD distributed with NCCL. We train resnet50 on Imagenet distributed over 7 to 15 AWS p3.2xlarge machines. Top: increasing the number of workers participating in the majority vote shows a similar convergence speedup to distributed SGD. But in terms of wall-clock time, majority vote training is roughly $2 5 \%$ faster for the same number of epochs. Bottom: in terms of generalisation accuracy, majority vote shows a slight degradation compared to SGD. Perhaps a better regularisation scheme can fix this.
|
| 200 |
+
|
| 201 |
+

|
| 202 |
+
Figure 6: Training QRNN across three $_ { \mathrm { p 3 . 1 6 x 1 } }$ arge machines on WikiText-103. Each machine uses a batch size of 240. For ADAM, the gradient is aggregated with NCCL. SIGNUM with majority vote shows some degradation compared to ADAM, although an epoch is completed roughly three times faster. This means that after 2 hours of training, SIGNUM attains a similar perplexity to ADAM. Increasing the per-worker batch size improved SIGNUM’s performance (see Appendix A), and increasing it beyond 240 may further improve SIGNUM’s performance. Note: the test perplexity beats training perplexity because dropout was applied during training but not testing.
|
| 203 |
+
|
| 204 |
+
# Bits sent per iteration
|
| 205 |
+
|
| 206 |
+
Majority vote $O ( M d )$ L2 QSGD $\operatorname { O } ( M ^ { 2 } { \sqrt { d } } \log d )$ max QSGD $O ( M d )$
|
| 207 |
+
|
| 208 |
+
For $d$ weights, $M$ machines.
|
| 209 |
+
Derivations in Appendix B.
|
| 210 |
+
|
| 211 |
+

|
| 212 |
+
Figure 7: Left: comparing convergence of majority vote to QSGD (Alistarh et al., 2017). resnet18 is trained on Cifar-10 across $M = 3$ machines, each at bach size 128. 1-bit QSGD stochastically snaps gradient components to $\{ 0 , \pm 1 \}$ . 2-way refers to the compression function $Q ( . )$ being applied in both directions of communication: machine $i$ sends $Q ( \tilde { g _ { i } } )$ to the server and gets $\begin{array} { r } { Q ( \sum _ { i = 1 } ^ { M } Q ( \tilde { g } _ { i } ) ) } \end{array}$ sent back. Alistarh et al. (2017) develop a theory for $L 2$ QSGD, but experimentally benchmark max QSGD which has much larger communication costs. For this experiment, 1-bit max QSGD gives roughly $5 \times$ more compression than the $3 2 \times$ compression of majority vote, but this further gain turns out to be small relative to the cost of backpropagation. See Appendix A for QSGD experiments at higher bit-precision. Right: the table gives a theoretical comparison of the compression cost of each algorithm—see Appendix B for derivations.
|
| 213 |
+
|
| 214 |
+

|
| 215 |
+
Figure 8: Imagenet robustness experiments. We used majority vote to train resnet50 distributed across 7 AWS $\mathtt { p 3 }$ . $2 \times 1$ arge machines. Adversaries invert their sign stochastic gradient. Left: all experiments are run at identical hyperparameter settings, with weight decay switched off for simplicity. The network still learns even at $43 \%$ adversarial. Right: at $43 \%$ adversarial, learning became slightly unstable. We decreased the learning rate for this setting, and learning stabilised.
|
| 216 |
+
|
| 217 |
+

|
| 218 |
+
Figure 9: Comparing the robustness of majority vote to MULTI-KRUM (Blanchard et al., 2017). We train resnet18 on Cifar-10 across 7 workers, each at batch size 64. Momentum and weight decay are switched off for simplicity, and for majority vote we divide the learning rate by 10 at epoch 100. Negative adversaries multiply their stochastic gradient estimate by $- 1 0$ . Random adversaries multiply their stochastic gradient estimate by 10 and then randomise the sign of each coordinate. For MULTI-KRUM, we use the maximum allowed security level of $f = 2$ . Notice that MULTI-KRUM fails catastrophically once the number of adversaries exceeds the security level, whereas majority vote fails more gracefully.
|
| 219 |
+
|
| 220 |
+
We test against SGD distributed using the state of the art NCCL (2018) communication library. NCCL provides an efficient implementation of allreduce. Our framework is often $4 \times$ faster in communication (including the cost of compression) than NCCL, as can be seen in Figure 4. Further code optimisation should bring the speedup closer to the ideal $3 2 \times$ .
|
| 221 |
+
|
| 222 |
+
# 4.1 COMMUNICATION EFFICIENCY
|
| 223 |
+
|
| 224 |
+
We first benchmark majority vote on the Imagenet dataset. We train a resnet50 model and disitribute learning over 7 to 15 AWS p3.2xlarge machines. These machines each contain one Nvidia Tesla V100 GPU, and AWS lists the connection speed between machines as “up to 10 Gbps”. Results are plotted in Figure 5. Per epoch, distributing by majority vote is able to attain a similar speedup to distributed SGD. But per hour majority vote is able to process more epochs than NCCL, meaning it can complete the 80 epoch training job roughly $2 5 \%$ faster. In terms of overall generalisation, majority vote reaches a slightly degraded test set accuracy. We hypothesise that this may be fixed by inventing a better regularisation scheme or tuning momentum, which we did not do.
|
| 225 |
+
|
| 226 |
+
In Figure 6 we compare majority vote to ADAM (distributed by NCCL) for training QRNN (Bradbury et al., 2017) on WikiText-103. Majority vote completes an epoch roughly 3 times faster than ADAM, but it reaches a degraded accuracy so that the overall test perplexity after 2 hours ends up being similar. In Figure 7 we show that majority vote has superior convergence to the ‘theory’ version of QSGD that Alistarh et al. (2017) develop. Convergence is similar for the ‘max’ version that Alistarh et al. (2017) use in their experiments. Additional results are given in Appendix A.
|
| 227 |
+
|
| 228 |
+
# 4.2 ROBUSTNESS
|
| 229 |
+
|
| 230 |
+
In this section we test the robustness of SIGNUM with majority vote to Byzantine faults. Again we run tests on the Imagenet dataset, training resnet50 across 7 AWS $\mathtt { p 3 }$ . $2 \times 1$ arge machines. Our adversarial workers take the sign of their stochastic gradient calculation, but send the negation to the parameter server. Our results are plotted in Figure 8. In the left hand plot, all experiments were carried out using hyperparameters tuned for the $0 \%$ adversarial case. Weight decay was not used in these experiments to simplify matters. We see that learning is tolerant of up to $43 \%$ (3 out of 7) machines behaving adversarially. The $43 \%$ adversarial case was slightly unstable (Figure 8, left), but re-tuning the learning rate for this specific case stabilised learning (Figure 8, right).
|
| 231 |
+
|
| 232 |
+
In Figure 9 we compare majority vote to MULTI-KRUM (Blanchard et al., 2017) with a security level of $f = 2$ . When the number of adversaries exceeds $f$ , MULTI-KRUM fails catastrophically in our experiments, whereas SIGNSGD fails more gracefully. Note that MULTI-KRUM requires $2 f + 2 < M$ , therefore $f = 2$ is the maximum possible security level for these experiments with $M = 7$ workers.
|
| 233 |
+
|
| 234 |
+
# 5 DISCUSSION AND CONCLUSION
|
| 235 |
+
|
| 236 |
+
We have analysed the theoretical and empirical properties of a very simple algorithm for distributed, stochastic optimisation. We have shown that SIGNSGD with majority vote aggregation is robust and communication efficient, whilst its per-iteration convergence rate is competitive with SGD for training large-scale convolutional neural nets on image datasets. We believe that it is important to understand this simple algorithm before going on to devise more complex learning algorithms.
|
| 237 |
+
|
| 238 |
+
An important takeaway from our theory is that mini-batch SIGNSGD should converge if the gradient noise is Gaussian. This means that the performance of SIGNSGD may be improved by increasing the per-worker mini-batch size, since this should make the noise ‘more Gaussian’ according to the Central Limit Theorem.
|
| 239 |
+
|
| 240 |
+
We will now give some possible directions for future work. Our implementation of majority vote may be further optimised by breaking up the parameter server and distributing it across machines. This would prevent a single machine from becoming a communication bottleneck as in our experiments. Though our framework speeds up Imagenet training, we still have a test set gap. Future work could attempt to devise new regularisation schemes for signed updates to close this gap. Promising future work could also explore the link between SIGNSGD and model compression. Signed updates force the weights to live on a lattice, facilitating compression of the resulting model.
|
| 241 |
+
|
| 242 |
+
# ACKNOWLEDGMENTS
|
| 243 |
+
|
| 244 |
+
We would like to thank Yu-Xiang Wang, Alexander Sergeev, Soumith Chintala, Pieter Noordhuis, Hongyi Wang, Scott Sievert and El Mahdi El Mhamdi for useful discussions.
|
| 245 |
+
|
| 246 |
+
KA is supported in part by NSF Career Award CCF-1254106. AA is supported in part by a Microsoft Faculty Fellowship, Google Faculty Award, Adobe Grant, NSF Career Award CCF-1254106, and AFOSR YIP FA9550-15-1-0221.
|
| 247 |
+
|
| 248 |
+
# REFERENCES
|
| 249 |
+
|
| 250 |
+
Dan Alistarh, Demjan Grubic, Jerry Li, Ryota Tomioka, and Milan Vojnovic. QSGD: Communication-Efficient SGD via Gradient Quantization and Encoding. In Advances in Neural Information Processing Systems (NIPS-17), 2017.
|
| 251 |
+
Dan Alistarh, Zeyuan Allen-Zhu, and Jerry Li. Byzantine Stochastic Gradient Descent. arXiv:1803.08917, 2018.
|
| 252 |
+
Zeyuan Allen-Zhu. Natasha 2: Faster Non-Convex Optimization Than SGD. arXiv:1708.08694, 2017.
|
| 253 |
+
Lukas Balles and Philipp Hennig. Dissecting Adam: The Sign, Magnitude and Variance of Stochastic Gradients. In International Conference on Machine Learning (ICML-18), 2018.
|
| 254 |
+
Jeremy Bernstein, Yu-Xiang Wang, Kamyar Azizzadenesheli, and Animashree Anandkumar. signSGD: Compressed Optimisation for Non-Convex Problems. In International Conference on Machine Learning (ICML-18), 2018.
|
| 255 |
+
Peva Blanchard, El Mahdi El Mhamdi, Rachid Guerraoui, and Julien Stainer. Machine Learning with Adversaries: Byzantine Tolerant Gradient Descent. In Advances in Neural Information Processing Systems (NIPS-17), 2017.
|
| 256 |
+
James Bradbury, Stephen Merity, Caiming Xiong, and Richard Socher. Quasi-Recurrent Neural Networks. In International Conference on Learning Representations (ICLR-17), 2017.
|
| 257 |
+
Francesco Paolo Cantelli. Sui confini della probabilit. Atti del Congresso Internazionale dei Matematici, 1928.
|
| 258 |
+
David Carlson, Ya-Ping Hsieh, Edo Collins, Lawrence Carin, and Volkan Cevher. Stochastic spectral descent for discrete graphical models. IEEE Journal of Selected Topics in Signal Processing, 10 (2):296–311, 2016.
|
| 259 |
+
El Mahdi El Mhamdi, Rachid Guerraoui, and Sebastien Rouault. The Hidden Vulnerability of ´ Distributed Learning in Byzantium. In International Conference on Machine Learning (ICML18), 2018.
|
| 260 |
+
Carl Friedrich Gauss. Theoria combinationis observationum erroribus minimis obnoxiae, pars prior. Commentationes Societatis Regiae Scientiarum Gottingensis Recentiores, 1823.
|
| 261 |
+
Gloo. Gloo Collective Communications Library, 2018. URL https://github.com/ facebookincubator/gloo. Accessed on 9/27/18.
|
| 262 |
+
J J Hopfield. Neural networks and physical systems with emergent collective computational abilities. Proceedings of the National Academy of Sciences, 1982.
|
| 263 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. In International Conference on Learning Representations (ICLR-15), 2015.
|
| 264 |
+
Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436, 2015.
|
| 265 |
+
Yujun Lin, Song Han, Huizi Mao, Yu Wang, and Bill Dally. Deep gradient compression: Reducing the communication bandwidth for distributed training. In International Conference on Learning Representations (ICLR-18), 2018.
|
| 266 |
+
|
| 267 |
+
NCCL. Nvidia Collective Communications Library, 2018. URL https://developer. nvidia.com/nccl. Accessed on 9/27/18.
|
| 268 |
+
|
| 269 |
+
Yurii Nesterov and B.T. Polyak. Cubic Regularization of Newton Method and its Global Performance. Mathematical Programming, 2006.
|
| 270 |
+
|
| 271 |
+
Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic Differentiation in PyTorch. In Advances in Neural Information Processing Systems, Autodiff Workshop (NIPS-17), 2017.
|
| 272 |
+
|
| 273 |
+
Friedrich Pukelsheim. The Three Sigma Rule. The American Statistician, 1994.
|
| 274 |
+
|
| 275 |
+
Sashank J. Reddi, Satyen Kale, and Sanjiv Kumar. On the Convergence of Adam and Beyond. In International Conference on Learning Representations (ICLR-18), 2018.
|
| 276 |
+
|
| 277 |
+
M. Riedmiller and H. Braun. A Direct Adaptive Method for Faster Backpropagation Learning: the RPROP Algorithm. In International Conference on Neural Networks (ICNN-93), pp. 586–591. IEEE, 1993.
|
| 278 |
+
|
| 279 |
+
Herbert Robbins and Sutton Monro. A Stochastic Approximation Method. The Annals of Mathematical Statistics, 1951.
|
| 280 |
+
|
| 281 |
+
Frank Seide, Hao Fu, Jasha Droppo, Gang Li, and Dong Yu. 1-Bit Stochastic Gradient Descent and Application to Data-Parallel Distributed Training of Speech DNNs. In Conference of the International Speech Communication Association (INTERSPEECH-14), 2014.
|
| 282 |
+
|
| 283 |
+
Tijmen Tieleman and Geoffrey Hinton. RMSprop. Coursera: Neural Networks for Machine Learning, Lecture 6.5, 2012.
|
| 284 |
+
|
| 285 |
+
TOP500. IBM Summit Supercomputer, 2018. URL https://www.top500.org/system/ 179397. Accessed on 9/19/18.
|
| 286 |
+
|
| 287 |
+
Hongyi Wang, Scott Sievert, Shengchao Liu, Zachary B. Charles, Dimitris S. Papailiopoulos, and Stephen Wright. ATOMO: Communication-efficient Learning via Atomic Sparsification. In Advances in Neural Information Processing Systems (NIPS-18), 2018.
|
| 288 |
+
|
| 289 |
+
Wei Wen, Cong Xu, Feng Yan, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. TernGrad: Ternary Gradients to Reduce Communication in Distributed Deep Learning. In Advances in Neural Information Processing Systems (NIPS-17), 2017.
|
| 290 |
+
|
| 291 |
+
Dong Yin, Yudong Chen, Ramchandran Kannan, and Peter Bartlett. Byzantine-Robust Distributed Learning: Towards Optimal Statistical Rates. In International Conference on Machine Learning (ICML-18), 2018.
|
| 292 |
+
|
| 293 |
+

|
| 294 |
+
Figure 10: QSGD at varying levels of precision. Top row: L2 QSGD. Bottom row: max QSGD. resnet18 is trained on Cifar-10 across $M = 3$ machines, each at bach size 128. The one-way version of QSGD is used, meaning that the compression function is not re-applied after aggregation. The comparison is given in terms of number of epochs. A comparison in terms of wall-clock time will depend on details of the systems implementation.
|
| 295 |
+
|
| 296 |
+

|
| 297 |
+
Figure 11: SIGNUM at varying batch sizes. We use a single worker and train a QRNN model on WikiText $- 1 0 3$ . ADAM is shown for comparison, at batch size 60. The performance of SIGNUM is seen to improve with increasing batch size.
|
| 298 |
+
|
| 299 |
+
# B BITS SENT PER ITERATION: SIGNSGD VS. QSGD
|
| 300 |
+
|
| 301 |
+
In this section, we perform theoretical calculations of the number of bits sent per iteration in distributed training. We compare SIGNSGD using majority vote aggregation to two forms of QSGD (Alistarh et al., 2017). These calculations give the numbers in the table in Figure 7.
|
| 302 |
+
|
| 303 |
+
The communication cost of SIGNSGD with majority vote is trivially $2 M d$ bits per iterations, since at each iteration $M$ machines send $d$ -dimensional sign vectors up to the server, and the server sends back one $d$ -dimensional sign vector to all $M$ machines.
|
| 304 |
+
|
| 305 |
+
There are two variants of QSGD given in (Alistarh et al., 2017). The first we refer to as $L 2$ QSGD which is the version developed in the theory section of (Alistarh et al., 2017). The second we refer to as max QSGD which is the version actually used in their experiments. For each version we compute the number of bits sent for the highest compression version of the algorithm, which is a ternary quantisation (snapping gradient components into $\{ 0 , \pm 1 \} ,$ ). We refer to this as $^ { l }$ -bit QSGD. The higher precision versions of QSGD will send more bits per iteration.
|
| 306 |
+
|
| 307 |
+
1-bit L2 QSGD takes a gradient vector $g$ and snaps $i ^ { t h }$ coordinate $g _ { i }$ to $\mathrm { s i g n } ( g _ { i } )$ with probability $\frac { \left| g _ { i } \right| } { \left\| g \right\| _ { 2 } }$ and sets it to zero otherwise. Therefore the expected number of bits set to $\pm 1$ is bounded by
|
| 308 |
+
|
| 309 |
+
$$
|
| 310 |
+
\mathbb { E } [ \# \mathrm { b i t s } ] = \sum _ { i = 1 } { \frac { | g _ { i } | } { \| g \| _ { 2 } } } = { \frac { \| g \| _ { 1 } } { \| g \| _ { 2 } } } \leq { \sqrt { d } } .
|
| 311 |
+
$$
|
| 312 |
+
|
| 313 |
+
To send a vector compressed in this way, for each non-zero component 1 bit is needed to send the sign and $\log d$ bits are needed to send the index. Therefore sending a vector compressed by 1-bit L2√ QSGD requires at most ${ \sqrt { d } } ( 1 + \log d )$ bits.
|
| 314 |
+
|
| 315 |
+
In the experiments in Figure 7 we see that the ‘2-way’ version of 1-bit L2 QSGD (which recompresses the aggregated compressed gradients) converges very poorly. Therefore it makes sense to use the 1-way version where the aggregated compressed gradient is not recompressed. A sensible way to enact this is to have each of the $M$ workers broadcast their compressed gradient vector to all√ other workers. This has a cost of $( M - 1 ) { \sqrt { d } } ( 1 + \log d )$ bits for each of the $M$ workers, and from this we get the total cost of $\operatorname { O } ( M ^ { 2 } { \sqrt { d } } \log d )$ for 1-bit L2 QSGD.
|
| 316 |
+
|
| 317 |
+
The final algorithm to characterise is 1-bit max QSGD. 1-bit max QSGD takes a gradient vector $g$ and snaps $i ^ { t h }$ coordinate $g _ { i }$ to $\mathrm { s i g n } ( g _ { i } )$ with probability $\frac { | g _ { i } | } { \| g \| _ { \infty } }$ and sets it to zero otherwise. As noted in (Alistarh et al., 2017), there are no sparsity guarantees for this algorithm, so compression will generally be much lower than for 1-bit L2 QSGD.
|
| 318 |
+
|
| 319 |
+
It is easy to see that 1-bit max QSGD requires no more than ${ \mathrm { O } } ( d )$ bits to compress a $d$ -dimensional vector, since $2 d$ bits can always store $d$ numbers in $\{ 0 , \pm 1 \}$ . To see that we can’t generally do better than ${ \mathrm { O } } ( d )$ bits, notice that 1-bit max QSGD leaves sign vectors invariant, and thus the compressed form of a sign vector requires exactly $d$ bits. The natural way to enact 1-bit max QSGD is with a two-way compression where the $M$ workers each send an ${ \mathrm { O } } ( d )$ -bit compressed gradient up to the server, and the server sends back an ${ \mathrm { O } } ( d )$ -bit compressed aggregated result back to the $M$ workers. This gives a number of bits sent per iteration of ${ \bf O } ( M d )$ .
|
| 320 |
+
|
| 321 |
+
For very sparse vectors 1-bit max QSGD will compress much better than indicated above. For a vector $g$ with a single non-zero entry, 1-bit max QSGD will set this entry to 1 and keep the rest zero, thus requiring only $\log d$ bits to send the index of the non-zero entry. But it is not clear whether these extremely sparse vectors appear in deep learning problems. In the experiments in Figure 7, 1-bit max QSGD led to compressed vectors that were $5 \times$ more compressed than SIGNSGD—in our experimental setting this additional improvement turned out to be small relative to the time cost of backpropagation.
|
| 322 |
+
|
| 323 |
+
# C PROOFS
|
| 324 |
+
|
| 325 |
+
C.1 ACCURACY OF THE SIGN STOCHASTIC GRADIENT
|
| 326 |
+
|
| 327 |
+
Lemma 1 (Bernstein et al. (2018)). Let $\tilde { g } _ { i }$ be an unbiased stochastic approximation to gradient component $g _ { i }$ , with variance bounded by $\sigma _ { i } ^ { 2 }$ . Further assume that the noise distribution is unimodal and symmetric. Define signal-to-noise ratio $\begin{array} { r } { S _ { i } : = \frac { | g _ { i } | } { \sigma _ { i } } } \end{array}$ |gi| . Then we have that
|
| 328 |
+
|
| 329 |
+
$$
|
| 330 |
+
\begin{array} { r } { \mathbb { P } [ \mathrm { s i g n } ( \tilde { g } _ { i } ) \neq \mathrm { s i g n } ( g _ { i } ) ] \leq \left\{ \begin{array} { l l } { \frac { 2 } { 9 } \frac { 1 } { S _ { i } ^ { 2 } } \quad } & { i f S _ { i } > \frac { 2 } { \sqrt { 3 } } , } \\ { \frac { 1 } { 2 } - \frac { S _ { i } } { 2 \sqrt { 3 } } \quad } & { o t h e r w i s e } \end{array} \right. } \end{array}
|
| 331 |
+
$$
|
| 332 |
+
|
| 333 |
+
which is in all cases less than or equal to $\frac { 1 } { 2 }$
|
| 334 |
+
|
| 335 |
+
Proof. Recall Gauss’ inequality for unimodal random variable $\mathrm { X }$ with mode $\nu$ and expected squared deviation from the mode $\dot { \tau } ^ { 2 }$ (Gauss, 1823; Pukelsheim, 1994):
|
| 336 |
+
|
| 337 |
+
$$
|
| 338 |
+
\mathbb { P } [ | X - \nu | > k ] \leq \left\{ \begin{array} { l l } { \frac { 4 } { 9 } \frac { \tau ^ { 2 } } { k ^ { 2 } } \quad } & { \mathrm { i f ~ } \frac { k } { \tau } > \frac { 2 } { \sqrt { 3 } } , } \\ { 1 - \frac { k } { \sqrt { 3 } \tau } \quad } & { \mathrm { o t h e r w i s e } } \end{array} \right.
|
| 339 |
+
$$
|
| 340 |
+
|
| 341 |
+
By the symmetry assumption, the mode is equal to the mean, so we replace mean $\mu = \nu$ and variance $\sigma ^ { \bar { 2 } } = \tau ^ { \bar { 2 } }$ .
|
| 342 |
+
|
| 343 |
+
$$
|
| 344 |
+
\mathbb { P } [ | X - \mu | > k ] \leq \left\{ { \begin{array} { l l } { \frac { 4 } { 9 } \frac { \sigma ^ { 2 } } { k ^ { 2 } } \quad } & { \mathrm { ~ i f ~ } \frac { k } { \sigma } > \frac { 2 } { \sqrt { 3 } } , } \\ { 1 - \frac { k } { \sqrt { 3 } \sigma } \quad } & { \mathrm { ~ o t h e r w i s e } } \end{array} } \right.
|
| 345 |
+
$$
|
| 346 |
+
|
| 347 |
+
Without loss of generality assume that $g _ { i }$ is negative. Then applying symmetry followed by Gauss, the failure probability for the sign bit satisfies:
|
| 348 |
+
|
| 349 |
+
$$
|
| 350 |
+
\begin{array} { r l } { \mathbb { P } [ \mathrm { s i g n } ( \tilde { g } _ { i } ) \neq \mathrm { s i g n } ( g _ { i } ) ] = \mathbb { P } [ \tilde { g } _ { i } - g _ { i } \geq | g _ { i } | ] } & { } \\ { = \frac { 1 } { 2 } \mathbb { P } [ | \tilde { g } _ { i } - g _ { i } | \geq | g _ { i } | ] } & { } \\ { \leq \left\{ \begin{array} { l l } { \frac { 2 } { g } \frac { \sigma _ { i } ^ { 2 } } { g _ { i } ^ { 2 } } } & { \mathrm { ~ i f ~ } \frac { | g _ { i } | } { \sigma } > \frac { 2 } { \sqrt { 3 } } , } \\ { \frac { 1 } { 2 } - \frac { | g _ { i } | } { 2 \sqrt { 3 } \sigma _ { i } } } & { \mathrm { ~ o t h e r w i s e } } \end{array} \right. } & { } \\ { = \left\{ \begin{array} { l l } { \frac { 2 } { 9 } \frac { 1 } { S _ { i } ^ { 2 } } } & { \mathrm { ~ i f ~ } S _ { i } > \frac { 2 } { \sqrt { 3 } } , } \\ { \frac { 1 } { 2 } - \frac { S _ { i } } { 2 \sqrt { 3 } } } & { \mathrm { ~ o t h e r w i s e } } \end{array} \right. } \end{array}
|
| 351 |
+
$$
|
| 352 |
+
|
| 353 |
+
# C.2 MINI-BATCH CONVERGENCE GUARANTEES
|
| 354 |
+
|
| 355 |
+
Theorem 1 (Non-convex convergence rate of mini-batch SIGNSGD). Run the following algorithm for $K$ iterations under Assumptions $^ { l }$ to $^ { 4 }$ : $x _ { k + 1 } = x _ { k } - \eta \mathrm { s i g n } ( \tilde { g } _ { k } )$ . Set the learning rate, $\eta _ { ; }$ , and mini-batch size, $n$ , as
|
| 356 |
+
|
| 357 |
+
$$
|
| 358 |
+
\eta = \sqrt { \frac { f _ { 0 } - f _ { * } } { \| \vec { L } \| _ { 1 } K } } , \qquad n = 1 .
|
| 359 |
+
$$
|
| 360 |
+
|
| 361 |
+
Let i.e. $H _ { k }$ ent compone. We refer to at stepas the $k$ with large signal-to-noise ratio critical SNR’. Then we have $\begin{array} { r } { S _ { i } : = \frac { | g _ { k , i } | } { \sigma _ { i } } } \end{array}$ , $H _ { k } : = { \Big \{ } i { \Big | } S _ { i } > { \frac { 2 } { \sqrt { 3 } } } { \Big \} }$ $\frac { 2 } { \sqrt { 3 } }$
|
| 362 |
+
|
| 363 |
+
$$
|
| 364 |
+
\frac { 1 } { K } \sum _ { k = 0 } ^ { K - 1 } \mathbb { E } \left[ \sum _ { i \in { \cal H } _ { k } } \left. g _ { k , i } \right. + \sum _ { i \notin { \cal H } _ { k } } \frac { g _ { k , i } ^ { 2 } } { \sigma _ { i } } \right] \leq 3 \sqrt { \frac { \| \vec { L } \| _ { 1 } ( f _ { 0 } - f _ { * } ) } { N } } .
|
| 365 |
+
$$
|
| 366 |
+
|
| 367 |
+
where $N = K$ is the total number of stochastic gradient calls up to step $K$ .
|
| 368 |
+
|
| 369 |
+
Proof. First let’s bound the improvement of the objective during a single step of the algorithm for one instantiation of the noise. I[.] is the indicator function, $g _ { k , i }$ denotes the $\cdot ^ { \mathit { t h } }$ component of the true gradient $g ( x _ { k } )$ and $\tilde { g } _ { k }$ is a stochastic sample obeying Assumption 3.
|
| 370 |
+
|
| 371 |
+
First take Assumption 2, plug in the algorithmic step, and decompose the improvement to expose the stochasticity-induced error:
|
| 372 |
+
|
| 373 |
+
$$
|
| 374 |
+
\begin{array} { r l } { f _ { k + 1 } - f _ { k } \le g _ { k } ^ { T } ( x _ { k + 1 } - x _ { k } ) + \displaystyle \sum _ { i = 1 } ^ { d } \frac { L _ { i } } { 2 } ( x _ { k + 1 } - x _ { k } ) _ { i } ^ { 2 } } & { } \\ { \displaystyle = - \eta g _ { k } ^ { T } \mathbb { s i g n } ( \tilde { g } _ { k } ) + \eta ^ { 2 } \sum _ { i = 1 } ^ { d } \frac { L _ { i } } { 2 } } & { } \\ { \displaystyle = - \eta \| g _ { k } \| _ { 1 } + \frac { \eta ^ { 2 } } { 2 } \| \vec { L } \| _ { 1 } + 2 \eta \displaystyle \sum _ { i = 1 } ^ { d } | g _ { k , i } | \mathbb { I } [ \mathrm { s i g n } ( \tilde { g } _ { k , i } ) \neq \mathrm { s i g n } ( g _ { k , i } ) ] } \end{array}
|
| 375 |
+
$$
|
| 376 |
+
|
| 377 |
+
Next we find the expected improvement at time $k + 1$ conditioned on the previous iterate.
|
| 378 |
+
|
| 379 |
+
$$
|
| 380 |
+
\mathbb { E } [ f _ { k + 1 } - f _ { k } | x _ { k } ] \leq - \eta \| g _ { k } \| _ { 1 } + \frac { \eta ^ { 2 } } { 2 } \| \vec { L } \| _ { 1 } + 2 \eta \sum _ { i = 1 } ^ { d } | g _ { k , i } | \operatorname { \mathbb { P } } [ \mathrm { s i g n } ( \tilde { g } _ { k , i } ) \neq \mathrm { s i g n } ( g _ { k , i } ) ]
|
| 381 |
+
$$
|
| 382 |
+
|
| 383 |
+
By Assumption 4 and Lemma 1 we have the following bound on the failure probability of the sign:
|
| 384 |
+
|
| 385 |
+
$$
|
| 386 |
+
\begin{array} { r l } { \mathbb { P } [ \mathrm { s i g n } ( \tilde { g } _ { i } ) \neq \mathrm { s i g n } ( g _ { i } ) ] \leq \left\{ \frac { 2 } { 9 } \frac { 1 } { S _ { i } ^ { 2 } } \right. } & { \mathrm { ~ i f ~ } S _ { i } > \frac { 2 } { \sqrt { 3 } } , } \\ { \frac { 1 } { 2 } - \frac { S _ { i } } { 2 \sqrt { 3 } } ~ } & { \mathrm { ~ o t h e r w i s e ~ } } \\ { \leq \left\{ \begin{array} { l l } { \frac { 1 } { 6 } ~ } & { \mathrm { ~ i f ~ } S _ { i } > \frac { 2 } { \sqrt { 3 } } , } \\ { \frac { 1 } { 2 } - \frac { S _ { i } } { 2 \sqrt { 3 } } ~ } & { \mathrm { ~ o t h e r w i s e ~ } } \end{array} \right. } \end{array}
|
| 387 |
+
$$
|
| 388 |
+
|
| 389 |
+
Substituting this in, we get that
|
| 390 |
+
|
| 391 |
+
$$
|
| 392 |
+
\begin{array} { r l } & { \mathbb { E } [ f _ { k + 1 } - f _ { k } | x _ { k } ] \le - \eta \| g _ { k } \| _ { 1 } + \frac { \eta ^ { 2 } } { 2 } \| \vec { L } \| _ { 1 } + 2 \eta \displaystyle \sum _ { i \in { \cal H } _ { k } } \frac { | g _ { k , i } | } { 6 } + 2 \eta \displaystyle \sum _ { i \notin { \cal H } _ { k } } | g _ { k , i } | \left[ \frac { 1 } { 2 } - \frac { | g _ { k , i } | } { 2 \sqrt { 3 } \sigma _ { i } } \right] } \\ & { \qquad = - \eta \displaystyle \sum _ { i = 1 } ^ { d } | g _ { k , i } | + \frac { \eta ^ { 2 } } { 2 } \| \vec { L } \| _ { 1 } + \eta \displaystyle \sum _ { i \in { \cal H } _ { k } } \frac { | g _ { k , i } | } { 3 } + \eta \displaystyle \sum _ { i \notin { \cal H } _ { k } } | g _ { k , i } | - \eta \displaystyle \sum _ { i \notin { \cal H } _ { k } } \frac { g _ { k , i } ^ { 2 } } { \sqrt { 3 } \sigma _ { i } } } \\ & { \qquad = - \frac { 2 \eta } { 3 } \displaystyle \sum _ { i \in { \cal H } _ { k } } | g _ { k , i } | - \eta \displaystyle \sum _ { i \notin { \cal H } _ { k } } \frac { g _ { k , i } ^ { 2 } } { \sqrt { 3 } \sigma _ { i } } + \frac { \eta ^ { 2 } } { 2 } \| \vec { L } \| _ { 1 } } \end{array}
|
| 393 |
+
$$
|
| 394 |
+
|
| 395 |
+
Interestingly a mixture between an $\ell _ { 1 }$ and a variance weighted $\ell _ { 2 }$ norm has appeared. Now substitute in the learning rate schedule, and we get:
|
| 396 |
+
|
| 397 |
+
$$
|
| 398 |
+
\begin{array} { l } { \displaystyle \mathbb { E } [ f _ { k + 1 } - f _ { k } | x _ { k } ] \leq - \sqrt { \frac { f _ { 0 } - f _ { * } } { \| \vec { L } \| _ { 1 } K } } \Bigg [ \frac { 2 } { 3 } \sum _ { i \in H _ { k } } | g _ { k , i } | + \frac { 1 } { \sqrt { 3 } } \sum _ { i \notin H _ { k } } \frac { g _ { k , i } ^ { 2 } } { \sigma _ { i } } \Bigg ] + \frac { f _ { 0 } - f _ { * } } { 2 K } } \\ { \leq - \sqrt { \frac { f _ { 0 } - f _ { * } } { 3 \| \vec { L } \| _ { 1 } K } } \left[ \displaystyle \sum _ { i \in H _ { k } } | g _ { k , i } | + \displaystyle \sum _ { i \notin H _ { k } } \frac { g _ { k , i } ^ { 2 } } { \sigma _ { i } } \right] + \frac { f _ { 0 } - f _ { * } } { 2 K } } \end{array}
|
| 399 |
+
$$
|
| 400 |
+
|
| 401 |
+
Now extend the expectation over the randomness in the trajectory and telescope over the iterations:
|
| 402 |
+
|
| 403 |
+
$$
|
| 404 |
+
\begin{array} { r l } & { f _ { 0 } - f ^ { * } \geq f _ { 0 } - \mathbb { E } [ f _ { K } ] } \\ & { \qquad = \mathbb { E } \left[ \displaystyle \sum _ { k = 0 } ^ { K - 1 } f _ { k } - f _ { k + 1 } \right] } \\ & { \qquad \geq \sqrt { \displaystyle \frac { f _ { 0 } - f _ { * } } { 3 \| \vec { L } \| _ { 1 } K } } \displaystyle \sum _ { k = 0 } ^ { K - 1 } \mathbb { E } \left[ \displaystyle \sum _ { i \in H _ { k } } | g _ { k , i } | + \displaystyle \sum _ { i \notin H _ { k } } \frac { g _ { k , i } ^ { 2 } } { \sigma _ { i } } \right] - \frac { f _ { 0 } - f _ { * } } { 2 } } \end{array}
|
| 405 |
+
$$
|
| 406 |
+
|
| 407 |
+
Finally, rearrange and substitute in $N = K$ to yield the bound
|
| 408 |
+
|
| 409 |
+
$$
|
| 410 |
+
\frac { 1 } { K } \sum _ { k = 0 } ^ { K - 1 } \mathbb { E } \left[ \sum _ { i \in { \cal H } _ { k } } | g _ { k , i } | + \sum _ { i \notin { \cal H } _ { k } } \frac { g _ { k , i } ^ { 2 } } { \sigma _ { i } } \right] \leq \frac { 3 \sqrt { 3 } } { 2 } \sqrt { \frac { \| \vec { L } \| _ { 1 } ( f _ { 0 } - f _ { * } ) } { N } } \leq 3 \sqrt { \frac { \| \vec { L } \| _ { 1 } ( f _ { 0 } - f _ { * } ) } { N } } .
|
| 411 |
+
$$
|
| 412 |
+
|
| 413 |
+
# C.3 ROBUSTNESS OF MAJORITY VOTE
|
| 414 |
+
|
| 415 |
+
Theorem 2 (Non-convex convergence rate of majority vote with adversarial workers). Run algorithm 1 for $K$ iterations under Assumptions $^ { l }$ to 4. Switch off momentum and weight decay $\beta = \lambda = 0$ ). Set the learning rate, $\eta$ , and mini-batch size, $n _ { : }$ , for each worker as
|
| 416 |
+
|
| 417 |
+
$$
|
| 418 |
+
\eta = \sqrt { \frac { f _ { 0 } - f _ { * } } { \| L \| _ { 1 } K } } , \qquad n = K .
|
| 419 |
+
$$
|
| 420 |
+
|
| 421 |
+
Assume that a fraction $\alpha < \textstyle { \frac { 1 } { 2 } }$ of the $M$ workers behave adversarially according to Definition 1. Then majority vote converges at rate:
|
| 422 |
+
|
| 423 |
+
$$
|
| 424 |
+
\left[ \frac { 1 } { K } \sum _ { k = 0 } ^ { K - 1 } \mathbb { E } \left\| g _ { k } \right\| _ { 1 } \right] ^ { 2 } \leq \frac { 4 } { \sqrt { N } } \left[ \frac { 1 } { 1 - 2 \alpha } \frac { \| \vec { \sigma } \| _ { 1 } } { \sqrt { M } } + \sqrt { \| L \| _ { 1 } ( f _ { 0 } - f ^ { * } ) } \right] ^ { 2 }
|
| 425 |
+
$$
|
| 426 |
+
|
| 427 |
+
where $N = K ^ { 2 }$ is the total number of stochastic gradient calls per worker up to step $K$ .
|
| 428 |
+
|
| 429 |
+
Proof. We need to bound the failure probability of the vote. We can then use this bound to derive a convergence rate. We will begin by showing this bound is worst when the adversary inverts the signs of the sign stochastic gradient.
|
| 430 |
+
|
| 431 |
+
Given an adversary from the class of blind multiplicative adversaries (Definition 1), the adversary may manipulate their stochastic gradient estimate $\tilde { g } _ { t }$ into the form $v _ { t } \otimes \tilde { g } _ { t }$ . Here $v _ { t }$ is a vector of the adversary’s choosing, and $\otimes$ denotes element-wise multiplication. The sign of this quantity obeys:
|
| 432 |
+
|
| 433 |
+
$$
|
| 434 |
+
\operatorname { s i g n } ( v _ { t } \otimes { \tilde { g } } _ { t } ) = \operatorname { s i g n } ( v _ { t } ) \otimes \operatorname { s i g n } ( { \tilde { g } } _ { t } ) .
|
| 435 |
+
$$
|
| 436 |
+
|
| 437 |
+
Therefore, the only thing that matters is the sign of $v _ { t }$ , and rescaling attacks are immediately nullified. For each component of the stochastic gradient, the adversary must decide (without observing $g _ { t }$ , since the adversary is blind) whether or not they would like to invert the sign of that component. We will now show that the failure probability of the vote is always larger when the adversary decides to invert (by setting every component of $\mathrm { s i g n } ( v _ { t } )$ to $^ { - 1 }$ ). Our analysis will then proceed under this worst case.
|
| 438 |
+
|
| 439 |
+
For a gradient component with true value $g$ , let random variable $Z \in [ 0 , M ]$ denote the number of correct sign bits received by the parameter server. For a given adversary, we may decompose $Z$ into the contribution from that adversary and a residual term $X$ from the remaining workers (both regular and adversarial):
|
| 440 |
+
|
| 441 |
+
$$
|
| 442 |
+
Z ( \operatorname { s i g n } ( v ) ) = X + \mathbb { I } [ \operatorname { s i g n } ( v ) \operatorname { s i g n } ( { \tilde { g } } ) = \operatorname { s i g n } ( \operatorname { g } ) ] ,
|
| 443 |
+
$$
|
| 444 |
+
|
| 445 |
+
where $\tilde { g }$ is the adversary’s stochastic gradient estimate for that component, $v$ is the adversary’s chosen scalar for that component, and $\mathbb { I }$ is the 0-1 indicator function. We are considering $\textsf { Z }$ to be a function of $\mathrm { s i g n } ( v )$ .
|
| 446 |
+
|
| 447 |
+
But by Assumption 4 and Lemma 1, we see that $\mathbb { I } [ + 1 \times \mathrm { s i g n } ( \tilde { g } ) = \mathrm { s i g n } ( \mathrm { g } ) ]$ is a Bernoulli random variable with success probability $\begin{array} { r } { p \geq \frac { 1 } { 2 } } \end{array}$ . On the other hand, $\mathbb { I } [ - 1 \times \mathrm { s i g n } ( \tilde { g } ) = \mathrm { s i g n } ( \mathrm { g } ) ]$ is a Bernoulli random variable with success probability $\begin{array} { r } { q = 1 - p \leq \frac { 1 } { 2 } } \end{array}$ .
|
| 448 |
+
|
| 449 |
+
The essential quantity in our analysis is the probability that more than half the workers provide the correct sign bit. But from the preceding discussion, this clearly obeys:
|
| 450 |
+
|
| 451 |
+
$$
|
| 452 |
+
\begin{array} { r l } { { \mathbb { P } \bigg [ Z ( + 1 ) \leq \frac { M } { 2 } \bigg ] = \mathbb { P } \bigg [ X + \mathbb { I } [ + 1 \times \mathrm { s i g n } ( \tilde { g } ) = \mathrm { s i g n } ( \mathrm { g } ) ] \leq \frac { M } { 2 } \bigg ] } } \\ & { \leq \mathbb { P } \bigg [ X + \mathbb { I } [ - 1 \times \mathrm { s i g n } ( \tilde { g } ) = \mathrm { s i g n } ( \mathrm { g } ) ] \leq \frac { M } { 2 } \bigg ] } \\ & { = \mathbb { P } \bigg [ Z ( - 1 ) \leq \frac { M } { 2 } \bigg ] . } \end{array}
|
| 453 |
+
$$
|
| 454 |
+
|
| 455 |
+
As we will see below, the implication of this is that our bounds always worse under the setting $v = - 1$ , and so we will adopt $v = - 1$ hereon. It is worth remarking that blindness in the definition of blind multiplicative adversaries is important to ensure that $\mathbb { I } [ \mathrm { s i g n } ( v ) \mathrm { s i g n } ( \tilde { g } ) = \mathrm { s i g n } ( \mathrm { g } ) ]$ is indeed a random variable as described above. Were the adversary not blind, then the adversary could in effect deterministically set $\mathrm { s i g n } ( v ) \mathrm { s i g n } ( \tilde { g } )$ . Cooperative adversaries, for example, could use this power to control the vote.
|
| 456 |
+
|
| 457 |
+
Now we restrict to our worst case blind multiplicative adversaries, that always choose to invert their sign stochastic gradient estimate. So, we have $( 1 - \alpha ) M$ good machines and $\alpha M$ adversaries. The good workers each compute a stochastic gradient estimate, take its sign and transmit this to the server. The bad workers follow an identical procedure except they negate their sign bits prior to transmission to the server. It is intuitive that because the proportion of adversaries $\begin{array} { r } { \bar { \alpha ^ { } } < \frac { 1 } { 2 } } \end{array}$ , the good workers will win the vote on average. To make this rigorous, we will need Lemma 1 and Cantelli’s inequality. Cantelli (1928) tells us that for a random variable $X$ with mean $\mu$ and variance $\sigma ^ { 2 }$ :
|
| 458 |
+
|
| 459 |
+
$$
|
| 460 |
+
\mathbb { P } [ \mu - X \geq | \lambda | ] \leq \frac { 1 } { 1 + \frac { \lambda ^ { 2 } } { \sigma ^ { 2 } } }
|
| 461 |
+
$$
|
| 462 |
+
|
| 463 |
+
For a given gradient component, again let random variable $Z \in [ 0 , M ]$ denote the number of correct sign bits received by the parameter server. Let random variables $G$ and $B$ denote the number of good and bad workers (respectively) who (possibly inadvertently) sent the correct sign bit. Then, letting $p$ be the probability that a good worker computed the correct sign bit, $q : = 1 - p$ and $\begin{array} { r } { \epsilon : = p - \frac { 1 } { 2 } } \end{array}$ we can decompose $Z$ as follows:
|
| 464 |
+
|
| 465 |
+
$$
|
| 466 |
+
\begin{array} { l } { { \displaystyle Z = G + B } } \\ { { \displaystyle G \sim \mathrm { b i n o m i a l } [ ( 1 - \alpha ) M , p ] } } \\ { { \displaystyle B \sim \mathrm { b i n o m i a l } [ \alpha M , q ] } } \\ { { \displaystyle \mathbb { E } [ Z ] = ( 1 - \alpha ) M p + \alpha M q = \frac { M } { 2 } + ( 1 - 2 \alpha ) M \epsilon } } \\ { { \displaystyle \mathrm { V a r } [ Z ] = ( 1 - \alpha ) M p q + \alpha M p q = M \biggl ( \frac { 1 } { 4 } - \epsilon ^ { 2 } \biggr ) . } } \end{array}
|
| 467 |
+
$$
|
| 468 |
+
|
| 469 |
+
The vote only fails if $Z < \frac { M } { 2 }$ which happens with probability
|
| 470 |
+
|
| 471 |
+
since $1 + x ^ { 2 } \geq 2 x$
|
| 472 |
+
|
| 473 |
+
$$
|
| 474 |
+
\begin{array} { r l } { \mathbb { P } \bigg [ Z \leq \frac { M } { 2 } \bigg ] = \mathbb { P } \bigg [ \mathbb { E } [ Z ] - Z \geq \mathbb { E } [ Z ] - \frac { M } { 2 } \bigg ] } & { } \\ { \leq \frac { 1 } { 1 + \frac { ( \frac { 2 } { \sqrt { | Z | } - \frac { M } { \delta } \big ] ^ { 2 } } } { \sqrt { \kappa ( \frac { \sqrt { | Z | } } { \delta } ) ^ { 2 } } } } } & { } \\ { \leq \frac { 1 } { 2 } \sqrt { \frac { \mathbb { V } \times [ Z ] } { ( \mathbb { E } [ Z ] - \frac { M } { 2 } ) ^ { 2 } } } } & { } \\ { = \frac { 1 } { 2 } \sqrt { \frac { M \big ( \frac { 1 } { 4 } - \epsilon ^ { 2 } \big ) } { ( 1 - 2 \alpha ) ^ { 2 } M ^ { 2 } \epsilon ^ { 2 } } } } & { } \\ { = \frac { 1 } { 2 } \frac { \sqrt { \frac { 1 } { 4 \epsilon ^ { 2 } } - 1 } } { ( 1 - 2 \alpha ) \sqrt { M } } } & { } \end{array}
|
| 475 |
+
$$
|
| 476 |
+
|
| 477 |
+
by Cantelli’s inequality
|
| 478 |
+
|
| 479 |
+
We now need to substitute in a bound on $\epsilon$ . Assumption 4 and Lemma 1 tell us that
|
| 480 |
+
|
| 481 |
+
$$
|
| 482 |
+
\epsilon = \frac { 1 } { 2 } - q \geq \left\{ \begin{array} { l l } { \frac { 1 } { 2 } - \frac { 2 } { 9 } \frac { 1 } { S ^ { 2 } } \quad } & { \mathrm { i f } \ : S > \frac { 2 } { \sqrt { 3 } } , } \\ { \frac { S } { 2 \sqrt { 3 } } \quad } & { \mathrm { o t h e r w i s e . } } \end{array} \right.
|
| 483 |
+
$$
|
| 484 |
+
|
| 485 |
+
Froand $\begin{array} { r } { \frac { 1 } { 4 \epsilon ^ { 2 } } - 1 \le \frac { 3 } { S ^ { 2 } } - 1 < \frac { 4 } { S ^ { 2 } } } \end{array}$ t 142 − 1 < 4S2 as follows. First take the case S ≤ the case $S > \frac { 2 } { \sqrt { 3 } }$ . Then $\epsilon \geq \frac { 1 } { 2 } - \frac { 2 } { 9 } \frac { 1 } { S ^ { 2 } }$ Then and $\begin{array} { r } { \epsilon ^ { 2 } \geq \frac { S ^ { 2 } } { 1 2 } } \end{array}$ $\begin{array} { r } { \frac { 1 } { 4 \epsilon ^ { 2 } } - 1 \leq \frac { 1 } { S ^ { 2 } } \frac { \frac { 8 } { 9 } - \frac { 1 6 } { 8 1 } \frac { 1 } { S ^ { 2 } } } { 1 - \frac { 8 } { 9 } \frac { 1 } { S ^ { 2 } } + \frac { 1 6 } { 8 1 } \frac { 1 } { S ^ { 4 } } } < \frac { 1 } { S ^ { 2 } } \frac { \frac { 8 } { 9 } } { 1 - \frac { 8 } { 9 } \frac { 1 } { S ^ { 2 } } } < \frac { 4 } { S ^ { 2 } } } \end{array}$ by the condition on $S$ .
|
| 486 |
+
|
| 487 |
+
We have now completed the first part of the proof by showing the key statement that for the $i ^ { t h }$ gradient component with signal to noise ratio $\begin{array} { r } { S _ { i } : = \frac { | g _ { i } | } { \sigma _ { i } } } \end{array}$ |gi| , the failure probability of the majority vote is bounded by
|
| 488 |
+
|
| 489 |
+
$$
|
| 490 |
+
\mathbb { P } [ \mathrm { v o t e ~ f a i l s ~ f o r ~ } i ^ { t h } \mathrm { \ c o o r d i n a t e } ] = \mathbb { P } \bigg [ Z _ { i } \leq \frac { M } { 2 } \bigg ] \leq \frac { 1 } { ( 1 - 2 \alpha ) \sqrt { M } S _ { i } }
|
| 491 |
+
$$
|
| 492 |
+
|
| 493 |
+
The second stage of the proof will proceed by straightforwardly substituting this bound into the convergence analysis of SIGNSGD from Bernstein et al. (2018).
|
| 494 |
+
|
| 495 |
+
First let’s bound the improvement of the objective during a single step of the algorithm for one instantiation of the noise. I[.] is the indicator function, ${ g } _ { k , i }$ denotes the $i ^ { t h }$ component of the true gradient $g ( x _ { k } )$ and $\mathrm { s i g n } ( V _ { k } )$ is the outcome of the vote at the $k ^ { t h }$ iteration.
|
| 496 |
+
|
| 497 |
+
First take Assumption 2, plug in the step from Algorithm 1, and decompose the improvement to expose the error induced by stochasticity and adversarial workers:
|
| 498 |
+
|
| 499 |
+
$$
|
| 500 |
+
\begin{array} { r l } { f _ { k + 1 } - f _ { k } \le g _ { k } ^ { T } ( x _ { k + 1 } - x _ { k } ) + \displaystyle \sum _ { i = 1 } ^ { d } \frac { L _ { i } } { 2 } ( x _ { k + 1 } - x _ { k } ) _ { i } ^ { 2 } } & { } \\ { \displaystyle = - \eta g _ { k } ^ { T } \mathrm { s i g n } ( V _ { k } ) + \eta ^ { 2 } \sum _ { i = 1 } ^ { d } \frac { L _ { i } } { 2 } } & { } \\ { \displaystyle = - \eta \| g _ { k } \| _ { 1 } + \frac { \eta ^ { 2 } } { 2 } \| \vec { L } \| _ { 1 } + 2 \eta \displaystyle \sum _ { i = 1 } ^ { d } | g _ { k , i } | \mathbb { I } [ \mathrm { s i g n } ( V _ { k , i } ) \neq \mathrm { s i g n } ( g _ { k , i } ) ] } & { } \end{array}
|
| 501 |
+
$$
|
| 502 |
+
|
| 503 |
+
Next we find the expected improvement at time $k + 1$ conditioned on the previous iterate.
|
| 504 |
+
|
| 505 |
+
$$
|
| 506 |
+
\mathbb { E } [ f _ { k + 1 } - f _ { k } | x _ { k } ] \leq - \eta \| g _ { k } \| _ { 1 } + \frac { \eta ^ { 2 } } { 2 } \| \vec { L } \| _ { 1 } + 2 \eta \sum _ { i = 1 } ^ { d } | g _ { k , i } | \operatorname { \mathbb { P } } [ \mathrm { s i g n } ( V _ { k , i } ) \neq \mathrm { s i g n } ( g _ { k , i } ) ]
|
| 507 |
+
$$
|
| 508 |
+
|
| 509 |
+
From $( \star )$ , we have that the probability of the vote failing for the $i ^ { t h }$ coordinate is bounded by
|
| 510 |
+
|
| 511 |
+
$$
|
| 512 |
+
\mathbb { P } [ \mathrm { s i g n } ( V _ { k , i } ) \neq \mathrm { s i g n } ( g _ { k , i } ) ] \leq \frac { \sigma _ { k , i } } { ( 1 - 2 \alpha ) \sqrt { M } | g _ { k , i } | }
|
| 513 |
+
$$
|
| 514 |
+
|
| 515 |
+
where $\sigma _ { k , i }$ refers to the variance of the $k ^ { t h }$ stochastic gradient estimate, computed over a mini-batch√ of size $n$ . Therefore, by Assumption 3, we have that $\bar { \sigma } _ { k , i } \leq \sigma _ { i } / \sqrt { n }$ .
|
| 516 |
+
|
| 517 |
+
We now substitute these results and our learning rate and mini-batch settings into the expected improvement:
|
| 518 |
+
|
| 519 |
+
$$
|
| 520 |
+
\begin{array} { l } { \displaystyle \mathbb { E } [ f _ { k + 1 } - f _ { k } | x _ { k } ] \leq - \eta \| g _ { k } \| _ { 1 } + \frac { 2 \eta } { \sqrt { n } } \frac { \| \vec { \sigma } \| _ { 1 } } { ( 1 - 2 \alpha ) \sqrt { M } } + \frac { \eta ^ { 2 } } { 2 } \| \vec { L } \| _ { 1 } } \\ { \displaystyle \qquad = - \sqrt { \frac { f _ { 0 } - f _ { * } } { \| L \| _ { 1 } K } } \| g _ { k } \| _ { 1 } + 2 \sqrt { \frac { f _ { 0 } - f _ { * } } { \| L \| _ { 1 } K ^ { 2 } } } \frac { \| \vec { \sigma } \| _ { 1 } } { ( 1 - 2 \alpha ) \sqrt { M } } + \frac { f _ { 0 } - f _ { * } } { 2 K } } \end{array}
|
| 521 |
+
$$
|
| 522 |
+
|
| 523 |
+
Now extend the expectation over randomness in the trajectory, and perform a telescoping sum over the iterations:
|
| 524 |
+
|
| 525 |
+
$$
|
| 526 |
+
\begin{array} { r l } { f _ { 0 } - f ^ { * } \geq f _ { 0 } - \mathbb { E } [ f _ { K } ] } & { } \\ & { \qquad = \displaystyle \sum _ { k = 0 } ^ { K - 1 } \mathbb { E } [ f _ { k } - f _ { k + 1 } ] } \\ & { \qquad \geq \displaystyle \sum _ { k = 0 } ^ { K - 1 } \mathbb { E } \left[ \sqrt { \frac { f _ { 0 } - f _ { * } } { \| L \| _ { 1 } K } } \| g _ { k } \| _ { 1 } - 2 \sqrt { \frac { f _ { 0 } - f _ { * } } { \| L \| _ { 1 } K ^ { 2 } } } \frac { \| \vec { \sigma } \| _ { 1 } } { ( 1 - 2 \alpha ) \sqrt { M } } - \frac { f _ { 0 } - f _ { * } } { 2 K } \right] } \\ & { \qquad = \displaystyle \sqrt { \frac { K ( f _ { 0 } - f _ { * } ) } { \| L \| _ { 1 } } } \mathbb { E } \left[ \frac { 1 } { K } \sum _ { k = 0 } ^ { K - 1 } \| g _ { k } \| _ { 1 } \right] - 2 \sqrt { \frac { f _ { 0 } - f _ { * } } { \| L \| _ { 1 } } } \frac { \| \vec { \sigma } \| _ { 1 } } { ( 1 - 2 \alpha ) \sqrt { M } } - \frac { f _ { 0 } - f _ { * } } { 2 } } \end{array}
|
| 527 |
+
$$
|
| 528 |
+
|
| 529 |
+
We can rearrange this inequality to yield the rate:
|
| 530 |
+
|
| 531 |
+
$$
|
| 532 |
+
\frac { 1 } { K } \sum _ { k = 0 } ^ { K - 1 } \mathbb { E } \| g _ { k } \| _ { 1 } \leq \frac { 1 } { \sqrt { K } } \bigg [ 2 \frac { \| \vec { \sigma } \| _ { 1 } } { ( 1 - 2 \alpha ) \sqrt { M } } + \frac { 3 } { 2 } \sqrt { \| L \| _ { 1 } ( f _ { 0 } - f ^ { * } ) } \bigg ]
|
| 533 |
+
$$
|
| 534 |
+
|
| 535 |
+
$$
|
| 536 |
+
\mathbb { E } \bigg [ \frac { 1 } { K } \sum _ { k = 0 } ^ { K - 1 } \| g _ { k } \| _ { 1 } \bigg ] \leq \frac { 1 } { \sqrt { K } } \bigg [ \frac { 3 } { 2 } \sqrt { \| L \| _ { 1 } } ( f _ { 0 } - f _ { * } ) + 2 \| \vec { \sigma } \| _ { 1 } \bigg ]
|
| 537 |
+
$$
|
| 538 |
+
|
| 539 |
+
Since we are growing our mini-batch size, it will take $N = O ( K ^ { 2 } )$ gradient calls to reach step $K$ Substitute this in on the right hand side, square the result, use that ${ \frac { 3 } { 2 } } < 2$ , and we are done:
|
| 540 |
+
|
| 541 |
+
$$
|
| 542 |
+
\left[ \frac { 1 } { K } \sum _ { k = 0 } ^ { K - 1 } \mathbb { E } \left\| g _ { k } \right\| _ { 1 } \right] ^ { 2 } \leq \frac { 4 } { \sqrt { N } } \left[ \frac { \| \vec { \sigma } \| _ { 1 } } { ( 1 - 2 \alpha ) \sqrt { M } } + \sqrt { \| L \| _ { 1 } ( f _ { 0 } - f ^ { * } ) } \right] ^ { 2 }
|
| 543 |
+
$$
|
md/train/Bke96sC5tm/Bke96sC5tm.md
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SOLAR: DEEP STRUCTURED REPRESENTATIONS FOR MODEL-BASED REINFORCEMENT LEARNING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Model-based reinforcement learning (RL) methods can be broadly categorized as global model methods, which depend on learning models that provide sensible predictions in a wide range of states, or local model methods, which iteratively refit simple models that are used for policy improvement. While predicting future states that will result from the current actions is difficult, local model methods only attempt to understand system dynamics in the neighborhood of the current policy, making it possible to produce local improvements without ever learning to predict accurately far into the future. The main idea in this paper is that we can learn representations that make it easy to retrospectively infer simple dynamics given the data from the current policy, thus enabling local models to be used for policy learning in complex systems. We evaluate our approach against other model-based and model-free RL methods on a suite of robotics tasks, including a manipulation task on a real Sawyer robotic arm directly from camera images.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Model-based reinforcement learning (RL) methods use learned models in a variety of ways, such as planning (Levine & Abbeel, 2014; Deisenroth et al., 2014) and generating synthetic experience (Sutton, 1990). We can categorize model-based algorithms as either global model methods, where models are used for planning and trained to give accurate predictions for a wide range of states, or local model methods, where simple models provide gradient directions that are used for policy improvement. On simple, low-dimensional tasks, model-based approaches have demonstrated remarkable data efficiency, learning policies for systems like cart-pole swing-up with under 30 seconds of experience (Deisenroth et al., 2014; Moldovan et al., 2015). However, for more complex systems, one of the main difficulties in applying model-based methods is model bias: local models will often underfit complex systems, but may still be preferred over global models which tend to overfit in the low-data regime and may be difficult to incorporate into control methods (Deisenroth et al., 2014).
|
| 12 |
+
|
| 13 |
+
Most global model methods use the model to make forward predictions and then backpropagate through those predictions. However, this places a heavy burden on the dynamics model, and forward prediction often suffers from significant drift over longer trajectories. In contrast, local models are typically only used to provide gradient directions for local policy improvement (Levine & Abbeel, 2014), and thus a common choice for local model methods is to use linear models, which can themselves be interpreted as gradients. As illustrated in Figure 1, in our work, we present a method that automatically encourages learning representations where linear models better fit the data. From this, we devise an efficient local model method based on the linear-quadratic regulator (LQR) (Camacho & Bordons, 1997; Todorov & Li, 2005; Levine & Abbeel, 2014) that utilizes linear models for gradient directions for policy improvement. Our motivation is similar to that of Watter et al. (2015); Finn et al. (2016); however, as discussed in section 5, our representation learning method specifically allows us to construct a local model method that performs inference in the latent space in order to improve the policy, rather than focusing on forward prediction and planning.
|
| 14 |
+
|
| 15 |
+
Our main contribution is a representation learning and model-based RL procedure, which we term stochastic optimal control with latent representations (SOLAR), which jointly optimizes a latent representation and model such that inference produces local linear models that provide good gradient directions for policy improvement. We demonstrate empirically in section 6 that SOLAR is able to learn policies directly from raw, high-dimensional observations in several robotic environments including a simulated nonholonomic car, a simulated two degree-of-freedom (DoF) arm, and a real 7-DoF Sawyer arm, all of which are learned directly from image pixels. We compare to existing state-of-the-art RL methods and show that SOLAR, while significantly more data efficient than model-free methods, exhibits superior performance compared to other model-based methods.
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: (a) A pictoral depiction of a trajectory for a one-dimensional system. (b) Global models may be used for prediction or planning forward through time, as depicted in red, but this can suffer from trajectory drift for complex systems. (c) Local linear models are fit to trajectories and do not suffer from drift, but may fit the system poorly for complicated interactions such as contacts, as illustrated by the poor model fit circled in gray. (d) Our method finds an embedding of observed trajectories into a latent space where local linear models produce a better fit.
|
| 19 |
+
|
| 20 |
+
# 2 PRELIMINARIES
|
| 21 |
+
|
| 22 |
+
We first formalize our problem setting as a Markov decision process (MDP) $M = ( S , { \mathcal { A } } , p , C , \rho , T )$ , where the state space $s$ , action space $\mathcal { A }$ , and horizon $T$ are known, but the dynamics function $p ( \mathbf { s } _ { t + 1 } | \mathbf { s } _ { t } , \mathbf { a } _ { t } )$ , cost function ${ \cal C } ( \mathbf { s } _ { t } , \mathbf { a } _ { t } )$ , and initial state distribution $\rho ( \mathbf { s } _ { 0 } )$ are unknown. The goal of reinforcement learning is to optimize a policy $\pi ( \mathbf { a } _ { t } | \mathbf { s } _ { t } )$ to minimize the expected sum of costs $\begin{array} { r } { \eta [ \pi ] = \mathbb { E } _ { \pi , p , \rho } \left[ \sum _ { t = 0 } ^ { T } C ( \mathbf { s } _ { t } , \mathbf { a } _ { t } ) \right] } \end{array}$ under the distribution induced by the initial state distribution, dynamics function, and policy. Model-based methods decompose this problem into policy and model optimization subproblems, and we discuss each subproblem as it relates to our approach.
|
| 23 |
+
|
| 24 |
+
# 2.1 MODEL-BASED POLICY SEARCH
|
| 25 |
+
|
| 26 |
+
Policy search methods directly optimize parameterized policies with respect to $\eta ( \theta ) \triangleq \eta [ \pi _ { \theta } ]$ where the parameters $\theta$ may be, for example, weights in a neural network or matrices for a linear policy. Model-based policy search methods typically build models $\left( { \hat { \rho } } , { \hat { p } } , { \hat { C } } \right)$ of the unknown quantities and compute the gradient of $\begin{array} { r } { \hat { \eta } ( \theta ) \triangleq \mathbb { E } _ { \pi _ { \theta } , \hat { p } , \hat { \rho } } \left[ \sum _ { t = 0 } ^ { T } \hat { C } ( \mathbf { s } _ { t } , \mathbf { a } _ { t } ) \right] } \end{array}$ with this model. One particularly tractable model is the linear-quadratic system (LQS), which models the initial state distribution as Gaussian, the dynamics as time-varying linear-Gaussian (TVLG), and the cost as quadratic, i.e.,
|
| 27 |
+
|
| 28 |
+
$$
|
| 29 |
+
\hat { p } ( { \mathbf s } _ { t + 1 } | { \mathbf s } _ { t } , { \mathbf a } _ { t } ) = \mathcal { N } \left( { \mathbf s } _ { t + 1 } \left| \begin{array} { l } { { \mathbf F } _ { t } \left[ \mathbf { s } _ { t } \right] , \Sigma _ { t } \right) , \quad \hat { C } ( { \mathbf s } _ { t } , { \mathbf a } _ { t } ) = \frac { 1 } { 2 } \left[ \mathbf { \bar { a } } _ { t } \right] ^ { \top } { \mathbf C } \left[ \mathbf { \bar { a } } _ { t } \right] + { \mathbf c } ^ { \top } \left[ \mathbf { \bar { a } } _ { t } \right] . } \end{array} \right.
|
| 30 |
+
$$
|
| 31 |
+
|
| 32 |
+
Any deterministic policy operating in an environment with smooth dynamics can be locally modeled with a time-varying LQS (Boyd & Vandenberghe, 2004), while low-entropy stochastic policies are modeled approximately. This makes the time-varying LQS a reasonable local model for many dynamical systems. Furthermore, the optimal policy at any time step given the model is a linear function of the state and the optimal maximum-entropy policy is linear-Gaussian (Tassa et al., 2012; Levine & Koltun, 2013). As shown in Jacobson & Mayne (1970); Todorov & Li (2005), these optimal policies can be computed in closed form using dynamic programming by computing the first and second derivatives of the Q (cost-to-go) and value functions:
|
| 33 |
+
|
| 34 |
+
$$
|
| 35 |
+
\begin{array} { r l r } & { Q _ { \tilde { { \mathbf { s } } } , t } = { \mathbf { c } } _ { \tilde { { \mathbf { s } } } , t } + { \mathbf { F } } _ { \tilde { { \mathbf { s } } } , t } ^ { \top } V _ { { \mathbf { s } } , t + 1 } , } & { Q _ { \tilde { { \mathbf { s } } } { \mathbf { s } } , t } = { \mathbf { C } } _ { \tilde { { \mathbf { s } } } { \mathbf { s } } , t } + { \mathbf { F } } _ { \tilde { { \mathbf { s } } } { \mathbf { s } } , t } ^ { \top } V _ { { \mathbf { s } } { \mathbf { s } } , t + 1 } { \mathbf { F } } _ { \tilde { { \mathbf { s } } } { \mathbf { s } } , t } , } \\ & { V _ { { \mathbf { s } } , t } = Q _ { { \mathbf { s } } , t } - Q _ { { \mathbf { s } } { \mathbf { a } } , t } Q _ { { \mathbf { a } } { \mathbf { a } } , t } ^ { - 1 } Q _ { { \mathbf { a } } , t } , } & { V _ { { \mathbf { s } } { \mathbf { s } } , t } = Q _ { { \mathbf { s } } { \mathbf { s } } , t } - Q _ { { \mathbf { s } } { \mathbf { a } } , t } Q _ { { \mathbf { a } } { \mathbf { a } } , t } ^ { - 1 } Q _ { { \mathbf { a } } { \mathbf { s } } , t } . } \end{array}
|
| 36 |
+
$$
|
| 37 |
+
|
| 38 |
+
Here, similar to Tassa et al. (2012), we use subscripts to denote derivatives, and we use $\tilde { \mathbf { s } }$ to abbreviate h s a i . Once these values are computed, the optimal maximum-entropy policy is TVLG, i.e.,
|
| 39 |
+
|
| 40 |
+
$$
|
| 41 |
+
\begin{array} { r } { \pi _ { \theta } ( \mathbf { a } _ { t } | \mathbf { s } _ { t } ) = \mathcal { N } \left( \mathbf { K } _ { t } \mathbf { s } _ { t } + \mathbf { k } _ { t } , \mathbf { S } _ { t } \right) \mathrm { , ~ w h e r e } \mathbf { K } _ { t } = - Q _ { \mathbf { a a } , t } ^ { - 1 } Q _ { \mathbf { a s } , t } \mathrm { , ~ } \mathbf { k } _ { t } = - Q _ { \mathbf { a a } , t } ^ { - 1 } Q _ { \mathbf { a } , t } \mathrm { , ~ } \mathbf { S } _ { t } = - Q _ { \mathbf { a a } , t } ^ { - 1 } \mathrm { . } } \end{array}
|
| 42 |
+
$$
|
| 43 |
+
|
| 44 |
+
We refer the reader to Appendix A and Levine & Abbeel (2014) for further details. Prior work assumes access to a compact, low-dimensional state representation (Deisenroth et al., 2014; Levine & Abbeel, 2014; Nagabandi et al., 2018), and as we show in section 6, this precludes these local model methods from operating on complex observations such as images. In subsection 2.2 and section 3, we describe a probabilistic latent variable model and variational inference procedure that, conditioned on a full trajectory of observations, produces local models that can be used for policy improvement, enabling us to utilize this local model method in image-based domains.
|
| 45 |
+
|
| 46 |
+
# 2.2 LEARNING LATENT DYNAMICS MODELS
|
| 47 |
+
|
| 48 |
+
The local model-based method described above requires us to learn both a quadratic cost function as well as a linear dynamical system (LDS). We utilize the Bayesian LDS model, which is given by
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\begin{array} { r l } & { \mu _ { \hat { \rho } } , \Sigma _ { \hat { \rho } } \sim \mathcal { N } T \mathcal { W } ( \Psi , \nu , \mu _ { 0 } , \kappa ) , \quad \mathbf { F } _ { t } , \Sigma _ { t } \sim \mathcal { M N T W } ( \Psi , \nu , M _ { 0 } , V ) \mathrm { ~ f o r ~ } t \in [ 0 , \dots , T - 1 ] , } \\ & { \mathbf { s } _ { 0 } \mid \mu _ { \hat { \rho } } , \Sigma _ { \hat { \rho } } \sim \mathcal { N } ( \mu _ { \hat { \rho } } , \Sigma _ { \hat { \rho } } ) , \qquad \mathbf { s } _ { t + 1 } \mid \mathbf { s } _ { t } , \mathbf { a } _ { t } \sim \mathcal { N } \left( \mathbf { F } _ { t } \left[ \mathbf { a } _ { t } \right] , \Sigma _ { t } \right) \mathrm { ~ f o r ~ } t \in [ 0 , \dots , T - 1 ] , } \end{array}
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
Where $\mathcal { N T } \mathcal { W }$ is the normal-inverse-Wishart distribution and $\mathcal { M N T } \mathcal { W }$ is the matrix normal-inverseWishart (MNIW) distribution. This probabilistic graphical model (PGM) allows for tractable approximate inference, i.e., Bayesian linear regression, and also captures uncertainty in the form of a posterior distribution over the initial state and dynamics. However, for dynamical systems with complex non-linear dynamics, this model still suffers from significant bias.
|
| 55 |
+
|
| 56 |
+
Even when the system is poorly modeled by an LDS in the state space, we might be able to find a latent embedding and model the system as approximately linear in that latent space, which may allow us to find a better-performing policy that operates in the learned latent space. This shifts our problem setting to that of a partially observed MDP, as we do not observe the latent state. In particular, our modeling assumption is that we receive an observation as generated from an underlying unobserved state, and as discussed in section 3, we address this by training a recognition model to infer the latent state. In our experiments in section 6, we provide several observations to our recognition model in order to infer information that cannot be observed from a single observation, such as velocity. We can jointly train an embedding and model using the SVAE framework (Johnson et al., 2016), which allows us to combine arbitrary embedding functions, such as neural networks, with PGMs. The model we build off of is a version of the LDS SVAE presented in Johnson et al. (2016) and is given by
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\begin{array} { r l } & { \mu _ { \hat { \rho } } , \Sigma _ { \hat { \rho } } \sim \mathcal { N } \mathcal { D } \mathcal { W } ( \Psi , \nu , \mu _ { 0 } , \kappa ) , \quad \mathbf { F } _ { t } , \Sigma _ { t } \sim \mathcal { M } \mathcal { N } \mathcal { D } ( \Psi , \nu , M _ { 0 } , V ) \mathrm { ~ f o r ~ } t \in [ 0 , \dots , T - 1 ] , } \\ & { \mathbf { z } _ { 0 } \mid \mu _ { \hat { \rho } } , \Sigma _ { \hat { \rho } } \sim \mathcal { N } ( \mu _ { \hat { \rho } } , \Sigma _ { \hat { \rho } } ) , \qquad \mathbf { z } _ { t + 1 } \mid \mathbf { z } _ { t } , \mathbf { a } _ { t } \sim \mathcal { N } \left( \mathbf { F } _ { t } \left[ \mathbf { z } _ { t } \right] , \Sigma _ { t } \right) \mathrm { ~ f o r ~ } t \in [ 0 , \dots , T - 1 ] , } \\ & { \mathbf { s } _ { t } \mid \mathbf { z } _ { t } \sim f _ { \gamma } \left( \mathbf { z } _ { t } \right) \mathrm { ~ f o r ~ } t \in [ 0 , \dots , T ] , } \end{array}
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
Where $f _ { \gamma } ( \mathbf { z } )$ is an observation model, parameterized by neural network weights $\gamma$ , that outputs a distribution over s, e.g., Gaussian or Bernoulli, depending on the nature of the data. This is very similar to the Bayesian LDS, except we are learning the PGM in the latent space.
|
| 63 |
+
|
| 64 |
+
Though this model does not admit the same efficient approximate inference algorithms when $f _ { \gamma }$ is nonlinear, an efficient variational inference algorithm has previously been derived by Johnson et al. (2016). We describe the relevant aspects of this algorithm in the next section.
|
| 65 |
+
|
| 66 |
+
# 3 LEARNING AND MODELING THE LATENT SPACE
|
| 67 |
+
|
| 68 |
+
In this section, we describe how we extend the LDS SVAE for model-based RL, such that we learn an action-conditioned LQS model in the latent space. This then enables a local model method that can leverage the LQS to infer the dynamics of sampled trajectories. In this way, our model-based RL algorithm circumvents the need for forward prediction, in contrast to model-based RL methods that use model-based rollouts or planning (Nagabandi et al., 2018; Deisenroth et al., 2014). In section 4, we describe how these components are combined into our final method, SOLAR.
|
| 69 |
+
|
| 70 |
+
Our goal with this model is to learn a latent representation of the state and a prior over the dynamics in this latent representation that is suitable for fitting local dynamics models via posterior inference. Specifically, we are interested in the setting where we have access to trajectories of the form $\left[ \mathbf { s } _ { 0 } , \mathbf { a } _ { 0 } , c _ { 0 } , \ldots , \mathbf { s } _ { T - 1 } , \mathbf { a } _ { T - 1 } , c _ { T - 1 } , \mathbf { s } _ { T } \right]$ , sampled from the system using our current policy and set of previous policies. Our aim is to infer local linear dynamics in the neighborhood of these trajectories, and we learn a model that makes this fitting process more accurate for the observed trajectories, thus enabling our local model method to find good directions for policy improvement.
|
| 71 |
+
|
| 72 |
+

|
| 73 |
+
Figure 2: Left: The LQS graphical model. Distributions for each node are as specified in Equation 2-Equation 4, with additional deterministic nodes for observed costs. Right: The variational family we use for our model learning algorithm, with distributions given in Equation 5.
|
| 74 |
+
|
| 75 |
+
We build upon the variational inference algorithm presented in Johnson et al. (2016), such that we are maximizing, with respect to both the PGM and neural network parameters, the variational lower bound (ELBO) of our observed data. This algorithm requires variational factors of the form
|
| 76 |
+
|
| 77 |
+
$$
|
| 78 |
+
\begin{array} { r } { q ( \mathbf { z } _ { t } \mid \mathbf { s } _ { t } ) = \mathcal { N } \left( e _ { \phi } \left( \mathbf { s } _ { t } \right) \right) , q ( \mathbf { F } _ { t } , \Sigma _ { t } ) = \mathcal { M } \mathcal { N } \mathcal { Z } \mathcal { W } ( \Psi _ { t } ^ { \prime } , \nu _ { t } ^ { \prime } , M _ { 0 t } ^ { \prime } , V _ { t } ^ { \prime } ) \mathrm { ~ f o r ~ } t \in \left[ 0 , \dots , T - 1 \right] . } \end{array}
|
| 79 |
+
$$
|
| 80 |
+
|
| 81 |
+
$e _ { \phi } ( \mathbf { s } )$ is a recognition model, parameterized by neural network weights $\phi$ , that outputs the mean and diagonal covariance of a Gaussian distribution over $\mathbf { z }$ . This recognition model is identical to that used in Kingma & Welling (2014); Rezende et al. (2014); Gao et al. (2016), however, as with prior work in the LDS SVAE, we also have variational factors of the form $q ( \mathbf { F } _ { t } , \Sigma _ { t } )$ , which represent our posterior belief about the system dynamics after observing the collected data. We also model this distribution as MNIW but with updated parameters compared to the prior from Equation 2. Given this, we can formulate the variational lower bound (ELBO) which is given by
|
| 82 |
+
|
| 83 |
+
$$
|
| 84 |
+
\begin{array} { l } { { \displaystyle { \mathcal { L } } = { \mathbb { E } } _ { q } [ \log \frac { p ( \{ \mathbf { F } , \Sigma \} _ { t = 0 } ^ { T - 1 } , \{ \mathbf { s } _ { t } \} _ { t = 0 } ^ { T } , \{ \mathbf { a } _ { t } \} _ { t = 0 } ^ { T - 1 } , \mathbf { z } _ { t } \} _ { t = 0 } ^ { T } ) } { q ( \{ \mathbf { F } _ { t } , \Sigma _ { t } \} _ { t = 0 } ^ { T - 1 } , \{ \mathbf { z } _ { t } \} _ { t = 0 } ^ { T } | \mathbf { s } _ { t } ) | \{ \mathbf { s } _ { t } \} _ { t = 0 } ^ { T } ] } } \ ~ } \\ { { \displaystyle ~ = { \mathbb { E } } _ { q } [ \log ( \prod _ { t = 0 } ^ { T } p _ { \gamma } ( \mathbf { s } _ { t } | \mathbf { z } _ { t } ) ) ] } \ ~ } \\ { { \displaystyle ~ - \sum _ { t = 0 } ^ { T - 1 } \mathrm { K L } ( q ( \mathbf { F } _ { t } , \Sigma _ { t } ) \| p ( \mathbf { F } , \Sigma ) ) - \sum _ { t = 1 } ^ { T } \mathbb { E } _ { q } [ \mathrm { K L } ( q _ { \phi } ( \mathbf { z } _ { t } | \mathbf { s } _ { t } ) \| p ( \mathbf { z } _ { t } | \mathbf { z } _ { t - 1 } , \mathbf { a } _ { t - 1 } , \mathbf { F } _ { t } , \Sigma _ { t } ) ] . } \ } \end{array}
|
| 85 |
+
$$
|
| 86 |
+
|
| 87 |
+
Prior work has shown that, for conjugate exponential models such as the Bayesian LDS, the variational model parameters can be updated using natural gradients, which can be computed in closed form using the variational message passing framework (Winn & Bishop, 2005). Specifically, letting $\lambda$ denote the MNIW parameters of the variational factors on $\{ \mathbf { F } _ { t } , \Sigma _ { t } \} _ { t }$ , the natural gradient update is
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
\tilde { \nabla } _ { \lambda } \mathcal { L } = \lambda ^ { 0 } + B \mathbb { E } _ { q } \left[ t _ { \mathbf { F } , \Sigma } ( \mathbf { F } , \Sigma ) \right] - \lambda ,
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
Where $B$ is the number of minibatches in the dataset, $\lambda ^ { 0 }$ is the parameter for the prior distribution $p ( \mathbf { F } , \Sigma )$ , and $t _ { \mathbf { F } , \Sigma } ( \mathbf { F } , \Sigma )$ is the sufficient statistic function for $p ( \mathbf { F } , \Sigma )$ . Thus, we can use this equation to compute the natural gradient update for $\lambda$ , whereas for $\gamma$ and $\phi$ we use stochastic gradient updates on Monte Carlo estimates of the ELBO, specifically using the Adam optimization scheme (Kingma & Ba, 2015). This leads to two simultaneous optimizations for the PGM parameters and the neural network parameters, and their learning rates are treated as separate hyperparameters. We have found $1 0 ^ { - 3 }$ and $1 0 ^ { - 4 }$ to be generally suitable for the natural gradient and Adam updates, respectively.
|
| 94 |
+
|
| 95 |
+
# Algorithm 1 SOLAR
|
| 96 |
+
|
| 97 |
+
<table><tr><td></td><td>1:Hyperparameters: # iterations K,# trajectories N,model training buffer size B</td></tr><tr><td></td><td>(0)</td></tr><tr><td>3:</td><td>for iteration k ∈{1,...,K} do</td></tr><tr><td>4:</td><td>(i) N )=1</td></tr><tr><td>5:</td><td>M(b)← MODELUPDATE(M(k-1), {D(i)}k=k-B) (section 3)</td></tr><tr><td>6:</td><td></td></tr><tr><td>7:</td><td>{F(), (k) )}t ← INFERDYNAMICs(D(k),M(k)) (subsection 4.1) 1 t ,</td></tr><tr><td>8: T0 9:</td><td>←POLICYUPDATE(( (k) (k-1) ,{F(), , end for</td></tr></table>
|
| 98 |
+
|
| 99 |
+
Figure 2 details the graphical model presented in Equation 2-Equation 4 along with the variational family described above. Since we are interested in control and RL, there is the added notion of observed costs from the environment, and there are many ways we could model these additional observations. A natural choice is to model costs as a quadratic function of the latent state and action, such that we arrive at the LQS presented in Equation 1 except in the learned latent space. Specifically, given trajectories of the form $\left[ \mathbf { s } _ { 0 } , \mathbf { a } _ { 0 } , c _ { 0 } , \ldots , \mathbf { s } _ { T - 1 } , \mathbf { a } _ { T - 1 } , c _ { T - 1 } , \mathbf { s } _ { T } \right]$ , we first embed the observations $\left\{ \mathbf { s } _ { t } \right\}$ using the mean of our recognition model $\mu ( e _ { \phi } ( \mathbf { s } ) )$ to obtain a set of latent states $\left\{ { \bf z } _ { t } \right\}$ . We then model our cost samples as $\begin{array} { r } { c _ { t } = \frac { 1 } { 2 } \mathbf { z } _ { t } ^ { \top } \mathbf { L } \mathbf { L } ^ { \top } \mathbf { z } _ { t } + \mathbf { c } ^ { \top } \mathbf { z } _ { t } + \alpha \| \mathbf { a } _ { t } \| _ { 2 } ^ { 2 } + b , } \end{array}$ , where we assume that the action-dependent part of the cost is known and we learn L, c, and $b$ by minimizing the mean-squared error of the observed costs with stochastic gradient descent. $\mathbf { L }$ is a lower-triangular matrix with strictly positive diagonal entries, and thus by constructing our cost matrix as $\mathbf { C } = \mathbf { L } \mathbf { L } ^ { \top }$ we guarantee that the learned cost matrix is positive definite, which improves the conditioning of the policy update.
|
| 100 |
+
|
| 101 |
+
# 4 POLICY LEARNING IN THE LATENT SPACE
|
| 102 |
+
|
| 103 |
+
While we could use a variety of model-based policy learning methods in the learned latent space, the ability to infer local time-varying linear dynamics lends itself naturally to the particular analytic local solution to the policy described in subsection 2.1. This approach yields a policy that is TVLG in the latent space, which in general corresponds to a class of nonlinear policies in the original space formed by the composition of the nonlinear neural network embedding and the TVLG policy.
|
| 104 |
+
|
| 105 |
+
As discussed in the following sections, we can use the PGM in the previous section to formulate local model fitting as probabilistic inference, in order to obtain a dynamics estimate that we can then use to improve the policy. Note that this use of the model is quite different from how dynamics models are typically used in standard model-based RL algorithms: instead of using the model to predict into the future, we only use the model to infer local linear dynamics conditioned on real-world trajectory samples. While local models are not burdened by forward prediction compared to global forward models, the simplicity of linear local models prevents accurate modeling of complex systems, and our method mitigates this through a latent representation that is optimized for local linear model fitting.
|
| 106 |
+
|
| 107 |
+
Our overall algorithm, SOLAR, is presented in algorithm 1. At every iteration, we collect $N$ rollouts from the real world (line 4). Then, we update our model using data from the last $B$ iterations (line 5), we linearize our policy given the updated model (line 6, see Appendix C for details), we perform inference within our model to get the dynamics estimates (line 7), and we update our policy using the rollouts from our current iteration and our updated model (line 8). The following subsections detail the modules of our method that are involved in policy learning and improvement.
|
| 108 |
+
|
| 109 |
+
# 4.1 DYNAMICS INFERENCE UNDER THE MODEL
|
| 110 |
+
|
| 111 |
+
To obtain a TVLG dynamics model, we could directly use linear regression to fit $\mathbf { F } _ { t }$ and $\Sigma _ { t }$ to the observed latent trajectories $\tau = [ \mathbf { z } _ { 0 } , \mathbf { a } _ { 0 } , \ldots , \mathbf { z } _ { T - 1 } , \mathbf { a } _ { T - 1 } , \mathbf { z } _ { T } ]$ . However, this may be poorly conditioned in the low-data regime. Instead, we can perform inference within our model to obtain dynamics estimates for policy improvement. As described in section 3, our model provides us with variational approximations to the posterior over dynamics models, i.e., $\{ q ( \mathbf { F } _ { t } , \Sigma _ { t } ) \} _ { t = 0 } ^ { T - 1 }$ , which are MNIW. We can use these as a prior and condition on the data to obtain new variational posteriors $\{ q ( \mathbf { F } _ { t } , \Sigma _ { t } | \{ \tau \} _ { i = 0 } ^ { N } ) \} _ { t = 0 } ^ { T - 1 }$ , which are also MNIW. Writing the parameters of these posteriors – for which the closed form solutions are given in Appendix $\mathrm { \bf B - }$ as $\{ \Psi _ { t } , M _ { 0 t } , V _ { t } , \nu _ { t } \} _ { t }$ , we compute a maximum a posteriori estimate of the dynamics parameters at time step $t$ as: $\begin{array} { r } { \mathbf { F } _ { t } = M _ { 0 t } , \Sigma _ { t } = \frac { \Psi _ { t } } { \nu _ { t } } } \end{array}$ . This inference procedure corresponds to Bayesian linear regression and can be interpreted as resolving the uncertainty in the global dynamics model conditioned on a real-world rollout. In essence, $\{ q ( \mathbf { F } _ { t } , \Sigma _ { t } ) \} _ { t = 0 } ^ { T - 1 }$ captures uncertainty over the latent system dynamics by acting as a global model over all observed data, but in order to accurately model the system within the local region around the current policy, we condition on trajectories collected from the policy in order to resolve the uncertainty and obtain dynamics estimates $\begin{array} { r } { \{ \mathbf { F } _ { t } , \boldsymbol { \Sigma } _ { t } \} _ { t = 0 } ^ { T - 1 } } \end{array}$ that allow us to improve the policy.
|
| 112 |
+
|
| 113 |
+
# 4.2 POLICY UPDATE
|
| 114 |
+
|
| 115 |
+
As described in subsection 2.1, once we have our TVLG dynamics estimates $\{ \mathbf { F } _ { t } , \Sigma _ { t } \} _ { t }$ and quadratic cost fit $\mathbf { C } , \mathbf { c }$ , we can use dynamic programming on the Q and value functions to compute the optimal policy in closed form. However, doing so is typically undesirable as the resulting policy will overfit to the model and likely will not perform well in the real environment. Since our modeling assumption is not that our model will be globally valid, but rather that our model will be valid close to the data distribution of the previous policy, we utilize a constrained policy update such that our new policy does not drastically change the induced trajectory distribution. Specifically, similar to prior work, we impose a KL-divergence constraint on the policy update such that the shift in the induced trajectory distributions before and after the update, which we denote as $\bar { p } ( \tau )$ and $p ( \tau )$ , respectively, is bounded by a step size $\epsilon$ (Levine & Abbeel, 2014). This leads to a constrained optimization of the form $\operatorname* { m a x } _ { \theta } \ \hat { \eta } ( \theta )$ s.t. $D _ { \mathrm { K L } } ( p ( \tau ) \lVert \bar { p } ( \tau ) ) \leq \epsilon$ . As shown in Levine & Abbeel (2014), this constrained optimization can be solved by augmenting the cost function to penalize the deviation from the previous policy $\pi _ { \bar { \theta } }$ , i.e., $\begin{array} { r } { \tilde { C } ( \mathbf { z } _ { t } , \mathbf { a } _ { t } ) = \frac { 1 } { \lambda } C ( \mathbf { z } _ { t } , \mathbf { a } _ { t } ) - \log \pi _ { \bar { \theta } } ( \mathbf { a } _ { t } | \mathbf { z } _ { t } ) } \end{array}$ . Note that this augmented cost function is still quadratic, since the policy is TVLG, and thus we can still compute the optimal policy under this cost function in closed form using the procedure described in subsection 2.1. $\lambda$ is a dual variable that trades off between optimizing the cost function and staying close in distribution to the previous policy, and the weight of this term can be determined through a dual gradient descent procedure. Combined with the model learning from section 3, we arrive at the SOLAR algorithm.
|
| 116 |
+
|
| 117 |
+
# 5 RELATED WORK
|
| 118 |
+
|
| 119 |
+
Model-based RL methods have achieved significant efficiency benefits compared to model-free RL methods (Chebotar et al., 2017; Nagabandi et al., 2018; Deisenroth et al., 2014). Many of these prior methods learn global models of the system that are then used for planning, generating synthetic experience, or policy search (Atkeson & Schaal, 1997; Peters et al., 2010). These methods require an accurate and reliable model and will typically suffer from modeling bias, hence these models are still limited to short horizon prediction in more complex domains (Mishra et al., 2017; Nagabandi et al., 2018; Gu et al., 2016; V.Feinberg et al., 2018). Another class of model-based methods rely only on local system models to compute the gradient for a policy update (An et al., 1988; Kolter & Ng, 2005; Heess et al., 2015; Levine & Abbeel, 2014; Bansal et al., 2017). These methods do not use models for long-term forward prediction, allowing for the use of simple models that enable policy improvement (Montgomery et al., 2017; Levine et al., 2016). As we show in section 6, modeling bias for prior methods can be severely limiting in systems with complex observations such as images, whereas we are able to learn representations that mitigate the effects of modeling bias.
|
| 120 |
+
|
| 121 |
+
Utilizing representation learning within model-based RL has been studied in a number of previous works (Lesort et al., 2018), including using embeddings for state aggregation (Singh et al., 1994), dimensionality reduction (Nouri & Littman, 2010), self-organizing maps (Smith, 2002), value prediction (Oh et al., 2017), and deep auto-encoders (Lange & Riedmiller, 2010; Finn et al., 2016; Watter et al., 2015; Higgins et al., 2017). Within these works, deep spatial auto-encoders (DSAE) (Finn et al., 2016) and embed to control (E2C) (Watter et al., 2015; Banijamali et al., 2017) are the most closely related to our work in that they consider local model methods combined with representation learning. The key difference in our work is that, rather than using a learning objective for reconstruction and forward prediction, we formulate a Bayesian latent variable model such that inference corresponds to fitting local models within the learned representation. As such, our objective enables local model methods by directly encouraging learning representations where fitting local models accurately explains the observed data. We also do not assume a known cost function, goal state, or access to the underlying system state as in DSAE and E2C, thus SOLAR is applicable even when the underlying states and cost function are unknown.1 We find that our approach tends to produce better results on a number of complex image-based tasks, as we discuss in the next section.
|
| 122 |
+
|
| 123 |
+

|
| 124 |
+
Figure 3: (a) Top: Visualizing a trajectory in the car navigation environment, with the target denoted by the black dot, and the corresponding image observation. Bottom: An illustration of the 2-DoF arm environment, with the target denoted by the red dot, and the corresponding image observation. Note that we use sliding windows of past observations when learning both tasks. (b) Top: Illustration of the architecture we use for learning Lego block stacking. Bottom: Example trajectory from our learned policy stacking the yellow Lego block on top of the blue block.
|
| 125 |
+
|
| 126 |
+
# 6 EXPERIMENTS
|
| 127 |
+
|
| 128 |
+
We aim to answer the following questions through our experiments: (1) How does SOLAR compare to state-of-the-art model-free and model-based RL algorithms? (2) How do local and global model methods compare when operating in our learned representations? (3) How much benefit do we derive from our particular representation learning method? To answer (1), we compare SOLAR to trust region policy optimization (TRPO) (Schulman et al., 2015) and proximal policy optimization (PPO) (Schulman et al., 2017), two state-of-the-art model-free methods, and LQR with fitted linear models (LQR-FLM) (Levine & Abbeel, 2014), a state-of-the-art model-based method. To answer (2), we test an ablation of our method where we learn a neural network dynamics model with which we perform model-predictive control (MPC) in the latent space. We refer to this as the “global model ablation”. To answer (3), we replace our LDS SVAE model with a variational auto-encoder (VAE) (Kingma & Welling, 2014; Rezende et al., 2014) and with the robust locally-linear controllable embedding (RCE) model (Banijamali et al., 2017), an improved version of the E2C model (Watter et al., 2015). We refer to these as the “VAE ablation” and “E2C-like ablation”, respectively. We additionally compare to a pixel space model similar to Finn & Levine (2017) that utilizes no representation learning and instead learns both a dynamics and cost model on images in order to run MPC in pixel space. Videos of the learned policies are available on the project website.2
|
| 129 |
+
|
| 130 |
+
# 6.1 EXPERIMENTAL TASKS
|
| 131 |
+
|
| 132 |
+
We set up simulated image-based robotic domains for a 2-dimensional navigation task, a nonholonomic car, and a 2-DoF arm, as shown in Figure 3a. We also learn a block stacking task directly from camera images on a real Sawyer robotic arm, as shown in Figure 3b. Details regarding experimental setup and training hyperparameters are provided in Appendix D.
|
| 133 |
+
|
| 134 |
+

|
| 135 |
+
Figure 4: (a) Our method, the VAE ablation, and the global model ablation consistently solve 2D navigation from images, whereas LQR-FLM and the E2C-like ablation are unable to make progress. The final performance of PPO is plotted as the dashed line, though PPO requires 1000 times more samples than our method to reach this performance. (b) On the car from images, both our method and the global model ablation are able to reach the goal, however, we encode prior information into the global model ablation by biasing the control to select positive actions. The VAE ablation is less consistent across random seeds, and the E2C-like ablation once again is unsuccessful at the task. PPO requires over 25 times more episodes to learn a successful policy. (c) For reacher from images, we perform worse than PPO but need about 40 times fewer episodes to learn, whereas the ablations performs noticeably worse. Here we plot reward, so higher is better.
|
| 136 |
+
|
| 137 |
+
2D navigation. We consider a 2-dimensional navigation task similar to Watter et al. (2015); Banijamali et al. (2017) except we move the goal every episode rather than fixing it to the bottom right. Observations consist of two 32-by-32 images indicating the positions of the agent and goal.
|
| 138 |
+
|
| 139 |
+
Nonholonomic car. The nonholonomic car starts in the bottom right of the 2-dimensional space and controls its acceleration and steering velocity in order to reach the target in the top left. We use a sliding window of four 64-by-64 images as the observation to capture velocity information.
|
| 140 |
+
|
| 141 |
+
Reacher. We experiment with the reacher environment from OpenAI Gym (Brockman et al., 2016), where a 2-DoF arm has to reach a target denoted by a red dot, which we specify to be in the bottom left. For observations, we directly use 64-by-64-by-3 images of the rendered environment, which provides a top-down view of the reacher and target, and we use a sliding window of four images.
|
| 142 |
+
|
| 143 |
+
Sawyer Lego block stacking. To demonstrate a challenging task in the real world, we use our method to learn Lego block stacking with a real 7-DoF Sawyer robotic arm, as depicted in Figure 3b. The observations used are raw 84-by-84-by-3 images from a camera pointed at the robot, and the controller only receives images as the observation, without joint angles or other information.
|
| 144 |
+
|
| 145 |
+
# 6.2 SIMULATION RESULTS
|
| 146 |
+
|
| 147 |
+
Figure 4 details our results on the simulated image-based experimental domains, where each method is tested on three random seeds and the mean and standard deviation of the performance is reported. For the 2D navigation and car tasks from images, we plot the average final distance to the goal as a function of the number of episodes, so lower is better.3 On the reacher task, we plot the reward function as defined by Gym since this is the standard metric used to evaluate performance on this task, and as shown by the videos on our project website, achieving high Gym reward correlates strongly with solving the task in terms of distance to the goal.
|
| 148 |
+
|
| 149 |
+
On 2D navigation from images, our method, the VAE ablation, and the global model ablation are all able to learn very quickly, converging to high-performing policies within 200 episodes. LQR-FLM struggles to learn the task, likely because the images are too complex for local linear model fitting, and makes no progress at all. In fact, LQR-FLM fails to learn on all of the simulated tasks, and we note that this precludes the guided policy search (GPS) method from solving these tasks (Levine et al., 2016), as GPS uses LQR-FLM as a subroutine. For the sake of clarity in the plots, we omit the
|
| 150 |
+
|
| 151 |
+
LQR-FLM results, which are qualitatively similar to the E2C-like ablation results. PPO eventually learns a successful policy, as indicated by the dashed line depicting this method’s final performance, but this requires roughly three orders of magnitude more samples than our method. We present log-scale plots that illustrate the full learning progress of model-free methods in Appendix E.
|
| 152 |
+
|
| 153 |
+
Despite using code directly from the authors of RCE, we were unable to get the E2C-like ablation to learn a good model for this task, and thus the learned policy does not improve over the initial policy. In fact, we were unable to learn successful policies for any of the simulated tasks, though in Appendix E, we demonstrate that this ablation can learn a more successful policy on the 2D navigation domain used by Watter et al. (2015); Banijamali et al. (2017), where the target is fixed to the bottom right. This highlights the difficulty of the tasks we consider.
|
| 154 |
+
|
| 155 |
+
On the image-based car, our method is able to learn a good policy with about 1500 episodes of experience. The global model ablation is competitive with our method, however, we obtained this result by biasing the mean of the MPC random action selection to be positive, effectively encoding prior information that the car should move forward. We also noticed that, even with more data, the variance of the MPC performance remained higher than the policy learned by our method. These observations indicate that forward prediction using the learned global models may be inaccurate, leading to inconsistent control performance. In contrast, our method does not heavily rely on an accurate model and can achieve consistently good behavior on this task. The VAE ablation is able to solve this task for some random seeds, however this method’s performance is less consistent compared to our method. PPO eventually learns a successful policy for this task that performs better than our method, however it uses over 25 times more data than our method.
|
| 156 |
+
|
| 157 |
+
Finally, on the image-based reacher task, our method achieves worse final policy performance than PPO, though we do so with about 40 times fewer episodes, i.e., we use under 700 episodes whereas PPO uses about 30000. This gain in data efficiency compared to model-free methods is typical of model-based methods, however, SOLAR is able to handle this domain directly from raw image observations, which is challenging for other model-based methods. The VAE ablation also makes progress toward the goal, however, the performance is noticeably worse compared to our method. The global model ablation makes very little improvement over its initial behavior, which is better than the other methods as it learns both a dynamics and cost model from the pretraining data and uses these models right away for planning. This performance drop compared to the previous tasks indicates the difficulty in forward prediction for this domain, coupled with the failure of short-horizon control for this task as greedily minimizing distance to the goal often simply leads to collapsing the arm. As it is also less intuitive to encode prior information into this task compared to biasing the actions in the car domain to drive forward, we could not get this ablation to succeed on this task.
|
| 158 |
+
|
| 159 |
+
# 6.3 REAL ROBOT RESULTS
|
| 160 |
+
|
| 161 |
+
Figure 5 details performance on the Lego block stacking tasks in terms of the average final distance in centimeters to the goal, where we test on three random seeds and report the mean and standard deviation of the performance. We define the goal position of the end effector such that reaching the goal leads to successful stacking of the block. Not only is our method able to solve this task directly from raw, high-dimensional camera images within 200 episodes, corresponding to about half an hour of interaction time, our method is also successful at handling the complex, contact-rich dynamics of block stacking. As seen in the video on our project website, our method learns a policy that can react to slightly different contacts, due to the bottom block shifting between episodes, and is ultimately successful in stacking the block in most episodes.4
|
| 162 |
+
|
| 163 |
+
We compare to the VAE and global model ablations, as these proved to be the most successful and data efficient baselines in simulation. These ablations are competitive with our method for this real world task, though our method still achieves a better final policy that is able to more consistently stack the block. The pixel space model is significantly worse than the other methods that learn a latent representation, and given prior work on pixel space global models (Finn & Levine, 2017), we suspect that this method would need more data in order to learn this task.
|
| 164 |
+
|
| 165 |
+

|
| 166 |
+
Figure 5: Performance on the real-world Sawyer block stacking task. Our method learns to successfully stack the block in about half an hour of interaction time. The VAE and global model ablations are also competitive on this task, while the pixel space model performs worse.
|
| 167 |
+
|
| 168 |
+
# 7 DISCUSSION AND FUTURE WORK
|
| 169 |
+
|
| 170 |
+
We presented SOLAR, a model-based RL algorithm that is capable of learning policies in a dataefficient manner directly from raw high-dimensional observations. The key insights in SOLAR involve learning latent representations where simple models are more accurate and utilizing PGM structure to infer dynamics from data conditioned on entire real-world trajectories. Our experimental results demonstrate that SOLAR is competitive in sample efficiency, while exhibiting superior final policy performance, compared to other model-based methods. Furthermore, SOLAR is significantly more data-efficient compared to state-of-the-art model-free RL methods.
|
| 171 |
+
|
| 172 |
+
There are several interesting directions for future work. First, the ability to learn representations lends itself naturally to multi-task and transfer settings, where new tasks could potentially be learned much more quickly by starting from a latent embedding that has been learned from previous tasks. We can also in principle share dynamics models, where the PGM we learn from solving previous tasks can be used as a global prior when inferring local dynamics fits for a new task. Second, our model is designed for and tested on continuous action domains as we focus on robotic applications. Extending our model to discrete actions would necessitate some type of continuous relaxation or learned action representation, and we believe that this is another interesting direction for future work.
|
| 173 |
+
|
| 174 |
+
# REFERENCES
|
| 175 |
+
|
| 176 |
+
C. An, C. Atkeson, and J. Hollerbach. Model-Based Control of a Robot Manipulator. MIT Press, 1988.
|
| 177 |
+
C. Atkeson and S. Schaal. Robot learning from demonstration. In ICML, 1997.
|
| 178 |
+
E. Banijamali, R. Shu, M. Ghavamzadeh, H. Bui, and A. Ghodsi. Robust locally-linear controllable embedding. arXiv preprint arXiv:1710.05373, 2017.
|
| 179 |
+
S. Bansal, R. Calandra, T. Xiao, S. Levine, and C. Tomlin. Goal-driven dynamics learning via Bayesian optimization. In CDC, 2017.
|
| 180 |
+
S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004.
|
| 181 |
+
G. Brockman, V. Cheung, L. Pettersson, J. Schneider, J. Schulman, J. Tang, and W. Zaremba. OpenAI gym. arXiv preprint arXiv:1606.01540, 2016.
|
| 182 |
+
E. Camacho and C. Bordons. Model Predictive Control in the Process Industry. Springer-Verlag New York, Inc., 1997.
|
| 183 |
+
Y. Chebotar, K. Hausman, M. Zhang, G. Sukhatme, S. Schaal, and S. Levine. Combining model-based and model-free updates for trajectory-centric reinforcement learning. In ICML, 2017.
|
| 184 |
+
M. Deisenroth, D. Fox, and C. Rasmussen. Gaussian processes for data-efficient learning in robotics and control. PAMI, 2014.
|
| 185 |
+
C. Finn and S. Levine. Deep visual foresight for planning robot motion. In ICRA, 2017.
|
| 186 |
+
C. Finn, X. Tan, Y. Duan, T. Darrell, S. Levine, and P. Abbeel. Deep spatial autoencoders for visuomotor learning. In ICRA, 2016.
|
| 187 |
+
Y. Gao, E. Archer, L. Paninski, and J. Cunningham. Linear dynamical neural population models through nonlinear embeddings. In NIPS, 2016.
|
| 188 |
+
S. Gu, T. Lillicrap, I. Sutskever, and S. Levine. Continuous deep Q-learning with model-based acceleration. In ICML, 2016.
|
| 189 |
+
N. Heess, G. Wayne, D. Silver, T. Lillicrap, Y. Tassa, and T. Erez. Learning continuous control policies by stochastic value gradients. In NIPS, 2015.
|
| 190 |
+
I. Higgins, A. Pal, A. Rusu, L. Matthey, C. Burgess, A. Pritzel, M. Botvinick, C. Blundell, and A. Lerchner. DARLA: Improving zero-shot transfer in reinforcement learning. In ICML, 2017.
|
| 191 |
+
D. Jacobson and D. Mayne. Differential Dynamic Programming. American Elsevier, 1970.
|
| 192 |
+
M. Johnson, D. Duvenaud, A. Wiltschko, S. Datta, and R. Adams. Composing graphical models with neural networks for structured representations and fast inference. In NIPS, 2016.
|
| 193 |
+
D. Kingma and J. Ba. Adam: A method for stochastic optimization. In ICLR, 2015.
|
| 194 |
+
D. Kingma and M. Welling. Auto-encoding variational Bayes. In ICLR, 2014.
|
| 195 |
+
J. Kolter and A. Ng. Policy search via the signed derivative. In RSS, 2005.
|
| 196 |
+
S. Lange and M. Riedmiller. Deep auto-encoder neural networks in reinforcement learning. In IJCNN, 2010.
|
| 197 |
+
T. Lesort, N. Díaz-Rodríguez, J. Goudou, and D. Filliat. State representation learning for control: An overview. arXiv preprint arXiv:1802.04181, 2018.
|
| 198 |
+
S. Levine and P. Abbeel. Learning neural network policies with guided policy search under unknown dynamics. In NIPS, 2014.
|
| 199 |
+
S. Levine and V. Koltun. Guided policy search. In ICML, 2013.
|
| 200 |
+
S. Levine, C. Finn, T. Darrell, and P. Abbeel. End-to-end training of deep visuomotor policies. JMLR, 2016.
|
| 201 |
+
N. Mishra, I. Mordatch, and P. Abbeel. Prediction and control with temporal segment models. In ICML, 2017.
|
| 202 |
+
T. Moldovan, S. Levine, M. Jordan, and P. Abbeel. Optimism-driven exploration for nonlinear systems. In ICRA, 2015.
|
| 203 |
+
W. Montgomery, A. Ajay, C. Finn, P. Abbeel, and S. Levine. Reset-free guided policy search: Efficient deep reinforcement learning with stohcastic initial states. In ICRA, 2017.
|
| 204 |
+
A. Nagabandi, G. Kahn, R. Fearing, and S. Levine. Neural network dynamics for model-based deep reinforcement learning with model-free fine-tuning. In ICRA, 2018.
|
| 205 |
+
A. Nouri and M. Littman. Dimension reduction and its application to model-based exploration in continuous spaces. Machine Learning, 2010.
|
| 206 |
+
J. Oh, S. Singh, and H. Lee. Value prediction network. In NIPS, 2017.
|
| 207 |
+
J. Peters, K. Mülling, and Y. Altün. Relative entropy policy search. In AAAI, 2010.
|
| 208 |
+
D. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In ICML, 2014.
|
| 209 |
+
J. Schulman, S. Levine, P. Moritz, M. Jordan, and P. Abbeel. Trust region policy optimization. In ICML, 2015.
|
| 210 |
+
J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 211 |
+
S. Singh, T. Jaakkola, and M. Jordan. Reinforcement learning with soft state aggregation. In NIPS, 1994.
|
| 212 |
+
A. Smith. Applications of the self-organizing map to reinforcement learning. Neural Networks, 2002.
|
| 213 |
+
R. Sutton. Integrated architectures for learning, planning, and reacting based on approximating dynamic programming. In ICML, 1990.
|
| 214 |
+
Y. Tassa, T. Erez, and E. Todorov. Synthesis and stabilization of complex behaviors. In IROS, 2012.
|
| 215 |
+
E. Todorov and W. Li. A generalized iterative LQG method for locally-optimal feedback control of constrained nonlinear stochastic systems. In ACC, 2005.
|
| 216 |
+
V.Feinberg, A. Wan, I. Stoica, M. Jordan, J. Gonzalez, and S. Levine. Model-based value estimation for efficient model-free reinforcement learning. arXiv preprint arXiv:1803.00101, 2018.
|
| 217 |
+
M. Watter, J. Springenberg, J. Boedecker, and M. Riedmiller. Embed to control: A locally linear latent dynamics model for control from raw images. In NIPS, 2015.
|
| 218 |
+
J. Winn and C. Bishop. Variational message passing. JMLR, 2005.
|
| 219 |
+
|
| 220 |
+
# A POLICY LEARNING DETAILS
|
| 221 |
+
|
| 222 |
+
Given a TVLG dynamics model and quadratic cost approximation, we can approximate our Q and value functions to second order with the following dynamic programming updates, which proceed from the last time step $t = T$ to the first step $t = 1$ :
|
| 223 |
+
|
| 224 |
+
$$
|
| 225 |
+
\begin{array} { r l } & { Q _ { \mathbf { s } , t } = c _ { \mathbf { s } , t } + \mathbf { F } _ { \mathbf { s } , t } ^ { \top } V _ { \mathbf { s } , t + 1 } , \ Q _ { \mathbf { s } \mathbf { s } , t } = c _ { \mathbf { s } \mathbf { s } , t } + \mathbf { F } _ { \mathbf { s } , t } ^ { \top } V _ { \mathbf { s } \mathbf { s } , t + 1 } \mathbf { F } _ { \mathbf { s } , t } , } \\ & { Q _ { \mathbf { a } , t } = c _ { \mathbf { a } , t } + \mathbf { F } _ { \mathbf { a } , t } ^ { \top } V _ { \mathbf { s } , t + 1 } , \ Q _ { \mathbf { a } \mathbf { a } , t } = c _ { \mathbf { a } \mathbf { a } , t } + \mathbf { F } _ { \mathbf { a } , t } ^ { \top } V _ { \mathbf { s } \mathbf { s } , t + 1 } \mathbf { F } _ { \mathbf { a } , t } , } \\ & { \qquad Q _ { \mathbf { s } \mathbf { a } , t } = c _ { \mathbf { s } \mathbf { a } , t } + \mathbf { F } _ { \mathbf { s } , t } ^ { \top } V _ { \mathbf { s } \mathbf { s } , t + 1 } \mathbf { F } _ { \mathbf { a } , t } , } \\ & { \qquad V _ { \mathbf { s } , t } = Q _ { \mathbf { s } , t } - Q _ { \mathbf { s } \mathbf { a } , t } Q _ { \mathbf { a } \mathbf { a } , t } ^ { - 1 } Q _ { \mathbf { a } , t } , } \\ & { \qquad V _ { \mathbf { s } \mathbf { s } , t } = Q _ { \mathbf { s } \mathbf { s } , t } - Q _ { \mathbf { s } \mathbf { a } , t } Q _ { \mathbf { a } \mathbf { a } , t } ^ { - 1 } Q _ { \mathbf { a } \mathbf { s } , t } . } \end{array}
|
| 226 |
+
$$
|
| 227 |
+
|
| 228 |
+
It can be shown (e.g., by Tassa et al. (2012)) that the action $\mathbf { a } _ { t }$ that minimizes the second-order approximation of the Q-function at every time step $t$ is given by
|
| 229 |
+
|
| 230 |
+
$$
|
| 231 |
+
{ \bf a } _ { t } = - Q _ { { \bf a } { \bf a } , t } ^ { - 1 } Q _ { { \bf a } { \bf s } , t } { \bf s } _ { t } - Q _ { { \bf a } { \bf a } , t } ^ { - 1 } Q _ { { \bf a } , t } .
|
| 232 |
+
$$
|
| 233 |
+
|
| 234 |
+
This action is a linear function of the state $\mathbf { s } _ { t }$ , thus we can construct an optimal linear policy by setting ${ \bf K } _ { t } = - Q _ { { \bf a a } , t } ^ { - 1 } Q _ { { \bf a s } , t }$ and ${ \bf k } _ { t } = - Q _ { { \bf a a } , t } ^ { - 1 } Q _ { { \bf a } , t }$ . We can also show that the maximum-entropy policy that minimizes the approximate Q-function is given by
|
| 235 |
+
|
| 236 |
+
$$
|
| 237 |
+
\pi ( \mathbf { a } _ { t } | \mathbf { s } _ { t } ) = \mathcal { N } ( \mathbf { K } _ { t } \mathbf { s } _ { t } + \mathbf { k } _ { t } , Q _ { \mathbf { a a } , t } ) .
|
| 238 |
+
$$
|
| 239 |
+
|
| 240 |
+
Furthermore, as in Levine & Abbeel (2014), we can impose a constraint on the total KL-divergence between the old and new trajectory distributions induced by the policies through an augmented cost function $\begin{array} { r } { \bar { c } ( { \mathbf s } _ { t } , \mathbf { a } _ { t } ) = \frac { 1 } { \lambda } c ( { \mathbf s } _ { t } , \mathbf { a } _ { t } ) - \log \pi ^ { ( i - 1 ) } ( { \mathbf a } _ { t } | { \mathbf s } _ { t } ) } \end{array}$ , where solving for $\lambda$ via dual gradient descent can yield an exact solution to a KL-constrained LQR problem.
|
| 241 |
+
|
| 242 |
+
# B DYNAMICS INFERENCE
|
| 243 |
+
|
| 244 |
+
Here we provide the closed form parameter computations for the posteriors of our dynamics given observed trajectories, as described in Section 4.1 of the main paper. Given variational factors from our model of the form
|
| 245 |
+
|
| 246 |
+
$$
|
| 247 |
+
\begin{array} { r } { q ( \mathbf { F } _ { t } , \Sigma _ { t } ) = \mathcal { M N T } \mathcal { W } ( \Psi _ { t } ^ { \prime } , \nu _ { t } ^ { \prime } , M _ { 0 t } ^ { \prime } , V _ { t } ^ { \prime } ) \mathrm { ~ f o r ~ } t \in [ 0 , . . . , T - 1 ] , } \end{array}
|
| 248 |
+
$$
|
| 249 |
+
|
| 250 |
+
n observed trajectories . These posteriors are als $\tau$ to obtain new variational posteriors MNIW, and the parameters of these pos$\{ q ( \mathbf { F } _ { t } , \Sigma _ { t } | \{ \tau \} _ { i = 0 } ^ { N } ) \} _ { t = 0 } ^ { T - 1 }$ teriors can be computed in closed form as
|
| 251 |
+
|
| 252 |
+
$$
|
| 253 |
+
\begin{array} { r l } & { \Psi _ { t } = \Psi _ { t } ^ { \prime } + M _ { 0 t } ^ { \prime } V _ { t } ^ { \prime - 1 } M _ { 0 t } ^ { \prime \top } + \displaystyle \sum _ { i = 1 } ^ { N } \mathbf { z } _ { t + 1 } ^ { ( i ) } \mathbf { z } _ { t + 1 } ^ { ( i ) \top } - M _ { 0 t } V _ { t } ^ { - 1 } M _ { 0 t } ^ { \top } , \qquad \kappa _ { t } = \kappa _ { t } + N , } \\ & { M _ { 0 t } = \left( M _ { 0 t } ^ { \prime } V _ { t } ^ { \prime - 1 } + \displaystyle \sum _ { i = 1 } ^ { N } \mathbf { z } _ { t + 1 } ^ { ( i ) } \left[ \mathbf { z } _ { t } ^ { ( i ) } \right] ^ { \top } \right) V _ { t } , \qquad V _ { t } = \left( V _ { t } ^ { \prime - 1 } + \displaystyle \sum _ { i = 1 } ^ { N } \left[ \mathbf { z } _ { t } ^ { ( i ) } \right] \left[ \mathbf { z } _ { t } ^ { ( i ) } \right] ^ { \top } \right) ^ { - 1 } . } \end{array}
|
| 254 |
+
$$
|
| 255 |
+
|
| 256 |
+
Then, a maximum a posteriori estimate gives us the TVLG dynamics parameters as described in the main paper.
|
| 257 |
+
|
| 258 |
+
# C POLICY LINEARIZATION
|
| 259 |
+
|
| 260 |
+
The policy update described in Section 4.2 of the main paper requires us to compute the KL-divergence between the trajectory distributions before and after the policy update, denoted as $\bar { p } ( \tau )$ and $\dot { p } ( \tau )$ , respectively. We compute with the previous policy, a $\begin{array} { r } { p ( \tau ) = \hat { \rho } ( \mathbf { z } _ { 0 } ) \prod _ { t = 0 } ^ { T - 1 } \pi _ { \boldsymbol { \theta } } ( \mathbf { a } _ { t } | \mathbf { z } _ { t } ) \hat { p } ( \mathbf { z } _ { t + 1 } | \mathbf { z } _ { t } , \mathbf { a } _ { t } ) } \end{array}$ , and analogously for y because the policies $\bar { p } ( \tau )$ dynamics model are TVLG, thus the induced trajectory distributions are also Gaussian. However, this operates under the assumption that $\mathbf { z }$ is fixed, which does not hold since the model update changes the latent representation. Since our overall policy is a combination of the model embedding, given by $e _ { \phi } ( \mathbf { s } )$ , and the TVLG policy $\pi _ { \boldsymbol { \theta } } ( \mathbf { a } _ { t } | \mathbf { z } _ { t } )$ , training $e _ { \phi } ( \mathbf { s } )$ will change the behavior of the policy even if $\pi _ { \boldsymbol { \theta } } ( \mathbf { a } _ { t } | \mathbf { z } _ { t } )$ stays fixed. In some cases, this may lead to a policy with worse performance, and constraining against this policy for the policy update may lead to poor results. In fact, what we want to do is to account for the model update by changing $\pi _ { \boldsymbol { \theta } } ( \mathbf { a } _ { t } | \mathbf { z } _ { t } )$ accordingly, so that the overall policy does not change in its distribution. Thus, using $\left( \mathbf { s } _ { t } , \mathbf { a } _ { t } \right)$ pairs from the previous data collection phase, we embed $\mathbf { z } _ { t } = \mu ( e _ { \phi } ( \mathbf { s } _ { t } ) )$ with our updated model and use linear regression to find the TVLG policy $\tilde { \pi } _ { \boldsymbol { \theta } } ( \mathbf { a } _ { t } | \mathbf { z } _ { t } )$ that best explains the data collected from the policy This is line 6 of the SOLAR algorithm presented in the main paper, and after this, we can perform the policy update constrained against the trajectory distribution induced by $\tilde { \pi } _ { \boldsymbol { \theta } } ( \mathbf { a } _ { t } | \mathbf { z } _ { t } )$ .
|
| 261 |
+
|
| 262 |
+

|
| 263 |
+
Figure 6: (a) An illustration of the 2D navigation task, with the agent depicted as the black dot and the target depicted as the blue dot. (b) We use as observations two 32-by-32 images stacked on top of each other, where the first observation indicates the position of the agent the second observation indicates the position of the target. (c) Visualization of the 4-dimensional latent space for an example random trajectory of the 2D-navigation task. Note that the range of values in the latent space is very narrow, and the bottom two dimensions seemingly capture information about the target which does not move.
|
| 264 |
+
|
| 265 |
+
# D EXPERIMENT SETUP
|
| 266 |
+
|
| 267 |
+
Image-based 2D navigation. Our recognition model architecture for the 2D navigation domain consists of two convolution layers with 2-by-2 filters and 32 channels each, with no pooling layers and ReLU non-linearities, followed by another convolution with 2-by-2 filters and 2 channels. The output of the last convolution layer is fed into a spatial softmax layer (Finn et al., 2016), which then outputs a Gaussian distribution with a fixed diagonal covariance of $1 0 ^ { - 4 }$ for the latent distribution. Our observation model consists of two fully-connected (FC) hidden layers with 256 ReLU activations, and the last layer outputs a categorical distribution over pixels. We initially collect 200 episodes which we use to train our model, and for every subsequent iteration we collect 20 episodes to fine tune our model. The cost function we use is the sum of the $L ^ { 2 }$ -norm squared of the distance to the target and the commanded action, with weights of 1 and 0.001, respectively.
|
| 268 |
+
|
| 269 |
+
Image-based nonholonomic car. The image-based car domain consists of 64-by-64 image observations. We include a window of the 3 previous 64-by-64 images in our observation to preserve velocity information. Our recognition model is a convolutional neural network that operates on each image in the sliding window independently. Its architecture is four convolutional layers with 4-by-4 filters with 4 channels each, and the first two convolution layers are followed by a ReLU non-linearity. The output of the last convolutional layer is fed into three FC ReLU layers of width 2048, 512, and 128, respectively. Our final layer outputs a Gaussian distribution with dimension 8. This leads to a final latent dimension of 32. Our observation model consists of four FC ReLU layers of width 256, 512, 1024, and 2048, respectively, followed by a Bernoulli distribution layer that models the image. Like the recognition model, the observation model only operates on each section of the latent representation corresponding to the image window independently. For this domain, we collect 100 episodes initially to train our model, and we collect 100 episodes per iteration after this. The cost function we use is the sum of the $L ^ { 2 }$ -norm squared of the distance from the center of the car to the target and the commanded action, with weights of 1 and 0.001, respectively.
|
| 270 |
+
|
| 271 |
+
Reacher. The reacher domain consists of 64-by-64-by-3 image observations. Similar to the car, we include a window of the 3 previous 64-by-64-by-3 images in our observation. Our recognition model is a convolutional neural network that again operates on each image in the sliding window independently. Its architecture is three convolutional layers with 2-by-2 filters with 64, 32 and 16 channels respectively. Each layer has a ReLU non-linearity followed by a 2-by-2 max-pooling. The output of the last convolutional layer is fed into an FC ReLU layer of width 200, followed by another FC ReLU layer of width 200. Our final layer outputs a Gaussian distribution with dimension 10, leading to a final latent dimension of 40. Our observation model consists of three FC ReLU layers of width 256, followed by a Bernoulli distribution layer and separately models each image in the sliding window. We collect 200 episodes initially to train our model, and we collect 100 episodes per iteration after this. The cost function we use is the sum of the $L ^ { 2 }$ -norm of the distance from the fingertip to the target and the $L ^ { 2 }$ -norm squared of the commanded action.
|
| 272 |
+
|
| 273 |
+
Sawyer Lego block stacking. The image-based Sawyer block-stacking domain consists of 84-by-84-by-3 image observations. The policy outputs velocities on the end effector in order to control the robot. Our recognition model is a convolutional neural network with the following architecture: a 5-by-5 filter convolutional layer with 16 channels followed by two convolutional layers using 5-by-5 filters with 32 channels each. The first two convolutional layers are followed by ReLU activations and the last by a FC ReLU layer of width 256 leading to a 16 dimensional Gaussian distribution layer. Our observation model consists of a FC ReLU layer of width 128 feeding into three deconvolutional layers, the first with 5-by-5 filters with 32 channels and the last two of 6-by-6 filters with 16 and 3 channels respectively. These are followed by a final Bernoulli distribution layer. For this domain, we collect 50 episodes initially to train our model, 20 episodes per iteration for the first 5 iterations, then 10 episodes per iteration for the remainder. The cost function is the sum of the $L ^ { 1 }$ -norm of a weighted displacement vector between the end-effector and the target in 3D-space (weighted 1, 2, 1 for $x , y , z )$ , the $L ^ { 2 }$ -norm in the same space, and the angle of rotation required to reach a valid wrist orientation, with weights of 1, .1, and .15, respectively.
|
| 274 |
+
|
| 275 |
+
# E ADDITIONAL EXPERIMENTS
|
| 276 |
+
|
| 277 |
+
# E.1 E2C-LIKE ABLATION ON SIMPLIFIED 2D NAVIGATION
|
| 278 |
+
|
| 279 |
+
As mentioned in Section 6, our E2C-like ablation was unable to make progress for the 2D navigation task, though we were able to get more successful results by fixing the position of the goal to the bottom right as is done in the image-based 2D navigation task considered in E2C (Watter et al., 2015) and RCE (Banijamali et al., 2017). Figure 7 details this experiment, which we ran for three random seeds and report the mean and standard deviation of the average final distance to the goal as a function of the number of training episodes. It is clear that the policy is improving, and two of the seeds are able to make substantial progress, though the final seed is less successful and significantly worsens the average performance of the method. This indicates that the latent representation learned through RCE is less suitable for local model fitting, as accurate local model fitting is not explicitly encouraged by their representation learning objective.
|
| 280 |
+
|
| 281 |
+

|
| 282 |
+
Figure 7: On 2D navigation with the goal fixed to the bottom right, our E2C-like ablation is able to make progress toward the goal.
|
| 283 |
+
|
| 284 |
+

|
| 285 |
+
Figure 9: (a) Comparison of our method to PPO on the 2D navigation task presented in the paper. Our method uses roughly three orders of magnitude fewer samples to solve the task compared to PPO. (b) On the car from images task, our method achieves slightly worse performance than PPO though with about 25 times fewer samples. (c) Comparison of our method to TRPO and PPO for the reacher task. Our method achieves slightly worse final performance but uses about 40 times fewer samples than these methods.
|
| 286 |
+
|
| 287 |
+
# E.2 MODEL-BASED COMPARISONS ON STATE-BASED NONHOLONOMIC CAR
|
| 288 |
+
|
| 289 |
+
To provide a point of comparison to modelbased RL methods, we consider the car domain where the underlying state is observed. The states for the car domain include the position of the center of mass, orientation, forward and angular velocity of the car, and the position of the target, making for a 9-dimensional system. Since this observation is already quite simple, we use a single linear layer for our recognition and observation models that output Gaussian distributions, and we use the same dimensionality for our latent representation as the state.
|
| 290 |
+
|
| 291 |
+

|
| 292 |
+
Figure 8: On the car from states, our method is competitive with LQR-FLM, demonstrating that we maintain the sample efficiency of model-based methods for simple tasks.
|
| 293 |
+
|
| 294 |
+
We plot the performances of our method, LQRFLM (Levine & Abbeel, 2014), and Nagabandi et al. (2018), which we refer to as modelpredictive control with neural networks (MPCNN), again based on the average final distance to the target, in Figure 8. In this setting, our
|
| 295 |
+
|
| 296 |
+
method is competitive with LQR-FLM, learning a policy with similar performance in 200 episodes. MPC-NN performs the best for this task, learning a policy that consistently reaches the target in just 20 episodes, though it is given the true cost function whereas our method and LQR-FLM are not. For this simple setup where modeling bias is not an issue, we expect model-based methods to perform very well and learn efficiently. However, when we make the problem more challenging by using image observations, model-based methods will fail quickly: LQR-FLM is unable to fit complex pixel transitions using local linear models, as shown through the 2D navigation experiment, and MPC-NN has never been used with images, as forward video prediction and defining a cost function on images are both very difficult. We extend MPC-NN to the image-based task, and we term this the “global model ablation” of our method – as shown in the paper, this approach is able to make progress toward the goal, though our method is still significantly better at solving this difficult task.
|
| 297 |
+
|
| 298 |
+
# E.3 FULL PERFORMANCE OF TRPO ON 2D NAVIGATION AND REACHER
|
| 299 |
+
|
| 300 |
+
In Figure 9 we include the plots for the simulated tasks comparing SOLAR, PPO, and TRPO. Note that the $\mathbf { X }$ -axis is on a log scale, i.e., though our method is sometimes worse in final policy performance to PPO and TRPO, we do so with one to three orders of magnitude fewer samples. This demonstrates our method’s sample efficiency compared to model-free methods, while being able to solve complex image-based domains that are difficult for model-based methods.
|
md/train/Bkg3g2R9FX/Bkg3g2R9FX.md
ADDED
|
@@ -0,0 +1,643 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ADAPTIVE GRADIENT METHODS WITH DYNAMIC BOUND OF LEARNING RATE
|
| 2 |
+
|
| 3 |
+
Liangchen Luo†∗, Yuanhao Xiong‡∗, Yan Liu§, $\mathbf { X } \mathbf { u } \mathbf { S } \mathbf { u } \mathbf { n } ^ { \dag \mathparagraph }$ †MOE Key Lab of Computational Linguistics, School of EECS, Peking University ‡College of Information Science and Electronic Engineering, Zhejiang University §Department of Computer Science, University of Southern California ¶Center for Data Science, Beijing Institute of Big Data Research, Peking University †{luolc,xusun}@pku.edu.cn ‡xiongyh@zju.edu.cn §yanliu.cs@usc.edu
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Adaptive optimization methods such as ADAGRAD, RMSPROP and ADAM have been proposed to achieve a rapid training process with an element-wise scaling term on learning rates. Though prevailing, they are observed to generalize poorly compared with SGD or even fail to converge due to unstable and extreme learning rates. Recent work has put forward some algorithms such as AMSGRAD to tackle this issue but they failed to achieve considerable improvement over existing methods. In our paper, we demonstrate that extreme learning rates can lead to poor performance. We provide new variants of ADAM and AMSGRAD, called ADABOUND and AMSBOUND respectively, which employ dynamic bounds on learning rates to achieve a gradual and smooth transition from adaptive methods to SGD and give a theoretical proof of convergence. We further conduct experiments on various popular tasks and models, which is often insufficient in previous work. Experimental results show that new variants can eliminate the generalization gap between adaptive methods and SGD and maintain higher learning speed early in training at the same time. Moreover, they can bring significant improvement over their prototypes, especially on complex deep networks. The implementation of the algorithm can be found at https://github.com/Luolc/AdaBound.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
There has been tremendous progress in first-order optimization algorithms for training deep neural networks. One of the most dominant algorithms is stochastic gradient descent (SGD) (Robbins & Monro, 1951), which performs well across many applications in spite of its simplicity. However, there is a disadvantage of SGD that it scales the gradient uniformly in all directions. This may lead to poor performance as well as limited training speed when the training data are sparse. To address this problem, recent work has proposed a variety of adaptive methods that scale the gradient by square roots of some form of the average of the squared values of past gradients. Examples of such methods include ADAM (Kingma & Lei Ba, 2015), ADAGRAD (Duchi et al., 2011) and RMSPROP (Tieleman & Hinton, 2012). ADAM in particular has become the default algorithm leveraged across many deep learning frameworks due to its rapid training speed (Wilson et al., 2017).
|
| 12 |
+
|
| 13 |
+
Despite their popularity, the generalization ability and out-of-sample behavior of these adaptive methods are likely worse than their non-adaptive counterparts. Adaptive methods often display faster progress in the initial portion of the training, but their performance quickly plateaus on the unseen data (development/test set) (Wilson et al., 2017). Indeed, the optimizer is chosen as SGD (or with momentum) in several recent state-of-the-art works in natural language processing and computer vision (Luo et al., 2019; Wu & He, 2018), wherein these instances SGD does perform better than adaptive methods. Reddi et al. (2018) have recently proposed a variant of ADAM called AMSGRAD, hoping to solve this problem. The authors provide a theoretical guarantee of convergence but only illustrate its better performance on training data. However, the generalization ability of AMSGRAD on unseen data is found to be similar to that of ADAM while a considerable performance gap still exists between AMSGRAD and SGD (Keskar & Socher, 2017; Chen et al., 2018).
|
| 14 |
+
|
| 15 |
+
In this paper, we first conduct an empirical study on ADAM and illustrate that both extremely large and small learning rates exist by the end of training. The results correspond with the perspective pointed out by Wilson et al. (2017) that the lack of generalization performance of adaptive methods may stem from unstable and extreme learning rates. In fact, introducing non-increasing learning rates, the key point in AMSGRAD, may help abate the impact of huge learning rates, while it neglects possible effects of small ones. We further provide an example of a simple convex optimization problem to elucidate how tiny learning rates of adaptive methods can lead to undesirable non-convergence. In such settings, RMSPROP and ADAM provably do not converge to an optimal solution, and furthermore, however large the initial step size $\alpha$ is, it is impossible for ADAM to fight against the scale-down term.
|
| 16 |
+
|
| 17 |
+
Based on the above analysis, we propose new variants of ADAM and AMSGRAD, named ADABOUND and AMSBOUND, which do not suffer from the negative impact of extreme learning rates. We employ dynamic bounds on learning rates in these adaptive methods, where the lower and upper bound are initialized as zero and infinity respectively, and they both smoothly converge to a constant final step size. The new variants can be regarded as adaptive methods at the beginning of training, and they gradually and smoothly transform to SGD (or with momentum) as time step increases. In this framework, we can enjoy a rapid initial training process as well as good final generalization ability. We provide a convergence analysis for the new variants in the convex setting.
|
| 18 |
+
|
| 19 |
+
We finally turn to an empirical study of the proposed methods on various popular tasks and models in computer vision and natural language processing. Experimental results demonstrate that our methods have higher learning speed early in training and in the meantime guarantee strong generalization performance compared to several adaptive and non-adaptive methods. Moreover, they can bring considerable improvement over their prototypes especially on complex deep networks.
|
| 20 |
+
|
| 21 |
+
# 2 NOTATIONS AND PRELIMINARIES
|
| 22 |
+
|
| 23 |
+
Notations Given a vector $\boldsymbol { \theta } \in \mathbb { R } ^ { d }$ we denote its $i$ -th coordinate by $\theta _ { i }$ ; we use $\theta ^ { k }$ to denote elementwise power of $k$ and $\| \theta \|$ to denote its $\ell _ { 2 }$ -norm; for a vector $\theta _ { t }$ in the $t$ -th iteration, the $i$ -th coordinate of $\theta _ { t }$ is denoted as $\theta _ { t , i }$ by adding a subscript $i$ . Given two vectors $v , w \in \mathbb { R } ^ { d }$ , we use ${ \langle v , w \rangle }$ to denote their inner product, $v \odot w$ to denote element-wise product, $v / w$ to denote element-wise division, $\operatorname* { m a x } ( v , w )$ to denote element-wise maximum and $\operatorname* { m i n } ( v , w )$ to denote element-wise minimum. We use $S _ { + } ^ { d }$ to denote the set of all positive definite $d \times d$ matrices. For a vector $a \in \mathbb { R } ^ { d }$ and a positive definite matrix $M \in \mathbb { R } ^ { d \times d }$ , we use $a / M$ to denote $M ^ { - 1 } a$ and $\sqrt { M }$ to denote $M ^ { 1 / 2 }$ . The projection operation $\Pi _ { \mathcal { F } , M } ( y )$ for ${ \cal M } \in { \cal S } _ { + } ^ { d }$ is defined as ar $\begin{array} { r } { \operatorname { g m i n } _ { x \in \mathcal { F } } \| M ^ { 1 / 2 } ( x - y ) \| } \end{array}$ for $\boldsymbol { y } \in \mathbb { R } ^ { d }$ . We say $\mathcal { F }$ has bounded diameter $D _ { \infty }$ if $\| x - y \| _ { \infty } \leq D _ { \infty }$ for all $x , y \in { \mathcal { F } }$ .
|
| 24 |
+
|
| 25 |
+
Online convex programming A flexible framework to analyze iterative optimization methods is the online optimization problem. It can be formulated as a repeated game between a player (the algorithm) and an adversary. At step $t$ , the algorithm chooses an decision $x _ { t } \in \mathcal { F }$ , where $\mathcal { F } \subset \mathbb { R } ^ { d }$ is a convex feasible set. Then the adversary chooses a convex loss function $f _ { t }$ and the algorithm incurs loss $f _ { t } ( x _ { t } )$ . The difference between the total loss $\textstyle \sum _ { t = 1 } ^ { T } f _ { t } ( x _ { t } )$ and its minimum value for a fixed decision is known as the regret, which is represented by $\begin{array} { r } { \dot { R } _ { T } = \sum _ { t = 1 } ^ { T } f _ { t } ( x _ { t } ) - \operatorname* { m i n } _ { x \in \mathcal { F } } \sum _ { t = 1 } ^ { T } f _ { t } ( x ) } \end{array}$ $\mathcal { F }$ has bounded diameter and $\| \nabla f _ { t } ( x ) \| _ { \infty }$ is bounded for all $t \in [ T ]$ and $x \in { \mathcal { F } }$ . We are interested in algorithms with little regret. Formally speaking, our aim is to devise an algorithm that ensures $R _ { T } = o ( T )$ , which implies that on average, the model’s performance converges to the optimal one. It has been pointed out that an online optimization algorithm with vanishing average regret yields a corresponding stochastic optimization algorithm (Cesa-Bianchi et al., 2002). Thus, following Reddi et al. (2018), we use online gradient descent and stochastic gradient descent synonymously.
|
| 26 |
+
|
| 27 |
+
A generic overview of optimization methods We follow Reddi et al. (2018) to provide a generic framework of optimization methods in Algorithm 1 that encapsulates many popular adaptive and non-adaptive methods. This is useful for understanding the properties of different optimization methods. Note that the algorithm is still abstract since the functions $\phi _ { t } : \mathcal { F } ^ { t } \to \mathbb { R } ^ { \hat { d } }$ and √ $\psi _ { t } : $ $\mathcal { F } ^ { d } \mathcal { S } _ { + } ^ { d }$ have not been specified. In this paper, we refer to $\alpha$ as initial step size and $\alpha _ { t } / \sqrt { V _ { t } }$ as
|
| 28 |
+
|
| 29 |
+
# Algorithm 1 Generic framework of optimization methods
|
| 30 |
+
|
| 31 |
+
Input: $x _ { 1 } \in { \mathcal { F } }$ , initial step size $\alpha$ , sequence of functions $\{ \phi _ { t } , \psi _ { t } \} _ { t = 1 } ^ { T }$
|
| 32 |
+
|
| 33 |
+
1: for $t = 1$ to $T$ do
|
| 34 |
+
2: $g _ { t } = \nabla f _ { t } ( x _ { t } )$
|
| 35 |
+
3: $m _ { t } = \phi _ { t } ( g _ { 1 } , \cdot \cdot \cdot , g _ { t } )$ and $V _ { t } = \psi _ { t } ( g _ { 1 } , \cdot \cdot \cdot , g _ { t } )$
|
| 36 |
+
4: $\alpha _ { t } = \alpha / \sqrt { t }$
|
| 37 |
+
5: $\hat { x } _ { t + 1 } = x _ { t } - \alpha _ { t } m _ { t } / \sqrt { V _ { t } }$
|
| 38 |
+
6: $x _ { t + 1 } = \Pi _ { \mathcal { F } , \sqrt { V _ { t } } } ( \hat { x } _ { t + 1 } )$
|
| 39 |
+
7: end for
|
| 40 |
+
|
| 41 |
+
learning rate of the algorithm. Note that we employ a design of decreasing step size by $\alpha _ { t } = \alpha / \sqrt { t }$ for it is required for theoretical proof of convergence. However such an aggressive decay of step size typically translates into poor empirical performance, while a simple constant step size $\alpha _ { t } =$ $\alpha$ usually works well in practice. For the sake of clarity, we will use the decreasing scheme for theoretical analysis and the constant schemem for empirical study in the rest of the paper.
|
| 42 |
+
|
| 43 |
+
Under such a framework, we can summarize the popular optimization methods in Table 1.1 A few remarks are in order. We can see the scaling term $\psi _ { t }$ is I in SGD(M), while adaptive methods introduce different kinds of averaging of the squared values of past gradients. ADAM and RMSPROP can be seen as variants of ADAGRAD, where the former ones use an exponential moving average as function $\psi _ { t }$ instead of the simple average used in ADAGRAD. In particular, RMSPROP is essentially a special case of ADAM with $\beta _ { 1 } = 0$ . AMSGRAD is not listed in the table as it does not has a simple expression of $\psi _ { t }$ . It can be defined as $\psi _ { t } = \mathrm { d i a g } ( \hat { v } _ { t } )$ where $\hat { v } _ { t }$ is obtained by the following recursion: $v _ { t } = \beta _ { 2 } v _ { t - 1 } + ( 1 - \beta _ { 2 } ) g _ { t } ^ { 2 }$ and $\hat { v } _ { t } = \operatorname* { m a x } ( \hat { v } _ { t - 1 } , v _ { t } )$ with $\hat { v } _ { 0 } = v _ { 0 } = \mathbf { 0 }$ . The definition of $\phi _ { t }$ is same with that of ADAM. In the rest of the paper we will mainly focus on ADAM due to its generality but our arguments also apply to other similar adaptive methods such as RMSPROP and AMSGRAD.
|
| 44 |
+
|
| 45 |
+
Table 1: An overview of popular optimization methods using the generic framework.
|
| 46 |
+
|
| 47 |
+
<table><tr><td></td><td>SGD</td><td>SGDM</td><td>ADAGRAD</td><td>RMSPROP</td><td>ADAM</td></tr><tr><td>t</td><td>gt</td><td>t M</td><td>gt</td><td>gt</td><td>t (1-β1)∑ β -igi</td></tr><tr><td>t</td><td>I</td><td>i=1 I</td><td>t diag(M =1</td><td>(1-β2)diag(∑</td><td>i=1 t (1-β2)diag(∑ -g) =1</td></tr></table>
|
| 48 |
+
|
| 49 |
+
# 3 THE NON-CONVERGENCE CAUSED BY EXTREME LEARNING RATE
|
| 50 |
+
|
| 51 |
+
In this section, we elaborate the primary defect in current adaptive methods with a preliminary experiment and a rigorous proof. As mentioned above, adaptive methods like ADAM are observed to perform worse than SGD. Reddi et al. (2018) proposed AMSGRAD to solve this problem but recent work has pointed out AMSGRAD does not show evident improvement over ADAM (Keskar & Socher, 2017; Chen et al., 2018). Since AMSGRAD is claimed to have a smaller learning rate compared with ADAM, the authors only consider large learning rates as the cause for bad performance of ADAM. However, small ones might be a pitfall as well. Thus, we speculate both extremely large and small learning rates of ADAM are likely to account for its ordinary generalization ability.
|
| 52 |
+
|
| 53 |
+
For corroborating our speculation, we sample learning rates of several weights and biases of ResNet34 on CIFAR-10 using ADAM. Specifically, we randomly select nine $3 \times 3$ convolutional kernels from different layers and the biases in the last linear layer. As parameters of the same layer usually have similar properties, here we only demonstrate learning rates of nine weights sampled from nine kernels respectively and one bias from the last layer by the end of training, and employ a heatmap to visualize them. As shown in Figure 1, we can find that when the model is close to convergence, learning rates are composed of tiny ones less than 0.01 as well as huge ones greater than 1000.
|
| 54 |
+
|
| 55 |
+

|
| 56 |
+
Figure 1: Learning rates of sampled parameters. Each cell contains a value obtained by conducting a logarithmic operation on the learning rate. The lighter cell stands for the smaller learning rate.
|
| 57 |
+
|
| 58 |
+
The above analysis and observation show that there are indeed learning rates which are too large or too small in the final stage of the training process. AMSGRAD may help abate the impact of huge learning rates, but it neglects the other side of the coin. Insofar, we still have the following two doubts. First, does the tiny learning rate really do harm to the convergence of ADAM? Second, as the learning rate highly depends on the initial step size, can we use a relatively larger initial step size $\alpha$ to get rid of too small learning rates?
|
| 59 |
+
|
| 60 |
+
To answer these questions, we show that undesirable convergence behavior for ADAM and RMSPROP can be caused by extremely small learning rates, and furthermore, in some cases no matter how large the initial step size $\alpha$ is, ADAM will still fail to find the right path and converge to some highly suboptimal points. Consider the following sequence of linear functions for $\mathcal { F } = [ - 1 , 1 ]$ :
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
f _ { t } ( x ) = { \left\{ \begin{array} { l l } { - x , } & { { \mathrm { f o r ~ } } t { \mathrm { ~ m o d ~ } } C = 1 ; } \\ { 2 x , } & { { \mathrm { f o r ~ } } t { \mathrm { ~ m o d ~ } } C = 2 ; } \\ { 0 , } & { { \mathrm { o t h e r w i s e } } } \end{array} \right. }
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
where $C \in \mathbb { N }$ satisfies: $5 \beta _ { 2 } ^ { C - 2 } \leq ( 1 - \beta _ { 2 } ) / 2 ( 4 - \beta _ { 2 } )$ . For this function sequence, it is easy to see that the point $x = - 1$ provides the minimum regret. Supposing $\beta _ { 1 } = 0$ , we show that ADAM converges to a highly suboptimal solution of $x \geq 0$ for this setting. Intuitively, the reasoning is as follows. The algorithm obtains a gradient $- 1$ once every $C$ steps, which moves the algorithm in the wrong direction. Then, at the next step it observes a gradient 2. But the larger gradient 2 is unable to counteract the effect to wrong direction since the learning rate at this step is scaled down to a value much less than the previous one, and hence $x$ becomes larger and larger as the time step increases. We formalize this intuition in the result below.
|
| 67 |
+
|
| 68 |
+
Theorem 1. There is an online convex optimization problem where for any initial step size $\alpha$ , ADAM has non-zero average regret i.e., $R _ { T } / T \not \to 0$ as $T \to \infty$ .
|
| 69 |
+
|
| 70 |
+
We relegate all proofs to the appendix. Note that the above example also holds for constant step size $\alpha _ { t } = \alpha$ . Also note that vanilla SGD does not suffer from this problem. There is a wide range of valid choices of initial step size $\alpha$ where the average regret of SGD asymptotically goes to 0, in other words, converges to the optimal solution. This problem can be more obvious in the later stage of a training process in practice when the algorithm gets stuck in some suboptimal points. In such cases, gradients at most steps are close to 0 and the average of the second order momentum may be highly various due to the property of exponential moving average. Therefore, “correct” signals which appear with a relatively low frequency (i.e. gradient 2 every $C$ steps in the above example) may not be able to lead the algorithm to a right path, if they come after some “wrong” signals (i.e. gradient 1 in the example), even though the correct ones have larger absolute value of gradients.
|
| 71 |
+
|
| 72 |
+
One may wonder if using large $\beta _ { 1 }$ helps as we usually use $\beta _ { 1 }$ close to 1 in practice. However, the√ following result shows that for any constant $\beta _ { 1 }$ and $\beta _ { 2 }$ with $\beta _ { 1 } < \sqrt { \beta _ { 2 } }$ , there exists an example where ADAM has non-zero average regret asymptotically regardless of the initial step size $\alpha$ .
|
| 73 |
+
|
| 74 |
+
Theorem 2. For any constant $\beta _ { 1 } , \beta _ { 2 } ~ \in ~ [ 0 , 1 )$ such that $\beta _ { 1 } ~ < ~ \sqrt { \beta _ { 2 } }$ , there is an online convex optimization problem where for any initial step size $\alpha$ , ADAM has non-zero average regret i.e., $R _ { T } / T \not \to 0$ as $T \to \infty$ .
|
| 75 |
+
|
| 76 |
+
Furthermore, a stronger result stands in the easier stochastic optimization setting.
|
| 77 |
+
|
| 78 |
+
Theorem 3. For any constant $\beta _ { 1 } , \beta _ { 2 } \in [ 0 , 1 )$ such that $\beta _ { 1 } < \sqrt { \beta _ { 2 } }$ , there is a stochastic convex optimization problem where for any initial step size $\alpha$ , ADAM does not converge to the optimal solution.
|
| 79 |
+
|
| 80 |
+
Remark. The analysis of ADAM in Kingma & Lei Ba (2015) relies on decreasing $\beta _ { 1 }$ over time, while here we use constant $\beta _ { 1 }$ . Indeed, since the critical parameter is $\beta _ { 2 }$ rather than $\beta _ { 1 }$ in our analysis, it is quite easy to extend our examples to the case using decreasing scheme of $\beta _ { 1 }$ .
|
| 81 |
+
|
| 82 |
+
As mentioned by Reddi et al. (2018), the condition $\beta _ { 1 } < \sqrt { \beta _ { 2 } }$ is benign and is typically satisfied in the parameter settings used in practice. Such condition is also assumed in convergence proof of Kingma & Lei Ba (2015). The above results illustrate the potential bad impact of extreme learning rates and algorithms are unlikely to achieve good generalization ability without solving this problem.
|
| 83 |
+
|
| 84 |
+
# 4 ADAPTIVE MOMENT ESTIMATION WITH DYNAMIC BOUND
|
| 85 |
+
|
| 86 |
+
In this section we develop new variants of optimization methods and provide their convergence analysis. Our aim is to devise a strategy that combines the benefits of adaptive methods, viz. fast initial progress, and the good final generalization properties of SGD. Intuitively, we would like to construct an algorithm that behaves like adaptive methods early in training and like SGD at the end.
|
| 87 |
+
|
| 88 |
+
# Algorithm 2 ADABOUND
|
| 89 |
+
|
| 90 |
+
Input: $x _ { 1 } \in { \mathcal { F } }$ , initial step size $\alpha$ , $\{ \beta _ { 1 t } \} _ { t = 1 } ^ { T } , \beta _ { 2 }$ , lower bound function $\eta _ { l }$ , upper bound function $\eta _ { u }$
|
| 91 |
+
1: Set $m _ { 0 } = 0$ , $v _ { 0 } = 0$
|
| 92 |
+
2: for $t = 1$ to $T$ do
|
| 93 |
+
3: $g _ { t } = \nabla f _ { t } ( x _ { t } )$
|
| 94 |
+
4: $m _ { t } = \beta _ { 1 t } m _ { t - 1 } + ( 1 - \beta _ { 1 t } ) g _ { t }$
|
| 95 |
+
5: $v _ { t } = \beta _ { 2 } v _ { t - 1 } + ( 1 - \beta _ { 2 } ) g _ { t } ^ { 2 }$ and $V _ { t } = \mathrm { d i a g } ( v _ { t } )$
|
| 96 |
+
6: $\hat { \eta } _ { t } = \mathrm { C l i p } ( \alpha / \sqrt { V _ { t } } , \eta _ { l } ( t ) , \eta _ { u } ( t ) )$ and ηt = ˆηt/ t
|
| 97 |
+
7: $x _ { t + 1 } = \Pi _ { { \mathcal { F } } , \mathrm { d i a g } ( \eta _ { t } ^ { - 1 } ) } ( x _ { t } - \eta _ { t } \odot m _ { t } )$
|
| 98 |
+
8: end for
|
| 99 |
+
|
| 100 |
+
Inspired by gradient clipping, a popular technique used in practice that clips the gradients larger than a threshold to avoid gradient explosion, we employ clipping on learning rates in ADAM to propose ADABOUND in Algorithm 2. Consider applying the following operation in ADAM
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
\mathrm { C l i p } ( \alpha / { \sqrt { V _ { t } } } , \eta _ { l } , \eta _ { u } ) ,
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
which clips the learning rate element-wisely such that the output is constrained to be in $[ \eta _ { l } , \eta _ { u } ]$ . 2 It follows that $\operatorname { S G D } ( \mathbf { M } )$ with $\alpha = \alpha ^ { * }$ can be considered as the case where $\eta _ { l } = \eta _ { u } = \alpha ^ { * }$ . As for ADAM, $\eta _ { l } = 0$ and $\eta _ { u } = \infty$ . Now we can provide the new strategy with the following steps. We employ $\eta _ { l }$ and $\eta _ { u }$ as functions of $t$ instead of constant lower and upper bound, where $\eta _ { l } ( t )$ is a non-decreasing function that starts from 0 as $t = 0$ and converges to $\alpha ^ { * }$ asymptotically; and $\eta _ { u } ( t )$ is a non-increasing function that starts from $\infty$ as $t = 0$ and also converges to $\alpha ^ { * }$ asymptotically. In this setting, ADABOUND behaves just like ADAM at the beginning as the bounds have very little impact on learning rates, and it gradually transforms to SGD(M) as the bounds become more and more restricted. We prove the following key result for ADABOUND.
|
| 107 |
+
|
| 108 |
+
Theorem 4. Let $\{ x _ { t } \}$ and √ $\{ v _ { t } \}$ be the sequences obtained from Algorithm 2, $\beta _ { 1 } = \beta _ { 1 1 }$ , $\beta _ { 1 t } \le \beta _ { 1 }$ for all $t \in [ T ]$ and $\beta _ { 1 } / \sqrt { \beta _ { 2 } } < 1$ . Suppose $\eta _ { l } ( t + 1 ) \geq \eta _ { l } ( t ) > 0$ , $\eta _ { u } ( t + 1 ) \leq \eta _ { u } ( t )$ , $\eta _ { l } ( t ) \alpha ^ { * }$ as $t \to \infty$ , $\eta _ { u } ( t ) \to \alpha ^ { * }$ as $t \to \infty$ , $L _ { \infty } = \eta _ { l } ( 1 )$ and $R _ { \infty } = \eta _ { u } ( 1 )$ . Assume that $\| x - y \| _ { \infty } \leq D _ { \infty }$ for all $x , y \in { \mathcal { F } }$ and $\lVert \nabla f _ { t } ( x ) \rVert \leq G _ { 2 }$ for all $t \in [ T ]$ and $x \in { \mathcal { F } }$ . For $x _ { t }$ generated using the ADABOUND algorithm, we have the following bound on the regret
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
R _ { T } \le \frac { D _ { \infty } ^ { 2 } \sqrt { T } } { 2 ( 1 - \beta _ { 1 } ) } \sum _ { i = 1 } ^ { d } \hat { \eta } _ { T , i } ^ { - 1 } + \frac { D _ { \infty } ^ { 2 } } { 2 ( 1 - \beta _ { 1 } ) } \sum _ { t = 1 } ^ { T } \sum _ { i = 1 } ^ { d } \beta _ { 1 t } \eta _ { t , i } ^ { - 1 } + ( 2 \sqrt { T } - 1 ) \frac { R _ { \infty } G _ { 2 } ^ { 2 } } { 1 - \beta _ { 1 } } .
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
The following result falls as an immediate corollary of the above result.
|
| 115 |
+
|
| 116 |
+
Corollary 4.1. Suppose $\beta _ { 1 t } = \beta _ { 1 } \lambda ^ { t - 1 }$ in Theorem $^ { 4 }$ , we have
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
R _ { T } \le \frac { D _ { \infty } ^ { 2 } \sqrt { T } } { 2 ( 1 - \beta _ { 1 } ) } \sum _ { i = 1 } ^ { d } \hat { \eta } _ { T , i } ^ { - 1 } + \frac { \beta _ { 1 } d D _ { \infty } ^ { 2 } } { 2 ( 1 - \beta _ { 1 } ) ( 1 - \lambda ) ^ { 2 } L _ { \infty } } + ( 2 \sqrt { T } - 1 ) \frac { R _ { \infty } G _ { 2 } ^ { 2 } } { 1 - \beta _ { 1 } } .
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
It is easy to see that the regret of ADABOUND is upper bounded by $O ( \sqrt { T } )$ . Similar to Reddi et al. (2018), one can use a much more modest momentum decay of $\beta _ { 1 t } = \beta _ { 1 } / t$ and still ensure a regret of $O ( \sqrt { T } )$ . It should be mentioned that one can also incorporate the dynamic bound in AMSGRAD. The resulting algorithm, namely AMSBOUND, also holds a regret of $O ( \sqrt { T } )$ and the proof of convergence is almost same to Theorem 4 (see Appendix F for details). In next section we will see that AMSBOUND has similar performance to ADABOUND in several well-known tasks.
|
| 123 |
+
|
| 124 |
+
We end this section with a comparison to the previous work. For the idea of transforming ADAM to SGD, there is a similar work by Keskar & Socher (2017). The authors propose a measure that uses ADAM at first and switches the algorithm to SGD at some specific step. Compared with their approach, our methods have two advantages. First, whether there exists a fixed turning point to distinguish ADAM and SGD is uncertain. So we address this problem with a continuous transforming procedure rather than a “hard” switch. Second, they introduce an extra hyperparameter to decide the switching time, which is not very easy to fine-tune. As for our methods, the flexible parts introduced are two bound functions. We conduct an empirical study of the impact of different kinds of bound functions. The results are placed in Appendix G for we find that the convergence target $\alpha ^ { * }$ and convergence speed are not very important to the final results. For the sake of clarity, we will use ηl(t) = 0.1− 0.1(1−β2)t+1 and $\begin{array} { r } { \eta _ { u } \dot { ( t ) } = 0 . 1 + \frac { 0 . 1 } { ( 1 - \beta _ { 2 } ) t } } \end{array}$ in the rest of the paper unless otherwise specified.
|
| 125 |
+
|
| 126 |
+
# 5 EXPERIMENTS
|
| 127 |
+
|
| 128 |
+
In this section, we turn to an empirical study of different models to compare new variants with popular optimization methods including SGD(M), ADAGRAD, ADAM, and AMSGRAD. We focus on three tasks: the MNIST image classification task (Lecun et al., 1998), the CIFAR-10 image classification task (Krizhevsky & Hinton, 2009), and the language modeling task on Penn Treebank (Marcus et al., 1993). We choose them due to their broad importance and availability of their architectures for reproducibility. The setup for each task is detailed in Table 2. We run each experiment three times with the specified initialization method from random starting points. A fixed budget on the number of epochs is assigned for training and the decay strategy is introduced in following parts. We choose the settings that achieve the lowest training loss at the end.
|
| 129 |
+
|
| 130 |
+
Table 2: Summaries of the models utilized for our experiments.
|
| 131 |
+
|
| 132 |
+
<table><tr><td>Dataset</td><td>Network Type</td><td>Architecture</td></tr><tr><td>MNIST</td><td>Feedforward</td><td>1-Layer Perceptron</td></tr><tr><td>CIFAR-10</td><td>Deep Convolutional</td><td>DenseNet-121</td></tr><tr><td>CIFAR-10</td><td>Deep Convolutional</td><td>ResNet-34</td></tr><tr><td>Penn Treebank</td><td>Recurrent</td><td>1-Layer LSTM</td></tr><tr><td>Penn Treebank</td><td>Recurrent</td><td>2-Layer LSTM</td></tr><tr><td>Penn Treebank</td><td>Recurrent</td><td>3-Layer LSTM</td></tr></table>
|
| 133 |
+
|
| 134 |
+
# 5.1 HYPERPARAMETER TUNING
|
| 135 |
+
|
| 136 |
+
Optimization hyperparameters can exert great impact on ultimate solutions found by optimization algorithms so here we describe how we tune them. To tune the step size, we follow the method in Wilson et al. (2017). We implement a logarithmically-spaced grid of five step sizes. If the best performing parameter is at one of the extremes of the grid, we will try new grid points so that the best performing parameters are at one of the middle points in the grid. Specifically, we tune over hyperparameters in the following way.
|
| 137 |
+
|
| 138 |
+
SGD(M) For tuning the step size of SGD(M), we first coarsely tune the step size on a logarithmic scale from $\{ 1 0 0 , 1 0 , 1 , 0 . 1 , 0 . 0 1 \}$ and then fine-tune it. Whether the momentum is used depends on the specific model but we set the momentum parameter to default value 0.9 for all our experiments. We find this strategy effective given the vastly different scales of learning rates needed for different modalities. For instance, SGD with $\alpha = 1 0$ performs best for language modeling on PTB but for the ResNet-34 architecture on CIFAR-10, a learning rate of 0.1 for SGD is necessary.
|
| 139 |
+
|
| 140 |
+
ADAGRAD The initial set of step sizes used for ADAGRAD are: $\{ 5 \mathrm { e } { - } 2 , 1 \mathrm { e } { - } 2 , 5 \mathrm { e } { - } 3 , 1 \mathrm { e } { - } 3 , 5 \mathrm { e } { - } 4 \}$ .
|
| 141 |
+
For the initial accumulator value, we choose the recommended value as 0.
|
| 142 |
+
|
| 143 |
+
ADAM & AMSGRAD We employ the same hyperparameters for these two methods. The initial step sizes are chosen from: $\{ 1 \mathrm { e } { - } 2 , 5 \mathrm { e } { - } 3 , 1 \mathrm { e } { - } 3 , 5 \mathrm { e } { - } 4 , 1 \mathrm { e } { - } 4 \}$ . We turn over $\beta _ { 1 }$ values of $\{ 0 . 9 , 0 . 9 9 \}$ and $\beta _ { 2 }$ values of $\{ 0 . 9 9 , 0 . 9 9 9 \}$ . We use for the perturbation value $\epsilon = 1 \mathrm { e } { - } 8$ .
|
| 144 |
+
|
| 145 |
+
ADABOUND & AMSBOUND We directly apply the default hyperparameters for ADAM (a learning rate of 0.001, $\beta _ { 1 } = 0 . 9$ and $\beta _ { 2 } = 0 . 9 9 9 \rangle$ ) in our proposed methods.
|
| 146 |
+
|
| 147 |
+
Note that for other hyperparameters such as batch size, dropout probability, weight decay and so on, we choose them to match the recommendations of the respective base architectures.
|
| 148 |
+
|
| 149 |
+
# 5.2 FEEDFORWARD NEURAL NETWORK
|
| 150 |
+
|
| 151 |
+
We train a simple fully connected neural network with one hidden layer for the multiclass classification problem on MNIST dataset. We run 100 epochs and omit the decay scheme for this experiment.
|
| 152 |
+
|
| 153 |
+
Figure 2 shows the learning curve for each optimization method on both the training and test set. We find that for training, all algorithms can achieve the accuracy approaching $1 0 0 \%$ . For the test part, SGD performs slightly better than adaptive methods ADAM and AMSGRAD. Our two proposed methods, ADABOUND and AMSBOUND, display slight improvement, but compared with their prototypes there are still visible increases in test accuracy.
|
| 154 |
+
|
| 155 |
+

|
| 156 |
+
Figure 2: Training (left) and test accuracy (right) for feedforward neural network on MNIST.
|
| 157 |
+
|
| 158 |
+
# 5.3 CONVOLUTIONAL NEURAL NETWORK
|
| 159 |
+
|
| 160 |
+
Using DenseNet-121 (Huang et al., 2017) and ResNet-34 (He et al., 2016), we then consider the task of image classification on the standard CIFAR-10 dataset. In this experiment, we employ the fixed budget of 200 epochs and reduce the learning rates by 10 after 150 epochs.
|
| 161 |
+
|
| 162 |
+
DenseNet We first run a DenseNet-121 model on CIFAR-10 and our results are shown in Figure 3. We can see that adaptive methods such as ADAGRAD, ADAM and AMSGRAD appear to perform better than the non-adaptive ones early in training. But by epoch 150 when the learning rates are decayed, SGDM begins to outperform those adaptive methods. As for our methods, ADABOUND and AMSBOUND, they converge as fast as adaptive ones and achieve a bit higher accuracy than SGDM on the test set at the end of training. In addition, compared with their prototypes, their performances are enhanced evidently with approximately $2 \%$ improvement in the test accuracy.
|
| 163 |
+
|
| 164 |
+
ResNet Results for this experiment are reported in Figure 3. As is expected, the overall performance of each algorithm on ResNet-34 is similar to that on DenseNet-121. ADABOUND and AMSBOUND even surpass SGDM by $1 \%$ . Despite the relative bad generalization ability of adaptive methods, our proposed methods overcome this drawback by allocating bounds for their learning rates and obtain almost the best accuracy on the test set for both DenseNet and ResNet on CIFAR-10.
|
| 165 |
+
|
| 166 |
+
# 5.4 RECURRENT NEURAL NETWORK
|
| 167 |
+
|
| 168 |
+
Finally, we conduct an experiment on the language modeling task with Long Short-Term Memory (LSTM) network (Hochreiter & Schmidhuber, 1997). From two experiments above, we observe that our methods show much more improvement in deep convolutional neural networks than in perceptrons. Therefore, we suppose that the enhancement is related to the complexity of the architecture and run three models with (L1) 1-layer, (L2) 2-layer and (L3) 3-layer LSTM respectively. We train them on Penn Treebank, running for a fixed budget of 200 epochs. We use perplexity as the metric to evaluate the performance and report results in Figure 4.
|
| 169 |
+
|
| 170 |
+

|
| 171 |
+
Figure 3: Training and test accuracy for DenseNet-121 and ResNet-34 on CIFAR-10.
|
| 172 |
+
|
| 173 |
+

|
| 174 |
+
(c) L3: 3-Layer LSTM
|
| 175 |
+
Figure 4: Perplexity curves on the test set comparing SGD, ADAM, ADABOUND and AMSBOUND for the LSTM with different layers on Penn Treebank.
|
| 176 |
+
|
| 177 |
+
We find that in all models, ADAM has the fastest initial progress but stagnates in worse performance than SGD and our methods. Different from phenomena in previous experiments on the image classification tasks, ADABOUND and AMSBOUND does not display rapid speed at the early training stage but the curves are smoother than that of SGD.
|
| 178 |
+
|
| 179 |
+
Comparing L1, L2 and L3, we can easily notice a distinct difference of the improvement degree. In L1, the simplest model, our methods perform slightly $1 . 1 \%$ better than ADAM while in L3, the most complex model, they show evident improvement over $2 . 8 \%$ in terms of perplexity. It serves as evidence for the relationship between the model’s complexity and the improvement degree.
|
| 180 |
+
|
| 181 |
+
# 5.5 ANALYSIS
|
| 182 |
+
|
| 183 |
+
To investigate the efficacy of our proposed algorithms, we select popular tasks from computer vision and natural language processing. Based on results shown above, it is easy to find that ADAM and AMSGRAD usually perform similarly and the latter does not show much improvement for most cases. Their variants, ADABOUND and AMSBOUND, on the other hand, demonstrate a fast speed of convergence compared with SGD while they also exceed two original methods greatly with respect to test accuracy at the end of training. This phenomenon exactly confirms our view mentioned in Section 3 that both large and small learning rates can influence the convergence.
|
| 184 |
+
|
| 185 |
+
Besides, we implement our experiments on models with different complexities, consisting of a perceptron, two deep convolutional neural networks and a recurrent neural network. The perceptron used on the MNIST is the simplest and our methods perform slightly better than others. As for DenseNet and ResNet, obvious increases in test accuracy can be observed. We attribute this difference to the complexity of the model. Specifically, for deep CNN models, convolutional and fully connected layers play different parts in the task. Also, different convolutional layers are likely to be responsible for different roles (Lee et al., 2009), which may lead to a distinct variation of gradients of parameters. In other words, extreme learning rates (huge or tiny) may appear more frequently in complex models such as ResNet. As our algorithms are proposed to avoid them, the greater enhancement of performance in complex architectures can be explained intuitively. The higher improvement degree on LSTM with more layers on language modeling task also consists with the above analysis.
|
| 186 |
+
|
| 187 |
+
# 6 FUTURE WORK
|
| 188 |
+
|
| 189 |
+
Despite superior results of our methods, there still remain several problems to explore. For example, the improvement on simple models are not very inspiring, we can investigate how to achieve higher improvement on such models. Besides, we only discuss reasons for the weak generalization ability of adaptive methods, however, why SGD usually performs well across diverse applications of machine learning still remains uncertain. Last but not least, applying dynamic bounds on learning rates is only one particular way to conduct gradual transformation from adaptive methods to SGD. There might be other ways such as well-designed decay that can also work, which remains to explore.
|
| 190 |
+
|
| 191 |
+
# 7 CONCLUSION
|
| 192 |
+
|
| 193 |
+
We investigate existing adaptive algorithms and find that extremely large or small learning rates can result in the poor convergence behavior. A rigorous proof of non-convergence for ADAM is provided to demonstrate the above problem.
|
| 194 |
+
|
| 195 |
+
Motivated by the strong generalization ability of SGD, we design a strategy to constrain the learning rates of ADAM and AMSGRAD to avoid a violent oscillation. Our proposed algorithms, ADABOUND and AMSBOUND, which employ dynamic bounds on their learning rates, achieve a smooth transition to SGD. They show the great efficacy on several standard benchmarks while maintaining advantageous properties of adaptive methods such as rapid initial progress and hyperparameter insensitivity.
|
| 196 |
+
|
| 197 |
+
# ACKNOWLEDGMENTS
|
| 198 |
+
|
| 199 |
+
We thank all reviewers for providing the constructive suggestions. We also thank Junyang Lin and Ruixuan Luo for proofreading and doing auxiliary experiments. Xu Sun is the corresponding author of this paper.
|
| 200 |
+
|
| 201 |
+
# REFERENCES
|
| 202 |
+
|
| 203 |
+
Nico Cesa-Bianchi, Alex Conconi, and Claudio Gentile. On the generalization ability of on-line learning algorithms. In Advances in Neural Information Processing Systems 14 (NIPS), pp. 359– 366, 2002.
|
| 204 |
+
|
| 205 |
+
Xiangyi Chen, Sijia Liu, Ruoyu Sun, and Mingyi Hong. On the convergence of a class of Adam-type algorithms for non-convex optimization. CoRR, abs/1808.02941, 2018.
|
| 206 |
+
|
| 207 |
+
John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research (JMLR), 12:2121–2159, 2011.
|
| 208 |
+
|
| 209 |
+
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 (CVPR), 2016.
|
| 210 |
+
|
| 211 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Comput., 9(8):1735– 1780, 1997.
|
| 212 |
+
|
| 213 |
+
Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017.
|
| 214 |
+
|
| 215 |
+
Nitish Shirish Keskar and Richard Socher. Improving generalization performance by switching from Adam to SGD. CoRR, abs/1712.07628, 2017.
|
| 216 |
+
|
| 217 |
+
Diederik P Kingma and Jimmy Lei Ba. Adam: A method for stochastic optimization. In Proceedings of the 3rd International Conference on Learning Representations (ICLR), 2015.
|
| 218 |
+
|
| 219 |
+
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, 2009.
|
| 220 |
+
|
| 221 |
+
Yann Lecun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. In Proceedings of the IEEE, pp. 2278–2324, 1998.
|
| 222 |
+
|
| 223 |
+
Honglak Lee, Roger Grosse, Rajesh Ranganath, and Andrew $\mathrm { ~ Y ~ N ~ g ~ } _ { }$ . Convolutional deep belief networks for scalable unsupervised learning of hierarchical representations. In Proceedings of the 26th Annual International Conference on Machine Learning (ICML), pp. 609–616, 2009.
|
| 224 |
+
|
| 225 |
+
Liangchen Luo, Wenhao Huang, Qi Zeng, Zaiqing Nie, and Xu Sun. Learning personalized end-toend goal-oriented dialog. In Proceedings of the 33rd AAAI Conference on Artificial Intelligence (AAAI), 2019.
|
| 226 |
+
|
| 227 |
+
Mitchell P. Marcus, Mary Ann Marcinkiewicz, and Beatrice Santorini. Building a large annotated corpus of english: The penn treebank. Comput. Linguist., 19(2):313–330, 1993.
|
| 228 |
+
|
| 229 |
+
H Brendan Mcmahan and Matthew Streeter. Adaptive bound optimization for online convex optimization. In Proceedings of the 23rd Annual Conference On Learning Theory (COLT), pp. 244–256, 2010.
|
| 230 |
+
|
| 231 |
+
Sashank J. Reddi, Stayen Kale, and Sanjiv Kumar. On the convergence of adam and beyond. In Proceedings of the 6th International Conference on Learning Representations (ICLR), 2018.
|
| 232 |
+
|
| 233 |
+
Herbert Robbins and Sutton Monro. A stochastic approximation method. The Annals of Mathematical Statistics, 22(3):400–407, 1951.
|
| 234 |
+
|
| 235 |
+
Tijmen Tieleman and Geoffrey Hinton. RMSprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning, 4(2):26–31, 2012.
|
| 236 |
+
|
| 237 |
+
Ashia C Wilson, Rebecca Roelofs, Mitchell Stern, Nati Srebro, and Benjamin Recht. The marginal value of adaptive gradient methods in machine learning. In Advances in Neural Information Processing Systems 30 (NIPS), pp. 4148–4158, 2017.
|
| 238 |
+
|
| 239 |
+
Yuxin Wu and Kaiming He. Group normalization. In Proceedings of the 15th European Conference on Computer Vision (ECCV), pp. 3–19, 2018.
|
| 240 |
+
|
| 241 |
+
# APPENDIX
|
| 242 |
+
|
| 243 |
+
A AUXILIARY LEMMAS
|
| 244 |
+
|
| 245 |
+
Lemma 1 (Mcmahan & Streeter (2010)). For any $Q \in { \mathcal { S } } _ { + } ^ { d }$ and convex feasible set $\mathcal { F } \subset \mathbb { R } ^ { d }$ , suppose $\begin{array} { r } { u _ { 1 } = \operatorname* { m i n } _ { x \in \mathcal { F } } \| Q ^ { 1 / 2 } ( x - z _ { 1 } ) \| } \end{array}$ and $\begin{array} { r } { u _ { 2 } = \operatorname* { m i n } _ { x \in \mathcal { F } } \| Q ^ { 1 / 2 } ( x - z _ { 2 } ) \| } \end{array}$ then we have $\lVert Q ^ { 1 / 2 } ( u _ { 1 } - u _ { 2 } ) \rVert \leq$ $\lVert Q ^ { 1 / 2 } ( z _ { 1 } - z _ { 2 } ) \rVert$ .
|
| 246 |
+
|
| 247 |
+
Proof. We provide the proof here for completeness. Since $u _ { 1 } = m i n _ { x \in \mathcal { F } } \| Q ^ { 1 / 2 } ( x - z _ { 1 } ) \|$ and $u _ { 2 } = m i n _ { x \in \mathcal { F } } \left| \left| Q ^ { 1 / 2 } ( x - z _ { 2 } ) \right| \right|$ and from the property of projection operator we have the following:
|
| 248 |
+
|
| 249 |
+
$$
|
| 250 |
+
\left. u _ { 1 } - z _ { 1 } , Q ( u _ { 2 } - u _ { 1 } ) \right. \geq 0 \mathrm { ~ a n d ~ } \left. u _ { 2 } - z _ { 2 } , Q ( u _ { 1 } - u _ { 2 } ) \right. \geq 0 .
|
| 251 |
+
$$
|
| 252 |
+
|
| 253 |
+
Combining the above inequalities, we have
|
| 254 |
+
|
| 255 |
+
$$
|
| 256 |
+
\langle z _ { 2 } - z _ { 1 } , Q ( u _ { 2 } - u _ { 1 } ) \rangle \geq \langle u _ { 2 } - u _ { 1 } , Q ( u _ { 2 } - u _ { 1 } ) \rangle .
|
| 257 |
+
$$
|
| 258 |
+
|
| 259 |
+
Also, observe the following:
|
| 260 |
+
|
| 261 |
+
$$
|
| 262 |
+
\langle z _ { 2 } - z _ { 1 } , Q ( u _ { 2 } - u _ { 1 } ) \rangle \leq \frac { 1 } { 2 } \left[ \langle u _ { 2 } - u _ { 1 } , Q ( u _ { 2 } - u _ { 1 } ) \rangle + \langle z _ { 2 } - z _ { 1 } , Q ( z _ { 2 } - z _ { 1 } ) \rangle \right] .
|
| 263 |
+
$$
|
| 264 |
+
|
| 265 |
+
The above inequality can be obtained from the fact that
|
| 266 |
+
|
| 267 |
+
$$
|
| 268 |
+
\langle ( u _ { 2 } - u _ { 1 } ) - ( z _ { 2 } - z _ { 1 } ) , Q ( ( u _ { 2 } - u _ { 1 } ) - ( z _ { 2 } - z _ { 1 } ) ) \rangle \geq 0 \mathrm { ~ a s ~ } Q \in \mathcal { S } _ { + } ^ { d }
|
| 269 |
+
$$
|
| 270 |
+
|
| 271 |
+
and rearranging the terms. Combining the above inequality with Equation (1), we have the required the result. □
|
| 272 |
+
|
| 273 |
+
Lemma 2. Suppose $m _ { t } = \beta _ { 1 } m _ { t - 1 } + ( 1 - \beta _ { 1 } ) g _ { t }$ with $m _ { 0 } = \mathbf { 0 }$ and $0 \leq \beta _ { 1 } < 1$ . We have
|
| 274 |
+
|
| 275 |
+
$$
|
| 276 |
+
\sum _ { t = 1 } ^ { T } \| m _ { t } \| ^ { 2 } \leq \sum _ { t = 1 } ^ { T } \| g _ { t } \| ^ { 2 } .
|
| 277 |
+
$$
|
| 278 |
+
|
| 279 |
+
Proof. If $\beta _ { 1 } = 0$ , the equality directly holds due to $m _ { t } = g _ { t }$ . Otherwise, $0 < \beta _ { 1 } < 1$ . For any $\theta > 0$ we have
|
| 280 |
+
|
| 281 |
+
$$
|
| 282 |
+
\begin{array} { r l } & { \| m _ { t } \| ^ { 2 } = \| \beta _ { 1 } m _ { t - 1 } \| ^ { 2 } + \| ( 1 - \beta _ { 1 } ) g _ { t } \| ^ { 2 } + 2 \langle \beta _ { 1 } m _ { t - 1 } , ( 1 - \beta _ { 1 } ) g _ { t } \rangle } \\ & { \qquad \leq \| \beta _ { 1 } m _ { t - 1 } \| ^ { 2 } + \| ( 1 - \beta _ { 1 } ) g _ { t } \| ^ { 2 } + \theta \| \beta _ { 1 } m _ { t - 1 } \| ^ { 2 } + 1 / \theta \| ( 1 - \beta _ { 1 } ) g _ { t } \| ^ { 2 } } \\ & { \qquad = ( 1 + \theta ) \| \beta _ { 1 } m _ { t - 1 } \| ^ { 2 } + ( 1 + 1 / \theta ) \| ( 1 - \beta _ { 1 } ) g _ { t } \| ^ { 2 } } \end{array}
|
| 283 |
+
$$
|
| 284 |
+
|
| 285 |
+
The inequality follows from Cauchy–Schwarz and Young’s inequality. In particular, let $\theta = 1 / \beta _ { 1 } -$ 1. Then we have
|
| 286 |
+
|
| 287 |
+
$$
|
| 288 |
+
\begin{array} { r } { \| m _ { t } \| ^ { 2 } \leq \beta _ { 1 } \| m _ { t - 1 } \| ^ { 2 } + ( 1 - \beta _ { 1 } ) \| g _ { t } \| ^ { 2 } . } \end{array}
|
| 289 |
+
$$
|
| 290 |
+
|
| 291 |
+
Dividing both sides by $\beta _ { 1 } ^ { t }$ , we get
|
| 292 |
+
|
| 293 |
+
$$
|
| 294 |
+
\frac { \| m _ { t } \| ^ { 2 } } { \beta _ { 1 } ^ { t } } \leq \frac { \| m _ { t - 1 } \| ^ { 2 } } { \beta _ { 1 } ^ { t - 1 } } + \frac { ( 1 - \beta _ { 1 } ) \| g _ { t } \| ^ { 2 } } { \beta _ { 1 } ^ { t } } .
|
| 295 |
+
$$
|
| 296 |
+
|
| 297 |
+
Note that $m _ { 0 } = \mathbf { 0 }$ . Hence,
|
| 298 |
+
|
| 299 |
+
$$
|
| 300 |
+
\frac { \| m _ { t } \| ^ { 2 } } { \beta _ { 1 } ^ { t } } \leq \left( 1 - \beta _ { 1 } \right) \sum _ { i = 1 } ^ { t } \| g _ { i } \| ^ { 2 } \beta _ { 1 } ^ { - i } .
|
| 301 |
+
$$
|
| 302 |
+
|
| 303 |
+
Then multiplying both sides by $\beta _ { 1 } ^ { t }$ we obtain
|
| 304 |
+
|
| 305 |
+
$$
|
| 306 |
+
\| m _ { t } \| ^ { 2 } \leq ( 1 - \beta _ { 1 } ) \sum _ { i = 1 } ^ { t } \| g _ { i } \| ^ { 2 } \beta _ { 1 } ^ { t - i } .
|
| 307 |
+
$$
|
| 308 |
+
|
| 309 |
+
Take the summation of above inequality over $t = 1 , 2 , \cdots , T$ , we have
|
| 310 |
+
|
| 311 |
+
$$
|
| 312 |
+
\begin{array} { l } { \displaystyle \sum _ { t = 1 } ^ { T } \| m _ { t } \| ^ { 2 } \leq ( 1 - \beta _ { 1 } ) \displaystyle \sum _ { t = 1 } ^ { T } \displaystyle \sum _ { i = 1 } ^ { t } \| g _ { i } \| ^ { 2 } \beta _ { 1 } ^ { t - i } } \\ { = ( 1 - \beta _ { 1 } ) \displaystyle \sum _ { i = 1 } ^ { T } \displaystyle \sum _ { t = i } ^ { T } \| g _ { i } \| ^ { 2 } \beta _ { 1 } ^ { t - i } } \\ { \leq \displaystyle \sum _ { t = 1 } ^ { T } \| g _ { t } \| ^ { 2 } . } \end{array}
|
| 313 |
+
$$
|
| 314 |
+
|
| 315 |
+
The second inequality is due to the following fact of geometric series
|
| 316 |
+
|
| 317 |
+
$$
|
| 318 |
+
\sum _ { i = 0 } ^ { N } \beta _ { 1 } ^ { i } \le \sum _ { i = 0 } ^ { \infty } \beta _ { 1 } ^ { i } = \frac { 1 } { 1 - \beta _ { 1 } } , \mathrm { ~ f o r ~ } 0 < \beta _ { 1 } < 1 .
|
| 319 |
+
$$
|
| 320 |
+
|
| 321 |
+
We complete the proof.
|
| 322 |
+
|
| 323 |
+
# B PROOF OF THEOREM 1
|
| 324 |
+
|
| 325 |
+
Proof. First, we rewrite the update of ADAM in Algorithm 1 in the following recursion form:
|
| 326 |
+
|
| 327 |
+
$$
|
| 328 |
+
m _ { t , i } = \beta _ { 1 } m _ { t - 1 , i } + ( 1 - \beta _ { 1 } ) g _ { t , i } \mathrm { ~ a n d ~ } v _ { t , i } = \beta _ { 2 } v _ { t - 1 , i } + ( 1 - \beta _ { 2 } ) g _ { t , i } ^ { 2 }
|
| 329 |
+
$$
|
| 330 |
+
|
| 331 |
+
where $m _ { 0 , i } = 0$ and $v _ { 0 , i } = 0$ for all $i \in [ d ]$ and $\psi _ { t } = \mathrm { d i a g } ( v _ { t } )$ . We consider the setting where $f _ { t }$ are linear functions and $\mathcal { F } = [ - 1 , 1 ]$ . In particular, we define the following function sequence:
|
| 332 |
+
|
| 333 |
+
$$
|
| 334 |
+
f _ { t } ( x ) = { \left\{ \begin{array} { l l } { - x , } & { { \mathrm { f o r ~ } } t { \mathrm { ~ m o d ~ } } C = 1 ; } \\ { 2 x , } & { { \mathrm { f o r ~ } } t { \mathrm { ~ m o d ~ } } C = 2 ; } \\ { 0 , } & { { \mathrm { o t h e r w i s e } } } \end{array} \right. }
|
| 335 |
+
$$
|
| 336 |
+
|
| 337 |
+
where $C \in \mathbb { N }$ satisfies the following:
|
| 338 |
+
|
| 339 |
+
$$
|
| 340 |
+
5 \beta _ { 2 } ^ { C - 2 } \leq \frac { 1 } { 2 } \cdot \frac { 1 - \beta _ { 2 } } { 4 - \beta _ { 2 } } .
|
| 341 |
+
$$
|
| 342 |
+
|
| 343 |
+
It is not hard to see that the condition hold for large constant $C$ that depends on $\beta _ { 2 }$ .
|
| 344 |
+
|
| 345 |
+
Since the problem is one-dimensional, we drop indices representing coordinates from all quantities in Algorithm 1. For this function sequence, it is easy to see that the point $x = - 1$ provides the minimum regret. Consider the execution of ADAM algorithm for this sequence of functions with $\beta _ { 1 } = 0$ . Note that since gradients of these functions are bounded, $\mathcal { F }$ has bounded $D _ { \infty }$ diameter and $\beta _ { 1 } ^ { 2 } / \beta _ { 2 } < 1$ as $\beta _ { 1 } = 0$ , the conditions on the parameters required for ADAM are satisfied (Kingma & Lei Ba, 2015). The gradients have the following form:
|
| 346 |
+
|
| 347 |
+
$$
|
| 348 |
+
\nabla f _ { i } ( x ) = { \left\{ \begin{array} { l l } { - 1 , } & { { \mathrm { f o r ~ } } i { \mathrm { ~ m o d ~ } } C = 1 ; } \\ { 2 , } & { { \mathrm { f o r ~ } } i { \mathrm { ~ m o d ~ } } C = 2 ; } \\ { 0 , } & { { \mathrm { o t h e r w i s e . } } } \end{array} \right. }
|
| 349 |
+
$$
|
| 350 |
+
|
| 351 |
+
Let $\tau \in \mathbb { N } , \tau > 1$ be such that
|
| 352 |
+
|
| 353 |
+
$$
|
| 354 |
+
\begin{array} { r } { \frac { \alpha } { \sqrt { C t + 1 } } \frac { 1 } { \sqrt { ( 1 - \beta _ { 2 } ) ( \beta _ { 2 } ^ { C } + 4 \beta _ { 2 } ^ { C - 1 } + 1 ) } } \le 1 , } \\ { \frac { \alpha } { \sqrt { C t + 2 } } \frac { 2 } { \sqrt { ( 1 - \beta _ { 2 } ) ( 4 + \beta _ { 2 } ) } } \le 1 , } \end{array}
|
| 355 |
+
$$
|
| 356 |
+
|
| 357 |
+
for all $t \geq \tau$ . We start with the following preliminary result.
|
| 358 |
+
|
| 359 |
+
Lemma 3. For the parameter settings and conditions assumed in Theorem 1, there is a $t ^ { \prime } \geq \tau$ such that $x _ { C t ^ { \prime } + 1 } \geq 0$ .
|
| 360 |
+
|
| 361 |
+
Proof by contradiction. Assume that $x _ { C t + 1 } < 0$ for all $t \geq \tau$ . Firstly, for $t \geq \tau$ , we observe the following inequalities:
|
| 362 |
+
|
| 363 |
+
$$
|
| 364 |
+
\begin{array} { l } { { v _ { C t + 1 } = \beta _ { 2 } v _ { C t } + ( 1 - \beta _ { 2 } ) } } \\ { { \ ~ } } \\ { { \displaystyle ~ = ( 1 - \beta _ { 2 } ) ( 1 + \sum _ { i = 1 } ^ { t } \beta _ { 2 } ^ { C i } + 4 \sum _ { i = 1 } ^ { t } \beta _ { 2 } ^ { C i - 1 } ) } } \\ { { \ ~ } } \\ { { \displaystyle ~ \geq ( 1 - \beta _ { 2 } ) ( \beta _ { 2 } ^ { C } + 4 \beta _ { 2 } ^ { C - 1 } + 1 ) , } } \end{array}
|
| 365 |
+
$$
|
| 366 |
+
|
| 367 |
+
$$
|
| 368 |
+
\begin{array} { l } { \displaystyle v _ { C t + 1 } = \beta _ { 2 } v _ { C t } + ( 1 - \beta _ { 2 } ) } \\ { \displaystyle \qquad = ( 1 - \beta _ { 2 } ) ( \sum _ { i = 1 } ^ { t } \beta _ { 2 } ^ { C i } + 4 \sum _ { i = 1 } ^ { t } \beta _ { 2 } ^ { C i - 1 } ) + ( 1 - \beta _ { 2 } ) } \\ { \displaystyle \qquad \le ( 1 - \beta _ { 2 } ) \frac { \beta _ { 2 } ^ { C } + 4 \beta _ { 2 } ^ { C - 1 } } { 1 - \beta _ { 2 } ^ { C } } + ( 1 - \beta _ { 2 } ) } \\ { \displaystyle \qquad \le 5 \beta _ { 2 } ^ { C - 1 } + ( 1 - \beta _ { 2 } ) < 9 , } \end{array}
|
| 369 |
+
$$
|
| 370 |
+
|
| 371 |
+
$$
|
| 372 |
+
\begin{array} { c l } { { v _ { C t + 2 } = ( 1 - \beta _ { 2 } ) ( \displaystyle \sum _ { i = 0 } ^ { t } \beta _ { 2 } ^ { C i + 1 } + 4 \displaystyle \sum _ { i = 0 } ^ { t } \beta _ { 2 } ^ { C i } ) } } \\ { { = ( 1 - \beta _ { 2 } ) ( 4 + \beta _ { 2 } ) \displaystyle \frac { 1 - \beta _ { 2 } ^ { C t } } { 1 - \beta _ { 2 } ^ { C } } } } \\ { { } } \\ { { \leq 4 + \beta _ { 2 } < 9 . } } \end{array}
|
| 373 |
+
$$
|
| 374 |
+
|
| 375 |
+
From the $( C \tau + 1 )$ -th update of ADAM in Equation (2), we obtain:
|
| 376 |
+
|
| 377 |
+
$$
|
| 378 |
+
\begin{array} { l } { \displaystyle \hat { x } _ { C \tau + 2 } = x _ { C \tau + 1 } + \frac { \alpha } { \sqrt { C \tau + 1 } } \frac { 1 } { \sqrt { v _ { C \tau + 1 } } } } \\ { \displaystyle < \frac { \alpha } { \sqrt { C \tau + 1 } } \frac { 1 } { \sqrt { ( 1 - \beta _ { 2 } ) ( \beta _ { 2 } ^ { C } + 4 \beta _ { 2 } ^ { C - 1 } + 1 ) } } \le 1 . } \end{array}
|
| 379 |
+
$$
|
| 380 |
+
|
| 381 |
+
The first inequality follows from $x _ { C t + 1 } < 0$ and Equation (6). The last inequality follows from Equation (4). Therefore, we have $- 1 \leq x _ { C \tau + 1 } < \hat { x } _ { C \tau + 2 } < 1$ and hence $x _ { C \tau + 2 } = \hat { x } _ { C \tau + 2 }$ . Then after the $( C \tau + 2 )$ -th update, we have:
|
| 382 |
+
|
| 383 |
+
$$
|
| 384 |
+
\begin{array} { r l } & { \hat { x } _ { G \tau + 3 } = x _ { G \tau + 2 } - \frac { \alpha } { \sqrt { C \tau + 2 } } \frac { 2 } { \sqrt { v G _ { \tau + 2 } } } } \\ & { = x _ { C \tau + 1 } + \frac { \alpha } { \sqrt { C \tau + 1 } } \frac { 1 } { \sqrt { v G _ { \tau + 1 } } } - \frac { \alpha } { \sqrt { C \tau + 2 } } \frac { 2 } { \sqrt { v G _ { \tau + 2 } } } } \\ & { \geq x _ { C \tau + 1 } + \frac { 1 } { \sqrt { C \tau + C } } \frac { \alpha \beta _ { 2 } ( v _ { C \tau + 1 } - 4 v _ { C \tau } ) } { \sqrt { v G _ { \tau + 1 } v G _ { \tau + 2 } } \left( \sqrt { v G _ { \tau + 2 } } + 2 \sqrt { v G _ { \tau + 1 } } \right) } } \\ & { \geq x _ { C \tau + 1 } + \frac { 1 } { \sqrt { \tau + 1 } } \frac { \alpha \beta _ { 2 } } { \sqrt { 1 6 } \sqrt { C } } ( v c _ { \tau + 1 } - 4 v _ { C \tau } ) } \\ & { \geq x _ { C \tau + 1 } + \frac { 1 } { \sqrt { \tau + 1 } } \frac { \alpha \beta _ { 2 } ( 1 - \beta _ { 2 } ) } { 1 6 2 \sqrt { C } } } \\ & { = x _ { C \tau + 1 } + \frac { \kappa } { \sqrt { \tau + 1 } } , } \end{array}
|
| 385 |
+
$$
|
| 386 |
+
|
| 387 |
+
where $\kappa = \alpha \beta _ { 2 } ( 1 - \beta _ { 2 } ) / 1 6 2 \sqrt { C }$ is a constant that depends on $\alpha$ , $\beta _ { 2 }$ and $C$ . The first inequality follows from Equation (2). The second inequality follows from Equations (7) and (8). The last
|
| 388 |
+
|
| 389 |
+
inequality is due to the following lower bound:
|
| 390 |
+
|
| 391 |
+
$$
|
| 392 |
+
\begin{array} { r l } { \boldsymbol { v } _ { C \ell + 1 } - 4 \boldsymbol { v } _ { C \xi } = \beta _ { 2 } \boldsymbol { v } _ { C \xi } + ( 1 - \beta _ { 2 } ) - 4 \boldsymbol { v } _ { C \ell } } \\ { = } & { ( 4 - \beta _ { 2 } ) \left[ \frac { 1 - \beta _ { 2 } } { 4 } - \mathcal { D } _ { C \ell } ^ { 2 } \right] } \\ & { = ( 4 - \beta _ { 2 } ) \Bigg [ \frac { 1 - \beta _ { 2 } } { 4 } - ( 1 - \beta _ { 2 } ) ( \sum _ { i = 1 } ^ { \ell } \beta _ { 2 } ^ { C \ell - 1 } + 4 \sum _ { i = 1 } ^ { \ell } \beta _ { 2 } ^ { C \ell - 2 } ) \Bigg ] } \\ & { \ge ( 4 - \beta _ { 2 } ) \Bigg [ \frac { 1 - \beta _ { 2 } } { 4 } - \beta _ { 2 } - ( 1 - \beta _ { 2 } ) ( \sum _ { i = 1 } ^ { \ell } \beta _ { 2 } ^ { C \ell - 1 } + 4 \frac { \beta _ { 2 } ^ { C \ell - 2 } } { 4 } ) \Bigg ] } \\ & { \ge ( 4 - \beta _ { 2 } ) \Bigg [ \frac { 1 - \beta _ { 2 } } { 4 } - \beta _ { 2 } - ( 1 - \beta _ { 2 } ) ( \frac { \beta _ { 2 } ^ { C \ell - 1 } } { 1 - \beta _ { 2 } ^ { C \ell } } + \frac { 4 \beta _ { 2 } ^ { C \ell - 2 } } { 1 - \beta _ { 2 } ^ { C \ell } } ) \Bigg ] } \\ & { \ge ( 4 - \beta _ { 2 } ) \Bigg [ \frac { 1 - \beta _ { 2 } } { 4 } - \beta _ { 2 } ^ { 2 } - 5 \beta _ { 2 } ^ { C \ell - 2 } \Bigg ] } \\ & { \ge ( 4 - \beta _ { 2 } ) \cdot \frac { 1 } { 2 } \cdot \frac { 1 - \beta _ { 2 } } { 4 } - \beta _ { 2 } } \\ & { = \frac { 1 - \beta _ { 2 } } { 2 } , } \end{array}
|
| 393 |
+
$$
|
| 394 |
+
|
| 395 |
+
where the last inequality follows from Equation (3). Therefore, we have $- 1 \le x _ { C \tau + 1 } < \hat { x } _ { C \tau + 3 } <$ $x _ { C \tau + 2 } < 1$ . Furthermore, since gradients $\nabla f _ { i } ( x ) = 0$ when $i$ mod $C \neq 1$ or 2, we have
|
| 396 |
+
|
| 397 |
+
$$
|
| 398 |
+
\begin{array} { c } { { x _ { C \tau + 4 } = \hat { x } _ { C \tau + 3 } = x _ { C \tau + 3 } , } } \\ { { x _ { C \tau + 5 } = \hat { x } _ { C \tau + 4 } = x _ { C \tau + 4 } , } } \\ { { . . . } } \\ { { x _ { C ( \tau + 1 ) + 1 } = \hat { x } _ { C ( \tau + 1 ) + 1 } = x _ { C ( \tau + 1 ) } . } } \end{array}
|
| 399 |
+
$$
|
| 400 |
+
|
| 401 |
+
Then, following Equation (9) we have
|
| 402 |
+
|
| 403 |
+
$$
|
| 404 |
+
x _ { C ( \tau + 1 ) + 1 } - x _ { C \tau + 1 } \geq \frac { \kappa } { \sqrt { \tau + 1 } } .
|
| 405 |
+
$$
|
| 406 |
+
|
| 407 |
+
Similarly, we can subsequently obtain
|
| 408 |
+
|
| 409 |
+
$$
|
| 410 |
+
x _ { C ( \tau + 2 ) + 1 } - x _ { C ( \tau + 1 ) + 1 } \geq \frac { \kappa } { \sqrt { \tau + 2 } } ,
|
| 411 |
+
$$
|
| 412 |
+
|
| 413 |
+
and generally
|
| 414 |
+
|
| 415 |
+
$$
|
| 416 |
+
x _ { C ( t + 1 ) + 1 } - x _ { C t + 1 } \geq \frac { \kappa } { \sqrt { t + 1 } }
|
| 417 |
+
$$
|
| 418 |
+
|
| 419 |
+
for all $t \geq \tau$ . Therefore,
|
| 420 |
+
|
| 421 |
+
$$
|
| 422 |
+
\begin{array} { l } { \displaystyle x _ { C t + 1 } \geq x _ { C \tau + 1 } + \frac \kappa { \sqrt { \tau + 1 } } + \frac \kappa { \sqrt { \tau + 2 } } + \cdot \cdot \cdot + \frac \kappa { \sqrt { t } } } \\ { \displaystyle \geq - 1 + \kappa \sum _ { n = \tau + 1 } ^ { t } \frac 1 { \sqrt { n } } } \\ { \displaystyle \geq - 1 + \kappa \int _ { \tau + 1 } ^ { t + 1 } \frac { \mathrm d x } { \sqrt { x } } } \\ { \displaystyle = - 1 + 2 \kappa ( \sqrt { t + 1 } - \sqrt { \tau + 1 } ) } \end{array}
|
| 423 |
+
$$
|
| 424 |
+
|
| 425 |
+
for $t \geq \tau$ . Let $t ^ { \prime }$ be such that $2 \kappa ( \sqrt { t ^ { \prime } + 1 } - \sqrt { \tau + 1 } ) \geq 1$ , then $x _ { C t ^ { \prime } + 1 } \geq 0$ . This contradicts the assumption that $x _ { C t + 1 } < 0$ for all $t \geq \tau$ . We complete the proof of this lemma.
|
| 426 |
+
|
| 427 |
+
We now return to the proof of Theorem 1. The following analysis focuses on iterations after $C t ^ { \prime } + 1$ such that $x _ { C t ^ { \prime } + 1 } \geq 0$ . Note that any regret before $C t ^ { \prime } + 1$ is just a constant since $t ^ { \prime }$ is independent of $T$ and thus, the average regret is negligible as $T \to \infty$ .
|
| 428 |
+
|
| 429 |
+
Our claim is that, $x _ { k } \geq 0$ for all $k \in \mathbb N$ , $k \geq C t ^ { \prime } + 1$ . To prove this, we resort to the principle of mathematical induction. Suppose for some $t \in \mathbb { N }$ , $t \geq t ^ { \prime }$ , we have $x _ { C t + 1 } \geq 0$ . Our aim is to prove that $x _ { i } \geq 0$ for all $i \in \mathbb { N } \cap [ C t + 2 , C ( t + 1 ) + 1 ]$ .
|
| 430 |
+
|
| 431 |
+
From the $( C t + 1 )$ -th update of ADAM in Equation (2), we obtain:
|
| 432 |
+
|
| 433 |
+
$$
|
| 434 |
+
\hat { x } _ { C t + 2 } = x _ { C t + 1 } + \frac { \alpha } { \sqrt { C t + 1 } } \frac { 1 } { \sqrt { v _ { C t + 1 } } } \geq 0 .
|
| 435 |
+
$$
|
| 436 |
+
|
| 437 |
+
We consider the following two cases:
|
| 438 |
+
|
| 439 |
+
1. Suppose $\hat { x } _ { C t + 2 } ~ > ~ 1$ , then $x _ { C t + 2 } = \Pi _ { \mathcal { F } } ( \hat { x } _ { C t + 2 } ) = \operatorname* { m i n } \{ \hat { x } _ { C t + 2 } , 1 \} = 1$ (note that in one-dimension, $\Pi _ { \mathcal { F } , \sqrt { V _ { t } } } = \Pi _ { \mathcal { F } }$ is the simple Euclidean projection). After the $( C t + 2 )$ -th update, we have:
|
| 440 |
+
|
| 441 |
+
$$
|
| 442 |
+
\begin{array} { l } { \hat { x } _ { C t + 3 } = x _ { C t + 2 } - \displaystyle \frac { \alpha } { \sqrt { C t + 2 } } \displaystyle \frac { 2 } { \sqrt { v _ { C t + 2 } } } } \\ { \geq 1 - \displaystyle \frac { \alpha } { \sqrt { C t + 2 } } \displaystyle \frac { 2 } { \sqrt { ( 1 - \beta _ { 2 } ) ( 4 + \beta _ { 2 } ) } } \geq 0 . } \end{array}
|
| 443 |
+
$$
|
| 444 |
+
|
| 445 |
+
The last inequality follows from Equation (5). The first inequality follows from
|
| 446 |
+
|
| 447 |
+
$$
|
| 448 |
+
v _ { C t + 2 } = ( 1 - \beta _ { 2 } ) ( \sum _ { i = 0 } ^ { t } \beta _ { 2 } ^ { C i + 1 } + 4 \sum _ { i = 0 } ^ { t } \beta _ { 2 } ^ { C i } ) \geq ( 1 - \beta _ { 2 } ) ( 4 + \beta _ { 2 } ) .
|
| 449 |
+
$$
|
| 450 |
+
|
| 451 |
+
2. Suppose $\hat { x } _ { C t + 2 } \leq 1$ , then after the $( C t + 2 )$ -th update, similar to Equation (9), we have:
|
| 452 |
+
|
| 453 |
+
$$
|
| 454 |
+
\hat { x } _ { C t + 3 } \geq x _ { C t + 1 } + \frac { \kappa } { \sqrt { t + 1 } } \geq 0 .
|
| 455 |
+
$$
|
| 456 |
+
|
| 457 |
+
In both cases, $\hat { x } _ { C t + 3 } \geq 0$ , which translates to $x _ { C t + 3 } = \hat { x } _ { C t + 3 } \geq 0$ . Furthermore, since gradients $\nabla f _ { i } ( x ) = 0$ when $i$ mod $C \neq 1$ or 2, we have
|
| 458 |
+
|
| 459 |
+
$$
|
| 460 |
+
\begin{array} { l } { x _ { C t + 4 } = \hat { x } _ { C t + 3 } = x _ { C t + 3 } \geq 0 , } \\ { x _ { C t + 5 } = \hat { x } _ { C t + 4 } = x _ { C t + 4 } \geq 0 , } \\ { ~ . ~ . ~ } \end{array}
|
| 461 |
+
$$
|
| 462 |
+
|
| 463 |
+
$$
|
| 464 |
+
x _ { C ( t + 1 ) + 1 } = \hat { x } _ { C ( t + 1 ) + 1 } = x _ { C ( t + 1 ) } \geq 0 .
|
| 465 |
+
$$
|
| 466 |
+
|
| 467 |
+
Therefore, given $x _ { C t ^ { \prime } + 1 } = 0$ , it holds for all $k \in \mathbb { N } , k \geq C t ^ { \prime } + 1$ by the principle of mathematical induction. Thus, we have
|
| 468 |
+
|
| 469 |
+
$$
|
| 470 |
+
\sum _ { i = 1 } ^ { C } f _ { k C + i } ( x _ { k C + i } ) - \sum _ { i = 1 } ^ { C } f _ { k C + i } ( - 1 ) \geq 0 - ( - 1 ) = 1 ,
|
| 471 |
+
$$
|
| 472 |
+
|
| 473 |
+
where $k \in \mathbb N$ , $k \geq t ^ { \prime }$ . Therefore, when $t \geq t ^ { \prime }$ , for every $C$ steps, ADAM suffers a regret of at least 1.
|
| 474 |
+
More specifically, $R _ { T } \geq ( T - t ^ { \prime } ) / C$ . Thus, $R _ { T } / T \not \to 0$ as $T \to \infty$ , which completes the proof.
|
| 475 |
+
|
| 476 |
+
# C PROOF OF THEOREM 2
|
| 477 |
+
|
| 478 |
+
Theorem 2 generalizes the optimization setting used in Theorem 1. We notice that the example proposed by Reddi et al. (2018) in their Appendix B already satisfies the constraints listed in Theorem 2. Here we provide the setting of the example for completeness.
|
| 479 |
+
|
| 480 |
+
Proof. Consider the setting where $f _ { t }$ are linear functions and $\mathcal { F } = [ - 1 , 1 ]$ . In particular, we define the following function sequence:
|
| 481 |
+
|
| 482 |
+
$$
|
| 483 |
+
f _ { t } ( x ) = { \left\{ \begin{array} { l l } { C x , { \mathrm { f o r ~ } } t { \mathrm { ~ m o d ~ } } C = 1 ; } \\ { - x , { \mathrm { ~ o t h e r w i s e , } } } \end{array} \right. }
|
| 484 |
+
$$
|
| 485 |
+
|
| 486 |
+
where $C \in \mathbb { N }$ , $C$ mod $2 = 0$ satisfies the following:
|
| 487 |
+
|
| 488 |
+
$$
|
| 489 |
+
\begin{array} { r l r } & { } & { \left( 1 - \beta _ { 1 } \right) \beta _ { 1 } ^ { C - 1 } C \le 1 - \beta _ { 1 } ^ { C - 1 } , } \\ & { } & { \beta _ { 2 } ^ { ( C - 2 ) / 2 } C ^ { 2 } \le 1 , } \\ & { } & { \displaystyle \frac { 3 \left( 1 - \beta _ { 1 } \right) } { 2 \sqrt { 1 - \beta _ { 2 } } } \left( 1 + \frac { \gamma \left( 1 - \gamma ^ { C - 1 } \right) } { 1 - \gamma } \right) + \frac { \beta _ { 1 } ^ { C / 2 - 1 } } { 1 - \beta _ { 1 } } < \frac { C } { 3 } , } \end{array}
|
| 490 |
+
$$
|
| 491 |
+
|
| 492 |
+
where $\gamma = \beta _ { 1 } / \sqrt { \beta _ { 2 } } < 1$ . It is not hard to see that these conditions hold for large constant $C$ that depends on $\beta _ { 1 }$ and $\beta _ { 2 }$ . According to the proof given by Reddi et al. (2018) in their Appendix B, in such a setting $R _ { T } / T \not \to 0$ as $T \to \infty$ , which completes the proof.
|
| 493 |
+
|
| 494 |
+
# D PROOF OF THEOREM 3
|
| 495 |
+
|
| 496 |
+
The example proposed by Reddi et al. (2018) in their Appendix C already satisfies the constraints listed in Theorem 3. Here we provide the setting of the example for completeness.
|
| 497 |
+
|
| 498 |
+
Proof. Let $\delta$ be an arbitrary small positive constant. Consider the following one dimensional stochastic optimization setting over the domain $[ - 1 , 1 ]$ . At each time step $t$ , the function $f _ { t } ( x )$ is chosen as follows:
|
| 499 |
+
|
| 500 |
+
$$
|
| 501 |
+
f _ { t } ( x ) = \left\{ \begin{array} { l l } { C x , \mathrm { w i t h } \mathrm { p r o b a b i l i t y } p : = \frac { 1 + \delta } { C + 1 } } \\ { - x , \mathrm { w i t h } \mathrm { p r o b a b i l i t y } 1 - p , } \end{array} \right.
|
| 502 |
+
$$
|
| 503 |
+
|
| 504 |
+
where $C$ is a large constant that depends on $\beta _ { 1 }$ , $\beta _ { 2 }$ and $\delta$ . The expected function is $F ( x ) = \delta x$ . Thus the optimal point over $[ - 1 , 1 ]$ is $x ^ { * } = - 1$ . The step taken by ADAM is
|
| 505 |
+
|
| 506 |
+
$$
|
| 507 |
+
\Delta _ { t } = \frac { - \alpha _ { t } \left( \beta _ { 1 } m _ { t - 1 } + \left( 1 - \beta _ { 1 } \right) g _ { t } \right) } { \sqrt { \beta _ { 2 } v _ { t - 1 } + \left( 1 - \beta _ { 2 } \right) g _ { t } ^ { 2 } } } .
|
| 508 |
+
$$
|
| 509 |
+
|
| 510 |
+
According to the proof given by Reddi et al. (2018) in their Appendix $\textrm { C }$ , there exists a large enough $C$ such that $\mathbb { E } [ \Delta _ { t } ] \geq 0$ , which then implies that the ADAM’s step keep drifting away from the optimal solution $x ^ { * } = - 1$ . Note that there is no limitation of the initial step size $\alpha$ by now. Therefore, we complete the proof.
|
| 511 |
+
|
| 512 |
+
# E PROOF OF THEOREM 4
|
| 513 |
+
|
| 514 |
+
Proof. Let $\begin{array} { r } { x ^ { * } = \arg \operatorname* { m i n } _ { x \in \mathcal { F } } \sum _ { t = 1 } ^ { T } f _ { t } ( x ) } \end{array}$ , which exists since $\mathcal { F }$ is closed and convex. We begin with the following observation:
|
| 515 |
+
|
| 516 |
+
$$
|
| 517 |
+
x _ { t + 1 } = \Pi _ { \mathcal { F } , \mathrm { d i a g } ( \eta _ { t } ^ { - 1 } ) } \big ( x _ { t } - \eta _ { t } \odot m _ { t } \big ) = \operatorname* { m i n } _ { x \in \mathcal { F } } \| \eta _ { t } ^ { - 1 / 2 } \odot \big ( x - \big ( x _ { t } - \eta _ { t } \odot m _ { t } \big ) \big ) \| .
|
| 518 |
+
$$
|
| 519 |
+
|
| 520 |
+
Using Lemma 1 with $u _ { 1 } = x _ { t + 1 }$ and $u _ { 2 } = x ^ { * }$ , we have the following:
|
| 521 |
+
|
| 522 |
+
$$
|
| 523 |
+
\begin{array} { r l } & { \| \eta _ { t } ^ { - 1 / 2 } \odot ( x _ { t + 1 } - x ^ { * } ) \| ^ { 2 } \le \| \eta _ { t } ^ { - 1 / 2 } \odot ( x _ { t } - \eta _ { t } \odot m _ { t } - x ^ { * } ) \| ^ { 2 } } \\ & { \qquad = \| \eta _ { t } ^ { - 1 / 2 } \odot ( x _ { t } - x ^ { * } ) \| ^ { 2 } + \| \eta _ { t } ^ { 1 / 2 } \odot m _ { t } \| ^ { 2 } - 2 \langle m _ { t } , x _ { t } - x ^ { * } \rangle } \\ & { \qquad = \| \eta _ { t } ^ { - 1 / 2 } \odot ( x _ { t } - x ^ { * } ) \| ^ { 2 } + \| \eta _ { t } ^ { 1 / 2 } \odot m _ { t } \| ^ { 2 } } \\ & { \qquad - 2 \langle \beta _ { 1 t } m _ { t - 1 } + ( 1 - \beta _ { 1 t } ) g _ { t } , x _ { t } - x ^ { * } \rangle . } \end{array}
|
| 524 |
+
$$
|
| 525 |
+
|
| 526 |
+
Rearranging the above inequality, we have
|
| 527 |
+
|
| 528 |
+
$$
|
| 529 |
+
\begin{array} { l } { \displaystyle \langle g _ { t } , x _ { t } - x ^ { * } \rangle \leq \frac { 1 } { 2 ( 1 - \beta _ { 1 t } ) } \bigg [ \| \eta _ { t } ^ { - 1 / 2 } \odot ( x _ { t } - x ^ { * } ) \| ^ { 2 } - \| \eta _ { t } ^ { - 1 / 2 } \odot ( x _ { t + 1 } - x ^ { * } ) \| ^ { 2 } \bigg ] } \\ { \displaystyle \qquad + \frac { 1 } { 2 ( 1 - \beta _ { 1 t } ) } \| \eta _ { t } ^ { 1 / 2 } \odot m _ { t } \| ^ { 2 } + \frac { \beta _ { 1 t } } { 1 - \beta _ { 1 t } } \langle m _ { t - 1 } , x _ { t } - x ^ { * } \rangle } \\ { \displaystyle \qquad \leq \frac { 1 } { 2 ( 1 - \beta _ { 1 t } ) } \bigg [ \| \eta _ { t } ^ { - 1 / 2 } \odot ( x _ { t } - x ^ { * } ) \| ^ { 2 } - \| \eta _ { t } ^ { - 1 / 2 } \odot ( x _ { t + 1 } - x ^ { * } ) \| ^ { 2 } \bigg ] } \\ { \displaystyle \qquad + \frac { 1 } { 2 ( 1 - \beta _ { 1 t } ) } \| \eta _ { t } ^ { 1 / 2 } \odot m _ { t } \| ^ { 2 } + \frac { \beta _ { 1 t } } { 2 ( 1 - \beta _ { 1 t } ) } \| \eta _ { t } ^ { 1 / 2 } \odot m _ { t - 1 } \| ^ { 2 } } \\ { \displaystyle \qquad + \frac { \beta _ { 1 t } } { 2 ( 1 - \beta _ { 1 t } ) } \| \eta _ { t } ^ { - 1 / 2 } \odot ( x _ { t } - x ^ { * } ) \| ^ { 2 } . } \end{array}
|
| 530 |
+
$$
|
| 531 |
+
|
| 532 |
+
The second inequality follows from simple application of Cauchy–Schwarz and Young’s inequality. We now use the standard approach of bounding the regret at each step using convexity of the functions $\{ f _ { t } \} _ { t = 1 } ^ { T }$ in the following manner:
|
| 533 |
+
|
| 534 |
+
$$
|
| 535 |
+
\begin{array} { r l } & { \displaystyle \sum _ { t = 1 } ^ { T } f _ { t } \left( x _ { t } \right) - f _ { t } \left( x ^ { * } \right) \leq \sum _ { t = 1 } ^ { T } \langle g _ { t } , x _ { t } - x ^ { * } \rangle } \\ & { \leq \displaystyle \sum _ { t = 1 } ^ { T } \left[ \frac { 1 } { 2 ( 1 - \beta _ { 1 t } ) } \left[ \| \eta _ { t } ^ { - 1 / 2 } \odot ( x _ { t } - x ^ { * } ) \| ^ { 2 } - \| \eta _ { t } ^ { - 1 / 2 } \odot ( x _ { t + 1 } - x ^ { * } ) \| ^ { 2 } \right] \right. } \\ & { \quad \quad + \left. \frac { 1 } { 2 ( 1 - \beta _ { 1 t } ) } \| \eta _ { t } ^ { 1 / 2 } \odot m _ { t } \| ^ { 2 } + \frac { \beta _ { 1 t } } { 2 ( 1 - \beta _ { 1 t } ) } \| \eta _ { t } ^ { 1 / 2 } \odot m _ { t - 1 } \| ^ { 2 } \right. } \\ & { \quad \quad \left. + \frac { \beta _ { 1 t } } { 2 ( 1 - \beta _ { 1 t } ) } \| \eta _ { t } ^ { - 1 / 2 } \odot ( x _ { t } - x ^ { * } ) \| ^ { 2 } \right] . } \end{array}
|
| 536 |
+
$$
|
| 537 |
+
|
| 538 |
+
The first inequality is due to the convexity of functions $\{ f _ { t } \} _ { t = 1 } ^ { T }$ . The second inequality follows from the bound in Equation (10). For further bounding this inequality, we need the following intermedia result.
|
| 539 |
+
|
| 540 |
+
Lemma 4. For the parameter settings and conditions assumed in Theorem 4, we have
|
| 541 |
+
|
| 542 |
+
$$
|
| 543 |
+
\sum _ { t = 1 } ^ { T } \bigg [ \frac { 1 } { 2 ( 1 - \beta _ { 1 t } ) } \| \eta _ { t } ^ { 1 / 2 } \odot m _ { t } \| ^ { 2 } + \frac { \beta _ { 1 t } } { 2 ( 1 - \beta _ { 1 t } ) } \| \eta _ { t } ^ { 1 / 2 } \odot m _ { t - 1 } \| ^ { 2 } \bigg ] \le ( 2 \sqrt { T } - 1 ) \frac { R _ { \infty } G _ { 2 } ^ { 2 } } { 1 - \beta _ { 1 } } .
|
| 544 |
+
$$
|
| 545 |
+
|
| 546 |
+
Proof. By definition of $\eta _ { t }$ , we have
|
| 547 |
+
|
| 548 |
+
$$
|
| 549 |
+
L _ { \infty } \leq \sqrt t \| \eta _ { t } \| _ { \infty } \leq R _ { \infty } .
|
| 550 |
+
$$
|
| 551 |
+
|
| 552 |
+
Hence,
|
| 553 |
+
|
| 554 |
+
$$
|
| 555 |
+
\begin{array} { r l } & { \frac { 1 } { \Delta x } = \frac { \sqrt { 2 } } { \frac { \pi } { 1 + \sqrt { 2 } \pi \sqrt { 3 } } } \left[ \frac { 1 } { \frac { \sqrt { 2 } } { \pi } \frac { \sqrt { 3 } } { 1 + \sqrt { 2 } \pi \sqrt { 3 } } } \frac { \sin 2 \pi \sqrt { 3 } } { \sin \pi } \frac { \sin 2 \pi \sqrt { 3 } } { \sin \pi } \frac { \sin 2 \pi \sqrt { 3 } } { \sin \pi } \right] } \\ & { \le \frac { \sqrt { 2 } } { \pi } \left[ \frac { \sqrt { 2 } } { 1 + \sqrt { 2 } \pi \sqrt { 3 } } \frac { \sin 2 \pi \sqrt { 3 } } { \sin \pi } \frac { \sin 2 \pi \sqrt { 3 } } { \sin \pi } \frac { \sin 2 \pi \sqrt { 3 } } { \sin \pi } \frac { \sin 2 \pi \sqrt { 3 } } { \sin \pi } \frac { \sin 2 \pi \sqrt { 3 } } { \sin \pi } \right] } \\ & { \le \frac { \sqrt { 2 } } { \pi } \left[ \frac { \sqrt { 2 } } { \pi } \frac { \sqrt { 3 } } { 1 + \sqrt { 2 } \pi \sqrt { 3 } } \frac { \sin 2 \pi \sqrt { 3 } } { \sin \pi } \frac { \sin 2 \pi \sqrt { 3 } } { \sin \pi } \frac { \sin 2 \pi \sqrt { 3 } } { \sin \pi } \frac { \sin 2 \pi \sqrt { 3 } } { \sin \pi } \frac { \sin 2 \pi \sqrt { 3 } } { \sin \pi } \right] } \\ & { - \frac { \sqrt { 2 } } { \pi } \frac { \sqrt { 3 } } { \pi } \left[ \frac { \sqrt { 2 } } { \pi } \frac { \sin 2 \pi \sqrt { 3 } } { 1 + \sqrt { 2 } \pi \sqrt { 3 } } \frac { \sin 2 \pi \sqrt { 3 } } { \sin \pi } \right] ^ { \frac { \sin 2 } { \pi } } } \\ & { \le \frac { \sqrt { 2 } } { \pi } \frac { \sqrt { 3 } } { 1 + \sqrt { 2 } \pi \sqrt { 3 } } \left[ \frac { \sqrt { 2 } } { \pi } \frac { \sin 2 \pi \sqrt { 3 } } { \sin \pi } \frac { \sin 2 \pi \sqrt { 3 } } { \pi } \right] } \\ & \le \frac { \sqrt { 2 } } { \pi } \frac { \sqrt { 3 } } { \pi } \frac { \sqrt { 3 } } { \pi } \frac { \sqrt { 2 } } { \pi } \frac { \sin 2 \pi \sqrt { 3 } } { \pi } \frac \sqrt { 2 } \end{array}
|
| 556 |
+
$$
|
| 557 |
+
|
| 558 |
+
The second inequality is due to $\beta _ { 1 t } \le \beta _ { 1 } < 1$ . The third inequality follows from Jensen inequality and the fourth inequality follows from Cauchy–Schwarz inequality. The fifth inequality follows from Lemma 2 and $m _ { 0 } = 0$ . The last inequality is due to the following upper bound:
|
| 559 |
+
|
| 560 |
+
$$
|
| 561 |
+
\sum _ { t = 1 } ^ { T } { \frac { 1 } { \sqrt { t } } } \leq 1 + \int _ { t = 1 } ^ { T } { \frac { \mathrm { d } t } { \sqrt { t } } } = 2 { \sqrt { T } } - 1 .
|
| 562 |
+
$$
|
| 563 |
+
|
| 564 |
+
We complete the proof of this lemma.
|
| 565 |
+
|
| 566 |
+
We now return to the proof of Theorem 4. Using the above lemma in Equation (11), we have
|
| 567 |
+
|
| 568 |
+
$$
|
| 569 |
+
\begin{array} { r l } & { \frac { \lambda } { \mu } \int _ { 0 } ^ { \infty } \hat { \rho } ( \mathbf { x } ) - \hat { \rho } ( \mathbf { x } ) e ^ { - \mathbf { x } } \hat { \rho } ( \mathbf { x } ) } \\ & { \quad + \frac { \lambda } { \mu } ( \sum _ { i = 1 } ^ { N } \frac { \hat { \rho } _ { i } } { \rho _ { i } } [ \frac { 1 } { 2 } \hat { \rho } _ { i } ( \hat { \rho } _ { i } ^ { - 1 } \otimes ^ { - 1 } ( \mathbf { x } - \mathbf { x } ^ { * } ) ) ^ { 2 } - | \mathbf { x } | ^ { 2 } ^ { - 1 } \otimes ^ { - 1 } \otimes ^ { - 1 } ( \rho ) \otimes ( \rho _ { i } \otimes \rho _ { i - 1 } - \mathbf { x } ^ { * } ) | \mathbf { x } | ] ) } \\ & { \quad - \frac { \lambda } { \mu } ( \sum _ { i = 1 } ^ { N } \frac { \hat { \rho } _ { i } } { \rho _ { i } } [ \frac { 1 } { 2 } \hat { \rho } _ { i } ( \hat { \rho } _ { i } ^ { - 1 } \otimes ^ { - 1 } ( \mathbf { x } - \mathbf { x } ^ { * } ) ) ^ { 2 } ] ) e ^ { - \mathbf { x } } ( \hat { \rho } _ { i } ^ { - 1 } \otimes ^ { - 1 } ( \rho ) \hat { \rho } _ { i } ( \mathbf { x } - \mathbf { x } ^ { * } ) ) } \\ & { \quad - \frac { \lambda } { \mu } ( \hat { \rho } _ { i } ^ { - 1 } \otimes ^ { - 1 } ( \rho ) \otimes ( \rho _ { i } \otimes \rho _ { i } - \rho _ { i } ^ { * } ) ) \mathbb { I } ) + \hat { \rho } ( \overline { { \mathbf { x } } } ^ { - 1 } ) \frac { \hat { \rho } _ { i } } { \rho _ { i } } [ \hat { \rho } _ { i } ^ { - 1 } \otimes ^ { - 1 } ( \rho ) \otimes ( \rho _ { i } - \rho _ { i } ^ { * } ) ] } \\ & \quad \leq \frac { \lambda } { 2 ( 1 - \delta ) } [ \mathbf { x } ^ { * } ] ^ { \rho } ( \mathbf { x } ^ { - 1 } \otimes ^ { - 1 } ( \mathbf { x } ^ { * } ) ^ { 2 } + \sum _ { i = 1 } ^ { N } [ \ \end{array}
|
| 570 |
+
$$
|
| 571 |
+
|
| 572 |
+
The second inequality use the fact that $\beta _ { 1 t } \le \beta _ { 1 } < 1$ . In order to further simplify the bound in Equation (12), we need to use telescopic sum. We observe that, by definition of $\eta _ { t }$ , we have
|
| 573 |
+
|
| 574 |
+
$$
|
| 575 |
+
\eta _ { t , i } ^ { - 1 } \geq \eta _ { t - 1 , i } ^ { - 1 } .
|
| 576 |
+
$$
|
| 577 |
+
|
| 578 |
+
Using the $D _ { \infty }$ bound on the feasible region and making use of the above property in Equation (12), we have
|
| 579 |
+
|
| 580 |
+
$$
|
| 581 |
+
\begin{array} { r l } & { \displaystyle \sum _ { t = 1 } ^ { T } f _ { t } \left( x _ { t } \right) - f _ { t } \left( x ^ { * } \right) } \\ & { \le \frac { D _ { \infty } ^ { 2 } } { 2 ( 1 - \beta _ { 1 } ) } \left[ \displaystyle \sum _ { i = 1 } ^ { d } \eta _ { 1 , i } ^ { - 1 } + \displaystyle \sum _ { t = 2 } ^ { T } \sum _ { i = 1 } ^ { d } \left[ \eta _ { t , i } ^ { - 1 } - \eta _ { t - 1 , i } ^ { - 1 } \right] + \displaystyle \sum _ { t = 1 } ^ { T } \sum _ { i = 1 } ^ { d } \beta _ { 1 t } \eta _ { t , i } ^ { - 1 } \right] + ( 2 \sqrt { T } - 1 ) \frac { R _ { \infty } G _ { 2 } ^ { 2 } } { 1 - \beta _ { 1 } } } \\ & { = \frac { D _ { \infty } ^ { 2 } \sqrt { T } } { 2 ( 1 - \beta _ { 1 } ) } \displaystyle \sum _ { i = 1 } ^ { d } \hat { \eta } _ { T , i } ^ { - 1 } + \frac { D _ { \infty } ^ { 2 } } { 2 ( 1 - \beta _ { 1 } ) } \displaystyle \sum _ { t = 1 } ^ { T } \sum _ { i = 1 } ^ { d } \beta _ { 1 t } \eta _ { t , i } ^ { - 1 } + ( 2 \sqrt { T } - 1 ) \frac { R _ { \infty } G _ { 2 } ^ { 2 } } { 1 - \beta _ { 1 } } . } \end{array}
|
| 582 |
+
$$
|
| 583 |
+
|
| 584 |
+
The equality follows from simple telescopic sum, which yields the desired result. It is easy to see√ that the regret of ADABOUND is upper bounded by $O ( \sqrt { T } )$ .
|
| 585 |
+
|
| 586 |
+
# F AMSBOUND
|
| 587 |
+
|
| 588 |
+
Theorem 5. Let $\{ x _ { t } \}$ and √ $\{ v _ { t } \}$ be the sequences obtained from Algorithm $^ 3$ , $\beta _ { 1 } = \beta _ { 1 1 }$ , $\beta _ { 1 t } \le \beta _ { 1 }$ for all $t \in [ T ]$ and $\beta _ { 1 } / \sqrt { \beta _ { 2 } } < 1$ . Suppose $\eta _ { l } ( t + 1 ) \geq \eta _ { l } ( t ) > 0$ , $\eta _ { u } ( t + 1 ) \leq \eta _ { u } ( t )$ , $\eta _ { l } ( t ) \alpha ^ { * }$ as $t \to \infty$ , $\mathsf { \bar { \eta } } _ { u } \mathsf { ( } t ) \to \mathsf { \bar { \alpha } } ^ { * }$ as $t \to \infty$ , $L _ { \infty } = \eta _ { l } ( 1 )$ and $R _ { \infty } = \eta _ { u } ( 1 )$ . Assume that $\| x - y \| _ { \infty } \leq D _ { \infty }$ for all $x , y \in { \mathcal { F } }$ and $\lVert \nabla f _ { t } ( x ) \rVert \leq G _ { 2 }$ for all $t \in [ T ]$ and $x \in { \mathcal { F } }$ . For $x _ { t }$ generated using the ADABOUND algorithm, we have the following bound on the regret
|
| 589 |
+
|
| 590 |
+
$$
|
| 591 |
+
R _ { T } \le \frac { D _ { \infty } ^ { 2 } \sqrt { T } } { 2 ( 1 - \beta _ { 1 } ) } \sum _ { i = 1 } ^ { d } \eta _ { T , i } ^ { - 1 } + \frac { D _ { \infty } ^ { 2 } } { 2 ( 1 - \beta _ { 1 } ) } \sum _ { t = 1 } ^ { T } \sum _ { i = 1 } ^ { d } \beta _ { 1 t } \eta _ { t , i } ^ { - 1 } + ( 2 \sqrt { T } - 1 ) \frac { R _ { \infty } G _ { 2 } ^ { 2 } } { 1 - \beta _ { 1 } } .
|
| 592 |
+
$$
|
| 593 |
+
|
| 594 |
+
# Algorithm 3 AMSBOUND
|
| 595 |
+
|
| 596 |
+
Input: $x _ { 1 } \in { \mathcal { F } }$ , initial step size $\alpha$ , $\{ \beta _ { 1 t } \} _ { t = 1 } ^ { T }$ , $\beta _ { 2 }$ , lower bound function $\eta _ { l }$ , upper bound function $\eta _ { u }$
|
| 597 |
+
1: Set $m _ { 0 } = 0$ , $v _ { 0 } = 0$ and $\hat { v } _ { 0 } = 0$
|
| 598 |
+
2: for $t = 1$ to $T$ do
|
| 599 |
+
3: $g _ { t } = \nabla f _ { t } ( x _ { t } )$
|
| 600 |
+
4: $m _ { t } = \beta _ { 1 t } m _ { t - 1 } + ( 1 - \beta _ { 1 t } ) g _ { t }$
|
| 601 |
+
5: $v _ { t } = \beta _ { 2 } v _ { t - 1 } + ( 1 - \beta _ { 2 } ) g _ { t } ^ { 2 }$
|
| 602 |
+
6: $\hat { v } _ { t } = \operatorname* { m a x } ( \hat { v } _ { t - 1 } , v _ { t } )$ and $\bar { V } _ { t } = \mathrm { d i a g } ( \hat { v } _ { t } )$
|
| 603 |
+
7: $\eta = \mathrm { C l i p } ( \alpha / \sqrt { V _ { t } } , \eta _ { l } ( t ) , \eta _ { u } ( t ) )$ and $\eta _ { t } = \eta / \sqrt { t }$
|
| 604 |
+
8: $x _ { t + 1 } = \Pi _ { { \mathcal { F } } , \mathrm { d i a g } ( \eta _ { t } ^ { - 1 } ) } ( x _ { t } - \eta _ { t } \odot m _ { t } )$
|
| 605 |
+
9: end for
|
| 606 |
+
|
| 607 |
+
The regret of AMSBOUND has the same upper bound with that of ADABOUND.3
|
| 608 |
+
|
| 609 |
+
# G EMPIRICAL STUDY ON BOUND FUNCTIONS
|
| 610 |
+
|
| 611 |
+
Here we provide an empirical study on different kinds of bound functions. We consider the following two key factors of the bound function: convergence speed and convergence target. The former one affects how “fast” our algorithms transform from adaptive methods to SGD(M), while the latter one reflects the final step size of SGD(M). In particular, we consider the following bound functions:
|
| 612 |
+
|
| 613 |
+
$$
|
| 614 |
+
\begin{array} { c } { \displaystyle \eta _ { l } ( t ) = ( 1 - \frac { 1 } { ( 1 - \beta ) t + 1 } ) \alpha ^ { * } , } \\ { \displaystyle \eta _ { u } ( t ) = ( 1 + \frac { 1 } { ( 1 - \beta ) t } ) \alpha ^ { * } , } \end{array}
|
| 615 |
+
$$
|
| 616 |
+
|
| 617 |
+
where the above functions will converge to $\alpha ^ { * }$ and the larger $\beta$ results in lower convergence speed.
|
| 618 |
+
|
| 619 |
+

|
| 620 |
+
Figure 5: Test accuracy of ADABOUND with different $\beta$ using ResNet-34 on CIFAR-10.
|
| 621 |
+
|
| 622 |
+
We first investigate the impact of convergence speed. We conduct an experiment of ADABOUND on CIFAR-10 dataset with the ResNet-34 model, where $\beta$ is chosen in $\{ 1 ^ { \dot { \mathbf { \theta } } } - \textstyle { \frac { 1 } { 1 0 } } , 1 - \textstyle { \frac { 1 } { 5 0 } } , 1 - \textstyle { \frac { 1 } { 1 0 0 } } , 1 -$ $\textstyle { \frac { 1 } { 5 0 0 } } , 1 - { \frac { 1 } { 1 0 0 0 } } \}$ and $\alpha ^ { * }$ is chosen from $\{ 1 , 0 . 1 \}$ . The results are shown in Figure 5. We can see that for a specific $\alpha ^ { * }$ , the performances with different $\beta$ are almost the same . It indicates that the convergence speed of bound functions does not affect the final result to some extent. We find a $\beta$ in $[ \beta _ { 1 } , \beta _ { 2 } ]$ usually contributes to a strong performance across all models.
|
| 623 |
+
|
| 624 |
+
Next, we investigate the impact of convergence target and the results are displayed in Figure 6. We test SGDM and ADABOUND with different $\alpha$ (or $\alpha ^ { * }$ ) with the ResNet-34 model, where $\alpha$ (or $\alpha ^ { * }$ ) is chosen in $\{ 1 , 0 . 1 , 0 . 0 3 , 0 . 0 1 , 0 . 0 0 3 , 0 . 0 0 1 \}$ and $\beta = 0 . 9 9$ . The results show that SGDM is very sensitive to the hyperparameter. The best value of the step size for SGDM is 0.1 and it has large performance gaps compared with other settings. In contrast, ADABOUND has stable performance in different final step sizes, which illustrates that it is not sensitive to the convergence target.
|
| 625 |
+
|
| 626 |
+

|
| 627 |
+
Figure 6: Test accuracy of SGDM/ADABOUND with different $\alpha / \alpha ^ { * }$ using ResNet-34 on CIFAR-10. The result of SGDM with $\alpha = 1$ is not shown above as its performance is too poor (lower than $7 0 \%$ to be plotted together with other results in a single figure.
|
| 628 |
+
|
| 629 |
+

|
| 630 |
+
Figure 7: Comparison of test accuracy between SGDM and ADABOUND with different $\alpha / \alpha ^ { * }$ .
|
| 631 |
+
|
| 632 |
+
We further directly compare the performance between SGDM and ADABOUND with each $\alpha$ (or $\alpha ^ { * }$ ). The results are shown in Figure 7. We can see that ADABOUND outperforms SGDM for all the step sizes. Since the form of bound functions has minor impact on the performance of ADABOUND, it is likely to beat SGDM even without carefully tuning the hyperparameters.
|
| 633 |
+
|
| 634 |
+
To summarize, the form of bound functions does not much influence the final performance of the methods. In other words, ADABOUND is not sensitive to its hyperparameters. Moreover, it can achieve a higher or similar performance to SGDM even if it is not carefully fine-tuned. Therefore, we can expect a better performance by using ADABOUND regardless of the choice of bound functions.
|
| 635 |
+
|
| 636 |
+
# H EMPIRICAL STUDY ON THE EVOLUTION OF LEARNING RATES OVER TIME
|
| 637 |
+
|
| 638 |
+
Here we provide an empirical study on the evolution of learning rates of ADABOUND over time. We conduct an experiment using ResNet-34 model on CIFAR-10 dataset with the same settings in Section 5. We randomly choose two layers in the network. For each layer, the learning rates of its parameters are recorded at each time step. We pick the min/median/max values of the learning rates in each layer and plot them against epochs in Figure 8.
|
| 639 |
+
|
| 640 |
+
We can see that the learning rates increase rapidly in the early stage of training, then after a few epochs its max/median values gradually decrease over time, and finally converge to the final step size. The increasing at the beginning is due to the property of the exponential moving average of $\phi _ { t }$ of ADAM, while the gradually decreasing indicates the transition from ADAM to SGD.
|
| 641 |
+
|
| 642 |
+

|
| 643 |
+
Figure 8: The evolution of learning rates over time in two randomly chosen layers.
|
md/train/ByIAPUcee/ByIAPUcee.md
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FRUSTRATINGLY SHORT ATTENTION SPANS IN NEURAL LANGUAGE MODELING
|
| 2 |
+
|
| 3 |
+
Michał Daniluk, Tim Rocktaschel, Johannes Welbl & Sebastian Riedel ¨
|
| 4 |
+
|
| 5 |
+
Department of Computer Science
|
| 6 |
+
University College London
|
| 7 |
+
michal.daniluk.15@ucl.ac.uk,
|
| 8 |
+
{t.rocktaschel,j.welbl,s.riedel}@cs.ucl.ac.uk
|
| 9 |
+
|
| 10 |
+
# ABSTRACT
|
| 11 |
+
|
| 12 |
+
Neural language models predict the next token using a latent representation of the immediate token history. Recently, various methods for augmenting neural language models with an attention mechanism over a differentiable memory have been proposed. For predicting the next token, these models query information from a memory of the recent history which can facilitate learning mid- and long-range dependencies. However, conventional attention mechanisms used in memoryaugmented neural language models produce a single output vector per time step. This vector is used both for predicting the next token as well as for the key and value of a differentiable memory of a token history. In this paper, we propose a neural language model with a key-value attention mechanism that outputs separate representations for the key and value of a differentiable memory, as well as for encoding the next-word distribution. This model outperforms existing memoryaugmented neural language models on two corpora. Yet, we found that our method mainly utilizes a memory of the five most recent output representations. This led to the unexpected main finding that a much simpler model based only on the concatenation of recent output representations from previous time steps is on par with more sophisticated memory-augmented neural language models.
|
| 13 |
+
|
| 14 |
+
# 1 INTRODUCTION
|
| 15 |
+
|
| 16 |
+
At the core of language models (LMs) is their ability to infer the next word given a context. This requires representing context-specific dependencies in a sequence across different time scales. On the one hand, classical $N$ -gram language models capture relevant dependencies between words in short time distances explicitly, but suffer from data sparsity. Neural language models, on the other hand, maintain and update a dense vector representation over a sequence where time dependencies are captured implicitly (Mikolov et al., 2010). A recent extension of neural sequence models are attention mechanisms (Bahdanau et al., 2015), which can capture long-range connections more directly. However, we argue that applying such an attention mechanism directly to neural language models requires output vectors to fulfill several purposes at the same time: they need to (i) encode a distribution for predicting the next token, (ii) serve as a key to compute the attention vector, as well as (iii) encode relevant content to inform future predictions.
|
| 17 |
+
|
| 18 |
+
We hypothesize that such overloaded use of output representations makes training the model difficult and propose a modification to the attention mechanism which separates these functions explicitly, inspired by Miller et al. (2016); Ba et al. (2016); Reed & de Freitas (2015); Gulcehre et al. (2016). Specifically, at every time step our neural language model outputs three vectors. The first is used to encode the next-word distribution, the second serves as key, and the third as value for an attention mechanism. We term the model key-value-predict attention and show that it outperforms existing memory-augmented neural language models on the Children’s Book Test (CBT, Hill et al., 2016) and a new corpus of 7500 Wikipedia articles. However, we observed that this model pays attention mainly to the previous five memories. We thus also experimented with a much simpler model that only uses a concatenation of output vectors from the previous time steps for predicting the next token. This simple model is on par with more sophisticated memory-augmented neural language models. Thus, our main finding is that modeling short attention spans properly works well and provides notable improvements over a neural language model with attention. Conversely, it seems to be notoriously hard to train neural language models to leverage long-range dependencies.
|
| 19 |
+
|
| 20 |
+

|
| 21 |
+
Figure 1: Memory-augmented neural language modelling architectures.
|
| 22 |
+
|
| 23 |
+
In this paper, we investigate various memory-augmented neural language models and compare them against previous architectures. Our contributions are threefold: (i) we propose a key-value attention mechanism that uses specific output representations for querying a sliding-window memory of previous token representations, (ii) we demonstrate that while this new architecture outperforms previous memory-augmented neural language models, it mainly utilizes a memory of the previous five representations, and finally (iii) based on this observation we experiment with a much simpler but effective model that uses the concatenation of three previous output representations to predict the next word.
|
| 24 |
+
|
| 25 |
+
# 2 METHODS
|
| 26 |
+
|
| 27 |
+
In the following, we discuss methods for extending neural language models with differentiable memory. We first present a standard attention mechanism for language modeling (§2.1). Subsequently, we introduce two methods for separating the usage of output vectors in the attention mechanism: (i) using a dedicated key and value (§2.2), and (ii) further separating the value into a memory value and a representation that encodes the next-word distribution (§2.3). Finally, we describe a very simple method that concatenates previous output representations for predicting the next token (§2.4).
|
| 28 |
+
|
| 29 |
+
# 2.1 ATTENTION FOR NEURAL LANGUAGE MODELING
|
| 30 |
+
|
| 31 |
+
Augmenting a neural language model with attention (Bahdanau et al., 2015) is straight-forward. We simply take the previous $L$ output vectors as memory $Y _ { t } = [ \pmb { h } _ { t - L } \ \cdot \ \cdot \ \pmb { h } _ { t - 1 } ] \in \mathbb { R } ^ { k \times \tilde { L } }$ where $k$ is the output dimension of a Long Short-Term Memory (LSTM) unit (Hochreiter & Schmidhuber, 1997). This memory could in principle contain all previous output representations, but for practical reasons we only keep a sliding window of the previous $L$ outputs. Let $\boldsymbol { h } _ { t } \in \mathbb { R } ^ { k }$ be the output representation at time step $t$ and $\mathbf { 1 } \in \mathbb { R } ^ { L }$ be a vector of ones.
|
| 32 |
+
|
| 33 |
+
The attention weights $\pmb { \alpha } \in \mathbb { R } ^ { L }$ are computed from a comparison of the current and previous LSTM outputs. Subsequently, the context vector $\boldsymbol { r } _ { t } \in \mathbb { R } ^ { k }$ is calculated from a sum over previous output vectors weighted by their respective attention value. This can be formulated as
|
| 34 |
+
|
| 35 |
+
$$
|
| 36 |
+
\begin{array} { r l } & { M _ { t } = \operatorname { t a n h } ( W ^ { Y } Y _ { t } + ( W ^ { h } h _ { t } ) \mathbf { 1 } ^ { T } ) } \\ & { ~ \alpha _ { t } = \operatorname { s o f t m a x } ( \pmb { w } ^ { T } M _ { t } ) } \\ & { ~ { \pmb { r } _ { t } } = { \pmb { Y } _ { t } } \pmb { \alpha } ^ { T } } \end{array}
|
| 37 |
+
$$
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\begin{array} { l } { \in \mathbb { R } ^ { k \times L } } \\ { \in \mathbb { R } ^ { 1 \times L } } \\ { \in \mathbb { R } ^ { k } } \end{array}
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
where $W ^ { Y }$ , $W ^ { h } \in \mathbb { R } ^ { k \times k }$ are trainable projection matrices and $\mathbf { \boldsymbol { w } } \in \mathbb { R } ^ { k }$ is a trainable vector. The final representation that encodes the next-word distribution is computed from a non-linear combination of the attention-weighted representation $\mathbf { \nabla } _ { \mathbf { \boldsymbol { r } } _ { t } }$ of previous outputs and the final output vector $\boldsymbol { h } _ { t }$ via
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
\begin{array} { r } { \pmb { h } _ { t } ^ { * } = \operatorname { t a n h } ( \pmb { W } ^ { r } \pmb { r } _ { t } + \pmb { W } ^ { x } \pmb { h } _ { t } ) } \end{array}
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\in \mathbb { R } ^ { k }
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
where $W ^ { r }$ , $W ^ { x } \in \mathbb { R } ^ { k \times k }$ are trainable projection matrices. An overview of this architecture is depicted in Figure 1a. Lastly, the probablity distribution ${ \mathbf { } } _ { \mathbf { } } \mathbf { \mathbf { } } _ { \mathbf { } } \mathbf { \mathbf { } } _ { \mathbf { } } \mathbf { \mathbf { } } _ { \mathbf { } } \mathbf { \mathbf { } } _ { \mathbf { } } \mathbf { \mathbf { } } _ { \mathbf { } } \mathbf { \mathbf { } } _ { \mathbf { } } \mathbf { \mathbf { } } _ { \mathbf { } } \mathbf { \Xi } _ { \mathbf { } } \mathbf { \Lambda } _ { \mathbf { } } \mathbf { \Lambda } _ { \mathbf { } } \textbf { } _ { \mathbf { } } \textbf { } \textbf { } _ { \mathrm { } }$ for the next word is represented by
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
\begin{array} { r } { y _ { t } = \mathrm { s o f t m a x } ( W ^ { * } h _ { t } ^ { * } + b ) \qquad \in \mathbb { R } ^ { | V | } } \end{array}
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
where $W ^ { \ast } \in \mathbb { R } ^ { | V | \times k }$ and $\pmb { b } \in \mathbb { R } ^ { | V | }$ are a trainable projection matrix and bias, respectively.
|
| 60 |
+
|
| 61 |
+
# 2.2 KEY-VALUE ATTENTION
|
| 62 |
+
|
| 63 |
+
Inspired by Miller et al. (2016); Ba et al. (2016); Reed & de Freitas (2015); Gulcehre et al. (2016), we introduce a key-value attention model that separates output vectors into keys used for calculating the attention distribution $\pmb { \alpha } _ { t }$ , and a value part used for encoding the next-word distribution and context representation. This model is depicted in Figure 1b. Formally, we rewrite Equations 1-4 as follows:
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
\begin{array} { r l r l } & { \Big [ \pmb { k } _ { t } \Big ] = \pmb { h } _ { t } } & { \qquad } & & { \in \mathbb { R } ^ { 2 k } } \\ & { M _ { t } = \operatorname { t a n h } ( \pmb { W } ^ { Y } [ \pmb { k } _ { t - L } \cdot \cdot \cdot \pmb { k } _ { t - 1 } ] + ( \pmb { W } ^ { h } \pmb { k } _ { t } ) \mathbf { 1 } ^ { T } ) } & & { \qquad \in \mathbb { R } ^ { k \times L } } \\ & { \pmb { \alpha } _ { t } = \operatorname { s o f t m a x } ( \pmb { w } ^ { T } M _ { t } ) } & & { \in \mathbb { R } ^ { 1 \times L } } \\ & { r _ { t } = [ \pmb { v } _ { t - L } \cdot \cdot \cdot \cdot \pmb { v } _ { t - 1 } ] \pmb { \alpha } ^ { T } } & & { \in \mathbb { R } ^ { k } } \\ & { \pmb { h } _ { t } ^ { * } = \operatorname { t a n h } ( \pmb { W } ^ { r } r _ { t } + \pmb { W } ^ { x } \pmb { v } _ { t } ) } & & { \in \mathbb { R } ^ { k } } \end{array}
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
In essence, Equation 7 compares the key at time step $t$ with the previous $L$ keys to calculate the attention distribution $\pmb { \alpha } _ { t }$ which is then used in Equation 9 to obtain a weighted context representation from values associated with these keys.
|
| 70 |
+
|
| 71 |
+
# 2.3 KEY-VALUE-PREDICT ATTENTION
|
| 72 |
+
|
| 73 |
+
Even with a key-value separation, a potential problem is that the same representation ${ \mathbf { } } v _ { t }$ is still used both for encoding the probability distribution of the next word and for retrieval from the memory via the attention later. Thus, we experimented with another extension of this model where we further separate $\boldsymbol { h } _ { t }$ into a $k e y$ , a value and a predict representation where the latter is only used for encoding the next-word distribution (see Figure 1c). To this end, equations 6 and 10 are replaced by
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
\begin{array} { r l } & { \left\lceil \begin{array} { l } { k _ { t } } \\ { v _ { t } } \\ { p _ { t } } \end{array} \right\rceil = h _ { t } } \\ & { ~ \left\lceil \begin{array} { l } { k _ { t } } \end{array} \right\rceil } \\ & { ~ h _ { t } ^ { * } = \operatorname { t a n h } ( W ^ { r } r _ { t } + W ^ { x } p _ { t } ) } \end{array}
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
\begin{array} { l } { \in \mathbb { R } ^ { 3 k } } \\ { \ } \\ { \in \mathbb { R } ^ { k } } \end{array}
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
More precisely, the output vector $\boldsymbol { h } _ { t }$ is divided into three equal parts: key, value and predict. In our implementation we simply split the output vector $h _ { t }$ into $k _ { t }$ , ${ \mathbf { } } v _ { t }$ and ${ \pmb p } _ { t }$ . To this end the hidden dimension of the key-value-predict attention model needs to be a multiplicative of three. Consequently, the dimensions of $k _ { t }$ , ${ \mathbf { } } v _ { t }$ and ${ \mathbf { } } p _ { t }$ are 100 for a hidden dimension of 300.
|
| 84 |
+
|
| 85 |
+
# 2.4 $N$ -GRAM RECURRENT NEURAL NETWORK
|
| 86 |
+
|
| 87 |
+
Neural language models often work best in combination with traditional $N$ -gram models (Mikolov et al., 2011; Chelba et al., 2013; Williams et al., 2015; Ji et al., 2016; Shazeer et al., 2015), since the former excel at generalization while the latter ensure memorization. In addition, from initial experiments with memory-augmented neural language models, we found that usually only the previous five output representations are utilized. This is in line with observations by Tran et al. (2016). Hence, we experiment with a much simpler architecture depicted in Figure 1d. Instead of an attention mechanism, the output representations from the previous $N - 1$ time steps are directly used to calculate next-word probabilities. Specifically, at every time step we split the LSTM output into $N - 1$ vectors $[ { \pmb h } _ { t } ^ { 1 } , \dots , { \pmb h } _ { t } ^ { N - 1 } ]$ and replace Equation 4 with
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
\begin{array} { r } { h _ { t } ^ { * } = \operatorname { t a n h } \left( W ^ { N } \left[ \begin{array} { c } { \ h _ { t } ^ { 1 } } \\ { \vdots } \\ { h _ { t - N + 1 } ^ { N - 1 } } \end{array} \right] \right) } \end{array}
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
where $W ^ { N } \in \mathbb { R } ^ { k \times ( N - 1 ) k }$ is a trainable projection matrix. This model is related to higher-order RNNs (Soltani $\&$ Jiang, 2016) with the difference that we do not incorporate output vectors from the previous steps into the hidden state but only use them for predicting the next word. Furthermore, note that at time step $t$ the first part of the output vector $ { \boldsymbol { h } } _ { t } ^ { 1 }$ will contribute to predicting the next word, the second part $h _ { t } ^ { 2 }$ will contribute to predicting the second word thereafter, and so on. As the output vectors from the $N - 1$ previous time-steps are used to score the next word, we call the resulting model an $N$ -gram RNN.
|
| 94 |
+
|
| 95 |
+
# 3 RELATED WORK
|
| 96 |
+
|
| 97 |
+
Early attempts of using memory in neural networks have been undertaken by Taylor (1959) and Steinbuch $\&$ Piske (1963) by performing nearest-neighbor operations on input vectors and fitting parametric models to the retrieved sets. The dedicated use of external memory in neural architectures has more recently witnessed increased interest. Weston et al. (2015) introduced Memory Networks to explicitly segregate memory storage from the computation of the neural network, and Sukhbaatar et al. (2015) trained this model end-to-end with an attention-based memory addressing mechanism. The Neural Turing Machines by Graves et al. (2014) add an external differentiable memory with read-write functions to a controller recurrent neural network, and has shown promising results in simple sequence tasks such as copying and sorting. These models make use of external memory, whereas our model directly uses a short sequence from the history of tokens to dynamically populate an addressable memory.
|
| 98 |
+
|
| 99 |
+
In sequence modeling, RNNs such as LSTMs (Hochreiter & Schmidhuber, 1997) maintain an internal memory state as they process an input sequence. Attending over previous state outputs on top of an RNN encoder has improved performances in a wide range of tasks, including machine translation (Bahdanau et al., 2015), recognizing textual entailment (Rocktaschel et al. ¨ , 2016), sentence summarization (Rush et al., 2015), image captioning (Xu et al., 2015) and speech recognition (Chorowski et al., 2015).
|
| 100 |
+
|
| 101 |
+
Recently, Cheng et al. (2016) proposed an architecture that modifies the standard LSTM by replacing the memory cell with a memory network (Weston et al., 2015). Another proposal for conditioning on previous output representations are Higher-order Recurrent Neural Networks (HORNNs, Soltani & Jiang, 2016). Soltani & Jiang found it useful to include information from multiple preceding RNN states when computing the next state. This previous work centers around preceding state vectors, whereas we investigate attention mechanisms on top of RNN outputs, i.e. the vectors used for predicting the next word. Furthermore, instead of pooling we use attention vectors to calculate a context representation of previous memories.
|
| 102 |
+
|
| 103 |
+
Yang et al. (2016) introduced a reference-aware neural language model where at every position a latent variable determines from which source a target token is generated, e.g., by copying entries from a table or referencing entities that were mentioned earlier.
|
| 104 |
+
|
| 105 |
+
Another class of models that include memory into sequence modeling are Recurrent Memory Networks (RMNs) (Tran et al., 2016). Here, a memory block accesses the most recent input words to selectively attend over relevant word representations from a global vocabulary. RMNs use a global memory with two input word vector look-up tables for the attention mechanism, and consequently have a large number of trainable parameters. Instead, we proposed models that need much fewer parameters by producing the vectors that will be attended over in the future, which can be seen as a memory that is dynamically populated by the language model.
|
| 106 |
+
|
| 107 |
+
Finally, the functional separation of look-up keys and memory content has been found useful for Memory Networks (Miller et al., 2016), Neural Programmer-Interpreters (Reed & de Freitas, 2015), Dynamic Neural Turing Machines (Gulcehre et al., 2016), and Fast Associative Memory (Ba et al., 2016). We apply and extend this principle to neural language models.
|
| 108 |
+
|
| 109 |
+
# 4 EXPERIMENTS
|
| 110 |
+
|
| 111 |
+
We evaluate models on two different corpora for language modeling. The first is a subset of the Wikipedia corpus.1 It consists of 7500 English Wikipedia articles (dump from 6 Feb 2015) belonging to one of the following categories: People, Cities, Countries, Universities, and Novels. We chose these categories as we expect articles in these categories to often contain references to previously mentioned entities. Subsequently, we split this corpus into a train, development, and test part, resulting in corpora of $2 2 . 5 \mathbf { M }$ words, 1.2M and 1.2M words, respectively. We map all numbers to a dedicated numerical symbol $N$ and restrict the vocabulary to the 77K most frequent words, encompassing $9 7 \%$ of the training vocabulary. All other words are replaced by the UNK symbol. The average length of sentences is 25 tokens. In addition to this Wikipedia corpus, we also run experiments on the Children’s Book Test (CBT Hill et al., 2016). While this corpus is designed for cloze-style question-answering, in this paper we use it to test how well language models can exploit wider linguistic context.
|
| 112 |
+
|
| 113 |
+
# 4.1 TRAINING PROCEDURE
|
| 114 |
+
|
| 115 |
+
We use ADAM (Kingma & Ba, 2015) with an initial learning rate of 0.001 and a mini-batch size of 64 for optimization. Furthermore, we apply gradient clipping at a gradient norm of 5 (Pascanu et al., 2013). The bias of the LSTM’s forget gate is initialized to 1 (Jozefowicz et al., 2016), while other parameters are initialized uniformly from the range $( - 0 . 1 , 0 . 1 )$ . Backpropagation Through Time (Rumelhart et al., 1985; Werbos, 1990) was used to train the network with 20 steps of unrolling. We reset the hidden states between articles for the Wikipedia corpus and between stories for CBT, respectively. We take the best configuration based on performance on the validation set and evaluate it on the test set.
|
| 116 |
+
|
| 117 |
+
# 5 RESULTS
|
| 118 |
+
|
| 119 |
+
In the first set of experiments we explore how well the proposed models and Tran et al.’s Recurrentmemory Model can make use of histories of varying lengths. Perplexity results for different attention window sizes on the Wikipedia corpus are summarized in Figure 2a. The average attention these models pay to specific positions in the history is illustrated in Figure 3. We observed that although our models attend over tokens further in the past more often than the Recurrent-memory Model, attending over a longer history does not significantly improve the perplexity of any attentive model.
|
| 120 |
+
|
| 121 |
+
The much simpler $N$ -gram RNN model achieves comparable results (Figure 2b) and seems to work best with a history of the previous three output vectors (4-gram RNN). As a result, we choose the 4-gram model for the following $N$ -gram RNN experiments.
|
| 122 |
+
|
| 123 |
+
Figure 2: Perplexities of memory-augmented neural language models on the Wikipedia corpus (a-c) and accuracies on the CBT test set (d).
|
| 124 |
+
|
| 125 |
+
<table><tr><td>Model</td><td colspan="4">Attention Window Size</td></tr><tr><td></td><td>1</td><td>5</td><td>10</td><td>15</td></tr><tr><td>RM(+tM-g) (Tran et al.,2016)</td><td>83.5</td><td>80.5</td><td>80.3</td><td>80.1</td></tr><tr><td>Attention</td><td>82.2</td><td>82.2</td><td>82.0</td><td>82.8</td></tr><tr><td>Key-Value</td><td>78.7</td><td>79.0</td><td>78.2</td><td>78.9</td></tr><tr><td>Key-Value-Predict</td><td>76.1</td><td>75.8</td><td>76.0</td><td>75.8</td></tr></table>
|
| 126 |
+
|
| 127 |
+
(a) Test perplexity of different attention architectures with varying attention window sizes. Best perplexity per model is italic.
|
| 128 |
+
(b) Comparison of $N$ -gram neural language models. $w$ denotes the input size, $k$ the hidden size and $\theta _ { M }$ the total number of model parameters.
|
| 129 |
+
|
| 130 |
+
<table><tr><td>Model</td><td>w</td><td>k</td><td>0M</td><td>Dev</td><td>Test</td></tr><tr><td>2-gram RNN</td><td>300</td><td>564</td><td>23.9M</td><td>76.0</td><td>77.1</td></tr><tr><td>3-gram RNN</td><td>300</td><td>786</td><td>23.9M</td><td>74.9</td><td>75.9</td></tr><tr><td>4-gram RNN</td><td>300</td><td>968</td><td>23.9M</td><td>74.8</td><td>75.9</td></tr><tr><td>5-gram RNN</td><td>300</td><td>1120</td><td>23.9M</td><td>76.0</td><td>77.3</td></tr></table>
|
| 131 |
+
|
| 132 |
+
(c) Summary of models with best attention window size $a$ . The total number of model parameters, including word representations, is denoted by $\theta _ { W + M }$ (without word representations $\theta _ { M }$ ).
|
| 133 |
+
|
| 134 |
+
<table><tr><td>Model</td><td>w</td><td>k</td><td>a</td><td>0W+M</td><td>0M</td><td>Dev</td><td>Test</td></tr><tr><td>RNN</td><td>300</td><td>307</td><td>1</td><td>47.0M</td><td>23.9M</td><td>121.7</td><td>125.7</td></tr><tr><td>LSTM</td><td>300</td><td>300</td><td>-</td><td>47.0M</td><td>23.9M</td><td>83.2</td><td>85.2</td></tr><tr><td>FOFE HORNN (3-rd order) (Soltani & Jiang,2016)</td><td>300</td><td>303</td><td>-</td><td>47.0M</td><td>23.9M</td><td>116.7</td><td>120.5</td></tr><tr><td>Gated HORNN (3-rd order) (Soltani & Jiang, 2016)</td><td>300</td><td>297</td><td>-</td><td>47.0M</td><td>23.9M</td><td>93.9</td><td>97.1</td></tr><tr><td>RM(+tM-g) (Tran et al.,2016)</td><td>300</td><td>300</td><td>15</td><td>93.7M</td><td>70.6M</td><td>78.2</td><td>80.1</td></tr><tr><td>Attention</td><td>300</td><td>296</td><td>10</td><td>47.0M</td><td>23.9M</td><td>80.6</td><td>82.0</td></tr><tr><td>Key-Value</td><td>300</td><td>560</td><td>10</td><td>47.0M</td><td>23.9M</td><td>77.1</td><td>78.2</td></tr><tr><td>Key-Value-Predict</td><td>300</td><td>834</td><td>5</td><td>47.0M</td><td>23.9M</td><td>74.2</td><td>75.8</td></tr><tr><td>4-gram RNN</td><td>300</td><td>968</td><td>-</td><td>47.0M</td><td>23.9M</td><td>74.8</td><td>75.9</td></tr></table>
|
| 135 |
+
|
| 136 |
+
(d) Results on CBT; those marked with ‡ are taken from Hill et al. (2016).
|
| 137 |
+
|
| 138 |
+
<table><tr><td>Model</td><td>Named Entities</td><td>Common Nouns</td><td>Verbs</td><td>Prepositions</td></tr><tr><td>Humans (context+query) ‡</td><td>0.816</td><td>0.816</td><td>0.828</td><td>0.708</td></tr><tr><td>Kneser-Ney LM ‡</td><td>0.390</td><td>0.544</td><td>0.778</td><td>0.768</td></tr><tr><td>Kneser-Ney LM + cache ‡</td><td>0.439</td><td>0.577</td><td>0.772</td><td>0.679</td></tr><tr><td>LSTM (context+query) ‡</td><td>0.418</td><td>0.560</td><td>0.818</td><td>0.791</td></tr><tr><td>Memory Network ‡</td><td>0.666</td><td>0.630</td><td>0.690</td><td>0.703</td></tr><tr><td>AS Reader, avg ensemble (Kadlec et al., 2016)</td><td>0.706</td><td>0.689</td><td>一</td><td>1</td></tr><tr><td>AS Reader, greedy ensemble (Kadlec et al., 2016)</td><td>0.710</td><td>0.675</td><td></td><td></td></tr><tr><td>QANN, 4 hops, GloVe (Weissenborn, 2016)</td><td>0.729</td><td>1</td><td></td><td></td></tr><tr><td>AoA Reader, single model (Cui et al.,2016a)</td><td>0.720</td><td>0.694</td><td></td><td></td></tr><tr><td>CAS Reader, mode avg (Cui et al.,2016b)</td><td>0.692</td><td>0.657</td><td></td><td></td></tr><tr><td>GA Reader, ensemble (Dhingra et al., 2016)</td><td>0.719</td><td>0.694</td><td></td><td></td></tr><tr><td>EpiReader, ensemble (Trischler et al., 2016)</td><td>0.718</td><td>0.706</td><td></td><td></td></tr><tr><td>FOFE HORNN (3-rd order) (Soltani & Jiang,2016)</td><td>0.465</td><td>0.497</td><td>0.774</td><td>0.741</td></tr><tr><td>Gated HORNN (3-rd order) (Soltani & Jiang,2016)</td><td>0.508</td><td>0.547</td><td>0.790</td><td>0.774</td></tr><tr><td>RM(+tM-g) (Tran et al.,2016)</td><td>0.525</td><td>0.597</td><td>0.817</td><td>0.797</td></tr><tr><td>LSTM</td><td>0.523</td><td>0.604</td><td>0.819</td><td>0.786</td></tr><tr><td>Attention</td><td>0.538</td><td>0.595</td><td>0.826</td><td>0.803</td></tr><tr><td>Key-Value</td><td>0.528</td><td>0.601</td><td>0.822</td><td>0.813</td></tr><tr><td>Key-Value-Predict</td><td>0.528</td><td>0.599</td><td>0.829</td><td>0.803</td></tr><tr><td>4-gram RNN</td><td>0.532</td><td>0.598</td><td>0.815</td><td>0.800</td></tr></table>
|
| 139 |
+
|
| 140 |
+
# 5.1 COMPARISON WITH STATE-OF-THE-ART MODELS
|
| 141 |
+
|
| 142 |
+
In the next set of experiments, we compared our proposed models against a variety of state-of-the-art models on the Wikipedia and CBT corpora. Results are shown in Figure 2c and 2d, respectively. Note that the models presented here do not achieve state-of-the-art on CBT as they are language models and not tailored towards cloze-sytle question answering. Thus, we merely use this corpus for comparing different neural language model architectures. We reimplemented the Recurrent-Memory model by Tran et al. (2016) with the temporal matrix and gating composition function $\mathbf { \left( R M + t M - g \right) }$ ).
|
| 143 |
+
|
| 144 |
+

|
| 145 |
+
Figure 3: Attention weights of the Key-Value-Predict model on a randomly sampled Wikipedia article (a) and average attention weight distribution on the whole Wikipedia test set for $\mathbf { R M } ( + \mathbf { t M } - \mathbf { g } )$ , Attention, Key-Value and Key-Value-Predict models (b). The rightmost positions represent the most recent history.
|
| 146 |
+
|
| 147 |
+
Furthermore, we reimplemented Higher Order Recurrent Neural Networks (HORNNs) by Soltani & Jiang (2016).
|
| 148 |
+
|
| 149 |
+
To ensure a comparable number of parameters to a vanilla LSTM model, we adjusted the hidden size of all models to have roughly the same total number of model parameters. The attention window size $N$ for the $N$ -gram RNN model was set to 4 according to the best validation set perplexity on the Wikipedia corpus. Below we discuss the results in detail.
|
| 150 |
+
|
| 151 |
+
Attention By using a neural language model with an attention mechanism over a dynamically populated memory, we observed a 3.2 points lower perplexity over a vanilla LSTM on Wikipedia, but only notable differences for predicting verbs and prepositions in CBT. This indicates that incorporating mechanisms for querying previous output vectors is useful for neural language modeling.
|
| 152 |
+
|
| 153 |
+
Key-Value Decomposing the output vector into a key-value paired memory improves the perplexity by 7.0 points compared to a baseline LSTM, and by 1.9 points compared to the $\mathbf { R M } ( + \mathbf { t M } - \mathbf { g } )$ model. Again, for CBT we see only small improvements.
|
| 154 |
+
|
| 155 |
+
Key-Value-Predict By further separating the output vector into a key, value and next-word prediction part, we get the lowest perplexity and gain 9.4 points over a baseline LSTM, a 4.3 points compared to $\mathbf { R M } ( + \mathbf { t M } - \mathbf { g } )$ , and 2.4 points compared to only splitting the output into a key and value. For CBT, we see an accuracy increase of 1.0 percentage points for verbs, and 1.7 for prepositions. As stated earlier, the performance of the Key-Value-Predict model does not improve significantly when increasing the attention window size. This leads to the conclusion that none of the attentive models investigated in this paper can utilize a large memory of previous token representations. Moreover, none of the presented methods differ significantly for predicting common nouns and named entities in CBT.
|
| 156 |
+
|
| 157 |
+
$N$ -gram RNN Our main finding is that the simple modification of using output vectors from the previous time steps for the next-word prediction leads to perplexities that are on par with or better than more complicated neural language models with attention. Specifically, the 4-gram RNN achieves only slightly worse perplexities than the Key-Value-Predict architecture.
|
| 158 |
+
|
| 159 |
+
# 6 CONCLUSION
|
| 160 |
+
|
| 161 |
+
In this paper, we observed that using an attention mechanism for neural language modeling where we separate output vectors into a key, value and predict part outperform simpler attention mechanisms on a Wikipedia corpus and the Children Book Test (CBT, Hill et al., 2016). However, we found that all attentive neural language models mainly utilize a memory of only the most recent history and fail to exploit long-range dependencies. In fact, a much simpler $N$ -gram RNN model, which only uses a concatenation of output representations from the previous three time steps, is on par with more sophisticated memory-augmented neural language models. Training neural language models that take long-range dependencies into account seems notoriously hard and needs further investigation. Thus, for future work we want to investigate ways to encourage attending over a longer history, for instance by forcing the model to ignore the local context and only allow attention over output representations further behind the local history.
|
| 162 |
+
|
| 163 |
+
# ACKNOWLEDGMENTS
|
| 164 |
+
|
| 165 |
+
This work was supported by Microsoft Research and the Engineering and Physical Sciences Research Council through PhD Scholarship Programmes, an Allen Distinguished Investigator Award, and a Marie Curie Career Integration Award.
|
| 166 |
+
|
| 167 |
+
# REFERENCES
|
| 168 |
+
|
| 169 |
+
Jimmy Ba, Geoffrey E Hinton, Volodymyr Mnih, Joel Z Leibo, and Catalin Ionescu. Using fast weights to attend to the recent past. In NIPS, pp. 4331–4339, 2016.
|
| 170 |
+
|
| 171 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In ICLR, 2015.
|
| 172 |
+
|
| 173 |
+
Ciprian Chelba, Tomas Mikolov, Mike Schuster, Qi Ge, Thorsten Brants, Phillipp Koehn, and Tony Robinson. One billion word benchmark for measuring progress in statistical language modeling. arXiv preprint arXiv:1312.3005, 2013.
|
| 174 |
+
|
| 175 |
+
Jianpeng Cheng, Li Dong, and Mirella Lapata. Long short-term memory-networks for machine reading. In EMNLP, pp. 551–561, 2016.
|
| 176 |
+
|
| 177 |
+
Jan K Chorowski, Dzmitry Bahdanau, Dmitriy Serdyuk, Kyunghyun Cho, and Yoshua Bengio. Attention-based models for speech recognition. In NIPS, pp. 577–585, 2015.
|
| 178 |
+
|
| 179 |
+
Yiming Cui, Zhipeng Chen, Si Wei, Shijin Wang, Ting Liu, and Guoping Hu. Attention-over-attention neural networks for reading comprehension. arXiv preprint arXiv:1607.04423, 2016a.
|
| 180 |
+
|
| 181 |
+
Yiming Cui, Ting Liu, Zhipeng Chen, Shijin Wang, and Guoping Hu. Consensus attention-based neural networks for chinese reading comprehension. arXiv preprint arXiv:1607.02250, 2016b.
|
| 182 |
+
|
| 183 |
+
Bhuwan Dhingra, Hanxiao Liu, William W Cohen, and Ruslan Salakhutdinov. Gated-attention readers for text comprehension. arXiv preprint arXiv:1606.01549, 2016.
|
| 184 |
+
|
| 185 |
+
Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014.
|
| 186 |
+
|
| 187 |
+
Caglar Gulcehre, Sarath Chandar, Kyunghyun Cho, and Yoshua Bengio. Dynamic neural turing machine with soft and hard addressing schemes. arXiv preprint arXiv:1607.00036, 2016.
|
| 188 |
+
|
| 189 |
+
Felix Hill, Antoine Bordes, Sumit Chopra, and Jason Weston. The goldilocks principle: Reading children’s books with explicit memory representations. In ICLR, 2016.
|
| 190 |
+
|
| 191 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
|
| 192 |
+
|
| 193 |
+
Shihao Ji, SVN Vishwanathan, Nadathur Satish, Michael J Anderson, and Pradeep Dubey. Blackout: Speeding up recurrent neural network language models with very large vocabularies. In ICLR, 2016.
|
| 194 |
+
|
| 195 |
+
Rafal Jozefowicz, Oriol Vinyals, Mike Schuster, Noam Shazeer, and Yonghui Wu. Exploring the limits of language modeling. arXiv preprint arXiv:1602.02410, 2016.
|
| 196 |
+
|
| 197 |
+
Rudolf Kadlec, Martin Schmid, Ondrej Bajgar, and Jan Kleindienst. Text understanding with the attention sum reader network. In ACL, 2016.
|
| 198 |
+
|
| 199 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015.
|
| 200 |
+
|
| 201 |
+
Tomas Mikolov, Martin Karafiat, Lukas Burget, Jan Cernock ´ y, and Sanjeev Khudanpur. Recurrent \` neural network based language model. In Interspeech, volume 2, pp. 3, 2010.
|
| 202 |
+
|
| 203 |
+
Tomas Mikolov, Anoop Deoras, Stefan Kombrink, Lukas Burget, and Jan Cernocky. Empirical \` evaluation and combination of advanced language modeling techniques. In Interspeech, 2011.
|
| 204 |
+
|
| 205 |
+
Alexander Miller, Adam Fisch, Jesse Dodge, Amir-Hossein Karimi, Antoine Bordes, and Jason Weston. Key-value memory networks for directly reading documents. arXiv preprint arXiv:1606.03126, 2016.
|
| 206 |
+
|
| 207 |
+
Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. In ICML, pp. 1310–1318, 2013.
|
| 208 |
+
|
| 209 |
+
Scott Reed and Nando de Freitas. Neural programmer-interpreters. arXiv preprint arXiv:1511.06279, 2015.
|
| 210 |
+
|
| 211 |
+
Tim Rocktaschel, Edward Grefenstette, Karl Moritz Hermann, Tomas Kocisky, and Phil Blunsom. ¨ Reasoning about entailment with neural attention. In ICLR, 2016.
|
| 212 |
+
|
| 213 |
+
David E Rumelhart, Geoffrey E Hinton, and Ronald J Williams. Learning internal representations by error propagation. Technical report, DTIC Document, 1985.
|
| 214 |
+
|
| 215 |
+
Alexander M. Rush, Sumit Chopra, and Jason Weston. A neural attention model for abstractive sentence summarization. In EMNLP, pp. 379–389, 2015.
|
| 216 |
+
|
| 217 |
+
Noam Shazeer, Joris Pelemans, and Ciprian Chelba. Sparse non-negative matrix language modeling for skip-grams. In Interspeech, pp. 1428–1432, 2015.
|
| 218 |
+
|
| 219 |
+
Rohollah Soltani and Hui Jiang. Higher order recurrent neural networks. arXiv preprint arXiv:1605.00064, 2016.
|
| 220 |
+
|
| 221 |
+
Karl Steinbuch and UAW Piske. Learning matrices and their applications. IEEE Transactions on Electronic Computers, pp. 846–862, 1963.
|
| 222 |
+
|
| 223 |
+
Sainbayar Sukhbaatar, Jason Weston, and Rob Fergus. End-to-end memory networks. In NIPS, pp. 2440–2448, 2015.
|
| 224 |
+
WK Taylor. Pattern recognition by means of automatic analogue apparatus. Proceedings of the IEE-Part B: Radio and Electronic Engineering, 106(26):198–209, 1959.
|
| 225 |
+
Ke Tran, Arianna Bisazza, and Christof Monz. Recurrent memory networks for language modeling. In NAACL-HLT, pp. 321–331, 2016.
|
| 226 |
+
Adam Trischler, Zheng Ye, Xingdi Yuan, and Kaheer Suleman. Natural language comprehension with the epireader. arXiv preprint arXiv:1606.02270, 2016.
|
| 227 |
+
Dirk Weissenborn. Separating answers from queries for neural reading comprehension. arXiv preprint arXiv:1607.03316, 2016.
|
| 228 |
+
Paul J Werbos. Backpropagation through time: what it does and how to do it. Proceedings of the IEEE, 78(10):1550–1560, 1990.
|
| 229 |
+
Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. In ICLR, 2015.
|
| 230 |
+
Will Williams, Niranjani Prasad, David Mrva, Tom Ash, and Tony Robinson. Scaling recurrent neural network language models. In 2015 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 5391–5395. IEEE, 2015.
|
| 231 |
+
Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhutdinov, Richard S Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In ICML, 2015.
|
| 232 |
+
Zichao Yang, Phil Blunsom, Chris Dyer, and Wang Ling. Reference-aware language models. arXiv preprint arXiv:1611.01628, 2016.
|
md/train/F8whUO8HNbP/F8whUO8HNbP.md
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CONTRASTIVE SYN-TO-REAL GENERALIZATION
|
| 2 |
+
|
| 3 |
+
Wuyang Chen1∗, Zhiding $\mathbf { Y } \mathbf { u } ^ { 2 \dagger }$ , Shalini De Mello2, Sifei Liu2, Jose M. Alvarez2,
|
| 4 |
+
Zhangyang $\mathbf { W a n g ^ { 1 } }$ , Anima Anandkumar2,3
|
| 5 |
+
1The University of Texas at Austin 2NVIDIA 3California Institute of Technology
|
| 6 |
+
{wuyang.chen,atlaswang}@utexas.edu
|
| 7 |
+
{zhidingy,shalinig,sifeil,josea,aanandkumar}@nvidia.com
|
| 8 |
+
https://github.com/NVlabs/CSG
|
| 9 |
+
|
| 10 |
+
# ABSTRACT
|
| 11 |
+
|
| 12 |
+
Training on synthetic data can be beneficial for label or data-scarce scenarios. However, synthetically trained models often suffer from poor generalization in real domains due to domain gaps. In this work, we make a key observation that the diversity of the learned feature embeddings plays an important role in the generalization performance. To this end, we propose contrastive synthetic-to-real generalization (CSG), a novel framework that leverages the pre-trained ImageNet knowledge to prevent overfitting to the synthetic domain, while promoting the diversity of feature embeddings as an inductive bias to improve generalization. In addition, we enhance the proposed CSG framework with attentional pooling (A-pool) to let the model focus on semantically important regions and further improve its generalization. We demonstrate the effectiveness of CSG on various synthetic training tasks, exhibiting state-of-the-art performance on zero-shot domain generalization.
|
| 13 |
+
|
| 14 |
+
# 1 INTRODUCTION
|
| 15 |
+
|
| 16 |
+
Deep neural networks have pushed the boundaries of many visual recognition tasks. However, their success often hinges on the availability of both training data and labels. Obtaining data and labels can be difficult or expensive in many applications such as semantic segmentation, correspondence, 3D reconstruction, pose estimation, and reinforcement learning. In these cases, learning with synthetic data can greatly benefit the applications since large amounts of data and labels are available at relatively low costs. For this reason, synthetic training has recently gained significant attention (Wu et al., 2015; Richter et al., 2016; Shrivastava et al., 2017; Savva et al., 2019).
|
| 17 |
+
|
| 18 |
+
Despite many benefits, synthetically trained models often have poor generalization on the real domain due to large domain gaps between synthetic and real images. Limitations on simulation and rendering can lead to degraded synthesis quality, such as aliased boundaries, unrealistic textures, fake appearance, over-simplified lighting conditions, and unreasonable scene layouts. These issues result in domain gaps between synthetic and real images, preventing the synthetically trained models from capturing meaningful representations and limiting their generalization ability on real images.
|
| 19 |
+
|
| 20 |
+
To mitigate these issues, domain generalization and adaptation techniques have been proposed (Li et al., 2017; Pan et al., 2018; Yue et al., 2019). Domain adaptation assumes the availability of target data (labeled, partially labeled, or unlabeled) during training. On the other hand, domain generalization considers zero-shot generalization without seeing the target data of real images, and is therefore more challenging. An illustration of the domain generalization protocol on the
|
| 21 |
+
|
| 22 |
+

|
| 23 |
+
Figure 1: An illustration of the domain generalization protocol on the VisDA-17 dataset, where real target domain (test) images are assumed unavailable during model training.
|
| 24 |
+
|
| 25 |
+
VisDA-17 dataset (Peng et al., 2017) is shown in Figure 1. Considering that ImageNet pre-trained representation is widely used as model initialization, recent efforts on domain generalization show that such knowledge can be used to prevent overfitting to the synthetic domain (Chen et al., 2018; 2020c). Specifically, they impose a distillation loss to regularize the distance between the synthetically trained and the ImageNet pre-trained representations, which improves synthetic-to-real generalization.
|
| 26 |
+
|
| 27 |
+
The above approaches still face limitations due to the challenging nature of this problem. Taking a closer look, we observe the following pitfalls in training on synthetic data. First, obtaining photorealistic appearance features at the micro-level, such as texture and illumination, is challenging due to the limits of simulation complexity and rendering granularity. Without special treatment, CNNs tend to be biased towards textures (Geirhos et al., 2019) and suffer from badly learned representations on synthetic data. Second, the common lack of texture and shape variations on synthetic images often leads to collapsed and trivial representations without any diversity. This is unlike training with natural images where models get sufficiently trained by seeing enough variations. Such a lack of diversity in the representation makes the learned models vulnerable to natural variations in the real world.
|
| 28 |
+
|
| 29 |
+
# Summary of contributions and results:
|
| 30 |
+
|
| 31 |
+
• We observe that the diversity of learned feature embedding plays an important role in syntheticto-real generalization. We show an example of collapsed representations learned by a synthetic model, which is in sharp contrast to features learned from real data (Section 2).
|
| 32 |
+
|
| 33 |
+
• Motivated by the above observation, we propose a contrastive synthetic-to-real generalization framework that simultaneously regularizes the synthetically trained representation while promoting the diversity of the learned representation to improve generalization (Section 3.1).
|
| 34 |
+
|
| 35 |
+
• We further enhance the CSG framework with attentional pooling (A-pool) where feature representations are guided by model attention. This allows the model to localize its attention to semantically more important regions, and thus improves synthetic-to-real generalization (Section 3.4).
|
| 36 |
+
|
| 37 |
+
• We benchmark CSG on various synthetic training tasks including image classification (VisDA-17) and semantic segmentation $\mathrm { ( G T A 5 }$ Cityscapes). We show that CSG considerably improves the generalization performance without seeing target data. Our best model reaches $6 4 . 0 5 \%$ accuracy on VisDA-17 compared to previous state-of-the-art (Chen et al., 2020c) with $6 1 . 1 \%$ (Section 4).
|
| 38 |
+
|
| 39 |
+
# 2 A MOTIVATING EXAMPLE
|
| 40 |
+
|
| 41 |
+
We give a motivating example to show the significant differences between the features learned on synthetic and real images. Specifically, we use a ResNet-101 backbone and extract the $l _ { 2 }$ normalized feature embedding after global average pooling (defined as $\bar { \mathbf { \nabla } } \bar { \mathbf { v } }$ ). We consider the following three models: 1) model pre-trained on ImageNet, 2) model trained on VisDA-17 validation set (real images), and 3) model trained on VisDA-17 training set (synthetic images) 1. Both 2) and 3) are initialized with ImageNet pre-training, and fine-tuned on the 12 classes defined in VisDA-17.
|
| 42 |
+
|
| 43 |
+

|
| 44 |
+
Figure 2: Feature diversity on VisDA-17 test images in $\mathbb { R } ^ { 2 }$ with Gaussian kernel density estimation (KDE). Darker areas have more concentrated features. $E _ { s }$ : hyperspherical energy of features, lower the more diverse.
|
| 45 |
+
|
| 46 |
+
Visualization of feature diversity. We visualize the normalized representations on a 2-dim sphere. A Gaussian kernel with bandwidth estimated by Scott’s Rule (Scott, 2015) is applied to estimate the probability density function. Darker areas have more concentrated features, and if the feature space (the 2-dim sphere) is covered by dark areas, it has more diversely placed features. In Figure 2, we can see that the ImageNet pretrained model can widely span the representations on the 2-dim feature space. The model trained on VisDA-17 validation set can also generate diverse features, although slightly affected by the class imbalance. However, when the model is trained on the training set (synthetic images), the features largely collapse to a narrow subspace, i.e., the model fails to fully leverage the whole feature space. This is clear that training on synthetic images can easily introduce poor bias to the model and the collapsed representations will fail to generalize to the real domain.
|
| 47 |
+
|
| 48 |
+
Quantitive measurement of feature diversity. Inspired by (Liu et al., 2018), we also quantitatively measure the diversity of the feature embeddings using the following hyperspherical potential energy:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
E _ { s } \left( \bar { v } _ { i } | _ { i = 1 } ^ { N } \right) = \sum _ { i = 1 } ^ { N } \sum _ { \substack { j = 1 , j \neq i } } ^ { N } e _ { s } \left( \| \bar { v } _ { i } - \bar { v } _ { j } \| \right) = \left\{ \begin{array} { l l } { \sum _ { i \neq j } \| \bar { v } _ { i } - \bar { v } _ { j } \| ^ { - s } , \quad s > 0 } \\ { \sum _ { i \neq j } \log \left( \| \bar { v } _ { i } - \bar { v } _ { j } \| ^ { - 1 } \right) , \quad s = 0 } \end{array} \right.
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
$N$ is the number of examples. The lower the hyperspherical energy (HSE) is, the more diverse the feature vectors will be scattered in the unit sphere. $s$ is the power factor, and we choose $s = 0$ in this example. Three training strategies exhibit energies as 0.2541, 0.3355, 0.4408, respectively. This validates that models trained on real images can capture diverse features, whereas the synthetic training will lead the model to highly collapsed feature space.
|
| 55 |
+
|
| 56 |
+
Remarks. A conclusion can be drawn from the above examples: though assisted with ImageNet initialization, fine-tuning on synthetic images tends to give collapsed features with poor diversity in sharp contrast to training with real images. This indicates that the diversity of learned representation could play an important role in synthetic-to-real generalization.
|
| 57 |
+
|
| 58 |
+
# 3 CONTRASTIVE SYNTHETIC-TO-REAL GENERALIZATION
|
| 59 |
+
|
| 60 |
+
We consider the synthetic-to-real domain generalization problem following the protocols of Chen et al. (2020c). More specifically, the objective is to achieve the best zero-shot generalization on the unseen target domain real images without having access to them during synthetic training.
|
| 61 |
+
|
| 62 |
+
# 3.1 NOTATION AND FRAMEWORK
|
| 63 |
+
|
| 64 |
+
Our design of the model considers the following two aspects with a “push and pull” strategy:
|
| 65 |
+
|
| 66 |
+
Pull: Without access to real images, the ImageNet pre-trained model presents the only source of real domain knowledge that can implicitly guide our training. As a result, we hope to impose some form of similarity between the features obtained by the synthetic model and the ImageNet pre-trained one. This helps to overcome the domain gaps from the unrealistic appearance of synthetic images.
|
| 67 |
+
|
| 68 |
+
Push: Section 2 shows that synthetic training tends to generate collapsed features whereas models trained on natural images give many diverse ones. We treat this as an inductive bias to improve synthetic training, by pushing the feature embeddings away from each other across different images.
|
| 69 |
+
|
| 70 |
+
The above “push and pull” strategy can be exactly formulated with a contrastive loss. This motivates us to propose a contrastive synthetic-to-real generalization framework as partly inspired by recent popular contrastive learning methods (He et al., 2020). Figure 3(b) illustrates our CSG framework. Specifically, we denote the frozen Imagenet pre-trained model as $f _ { e , o }$ and the synthetically trained model $f _ { e }$ , where $f _ { e }$ is supervised by the task loss $\mathcal { L } _ { \boldsymbol { s y n } }$ for the defined downstream task. We denote the input synthetic image as $\pmb { x } ^ { a }$ and treat it as an anchor. We treat the embeddings of $\pmb { x } ^ { a }$ obtained by $f _ { e }$ and $f _ { e , o }$ as anchor and positive embeddings, denoting them as $z ^ { a }$ and $z ^ { + }$ , respectively. Following a typical contrastive approach, we define $K$ negative images $\{ \pmb { x } _ { 1 } ^ { - } , \cdots , \pmb { x } _ { K } ^ { - } \}$ for every anchor $\pmb { x } ^ { a }$ , and denote their corresponding embeddings as $\{ z _ { 1 } ^ { - } , \cdots , z _ { K } ^ { - } \}$ . Similar to the design in (Chen et al., 2020d), we define $h / \widetilde { h } : \mathbb { R } ^ { C } \mathbb { R } ^ { c }$ as the nonlinear projection heads with a two MLP layers and a ReLU layer between them. The CSG framework regularizes $f _ { e }$ in a contrastive manner: pulling $z ^ { a }$ and $z ^ { + }$ to be closer while pushing $z ^ { a }$ and $\{ z _ { 1 } ^ { - } , \cdots , z _ { K } ^ { - } \}$ apart. This regularizes the model by preventing its representation from deviating too far from that of a pre-trained ImageNet model and yet encouraging it to learn task-specific information from the synthetic data.
|
| 71 |
+
|
| 72 |
+

|
| 73 |
+
Figure 3: (a) Previous work (Chen et al., 2018; 2020c) consider “learning without forgetting” which minimizes a distillation loss between a synthetic model and an ImageNet pre-trained one (either on features or model parameters) to avoid catastrophic forgetting. (b) The proposed CSG framework with a “push and pull” strategy.
|
| 74 |
+
|
| 75 |
+
Even though having connections to recent self-supervised contrastive representation learning methods (Oord et al., 2018; Wu et al., 2018; Chen et al., 2020a; He et al., 2020; Chen et al., 2020b; Jiang et al., 2020), our work differs in the following aspects: 1) Self-supervised learning and the addressed task are ill-posed in different manners - the former lacks the constraints from semantic labels, whereas the latter lacks the support of data distribution. 2) As a result, the motivations of contrastive learning are different. Our work is also related to the contrastive distillation framework in (Tian et al., 2020a). Again, the two works differ in both task and motivation despite the converging techniques.
|
| 76 |
+
|
| 77 |
+
# 3.2 AUGMENTATION
|
| 78 |
+
|
| 79 |
+
Augmentation has been an important part of effective contrastive learning. By perturbing or providing different views of the representations, augmentation forces a model to focus more on the mid-level and high-level representations of object parts and structures which are visually more realistic and reliable. To this end, we follow existing popular approaches to create augmentation at different levels:
|
| 80 |
+
|
| 81 |
+
Image augmentation. We consider image-level augmentation using RandAugment (Cubuk et al., 2020) where a single global control factor $M$ is used to control the augmentation magnitude. We denote the transform operators of image-level augmentation as $\tau ( \cdot )$ .
|
| 82 |
+
|
| 83 |
+
Model augmentation. We adopt a mean-teacher (Tarvainen & Valpola, 2017) styled moving average of a model to create different views of feature embeddings. Given an anchor image $\pmb { x } ^ { a }$ and $K$ negative images $\{ \pmb { x } _ { 1 } ^ { - } , \cdots , \pmb { x } _ { K } ^ { - } \}$ , we compute the embeddings as follows:
|
| 84 |
+
|
| 85 |
+
$$
|
| 86 |
+
\begin{array} { r } { z ^ { a } = f _ { e } \circ g \circ h ( \mathcal { T } ( \pmb { x } ^ { a } ) ) , z ^ { + } = f _ { e , o } \circ g \circ \widetilde { h } ( \mathcal { T } ( \pmb { x } ^ { a } ) ) , z _ { k } ^ { - } = f _ { e , o } \circ g \circ \widetilde { h } ( \mathcal { T } ( \pmb { x } _ { k } ^ { - } ) ) , } \end{array}
|
| 87 |
+
$$
|
| 88 |
+
|
| 89 |
+
where $g : \mathbb { R } ^ { C \times h \times w } \mathbb { R } ^ { C }$ is a pooling operator transforming a feature map into a vector. Following (He et al., 2020), we define $\widetilde { h } ( \cdot )$ as an exponential moving average of the $h ( \cdot )$ across different iterations. Such difference in $h ( \cdot )$ and $\widetilde { h } ( \cdot )$ leads to augmented views of embeddings.
|
| 90 |
+
|
| 91 |
+
# 3.3 CONTRASTIVE LOSS
|
| 92 |
+
|
| 93 |
+
We use InfoNCE loss (Wu et al., 2018) to formulate the “push and pull” strategy:
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
{ \mathcal { L } } _ { \mathrm { N C E } } = - \log { \frac { \exp { ( z ^ { a } \cdot z ^ { + } / \tau ) } } { \exp { ( z ^ { a } \cdot z ^ { + } / \tau ) } + \sum _ { z ^ { - } } \exp { ( z ^ { a } \cdot z ^ { - } / \tau ) } } } ,
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
where $\tau = 0 . 0 7$ is a temperature hyper-parameter in our work. Together, we minimize the combination of the synthetic task loss and $\mathcal { L } _ { \mathrm { N C E } }$ during our transfer learning process:
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\mathcal { L } = \mathcal { L } _ { \mathrm { T a s k } } + \lambda \mathcal { L } _ { \mathrm { N C E } }
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
Specifically, $\mathcal { L } _ { \mathrm { T a s k } }$ is the synthetic training task objective. For example, $\mathcal { L } _ { \mathrm { T a s k } }$ is a cross-entropy loss of a vector over the 12 defined classes on VisDA-17, whereas it is a per-pixel dense cross-entropy loss on GTA5. $\lambda$ is a balancing factor controlling the strength of the Contrastive Learning.
|
| 106 |
+
|
| 107 |
+
Multi-layer contrastive learning. We are curious that on which layer(s) should we apply contrastive learning to achieve best generalization. We therefore propose a multi-layer CSG framework with different groups (combinations) of layer, denoted as $\mathcal { G }$ :
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
{ \mathcal { L } } _ { \mathrm { N C E } } = \sum _ { l \in { \mathcal { G } } } { \mathcal { L } } _ { \mathrm { N C E } } ^ { l } = \sum _ { l \in { \mathcal { G } } } - \log { \frac { \exp \left( z ^ { l , a } \cdot z ^ { l , + } / \tau \right) } { \exp \left( z ^ { l , a } \cdot z ^ { l , + } / \tau \right) + \sum _ { z ^ { l , - } } \exp \left( z ^ { l , a } \cdot z ^ { l , - } / \tau \right) } }
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
We conduct an ablation in Section 4.1.2 to study the generalization performance with respect to different $\mathcal { G }$ on ResNet- $1 0 1$ . Note that the non-linear projection heads $\bar { h } ^ { l } ( \cdot ) / \widetilde { h } ^ { l } ( \cdot )$ are layer-specific.
|
| 114 |
+
|
| 115 |
+
Cross-task dense contrastive learning. Semantic segmentation presents a new form of task with per-pixel dense prediction, and the task naturally requires pixel-wise dense supervision $\mathcal { L } _ { \mathrm { T a s k } }$ . Unlike image classification, an image in semantic segmentation could contain rich amounts of objects. We therefore make $\mathcal { L } _ { \mathrm { N C E } }$ spatially denser in semantic segmentation to make it more compatible with the dense task loss $\mathcal { L } _ { \mathrm { T a s k } }$ . Specifically, the NCE losses are applied on cropped feature map patches:
|
| 116 |
+
|
| 117 |
+
$$
|
| 118 |
+
\mathcal { L } _ { \mathrm { N C E } } = \sum _ { l \in \mathcal { G } } \sum _ { i = 1 } ^ { N _ { l } } \mathcal { L } _ { \mathrm { N C E } } ^ { l , i } = \sum _ { l \in \mathcal { G } } \sum _ { i = 1 } ^ { N _ { l } } - \frac { 1 } { N _ { l } } \log \frac { \exp { \left( z _ { i } ^ { l , a } \cdot z _ { i } ^ { l , + } / \tau \right) } } { \exp { \left( z _ { i } ^ { l , a } \cdot z _ { i } ^ { l , + } / \tau \right) } + \sum _ { z _ { i } ^ { l , - } } \exp { \left( z _ { i } ^ { l , a } \cdot z _ { i } ^ { l , - } / \tau \right) } }
|
| 119 |
+
$$
|
| 120 |
+
|
| 121 |
+
where we crop $\pmb { x } ^ { a }$ into local patches $\mathbf { \Delta } \mathbf { x } _ { i } ^ { a }$ with $z _ { i } ^ { a } = f _ { e } \circ g \circ h ( \mathcal { T } ( x _ { i } ^ { a } ) )$ . Similar for ${ \pmb x } ^ { - }$ . In practice, we crop $_ { \textbf { \em x } }$ into $N _ { l } = 8 \times 8 = 6 4$ local patches during segmentation training.
|
| 122 |
+
|
| 123 |
+
# 3.4 A-POOL: ATTENTIONAL POOLING FOR IMPROVED REPRESENTATION
|
| 124 |
+
|
| 125 |
+

|
| 126 |
+
Figure 4: (a) For each input image, A-pool computes an attention matrix $\textbf { \em a }$ based on the inner product between the global average pooled feature vector $\bar { \bf { v } }$ and vector at each position $\mathbf { \delta } _ { v : , i , j }$ $( \bar { \pmb { v } } , \pmb { v } _ { : , i , j } \in \mathbb { R } ^ { C } )$ ). (b) Example of four generated reweighting matrices on different images. Note that the values are defined as the ratio of the attention over uniform weight. The attention is visualized with upsampling to match the input size $2 2 4 \times 2 2 4 )$ ).
|
| 127 |
+
|
| 128 |
+
The purpose of the pooling function $g ( \cdot )$ and the non-linear projection head $h ( \cdot )$ is to project a high dimensional feature map $\textbf { { v } }$ from $\mathbb { R } ^ { C \bar { \times } h \bar { \times } w }$ to a low-dimensional embedding in $\mathbb { R } ^ { c }$ . With the feature pooled by $g ( \cdot )$ being more informative, we could also let the contrastive learning focus on more semantically meaningful representations. Inspired by recent works showing CNN’s capability of localizing salient objects (Zhou et al., 2016; Zhang et al., 2018) with only image-level supervision, we propose an attentional pooling (A-pool) module to improve the quality of the pooled feature.
|
| 129 |
+
|
| 130 |
+
As shown in Figure 4(a), given a feature map $\textbf { { v } }$ we first calculate its global average pooled vector $\begin{array} { r } { \bar { v } = g ( v ) = \frac { \bar { \Gamma } } { h w } [ \sum _ { i , j } \pmb { v } _ { 1 , i , j } ^ { - } , \cdot \cdot , \sum _ { i , j } \pmb { v } _ { C , i , j } ] , i \in [ 1 , h ] , j \in [ 1 , w ] } \end{array}$ , we then define the attention score for each pixel at (i, j) as ai,j = P hv:,i,j ,v¯ii0,j0 hv:,i0,j0 ,v¯i $\begin{array} { r } { \begin{array} { r } { \pmb { a } _ { i , j } = \frac { \langle \pmb { v } _ { : , i , j } , \pmb { \bar { v } } \rangle } { \sum _ { i ^ { \prime } , j ^ { \prime } } \langle \pmb { v } _ { : , i ^ { \prime } , j ^ { \prime } } , \pmb { \bar { v } } \rangle } ( i ^ { \prime } \in [ 1 , h ] , j ^ { \prime } \in [ 1 , w ] ) } \end{array} } \end{array}$ and use this score as the weight term in global pooling. Specifically, we define A-pool operator as $\hat { \pmb v } = g _ { a } ( \pmb v ) =$ $\begin{array} { r } { [ \sum _ { i , j } { \pmb v } _ { 1 , i , j } \cdot { \pmb a } _ { i , j } , \cdot \cdot \cdot , \sum _ { i , j } { \pmb v } _ { C , i , j } \cdot { \pmb a } _ { i , j } ] } \end{array}$ . This attention-weighted pooling procedure can effectively shift the focus of the pooled feature vector to the semantically salient regions, leading to more meaningful contrastive learning. In Figure 4(b), we plot the attention as the ratio of new attention score $^ { a }$ over uniform weights (i.e., the uniform score used in global average pooling as $\scriptstyle { \frac { 1 } { h \times w } }$ . For example, a value 1.5 in Figure 4(b) indicates an attention re of $\textstyle \frac { 1 . 5 } { h \times w } .$ ). Note that if any spatially$f _ { e , o }$ calculated by $f _ { e }$ , since $f _ { e }$ is the one adapted to the source domain with better attention.
|
| 131 |
+
|
| 132 |
+
# 4 EXPERIMENT
|
| 133 |
+
|
| 134 |
+
We follow (Chen et al., 2020c) to evaluate on two popular benchmarks: VisDA-17 COCO (classification) and GTA5 Cityscapes (segmentation). Codes is available at https://github.com/ NVlabs/CSG.
|
| 135 |
+
|
| 136 |
+
# 4.1 IMAGE CLASSIFICATION
|
| 137 |
+
|
| 138 |
+
Dataset. The VisDA-17 dataset (Peng et al., 2017) provides three subsets (domains), each with the same 12 object categories. Among them, the training set (source domain) is collected from synthetic renderings of 3D models under different angles and lighting conditions, whereas the validation set (target domain) contains real images cropped from the Microsoft COCO dataset (Lin et al., 2014).
|
| 139 |
+
|
| 140 |
+
Implementation. For VisDA-17, we choose ImageNet pretrained ResNet-101 (He et al., 2016) as the backbone. We fine-tune the model on the source domain with SGD optimizer of learning rate $1 \times 1 0 ^ { - 4 }$ , weight decay $5 \times 1 0 ^ { - 4 }$ , and momentum 0.9. Batch size is set to 32, and the model is trained for 30 epochs. $\lambda$ for $\mathcal { L } _ { \mathrm { N C E } }$ is set as 0.1.
|
| 141 |
+
|
| 142 |
+
# 4.1.1 MAIN RESULTS
|
| 143 |
+
|
| 144 |
+
We compare with different distillation strategies in Table 1, including feature $l _ { 2 }$ regularization (Chen et al., 2018), parameter $l _ { 2 }$ regularization, importance weighted parameter $l _ { 2 }$ regularization (Zenke et al., 2017), and KL divergence (Chen et al., 2020c). All these approaches try to retain the ImageNet domain knowledge during the synthetic training, without feature diversity being explicitly promoted. One could see, CSG significantly improves generalizaiton performance over these baselines.
|
| 145 |
+
|
| 146 |
+
We also verify that CSG promotes diverse representations, and that the diversity is correlated with generalization performance. To this end, we quantitatively measure the hyperspherical energy defined in Equation 1 on the feature embeddings extracted by different methods. From Table 1, one can see that the baseline suffers from the highest energy, and under different power settings, CSG consistently achieves the lowest energies. Table 1 indicates that a method that achieves lower HSE can better generalize from synthetic to the real domain. This confirms our motivation that forcing the model to capture more diversely scattered features will achieve better generalization performance.
|
| 147 |
+
|
| 148 |
+
Table 1: Generalization performance and hyperspherical energy of the features extracted by different models (lower is better). Dataset: VisDA-17 (Peng et al., 2017) validation set. Model: ResNet-101.
|
| 149 |
+
|
| 150 |
+
<table><tr><td rowspan="2">Model</td><td colspan="3">Power</td><td rowspan="2">Accuracy (%)</td></tr><tr><td>0</td><td>1</td><td>2</td></tr><tr><td>Oracle on ImageNet3</td><td>=</td><td>=</td><td>=</td><td>53.3</td></tr><tr><td>Baseline (vanilla synthetic training)</td><td>0.4245</td><td>1.2500</td><td>1.6028</td><td>49.3</td></tr><tr><td>Weight l2 distance (Kirkpatrick et al., 2017)</td><td>0.4014</td><td>1.2296</td><td>1.5302</td><td>56.4</td></tr><tr><td>Synaptic Intelligence (Zenke et al., 2017)</td><td>0.3958</td><td>1.2261</td><td>1.5216</td><td>57.6</td></tr><tr><td>Feature l2 distance (Chen et al.,2018)</td><td>0.3337</td><td>1.1910</td><td>1.4449</td><td>57.1</td></tr><tr><td>ASG (Chen et al.,2020c)</td><td>0.3251</td><td>1.1840</td><td>1.4229</td><td>61.1</td></tr><tr><td>CSG (Ours)</td><td>0.3188</td><td>1.1806</td><td>1.4177</td><td>64.05</td></tr></table>
|
| 151 |
+
|
| 152 |
+
# 4.1.2 ABLATION STUDY
|
| 153 |
+
|
| 154 |
+
We perform ablation studies (Table 2, 3, 4) on the VisDA-17 image classification benchmark (Peng et al., 2017).
|
| 155 |
+
|
| 156 |
+
Augmentation. We study different magnitudes of RandAugment (Cubuk et al., 2020) in our scenario (Section 3.2), as summarized in Table 2. By tuning the global magnitude control factor $M$ , we observe that too strong augmentations deteriorate generalization (e.g. $M = 1 2 , 1 8 , 2 4 ,$ , while mild augmentation brings limited help $M = 3$ ). A moderate augmentation $M = 6$ ) can improve contrastive learning.
|
| 157 |
+
|
| 158 |
+
Multi-layer Contrastive Learning. Since features from the high-level layers are directly responsible for the downstream classification or other vision tasks, we suspect the last layer in the feature extractor $f _ { e }$ would be the most important. We conduct an ablation study on generalization performance with different layer combinations for multilayer contrastive learning (Section 3.3). From Table 3, one can see that applying $\mathcal { L } _ { \mathrm { N C E } }$ on layer 3 and 4 are most effective. Therefore, in our work we set $\mathcal { G } = \{ 3 , 4 \}$
|
| 159 |
+
|
| 160 |
+

|
| 161 |
+
Figure 5: An illustration of model attention by GradCAM (Selvaraju et al., 2017) on the VisDA-17 validation set.
|
| 162 |
+
|
| 163 |
+
guided pooling (Section 3.4), A-pool can further improve the generalization performance, compared with the vanilla global average pooling (GAP).
|
| 164 |
+
|
| 165 |
+
Table 2: Ablation with $M$ .
|
| 166 |
+
|
| 167 |
+
<table><tr><td>M</td><td>Accuracy</td></tr><tr><td>O (no aug.)</td><td>60.86</td></tr><tr><td>3</td><td>61.36</td></tr><tr><td>6</td><td>62.88</td></tr><tr><td>12</td><td>62.61</td></tr><tr><td>18</td><td>62.00</td></tr></table>
|
| 168 |
+
|
| 169 |
+
Table 3: Ablation with $\mathcal { G }$ .
|
| 170 |
+
|
| 171 |
+
<table><tr><td>Layer Groups G</td><td>Accuracy (%)</td></tr><tr><td>4</td><td>62.88</td></tr><tr><td>3+4</td><td>63.77</td></tr><tr><td>2+3+4</td><td>62.66</td></tr><tr><td>1+2+3+4</td><td>62.30</td></tr></table>
|
| 172 |
+
|
| 173 |
+
Table 4: Ablation w./w.o. A-pool. GAP: global average pooling.
|
| 174 |
+
|
| 175 |
+
<table><tr><td>Pooling</td><td>Accuracy (%)</td></tr><tr><td>GAP</td><td>63.77</td></tr><tr><td>A-pool</td><td>64.05</td></tr></table>
|
| 176 |
+
|
| 177 |
+
# 4.1.3 CSG BENEFITS VISUAL ATTENTION
|
| 178 |
+
|
| 179 |
+
We further show the Grad-CAM3 attention on VisDA-17 validation set (Figure 5). We can see that our CSG framework also contributes to better visual attention on unseen real images.
|
| 180 |
+
|
| 181 |
+
# 4.2 SEMANTIC SEGMENTATION
|
| 182 |
+
|
| 183 |
+
Dataset. GTA5 (Richter et al., 2016) is a vehicle-egocentric image dataset collected in a computer game with pixel-wise semantic labels. It contains 24,966 images with a resolution of $1 0 5 2 \times 1 9 1 4$ There are 19 classes that are compatible with the Cityscapes dataset (Cordts et al., 2016).
|
| 184 |
+
|
| 185 |
+
Cityscapes (Cordts et al., 2016) contains urban street images taken on a vehicle from some European cities. There are 5,000 images with pixel-wise annotations. The images have a resolution of $1 0 2 4 \times 2 0 4 8$ and are labeled into 19 semantic categories.
|
| 186 |
+
|
| 187 |
+
Implementation. We study DeepLabv2 (Chen et al., 2017) with both ResNet-50 and ResNet-101 backbone. The backbones are pre-trained on ImageNet. We also use SGD optimizer, with learning rate as $1 \times 1 0 ^ { - 3 }$ , weight decay as $5 \times 1 0 ^ { - 4 }$ , and momentum are 0.9. Batch size is set to six. We crop the images into patches of $5 1 2 \times 5 1 2$ and train the model with multi-scale augmentation $( 0 . 7 5 \sim 1 . 2 5 )$ and horizontal flipping. The model is trained for 50 epochs, and $\lambda$ for $\mathcal { L } _ { \mathrm { N C E } }$ is set as 75.
|
| 188 |
+
|
| 189 |
+
# 4.2.1 MAIN RESULTS
|
| 190 |
+
|
| 191 |
+
We also evaluate the generalization performance of our CSG on semantic segmentation. In particular, we treat the GTA5 training set as the synthetic source domain and train segmentation models on it. We then treat the Cityscapes validation sets as real target domains, where we directly evaluate the synthetically trained models. We can see that in Table 5, CSG achieves the best performance gain. IBN-Net Pan et al. (2018) improves domain generalization by carefully mix the instance and batch normalization in the backbone, while Yue et al. (2019) transfers the real image styles from ImageNet to synthetic images. However, Yue et al. (2019) requires ImageNet images during synthetic training, and also implicitly leverages ImageNet labels as auxiliary domains.
|
| 192 |
+
|
| 193 |
+
Table 5: Comparison to previous domain generalization methods for segmentation $\mathrm { G T A } 5 $ Cityscapes).
|
| 194 |
+
|
| 195 |
+
<table><tr><td>Methods</td><td>Backbone</td><td>mIoU %</td><td>mIoU↑%</td></tr><tr><td>No Adapt</td><td rowspan="6">ResNet-50</td><td>22.17</td><td rowspan="2">7.47</td></tr><tr><td>IBN-Net (Pan et al.,2018)</td><td>29.64</td></tr><tr><td>No Adapt</td><td>32.45</td><td rowspan="2">4.97</td></tr><tr><td>Yue et al. (Yue et al., 2019)</td><td>37.42</td></tr><tr><td>No Adapt</td><td>25.88</td><td>3.77</td></tr><tr><td>ASG (Chen et al.,2020c) No Adapt</td><td></td><td>29.65</td></tr><tr><td rowspan="2">CSG (ours)</td><td rowspan="6">ResNet-101</td><td>25.88</td><td rowspan="2">9.39</td></tr><tr><td>35.27</td></tr><tr><td>No Adapt</td><td>33.56</td><td>8.97</td></tr><tr><td>Yue et al. (Yue et al.,2019)</td><td>42.53</td><td rowspan="2">3.16</td></tr><tr><td>No Adapt</td><td>29.63</td></tr><tr><td>ASG (Chen et al.,2020c)</td><td>32.79</td><td></td></tr><tr><td>No Adapt CSG (ours)</td><td></td><td>29.63 38.88</td><td>9.25</td></tr></table>
|
| 196 |
+
|
| 197 |
+
# 4.2.2 FEATURE DIVERSITY ON SEGMENTATION WITH BALANCED TRAINING SET
|
| 198 |
+
|
| 199 |
+
We further conduct visualization and quantitative measures of feature diversity on the segmentation task. Similar to section 2, we randomly sample a subset of the GTA5 training set to match the size of the Cityscapes training set. We again have similar observations: models trained on real images have relatively diverse features, and synthetic training leads to collapsed features. Here we get lower $E _ { s }$ than classification since we follow the setting in Eq. 6 to study dense-level features. This leads to a larger total number of features on segmentation than classification.
|
| 200 |
+
|
| 201 |
+

|
| 202 |
+
Figure 6: Feature diversity on Cityscapes test images in $\mathbb { R } ^ { 2 }$ with Gaussian kernel density estimation (KDE). Darker areas have more concentrated features. $E _ { s }$ : hyperspherical energy of features, lower the more diverse.
|
| 203 |
+
|
| 204 |
+
# 4.2.3 VISUAL RESULTS
|
| 205 |
+
|
| 206 |
+
By visualizing the segmentation results (Figure 7), we can see that as our CSG framework achieves better mIoU on unseen real images from the Cityscapes validation set, the model produces segmentation with much higher visual quality. In contrast, the baseline model suffers from much more misclassification.
|
| 207 |
+
|
| 208 |
+
# 5 RELATED WORK
|
| 209 |
+
|
| 210 |
+
Domain generalization considers the problem of generalizing a model to the unseen target domain without leveraging any target domain images (Muandet et al., 2013; Gan et al., 2016). The core challenge is how to close the domain gap and align feature spaces from different domains, without even seeing the target domain’s data. Muandet et al. (2013) proposed to use MMD (Maximum Mean Discrepancy) to align the distributions from different source domains and train their network with adversarial learning. Li et al. (2017) built separate networks for each source domain and used shared parameters for testing. By using a meta-learning approach on split training sets, Li et al. (2018) further improved generalization performance. Instance Normalization and Batch Normalization are carefully integrated into the backbone network by Pan et al. (2018) to boost network generalization. Differently, Yue et al. (2019) proposed to transfer information from the real domain as image styles to synthetic images. Most recently, (Chen et al., 2020c) formulated domain generalization as a life-long learning problem (Li & Hoiem, 2017), and try to avoid the catastrophic forgetting about the ImageNet pre-trained weights and to retain real-domain knowledge during transfer learning.
|
| 211 |
+
|
| 212 |
+

|
| 213 |
+
Figure 7: Generalization results on $\mathrm { G T A } 5 $ Cityscapes. Rows correspond to sample images in Cityscapes validation set. From left to right, columns correspond to original images, ground truth, predication results of baseline (DeepLabv2-ResNet50 Chen et al. (2017)), and prediction by model trained with our CSG framework.
|
| 214 |
+
|
| 215 |
+
Contrastive learning. Noise contrastive estimation loss (Wu et al., 2018) recently becomes a predominant design choice for self-supervised contrastive representation learning (Hjelm et al., 2018; Oord et al., 2018; Henaff et al. ´ , 2019; Tian et al., 2019; He et al., 2020; Misra & Maaten, 2020; Chen et al., 2020a). Studies show that self-supervised models can serve as powerful initializations for downstream tasks, even outperforming supervised pre-training on several. Besides engineering improvements, key factors towards better contrastive learning include employing large numbers of negative examples and designing more semantically meaningful augmentations to create different views of images. This leads to both maximize the mutual information between two views of the same instance and pushing examples from different instances apart (Tian et al., 2020b). As also observed by Wang & Isola (2020), contrastive learning tends to align the features belonging to the same instance, while scattering the normalized learned features on a hypersphere. However, most work focus on the representation learning for a real-to-real transfer learning setting where the main focus is to improve the performance of the downstream tasks. While having connections to these methods, our work pursues a different task with different motivations despite the converging techniques.
|
| 216 |
+
|
| 217 |
+
# 6 CONCLUSIONS
|
| 218 |
+
|
| 219 |
+
Motivated by the observation that models trained on synthetic images tend to generate collapsed feature representation, we make a hypothesis that the diversity of feature representation plays an important role in generalization performance. Taking this as an inductive bias, we propose a contrastive synthetic-to-real generalization framework that simultaneously regularizes the synthetically trained representations while promoting the diversity of the features to improve generalization. Experiments on VisDA-17 validate our hypothesis, showing that the diversity of features correlates with generalization performance across different models. Together with the multi-scale contrastive learning and attention-guided pooling strategy, the proposed framework outperforms previous state-of-the-arts on VisDA-17 with sizable gains, while giving competitive performance and the largest relative improvements on GTA5 Cityscapes without bells and whistles.
|
| 220 |
+
|
| 221 |
+
# REFERENCES
|
| 222 |
+
|
| 223 |
+
Liang-Chieh Chen, George Papandreou, Florian Schroff, and Hartwig Adam. Rethinking atrous convolution for semantic image segmentation. arXiv preprint arXiv:1706.05587, 2017. 7, 9
|
| 224 |
+
|
| 225 |
+
Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. arXiv preprint arXiv:2002.05709, 2020a. 4, 9
|
| 226 |
+
|
| 227 |
+
Ting Chen, Simon Kornblith, Kevin Swersky, Mohammad Norouzi, and Geoffrey Hinton. Big self-supervised models are strong semi-supervised learners. arXiv preprint arXiv:2006.10029, 2020b. 4
|
| 228 |
+
|
| 229 |
+
Wuyang Chen, Zhiding Yu, Zhangyang Wang, and Animashree Anandkumar. Automated syntheticto-real generalization. In International Conference on Machine Learning, pp. 1746–1756. PMLR, 2020c. 2, 3, 4, 6, 8, 9
|
| 230 |
+
|
| 231 |
+
Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020d. 3
|
| 232 |
+
|
| 233 |
+
Yuhua Chen, Wen Li, and Luc Van Gool. Road: Reality oriented adaptation for semantic segmentation of urban scenes. In CVPR, 2018. 2, 4, 6
|
| 234 |
+
|
| 235 |
+
Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In CVPR, 2016. 7
|
| 236 |
+
|
| 237 |
+
Ekin D Cubuk, Barret Zoph, Jonathon Shlens, and Quoc V Le. Randaugment: Practical automated data augmentation with a reduced search space. In CVPR Workshops, 2020. 4, 6
|
| 238 |
+
|
| 239 |
+
Chuang Gan, Tianbao Yang, and Boqing Gong. Learning attributes equals multi-source domain generalization. In CVPR, 2016. 8
|
| 240 |
+
|
| 241 |
+
Robert Geirhos, Patricia Rubisch, Claudio Michaelis, Matthias Bethge, Felix A Wichmann, and Wieland Brendel. Imagenet-trained cnns are biased towards texture; increasing shape bias improves accuracy and robustness. In ICLR, 2019. 2
|
| 242 |
+
|
| 243 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 5, 6
|
| 244 |
+
|
| 245 |
+
Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, 2020. 3, 4, 9
|
| 246 |
+
|
| 247 |
+
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. 9
|
| 248 |
+
|
| 249 |
+
R Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Phil Bachman, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. arXiv preprint arXiv:1808.06670, 2018. 9
|
| 250 |
+
|
| 251 |
+
Ziyu Jiang, Tianlong Chen, Ting Chen, and Zhangyang Wang. Robust pre-training by adversarial contrastive learning. arXiv preprint arXiv:2010.13337, 2020. 4
|
| 252 |
+
|
| 253 |
+
James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. Overcoming catastrophic forgetting in neural networks. Proceedings of the national academy of sciences, 114 (13):3521–3526, 2017. 6
|
| 254 |
+
|
| 255 |
+
Da Li, Yongxin Yang, Yi-Zhe Song, and Timothy M Hospedales. Deeper, broader and artier domain generalization. In ICCV, 2017. 1, 9
|
| 256 |
+
|
| 257 |
+
Da Li, Yongxin Yang, Yi-Zhe Song, and Timothy M Hospedales. Learning to generalize: Metalearning for domain generalization. In AAAI, 2018. 9
|
| 258 |
+
|
| 259 |
+
Zhizhong Li and Derek Hoiem. Learning without forgetting. IEEE Trans. PAMI, 40(12):2935–2947, 2017. 9
|
| 260 |
+
|
| 261 |
+
Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ´ ECCV, 2014. 6
|
| 262 |
+
|
| 263 |
+
Weiyang Liu, Rongmei Lin, Zhen Liu, Lixin Liu, Zhiding Yu, Bo Dai, and Le Song. Learning towards minimum hyperspherical energy. In NeurIPS, 2018. 3
|
| 264 |
+
|
| 265 |
+
Ishan Misra and Laurens van der Maaten. Self-supervised learning of pretext-invariant representations. In CVPR, 2020. 9
|
| 266 |
+
|
| 267 |
+
Krikamol Muandet, David Balduzzi, and Bernhard Scholkopf. Domain generalization via invariant ¨ feature representation. In ICML, 2013. 8
|
| 268 |
+
|
| 269 |
+
Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018. 4, 9
|
| 270 |
+
|
| 271 |
+
Xingang Pan, Ping Luo, Jianping Shi, and Xiaoou Tang. Two at once: Enhancing learning and generalization capacities via ibn-net. In ECCV, 2018. 1, 7, 8, 9
|
| 272 |
+
|
| 273 |
+
Xingchao Peng, Ben Usman, Neela Kaushik, Judy Hoffman, Dequan Wang, and Kate Saenko. VisDA: The visual domain adaptation challenge. arXiv preprint arXiv:1710.06924, 2017. 2, 6
|
| 274 |
+
|
| 275 |
+
Stephan R Richter, Vibhav Vineet, Stefan Roth, and Vladlen Koltun. Playing for data: Ground truth from computer games. In ECCV, 2016. 1, 7
|
| 276 |
+
|
| 277 |
+
Manolis Savva, Abhishek Kadian, Oleksandr Maksymets, Yili Zhao, Erik Wijmans, Bhavana Jain, Julian Straub, Jia Liu, Vladlen Koltun, Jitendra Malik, et al. Habitat: A platform for embodied ai research. In ICCV, 2019. 1
|
| 278 |
+
|
| 279 |
+
David W Scott. Multivariate density estimation: theory, practice, and visualization. John Wiley & Sons, 2015. 3
|
| 280 |
+
|
| 281 |
+
Ramprasaath R Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Grad-cam: Visual explanations from deep networks via gradient-based localization. In Proceedings of the IEEE international conference on computer vision, pp. 618–626, 2017. 7
|
| 282 |
+
|
| 283 |
+
Ashish Shrivastava, Tomas Pfister, Oncel Tuzel, Joshua Susskind, Wenda Wang, and Russell Webb. Learning from simulated and unsupervised images through adversarial training. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2107–2116, 2017. 1
|
| 284 |
+
|
| 285 |
+
Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In NeurIPS, 2017. 4
|
| 286 |
+
|
| 287 |
+
Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. arXiv preprint arXiv:1906.05849, 2019. 9
|
| 288 |
+
|
| 289 |
+
Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive representation distillation. In ICLR, 2020a. 4
|
| 290 |
+
|
| 291 |
+
Yonglong Tian, Chen Sun, Ben Poole, Dilip Krishnan, Cordelia Schmid, and Phillip Isola. What makes for good views for contrastive learning. NeurIPS, 2020b. 9
|
| 292 |
+
|
| 293 |
+
Tongzhou Wang and Phillip Isola. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. arXiv preprint arXiv:2005.10242, 2020. 9
|
| 294 |
+
|
| 295 |
+
Zhirong Wu, Shuran Song, Aditya Khosla, Fisher Yu, Linguang Zhang, Xiaoou Tang, and Jianxiong Xiao. 3d shapenets: A deep representation for volumetric shapes. In CVPR, 2015. 1
|
| 296 |
+
|
| 297 |
+
Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In CVPR, 2018. 4, 9
|
| 298 |
+
|
| 299 |
+
Xiangyu Yue, Yang Zhang, Sicheng Zhao, Alberto Sangiovanni-Vincentelli, Kurt Keutzer, and Boqing Gong. Domain randomization and pyramid consistency: Simulation-to-real generalization without accessing target domain data. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2100–2110, 2019. 1, 7, 8, 9
|
| 300 |
+
|
| 301 |
+
Friedemann Zenke, Ben Poole, and Surya Ganguli. Continual learning through synaptic intelligence. In ICML, 2017. 6
|
| 302 |
+
|
| 303 |
+
Xiaolin Zhang, Yunchao Wei, Guoliang Kang, Yi Yang, and Thomas Huang. Self-produced guidance for weakly-supervised object localization. In ECCV, 2018. 5
|
| 304 |
+
|
| 305 |
+
Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Learning deep features for discriminative localization. In CVPR, 2016. 5
|
md/train/HJNJws0cF7/HJNJws0cF7.md
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CONVOLUTIONAL NEURAL NETWORKS COMBINED WITH RUNGE-KUTTA METHODS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
A convolutional neural network for image classification can be constructed mathematically since it can be regarded as a multi-period dynamical system. In this paper, a novel approach is proposed to construct network models from the dynamical systems view. Since a pre-activation residual network can be deemed an approximation of a time-dependent dynamical system using the forward Euler method, higher order Runge-Kutta methods (RK methods) can be utilized to build network models in order to achieve higher accuracy. The model constructed in such a way is referred to as the Runge-Kutta Convolutional Neural Network (RKNet). RK methods also provide an interpretation of Dense Convolutional Networks (DenseNets) and Convolutional Neural Networks with Alternately Updated Clique (CliqueNets) from the dynamical systems view. The proposed methods are evaluated on benchmark datasets: CIFAR-10/100, SVHN and ImageNet. The experimental results are consistent with the theoretical properties of RK methods and support the dynamical systems interpretation. Moreover, the experimental results show that the RKNets are superior to the state-of-the-art network models on CIFAR-10 and on par on CIFAR-100, SVHN and ImageNet.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Residual Networks (ResNets) which are feed-forward network models with skip connections have achieved great success on several vision benchmarks (He et al., 2016a). Recently, researchers have studied the relation between ResNets and dynamical systems (Liao & Poggio, 2016; E, 2017; Haber et al., 2017; Chang et al., 2018a;b; Lu et al., 2018). Forward Euler method, a first-order RK method, has been employed to explain ResNets with full pre-activation (He et al., 2016b) from the dynamical systems view (Haber et al., 2017; Chang et al., 2018b). Nevertheless, there is no firm evidence to prove that the residual block is just forward Euler method but not any other RK method. We regard the residual mapping as an approximation to the increment in a time-step. The accuracy of the approximation is determined by the structure of the convolutional network. Wide residual network (WRN) (Zagoruyko & Komodakis, 2016) has been proposed to improve the ability of the convolutional subnetwork. However, it is not very efficient only to widen the subnetwork. The new explanation of pre-activation ResNet and its variants which focus on improving residual mapping is one of our contributions.
|
| 12 |
+
|
| 13 |
+
In addition, some improvements on network architecture based on ordinary differential equations (ODEs) are proposed (Chang et al., 2018a; Lu et al., 2018; Chen et al., 2018). Under the assumption that pre-activation ResNet is forward Euler method, Chang et al. (2018a); Lu et al. (2018) use special linear multi-step methods (LM methods) with low order to construct the network. Chen et al. (2018) utilize a third-party package which offers numerical ODE methods to replace residual block. There is no efficient network architecture for systematic generalization to high order till now. Nevertheless, a higher-order method can achieve a lower truncation error. Since a lower truncation error likely leads to a high accuracy, it is necessary to study an efficient network architecture with a high order.
|
| 14 |
+
|
| 15 |
+
If the process of image classification is deemed a sequence of time-dependent dynamical systems, there should be a series of ODEs to describe these systems. RK methods are widely-used procedures to solve ODEs in numerical analysis (Butcher, 2008). They are also the building blocks of highorder LM methods. Consequently, these methods can be used to build network models for visual processing.
|
| 16 |
+
|
| 17 |
+
The neural network community has long been aware of the numerical methods for dynamical systems. Runge-Kutta Neural Network (RKNN) is proposed for identification of unknown dynamical systems in high accuracy (Wang & Lin, 1998), but it has not been used to model the visual system nor been extended to convolutional networks. Moreover, RKNNs adopt a specific RK methods by indicating every coefficient for the RK methods. Thus, it is hard to apply high order RK methods in RKNNs. In addition, the time-step size need to be prespecified. Hence, RKNN cannot be used in tasks where the total time is unknown such as image classification. In contrast, we learn all the coefficients and time-step sizes implicitly by training in order to avoid these difficulties. As a result, one of the major contributions of the paper is a novel and effective neural network architecture inspired by the RK methods.
|
| 18 |
+
|
| 19 |
+
In order to apply RK methods to the image classification problem, the following assumptions are made throughout the paper. Firstly, the image classification procedure is multi-period and there are transitions between adjacent periods. Secondly, each period is modeled by a time-dependent firstorder dynamical system. Based on these assumptions, a novel network model called the RKNet is proposed.
|
| 20 |
+
|
| 21 |
+
In an RKNet, a period is composed of iterations of time-steps. A particular RK method is adopted throughout the time-steps in a period to approximate the increment in each step. The increment in each step is broken down to the increments in several stages according to the adopted RK method. Each stage is approximated by a convolutional subnetwork due to the versatility of neural networks on approximation.
|
| 22 |
+
|
| 23 |
+
Another contribution of this paper is a theoretical interpretation of DenseNets and CliqueNets from the dynamical systems view. The dense connections in DenseNet resemble the relationship among increments in the stages in explicit RK methods (ERK methods). Similarly, the clique blocks in CliqueNets resemble the relationship among increments in the stages in implicit RK methods (IRK methods). Under some conditions, DenseNets and CliqueNets can be formulated as approximating dynamical systems using multi-stage RK methods. We also propose a method to convert a DenseNet to an explicit RKNet (ERKNet) and a method convert a CliqueNet to an implicit RKNet (IRKNet). Furthermore, DenseNets and CliqueNets have only one time-step in each period, whereas RKNets are more general and can have multiple time-steps in each period.
|
| 24 |
+
|
| 25 |
+
We evaluate the performance of RKNets on benchmark datasets including CIFAR-10, CIFAR100 (Krizhevsky, 2009), SVHN (Netzer et al., 2011) and ILSVRC2012 classification dataset (Russakovsky et al., 2015). Experimental results show that both ERKNets and IRKNets conform to the mathematical properties. Additionally, RKNets achieve higher accuracy than the state-of-the-art network models on CIFAR-10 and comparable accuracy on CIFAR-100, SVHN and ImageNet.
|
| 26 |
+
|
| 27 |
+
The rest of the paper is organized as follows. The related work is reviewed in Section 2. The architecture of RKNets, the dynamical systems interpretation of DenseNets and CliqueNets, and the conversion from them to RKNets are described in Section 3. The performance of RKNets is evaluated in Section 4. The conclusion and future work is described in Section 5.
|
| 28 |
+
|
| 29 |
+
# 2 RELATED WORK
|
| 30 |
+
|
| 31 |
+
ResNets have gained much attention over the past few years since they have obtained impressive performance on many challenging image tasks, such as ImageNet (Russakovsky et al., 2015) and COCO object detection (Lin et al., 2014). ResNets are deep feed-forward networks with the shortcuts as identity mappings. ResNets with pre-activation can be regarded as an unfolded shallow RNN, which implements a discrete dynamical system (Liao & Poggio, 2016). It provides a novel point of view for explaining pre-activation ResNets from dynamical systems view.
|
| 32 |
+
|
| 33 |
+
Recently, more work has emerged to connect dynamical systems with deep neural networks (E, 2017) or ResNets in particular (Haber et al., 2017; Chang et al., 2018a;b; Li et al., 2018; Long et al., 2018; Lu et al., 2018; Wang et al., 2018; Chen et al., 2018). E (2017) proposes to use continuous dynamical systems as a tool for machine learning. Chang et al. (2018a) propose three reversible architectures based on ResNets and ODE systems. Chang et al. (2018b) propose a novel method for accelerating ResNets training based on the interpretation of ResNets from dynamical systems view (Haber et al., 2017). Li et al. (2018) present a training algorithm which can be used in the context of ResNets. Lu et al. (2018) propose a 2-step architecture based on ResNets. In addition, research combining dynamical system identification and RK methods with neural networks for scientific computing has emerged recently (Raissi et al., 2017a;b; Raissi, 2018), introducing physics informed neural networks with automatic differentiation. Chen et al. (2018) utilize a third-party package which offers some numerical methods to compute the numerical solution in each time-step.
|
| 34 |
+
|
| 35 |
+
DenseNets (Huang et al., 2017) are the state-of-the-art network models after ResNets. The dense connection is the main difference from the previous models. There are direct connections from a layer to all subsequent layers in a dense block in order to allow better information and gradient flow. There is no interpretation of DenseNets from dynamical systems view yet. CliqueNets (Yang et al., 2018) are the state-of-the-art network models based on DenseNets. They adopt the alternately updated clique blocks to incorporate both forward and backward connections between any two layers in the same block. However, there is no interpretation of CliqueNets from dynamical systems view yet.
|
| 36 |
+
|
| 37 |
+
Given that the process of image classification is regarded as a sequence of time-dependent dynamical systems, there should be a set of ODEs that describes these systems. Consequently, mathematical tools could be employed to construct network models. RK methods are commonly used to solve ODEs in numerical analysis (Butcher, 2008). Higher order RK methods can achieve lower truncation error. Moreover, these methods are usually the building blocks of high-order LM methods. Therefore, RK methods are ideal tools to construct network models from dynamical systems view.
|
| 38 |
+
|
| 39 |
+
RK methods have been adopted to construct neural networks, which are known as RKNN, for identification of unknown dynamical systems described by ODEs (Wang & Lin, 1998). In that paper, neural networks are classified into two categories: (1) a network that directly learns the state trajectory of a dynamical system is called a direct-mapping neural network (DMNN); (2) a network that learns the rate of change of system states is called a RKNN. Hence, AlexNet (Krizhevsky et al., 2012), VGGNet (Simonyan & Zisserman, 2015), GoogLeNet (Szegedy et al., 2015) and ResNet (He et al., 2016a) all belong to DMNNs. Specifically, the original ResNet (He et al., 2016a) is a DMNN because of the ReLU layer after the addition operation. As a result, the ResNet building block learns the state trajectory directly, not the rate of change of the system states. On the contrary, a ResNet with pre-activation (He et al., 2016b) is an RKNN.
|
| 40 |
+
|
| 41 |
+
RKNNs are proposed to eliminate several drawbacks of DMNNs, such as the difficulty in obtaining high accuracy for the multi-step prediction of state trajectories. It has been shown theoretically and experimentally that the RKNN has higher prediction accuracy and better generalization capability than the conventional DMNN (Wang & Lin, 1998).
|
| 42 |
+
|
| 43 |
+
Therefore, it is reasonable to believe that RK methods can be adopted to design effective network architectures for image classification problems. Additionally, the RK methods might improve the performance of image classification since the convolutional subnetworks are able to approximate the rate of change of the dynamical system states more precisely.
|
| 44 |
+
|
| 45 |
+
# 3 RKNETS
|
| 46 |
+
|
| 47 |
+
The introduction to RK methods are in Section 3.1. We describe the overall structure of RKNet in Section 3.2. The structure of subnetwork for increment in each time-step is elaborated on in Section 3.3.
|
| 48 |
+
|
| 49 |
+
# 3.1 RUNGE-KUTTA METHODS
|
| 50 |
+
|
| 51 |
+
An initial value problem for a time-dependent first-order dynamical system can be described by the following ODE (Butcher, 2008):
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
{ \frac { d { \pmb y } } { d t } } = f \left( t , \pmb y ( t ) \right) , \qquad \pmb y \left( t _ { 0 } \right) = \pmb y _ { 0 } .
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
where $\textbf { { y } }$ is a vector representing the system state. The dimension of $\textbf { { y } }$ should be equal to the dimension of the dynamical system. The ODE represents the rate of change of the system states. The rate of change is a function of time and the current system state. RK methods utilize the rate of change calculated from the ODE to approximate the increment in each time-step, and then obtain the predicted final state at the end of each step. RK methods are numerical methods originated from
|
| 58 |
+
|
| 59 |
+

|
| 60 |
+
Figure 1: Architecture of a 3-period RKNet. $\pmb { y } ^ { ( d ) }$ denotes the system state of period $d$ . $\pmb { y } _ { 0 } ^ { ( d ) }$ is the initial state of period $d$ . ${ \pmb y } _ { r } ^ { ( d ) }$ is the final state after $r$ time-steps in period $d , r$ is the total number of time-steps in a period. It can vary in different periods. Period 1 and time-step 1 in it are unfolded as an example. System state changes throughout a period. The final state of a step is estimated as the initial state of this step adding an increment. This operation originates from RK methods. To approximate the increment is the key point in RKNet. The dotted lines are for multiscale feature strategy.
|
| 61 |
+
|
| 62 |
+
Euler method. There are two types of RK methods: explicit and implicit. Both of them are employed in the RKNet. The family of RK methods is given by the following equations (Sli & Mayers, 2003):
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
{ \pmb y } _ { n + 1 } = { \pmb y } _ { n } + h \sum _ { i = 1 } ^ { s } b _ { i } { \pmb z } _ { i } , \qquad t _ { n + 1 } = t _ { n } + h ,
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
where
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
z _ { i } = f \left( t _ { n } + c _ { i } h , \ y _ { n } + h \sum _ { j = 1 } ^ { s } a _ { i j } z _ { j } \right) , \qquad 1 \leq i \leq s .
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
In equation 2, ${ \mathbf { } } ^ { \pmb { y } _ { n + 1 } }$ is an approximation of the solution to equation 1 at time $t _ { n + 1 }$ , i.e. $\boldsymbol { y } ( t _ { n + 1 } )$ ; $\scriptstyle { \mathbf { 3 0 } }$ is the input initial value; $\begin{array} { r } { h \sum _ { i = 1 } ^ { \bar { s } } b _ { i } z _ { i } } \end{array}$ is the increment of system state $\textbf { { y } }$ from $t _ { n }$ to $t _ { n + 1 }$ ; $\textstyle \sum _ { i = 1 } ^ { s } b _ { i } z _ { i }$ is the estimated slope which is the weighted average of the slopes $z _ { i }$ computed in different stages. The positive integer $s$ is the number of $z _ { i }$ , i.e. the number of stages of the RK method. The equation 3 is the general formula of $z _ { i }$ . $h$ is the time-step size which can be adaptive for different time-steps but must be fixed across stages within a time-step.
|
| 75 |
+
|
| 76 |
+
In numerical analysis, $s$ , $a _ { i j }$ , $b _ { i }$ and $c _ { i }$ in equation 2 and equation 3 need to be prespecified for a particular RK method. These coefficients are displayed in a Butcher tableau. The ERK methods are those methods with $a _ { i j } = 0$ when $1 \leq i \leq j \leq s$ . All the RK methods other than ERK methods are IRK methods. The algebraic relationships of the coefficients have to meet the order conditions to reach the highest possible order. Different RK methods have different truncation errors which are denoted by the order: an order $p$ indicates that the local truncation error is $O ( h ^ { p + 1 } )$ . If a $s$ -stage ERK method has order $p$ , then $s \geq p$ ; if $p \geq 5$ , then $s > p$ (Butcher, 2008). Furthermore, a $s$ -stage IRK method can has order $p = 2 s$ when its coefficients are chosen under some conditions (Butcher, 2008). Therefore, more stages may achieve higher orders, i.e. lower truncation errors. The Euler method is a one-stage first-order RK method with $b _ { 1 } = 1$ and $c _ { 1 } = 0$ . In other words, high-order RK methods can be expected to achieve lower truncation errors than Euler method. Thus, the goal of our proposed RKNets is to improve the classification accuracy by taking advantage of high-order RK methods.
|
| 77 |
+
|
| 78 |
+
It is necessary to specify $h$ in order to control the error of approximation in common numerical analysis. The varying time-step size can be adaptive to the regions with different rates of change. The truncation error is lower when the $h$ is smaller.
|
| 79 |
+
|
| 80 |
+
# 3.2 FROM RK METHODS TO RKNETS
|
| 81 |
+
|
| 82 |
+
There are three components of RKNets: the preprocessor, the multi-periods and the postprocessor. The preprocessor manipulates the raw images and passes the results to the first period. The postprocessor deals with the output from the last period or all the periods while adopting multiscale feature strategy (Yang et al., 2018). Then, it passes the result to the classifier to make a decision. The periods between those two components are divided by the transition layers. These periods can be modeled by time-dependent dynamical systems. Each period of an RKNet is divided into $r$ timesteps as shown in Figure 1. RK methods approximate the final state of every time-step using the rate of change of the system state. Some guiding principles when applying RK methods to RKNets are listed as follows.
|
| 83 |
+
|
| 84 |
+
Firstly, dimensionality reduction is often carried out to simplify the system identification issue, when the dimension of real dynamical system is too high. The dimension of $\textbf { { y } }$ in each period in RKNet is predefined as the multiplication of the size of feature map and the number of channels at the beginning of a period. The dimensions of $\textbf { { y } }$ in the same periods of different RKNets can be different due to various degrees of dimensionality reduction. Nevertheless, the dimension of $\textbf { { y } }$ is consistent within a period.
|
| 85 |
+
|
| 86 |
+
Secondly, given that there is no explicit ODE for image classification, a convolutional subnetwork is employed to approximate the increment in each time-step. The number of neurons in each hidden layer can be more than the dimension of $\textbf { { y } }$ .
|
| 87 |
+
|
| 88 |
+
Thirdly, the number of stages $s$ in each period is predefined in RKNet but the other coefficients, $a _ { i j }$ $b _ { i }$ and $c _ { i }$ in equation 2 and equation 3 are learned by training. Due to the order conditions (Butcher, 2008), the relationship among the coefficients are more important than the specific value of any individual coefficient. Hence, the coefficients are learned implicitly but not as explicit parameters. The optimal relationship among the coefficients with a highest possible order is obtained after training.
|
| 89 |
+
|
| 90 |
+
Lastly, the number of time-steps $r$ in each period is predefined in RKNet, but the step size $h$ is learned by training. $n$ in equation 2 and equation 3 is limited to the range $[ 0 , r )$ . The learned $h$ is thus considered adaptive. In theory, the adaptive time-step size can achieve higher accuracy.
|
| 91 |
+
|
| 92 |
+
A variety of RK methods can be adopted in the different periods of RKNets, but the same RK method is used for all time-steps within one period in an RKNet. The network models are named after the specific method in each period, such as RKNet- $3 \times 2 . 4 \times 1 . 2 \times 5 . 1 \times 1$ . The suffix in the name of an RKNet is composed of several $s \times r$ terms; each stands for the method in corresponding period. The number of such terms equals the total number of periods. $s$ or $r$ can vary in different periods. For example, RKNet- $\cdot 3 { \times } 2 . 4 { \times } 1 . 2 { \times } 5 . 1 { \times } 1$ has four periods: period one has 2 time-steps and each step has 3 stages; period two has 1 time-step and it has 4 stages; period three has 5 time-steps and each step has 2 stages; period four has 1 time-step and it has 1 stage. We use this notation throughout this paper. In addition, ERKNets only adopt ERK methods and IRKNets only adopt IRK methods.
|
| 93 |
+
|
| 94 |
+
Given an RKNet model, $s$ and $r$ can be modified to construct more variants with the same dimensions in the corresponding periods. In other words, $s$ and $r$ control depth of the network while dimensionality reduction controls the width of the network. More stages, more time-steps and larger dimensions usually lead to higher classification accuracy. However, the complexity of an ODE increases with the increase of dimensions. As a result, the convolutional subnetwork which approximates the increment in a time-step need be more complex for larger dimensions. Hence, the accuracy is also associated with the matching degree of the dimension and the convolutional subnetwork. The unmatched high-dimensional network model may have lower accuracy. Additionally, the training method might affect the classification accuracy too.
|
| 95 |
+
|
| 96 |
+
# 3.3 ERKNETS AND IRKNETS
|
| 97 |
+
|
| 98 |
+
In this section, we introduce the architecture of RKNets. As shown in equation 2, the sum of $h b _ { i } z _ { i }$ represents the increment in a time-step. It is crucial to approximate this increment in RKNet. For
|
| 99 |
+
|
| 100 |
+

|
| 101 |
+
Figure 2: Architecture of one time-step in ERKNet using an $s$ -stage ERK method. ${ \bf { { y } } } _ { n }$ is the approximation of $\pmb { y } ( t _ { n } )$ . A dense block grows every $m$ times at a growth rate of $k$ to form a convolutional subnetwork for generating each $h b _ { i } z _ { i }$ . Here, $h$ is time-step size, $b _ { i }$ is coefficient of ERK method, and $z _ { i }$ is the slope of each stage in ERK method. The total number of growth is $m s$ in a dense block in order to generate $h b _ { i } z _ { i }$ for $i = 1$ , . . . , $s$ . An explicit summation layer is added after a dense block to complete a time-step.
|
| 102 |
+
|
| 103 |
+
the purpose of constructing an RKNet, it is necessary to hide the time-step size and the coefficients in RK methods. $h b _ { i } z _ { i }$ can be described as follows according to equation 3:
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
\begin{array} { l } { { \displaystyle h b _ { i } z _ { i } = h b _ { i } f \left( t _ { n } + c _ { i } h , ~ y _ { n } + h \sum _ { j = 1 } ^ { s } a _ { i j } z _ { j } \right) } } \\ { { \displaystyle ~ = g _ { i } \left( y _ { n } + h \sum _ { j = 1 } ^ { s } a _ { i j } z _ { j } \right) } } \\ { { \displaystyle ~ = F _ { i } \left( y _ { n } , ~ h a _ { i 1 } z _ { 1 } , ~ . . . , ~ h a _ { i s } z _ { s } \right) . } } \end{array}
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
The above transformation first changes the explicit dependence on the time in equation 3 to an implicit one. Since the time parameter $t _ { n } + c _ { i } h$ is different for the different stages, it can be absorbed into $g _ { i } ( \cdot )$ , which implicitly depends on time for stage $i$ . Afterward, the summation in the input parameter of $g _ { i } ( \cdot )$ is split into separate terms. $F _ { i } ( \cdot )$ denotes the function of these terms for each stage. We verify that $F _ { i } ( \cdot )$ can equal to $g _ { i } ( \cdot )$ after training by experiment though $F _ { i } ( \cdot )$ is more expressive than $g _ { i } ( \cdot )$ in expression. Additionally, $F _ { i } ( \cdot )$ is more memory efficient than $g _ { i } ( \cdot )$ because of saving the storage for the summation inputted to $g _ { i } ( \cdot )$ .
|
| 110 |
+
|
| 111 |
+
# 3.3.1 CONNECT ERKNETS WITH DENSENETS
|
| 112 |
+
|
| 113 |
+
In order to construct ERKNets, $h b _ { i } z _ { i }$ can be described by the equation below, according to equation 4.
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
\begin{array} { r l } & { h b _ { i } z _ { i } = e _ { i } \left( { { y } _ { n } } , \ h a _ { i 1 } { { z } _ { 1 } } , \ \ldots , \ h a _ { i ( i - 1 ) } { { z } _ { i - 1 } } \right) } \\ & { \qquad = E _ { i } \left( { { y } _ { n } } , \ h b _ { 1 } { { z } _ { 1 } } , \ \ldots , \ h b _ { i - 1 } { { z } _ { i - 1 } } \right) . } \end{array}
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
The above transformation first eliminates $h a _ { i j } z _ { j }$ $( i \leq j )$ from $F _ { i } ( \cdot )$ in equation 4 since $a _ { i j } = 0$ when $1 \leq i \leq j \leq s$ for ERK methods (See 3.1). As a result, $h b _ { i } z _ { i }$ is denoted by a function of $y _ { n }$ and $h a _ { i j } z _ { j }$ for $j = 1$ , . . . , $i - 1$ . It is written as $e _ { i } ( \cdot )$ . After that, adjusting the coefficients of each parameter from $a _ { i j }$ to $b _ { j }$ yields another function $E _ { i } ( \cdot )$ . It is a function of $y _ { n }$ and $h b _ { j } z _ { j }$ for $j = 1 , \ldots , i - 1$ .
|
| 120 |
+
|
| 121 |
+
If a convolutional subnetwork is adopted to model $E _ { i } ( \cdot )$ in equation 5, the most similar network structure is the dense connections in DenseNets. To be specific, a growth in a dense block concatenates all the preceding layers as the input of convolutional subnetwork just like that $h b _ { i } z _ { i }$ uses $y _ { n }$ and all the increments in preceding stages as the input of $E _ { i } ( \cdot )$ . For the purpose of adopting dense block in ERKNets, the dense blocks must conform to the following rules.
|
| 122 |
+
|
| 123 |
+
Rule 1 The number of channels of ${ \bf { { y } } } _ { n }$ is in the form of $m k$ , where $m$ and $k$ are positive integers and $k$ is known as the growth rate in DenseNet literature. The dimension of ${ \bf { \nabla } } \pmb { y } _ { n }$ is the multiplication of the size of feature map and $m k$ .
|
| 124 |
+
|
| 125 |
+
Rule 2 Every $m$ successive growth constructs a convolutional subnetwork for $E _ { i } ( \cdot )$ . Each subnetwork outputs mk channels which are regarded as a group according to the number of channels of ${ \bf { \nabla } } \pmb { y } _ { n }$ . Each convolutional subnetwork concatenates ${ \bf { { y } } } _ { n }$ and all the preceding groups as its input. The $i$ th group generated by the ith subnetwork corresponds to $h b _ { i } z _ { i }$ .
|
| 126 |
+
|
| 127 |
+
Rule 3 The total number of growth is $m s$ , where $s$ is number of stages of RK methods. Consequently, $s$ groups representing $h b _ { i } z _ { i }$ for $i = 1$ , . . . , $s$ are generated by $s$ convolutional subnetworks modeling $E _ { i } ( \cdot )$ for $i = 1$ , . . . , $s$ successively in a dense block.
|
| 128 |
+
|
| 129 |
+
Appending to a restricted dense block conforming to the above rules, ${ \bf { \nabla } } \pmb { y } _ { n }$ and the groups $h b _ { i } z _ { i }$ for $i = 1 , \dots , s$ are added to obtain $\mathbf { \nabla } _ { \mathbf { y } _ { n + 1 } }$ according to equation 2. Figure 2 illustrates one time-step of ERKNet.
|
| 130 |
+
|
| 131 |
+
In DenseNets, every dense block together with part of the subsequent computation can be regarded as a period using a $s$ -stage ERK method with $r = 1$ time-step. The transition layers and the postprocessor contain the summation operation in equation 2. This gives an explanation of DenseNets from the dynamical systems view.
|
| 132 |
+
|
| 133 |
+
# 3.3.2 CONNECT IRKNETS WITH CLIQUENETS
|
| 134 |
+
|
| 135 |
+
$h b _ { i } z _ { i }$ for IRK methods can be described by the equation below, according to equation 4.
|
| 136 |
+
|
| 137 |
+
$$
|
| 138 |
+
\begin{array} { r l } & { h b _ { i } z _ { i } = H _ { i } \left( y _ { n } , \ h b _ { 1 } z _ { 1 } , \ \ldots , \ h b _ { s } z _ { s } \right) } \\ & { \qquad = G _ { i } \left( h b _ { 1 } z _ { 1 } , \ \ldots , \ h b _ { i - 1 } z _ { i - 1 } , \ h b _ { i + 1 } z _ { i + 1 } , \ \ldots , \ h b _ { s } z _ { s } \right) } \\ & { \qquad = I _ { i } \left( h b _ { 1 } z _ { 1 } , \ \ldots , \ h b _ { i - 1 } z _ { i - 1 } , \ v _ { i + 1 } , \ \ldots , \ v _ { s } \right) } \end{array}
|
| 139 |
+
$$
|
| 140 |
+
|
| 141 |
+
where
|
| 142 |
+
|
| 143 |
+
$$
|
| 144 |
+
\begin{array} { l } { { \pmb { v } } _ { j } = V _ { j } ( h b _ { j } z _ { j } ) } \\ { = J _ { j } \left( \pmb { y } _ { n } , \ \pmb { v } _ { 1 } , \ \dots , \ \pmb { v } _ { j - 1 } \right) . } \end{array}
|
| 145 |
+
$$
|
| 146 |
+
|
| 147 |
+
The above transformation first adjusts the coefficients of each parameter of $F _ { i } ( \cdot )$ in equation 4 from $a _ { i j }$ to $b _ { j }$ . It yields another function $H _ { i } ( \cdot )$ . As a result, every $h b _ { i } z _ { i }$ is a function of $y _ { n }$ . Thus, $h b _ { i } z _ { i }$ can be denoted by a function of $h b _ { j } z _ { j }$ for $j = 1 , \ \dots , \ s , \ j \neq i$ . This function is written as $G _ { i } ( \cdot )$ .
|
| 148 |
+
|
| 149 |
+
Inspired by Newton method which is used to implement IRK methods (Butcher, 2008), $h b _ { i } z _ { i }$ is initialized using all available information firstly and then updated alternately. Given $v _ { j }$ is the initial value of $h b _ { j } z _ { j }$ , the relationship between them is denoted by the function $V _ { j } ( \cdot )$ . Therefore, $h b _ { i } z _ { i }$ can be denoted by a function of $h b _ { j } z _ { j }$ for $j = 1$ , . . . , $i - 1$ and ${ \boldsymbol { v } } _ { j }$ for $j = i \dot { + } 1$ , . . . , $s$ . This function is written as $I _ { i } ( \cdot )$ . It is the update function of $h b _ { i } z _ { i }$ . Since every $h b _ { j } z _ { j }$ is a function of $y _ { n }$ , every ${ \pmb v } _ { j }$ is also a function of $y _ { n }$ . Thus, $v _ { j }$ can be denoted by a function of $y _ { n }$ and $v _ { q }$ for $q = 1$ , . . . , $j - 1$ . This function is written as $J _ { j } ( \cdot )$ . It is the initialization function of $h b _ { j } z _ { j }$ .
|
| 150 |
+
|
| 151 |
+
The update process is a sequence of iterations till convergence in Newton method. In other words, ${ \pmb v } _ { j }$ is updated for many times to approach $h b _ { j } z _ { j }$ . During updating, $G _ { i } ( \cdot )$ with the biased input is used as the update function since $I _ { i } ( \cdot )$ is unknown. If using convolutional subnetwork to model each $I _ { i } ( \cdot )$ , these functions can be learned under the help of training. As a result, each ${ \boldsymbol { v } } _ { j }$ needs to be updated only once. Therefore, the computational cost is reduced remarkably.
|
| 152 |
+
|
| 153 |
+
If a convolutional subnetwork is adopted to model $J _ { j } ( \cdot )$ in equation 7 and $I _ { i } ( \cdot )$ in equation 6, the most similar network structure is the clique block in CliqueNets. To be specific, a clique block is composed of Stage-I and Stage-II in CliqueNet literature. Stage-I which initializes all layers in a clique block is regarded as a sequence of $J _ { j } ( \cdot )$ . Then, Stage-II for updating all layers alternately corresponds to all $I _ { i } ( \cdot )$ . In CliqueNet literature, all layers in a clique block except the top layer to be updated are concatenated as the bottom layer, i.e. the input of a convolutional subnetwork for updating. It is just like $I _ { i } ( \cdot )$ uses $h b _ { j } z _ { j }$ for $j = 1$ , . . . , $i - 1$ and ${ \pmb v } _ { j }$ for $j = i + 1$ , . . . , $s$ as input. In order to adopt clique block in IRKNets, the clique blocks must conform to the following rules.
|
| 154 |
+
|
| 155 |
+

|
| 156 |
+
Figure 3: Architecture of one time-step in IRKNet using a 3-stage IRK method. ${ \bf { { y } } } _ { n }$ is the approximation of $\pmb { y } ( t _ { n } )$ . A dense block, which is Stage-I of a clique block, grows $k$ channels every time to generate the initial value of each $h b _ { i } z _ { i }$ , written as ${ \mathbf { } } v _ { i }$ . Here, $h$ is time-step size, $b _ { i }$ is coefficient of IRK method, and $z _ { i }$ is the slope of each stage in IRK method. In Stage-II of a clique block, the convolutional subnetwork concatenating the current values of $h b _ { j } z _ { j }$ for $j = 1$ , . . . , 3, $j \neq i$ to update every $h b _ { i } z _ { i }$ alternately. An explicit summation layer is added after a clique block to complete a time-step.
|
| 157 |
+
|
| 158 |
+
Rule 1 The number of channels of ${ \bf { { y } } } _ { n }$ is $k$ , which is the growth rate in Stage-I since Stage-I is a dense block. The dimension of ${ \bf { \nabla } } \pmb { y } _ { n }$ is the multiplication of the size of feature map and $k$ .
|
| 159 |
+
|
| 160 |
+
Rule 2 Every growth in Stage-I constructs a convolutional subnetwork. Each subnetwork outputs $k$ channels which are regarded as a group according to the number of channels of ${ \bf { \nabla } } \pmb { y } _ { n }$ . Each convolutional subnetwork concatenates ${ \bf { \nabla } } \pmb { y } _ { n }$ and all the preceding groups as its input. The ith group generated by the ith subnetwork is ${ \mathbf { } } v _ { i }$ .
|
| 161 |
+
|
| 162 |
+
Rule 3 The total number of growth in Stage-I is $s$ , which is number of stages of RK methods. Consequently, $s$ groups representing ${ \mathbf { } } v _ { i }$ for $i = 1$ , . . . , $s$ are generated by $s$ convolutional subnetworks successively in Stage-I. $s$ should be larger than 1 for updating alternately in Stage-II.
|
| 163 |
+
|
| 164 |
+
Appending to a restricted clique block conforming to the above rules, ${ \bf { \nabla } } \pmb { y } _ { n }$ and the groups $h b _ { i } z _ { i }$ for $i = 1 , \dots , s$ are added to obtain $\mathbf { \nabla } _ { \mathbf { y } _ { n + 1 } }$ according to equation 2. Figure 3 illustrates one time-step of IRKNet using a 3-stage IRK method as an example.
|
| 165 |
+
|
| 166 |
+
In CliqueNets, every clique block together with part of the subsequent computation can be regarded as a period using a $s$ -stage IRK method with $r = 1$ time-step. The transition layers and the postprocessor contain the summation operation in equation 2. This gives an explanation of CliqueNets from the dynamical systems view.
|
| 167 |
+
|
| 168 |
+
# 4 EXPERIMENTS
|
| 169 |
+
|
| 170 |
+
To verify the theoretical properties of RK methods and evaluate the performance of RKNets on image classification, experiments are conducted using the proposed network architectures. The experimental setup is described in Appendix A. Some extra techniques, including attentional transition, bottleneck and multiscale feature strategy, can be adopted in RKNets following CliqueNets. They are introduced in Appendix B.
|
| 171 |
+
|
| 172 |
+
Table 1: Test errors of ERKNets and IRKNets, evaluated on CIFAR-10 without data augmentation. The growth rate $k$ is 36 in every period of the RKNets. The times of successive growth in each stage, $m$ , is 1. The multiscale feature strategy is used. All the models are run with batchsize 64.
|
| 173 |
+
|
| 174 |
+
<table><tr><td>ERKNet</td><td>FLOPs (G)</td><td>Params (M)</td><td>Error (%)</td><td>IRKNet</td><td>FLOPs (G)</td><td>Params (M)</td><td>Error (%)</td></tr><tr><td>-6×1_6×1.6×1</td><td></td><td>0.74</td><td>7.08</td><td>-3×1_3×1_3×1</td><td>0.38</td><td>0.32</td><td></td></tr><tr><td>-7×1.6×1.6×1</td><td>0.66 0.83</td><td>0.83</td><td>7.02</td><td>-4×1.3×1.3×1</td><td>0.62</td><td>0.40</td><td>7.18 6.89</td></tr><tr><td>-7×1_7×1_6×1</td><td>0.87</td><td>0.91</td><td>6.67</td><td>-4×1_4×1.3×1</td><td>0.68</td><td>0.49</td><td>6.63</td></tr><tr><td>-7×1_7×1_7×1</td><td>0.88</td><td>0.99</td><td>6.61</td><td>-4×1_4×1_4×1</td><td>0.69</td><td>0.57</td><td>6.50</td></tr></table>
|
| 175 |
+
|
| 176 |
+
Table 2: Test errors evaluated on CIFAR and SVHN. $k$ is growth rate. The multiscale feature strategy is used in RKNets. A and B represent attentional transition and bottleneck respectively. The bottleneck layers which output $k$ channels to the following layers are used in IRKNets. C10 and C100 stand for CIFAR-10 and CIFAR-100 respectively. $\ " + \ "$ indicates standard data augmentation. When data augmentation is not used, dropout layers are added. The values with \* are provided by Huang et al. (2017). The values with $\dagger$ are provided by Kuen et al. (2017). The values with $\star$ are computed by ourselves. FLOPs and Params are calculated on CIFAR-10 or SVHN. RKNets are run with batchsize 32 on CIFAR but run with batchsize 64 on SVHN. Results that outperform all competing methods are bold and the overall best result is blue.
|
| 177 |
+
|
| 178 |
+
<table><tr><td>Model</td><td>FLOPs ParamsC10 (G)</td><td>(M)</td><td>(%)</td><td>C10+ (%)</td><td>C100 (%)</td><td>(%)</td><td>C100+ SVHN (%)</td></tr><tr><td>pre-act ResNet (He et al., 2016b)</td><td></td><td>10.2</td><td>10.56*</td><td>4.62</td><td>33.47*</td><td>22.71</td><td></td></tr><tr><td>WRN (Zagoruyko & Komodakis,2016)</td><td>3.10+ 10.49+</td><td>11.0 36.5</td><td></td><td>4.27 4.00</td><td>一 =</td><td>20.43 19.25</td><td>1.54</td></tr><tr><td>DenseNet (Huang et al., 2017)</td><td>14.53* 27.2 10.83* 15.3</td><td></td><td>5.83 5.19</td><td>3.74 3.62</td><td>23.42 19.64</td><td>19.25 17.60</td><td>1.59 1.74</td></tr><tr><td>Hamiltonian (Chang et al.,2018a)</td><td>18.59* 25.6</td><td>1.68</td><td>1</td><td>3.46 5.98</td><td></td><td>17.18</td><td></td></tr><tr><td>LM-architecture (Lu et al., 2018)</td><td></td><td>1.7</td><td></td><td>5.27</td><td>=</td><td>26.11 22.9</td><td></td></tr><tr><td>CliqueNet (Yang et al., 2018)</td><td></td><td>68.8</td><td></td><td>=</td><td>1</td><td>16.79</td><td></td></tr><tr><td></td><td>9.45 10.56*</td><td>10.14 10.48× 5.06</td><td>5.06</td><td></td><td>23.14 21.83</td><td></td><td>1.51 1.64</td></tr><tr><td>IRKNet-5×1_5×1_5×1-AB (k=80)</td><td>2.17</td><td>1.40</td><td>5.27</td><td></td><td></td><td></td><td></td></tr><tr><td>IRKNet-5×1_5×1_5×1-A (k=80)</td><td>5.44</td><td></td><td></td><td>4.23</td><td>24.35</td><td>21.77</td><td>1.74</td></tr><tr><td></td><td></td><td>4.37</td><td>■</td><td>=</td><td>1</td><td>=</td><td>1.63</td></tr><tr><td>IRKNet-5×1_5×1_5×1-AB (k=150)</td><td>7.62</td><td>4.87</td><td>4.60</td><td>3.60</td><td>21.39</td><td>19.42</td><td>1.64</td></tr><tr><td>IRKNet-6×1_6×1_6×1-A (k=80)</td><td>7.92</td><td>6.28</td><td></td><td></td><td>=</td><td></td><td>1.52</td></tr><tr><td>IRKNet-5×1_5×1_5×1-AB (k=180)</td><td>10.98</td><td>6.99</td><td>4.56</td><td></td><td>20.88</td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td>=</td><td></td><td>18.61</td><td>1</td></tr><tr><td>IRKNet-5×1_5×1_5×1-AB (k=200)</td><td>13.55</td><td>8.63</td><td></td><td>3.54</td><td>20.67</td><td>18.11</td><td></td></tr><tr><td>IRKNet-5×1_5×1_5×1-AB (k=240)</td><td>19.51</td><td>12.41</td><td></td><td>3.40</td><td>20.58</td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 179 |
+
|
| 180 |
+
According to the theoretical results, an RK method with more stages usually has a higher order and a lower truncation error. Therefore, as the number of stages increases, a more precise approximation of the system states in every period leads to more accurate classification. Table 1 shows the number of FLOPs and parameters and classification error on CIFAR-10 for RKNets with varying number of stages in each period. The empirical results are consistent with the theoretical properties.
|
| 181 |
+
|
| 182 |
+
Table 3: Classification errors on ImageNet validation set with a single-crop $( 2 2 4 \times 2 2 4 )$ ). The growth rate $k$ is 32 and $m k$ is the initial number of channels in each period in RKNets. $m _ { n }$ stands for $m$ in the $n$ th period. For each RKNet in this table, $m _ { 0 }$ is 2, $m _ { 1 }$ is 4 and $m _ { 2 }$ is 8. B represents bottleneck. The bottleneck layers which output $4 k$ channels to the following layers are used in ERKNets.
|
| 183 |
+
|
| 184 |
+
<table><tr><td>Model</td><td>m3</td><td>FLOPs (G)</td><td>Params (M)</td><td>Top1 (%)</td><td>Top5 (%)</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>ERKNet-3×1_3×1_3×1_1×1-B</td><td>16</td><td>5.20</td><td>6.95</td><td>25.47</td><td>7.81</td></tr><tr><td>ERKNet-3×1_3×1_4×1_2×1-B</td><td>20</td><td>6.35</td><td>14.49</td><td>24.12</td><td>7.17</td></tr><tr><td>ERKNet-3×1_3×1_6×1_2×1-B</td><td>28</td><td>8.50</td><td>25.51</td><td>23.14</td><td>6.66</td></tr></table>
|
| 185 |
+
|
| 186 |
+

|
| 187 |
+
Figure 4: Comparison of the DenseNets, CliqueNets and RKNets. The top-1 error rates (single-crop testing) on the ImageNet validation dataset are shown as a function of learned parameters (left) and FLOPs during test-time (right). RKNets compared here are the models shown in Table 3.
|
| 188 |
+
|
| 189 |
+
IRKNets are evaluated on CIFAR-10, CIFAR-100 and SVHN while ERKNets are evaluated on ImageNet to compare with the state-of-the-art network models. The test errors of IRKNets on CIFAR10, CIFAR-100 and SVHN are shown in Table 2. The top-1 and top-5 errors on ImageNet validation set with a single-crop $( 2 2 4 \times 2 2 4 )$ are shown in Table 3. Figure 4 shows the single-crop top-1 validation errors of DenseNets, CliqueNets and RKNets as a function of the number of parameters (left) and FLOPs (right). According to the experimental results, RKNets are more efficient than the state-of-the-art models on CIFAR-10 and on par on CIFAR-100, SVHN and ImageNet.
|
| 190 |
+
|
| 191 |
+
# 5 CONCLUSION
|
| 192 |
+
|
| 193 |
+
We propose to employ a type of numerical ODE methods, the RK methods, to construct convolutional neural networks for image classification tasks. The proposed network architecture can systematically generalize to high order. At the same time, we give a theoretical interpretation of the DenseNet and CliqueNet via the dynamical systems view. The model constructed using the RK methods is referred to as the RKNet, which can be converted from a DenseNet or CliqueNet by enforcing theoretical constraints.
|
| 194 |
+
|
| 195 |
+
The experimental results validate the theoretical properties of RK methods and support the dynamical systems interpretation. Moreover, the experimental results demonstrate that RKNets surpass the state-of-the-art models on CIFAR-10 and are on par on CIFAR-100, SVHN and ImageNet.
|
| 196 |
+
|
| 197 |
+
With the help of the dynamical systems view and various numerical ODE methods including RK methods, more general neural networks can be constructed. Many aspects of RKNets and the dynamical systems view still require further investigation. We hope this work inspires future research directions.
|
| 198 |
+
|
| 199 |
+
# REFERENCES
|
| 200 |
+
|
| 201 |
+
John Charles Butcher. Numerical methods for ordinary differential equations. John Wiley & Sons, 2008.
|
| 202 |
+
|
| 203 |
+
Bo Chang, Lili Meng, Eldad Haber, Lars Ruthotto, David Begert, and Elliot Holtham. Reversible architectures for arbitrarily deep residual neural networks. In AAAI Conference on Artificial Intelligence, 2018a.
|
| 204 |
+
|
| 205 |
+
Bo Chang, Lili Meng, Eldad Haber, Frederick Tung, and David Begert. Multi-level residual networks from dynamical systems view. In International Conference on Learning Representations, 2018b.
|
| 206 |
+
|
| 207 |
+
Tian Qi Chen, Yulia Rubanova, Jesse Bettencourt, and David Duvenaud. Neural ordinary differential equations. In Advances in Neural Information Processing Systems, 2018.
|
| 208 |
+
|
| 209 |
+
Weinan E. A proposal on machine learning via dynamical systems. Communications in Mathematics and Statistics, 5(1):1–11, Mar 2017. ISSN 2194-671X. doi: 10.1007/s40304-017-0103-z. URL https://doi.org/10.1007/s40304-017-0103-z.
|
| 210 |
+
|
| 211 |
+
Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the thirteenth international conference on artificial intelligence and statistics, pp. 249–256, 2010.
|
| 212 |
+
|
| 213 |
+
Eldad Haber, Lars Ruthotto, Elliot Holtham, and Seong-Hwan Jun. Learning across scales - multiscale methods for convolution neural networks. arXiv preprint arXiv:1703.02009, 2017.
|
| 214 |
+
|
| 215 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In The IEEE International Conference on Computer Vision (ICCV), December 2015.
|
| 216 |
+
|
| 217 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016a.
|
| 218 |
+
|
| 219 |
+
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, 2016b.
|
| 220 |
+
|
| 221 |
+
Andrew G Howard. Some improvements on deep convolutional neural network based image classification. In International Conference on Learning Representations, 2014.
|
| 222 |
+
|
| 223 |
+
Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q. Weinberger. Densely connected convolutional networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017.
|
| 224 |
+
|
| 225 |
+
Alex Krizhevsky. Learning multiple layers of features from tiny images. 2009.
|
| 226 |
+
|
| 227 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
|
| 228 |
+
|
| 229 |
+
Jason Kuen, Xiangfei Kong, Gang Wang, and Yap-Peng Tan. Delugenets: Deep networks with efficient and flexible cross-layer information inflows. In The IEEE International Conference on Computer Vision (ICCV) Workshops, Oct 2017.
|
| 230 |
+
|
| 231 |
+
Qianxiao Li, Long Chen, Cheng Tai, and Weinan E. Maximum principle based algorithms for deep learning. Journal of Machine Learning Research, 18(165):1–29, 2018. URL http://jmlr. org/papers/v18/17-653.html.
|
| 232 |
+
|
| 233 |
+
Qianli Liao and Tomaso Poggio. Bridging the gaps between residual learning, recurrent neural networks and visual cortex. arXiv preprint arXiv:1604.03640, 2016.
|
| 234 |
+
|
| 235 |
+
Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ´ European conference on computer vision, pp. 740–755. Springer, 2014.
|
| 236 |
+
|
| 237 |
+
Zichao Long, Yiping Lu, Xianzhong Ma, and Bin Dong. PDE-net: Learning PDEs from data. 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. 3208–3216, Stockholmsmssan, Stockholm Sweden, 10–15 Jul 2018. PMLR. URL http://proceedings. mlr.press/v80/long18a.html.
|
| 238 |
+
|
| 239 |
+
Yiping Lu, Aoxiao Zhong, Quanzheng Li, and Bin Dong. Beyond finite layer neural networks: Bridging deep architectures and numerical differential equations. 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. 3276–3285, Stockholmsmssan, Stockholm Sweden, 10–15 Jul 2018. PMLR. URL http://proceedings.mlr.press/v80/ lu18d.html.
|
| 240 |
+
|
| 241 |
+
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y. Ng. Reading digits in natural images with unsupervised feature learning. In NIPS Workshop on Deep Learning and Unsupervised Feature Learning 2011, 2011. URL http://ufldl.stanford.edu/ housenumbers/nips2011_housenumbers.pdf.
|
| 242 |
+
|
| 243 |
+
Maziar Raissi. Deep hidden physics models: Deep learning of nonlinear partial differential equations. arXiv preprint arXiv:1801.06637, 2018.
|
| 244 |
+
|
| 245 |
+
Maziar Raissi, Paris Perdikaris, and George Em Karniadakis. Physics informed deep learning (part i): Data-driven solutions of nonlinear partial differential equations. arXiv preprint arXiv:1711.10561, 2017a.
|
| 246 |
+
|
| 247 |
+
Maziar Raissi, Paris Perdikaris, and George Em Karniadakis. Physics informed deep learning (part ii): Data-driven discovery of nonlinear partial differential equations. arXiv preprint arXiv:1711.10566, 2017b.
|
| 248 |
+
|
| 249 |
+
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015.
|
| 250 |
+
|
| 251 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In International Conference on Learning Representations, 2015.
|
| 252 |
+
|
| 253 |
+
Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15:1929–1958, 2014. URL http://jmlr.org/papers/v15/ srivastava14a.html.
|
| 254 |
+
|
| 255 |
+
Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015.
|
| 256 |
+
|
| 257 |
+
Endre Sli and David F. Mayers. An Introduction to Numerical Analysis. Cambridge University Press, 2003.
|
| 258 |
+
|
| 259 |
+
Bao Wang, Xiyang Luo, Zhen Li, Wei Zhu, Zuoqiang Shi, and Stanley J Osher. Deep learning with data dependent implicit activation function. arXiv preprint arXiv:1802.00168, 2018.
|
| 260 |
+
|
| 261 |
+
Yi-Jen Wang and Chin-Teng Lin. Runge-kutta neural network for identification of dynamical systems in high accuracy. IEEE Transactions on Neural Networks, 9(2):294–307, 1998.
|
| 262 |
+
|
| 263 |
+
Yibo Yang, Zhisheng Zhong, Tiancheng Shen, and Zhouchen Lin. Convolutional neural networks with alternately updated clique. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018.
|
| 264 |
+
|
| 265 |
+
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In BMVC, 2016.
|
| 266 |
+
|
| 267 |
+
# A EXPERIMENTAL SETUP
|
| 268 |
+
|
| 269 |
+
The RKNets are evaluated on CIFAR-10, CIFAR-100, SVHN and ImageNet. The CIFAR-10 dataset contains 60,000 color images of size $3 2 \times 3 2$ in 10 classes, with 5,000 training images and 1,000 test images per class. The CIFAR-100 is similar to the CIFAR-10 except that it has 100 classes and 500 training images and 100 test images per class. The Street View House Numbers (SVHN) dataset (Netzer et al., 2011) contains $3 2 \times 3 2$ colored digit images. There are 73,257 images in the training set, 26,032 images in the test set, and 531,131 images for additional training. ImageNet, which denotes the ILSVRC2012 classification dataset in this paper, consists of 1.28 million training images and 50,000 validation images. It has 1,000 classes and $7 3 2 \sim 1 , 3 0 0$ training images and 50 validation images per class.
|
| 270 |
+
|
| 271 |
+
The weights of convolution layer are initialized as in (He et al., 2015). A weight decay of 0.0001 and Nesterov momentum of 0.9 are used. The learning rate is set to 0.1 initially.
|
| 272 |
+
|
| 273 |
+
On both CIFAR and SVHN, the learning rate is divided by 10 at $50 \%$ and $7 5 \%$ of the training procedure. Moreover, the weights of fully connected layer are using Xavier initialization (Glorot & Bengio, 2010). For the cases without data augmentation, we add a dropout layer (Srivastava et al., 2014) with dropout rate 0.2 after each convolution layer following (Huang et al., 2017; Yang et al., 2018).
|
| 274 |
+
|
| 275 |
+
On CIFAR, the models are trained using stochastic gradient descent with a mini-batch size of 64 or 32 as required. A standard data augmentation scheme is adopted in some cases following (He et al., 2016a). The models are trained for 300 epochs.
|
| 276 |
+
|
| 277 |
+
On SVHN, the models are trained using stochastic gradient descent with a mini-batch size of 64. Following (Yang et al., 2018), we use all training samples without augmentation and divide images by 255 for normalization. The models are trained for 40 epochs.
|
| 278 |
+
|
| 279 |
+
On ImageNet, the models are trained with a mini-batch size of 256 for 90 epochs. Scale and aspect ratio augmentation in (Szegedy et al., 2015), the standard color augmentation in (Krizhevsky et al., 2012) as well as the photometric distortions in (Howard, 2014) are adopted. The learning rate is divided by 10 every 30 epochs.
|
| 280 |
+
|
| 281 |
+
# B EXTRA TECHNIQUES
|
| 282 |
+
|
| 283 |
+
The attentional transition is a channelwise attention mechanism in transition layers, following the method proposed in (Yang et al., 2018). In attentional transition, the filters are globally averaged after the convolution in transition firstly. Then, two fully connected (FC) operations are conducted. The first FC layer has half of the filters and is activated by a ReLU function. The second FC layer has the same number of filters and is activated by a sigmoid function. At last, the output of the second FC layer acts on the output of the convolution by filter-wise multiplication. The bottleneck layer is a $1 \times 1$ convolution layer which is placed before each $3 \times 3$ convolution layer in periods. The multiscale feature strategy is a mechanism in the postprocessor to collect outputs from all the periods but not only from the last period.
|
md/train/HJgcvJBFvB/HJgcvJBFvB.md
ADDED
|
@@ -0,0 +1,433 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# NETWORK RANDOMIZATION:A SIMPLE TECHNIQUE FOR GENERALIZATIONIN DEEP REINFORCEMENT LEARNING
|
| 2 |
+
|
| 3 |
+
Kimin $\mathbf { L e e ^ { \mathrm { 1 * \dagger } } }$ , Kibok $\mathbf { L e e ^ { 2 * } }$ , Jinwoo $\mathbf { S h i n ^ { 1 } }$ , Honglak Lee32 1KAIST, 2University of Michigan, 3Google Brain
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Deep reinforcement learning (RL) agents often fail to generalize to unseen environments (yet semantically similar to trained agents), particularly when they are trained on high-dimensional state spaces, such as images. In this paper, we propose a simple technique to improve a generalization ability of deep RL agents by introducing a randomized (convolutional) neural network that randomly perturbs input observations. It enables trained agents to adapt to new domains by learning robust features invariant across varied and randomized environments. Furthermore, we consider an inference method based on the Monte Carlo approximation to reduce the variance induced by this randomization. We demonstrate the superiority of our method across 2D CoinRun, 3D DeepMind Lab exploration and 3D robotics control tasks: it significantly outperforms various regularization and data augmentation methods for the same purpose. Code is available at github.com/pokaxpoka/netrand.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Deep reinforcement learning (RL) has been applied to various applications, including board games (e.g., Go (Silver et al., 2017) and Chess (Silver et al., 2018)), video games (e.g., Atari games (Mnih et al., 2015) and StarCraft (Vinyals et al., 2017)), and complex robotics control tasks (Tobin et al., 2017; Ren et al., 2019). However, it has been evidenced in recent years that deep RL agents often struggle to generalize to new environments, even when semantically similar to trained agents (Farebrother et al., 2018; Zhang et al., 2018b; Gamrian & Goldberg, 2019; Cobbe et al., 2019). For example, RL agents that learned a near-optimal policy for training levels in a video game fail to perform accurately in unseen levels (Cobbe et al., 2019), while a human can seamlessly generalize across similar tasks. Namely, RL agents often overfit to training environments, thus the lack of generalization ability makes them unreliable in several applications, such as health care (Chakraborty & Murphy, 2014) and finance (Deng et al., 2016).
|
| 12 |
+
|
| 13 |
+
The generalization of RL agents can be characterized by visual changes (Cobbe et al., 2019; Gamrian & Goldberg, 2019), different dynamics (Packer et al., 2018), and various structures (Beattie et al., 2016; Wang et al., 2016). In this paper, we focus on the generalization across tasks where the trained agents take various unseen visual patterns at the test time, e.g., different styles of backgrounds, floors, and other objects (see Figure 1). We also found that RL agents completely fail due to small visual changes1 because it is challenging to learn generalizable representations from high-dimensional input observations, such as images.
|
| 14 |
+
|
| 15 |
+
To improve generalization, several strategies, such as regularization (Farebrother et al., 2018; Zhang et al., 2018b; Cobbe et al., 2019) and data augmentation (Tobin et al., 2017; Ren et al., 2019), have been proposed in the literature (see Section 2 for further details). In particular, Tobin et al. (2017) showed that training RL agents in various environments generated by randomizing rendering in a simulator improves the generalization performance, leading to a better performance in real environments. This implies that RL agents can learn invariant and robust representations if diverse input observations are provided during training. However, their method is limited by requiring a physics simulator, which may not always be available. This motivates our approach of developing a simple and plausible method applicable to training deep RL agents.
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: (a) Examples of randomized inputs (color values in each channel are normalized for visualization) generated by re-initializing the parameters of a random layer. Examples of seen and unseen environments on (b) CoinRun, (c) DeepMind Lab, and (d) Surreal robotics control.
|
| 19 |
+
|
| 20 |
+
The main contribution of this paper is to develop a simple randomization technique for improving the generalization ability across tasks with various unseen visual patterns. Our main idea is to utilize random (convolutional) networks to generate randomized inputs (see Figure 1(a)), and train RL agents (or their policy) by feeding them into the networks. Specifically, by re-initializing the parameters of random networks at every iteration, the agents are encouraged to be trained under a broad range of perturbed low-level features, e.g., various textures, colors, or shapes. We discover that the proposed idea guides RL agents to learn generalizable features that are more invariant in unseen environments (see Figure 3) than conventional regularization (Srivastava et al., 2014; Ioffe & Szegedy, 2015) and data augmentation (Cobbe et al., 2019; Cubuk et al., 2019) techniques. Here, we also provide an inference technique based on the Monte Carlo approximation, which stabilizes the performance by reducing the variance incurred from our randomization method at test time.
|
| 21 |
+
|
| 22 |
+
We demonstrate the effectiveness of the proposed method on the 2D CoinRun (Cobbe et al., 2019) game, the 3D DeepMind Lab exploration task (Beattie et al., 2016), and the 3D robotics control task (Fan et al., 2018). For evaluation, the performance of the trained agents is measured in unseen environments with various visual and geometrical patterns (e.g., different styles of backgrounds, objects, and floors), guaranteeing that the trained agents encounter unseen inputs at test time. Note that learning invariant and robust representations against such changes is essential to generalize to unseen environments. In our experiments, the proposed method significantly reduces the generalization gap in unseen environments unlike conventional regularization and data augmentation techniques. For example, compared to the agents learned with the cutout (DeVries & Taylor, 2017) data augmentation methods proposed by Cobbe et al. (2019), our method improves the success rates from $3 9 . 8 \%$ to $5 8 . 7 \%$ under 2D CoinRun, the total score from 55.4 to 358.2 for 3D DeepMind Lab, and the total score from 31.3 to 356.8 for the Surreal robotics control task. Our results can be influential to study other generalization domains, such as tasks with different dynamics (Packer et al., 2018), as well as solving real-world problems, such as sim-to-real transfer (Tobin et al., 2017).
|
| 23 |
+
|
| 24 |
+
# 2 RELATED WORK
|
| 25 |
+
|
| 26 |
+
Generalization in deep RL. Recently, the generalization performance of RL agents has been investigated by splitting training and test environments using random seeds (Zhang et al., 2018a) and distinct sets of levels in video games (Machado et al., 2018; Cobbe et al., 2019). Regularization is one of the major directions to improve the generalization ability of deep RL algorithms. Farebrother et al. (2018) and Cobbe et al. (2019) showed that regularization methods can improve the generalization performance of RL agents using various game modes of Atari (Machado et al., 2018) and procedurally generated arcade environments called CoinRun, respectively. On the other hand, data augmentation techniques have also been shown to improve generalization. Tobin et al. (2017) proposed a domain randomization method to generate simulated inputs by randomizing rendering in the simulator. Motivated by this, Cobbe et al. (2019) proposed a data augmentation method by modifying the cutout method (DeVries & Taylor, 2017). Our method can be combined with the prior methods to further improve the generalization performance.
|
| 27 |
+
|
| 28 |
+
Random networks for deep RL. Random networks have been utilized in several approaches for different purposes in deep RL. Burda et al. (2019) utilized a randomly initialized neural network to define an intrinsic reward for visiting unexplored states in challenging exploration problems. By learning to predict the reward from the random network, the agent can recognize unexplored states. Osband et al. (2018) studied a method to improve ensemble-based approaches by adding a randomized network to each ensemble member to improve the uncertainty estimation and efficient exploration in deep RL. Our method is different because we introduce a random network to improve the generalization ability of RL agents.
|
| 29 |
+
|
| 30 |
+
Transfer learning. Generalization is also closely related to transfer learning (Parisotto et al., 2016; Rusu et al., 2016a;b), which is used to improve the performance on a target task by transferring the knowledge from a source task. However, unlike supervised learning, it has been observed that finetuning a model pre-trained on the source task for adapting to the target task is not beneficial in deep RL. Therefore, Gamrian & Goldberg (2019) proposed a domain transfer method using generative adversarial networks (Goodfellow et al., 2014) and Farebrother et al. (2018) utilized regularization techniques to improve the performance of fine-tuning methods. Higgins et al. (2017) proposed a multi-stage RL, which learns to extract disentangled representations from the input observation and then trains the agents on the representations. Alternatively, we focus on the zero-shot performance of each agent at test time without further fine-tuning of the agent’s parameters.
|
| 31 |
+
|
| 32 |
+
# 3 NETWORK RANDOMIZATION TECHNIQUE FOR GENERALIZATION
|
| 33 |
+
|
| 34 |
+
We consider a standard reinforcement learning (RL) framework where an agent interacts with an
|
| 35 |
+
environment in discrete time. Formally, at each timestep $t$ , the agent receives a state $s _ { t }$ from the
|
| 36 |
+
environment2 and chooses an action $r _ { t }$ and the agent transitions to the ncumulated rewards from timestep $a _ { t }$ xt state with a based on its policy $s _ { t + 1 }$ . The retunt factor $\pi$ . The environment returns a reward $\begin{array} { r } { R _ { t } \ = \ \sum _ { k = 0 } ^ { \infty } \gamma ^ { k } r _ { t + k } } \end{array}$ is the totalximizes the $t$ $\gamma \in [ 0 , 1 )$
|
| 37 |
+
expected return from each state $s _ { t }$ .
|
| 38 |
+
|
| 39 |
+
# 3.1 TRAINING AGENTS USING RANDOMIZED INPUT OBSERVATIONS
|
| 40 |
+
|
| 41 |
+
We introduce a random network $f$ with its parameters $\phi$ initialized with a prior distribution, e.g., Xavier normal distribution (Glorot & Bengio, 2010). Instead of the original input $s$ , we train an agent using a randomized input ${ \widehat { s } } = f ( s ; \phi )$ . For example, in the case of policy-based methods,3 the parameters $\theta$ b of the policy network $\pi$ are optimized by minimizing the following policy gradient objective function:
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
\mathcal { L } _ { \mathrm { p o l i c y } } ^ { \tt r a n d o m } = \mathbb { E } _ { ( s _ { t } , a _ { t } , R _ { t } ) \in \mathcal { D } } \big [ - \log \pi ( a _ { t } | f ( s _ { t } ; \phi ) ; \theta ) R _ { t } \big ] ,
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
where $\mathcal { D } = \{ ( s _ { t } , a _ { t } , R _ { t } ) \}$ is a set of past transitions with cumulative rewards. By re-initializing the parameters $\phi$ of the random network per iteration, the agents are trained using varied and randomized input observations (see Figure 1(a)). Namely, environments are generated with various visual patterns, but with the same semantics by randomizing the networks. Our agents are expected to adapt to new environments by learning invariant representation (see Figure 3 for supporting experiments).
|
| 48 |
+
|
| 49 |
+
To learn more invariant features, the following feature matching (FM) loss between hidden features from clean and randomized observations is also considered:
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
\mathcal { L } _ { \mathtt { F M } } ^ { \mathtt { r a n d o m } } = \mathbb { E } _ { s _ { t } \in \mathcal { D } } \big [ | | h \left( f ( s _ { t } ; \phi ) ; \theta \right) - h \left( s _ { t } ; \theta \right) | | ^ { 2 } \big ] ,
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
where $h ( \cdot )$ denotes the output of the penultimate layer of policy $\pi$ . The hidden features from clean and randomized inputs are combined to learn more invariant features against the changes in the input observations.4 Namely, the total loss is:
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
\begin{array} { r } { \mathcal { L } ^ { \mathrm { r a n d o m } } = \mathcal { L } _ { \mathrm { p o l i c y } } ^ { \mathrm { r a n d o m } } + \beta \mathcal { L } _ { \mathtt { F M } } ^ { \mathtt { r a n d o m } } , } \end{array}
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
where $\beta > 0$ is a hyper-parameter. The full procedure is summarized in Algorithm 1 in Appendix M.
|
| 62 |
+
|
| 63 |
+
Table 1: The classification accuracy $( \% )$ o n dogs vs. cats dataset. The results show the mean and standard deviation averaged over three runs and the best result is indicated in bold.
|
| 64 |
+
|
| 65 |
+
<table><tr><td>Method</td><td colspan="2">Classification Accuracy (%) Train (seen) Test (unseen)</td></tr><tr><td>ResNet-18 ResNet-18 +GR</td><td>95.0± 2.4</td><td>40.3±1.2</td></tr><tr><td></td><td>96.4 ±1.8</td><td>70.9 ±1.7</td></tr><tr><td>ResNet-18 +CO</td><td>95.9 ± 2.3</td><td>41.2 ±1.7</td></tr><tr><td>ResNet-18 +IV</td><td>91.0± 2.0</td><td>47.1 ± 15.1</td></tr><tr><td>ResNet-18 + CJ</td><td>95.2 ±0.6</td><td>43.5± 0.3</td></tr><tr><td>ResNet-18 +ours</td><td>95.9 ± 1.6</td><td>84.4 ± 4.5</td></tr></table>
|
| 66 |
+
|
| 67 |
+

|
| 68 |
+
Figure 2: Samples of dogs vs. cats dataset. The training set consists of bright dogs and dark cats, whereas the test set consists of dark dogs and bright cats.
|
| 69 |
+
|
| 70 |
+
Details of the random networks. We propose to utilize a single-layer convolutional neural network (CNN) as a random network, where its output has the same dimension with the input (see Appendix $\mathrm { D }$ for additional experimental results on the various types of random networks). To reinitialize the parameters of the random network, we utilize the following mixture of distributions: $\begin{array} { r } { P ( \phi ) = \alpha \mathbb { I } ( \phi = \mathbf { I } ) + ( 1 - \alpha ) \mathcal { N } \left( \mathbf { 0 } ; \sqrt { \frac { 2 } { n _ { \mathrm { i n } } + n _ { \mathrm { o u t } } } } \right) } \end{array}$ , where $\mathbf { I }$ is an identity kernel, $\alpha \in [ 0 , 1 ]$ is a positive constant, $\mathcal { N }$ denotes the normal distribution, and $n _ { \mathrm { i n } } , n _ { \mathrm { o u t } }$ are the number of input and output channels, respectively. Here, clean inputs are used with the probability $\alpha$ because training only randomized inputs can complicate training. The Xavier normal distribution (Glorot & Bengio, 2010) is used for randomization because it maintains the variance of the input $s$ and the randomized input ${ \widehat { s } } .$ We empirically observe that this distribution stabilizes training.
|
| 71 |
+
|
| 72 |
+
Removing visual bias. To confirm the desired effects of our method, we conduct an image classification experiment on the dogs and cats database from Kaggle.5 Following the same setup as $\operatorname { K i m }$ et al. (2019), we construct datasets with an undesirable bias as follows: the training set consists of bright dogs and dark cats while the test set consists of dark dogs and bright cats (see Appendix H for further details). A classifier is expected to make a decision based on the undesirable bias, (e.g., brightness and color) since CNNs are biased towards texture or color, rather than shape (Geirhos et al., 2019). Table 1 shows that ResNet-18 (He et al., 2016) does not generalize effectively due to overfitting to an undesirable bias in the training data. To address this issue, several image processing methods (Cubuk et al., 2019), such as grayout (GR), cutout (CO; DeVries & Taylor 2017), inversion (IV), and color jitter (CJ), can be applied (see Appendix C for further details). However, they are not effective in improving the generalization ability, compared to our method. This confirms that our approach makes DNNs capture more desired and meaningful information such as the shape by changing the visual appearance of attributes and entities in images while effectively keeping the semantic information. Prior sophisticated methods (Ganin et al., 2016; Kim et al., 2019) require additional information to eliminate such an undesired bias, while our method does not.6 Although we mainly focus on RL applications, our idea can also be explorable in this direction.
|
| 73 |
+
|
| 74 |
+
# 3.2 INFERENCE METHODS FOR SMALL VARIANCE
|
| 75 |
+
|
| 76 |
+
Since the parameter of random networks is drawn from a prior distribution $P ( \phi )$ , our policy is
|
| 77 |
+
modeled by a stochastic neural network: $\pi ( a | s ; \theta ) = \mathbb { E } _ { \phi } { \bigl [ } \pi \left( a | f \left( s ; \phi \right) ; \theta \right) { \bigr ] }$ . Based on this inter
|
| 78 |
+
pretation, our training procedure (i.e., randomizing the parameters) consists of training stochastic
|
| 79 |
+
models using the Monte Carlo (MC) approximation (with one sample per iteration). Therefore, $a$ taken b, where g the and pectations as follows:is the number of MC
|
| 80 |
+
$\begin{array} { r } { \pi \left( a | s ; \theta \right) \simeq \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \pi \left( a \Big | f \left( s ; \phi ^ { ( m ) } \right) ; \theta \right) } \end{array}$ $\phi ^ { ( m ) } \sim P \left( \phi \right)$ $M$ $M$
|
| 81 |
+
their decisions. The results show that this estimator improves the performance of the trained agents
|
| 82 |
+
by approximating the posterior distribution more accurately (see Figure 3(d)).
|
| 83 |
+
|
| 84 |
+
# 4 EXPERIMENTS
|
| 85 |
+
|
| 86 |
+
In this section, we demonstrate the effectiveness of the proposed method on 2D CoinRun (Cobbe et al., 2019), 3D DeepMind Lab exploration (Beattie et al., 2016), and 3D robotics control task (Fan et al., 2018). To evaluate the generalization ability, we measure the performance of trained agents in unseen environments which consist of different styles of backgrounds, objects, and floors. Due to the space limitation, we provide more detailed experimental setups and results in the Appendix.
|
| 87 |
+
|
| 88 |
+
# 4.1 BASELINES AND IMPLEMENTATION DETAILS
|
| 89 |
+
|
| 90 |
+
For CoinRun and DeepMind Lab experiments, similar to Cobbe et al. (2019), we take the CNN architecture used in IMPALA (Espeholt et al., 2018) as the policy network, and the Proximal Policy Optimization (PPO) (Schulman et al., 2017) method to train the agents.7 At each timestep, agents are given an observation frame of size $6 4 \times 6 4$ as input (resized from the raw observation of size $3 2 0 \times 2 4 0$ as in the DeepMind Lab), and the trajectories are collected with the 256-step rollout for training. For Surreal robotics experiments, similar to Fan et al. (2018), the hybrid of CNN and long short-term memory (LSTM) architecture is taken as the policy network, and a distributed version of PPO (i.e., actors collect a massive amount of trajectories, and the centralized learner updates the model parameters using PPO) is used to train the agents.8 We measure the performance in the unseen environment for every 10M timesteps and report the mean and standard deviation across three runs.
|
| 91 |
+
|
| 92 |
+
Our proposed method, which augments PPO with random networks and feature matching (FM) loss (denoted $\mathrm { P P O + }$ ours), is compared with several regularization and data augmentation methods. As regularization methods, we compare dropout (DO; Srivastava et al. 2014), L2 regularization (L2), and batch normalization (BN; Ioffe & Szegedy 2015). For those methods, we use the hyperparameters suggested in Cobbe et al. (2019), which are empirically shown to be effective: a dropout probability of 0.1 and a coefficient of $1 0 ^ { - 4 }$ for L2 regularization. We also consider various data augmentation methods: a variant of cutout (CO; DeVries & Taylor 2017) proposed in Cobbe et al. (2019), grayout (GR), inversion (IV), and color jitter (CJ) by adjusting brightness, contrast, and saturation (see Appendix $\mathrm { C }$ for more details). As an upper bound, we report the performance of agents trained directly on unseen environments, dented PPO (oracle). For our method, we use $\beta = 0 . 0 0 2$ for the weight of the FM loss, $\alpha = 0 . 1$ for the probability of skipping the random network, $M = 1 0$ for MC approximation, and a single-layer CNN with the kernel size of 3 as a random network.
|
| 93 |
+
|
| 94 |
+
# 4.2 EXPERIMENTS ON COINRUN
|
| 95 |
+
|
| 96 |
+
Task description. In this task, an agent is located at the leftmost side of the map and the goal is to collect the coin located at the rightmost side of the map within 1,000 timesteps. The agent observes its surrounding environment in the third-person point of view, where the agent is always located at the center of the observation. CoinRun contains an arbitrarily large number of levels which are generated deterministically from a given seed. In each level, the style of background, floor, and obstacles is randomly selected from the available themes (34 backgrounds, 6 grounds, 5 agents, and 9 moving obstacles). Some obstacles and pitfalls are distributed between the agent and the coin, where a collision with them results in the agent’s immediate death. We measure the success rates, which correspond to the number of collected coins divided by the number of played levels.
|
| 97 |
+
|
| 98 |
+
Ablation study on small-scale environments. First, we train agents on one level for 100M timesteps and measure the performance in unseen environments by only changing the style of the background, as shown in Figure 3(a). Note that these visual changes are not significant to the game’s dynamics, but the agent should achieve a high success rate if it can generalize accurately. However, Table 2 shows that all baseline agents fail to generalize to unseen environments, while they achieve a near-optimal performance in the seen environment. This shows that regularization techniques have no significant impact on improving the generalization ability. Even though data augmentation techniques, such as cutout (CO) and color jitter (CJ), slightly improve the performance, our proposed method is most effective because it can produce a diverse novelty in attributes and entities. Training with randomized inputs can degrade the training performance, but the high expressive power of DNNs prevents from it. The performance in unseen environments can be further improved by optimizing the FM loss. To verify the effectiveness of MC approximation at test time, we measure the performance in unseen environments by varying the number of MC samples. Figure 3(d) shows the mean and standard deviation across 50 evaluations. The performance and its variance can be improved by increasing the number of MC samples, but the improvement is saturated around ten samples. Thus, we use ten samples for the following experiments.
|
| 99 |
+
|
| 100 |
+
<table><tr><td rowspan="2"></td><td rowspan="2"></td><td>PPO</td><td>PPO +DO</td><td>PPO +L2</td><td>PPO +BN</td><td>PPO +CO</td><td>PPO +IV</td><td>PPO +GR</td><td>PPO +CJ</td><td colspan="2">PPO +ours</td></tr><tr><td>100</td><td>100</td><td>98.3</td><td>93.3</td><td>100</td><td>95.0</td><td>100</td><td>100</td><td>Rand 95.0</td><td>Rand + FM 100</td></tr><tr><td rowspan="2">Success rate</td><td>Seen</td><td>±0.0 34.6</td><td>±0.0 25.3</td><td>±2.9 34.1</td><td>±11.5 31.5</td><td>±0.0 41.9</td><td>±8.6 37.5</td><td>±0.0 26.9</td><td>±0.0 43.1</td><td>±7.1 76.7</td><td>±0.0 78.1</td></tr><tr><td>Unseen</td><td>±4.5</td><td>±12.0</td><td>±5.4</td><td>±13.1</td><td>±5.5</td><td>±0.8</td><td>±13.1</td><td>±1.4</td><td>±1.3</td><td>±3.5</td></tr><tr><td rowspan="2">Cycle- consistency</td><td>2-way</td><td>18.9 ±10.9</td><td>13.3 ±2.2</td><td>24.4 ±1.1</td><td>25.5 ±6.6</td><td>27.8 ±10.6</td><td>17.8 ±15.6</td><td>17.7 ±1.1</td><td>32.2 ±3.1</td><td>64.7 ±4.4</td><td>67.8 ±6.2</td></tr><tr><td>3-way</td><td>4.4 ±2.2</td><td>4.4 ±2.2</td><td>8.9 士3.8</td><td>7.4 ±1.2</td><td>9.6 ±5.6</td><td>5.6 土4.7</td><td>2.2 ±3.8</td><td>15.6 ±3.1</td><td>39.3 ±8.5</td><td>43.3 土4.7</td></tr></table>
|
| 101 |
+
|
| 102 |
+

|
| 103 |
+
Table 2: Success rate $( \% )$ and cycle-consistency $( \% )$ after 100M timesteps in small-scale CoinRun. The results show the mean and standard deviation averaged over three runs and the best results are indicated in bold.
|
| 104 |
+
Figure 3: (a) We collect multiple episodes from various environments by human demonstrators and visualize the hidden representation of trained agents optimized by (b) PPO and (c) $\mathrm { P P O } +$ ours constructed by t-SNE, where the colors of points indicate the environments of the corresponding observations. (d) Average success rates for varying number of MC samples.
|
| 105 |
+
|
| 106 |
+
Embedding analysis. We analyze whether the hidden representation of trained RL agents exhibits meaningful abstraction in the unseen environments. The features on the penultimate layer of trained agents are visualized and reduced to two dimensions using t-SNE (Maaten & Hinton, 2008). Figure 3 shows the projection of trajectories taken by human demonstrators in seen and unseen environments (see Figure 17 in Appendix $_ \mathrm { N }$ for further results). Here, trajectories from both seen and unseen environments are aligned on the hidden space of our agents, while the baselines yield scattered and disjointed trajectories. This implies that our method makes RL agents capable of learning the invariant and robust representation.
|
| 107 |
+
|
| 108 |
+
To evaluate the quality of hidden representation quantitatively, the cycle-consistency proposed in Aytar et al. (2018) is also measured. Given two trajectories $V$ and $U$ , $v _ { i } ~ \in ~ V$ first locates its nearest neighbor in the other trajectory $\begin{array} { r } { u _ { j } = \arg \operatorname* { m i n } _ { u \in U } \left\| h ( v _ { i } ) - h ( u ) \right\| ^ { 2 } } \end{array}$ , where $h ( \cdot )$ denotes the output of the penultimate layer of trained agents. Then, the nearest neighbor of $u _ { j }$ in $V$ is located, i.e., $v _ { k } = { \mathrm { a r g } } \operatorname* { m i n } _ { v \in V } \left\| h ( v ) - h ( u _ { j } ) \right\| ^ { 2 }$ , and $v _ { i }$ is defined as cycle-consistent if $| i - k | \leq 1$ , i.e., it can return to the original point. Note that this cycle-consistency implies that two trajectories are accurately aligned in the hidden space. Similar to Aytar et al. (2018), we also evaluate the three-way cycle-consistency by measuring whether $v _ { i }$ remains cycle-consistent along both paths, $V \to U \to J \to V$ and $V \to J \to U \to V$ , where $J$ is the third trajectory. Using the trajectories shown in Figure 3(a), Table 2 reports the percentage of input observations in the seen environment (blue curve) that are cycle-consistent with unseen trajectories (red and green curves). Similar to the results shown in Figure 3(c), our method significantly improves the cycle-consistency compared to the vanilla PPO agent.
|
| 109 |
+
|
| 110 |
+

|
| 111 |
+
Figure 4: Visualization of activation maps via Grad-CAM in seen and unseen environments in the small-scale CoinRun. Images are aligned with similar states from various episodes for comparison.
|
| 112 |
+
|
| 113 |
+

|
| 114 |
+
Figure 5: The performances of trained agents in unseen environments under (a) large-scale CoinRun, (b) DeepMind Lab and (c) Surreal robotics control. The solid/dashed lines and shaded regions represent the mean and standard deviation, respectively.
|
| 115 |
+
|
| 116 |
+
Visual interpretation. To verify whether the trained agents can focus on meaningful and highlevel information, the activation maps are visualized using Grad-CAM (Selvaraju et al., 2017) by averaging activations channel-wise in the last convolutional layer, weighted by their gradients. As shown in Figure 4, both vanilla PPO and our agents make a decision by focusing on essential objects, such as obstacles and coins in the seen environment. However, in the unseen environment, the vanilla PPO agent displays a widely distributed activation map in some cases, while our agent does not. As a quantitative metric, we measure the entropy of normalized activation maps. Specifically, we first normalize activations $\sigma _ { t , h , w } \in [ 0 , 1 ]$ , such that it represents a 2D discrete probability distribution at timestep as follow $t$ , i: $\begin{array} { r } { \sum _ { h = 1 } ^ { H } \sum _ { w = 1 } ^ { W } \sigma _ { t , h , w } = 1 } \end{array}$ asure the entropy averaged over the timesteps. Note that the entropy of the activation map $\begin{array} { r } { - \frac { 1 } { T } \sum _ { t = 1 } ^ { T } \sum _ { h = 1 } ^ { H } \sum _ { w = 1 } ^ { W } \ \sigma _ { t , h , w } \log \sigma _ { t , h , w } } \end{array}$ quantitatively measures the frequency an agent focuses on salient components in its observation. Results show that our agent produces a low entropy on both seen and unseen environments (i.e., 2.28 and 2.44 for seen and unseen, respectively), whereas the vanilla PPO agent produces a low entropy only in the seen environment (2.77 and 3.54 for seen and unseen, respectively).
|
| 117 |
+
|
| 118 |
+
Results on large-scale experiments. Similar to Cobbe et al. (2019), the generalization ability by training agents is evaluated on a fixed set of 500 levels of CoinRun. To explicitly separate seen and unseen environments, half of the available themes are utilized (i.e., style of backgrounds, floors, agents, and moving obstacles) for training, and the performances on 1,000 different levels consisting of unseen themes are measured.9 As shown in Figure 5(a), our method outperforms all baseline methods by a large margin. In particular, the success rates are improved from $3 9 . 8 \%$ to $5 8 . 7 \%$ compared to the PPO with cutout (CO) augmentation proposed in Cobbe et al. (2019), showing that our agent learns generalizable representations given a limited number of seen environments.
|
| 119 |
+
|
| 120 |
+
<table><tr><td rowspan="3"></td><td colspan="4">PPO</td><td colspan="2">PPO + ours</td></tr><tr><td>#of Seen Environments</td><td>Total Rewards</td><td>#of Seen Environments</td><td>Total Rewards</td><td>#of Seen Environments</td><td>Total Rewards</td></tr><tr><td>DeepMind Lab</td><td>1</td><td>55.4±33.2</td><td>16</td><td>218.3± 99.2</td><td>1</td><td>358.2±81.5</td></tr><tr><td>Surreal Robotics</td><td>1</td><td>59.2 ± 31.9</td><td>25</td><td>168.8 ± 155.8</td><td>1</td><td>356.8± 15.4</td></tr></table>
|
| 121 |
+
|
| 122 |
+
Table 3: Comparison with domain randomization. The results show the mean and standard deviation averaged over three runs and the best results are indicated in bold.
|
| 123 |
+
|
| 124 |
+
# 4.3 EXPERIMENTS ON DEEPMIND LAB AND SURREAL ROBOTICS CONTROL
|
| 125 |
+
|
| 126 |
+
Results on DeepMind Lab. We also demonstrate the effectiveness of our proposed method on DeepMind Lab (Beattie et al., 2016), which is a 3D game environment in the first-person point of view with rich visual inputs. The task is designed based on the standard exploration task, where a goal object is placed in one of the rooms in a 3D maze. In this task, agents aim to collect as many goal objects as possible within 90 seconds to maximize their rewards. Once the agent collects the goal object, it receives ten points and is relocated to a random place. Similar to the small-scale CoinRun experiment, agents are trained to collect the goal object in a fixed map layout and tested in unseen environments with only changing the style of the walls and floors. We report the mean and standard deviation of the average scores across ten different map layouts, which are randomly selected. Additional details are provided in Appendix G.
|
| 127 |
+
|
| 128 |
+
Note that a simple strategy of exploring the map actively and recognizing the goal object achieves high scores because the maze size is small in this experiment. Even though the baseline agents achieve high scores by learning this simple strategy in the seen environment (see Figure 6(c) in Appendix A for learning curves), Figure 5(b) shows that they fail to adapt to the unseen environments. However, the agent trained by our proposed method achieves high scores in both seen and unseen environments. These results show that our method can learn generalizable representations from high-dimensional and complex input observations (i.e., 3D environment).
|
| 129 |
+
|
| 130 |
+
Results on Surreal robotics control. We evaluate our method in the Block Lifting task using the Surreal distributed RL framework (Fan et al., 2018): the Sawyer robot receives a reward if it succeeds to lift a block randomly placed on a table. We train agents on a single environment and test on five unseen environments with various styles of tables and blocks (see Appendix I for further details). Figure 5(c) shows that our method achieves a significant performance gain compared to all baselines in unseen environments while maintaining its performance in the seen environment (see Figure 13 in Appendix I), implying that our method can maintain essential properties, such as structural spatial features of the input observation.
|
| 131 |
+
|
| 132 |
+
Comparison with domain randomization. To further verify the effectiveness of our method, the vanilla PPO agents are trained by increasing the number of seen environments generated by randomizing rendering in a simulator, while our agent is still trained in a single environment (see Appendices $\mathbf { G }$ and I for further details). Table 3 shows that the performance of baseline agents can be improved with domain randomization (Tobin et al., 2017). However, our method still outperforms the baseline methods trained with more diverse environments than ours, implying that our method is more effective in learning generalizable representations than simply increasing the (finite) number of seen environments.
|
| 133 |
+
|
| 134 |
+
# 5 CONCLUSION
|
| 135 |
+
|
| 136 |
+
In this paper, we explore generalization in RL where the agent is required to generalize to new environments in unseen visual patterns, but semantically similar. To improve the generalization ability, we propose to randomize the first layer of CNN to perturb low-level features, e.g., various textures, colors, or shapes. Our method encourages agents to learn invariant and robust representations by producing diverse visual input observations. Such invariant features could be useful for several other related topics, like an adversarial defense in RL (see Appendix B for further discussions), sim-to-real transfer (Tobin et al., 2017; Ren et al., 2019), transfer learning (Parisotto et al., 2016; Rusu et al., 2016a;b), and online adaptation (Nagabandi et al., 2019). We provide the more detailed discussions on an extension to the dynamics generalization and failure cases of our method in Appendix J and K, respectively.
|
| 137 |
+
|
| 138 |
+
# ACKNOWLEDGEMENTS
|
| 139 |
+
|
| 140 |
+
This work was supported in part by Kwanjeong Educational Foundation Scholarship and Sloan Research Fellowship. We also thank Sungsoo Ahn, Jongwook Choi, Wilka Carvalho, Yijie Guo, Yunseok Jang, Lajanugen Logeswaran, Sejun Park, Sungryull Sohn, Ruben Villegas, and Xinchen Yan for helpful discussions.
|
| 141 |
+
|
| 142 |
+
# REFERENCES
|
| 143 |
+
|
| 144 |
+
Yusuf Aytar, Tobias Pfaff, David Budden, Thomas Paine, Ziyu Wang, and Nando de Freitas. Playing hard exploration games by watching youtube. In NeurIPS, 2018.
|
| 145 |
+
|
| 146 |
+
Charles Beattie, Joel Z Leibo, Denis Teplyashin, Tom Ward, Marcus Wainwright, Heinrich Kuttler,¨ Andrew Lefrancq, Simon Green, V´ıctor Valdes, Amir Sadik, et al. Deepmind lab. ´ arXiv preprint arXiv:1612.03801, 2016.
|
| 147 |
+
|
| 148 |
+
Yuri Burda, Harrison Edwards, Amos Storkey, and Oleg Klimov. Exploration by random network distillation. In ICLR, 2019.
|
| 149 |
+
|
| 150 |
+
Bibhas Chakraborty and Susan A Murphy. Dynamic treatment regimes. Annual review of statistics and its application, 1:447–464, 2014.
|
| 151 |
+
|
| 152 |
+
Karl Cobbe, Oleg Klimov, Chris Hesse, Taehoon Kim, and John Schulman. Quantifying generalization in reinforcement learning. In ICML, 2019.
|
| 153 |
+
|
| 154 |
+
Ekin D Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V Le. Autoaugment: Learning augmentation policies from data. In CVPR, 2019.
|
| 155 |
+
|
| 156 |
+
Yue Deng, Feng Bao, Youyong Kong, Zhiquan Ren, and Qionghai Dai. Deep direct reinforcement learning for financial signal representation and trading. IEEE transactions on neural networks and learning systems, 28(3):653–664, 2016.
|
| 157 |
+
|
| 158 |
+
Terrance DeVries and Graham W Taylor. Improved regularization of convolutional neural networks with cutout. arXiv preprint arXiv:1708.04552, 2017.
|
| 159 |
+
|
| 160 |
+
Lasse Espeholt, Hubert Soyer, Remi Munos, Karen Simonyan, Volodymir Mnih, Tom Ward, Yotam Doron, Vlad Firoiu, Tim Harley, Iain Dunning, et al. Impala: Scalable distributed deep-rl with importance weighted actor-learner architectures. In ICML, 2018.
|
| 161 |
+
|
| 162 |
+
Linxi Fan, Yuke Zhu, Jiren Zhu, Zihua Liu, Orien Zeng, Anchit Gupta, Joan Creus-Costa, Silvio Savarese, and Li Fei-Fei. Surreal: Open-source reinforcement learning framework and robot manipulation benchmark. In CoRL, 2018.
|
| 163 |
+
|
| 164 |
+
Jesse Farebrother, Marlos C Machado, and Michael Bowling. Generalization and regularization in dqn. arXiv preprint arXiv:1810.00123, 2018.
|
| 165 |
+
|
| 166 |
+
Shani Gamrian and Yoav Goldberg. Transfer learning for related reinforcement learning tasks via image-to-image translation. In ICML, 2019.
|
| 167 |
+
|
| 168 |
+
Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, Franc¸ois Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. The Journal of Machine Learning Research, 17(1):2096–2030, 2016.
|
| 169 |
+
|
| 170 |
+
Robert Geirhos, Patricia Rubisch, Claudio Michaelis, Matthias Bethge, Felix A Wichmann, and Wieland Brendel. Imagenet-trained cnns are biased towards texture; increasing shape bias improves accuracy and robustness. In ICLR, 2019.
|
| 171 |
+
|
| 172 |
+
Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In AISTATS, 2010.
|
| 173 |
+
|
| 174 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NeurIPS, 2014.
|
| 175 |
+
|
| 176 |
+
Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In ICLR, 2015.
|
| 177 |
+
|
| 178 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
|
| 179 |
+
|
| 180 |
+
Irina Higgins, Arka Pal, Andrei Rusu, Loic Matthey, Christopher Burgess, Alexander Pritzel, Matthew Botvinick, Charles Blundell, and Alexander Lerchner. Darla: Improving zero-shot transfer in reinforcement learning. In ICML, 2017.
|
| 181 |
+
|
| 182 |
+
Sandy Huang, Nicolas Papernot, Ian Goodfellow, Yan Duan, and Pieter Abbeel. Adversarial attacks on neural network policies. arXiv preprint arXiv:1702.02284, 2017.
|
| 183 |
+
|
| 184 |
+
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015.
|
| 185 |
+
|
| 186 |
+
Byungju Kim, Hyunwoo Kim, Kyungsu Kim, Sungjin Kim, and Junmo Kim. Learning not to learn: Training deep neural networks with biased data. In CVPR, 2019.
|
| 187 |
+
|
| 188 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015.
|
| 189 |
+
|
| 190 |
+
Yen-Chen Lin, Zhang-Wei Hong, Yuan-Hong Liao, Meng-Li Shih, Ming-Yu Liu, and Min Sun. Tactics of adversarial attack on deep reinforcement learning agents. In IJCAI, 2017.
|
| 191 |
+
|
| 192 |
+
Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(Nov):2579–2605, 2008.
|
| 193 |
+
|
| 194 |
+
Marlos C Machado, Marc G Bellemare, Erik Talvitie, Joel Veness, Matthew Hausknecht, and Michael Bowling. Revisiting the arcade learning environment: Evaluation protocols and open problems for general agents. Journal of Artificial Intelligence Research, 61:523–562, 2018.
|
| 195 |
+
|
| 196 |
+
Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, and Shin Ishii. Virtual adversarial training: a regularization method for supervised and semi-supervised learning. IEEE transactions on pattern analysis and machine intelligence, 41(8):1979–1993, 2018.
|
| 197 |
+
|
| 198 |
+
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529, 2015.
|
| 199 |
+
|
| 200 |
+
Anusha Nagabandi, Chelsea Finn, and Sergey Levine. Deep online learning via meta-learning: Continual adaptation for model-based rl. In ICLR, 2019.
|
| 201 |
+
|
| 202 |
+
Ian Osband, John Aslanides, and Albin Cassirer. Randomized prior functions for deep reinforcement learning. In NeurIPS, 2018.
|
| 203 |
+
|
| 204 |
+
Charles Packer, Katelyn Gao, Jernej Kos, Philipp Krahenb ¨ uhl, Vladlen Koltun, and Dawn Song. ¨ Assessing generalization in deep reinforcement learning. arXiv preprint arXiv:1810.12282, 2018.
|
| 205 |
+
|
| 206 |
+
Emilio Parisotto, Jimmy Lei Ba, and Ruslan Salakhutdinov. Actor-mimic: Deep multitask and transfer reinforcement learning. In ICLR, 2016.
|
| 207 |
+
|
| 208 |
+
Xue Bin Peng, Marcin Andrychowicz, Wojciech Zaremba, and Pieter Abbeel. Sim-to-real transfer of robotic control with dynamics randomization. In ICRA, 2018.
|
| 209 |
+
|
| 210 |
+
Xinyi Ren, Jianlan Luo, Eugen Solowjow, Juan Aparicio Ojea, Abhishek Gupta, Aviv Tamar, and Pieter Abbeel. Domain randomization for active pose estimation. In ICRA, 2019.
|
| 211 |
+
|
| 212 |
+
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International journal of computer vision, 115(3):211–252, 2015.
|
| 213 |
+
|
| 214 |
+
Andrei A Rusu, Sergio Gomez Colmenarejo, Caglar Gulcehre, Guillaume Desjardins, James Kirkpatrick, Razvan Pascanu, Volodymyr Mnih, Koray Kavukcuoglu, and Raia Hadsell. Policy distillation. In ICLR, 2016a.
|
| 215 |
+
|
| 216 |
+
Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. arXiv preprint arXiv:1606.04671, 2016b.
|
| 217 |
+
|
| 218 |
+
Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In NeurIPS, 2016.
|
| 219 |
+
|
| 220 |
+
John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In ICML, 2015.
|
| 221 |
+
|
| 222 |
+
John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. Highdimensional continuous control using generalized advantage estimation. In ICLR, 2016.
|
| 223 |
+
|
| 224 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 225 |
+
|
| 226 |
+
Ramprasaath R Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Grad-cam: Visual explanations from deep networks via gradient-based localization. In ICCV, 2017.
|
| 227 |
+
|
| 228 |
+
David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, et al. Mastering the game of go without human knowledge. Nature, 550(7676):354, 2017.
|
| 229 |
+
|
| 230 |
+
David Silver, Thomas Hubert, Julian Schrittwieser, Ioannis Antonoglou, Matthew Lai, Arthur Guez, Marc Lanctot, Laurent Sifre, Dharshan Kumaran, Thore Graepel, et al. A general reinforcement learning algorithm that masters chess, shogi, and go through self-play. Science, 362(6419):1140– 1144, 2018.
|
| 231 |
+
|
| 232 |
+
Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 15(1):1929–1958, 2014.
|
| 233 |
+
|
| 234 |
+
Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In ICLR, 2014.
|
| 235 |
+
|
| 236 |
+
Josh Tobin, Rachel Fong, Alex Ray, Jonas Schneider, Wojciech Zaremba, and Pieter Abbeel. Domain randomization for transferring deep neural networks from simulation to the real world. In IROS, 2017.
|
| 237 |
+
|
| 238 |
+
Oriol Vinyals, Timo Ewalds, Sergey Bartunov, Petko Georgiev, Alexander Sasha Vezhnevets, Michelle Yeo, Alireza Makhzani, Heinrich Kuttler, John Agapiou, Julian Schrittwieser, et al. ¨ Starcraft ii: A new challenge for reinforcement learning. arXiv preprint arXiv:1708.04782, 2017.
|
| 239 |
+
|
| 240 |
+
Jane X Wang, Zeb Kurth-Nelson, Dhruva Tirumala, Hubert Soyer, Joel Z Leibo, Remi Munos, Charles Blundell, Dharshan Kumaran, and Matt Botvinick. Learning to reinforcement learn. arXiv preprint arXiv:1611.05763, 2016.
|
| 241 |
+
|
| 242 |
+
Ronald J Williams and Jing Peng. Function optimization using connectionist reinforcement learning algorithms. Connection Science, 3(3):241–268, 1991.
|
| 243 |
+
|
| 244 |
+
Qizhe Xie, Zihang Dai, Eduard Hovy, Minh-Thang Luong, and Quoc V Le. Unsupervised data augmentation. arXiv preprint arXiv:1904.12848, 2019.
|
| 245 |
+
|
| 246 |
+
Amy Zhang, Nicolas Ballas, and Joelle Pineau. A dissection of overfitting and generalization in continuous reinforcement learning. arXiv preprint arXiv:1806.07937, 2018a.
|
| 247 |
+
|
| 248 |
+
Chiyuan Zhang, Oriol Vinyals, Remi Munos, and Samy Bengio. A study on overfitting in deep reinforcement learning. arXiv preprint arXiv:1804.06893, 2018b.
|
| 249 |
+
|
| 250 |
+
Wenxuan Zhou, Lerrel Pinto, and Abhinav Gupta. Environment probing interaction policies. In ICLR, 2019.
|
| 251 |
+
|
| 252 |
+
# Appendix: Network Randomization: A Simple Technique for Generalization in Deep Reinforcement Learning
|
| 253 |
+
|
| 254 |
+
# A LEARNING CURVES
|
| 255 |
+
|
| 256 |
+

|
| 257 |
+
Figure 6: Learning curves on (a) small-scale, (b) large-scale CoinRun and (c) DeepMind Lab. The solid line and shaded regions represent the mean and standard deviation, respectively, across three runs.
|
| 258 |
+
|
| 259 |
+

|
| 260 |
+
Figure 7: The performance in unseen environments in small-scale CoinRun. The solid/dashed line and shaded regions represent the mean and standard deviation, respectively, across three runs.
|
| 261 |
+
|
| 262 |
+
# B ROBUSTNESS AGAINST ADVERSARIAL ATTACKS
|
| 263 |
+
|
| 264 |
+
The adversarial (visually imperceptible) perturbation (Szegedy et al., 2014) to clean input observations can induce the DNN-based policies to generate an incorrect decision at test time (Huang et al., 2017; Lin et al., 2017). This undesirable property of DNNs has raised major security concerns. In this section, we evaluate if the proposed method can improve the robustness on adversarial attacks. Our method is expected to improve the robustness against such adversarial attacks because the agents are trained with randomly perturbed inputs. To verify that the proposed method can improve the robustness to adversarial attacks, the adversarial samples are generated using FGSM (Goodfellow et al., 2015) by perturbing inputs to the opposite direction to the most probable action initially predicted by the policy:
|
| 265 |
+
|
| 266 |
+
$$
|
| 267 |
+
s _ { \mathrm { a d v } } = s - \varepsilon \mathrm { s i g n } \left( \nabla _ { s } \log \pi ( a ^ { * } | s ; \theta ) \right) ,
|
| 268 |
+
$$
|
| 269 |
+
|
| 270 |
+
where $\varepsilon$ is the magnitude of noise and $a ^ { * } = \arg \operatorname* { m a x } _ { a } \pi ( a | s ; \theta )$ is the action from the policy. Table 4 shows that our proposed method can improve the robustness against FGSM attacks with $\varepsilon = 0 . 0 1$ , which implies that hidden representations of trained agents are more robust.
|
| 271 |
+
|
| 272 |
+
<table><tr><td rowspan="2"></td><td colspan="2">Small-Scale CoinRun</td><td colspan="2">Large-Scale CoinRun</td><td colspan="2">DeepMind Lab</td></tr><tr><td>Clean</td><td>FGSM</td><td>Clean</td><td>FGSM</td><td>Clean</td><td>FGSM</td></tr><tr><td>PPO</td><td>100</td><td>61.5 (-38.5)</td><td>96.2</td><td>77.4 (-19.5)</td><td>352.5</td><td>163.5 (-53.6)</td></tr><tr><td>PPO +ours</td><td>100</td><td>88.0 (-12.0)</td><td>99.6</td><td>84.4 (-15.3)</td><td>368.0</td><td>184.0 (-50.0)</td></tr></table>
|
| 273 |
+
|
| 274 |
+
Table 4: Robustness against FGSM attacks on training environments. The values in parentheses represent the relative reductions from the clean samples.
|
| 275 |
+
|
| 276 |
+
# C DETAILS FOR TRAINING AGENTS USING PPO
|
| 277 |
+
|
| 278 |
+
Policy optimization. For all baselines and our methods, PPO is utilized to train the policies. Specifically, we use a discount factor $\gamma = 0 . 9 9 9$ , a generalized advantage estimator (GAE) Schulman et al. (2016) parameter $\lambda = 0 . 9 5$ , and an entropy bonus (Williams & Peng, 1991) of 0.01 to ensure sufficient exploration. We extract 256 timesteps per rollout, and then train the agent for 3 epochs with 8 mini-batches. The Adam optimizer (Kingma & Ba, 2015) is used with the starting learning rate 0.0005. We run 32 environments simultaneously during training. As suggested in Cobbe et al. (2019), two boxes are painted in the upper-left corner, where their color represents the $x \cdot$ - and $y$ -axis velocity to help the agents quickly learn to act optimally. In this way, the agent does not need to memorize previous states, so a simple CNN-based policy without LSTM can effectively perform in our experimental settings.
|
| 279 |
+
|
| 280 |
+
Data augmentation methods. In this paper, we compare a variant of cutout (DeVries & Taylor, 2017) proposed in Cobbe et al. (2019), grayout, inversion, and color jitter (Cubuk et al., 2019). Specifically, the cutout augmentation applies a random number of boxes in random size and color to the input, the grayout method averages all three channels of the input, the inversion method inverts pixel values by a $50 \%$ chance, and the color jitter changes the characteristics of images commonly used for data augmentation in computer vision tasks: brightness, contrast, and saturation. For every timestep in the cutout augmentation, we first randomly choose the number of boxes from zero to five, assign them a random color and size, and place them in the observation. For the color jitter, the parameters for brightness, contrast, and saturation are randomly chosen in [0.5,1.5].10 For each episode, the parameters of these methods are randomized and fixed such that the same image preprocessing is applied within an episode.
|
| 281 |
+
|
| 282 |
+
# D DIFFERENT TYPES OF RANDOM NETWORKS
|
| 283 |
+
|
| 284 |
+
In this section, we apply random networks to various locations in the network architecture (see Figure 9) and measure the performance in large-scale CoinRun without the feature matching loss. For all methods, a single-layer CNN is used with a kernel size of 3, and its output tensor is padded in order to be in the same dimension as the input tensor. As shown in Figure 8, the performance of unseen environments decreases as the random network is placed in higher layers. On the other hand, the random network in residual connections improves the generalization performance, but it does not outperform the case when a random network is placed at the beginning of the network, meaning that randomizing only the local features of inputs can be effective for a better generalization performance.
|
| 285 |
+
|
| 286 |
+

|
| 287 |
+
Figure 8: The performance of random networks in various locations in the network architecture on (a) seen and (b) unseen environments in large-scale CoinRun. We show the mean performances averaged over three different runs, and shaded regions represent the standard deviation.
|
| 288 |
+
|
| 289 |
+

|
| 290 |
+
Figure 9: Network architectures with random networks in various locations. Only convolutional layers and the last fully connected layer are displayed for conciseness.
|
| 291 |
+
|
| 292 |
+
# E ENVIRONMENTS IN SMALL-SCALE COINRUN
|
| 293 |
+
|
| 294 |
+
For small-scale CoinRun environments, we consider a fixed map layout with two moving obstacles and measure the performance of the trained agents by changing the style of the backgrounds (see Figure 10). Below is the list of seen and unseen backgrounds in this experiment:
|
| 295 |
+
|
| 296 |
+
◦ Seen background:
|
| 297 |
+
|
| 298 |
+

|
| 299 |
+
Figure 10: Examples of seen and unseen environments in small-scale CoinRun.
|
| 300 |
+
|
| 301 |
+
• kenney/Backgrounds/blue_desert.png
|
| 302 |
+
|
| 303 |
+
# ◦ Unseen backgrounds:
|
| 304 |
+
|
| 305 |
+
• kenney/Backgrounds/colored_desert.png
|
| 306 |
+
• kenney/Backgrounds/colored_grass.png backgrounds/game-backgrounds/seabed.png backgrounds/game-backgrounds/G049_OT000_002A__background.png backgrounds/game-backgrounds/Background.png
|
| 307 |
+
• backgrounds/game-backgrounds/Background (4).png
|
| 308 |
+
• backgrounds/game-backgrounds/BG_only.png
|
| 309 |
+
• backgrounds/game-backgrounds/bg1.png
|
| 310 |
+
• backgrounds/game-backgrounds/G154_OT000_002A__background.png
|
| 311 |
+
• backgrounds/game-backgrounds/Background (5).png backgrounds/game-backgrounds/Background (2).png backgrounds/game-backgrounds/Background (3).png
|
| 312 |
+
• backgrounds/background-from-glitch-assets/background.png
|
| 313 |
+
• backgrounds/spacebackgrounds-0/deep_space_01.png
|
| 314 |
+
• backgrounds/spacebackgrounds-0/spacegen_01.png
|
| 315 |
+
• backgrounds/spacebackgrounds-0/milky_way_01.png
|
| 316 |
+
• backgrounds/spacebackgrounds-0/deep_sky_01.png
|
| 317 |
+
• backgrounds/spacebackgrounds-0/space_nebula_01.png
|
| 318 |
+
• backgrounds/space-backgrounds-3/Background-1.png backgrounds/space-backgrounds-3/Background-2.png
|
| 319 |
+
• backgrounds/space-backgrounds-3/Background-3.png
|
| 320 |
+
• backgrounds/space-backgrounds-3/Background-4.png
|
| 321 |
+
• backgrounds/background-2/airadventurelevel1.png
|
| 322 |
+
• backgrounds/background-2/airadventurelevel2.png
|
| 323 |
+
• backgrounds/background-2/airadventurelevel3.png
|
| 324 |
+
• backgrounds/background-2/airadventurelevel4.png
|
| 325 |
+
|
| 326 |
+
# F ENVIRONMENTS IN LARGE-SCALE COINRUN
|
| 327 |
+
|
| 328 |
+
In CoinRun, there are 34 themes for backgrounds, 6 for grounds, 5 for agents, and 9 for obstacles. For the large-scale CoinRun experiment, we train agents on a fixed set of 500 levels of CoinRun using half of the available themes and measure the performances on 1,000 different levels consisting of unseen themes. Specifically, the following is a list of seen and unseen themes used in this experiment:
|
| 329 |
+
|
| 330 |
+
◦ Seen backgrounds:
|
| 331 |
+
|
| 332 |
+
• kenney/Backgrounds/blue_desert.png • kenney/Backgrounds/blue_grass.png • kenney/Backgrounds/blue_land.png • kenney/Backgrounds/blue_shroom.png
|
| 333 |
+
|
| 334 |
+

|
| 335 |
+
Figure 11: Examples of seen and unseen environments in large-scale CoinRun.
|
| 336 |
+
|
| 337 |
+
• kenney/Backgrounds/colored_desert.png
|
| 338 |
+
• kenney/Backgrounds/colored_grass.png
|
| 339 |
+
• kenney/Backgrounds/colored_land.png
|
| 340 |
+
• backgrounds/game-backgrounds/seabed.png
|
| 341 |
+
• backgrounds/game-backgrounds/G049_OT000_002A__background.png backgrounds/game-backgrounds/Background.png
|
| 342 |
+
• backgrounds/game-backgrounds/Background (4).png
|
| 343 |
+
backgrounds/game-backgrounds/BG_only.png backgrounds/game-backgrounds/bg1.png
|
| 344 |
+
• backgrounds/game-backgrounds/G154_OT000_002A__background.png
|
| 345 |
+
• backgrounds/game-backgrounds/Background (5).png
|
| 346 |
+
• backgrounds/game-backgrounds/Background (2).png
|
| 347 |
+
• backgrounds/game-backgrounds/Background (3).png
|
| 348 |
+
|
| 349 |
+
# ◦ Unseen backgrounds:
|
| 350 |
+
|
| 351 |
+
• backgrounds/background-from-glitch-assets/background.png • backgrounds/spacebackgrounds-0/deep_space_01.png • backgrounds/spacebackgrounds-0/spacegen_01.png • backgrounds/spacebackgrounds-0/milky_way_01.png backgrounds/spacebackgrounds-0/ez_space_lite_01.png backgrounds/spacebackgrounds-0/meyespace_v1_01.png • backgrounds/spacebackgrounds-0/eye_nebula_01.png • backgrounds/spacebackgrounds-0/deep_sky_01.png • backgrounds/spacebackgrounds-0/space_nebula_01.png • backgrounds/space-backgrounds-3/Background-1.png • backgrounds/space-backgrounds-3/Background-2.png • backgrounds/space-backgrounds-3/Background-3.png
|
| 352 |
+
|
| 353 |
+
• backgrounds/space-backgrounds-3/Background-4.png • backgrounds/background-2/airadventurelevel1.png • backgrounds/background-2/airadventurelevel2.png • backgrounds/background-2/airadventurelevel3.png • backgrounds/background-2/airadventurelevel4.png
|
| 354 |
+
|
| 355 |
+
◦ Seen grounds:
|
| 356 |
+
|
| 357 |
+
• Dirt • Grass • Planet ◦ Unseen grounds:
|
| 358 |
+
|
| 359 |
+
• Sand • Snow • Stone
|
| 360 |
+
|
| 361 |
+
◦ Seen player themes:
|
| 362 |
+
|
| 363 |
+
• Beige • Blue
|
| 364 |
+
|
| 365 |
+
◦ Unseen player themes:
|
| 366 |
+
|
| 367 |
+
• Green • Pink • Yellow
|
| 368 |
+
|
| 369 |
+

|
| 370 |
+
Figure 12: The top-down view of the trained map layouts.
|
| 371 |
+
|
| 372 |
+
# G ENVIRONMENTS ON DEEPMIND LAB
|
| 373 |
+
|
| 374 |
+
Dataset. Among the styles (textures and colors) provided for the 3D maze in the DeepMind Lab, we take ten different styles of floors and walls, respectively (see the list below). We construct a training dataset by randomly choosing a map layout and assigning a theme among ten floors and walls, respectively. The domain randomization method compared in Table 3 uses four floors and four wall themes (16 combinations in total). Trained themes are randomly chosen before training and their combinations are considered to be seen environments. To evaluate the generalization ability, we measure the performance of trained agents on unseen environments by changing the styles of walls and floors. Domain randomization has more seen themes than the other methods, so all methods are compared with six floors and six walls (36 combinations in total), which are unseen for all methods. The mean and standard deviation of the average scores across ten different map layouts are reported in Figure 12.
|
| 375 |
+
|
| 376 |
+
# ◦ Floor themes:
|
| 377 |
+
|
| 378 |
+
• lg_style_01_floor_orange • lg_style_01_floor_blue • lg_style_02_floor_blue • lg_style_02_floor_green • lg_style_03_floor_green • lg_style_03_floor_blue • lg_style_04_floor_blue • lg_style_04_floor_orange • lg_style_05_floor_blue • lg_style_05_floor_orange
|
| 379 |
+
|
| 380 |
+
# ◦ Wall themes:
|
| 381 |
+
|
| 382 |
+
• lg_style_01_wall_green • lg_style_01_wall_red lg_style_02_wall_yellow lg_style_02_wall_blue lg_style_03_wall_orange lg_style_03_wall_gray lg_style_04_wall_green lg_style_04_wall_red lg_style_05_wall_red • lg_style_05_wall_yellow
|
| 383 |
+
|
| 384 |
+
Action space. Similar to IMPALA (Espeholt et al., 2018), the agent can take eight actions from the DeepMind Lab native action samples: {Forward, Backward, Move Left, Move Right, Look Left, Look Right, Forward $^ +$ Look Left, and Forward $^ +$ Look Right}. Table 5 describes the detailed mapping.
|
| 385 |
+
|
| 386 |
+
<table><tr><td>Action</td><td>DeepMind Lab Native Action</td></tr><tr><td>Forward</td><td>0, 0, 0, 1, 0 ,</td></tr><tr><td>Backward</td><td>[ [ 0, 0, 0, -1, 0, 1</td></tr><tr><td>Move Left</td><td>0, 0, -1, 0,</td></tr><tr><td>Move Right</td><td>0, 0, 1, 0,</td></tr><tr><td>Look Left</td><td>[-20, 0, 0, 0,</td></tr><tr><td>Look Right</td><td>【20, 0, 0, 0,</td></tr><tr><td>Forward +LookLeft</td><td>[-20, 0, 0, 1,</td></tr><tr><td>Forward + Look Right</td><td>【20, 0, 0, 1,</td></tr></table>
|
| 387 |
+
|
| 388 |
+
Table 5: Action set used in the DeepMind Lab experiment. The DeepMind Lab native action set consists of seven discrete actions encoded in integers ([L,U] indicates the lower/upper bound of the possible values): 1) yaw (left/right) rotation by pixel [-512,512], 2) pitch (up/down) rotation by pixel [-512,512], 3) horizontal move [-1,1], 4) vertical move [-1,1], 5) fire [0,1], 6) jump [0,1], and 7) crouch [0,1].
|
| 389 |
+
|
| 390 |
+
# H EXPERIMENTS ON DOGS AND CATS DATABASE
|
| 391 |
+
|
| 392 |
+
Dataset. The original database is a set of 25,000 images of dogs and cats for training and 12,500 images for testing. Similar to Kim et al. (2019), the data is manually categorized according to the color of the animal: bright or dark. Biased datasets are constructed such that the training set consists of bright dogs and dark cats, while the test and validation sets contain dark dogs and bright cats. Specifically, training, validation, and test sets consist of 10,047, 1,000, and 5,738 images, respectively.11 ResNet-18 (He et al., 2016) is trained with an initial learning rate chosen from $\left. 0 . 0 5 , \bar { 0 } . 1 \right.$
|
| 393 |
+
|
| 394 |
+
and then dropped by 0.1 at 50 epochs with a total of 100 epochs. We use the Nesterov momentum of 0.9 for SGD, a mini-batch size chosen from $\{ 3 2 , 6 4 \}$ , and the weight decay set to 0.0001. We report the training and test set accuracies with the hyperparameters chosen by validation. Unlike Kim et al. (2019), we do not use ResNet-18 pre-trained with ImageNet (Russakovsky et al., 2015) in order to avoid inductive bias from the pre-trained dataset.
|
| 395 |
+
|
| 396 |
+
# I EXPERIMENTAL RESULTS ON SURREAL ROBOT MANIPULATION
|
| 397 |
+
|
| 398 |
+
Our method is evaluated in the Block Lifting task using the Surreal distributed RL framework (Fan et al., 2018). In this task, the Sawyer robot receives a reward if it successfully lifts a block randomly placed on a table. Following the experimental setups in (Fan et al., 2018), the hybrid CNN-LSTM architecture (see Figure 13(a)) is chosen as the policy network and a distributed version of PPO (i.e., actors collect massive amount of trajectories and the centralized learner updates the model parameters using PPO) is used to train the agents.12 Agents take $8 4 \times 8 4$ observation frames with proprioceptive features (e.g., robot joint positions and velocities) and output the mean and log of the standard deviation for each action dimension. The actions are then sampled from the Gaussian distribution parameterized by the output. Agents are trained on a single environment and tested on five unseen environments with various styles of table, floor, and block, as shown in Figure 14. For the Surreal robot manipulation experiment, the vanilla PPO agent is trained on 25 environments generated by changing the styles of tables and boxes. Specifically, we use {blue, gray, orange, white, purple $\}$ and {red, blue, green, yellow, cyan} for table and box, respectively.
|
| 399 |
+
|
| 400 |
+

|
| 401 |
+
Figure 13: (a) An illustration of network architectures for the Surreal robotics control experiment, and learning curves with (b) regularization and (c) data augmentation techniques. The solid line and shaded regions represent the mean and standard deviation, respectively, across three runs.
|
| 402 |
+
|
| 403 |
+
# J EXTENSION TO DOMAINS WITH DIFFERENT DYNAMICS
|
| 404 |
+
|
| 405 |
+
In this section, we consider an extension to the generalization on domains with different dynamics. Similar to dynamics randomization (Peng et al., 2018), one can expect that our idea can be useful for improving the dynamics generalization. To verify this, we conduct an experiment on CartPole and Hopper environments where an agent takes proprioceptive features (e.g., positions and velocities). The goal of CartPole is to prevent the pole from falling over, while that of Hopper is to make an onelegged robot hop forward as fast as possible, respectively. Similar to the randomization method we applied to visual inputs, we introduce a random layer between the input and the model. As a natural extension of the proposed method, we consider performing the convolution operation by multiplying a $d \times d$ diagonal matrix to $d$ -dimensional input states. For every training iteration, the elements of the matrix are sampled from the standard uniform distribution $U ( 0 . 8 , 1 . 2 )$ . One can note that this method can randomize the amplitude of input states while maintaining the intrinsic information (e.g., sign of inputs). Following Packer et al. (2018); Zhou et al. (2019), we measure the performance of the trained agents on unseen environments with a different set of dynamics parameters, such as mass, length, and force. Specifically, for CartPole experiments, similar to Packer et al. (2018), the policy and value functions are multi-layer perceptrons (MLPs) with two hidden layers of 64 units each and hyperbolic tangent activation and the Proximal Policy Optimization (PPO) (Schulman et al., 2017) method is used to train the agents. The parameters of the training environment are fixed at the default values in the implementations from Gym, while force, length, and mass of environments are sampled from $[ 1 , 5 ] \cup$ [15, 20], [0.05, 0.25] ∪ [0.75, 1.0], $[ 0 . 0 1 , 0 . { \overset { \cdot } { 0 } } 5 ] \cup [ 0 . 5 , 1 . 0 ]$ that the policy has never seen in any stage of training.13 For Hopper experiments, similar to Zhou et al. (2019), the policy is a MLP with two hidden layers of 32 units each and ReLU activation and value function is a linear model. The trust region policy optimization (TRPO) (Schulman et al., 2015) method is used to train the agents. The mass of the training environment is sampled from $\{ 1 . 0 , 2 . 0 , 3 . 0 , 4 . 0 , 5 . 0 \}$ , while it is sampled from $\{ 6 . 0 , 7 . 0 , 8 . 0 \}$ during testing.14 Figure 15 reports the mean and standard deviation across 3 runs. Our simple randomization improves the performance of the agents in unseen environments, while achieving performance comparable to seen environments. We believe that this evidences a wide applicability of our idea beyond visual changes.
|
| 406 |
+
|
| 407 |
+

|
| 408 |
+
Figure 14: Examples of seen and unseen environments in the Surreal robot manipulation.
|
| 409 |
+
|
| 410 |
+

|
| 411 |
+
Figure 15: Performances of trained agents in seen and unseen environments under $( \mathrm { a } / \mathrm { b } )$ CartPole and $( \mathrm { c } / \mathrm { d } )$ Hopper. The solid/dashed lines and shaded regions represent the mean and standard deviation, respectively.
|
| 412 |
+
|
| 413 |
+

|
| 414 |
+
Figure 16: (a) Modified CoinRun with good and bad coins. The performances on (b) seen and (c) unseen environments. The solid line and shaded regions represent the mean and standard deviation, respectively, across three runs. (d) Average success rates on large-scale CoinRun for varying the fraction of clean samples during training. Noe that $\alpha = 1$ corresponds to vanilla PPO agents.
|
| 415 |
+
|
| 416 |
+
# K FAILURE CASE OF OUR METHODS
|
| 417 |
+
|
| 418 |
+
In this section, we verify whether the proposed method can handle color (or texture)-conditioned RL tasks. One might expect that such RL tasks can be difficult for our methods to work because of the randomization. For example, our methods would fail if we consider an extreme seek-avoid object gathering setup, where the agent must learn to collect good objects and avoid bad objects which have the same shape but different color. However, we remark that our method would not always fail for such tasks if other environmental factors (e.g., the shape of objects in Collect Good Objects in DeepMind Lab (Beattie et al., 2016)) are available to distinguish them. To verify this, we consider a modified CoinRun environment where the agent must learn to collect good objects (e.g., gold coin) and avoid bad objects (e.g., silver coin). Similar to the small-scale CoinRun experiment, agents are trained to collect the goal object in a fixed map layout (see Figure 16(a)) and tested in unseen environments with only changing the style of the background. Figure 16(b) shows that our method can work well for such color-conditioned RL tasks because a trained agent can capture the other factors such as a location to perform this task. Besides, our method achieves a significant performance gain compared to vanilla PPO agent in unseen environments as shown in Figure 16(c).
|
| 419 |
+
|
| 420 |
+
As another example, in color-matching tasks such as the keys doors puzzle in DeepMind Lab (Beattie et al., 2016), the agent must collect colored keys to open matching doors. Even though this task is color-conditioned, a policy trained with our method can perform well because the same colored objects will have the same color value even after randomization, i.e., our randomization method still maintains the structure of input observation. This evidences the wide applicability of our idea. We also remark that our method can handle more extreme corner cases by adjusting the fraction of clean samples during training. In summary, we believe that the proposed method covers a broad scope of generalization across low-level transformations in the observation space features.
|
| 421 |
+
|
| 422 |
+
# L ABLATION STUDY FOR FRACTION OF CLEAN SAMPLES
|
| 423 |
+
|
| 424 |
+
We investigate the effect of the fraction of clean samples. Figure 16(d) shows that the best unseen performance is achieved when the fraction of clean samples is 0.1 on large-scale CoinRun.
|
| 425 |
+
|
| 426 |
+
# M TRAINING ALGORITHM
|
| 427 |
+
|
| 428 |
+
# Algorithm 1 PPO + random networks, Actor-Critic Style
|
| 429 |
+
|
| 430 |
+
<table><tr><td>for iteration= 1,2,·.· do Sample the parameterΦof random networks from prior distribution P() foractor=1,2,.,Ndo</td></tr><tr><td>Run policy π (alf (s; Φ) ; 0) in the given environment for T timesteps Compute advantage estimates</td></tr><tr><td>end for</td></tr><tr><td>Optimize Lrandom in equation (3) with respect to 0 end for</td></tr></table>
|
| 431 |
+
|
| 432 |
+

|
| 433 |
+
Figure 17: Visualization of the hidden representation of trained agents optimized by (a) PPO, (b) $\mathrm { P P O } + \mathrm { L } 2$ , (c) $\mathrm { P P O + B N }$ , (d) $\mathrm { P P O } + \mathrm { D O }$ , (e) $\mathrm { P P O } + \mathrm { C O }$ , (f) $\mathrm { P P O } + \mathrm { G R }$ , (g) $\mathrm { P P O + I V } ,$ (h) $\mathrm { P P O } + \mathrm { C J }$ , and (I) $\mathrm { P P O + }$ ours using t-SNE. The point colors indicate the environments of the corresponding observations.
|
md/train/HkxBJT4YvB/HkxBJT4YvB.md
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LEARNING DISENTANGLED REPRESENTATIONS FORCOUNTERFACTUAL REGRESSION
|
| 2 |
+
|
| 3 |
+
Negar Hassanpour & Russell Greiner
|
| 4 |
+
|
| 5 |
+
Department of Computing Science University of Alberta Edmonton, Alberta, T6G 2E8, CANADA {hassanpo,rgreiner}@ualberta.ca
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
We consider the challenge of estimating treatment effects from observational data; and point out that, in general, only some factors based on the observed covariates $X$ contribute to selection of the treatment $T$ , and only some to determining the outcomes $Y$ . We model this by considering three underlying sources of $\{ X , T , Y \}$ and show that explicitly modeling these sources offers great insight to guide designing models that better handle selection bias in observational datasets. This paper is an attempt to conceptualize this line of thought and provide a path to explore it further.
|
| 10 |
+
|
| 11 |
+
In this work, we propose an algorithm to (1) identify disentangled representations of the above-mentioned underlying factors from any given observational dataset $\mathcal { D }$ and (2) leverage this knowledge to reduce, as well as account for, the negative impact of selection bias on estimating the treatment effects from $\mathcal { D }$ . Our empirical results show that the proposed method achieves state-of-the-art performance in both individual and population based evaluation measures.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
As we rely more and more on artificial intelligence (AI) to automate the decision making processes, accurately estimating the causal effects of taking different actions gains an essential role. A prominent example is precision medicine $- i . e .$ , the customization of health-care tailored to each individual patient – which attempts to identify which medical procedure $t \in \tau$ will benefit a certain patient $x$ the most, in terms of the treatment outcome $y \in \mathbb { R }$ . Learning such models requires answering counterfactual questions (Rubin, 1974; Pearl, 2009) such as: “Would this patient have lived longer [and by how much], had she received an alternative treatment?”.
|
| 16 |
+
|
| 17 |
+
For notation: a dataset $\mathcal { D } = \{ [ x _ { i } , t _ { i } , y _ { i } ] \} _ { i = 1 } ^ { N }$ used for treatment effect estimation has the following format: for the $i ^ { t h }$ instance (e.g., patient), we have some context information $x _ { i } \in \mathcal { X } \subseteq \mathbb { R } ^ { K }$ (e.g., age, BMI, blood work, etc.), the administered treatment $t _ { i }$ chosen from a set of treatment options $\tau$ (e.g., {0: medication, 1: surgery}), and the respective observed outcome $y _ { i } \in \mathcal { V }$ (e.g., survival time; $\mathcal { V } \subseteq \mathbb { R } ^ { + }$ ) as a result of receiving treatment $t _ { i }$ . Note that $\mathcal { D }$ only contains the outcome of the administered treatment (aka observed outcome: $y _ { i }$ ), but not the outcome(s) of the alternative treatment(s) (aka counterfactual outcome(s): $y _ { i } ^ { t }$ for $t \in \mathcal { T } \backslash \{ t _ { i } \} )$ , which are inherently unobservable. For the binary-treatment case, we denote the alternative treatment as $\neg t _ { i } = 1 - t _ { i }$ .
|
| 18 |
+
|
| 19 |
+
Pearl (2009) demonstrates that, in general, causal relationships can only be learned by experimentation (on-line exploration), or running a Randomized Controlled Trial (RCT), where the treatment assignment does not depend on the individual $X - { \mathsf { s e e } }$ Figure 1(a). In many cases, however, this is expensive, unethical, or even infeasible. Here, we are forced to approximate treatment effects from off-line datasets collected through Observational Studies. In such datasets, the administered treatment $T$ depends on some or all attributes of individual $X - { \mathsf { s e e } }$ Figure 1(b). Here, as $\operatorname* { P r } ( T | X ) \neq \operatorname* { P r } ( T )$ , we say these datasets exhibit selection bias (Imbens & Rubin, 2015). Figure 2 illustrates selection bias in an example (synthetic) observational dataset.
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
Figure 1: Belief net structure for randomized controlled trials and observational studies. Here, ${ Y ^ { \overline { { 0 } } } } ( { Y ^ { 1 } } )$ is the outcome of applying $T =$ treatment#0 (#1) to the individual represented by $X$ .
|
| 23 |
+
|
| 24 |
+
Here, we want to accurately estimate the Individual Treatment Effect (ITE) for each instance $i - i . e .$ , to estimate $\mathbf { e } _ { i } = y _ { i } ^ { 1 } - y _ { i } ^ { 0 }$ . We frame the solution as learning the function $f : \mathcal { X } \times \mathcal { T } \mathcal { Y }$ that can accurately predict the outcomes (both observed $\hat { y _ { i } } ^ { t _ { i } }$ as well as counterfactuals $\hat { y _ { i } } ^ { \lnot t _ { i } }$ ) given the context information $x _ { i }$ for each individual. As mentioned earlier, there are two challenges associated with estimating treatment effects:
|
| 25 |
+
|
| 26 |
+
(i) The fact that counterfactual outcomes are unobservable (i.e., not present in any training data) makes estimating treatment effects more difficult than the generalization problem in the supervised learning paradigm. This is an inherent characteristic of this task.
|
| 27 |
+
(ii) Selection bias in observational datasets implies having fewer instances within each treatment arm at specific regions of the domain. This sparsity, in turn, would decrease the accuracy and confidence of predicting counterfactuals at those regions.
|
| 28 |
+
|
| 29 |
+
This paper addresses the second challenge by investigating the root causes of selection bias, by dissecting and identifying the underlying factors that can generate an observational dataset $\mathcal { D }$ , and leveraging this knowledge to reduce, as well as account for, the negative impact of selection bias on estimating the treatment effects from $\mathcal { D }$ . In this work, we borrow ideas from the representation learning literature (Bengio et al., 2013) in order to reduce selection bias and from the domain adaptation literature (Shimodaira, 2000) in order to account for the remainder selection bias that (might) still exist after its reduction.
|
| 30 |
+
|
| 31 |
+
Our analysis relies on the following assumptions: Assumption 1: Unconfoundedness (Rosenbaum & Rubin, 1983) – There are no unobserved confounders (i.e., covariates that contribute to both treatment selection procedure as well as determination of outcomes). Formally, $\{ Y ^ { t } \} _ { t \in { \mathcal { T } } } \bot T \mid X$ .
|
| 32 |
+
|
| 33 |
+
Assumption 2: Overlap (Imbens, 2004) – Every individual $x$ should have a non-zero chance of being assigned to any treatment arm. That is,
|
| 34 |
+
|
| 35 |
+

|
| 36 |
+
Figure 2: An example observational dataset. Here, to treat heart disease, a doctor typically prescribes surgery $( t = 1 )$ to younger patients (•) and medication ${ \bf \boldsymbol { t } } = 0$ ) to older ones ${ \bf \Xi } ( { \bf \Lambda } )$ . Note that instances with larger (resp., smaller) $x$ values have a higher chance to be assigned to the $t = 0$ (resp., 1) treatment arm; hence we have selection bias. The counterfactual outcomes (only used for evaluation purpose) are illustrated by small $\bullet ( \mathbf { \alpha } )$ for $\neg t = 1$ (0).
|
| 37 |
+
|
| 38 |
+
These two assumptions together are called strong ignorability (Rosenbaum & Rubin, 1983). Imbens & Wooldridge (2009) showed that strong ignorability is sufficient for ITE to be identifiable.
|
| 39 |
+
|
| 40 |
+
Without loss of generality, we assume that the random variable $X$ follows a(n unknown) joint probability distribution $\operatorname* { P r } ( X | \Gamma , \Delta , \Upsilon )$ , treatment $T$ follows $\mathrm { P r } ( T | \Gamma , \Delta )$ , and outcome $\boldsymbol { Y } ^ { T }$ follows $\mathrm { P r } _ { { \cal T } } ( { \cal Y } ^ { T } | \Delta , \Upsilon )$ , where $\Gamma , \Delta$ , and $\Upsilon$ represent the three underlying factors1 that generate an observational dataset $\mathcal { D }$ . The respective graphical model is illustrated in Figure 3. Conforming with the statements above, note that the graphical model also suggests that selection bias is induced by factors $\Gamma$ and $\Delta$ , where $\Delta$ represents the confounding factors between $T$ and $Y$ .
|
| 41 |
+
|
| 42 |
+
Main contribution: We argue that explicit identification of the underlying factors $\{ \Gamma , \Delta , \Upsilon \}$ in observational datasets offers great insight to guide designing models that better handle selection bias and consequently achieve better performance in terms of estimating ITEs. In this paper, we propose a model, named Disentangled Representations for CounterFactual Regression (DR-CFR), that is optimized to do exactly that. We also present experiments that demonstrate the advantages of this perspective; and show empirically that the proposed method outperforms state-of-the-art models in a variety of data generation scenarios with different dimensionality of factors; see below.
|
| 43 |
+
|
| 44 |
+

|
| 45 |
+
Figure 3: Underlying factors of $X$ ; $\Gamma$ $( \Upsilon )$ are factors that partially determine only $T$ $( Y )$ but not the other random variable; and $\Delta$ are confounders; Selection bias is induced by factors $\Gamma$ and $\Delta$ .
|
| 46 |
+
|
| 47 |
+
# 2 RELATED WORKS
|
| 48 |
+
|
| 49 |
+
Selection bias in observational datasets is equivalent to a domain adaptation scenario where a model is trained on a “source” (observed) data distribution, but should perform well on a “target” (counterfactual) one. Learning treatment effects from observational datasets is closely related to “off-policy learning from logged bandit feedback” – cf., (Swaminathan & Joachims, 2015a), whose goal is learning an optimal policy that selects the best personalized treatment for each individual. A common statistical solution is re-weighting certain data instances to balance the source and target distributions. The majority of re-weighting approaches belong to the Inverse Propensity Weighting (IPW) family of methods – cf., (Austin, 2011; Bottou et al., 2013; Swaminathan & Joachims, 2015c). While IPW methods are unbiased, they suffer from high variance. Swaminathan & Joachims (2015b) proposed the Counterfactual Risk Minimization (CRM) principle to alleviate this issue. In summary, re-weighting is an attempt to account for the selection bias.
|
| 50 |
+
|
| 51 |
+
Johansson et al. (2016) is among the pioneer works that explored ways to use techniques from representation learning (Bengio et al., 2013) to reduce the selection bias. Shalit et al. (2017) present a refined version of (Johansson et al., 2016)’s method that learns a common representation space $\Phi ( x ) = \phi$ by minimizing the discrepancy (Mansour et al., 2009) (hereinafter “disc”) between the conditional distributions of $\phi$ given $t = 0$ versus $\phi$ , given $t = 1$ . That is,
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\mathsf { d i s c } \Big ( \big \{ \Phi ( x _ { i } ) \big \} _ { i : t _ { i } = 0 } , \big \{ \Phi ( x _ { i } ) \big \} _ { i : t _ { i } = 1 } \Big )
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
which is (effectively) a regularization term that attempts to reduce selection bias in the learned representation. On top of this representation learning network, they trained two regression networks $h ^ { t } ( \phi )$ – one for each treatment arm $( t \in \{ 0 , 1 \} )$ ) – that predict the outcomes.
|
| 58 |
+
|
| 59 |
+
Hassanpour & Greiner (2019) argued that the learned representation cannot and should not remove all the selection bias, as the confounders not only contribute to choosing a treatment but also to determining the respective outcomes.2 As a result, where there are confounders (which is a common situation), even $\phi$ would exhibit some selection bias, although less than that in the original domain $x$ They built on the work of (Shalit et al., 2017) by introducing context-aware importance sampling weights, that attempt to account for the above-mentioned remainder selection bias. These weights
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
\omega _ { i } = 1 + { \frac { \operatorname* { P r } ( \phi _ { i } \mid \neg t _ { i } ) } { \operatorname* { P r } ( \phi _ { i } \mid t _ { i } ) } } = 1 + { \frac { \operatorname* { P r } ( t _ { i } ) } { 1 - \operatorname* { P r } ( t _ { i } ) } } \cdot { \frac { 1 - \pi { \bigl ( } t _ { i } \mid \phi _ { i } { \bigr ) } } { \pi { \bigl ( } t _ { i } \mid \phi _ { i } { \bigr ) } } }
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
are designed to enhance performance of estimating both factual as well as counterfacual outcomes (by the 1 and $\frac { \operatorname* { P r } ( \phi \mid \lnot t ) } { \operatorname* { P r } ( \phi \mid t ) }$ terms, respectively), where $\pi ( t _ { i } | \phi _ { i } )$ is the probability of assigning the observed $t _ { i }$ conditioned on the learned context $\phi _ { i }$ .
|
| 66 |
+
|
| 67 |
+
Note that both (Shalit et al., 2017) and (Hassanpour & Greiner, 2019) use $\Phi$ to model the concatenation of factors $\Delta$ and $\Upsilon$ (see Figure 3). Although it does make sense that there should be no discrepancy between conditional distributions of $\Upsilon$ , the $\Delta$ factor should model the confounding factors, which by definition, must embed some information about treatment assignment. This would result in a positive discrepancy between conditional distributions of $\Delta$ that should not be minimized. Thus, minimizing Equation (1) with respect to $\Phi$ can lead to problematic results as it discards some of the confounders.
|
| 68 |
+
|
| 69 |
+
Yao et al. (2018) proposed the Similarity preserved Individual Treatment Effect (SITE) method, which extends Shalit et al. (2017)’s framework by adding a local similarity preserving component. This component acts as a regularization term, that attempts to retain the same neighbourhood relationships in the learned representation space as exhibited in the original space, by matching the propensity scores $\operatorname* { P r } ( t = 1 | \bar { \boldsymbol { x } } )$ and $\textstyle \operatorname* { P r } ( t = { \bar { 1 } } | \phi )$ . This, however, results in learning sub-optimal representations when $\Gamma \neq \emptyset$ as SITE tries to keep instances whose $\Gamma \mathrm { s }$ are far apart, also far apart in $\phi$ . In other words, this component penalizes reducing selection bias in $\phi$ by not discarding the irrelevant information present in $\Gamma$ even when it does not hurt the outcome estimation at all.
|
| 70 |
+
|
| 71 |
+
Our work has many similarities to (Kuang et al., 2017), who decomposed $X$ into two subsets: confounding and adjustment variables, which are similar to our $\Delta$ and $\Upsilon$ factors respectively. They then used an optimization algorithm for identifying these variables, to ultimately find an unbiased estimate of the Average Treatment Effect (ATE). We extend their work in three ways: (i) In addition to confounders and adjustment variables, we also identify the factors that determine the treatment and have no effect on the outcome (i.e., Γ). (ii) Unlike (Kuang et al., 2017) that take a linear approach by tagging the raw features as either confounders or adjustment variables, our proposed method has the capacity to learn [non-linear] representations of the underlying factors. (iii) Our method facilitates estimating both ATE as well ITE, whereas (Kuang et al., 2017) cannot provide estimates of ITEs.
|
| 72 |
+
|
| 73 |
+
# 3 LEARNING DISENTANGLED REPRESENTATIONS
|
| 74 |
+
|
| 75 |
+
We assume, without loss of generality, that any dataset of the form $\{ X , T , Y \}$ is generated from three underlying factors $\{ \Gamma , \bar { \Delta } , \Upsilon \}$ , as illustrated in Figure 3. 3 Observe that the factor $\Gamma$ (resp., $\Upsilon$ ) partially determines only $T$ (resp., $Y$ ), but not the other variables; and $\Delta$ includes the confounding factors between $T$ and $Y$ . This graphical model suggests that selection bias is induced by factors $\Gamma$ and $\Delta$ . It also shows that the outcome depends on the factors $\Delta$ and $\Upsilon$ . Inspired by this graphical model, our model architecture incorporates the following components:
|
| 76 |
+
|
| 77 |
+
• Three representation learning networks; one for each underlying factor: $\Gamma ( x ) , \Delta ( x )$ , and $\Upsilon ( x )$ . • Two regression networks; one for each treatment arm: $h ^ { 0 } ( \Delta ( x ) , \Upsilon ( x ) )$ and $h ^ { 1 } ( \Delta ( x ) , \Upsilon ( x ) )$ . • Two logistic networks: $\pi _ { 0 } ( t | \Gamma ( x ) , \Delta ( x ) )$ to model the logging policy – aka behaviour policy in Reinforcement Learning; $c f .$ , (Sutton & Barto, 1998) – and $\pi ( t | \Delta ( x ) )$ to design weights that account for the confounders’ impact.
|
| 78 |
+
|
| 79 |
+
We therefore try to minimize the following objective function:
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
\begin{array} { l } { \displaystyle J ( \Gamma , \Delta , \Upsilon , h ^ { 0 } , h ^ { 1 } , \pi _ { 0 } ) = \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \omega \big ( t _ { i } , \Delta ( x _ { i } ) \big ) \cdot \mathcal { L } \big [ y _ { i } , h ^ { t _ { i } } \big ( \Delta ( x _ { i } ) , \Upsilon ( x _ { i } ) \big ) \big ] } \\ { \displaystyle \quad \quad + \alpha \cdot { \mathsf { d i s c } } \big ( \{ \Upsilon ( x _ { i } ) \} _ { i : t _ { i } = 0 } , \{ \Upsilon ( x _ { i } ) \} _ { i : t _ { i } = 1 } \big ) } \\ { \displaystyle \quad \quad + \beta \cdot \frac { 1 } { N } \sum _ { i = 1 } ^ { N } - \log \big [ \pi _ { 0 } \big ( t _ { i } | \Gamma ( x _ { i } ) , \Delta ( x _ { i } ) \big ) \big ] } \\ { \displaystyle \quad \quad + \lambda \cdot \mathfrak { R e g } ( \Gamma , \Delta , \Upsilon , h ^ { 0 } , h ^ { 1 } , \pi _ { 0 } ) } \end{array}
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
where $\omega \left( t _ { i } , \Delta ( x _ { i } ) \right)$ is the re-weighting function; $\mathcal { L } \big [ y _ { i } , h ^ { t _ { i } } \big ( \Delta ( x _ { i } ) , \Upsilon ( x _ { i } ) \big ) \big ]$ is the prediction loss for observed outcomes (aka factual loss); $\mathsf { d i s c } \big ( \{ \Upsilon ( x ) \} _ { i : t _ { i } = 0 } , \{ \Upsilon ( x ) \} _ { i : t _ { i } = 1 } \big )$ calculates the discrepancy between conditional distributions of $\Upsilon$ given $t = 0$ versus given $t = 1 ; - \log \pi _ { 0 } ( \cdot )$ is the cross entropy loss of predicting the assigned treatments given the learned context; and $\mathfrak { R e g } ( \cdot )$ is the regularization term for penalizing model complexity. The following sections elaborate on each of these terms.
|
| 86 |
+
|
| 87 |
+
# 3.1 FACTUAL LOSS: $\mathcal { L } \big [ \boldsymbol { y } , h ^ { t } \big ( \Delta ( \boldsymbol { x } ) , \Upsilon ( \boldsymbol { x } ) \big ) \big ]$
|
| 88 |
+
|
| 89 |
+
Similar to (Johansson et al., 2016; Shalit et al., 2017; Hassanpour & Greiner, 2019; Yao et al., 2018), we train two regression networks $h ^ { 0 }$ and $h ^ { 1 }$ , one for each treatment arm. As guided by the graphical model in Figure 3, the inputs to these regression networks are the outputs of the $\Delta ( x )$ and $\Upsilon ( x )$ representation networks and their outputs are the predicted outcomes for their respective treatments.
|
| 90 |
+
|
| 91 |
+
Note that the prediction loss $\mathcal { L }$ can only be calculated on the observed outcomes (hence the name factual loss), as counterfactual outcomes are not available in any training set. This would be an L2-loss for real-valued outcomes and a log-loss for binary outcomes. By minimizing the factual loss, we ensure that the union of the learned representations $\dot { \Delta } ( x )$ and $\Upsilon ( x )$ retain enough information needed for accurate estimation of the observed outcomes.
|
| 92 |
+
|
| 93 |
+
# 3.2 RE-WEIGHTING FUNCTION: $\omega ( t , \Delta ( x ) )$
|
| 94 |
+
|
| 95 |
+
We follow (Hassanpour & Greiner, 2019)’s design for weights as re-stated in Equation (2), with the modification that we employ $\Delta$ to calculate the weights instead of $\Phi$ . Although following the same design, we anticipate our weights should perform better in practice than those in (Hassanpour & Greiner, 2019) as: (i) no confounders are discarded due to minimizing the imbalance loss (because our disc is defined based on $\Upsilon$ , not $\Phi$ ); and (ii) only the legitimate confounders are used to derive the weights (i.e., $\Delta )$ , not the ones that have not contributed to treatment selection (i.e., Υ).
|
| 96 |
+
|
| 97 |
+
Notably, the weights design in Equation (2) is different from the common practice in re-weighting techniques (e.g., IPW) in that the weights are calculated based on all factors that determine $T$ (i.e., $\Gamma$ as well as $\Delta$ ). However, we argue that incorporation of $\Gamma$ in the weights might result in emphasizing the wrong instances. In other words, since the factual loss $\mathcal { L }$ is only sensitive to factors $\Delta$ and $\Upsilon$ , and not $\Gamma$ , re-weighting $\mathcal { L }$ according to $\Gamma$ would yield a wrong objective function to be optimized.
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
\mathsf { d i s c } \big ( \{ \Upsilon ( x _ { i } ) \} _ { i : t _ { i } = 0 } , \{ \Upsilon ( x _ { i } ) \} _ { i : t _ { i } = 1 } \big )
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+
According to Figure 3, $\Upsilon$ should be independent of $T$ due to the collider structure at $Y$ . Therefore,
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
\Upsilon \ \perp \ T \quad \implies \quad \operatorname* { P r } ( \Upsilon \mid T ) = \operatorname* { P r } ( \Upsilon ) \quad \implies \quad \operatorname* { P r } ( \Upsilon \mid T = 0 ) = \operatorname* { P r } ( \Upsilon \mid T = 1 )
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
We used Maximum Mean Discrepancy (MMD) (Gretton et al., 2012) to calculate dissimilarity between the two conditional distributions of $\Upsilon$ given $t = 0$ versus $t = 1$ .
|
| 110 |
+
|
| 111 |
+
By minimizing the imbalance loss, we ensure that the learned factor $\Upsilon$ embeds no information about $T$ and all the confounding factors are retained in $\Delta$ . Capturing all the confounders in $\Delta$ and only in $\Delta$ is the hallmark of the proposed method, as we will use it for optimal re-weighting of the factual loss term (next section). Note that this differs from Shalit et al. (2017)’s approach in that they do not distinguish between the independent factors $\Delta$ and $\Upsilon$ ; and minimizing the loss defined on only one factor $\Phi$ which might erroneously suggest discarding some of the confounders in $\Delta$ .
|
| 112 |
+
|
| 113 |
+
# 3.4 CROSS ENTROPY LOSS: $- \log \left[ \pi _ { 0 } \big ( t | \Gamma ( x ) , \Delta ( x ) \big ) \right]$
|
| 114 |
+
|
| 115 |
+
We model the logging policy as a logistic regression network parameterized by $\big [ W _ { 0 } , b _ { 0 } \big ]$ as follows: $\pi _ { 0 } \bigl ( t | \psi \bigr ) = \Bigl [ 1 + e ^ { - \bigl ( 2 t - 1 \bigr ) ( \psi \cdot W _ { 0 } + b _ { 0 } ) } \Bigr ] ^ { - 1 }$ , where $\psi$ is the concatenation of matrices $\Gamma$ and $\Delta$ Minimizing the cross entropy loss enforces learning $\Gamma$ and $\Delta$ in a way that allows $\pi _ { 0 } ( \cdot )$ to predict the assigned treatments. In other words, the union of the learned representations of $\Gamma$ and $\Delta$ retain enough information to recover the logging policy that guided the treatment assignments.
|
| 116 |
+
|
| 117 |
+
# 4 EXPERIMENTS
|
| 118 |
+
|
| 119 |
+
# 4.1 BENCHMARKS
|
| 120 |
+
|
| 121 |
+
Evaluating treatment effect estimation methods is problematic on real-world datasets since, as mentioned earlier, their counterfactual outcomes are inherently unobservable. A common solution is to synthesize datasets where the outcomes of all possible treatments are available, then discard some outcomes to create a proper observational dataset with characteristics (such as selection bias) similar to a real-world one – cf., (Beygelzimer & Langford, 2009; Hassanpour & Greiner, 2018). In this work, we use two such benchmarks: our synthetic series of datasets as well as a publicly available benchmark: the Infant Health and Development Program (IHDP) (Hill, 2011).
|
| 122 |
+
|
| 123 |
+
# 4.1.1 SYNTHETIC DATASETS
|
| 124 |
+
|
| 125 |
+
We generated our synthetic datasets according to the following process, which takes as input the sample size $N$ ; dimensionalities $[ m _ { \Gamma } , m _ { \Delta } , m _ { \Upsilon } ] \in \mathcal { Z } ^ { + ( 3 ) }$ ; for each factor $L \in \{ \Gamma , \Delta , \Upsilon \}$ , the means and covariance matrices $\left( \mu _ { L } , \Sigma _ { L } \right)$ ; and a scalar $\zeta$ that determines the slope of the logistic curve.
|
| 126 |
+
|
| 127 |
+
• For each latent factor $L \in \{ \Gamma , \Delta , \Upsilon \}$
|
| 128 |
+
|
| 129 |
+
– Form $L$ by drawing $N$ instances (each of size $m _ { L }$ ) from $\mathcal { N } ( \mu _ { L } , \Sigma _ { L } )$ ,
|
| 130 |
+
– Concatenate $\Gamma , \Delta$ , and $\Upsilon$ to make the covariates matrix $X$ [of size $N \times ( m _ { \Gamma } + m _ { \Delta } + m _ { \Upsilon } ) ]$
|
| 131 |
+
– Concatenate $\Gamma$ and $\Delta$ to make $\Psi$ [of size $N \times \left( m _ { \Gamma } + m _ { \Delta } \right) ]$
|
| 132 |
+
– Concatenate $\Delta$ and $\Upsilon$ to make $\Phi$ [of size $N \times ( m _ { \Delta } + m _ { \Upsilon } ) ]$
|
| 133 |
+
|
| 134 |
+
• For treatment $T$
|
| 135 |
+
|
| 136 |
+
– Sample $m _ { \Gamma } + m _ { \Delta }$ tuple of coefficients $\theta$ from $\mathcal { N } ( 0 , 1 ) ^ { m _ { \Gamma } + m _ { \Delta } }$
|
| 137 |
+
– Define the logging policy as $\begin{array} { r } { \pi _ { 0 } ( t = 1 | z ) = \frac { 1 } { 1 + \exp ( - \zeta z ) } } \end{array}$ , where $z = \Psi \cdot \theta$
|
| 138 |
+
– For each instance $x _ { i }$ , sample treatment $t _ { i }$ from the Bernoulli distribution with parameter $\pi _ { 0 } ( t = 1 | z _ { i } )$
|
| 139 |
+
|
| 140 |
+
• For outcomes $Y ^ { 0 }$ and $Y ^ { 1 }$ :
|
| 141 |
+
|
| 142 |
+
– Sample $m _ { \Delta } + m _ { \Upsilon }$ tuple of coefficients $\vartheta ^ { 0 }$ and $\vartheta ^ { 1 }$ from $\mathcal { N } ( 0 , 1 ) ^ { m _ { \Delta } + m _ { \Upsilon } }$ – Define $y ^ { 0 } = ( \Phi \circ \Phi \circ \Phi + 0 . 5 ) \cdot \vartheta ^ { 0 } / ( m _ { \Delta } + m _ { \Upsilon } ) + \varepsilon$ and $y ^ { 1 } = ( \Phi \circ \Phi ) \cdot \vartheta ^ { 1 } / ( m _ { \Delta } + m \Upsilon ) + \varepsilon ,$ , where $\varepsilon$ is a white noise sampled from $\mathcal { N } ( 0 , 0 . 1 )$ and $\circ$ is the symbol for element-wise (Hadamard/Schur) product.
|
| 143 |
+
|
| 144 |
+
We considered all the viable datasets in a mesh generated by $m _ { \Gamma } , m _ { \Delta } , m _ { \Upsilon } \in \{ 0 , 4 , 8 \}$ . This creates 24 scenarios4 that consider all possible situations in terms of the relative sizes of the factors $\Gamma , \Delta$ , and $\Upsilon$ . For each scenario, we synthesized five datasets with various initial random seeds.
|
| 145 |
+
|
| 146 |
+
# 4.1.2 INFANT HEALTH AND DEVELOPMENT PROGRAM (IHDP)
|
| 147 |
+
|
| 148 |
+
The original RCT data was designed to evaluate the effect of specialist home visits on future cognitive test scores of premature infants. Hill (2011) induced selection bias by removing a non-random subset of the treated population to create a realistic observational dataset. The resulting dataset contains 747 instances (608 control, 139 treated) with 25 covariates. We run our experiments on the same benchmark (100 realizations of outcomes) provided by and used in (Johansson et al., 2016; Shalit
|
| 149 |
+
|
| 150 |
+

|
| 151 |
+
|
| 152 |
+
(a) Slice of the weights matrix that connects {the variables in $X$ belonging to $\Gamma$ } to {the first layer of the representation network that attempts to identify $\Gamma \}$ . The size of this slice is $m _ { \Gamma } \times K$ .
|
| 153 |
+
|
| 154 |
+

|
| 155 |
+
(b) Slice of the weights matrix that connects {the variables in $X$ not belonging to $\Gamma \}$ to {the first layer of the representation network that attempts to identify $\Gamma$ }. The size of this slice is $( m _ { \Delta } + m _ { \Upsilon } ) \times K$ .
|
| 156 |
+
|
| 157 |
+

|
| 158 |
+
Figure 4: Visualization of slicing the learned weights matrix in the first layer of the representation network (number of neurons: $K$ ) for identifying $\Gamma$ (best viewed in color).
|
| 159 |
+
Figure 5: Radar charts that visualize the capability of DR-CFR in identifying the underlying factors $\Gamma , \Delta$ , and $\Upsilon$ . Each vertex on the polygons is identified with the factors’ dimension sequence $( m _ { \Gamma } \underline { { { m } } } _ { \Delta \underline { { { - } } } } m \underline { { { \Upsilon } } } )$ of the associated synthetic dataset. The polygons’ radii are scaled between $0 { : } 0 . 0 9$ and quantify the average weights of the first slice (in dotted magenta) and the second slice (in cyan).
|
| 160 |
+
|
| 161 |
+
et al., 2017). Outcomes of this semi-synthetic benchmark were simulated according to response surfaces provided in the Non-Parametric Causal Inference (NPCI) package (Dorie, 2016).
|
| 162 |
+
|
| 163 |
+
# 4.2 RESULTS AND DISCUSSIONS
|
| 164 |
+
|
| 165 |
+
# 4.2.1 EVALUATING IDENTIFICATION OF FACTORS $\{ \Gamma , \Delta , \Upsilon \}$
|
| 166 |
+
|
| 167 |
+
First, we want to determine if the proposed method is able to identify the variables that belong to each underlying factor. To do so, we look at the weight matrix in the first layer of each representation network, which is of size $( m _ { \Gamma } + m _ { \Delta } + m _ { \Upsilon } ) \times K$ , where $K$ is the number of neurons in the first hidden layer of the respective representation network. For example, to check if $\Gamma$ is identified properly, we partition the weights matrix into two slices, as shown in Figure 4, and calculate the average of each slice. The first slice [referred to as $\mathbf { S } _ { \Gamma }$ ; highlighted in Figure 4(a)] pertains to “ Γ’s ground truth variables in $X ^ { \dag }$ and the second slice $[ S _ { \neg \Gamma }$ ; Figure 4(b)] pertains to “variables in $X$ that do not belong to $\Gamma ^ { \ast }$ . Constructing $\mathbf { S } _ { \Delta }$ , $\mathbf { S } _ { \lnot \Delta }$ , $\mathtt { S } _ { \mathtt { Y } }$ , and $\mathbf { S } _ { \neg \Upsilon }$ follow a similar procedure.
|
| 168 |
+
|
| 169 |
+
If the proposed method achieves a good identification, then we expect the average of the absolute values of weights in $\mathrm { \bf S _ { \mathrm { { T } } } }$ should be higher than that of $\mathbf { S } _ { \lnot \Gamma }$ ; this same claim should hold for $( \mathsf { S } _ { \Delta } , \mathsf { S } _ { \neg \Delta } )$ and $( \mathsf { S r } , \mathsf { S } _ { \neg \Upsilon } )$ as well. Note that only the relative relationships between the average weights in either of the slices matter; since this analysis is aimed at checking whether, for example, for identifying $\Gamma$ , its respective representation network has indeed learned to emphasize on “Γ’s ground truth variables in $X$ ” more than the other variables in $X$ . Figure 5 illustrates the identification performance of DR-CFR according to this analysis; showing empirically that the proposed method successfully identifies all the three underlying factors, for all synthetic datasets.
|
| 170 |
+
|
| 171 |
+

|
| 172 |
+
Figure 6: Radar charts for visualizing the PEHE performance results on the synthetic datasets. Training sample size on the left chart is 2,500 and on the right chart is 10,000. Each vertex on the polygons is identified with the factors’ dimension sequence $( m _ { \Gamma _ { - } } m _ { \Delta _ { - } } m _ { \Upsilon } )$ of the associated group of datasets. The polygons’ radii are scaled between $0 : 0 . 8$ to quantify the PEHE values (i.e., the closer to the centre, the smaller the PEHE). The dashed purple curve illustrates the results of the proposed method.
|
| 173 |
+
|
| 174 |
+
# 4.2.2 EVALUATING ESTIMATION OF TREATMENT EFFECTS
|
| 175 |
+
|
| 176 |
+
Given a synthetic dataset (that include both factual as well as counterfactual outcomes), one can evaluate treatment effect estimation methods with two types of performance measures:
|
| 177 |
+
|
| 178 |
+
• Individual-based: “Precision in Estimation of Heterogeneous Effect” $\begin{array} { r } { \mathrm { P E H E } { = } \sqrt { \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \left( \hat { \mathbf { e } } _ { i } - \mathbf { e } _ { i } \right) ^ { 2 } } } \end{array}$ where $\hat { \mathbf { e } } _ { i } = \hat { y } _ { i } ^ { 1 } - \hat { y } _ { i } ^ { 0 }$ is the predicted effect and $\mathbf { e } _ { i } = y _ { i } ^ { 1 } - y _ { i } ^ { 0 }$ is the true effect. • Population-based: “Bias of the Average Treatment Effect” $\epsilon _ { \mathrm { A T E } } = \left| { \mathrm { A T E } } - { \widehat { \mathrm { A T E } } } \right|$ where $\mathrm { A T E = }$ $\begin{array} { r } { \frac { 1 } { N } \sum _ { i = 1 } ^ { N } y _ { i } ^ { 1 } - \frac { 1 } { N } \sum _ { j = 1 } ^ { N } y _ { j } ^ { 0 } } \end{array}$ in which $y _ { i } ^ { 1 }$ and $y _ { j } ^ { 0 }$ are the true outcomes for the respective treatments and $\widehat { \mathrm { A T E } }$ is calculated based on the estimated outcomes.
|
| 179 |
+
|
| 180 |
+
In this paper, we compare performances of the following treatment effect estimation methods: 5
|
| 181 |
+
|
| 182 |
+
• CFR: CounterFactual Regression (Shalit et al., 2017).
|
| 183 |
+
• CFR-ISW: CFR with Importance Sampling Weights (Hassanpour & Greiner, 2019).
|
| 184 |
+
• SITE: Similarity preserved Individual Treatment Effect (Yao et al., 2018).
|
| 185 |
+
• DR-CFR: Disentangled Representations for CFR – our proposed method.
|
| 186 |
+
|
| 187 |
+
Figure 6 visualizes the PEHE measures in radar charts for these four methods, trained with datasets of size $N = 2 { , } 5 0 0$ (left) and $N { = } 1 0 { , } 0 0 0$ (right). As expected, all methods perform better with observing more training data; however, DR-CFR took the most advantage by reducing PEHE the most (by 0.15, going down from 0.60 to 0.45), while CFR, CFR-ISW, and SITE reduced PEHE by 0.07, 0.08, and 0.08 respectively.
|
| 188 |
+
|
| 189 |
+
Table 1 summarizes the PEHE and $\epsilon _ { \mathrm { A T E } }$ measures (lower is better) for all scenarios, in terms of mean and standard deviation of all the $2 4 \times 5$ datasets, in order to give a unified view on the performance.
|
| 190 |
+
|
| 191 |
+
Table 2: IHDP datasets (100 with $N { = } 7 4 7$ )
|
| 192 |
+
|
| 193 |
+
<table><tr><td>Methods</td><td>PEHE</td><td>EATE</td></tr><tr><td>CFR</td><td>0.81 (0.30)</td><td>0.13 (0.12)</td></tr><tr><td>CFR-ISW</td><td>0.73 (0.28)</td><td>0.11 (0.10)</td></tr><tr><td>SITE</td><td>0.73 (0.33)</td><td>0.10 (0.09)</td></tr><tr><td>DR-CFR</td><td>0.65 (0.37)</td><td>0.03 (0.04)</td></tr></table>
|
| 194 |
+
|
| 195 |
+
Table 1: Synthetic datasets $2 4 \times 5$ with $N = 1 0 , 0 0 0 )$
|
| 196 |
+
|
| 197 |
+
<table><tr><td>Methods</td><td>PEHE</td><td>EATE</td></tr><tr><td>CFR</td><td>0.61 (0.05)</td><td>0.021 (0.018)</td></tr><tr><td>CFR-ISW</td><td>0.58 (0.06)</td><td>0.017 (0.009)</td></tr><tr><td>SITE</td><td>0.63 (0.05)</td><td>0.035 (0.039)</td></tr><tr><td>DR-CFR</td><td>0.45 (0.11)</td><td>0.013 (0.006)</td></tr></table>
|
| 198 |
+
|
| 199 |
+
PEHE and $\epsilon _ { \mathrm { A T E } }$ measures (lower is better) represented in the form of “mean (standard deviation)”.
|
| 200 |
+
|
| 201 |
+
DR-CFR achieves the best performance among the contending methods. These results are statistically significant based on the Welch’s unpaired t-test with $\alpha { = } 0 . 0 5$ . Table 2 summarizes the PEHE and $\epsilon _ { \mathrm { A T E } }$ measures on the IHDP benchmark. The results are reported in terms of mean and standard deviation over the 100 datasets with various realizations of outcomes. Again, DR-CFR achieves the best performance (statistically significant for $\epsilon _ { \mathrm { A T E } }$ ) among the contending methods.
|
| 202 |
+
|
| 203 |
+
# 5 FUTURE WORKS AND CONCLUSION
|
| 204 |
+
|
| 205 |
+
The majority of methods proposed to estimate treatment effects – including this work – fall under the category of discriminative approaches. A promising direction is to consider developing generative models, in an attempt to shed light on the true underlying data generating mechanism. Perhaps this could also facilitate generating new, virtual, yet realistic data instances – similar to what is done in computer vision. Louizos et al. (2017)’s method is a notable generative approach, which uses Variational Auto-Encoder (VAE) to extract latent confounders from their observed proxies. While that work is an interesting step in that direction, it is not yet capable of addressing the problem of selection bias. We believe that our proposed perspective on the problem can be helpful to solve this open question. This is left to future work.
|
| 206 |
+
|
| 207 |
+
In this paper, we studied the problem of estimating treatment effect from observational studies. We argued that not all factors in the observed covariates $X$ might contribute to the procedure of selecting treatment $T$ , or more importantly, determining the outcomes $Y$ . We modeled this using three underlying sources of $X$ , $T$ , and $Y$ , and showed that explicit identification of these sources offers great insight to help us design models that better handle selection bias in observational datasets. We proposed an algorithm, Disentangled Representations for CounterFactual Regression (DR-CFR), that can (1) identify disentangled representations of the above-mentioned underlying sources and (2) leverage this knowledge to reduce as well as account for the negative impact of selection bias on estimating the treatment effects from observational data. Our empirical results showed that the proposed method achieves state-of-the-art performance in both individual and population based evaluation measures.
|
| 208 |
+
|
| 209 |
+
# ACKNOWLEDGEMENTS
|
| 210 |
+
|
| 211 |
+
The authors gratefully acknowledge financial support from Natural Sciences and Engineering Research Council of Canada (NSERC) and Alberta Machine Intelligence Institute (Amii). We wish to thank Dr. Pouria Ramazi and Shivam Raj for fruitful conversations, and Dr. Fredrik Johansson for publishing/maintaining the code-base for the CFR method online. We also would like to thank the ICLR 2020 anonymous reviewers, as well as Dr. Kun Kuang and Tianle Liu, for their valuable reviews, which helped improve this paper.
|
| 212 |
+
|
| 213 |
+
# REFERENCES
|
| 214 |
+
|
| 215 |
+
Peter C Austin. An introduction to propensity score methods for reducing the effects of confounding in observational studies. Multivariate Behavioral Research, 46(3):399–424, 2011.
|
| 216 |
+
|
| 217 |
+
Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE TPAMI, 35(8):1798–1828, 2013.
|
| 218 |
+
|
| 219 |
+
Alina Beygelzimer and John Langford. The offset tree for learning with partial labels. In ACM SIGKDD. ACM, 2009.
|
| 220 |
+
|
| 221 |
+
Léon Bottou, Jonas Peters, Joaquin Quinonero Candela, Denis Xavier Charles, Max Chickering, Elon Portugaly, Dipankar Ray, Patrice Y Simard, and Ed Snelson. Counterfactual reasoning and learning systems: The example of computational advertising. JMLR, 14(1), 2013.
|
| 222 |
+
|
| 223 |
+
Vincent Dorie. NPCI: Non-parametrics for causal inference, 2016. https://github.com/ vdorie/npci.
|
| 224 |
+
|
| 225 |
+
Arthur Gretton, Karsten M Borgwardt, Malte J Rasch, Bernhard Schölkopf, and Alexander Smola. A kernel two-sample test. JMLR, 13(Mar):723–773, 2012.
|
| 226 |
+
|
| 227 |
+
Negar Hassanpour and Russell Greiner. A novel evaluation methodology for assessing off-policy learning methods in contextual bandits. In Canadian AI, pp. 31–44, 2018.
|
| 228 |
+
|
| 229 |
+
Negar Hassanpour and Russell Greiner. Counterfactual regression with importance sampling weights. In IJCAI, pp. 5880–5887, 7 2019.
|
| 230 |
+
|
| 231 |
+
Jennifer L Hill. Bayesian nonparametric modeling for causal inference. Journal of Computational and Graphical Statistics, 20(1):217–240, 2011.
|
| 232 |
+
|
| 233 |
+
Guido W Imbens. Nonparametric estimation of average treatment effects under exogeneity: A review. Review of Economics and Statistics, 86(1):4–29, 2004.
|
| 234 |
+
|
| 235 |
+
Guido W. Imbens and Donald B. Rubin. Causal Inference for Statistics, Social, and Biomedical Sciences: An Introduction. Cambridge University Press, 2015.
|
| 236 |
+
|
| 237 |
+
Guido W Imbens and Jeffrey M Wooldridge. Recent developments in the econometrics of program evaluation. Journal of Economic Literature, 47(1):5–86, 2009.
|
| 238 |
+
|
| 239 |
+
Fredrik Johansson, Uri Shalit, and David Sontag. Learning representations for counterfactual inference. In ICML, pp. 3020–3029, 2016.
|
| 240 |
+
|
| 241 |
+
Kun Kuang, Peng Cui, Bo Li, Meng Jiang, Shiqiang Yang, and Fei Wang. Treatment effect estimation with data-driven variable decomposition. In AAAI, 2017.
|
| 242 |
+
|
| 243 |
+
Christos Louizos, Uri Shalit, Joris M Mooij, David Sontag, Richard Zemel, and Max Welling. Causal effect inference with deep latent-variable models. In NeurIPS, pp. 6446–6456. 2017.
|
| 244 |
+
|
| 245 |
+
Yishay Mansour, Mehryar Mohri, and Afshin Rostamizadeh. Domain adaptation: Learning bounds and algorithms. arXiv preprint arXiv:0902.3430, 2009.
|
| 246 |
+
|
| 247 |
+
Judea Pearl. Causality. Cambridge University Press, 2009.
|
| 248 |
+
|
| 249 |
+
Paul R Rosenbaum and Donald B Rubin. The central role of the propensity score in observational studies for causal effects. Biometrika, 1983.
|
| 250 |
+
|
| 251 |
+
Donald B Rubin. Estimating causal effects of treatments in randomized and nonrandomized studies. Journal of Educational Psychology, 66(5):688, 1974.
|
| 252 |
+
|
| 253 |
+
Uri Shalit, Fredrik D. Johansson, and David Sontag. Estimating individual treatment effect: Generalization bounds and algorithms. In ICML, pp. 3076–3085, 2017.
|
| 254 |
+
|
| 255 |
+
Hidetoshi Shimodaira. Improving predictive inference under covariate shift by weighting the loglikelihood function. Journal of Statistical Planning And Inference, 90(2), 2000.
|
| 256 |
+
|
| 257 |
+
Richard S Sutton and Andrew G Barto. Reinforcement Learning: An Introduction, volume 1. MIT Press Cambridge, 1998.
|
| 258 |
+
|
| 259 |
+
Adith Swaminathan and Thorsten Joachims. Batch learning from logged bandit feedback through counterfactual risk minimization. JMLR, 16, 2015a.
|
| 260 |
+
|
| 261 |
+
Adith Swaminathan and Thorsten Joachims. Counterfactual risk minimization: Learning from logged bandit feedback. In ICML, 2015b.
|
| 262 |
+
|
| 263 |
+
Adith Swaminathan and Thorsten Joachims. The self-normalized estimator for counterfactual learning. In NeurIPS, 2015c.
|
| 264 |
+
|
| 265 |
+
Liuyi Yao, Sheng Li, Yaliang Li, Mengdi Huai, Jing Gao, and Aidong Zhang. Representation learning for treatment effect estimation from observational data. In NeurIPS, pp. 2633–2643, 2018.
|
md/train/LZDiWaC9CGL/LZDiWaC9CGL.md
ADDED
|
@@ -0,0 +1,341 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Multiwavelet-based Operator Learning for Differential Equations
|
| 2 |
+
|
| 3 |
+
Gaurav Gupta, Xiongye Xiao, Paul Bogdan Ming Hsieh Department of Electrical and Computer Engineering University of Southern California, Los Angeles, CA 90089 {ggaurav, xiongyex, pbogdan}@usc.edu
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
The solution of a partial differential equation can be obtained by computing the inverse operator map between the input and the solution space. Towards this end, we introduce a multiwavelet-based neural operator learning scheme that compresses the associated operator’s kernel using fine-grained wavelets. By explicitly embedding the inverse multiwavelet filters, we learn the projection of the kernel onto fixed multiwavelet polynomial bases. The projected kernel is trained at multiple scales derived from using repeated computation of multiwavelet transform. This allows learning the complex dependencies at various scales and results in a resolution-independent scheme. Compare to the prior works, we exploit the fundamental properties of the operator’s kernel which enable numerically efficient representation. We perform experiments on the Korteweg-de Vries (KdV) equation, Burgers’ equation, Darcy Flow, and Navier-Stokes equation. Compared with the existing neural operator approaches, our model shows significantly higher accuracy and achieves state-of-the-art in a range of datasets. For the time-varying equations, the proposed method exhibits a $( 2 X - 1 0 X )$ improvement (0.0018 (0.0033) relative $L 2$ error for Burgers’ (KdV) equation). By learning the mappings between function spaces, the proposed method has the ability to find the solution of a high-resolution input after learning from lower-resolution data.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
Many natural and human-built systems (e.g., aerospace, complex fluids, neuro-glia information processing) exhibit complex dynamics characterized by partial differential equations (PDEs) [52, 60]. For example, the design of wings and airplanes robust to turbulence, requires to learn complex PDEs. Along the same lines, complex fluids (gels, emulsions) are multiphasic materials characterized by a macroscopic behavior [55] modeled by non-linear PDEs. Understanding their variations in viscosity as a function of the shear rate is critical for many engineering projects. Moreover, modeling the dynamics of continuous and discrete cyber and physical processes in complex cyber-physical systems can be achieved through PDEs [68].
|
| 12 |
+
|
| 13 |
+
Recent efforts on learning PDEs (i.e., mappings between infinite-dimensional spaces of functions), from trajectories of variables, focused on developing machine learning and in particular deep neural networks (NNs) techniques. Towards this end, a stream of work aims at parameterizing the solution map as deep NNs [2, 13, 33, 40, 71]. One issue, however, is that the NNs are tied to a specific resolution during training, and therefore, may not generalize well to other resolutions, thus, requiring retraining (and possible modifications of the model) for every set of discretizations. In parallel, another stream of work focuses on constructing the PDE solution function as a NN architecture [31, 42, 57, 65]. This approach, however, is designed to work with one instance of a PDE and, therefore, upon changing the coefficients associated with the PDE, the model has to be re-trained.
|
| 14 |
+
|
| 15 |
+
Additionally, the approach is not a complete data-dependent one, and hence, cannot be made oblivious to the knowledge of the underlying PDE structure. Finally, the closest stream of work to the problem we investigate is represented by the “Neural Operators" [14, 47, 48, 49, 56]. Being a complete data-driven approach, the neural operators method aims at learning the operator map without having knowledge of the underlying PDEs. The neural operators have also demonstrated the capability of discretization-independence. Obtaining the data for learning the operator map could be prohibitively expensive or time consuming (e.g., aircraft performance to different initial conditions). To be able to better solve the problem of learning the PDE operators from scarce and noisy data, we would ideally explore fundamental properties of the operators that have implications in data-efficient representation.
|
| 16 |
+
|
| 17 |
+
Our intuition is to transform the problem of learning a PDE to a domain where a compact representation of the operator exists. With a mild assumption regarding the smoothness of the operator’s kernel, except finitely many singularities, the multiwavelets [5], with their vanishing moments property, sparsify the kernel in their projection with respect to (w.r.t.) a measure. Therefore, learning an operator kernel in the multiwavelet domain is feasible and data efficient. The wavelets have a rich history in signal processing [24, 25], and are popular in audio, image compression [8, 61]. For multiwavelets, the orthogonal polynomial (OP) w.r.t. a measure emerges as a natural basis for the multiwavelet subspace, and an appropriate scale / shift provides a sequence of subspaces which captures the locality at various resolutions. We generalize and exploit the multiwavelets concept to work with arbitrary measures which opens-up new possibilities to design a series of models for the operator learning from complex data streams.
|
| 18 |
+
|
| 19 |
+
We incorporate the multiwavelet filters derived using a variety of the OP basis into our operator learning model, and show that the proposed architecture outperforms the existing neural operators. Our main contributions are as follows: (i) Based on some fundamental properties of the integral operator’s kernel, we develop a multiwavelet-based model which learns the operator map efficiently. (ii) For the 1-D dataset of non-linear Korteweg-de Vries and Burgers equations, we observe an order of magnitude improvement in the relative $L 2$ error (Section 3.1, 3.3). (iii) We demonstrate that the proposed model is in validation with the theoretical properties of the pseudo-differential operator (Section 3.2). (iv) We show how the proposed multiwavelet-based model is robust towards the fluctuation strength of the input signal (Section 3.1). (v) Next, we demonstrate the applicability on higher dimensions of 2-D Darcy flow equation (Section 3.4), and finally show that the proposed approach can learn at lower resolutions and generalize to higher resolutions. The code for reproducing the experiments is available at: https://github.com/gaurav71531/mwt-operator.
|
| 20 |
+
|
| 21 |
+
# 2 Operator Learning using Multiwavelet Transform
|
| 22 |
+
|
| 23 |
+
We start by defining the problem of operator learning in Section 2.1. Section 2.2 defines the multiwavelet transform for the proposed operator learning problem and derives the necessary transformation operations across different scales. Section 2.3 outlines the proposed operator learning model. Finally, Section 2.4 lists some of the useful properties of the operators which leads to an efficient implementation of multiwavelet-based models.
|
| 24 |
+
|
| 25 |
+
# 2.1 Problem Setup
|
| 26 |
+
|
| 27 |
+
Given two functions $a ( x )$ and $u ( x )$ with $x \in D$ , the operator is a map $T$ such that $T a = u$ . Formally, let $\mathcal { A }$ and $\mathcal { U }$ be two Sobolev spaces $\mathcal { H } ^ { s , p }$ $( s > 0 , p \ge 1 )$ ), then the operator $T$ is such that $T : { \mathcal { A } } { \mathcal { U } }$ . The Sobolev spaces are particularly useful in the analysis of partial differential equations (PDEs), and we restrict our attention to $s > 0$ and $p = 2$ . Note that, for $s = 0$ , the $\mathcal { H } ^ { 0 , p }$ coincides with $L ^ { p }$ , and, $f \in \mathcal { H } ^ { 0 , p }$ does not necessarily have derivatives in $L ^ { p }$ . We choose $p = 2$ in order to be able to define projections with respect to (w.r.t.) measures $\mu$ in a Hilbert space structure.
|
| 28 |
+
|
| 29 |
+
We take the operator $T$ as an integral operator with the kernel $K : D \times D L ^ { 2 }$ such that
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
T a ( x ) = \int _ { D } K ( x , y ) a ( y ) d y .
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+
For the case of inhomogeneous linear PDEs, $\mathcal { L } u = f$ , with $f$ being the forcing function, $\mathcal { L }$ is the differential operator, and the associated kernel is commonly termed as Green function. In our case, we do not put the restriction of linearity on the operator. From eq. (1), it is apparent that learning the complete kernel $K ( . , . )$ would essentially solve the operator map problem, but it is not necessarily a numerically feasible solution. Indeed, a better approach would be to exploit possible useful properties (see Section 2.4) such that a compact representation of the kernel can be made. For an efficient representation of the operator kernel, we need an appropriate subspace (or sequence of subspaces), and projection tools to map to such spaces.
|
| 36 |
+
|
| 37 |
+
Norm with respect to measures: Projecting a given function onto a fixed basis would require a measure dependent distance. For two functions $f$ and $g$ , we take the inner product w.r.t measure $\mu$ as $\begin{array} { r } { { \langle f , g \rangle _ { \mu } = \int f ( x ) g ( x ) d \mu ( x ) } } \end{array}$ , and the associated norm as $\vert \vert f \vert \vert _ { \mu } = \langle f , f \rangle _ { \mu } ^ { 1 / 2 }$ . We now discuss the next ingredient, which refers to the subspaces required to project the kernel.
|
| 38 |
+
|
| 39 |
+
# 2.2 Multiwavelet Transform
|
| 40 |
+
|
| 41 |
+
In this section, we briefly overview the concept of multiwavelets [4] and extend it to work with nonuniform measures at each scale. The multiwavelet transform synergizes the advantages of orthogonal polynomials (OPs) as well as the wavelets concepts, both of which have a rich history in the signal processing. The properties of wavelet bases like $( i )$ vanishing moments, and $( i i )$ orthogonality can effectively be used to create a system of coordinates in which a wide class of operators (see Section 2.4) have a nice representation. Multiwavelets go few steps further, and provide a fine-grained representation using OPs, but also act as a basis on a finite interval. For the rest of this section, we restrict our attention to the interval $[ 0 , 1 ]$ ; however, the transformation to any finite interval $[ a , b ]$ could be straightforwardly obtained by an appropriate shift and scale.
|
| 42 |
+
|
| 43 |
+
Multi Resolution Analysis: We begin by defining the space of piecewise polynomial functions, for $k \in \mathbb N$ and $n \in \mathbb { Z } ^ { + } \cup \{ 0 \}$ as, $\begin{array} { r } { \mathbf { V } _ { n } ^ { k } = \bigcup _ { l = 0 } ^ { 2 ^ { n } - 1 } \{ f | \deg ( f ) < k } \end{array}$ for $x \in ( 2 ^ { - n } l , 2 ^ { - n } ( l + 1 ) ) \land$ 0, elsewhere $\}$ . Clearly, $\dim ( \mathbf { V } _ { n } ^ { k } ) \ : = \ : 2 ^ { n } k$ , and for subsequent $n$ , each subspace is contained in another as shown by the following relation:
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
\mathbf { V } _ { 0 } ^ { k } \subset \mathbf { V } _ { 1 } ^ { k } \ldots \subset \mathbf { V } _ { n - 1 } ^ { k } \subset \mathbf { V } _ { n } ^ { k } \subset \ldots .
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
Similarly, we define the sequence of measures $\mu _ { 0 } , \mu _ { 1 } , \ldots$ such that $f \in \mathbf { V } _ { n } ^ { k }$ is measurable w.r.t. $\mu _ { n }$ and the norm of $f$ is taken as $| | f | | = \langle f , f \rangle _ { \mu _ { n } } ^ { 1 / 2 }$ . Next, since $\mathbf { V } _ { n - 1 } ^ { k } \subset \mathbf { V } _ { n } ^ { k }$ , we define the multiwavelet subspace as $\mathbf { W } _ { n } ^ { k }$ for $n \in \mathbb { Z } ^ { + } \cup \{ 0 \}$ , such that
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
\mathbf { V } _ { n + 1 } ^ { k } = \mathbf { V } _ { n } ^ { k } \bigoplus \mathbf { W } _ { n } ^ { k } , \quad \mathbf { V } _ { n } ^ { k } \bot \mathbf { W } _ { n } ^ { k } .
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
For a given OP basis for $\mathbf { V } _ { 0 } ^ { k }$ as $\phi _ { 0 } , \phi _ { 1 } , \ldots , \phi _ { k - 1 }$ w.r.t. measure $\mu _ { 0 }$ , a basis of the subsequent spaces $\mathbf { V } _ { n } ^ { k } , n > 1$ can be obtained by shift and scale (hence the name, multi-scale) operations of the original basis as follows:
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
\phi _ { j l } ^ { n } ( x ) = 2 ^ { n / 2 } \phi _ { j } ( 2 ^ { n } x - l ) , \quad j = 0 , 1 , \ldots , k - 1 , \quad l = 0 , 1 , \ldots , 2 ^ { n } - 1 , \mathrm { w . r . t . } \quad \mu _ { n } ,
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
where, $\mu _ { n }$ is obtained as the collections of shift and scale of $\mu _ { 0 }$ , accordingly.
|
| 62 |
+
|
| 63 |
+
Multiwavelets: For the multiwavelet subspace $\mathbf { W } _ { 0 } ^ { k }$ , the orthonormal basis (of piecewise polynomials) are taken as $\psi _ { 0 } , \psi _ { 1 } , \dots , \psi _ { k - 1 }$ such that $\langle \psi _ { i } , \psi _ { j } \rangle _ { \mu _ { 0 } } = 0$ for $i \neq j$ and 1, otherwise. From eq. (3), $\mathbf { V } _ { n } ^ { k } \perp \mathbf { W } _ { n } ^ { k }$ , and since $\mathbf { V } _ { n } ^ { k }$ spans the polynomials of degree at most $k$ , therefore, we conclude that
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
\int _ { 0 } ^ { 1 } x ^ { i } \psi _ { j } ( x ) d \mu _ { 0 } ( x ) = 0 , \quad \forall 0 \leq j , i < k .
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
Similarly to eq. (4), a basis for multiwavelet subspace $\mathbf { W } _ { n } ^ { k }$ are obtained by shift and scale of $\psi _ { i }$ as $\psi _ { j l } ^ { n } ( x ) = 2 ^ { n / 2 } \psi _ { j } ( 2 ^ { n } x - l )$ and $\psi _ { j l } ^ { n }$ are orthonormal w.r.t. measure $\mu _ { n }$ , i.e. $\langle \psi _ { j l } ^ { n } , \psi _ { j ^ { \prime } l ^ { \prime } } ^ { n } \rangle _ { \mu _ { n } } = 1$ if $j = j ^ { \prime } , l = l ^ { \prime }$ , and 0 otherwise. Therefore, for a given OP basis for $\mathbf { V } _ { 0 } ^ { k }$ (for example, Legendre, Chebyshev polynomials), we only require to compute $\psi _ { i }$ , and a complete basis set at all the scales can be obtained using scale/shift of $\phi _ { i } , \psi _ { i }$ .
|
| 70 |
+
|
| 71 |
+
Note: Since $\mathbf { V } _ { 1 } ^ { k } = \mathbf { V } _ { 0 } ^ { k } \oplus \mathbf { W } _ { 0 } ^ { k }$ from eq. (3), therefore, for a given basis $\phi _ { i }$ of $\mathbf { V } _ { 0 } ^ { k }$ w.r.t. measure $\mu _ { 0 }$ and $\phi _ { j l } ^ { n }$ as a basis for $\mathbf { V } _ { 1 } ^ { k }$ w.r.t. $\mu _ { 1 }$ , a set of basis $\psi _ { i }$ can be obtained by applying Gram-Schmidt
|
| 72 |
+
|
| 73 |
+

|
| 74 |
+
Figure 1: Multiwavelet representation of the Kernel. (i) Given kernel $K ( x , y )$ of an integral operator $T$ , (ii) the bases with different measures $( \mu _ { 0 } , \mu _ { 1 } )$ at two different scales (coars ${ \mathrm { : = } } 0$ , fine $^ { = 1 }$ ) projects the kernel into 3 components $A _ { i } , B _ { i } , C _ { i }$ . (iii) The decomposition yields a sparse structure, and the entries with absolute magnitude values exceeding $1 e ^ { - 8 }$ are shown in black. Given projections at any scale, the finer / coarser scale projections can be obtained by reconstruction $/$ decomposition using a fixed multiwavelet filters $H ^ { ( i ) }$ and $\mathbf { \bar { \cal G } } ^ { ( i ) } , i = 0 , 1$ .
|
| 75 |
+
|
| 76 |
+
Orthogonalization using appropriate measures. We refer the reader to supplementary materials for the detailed procedure.
|
| 77 |
+
|
| 78 |
+
Note: Since $\mathbf { V } _ { 0 } ^ { k }$ and $\mathbf { W } _ { 0 } ^ { k }$ lives in $\mathbf { V } _ { 1 } ^ { k }$ , therefore, $\phi _ { i } , \psi _ { i }$ can be written as a linear combination of the basis of $V _ { 1 } ^ { k }$ . We term these linear coefficients as multiwavelet decomposition filters $( H ^ { ( 0 ) } , H ^ { ( 1 ) } , G ^ { ( 0 ) } , G ^ { ( 1 ) } )$ , since they are transforming a fine $n = 1$ to coarse scale $n = 0$ . A uniform measure $\left( \mu _ { 0 } \right)$ version is discussed in [4], and we extend it to any arbitrary measure by including the correction terms $\Sigma ^ { ( 0 ) }$ and $\Sigma ^ { ( 1 ) }$ . We refer to supplementary materials for the complete details. The capability of using the non-uniform measures enables us to apply the same approach to any OP basis with finite domain, for example, Chebyshev, Gegenbauer, etc.
|
| 79 |
+
|
| 80 |
+
For a given $[ \langle f , \phi _ { i l } ^ { n } \rangle _ { \mu _ { n } } ] _ { i = 0 } ^ { k - 1 }$ $f ( x )$ , ${ \bf d } _ { l } ^ { n } = [ \langle f , \psi _ { i l } ^ { n } \rangle _ { \mu _ { n } } ] _ { i = 0 } ^ { k - 1 }$ , the multiscale, multiwavelet coefficients at the scale , respectively, w.r.t. measure $\mu _ { n }$ with $n$ $\mathbf { s } _ { l } ^ { n } , \mathbf { d } _ { l } ^ { n } \in \mathbb { R } ^ { k \times 2 ^ { n } }$ are defined as $\mathbf { s } _ { l } ^ { n } \mathbf { \Psi } =$ l . The decomposition / reconstruction across scales is written as
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
\begin{array} { r l } { \mathbf { s } _ { l } ^ { n } = H ^ { ( 0 ) } \mathbf { s } _ { 2 l } ^ { n + 1 } + H ^ { ( 1 ) } \mathbf { s } _ { 2 l + 1 } ^ { n + 1 } , \quad } & { ( 6 ) \qquad \mathbf { s } _ { 2 l } ^ { n + 1 } = \Sigma ^ { ( 0 ) } ( H ^ { ( 0 ) T } \mathbf { s } _ { l } ^ { n } + G ^ { ( 0 ) T } \mathbf { d } _ { l } ^ { n } ) , } \\ { \mathbf { d } _ { l } ^ { n } = G ^ { ( 0 ) } \mathbf { s } _ { 2 l } ^ { n + 1 } + H ^ { ( 1 ) } \mathbf { s } _ { 2 l + 1 } ^ { n + 1 } . \quad } & { ( 7 ) \qquad \mathbf { s } _ { 2 l + 1 } ^ { n + 1 } = \Sigma ^ { ( 1 ) } ( H ^ { ( 1 ) T } \mathbf { s } _ { l } ^ { n } + G ^ { ( 1 ) T } \mathbf { d } _ { l } ^ { n } ) . } \end{array}
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
The wavelet (and also multiwavelet) transformation can be straightforwardly extended to multiple dimensions using tensor product of the bases. For our purpose, a function $\dot { \boldsymbol { f } } \in \mathbb { R } ^ { d }$ has multiscale, multiwavelet coefficients $\bar { \mathbf { s } } _ { l } ^ { n } , \mathbf { d } _ { l } ^ { n } \in \mathbb { R } ^ { k \times \ldots \times k \times 2 ^ { n } }$ which are also recursively obtained by replacing the filters in eq. (6)-(7) with their Kronecker product, specifically, $H ^ { ( 0 ) }$ with $H ^ { ( 0 ) } \otimes H ^ { ( 0 ) } \otimes . . . H ^ { ( 0 ) }$ , where $\otimes$ is the Kronecker product repeated $d$ times. For eq. (8)-(9) $H ^ { ( 0 ) } \Sigma ^ { ( 0 ) }$ (and similarly others) are replaced with their $d$ -times Kronecker product.
|
| 87 |
+
|
| 88 |
+
Non-Standard Form: The multiwavelet representation of the operator kernel $K ( x , y )$ can be obtained by an appropriate tensor product of the multiscale and multiwavelet basis. One issue, however, in this approach, is that the basis at various scales are coupled because of the tensor product. To untangle the basis at various scales, we use a trick as proposed in [11] called the non-standard wavelet representation. The extra mathematical price paid for the non-standard representation, actually serves as a ground for reducing the proposed model complexity (see Section 2.3), thus, providing data efficiency. For the operator under consideration $T$ with integral kernel $K ( x , y )$ , let us denote $T _ { n }$ as the projection of $T$ on $V _ { n } ^ { k }$ , which essentially is obtained by projecting the kernel $K$ onto basis $\phi _ { j l } ^ { n }$ w.r.t. measure $\mu _ { n }$ . If $P _ { n }$ is the projection operator such that $\begin{array} { r } { P _ { n } f = \sum _ { j , l } \langle f , \phi _ { j l } ^ { n } \rangle _ { \mu _ { n } } \phi _ { j l } ^ { n } } \end{array}$ , then $\check { T _ { n } } = P _ { n } T P _ { n }$ . Using telescopic sum, $T _ { n }$ is expanded as
|
| 89 |
+
|
| 90 |
+

|
| 91 |
+
Figure 2: MWT model architecture. (Left) Decomposition cell using 4 neural networks (NNs) $A , B$ and $C$ , and $T$ (for the coarsest scale $L$ ) performs multiwavelet decomposition from scale $n + 1$ to $_ n$ . (Right) Reconstruction module using pre-defined filters $H ^ { ( i ) } , G ^ { ( i ) }$ performs inverse multiwavelet transform from scale $n - 1$ to $n$ .
|
| 92 |
+
|
| 93 |
+
$$
|
| 94 |
+
T _ { n } = \sum _ { i = L + 1 } ^ { n } ( Q _ { i } T Q _ { i } + Q _ { i } T P _ { i - 1 } + P _ { i - 1 } T Q _ { i } ) + P _ { L } T P _ { L } ,
|
| 95 |
+
$$
|
| 96 |
+
|
| 97 |
+
where, $Q _ { i } = P _ { i } - P _ { i - 1 }$ and $L$ is the coarsest scale under consideration $( L \geq 0 )$ . From eq. (3), it is apparent that $Q _ { i }$ is the multiwavelet operator. Next, we denote $A _ { i } = Q _ { i } { \cal T } Q _ { i } , B _ { i } = Q _ { i } { \cal T } P _ { i - 1 } , C _ { i } =$ $P _ { i - 1 } T Q _ { i }$ , and $\bar { T } = P _ { L } T P _ { L }$ . In Figure 1, we show the non-standard multiwavelet transform for a given kernel $K ( x , y )$ . The transformation has a sparse banded structure due to smoothness property of the kernel (see Section 2.4). For the operator $T$ such that $T a = u$ , the map under multiwavelet domain is written as
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
U _ { d l } ^ { n } = A _ { n } d _ { l } ^ { n } + B _ { n } s _ { l } ^ { n } , \qquad U _ { \hat { s } l } ^ { n } = C _ { n } d _ { l } ^ { n } , \qquad U _ { s l } ^ { L } = \bar { T } s _ { l } ^ { L } ,
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+
where, $( U _ { s l } ^ { n } , U _ { d l } ^ { n } ) / ( s _ { l } ^ { n } , d _ { l } ^ { n } )$ are the multiscale, multiwavelet coefficients of $u / a$ , respectively, and $L$ is the coarsest scale under consideration. With these mathematical concepts, we now proceed to define our multiwavelet-based operator learning model in the Section 2.3.
|
| 104 |
+
|
| 105 |
+
# 2.3 Multiwavelet-based Model
|
| 106 |
+
|
| 107 |
+
Based on the discussion in Section 2.2, we propose a multiwavelet-based model (MWT) as shown in Figure 2. For a given input/output as $a / u$ , the goal of the MWT model is to map the multiwavelettransform of the input $( \bar { s } _ { l } ^ { N } )$ to output $( U _ { s l } ^ { N } )$ at the finest scale $N$ . The model consists of two parts: (i) Decomposition $( d e c )$ , and $( i i )$ Reconstruction (rec). The dec acts as a recurrent network, and at each iteration the input is $s ^ { n + 1 }$ . Using (6)-(7), the input is used to obtain multiscale and multiwavelet coefficients at a coarser level $s ^ { n }$ and $d ^ { n }$ , respectively. Next, to compute the multiscale/multiwavelet coefficients of the output $u$ , we approximate the non-standard kernel decomposition from (11) using four neural networks (NNs) $A , B , C$ and $\bar { T }$ such that $U _ { d l } ^ { n } \approx A _ { \theta _ { A } } ( d _ { l } ^ { n } ) \stackrel { - } { + } B _ { \theta _ { B } } ( s _ { l } ^ { n } ) , U _ { \hat { s } l } ^ { n } \approx$ $C _ { \theta _ { C } } ( d _ { l } ^ { n } ) , \forall 0 \leq n < L$ , and $U _ { s l } ^ { L } \approx \bar { T } _ { \theta _ { \bar { T } } } ( s _ { l } ^ { L } )$ . This is a ladder-down approach, and the dec part performs the decimation of signal (factor $\bar { 1 } / 2$ ), running for a maximum of $L$ cycles, $L < \log _ { 2 } ( M )$ for a given input sequence of size $M$ . Finally, the rec module collects the constituent terms $U _ { s l } ^ { n } , U _ { \hat { s } l } ^ { n } , U _ { d l } ^ { n }$ (obtained using the dec module) and performs a ladder-up operation to compute the multiscale coefficients of the output at a finer scale $n + 1$ using (8)-(9). The iterations continue until the finest scale $N$ is obtained for the output.
|
| 108 |
+
|
| 109 |
+
At each iteration, the filters in dec module downsample the input, but compared to popular techniques (e.g., maxpool), the input is only transformed to a coarser multiscale/multiwavelet space. By virtue of its design, since the non-standard wavelet representation does not have inter-scale interactions, it basically allows us to reuse the same kernel NNs $A , B , C$ at different scales. A follow-up advantage of this approach is that the model is resolution independent, since the recurrent structure of dec is input invariant, and for a different input size $M$ , only the number of iterations would possibly change for a maximum of $\log _ { 2 } M$ . The reuse of $A , B , C$ by re-training at various scales also enable us to learn an expressive model with fewer parameters $( \theta _ { A } , \theta _ { B } , \theta _ { C } , \theta _ { \bar { T } } )$ . We see in Section 3, that even a single-layered CNN for $A , B , C$ is sufficient for learning the operator.
|
| 110 |
+
|
| 111 |
+
The dec / rec module uses the filter matrices which are fixed beforehand, therefore, this part does not require any training. The model does not work for any arbitrary choice of fixed matrices $H , G$ . We show in Section 3.4 that for randomly selected matrices, the model does not learn, which validates that careful construction of filter matrices is necessary.
|
| 112 |
+
|
| 113 |
+
# 2.4 Operators Properties
|
| 114 |
+
|
| 115 |
+
This section outlines definition of the integral kernels that are typically useful in an efficient compression of the operators through multiwavelets. We then discuss a fundamental property of the pseudo-differential operator.
|
| 116 |
+
|
| 117 |
+
Definition 1 ([54]). Calderón-Zygmund Operator. The integral operators that have kernel $K ( x , y )$ which is smooth away from the diagonal, and satisfy the following.
|
| 118 |
+
|
| 119 |
+
$$
|
| 120 |
+
\begin{array} { c } { \displaystyle { | K ( x , y ) | \le \frac { 1 } { | x - y | } , } } \\ { \displaystyle { | \partial _ { x } ^ { M } K ( x , y ) | + | \partial _ { y } ^ { M } K ( x , y ) | \le \frac { C _ { 0 } } { | x - y | ^ { M + 1 } } . } } \end{array}
|
| 121 |
+
$$
|
| 122 |
+
|
| 123 |
+
The smooth functions with decaying derivatives are gold to the multiwavelet transform. Note that, smoothness implies Taylor series expansion, and the multiwavelet transform with sufficiently large $k$ zeroes out the initial $k$ terms of the expansion due to vanishing moments property (5). This is how multiwavelet sparsifies the kernel (see Figure 1 where $K ( x , y )$ is smooth). Although, the definition of Calderón-Zygmund is simple (singularities only at the diagonal), but the multiwavelets are capable to compresses the kernel as long as the number of singularities are finite.
|
| 124 |
+
|
| 125 |
+
The next property, from [19], points out that with input/output being single-dimensional functions, for any pseudo-differential operator (with smooth coefficients), the singularity at the diagonal is also well-characterized.
|
| 126 |
+
|
| 127 |
+
Property 1. Smoothness of Pseudo-Differential Operator. For the integral kernel $K ( x , y )$ of $a$ pseudo-differential operator, $K ( x , y ) \in C ^ { \infty } \forall x \neq y$ , and for $x = y$ , $K ( x , y ) \in C ^ { T - 1 }$ , where $T + 1$ is the highest derivative order in the given pseudo-differential equation.
|
| 128 |
+
|
| 129 |
+
The property 1 implies that, for the class of pseudo-differential operator, and any set of basis with the initial $J$ vanishing moments, the projection of kernel onto such bases will have the diagonal dominating the non-diagonal entries, exponentially, if $J > T - 1$ [19]. For the case of multiwavelet basis with $k$ OPs, $J = k$ (from eq. (5)). Therefore, $k > T - 1$ sparsifies the kernel projection onto multiwavelets, for a fixed number of bits precision $\epsilon$ . We see the implication of the Property 1 on our proposed model in the Section 3.2.
|
| 130 |
+
|
| 131 |
+
# 3 Empirical Evaluation
|
| 132 |
+
|
| 133 |
+
In this section, we evaluate the multiwavelet-based model (MWT) on several PDE datasets. We show that the proposed MWT model not only exhibits orders of magnitude higher accuracy when compared against the state-of-the-art (Sota) approaches but also works consistently well under different input conditions without parameter tuning. From a numerical perspective, we take the data as point-wise evaluations of the input and output functions. Specifically, we have the dataset $( a _ { i } , u _ { i } )$ with $a _ { i } = a ( x _ { i } ) , u _ { i } = u ( x _ { i } )$ for $x _ { 1 } , x _ { 2 } , \dotsc , x _ { N } \in D$ , where $x _ { i }$ are $M$ -point discretization of the domain $D$ . Unless stated otherwise, the training set is of size 1000 while test is of size 200.
|
| 134 |
+
|
| 135 |
+
Model architectures: Unless otherwise stated, the NNs $A , B$ and $C$ in the proposed model (Figure 2) are chosen as a single-layered CNNs following a linear layer, while $\bar { T }$ is taken as single $k \times k$ linear layer. We choose $k = 4$ in all our experiments, and the OP basis as Legendre (Leg), Chebyshev (Chb) with uniform, non-uniform measure $\mu _ { 0 }$ , respectively. The model in Figure 2 is treated as single layer, and for 1D equations, we cascade 2 multiwavelet layers, while for 2D dataset, we use a total 4 layers with $R e L U$ non-linearity.
|
| 136 |
+
|
| 137 |
+
<table><tr><td>Networks</td><td>s =64</td><td>s=128</td><td>s = 256</td><td>s = 512</td><td>s = 1024</td></tr><tr><td>MWT Leg MWT Chb</td><td>0.00338 0.00715</td><td>0.00375 0.00712</td><td>0.00418 0.00604</td><td>0.00393 0.00769</td><td>0.00389</td></tr><tr><td>FNO</td><td>0.0125</td><td>0.0124</td><td>0.0125</td><td>0.0122</td><td>0.00675 0.0126</td></tr><tr><td>MGNO</td><td>0.1296</td><td>0.1515</td><td>0.1355</td><td>0.1345</td><td>0.1363</td></tr><tr><td>LNO</td><td>0.0429</td><td>0.0557</td><td>0.0414</td><td>0.0425</td><td>0.0447</td></tr><tr><td>GNO</td><td>0.0789</td><td>0.0760</td><td>0.0695</td><td>0.0699</td><td>0.0721</td></tr></table>
|
| 138 |
+
|
| 139 |
+
Table 1: Korteweg-de Vries (KdV) equation benchmarks for different input resolution s. Top: Our methods. Bottom: previous works of Neural operator.
|
| 140 |
+
|
| 141 |
+

|
| 142 |
+
Figure 3: The output of the KdV equation. (Left) An input $u _ { 0 } ( x )$ with $\lambda = 0 . 0 2$ . (Right) The predicted output of the MWT Leg model learning the high fluctuations.
|
| 143 |
+
|
| 144 |
+
From a mathematical viewpoint, the dec and rec modules in Figure 2 transform only the multiscale and multiwavelet coefficients. However, the input and output to the model are point-wise function samples, i.e., $( a _ { i } , u _ { i } )$ . A remedy around this is to take the data sequence, and construct hypothetical functions $\begin{array} { r } { f _ { a } = \sum _ { i = 1 } ^ { N } a _ { i } \phi _ { j i } ^ { n } } \end{array}$ and $\begin{array} { r } { f _ { u } = \sum _ { i = 1 } ^ { N } u _ { i } \phi _ { j i } ^ { n } } \end{array}$ . Clearly, $f _ { a } , f _ { u }$ lives in $V _ { n } ^ { k }$ with $n = \log _ { 2 } N$ . Now the model can be used with $s ^ { ( n ) } = a _ { i }$ and $U _ { s } ^ { ( n ) } = u _ { i }$ . Note that $f _ { a } , f _ { u }$ are not explicitly used, but only a matter of convention.
|
| 145 |
+
|
| 146 |
+
Benchmark models: We compare our MWT model using two different OP basis (Leg, Chb) with the most recent successful neural operators. Specifically, we consider the graph neural operator (GNO) [48], the multipole graph neural operator (MGNO) [49], the LNO which makes a low-rank $( r )$ representation of the operator kernel $K ( x , y )$ (also similar to unstacked DeepONet [50]), and the Fourier neural operator (FNO ) [47]. We experiment on three competent datasets setup by the work of FNO (Burgers’ equation (1-D), Darcy Flow (2-D), and Navier-Stokes equation (time-varying 2-D)). In addition, we also experiment with Korteweg-de Vries equation (1-D). For the 1-D cases, a modified FNO with careful parameter selection and removal of Batch-normalization layers results in a better performance compared with the original FNO, and we use it in our experiments. The MWT model demonstrates the highest accuracy in all the experiments. The MWT model also shows the ability to learn the function mapping through lower-resolution data, and able to generalize to higher resolutions.
|
| 147 |
+
|
| 148 |
+
All the models (including ours) are trained for a total of 500 epochs using Adam optimizer with an initial learning rate (LR) of 0.001. The LR decays after every 100 epochs with a factor of $\gamma = 0 . 5$ The loss function is taken as relative $L 2$ error [47]. All of the experiments are performed on a single Nvidia V100 32 GB GPU, and the results are averaged over a total of 3 seeds.
|
| 149 |
+
|
| 150 |
+
# 3.1 Korteweg-de Vries (KdV) Equation
|
| 151 |
+
|
| 152 |
+
The Korteweg-de Vries (KdV) equation was first proposed by Boussinesq [16] and rediscovered by Korteweg and de Vries [23]. KdV is a 1-D non-linear PDE commonly used to describe the non-linear shallow water waves. For a given field $u ( x , t )$ , the dynamics takes the following form:
|
| 153 |
+
|
| 154 |
+
$$
|
| 155 |
+
\begin{array} { c } { \displaystyle { \frac { \partial u } { \partial t } = - 0 . 5 u \frac { \partial u } { \partial x } - \frac { \partial ^ { 3 } u } { \partial x ^ { 3 } } , x \in ( 0 , 1 ) , t \in ( 0 , 1 ] } } \\ { \displaystyle { u _ { 0 } ( x ) = u ( x , t = 0 ) } } \end{array}
|
| 156 |
+
$$
|
| 157 |
+
|
| 158 |
+
The task for the neural operator is to learn the mapping of the initial condition $u _ { 0 } ( x )$ to the solutions $u ( x , t = 1 )$ . We generate the initial condition in Gaussian random fields according to $u _ { 0 } \sim$ $\dot { \mathcal { N } } ( 0 , 7 ^ { 4 } ( - \Delta + 7 ^ { 2 } \bar { I _ { ) } } ^ { - 2 . 5 } )$ with periodic boundary conditions. The equation is numerically solved using chebfun package [27] with a resolution $2 ^ { 1 0 }$ , and datasets with lower resolutions are obtained by sub-sampling the highest resolution data set.
|
| 159 |
+
|
| 160 |
+
Varying resolution: The experimental results of the KdV equation for different input resolutions $s$ are shown in Table1. We see that, compared to any of the benchmarks, our proposed MWT Leg exhibits the lowest relative error and is lowest nearly by an order of magnitude. Even in the case of the resolution of 64, the relative error is low, which means that a sparse data set with a coarse resolution of 64 is sufficient for the neural operator to learn the function mapping between infinite-dimensional spaces.
|
| 161 |
+
|
| 162 |
+
Varying fluctuations: We now vary the smoothness of the input function $u _ { 0 } ( x , 0 )$ by controlling the parameter $\lambda$ , where low values of $\lambda$ imply more frequent fluctuations and $\lambda 0$ reaches the Brownian motion limit [30]. To isolate the importance of incorporating the multiwavelet transformation, we use the same convolution operation as in FNO, i.e., Fourier transform-based convolution with different modes $k _ { m }$ (only single-layer) for $A , B , C$ . We see in Figure 4 that MWT model consistently outperforms the recent baselines for all the values of $\lambda$ . A sample input/output from test set is shown in the Figure 3. The FNO model with higher values of $k _ { m }$ has better performance due to more Fourier bases for representing the high-frequency signal, while MWT does better even with low modes in its $A , B , C$ CNNs, highlighting the importance of using wavelet-based filters in the signal processing.
|
| 163 |
+
|
| 164 |
+

|
| 165 |
+
Figure 4: Comparing MWT by varying the degree of fluctuations $\lambda$ in the input with resolution $s =$ 1024. For each convolution, we fix the number of Fourier bases as $k _ { m }$ . For FNO, the width is 64.
|
| 166 |
+
|
| 167 |
+
# 3.2 Theoretical Properties Validation
|
| 168 |
+
|
| 169 |
+
We test the ability of the proposed MWT model to capture the theoretical properties of the pseudodifferential operator in this Section. Towards that, we consider the Euler-Bernoulli equation [62] that models the vertical displacement of a finite length beam over time. A Fourier transform version of the beam equation with the constraint of both ends being clamped is as follows
|
| 170 |
+
|
| 171 |
+
$$
|
| 172 |
+
\begin{array} { c } { { \displaystyle { \frac { \partial ^ { 4 } u } { \partial x ^ { 4 } } } - \omega ^ { 2 } u = f ( x ) , \quad \displaystyle { \frac { \partial u } { \partial x } } \Big \vert _ { x = 0 } = 0 } } \\ { { u ( 0 ) = u ( 1 ) = 0 , } } \end{array}
|
| 173 |
+
$$
|
| 174 |
+
|
| 175 |
+
where $u ( x )$ is the Fourier transform of the time-varying beam displacement, $\omega$ is the frequency, $f ( x )$ is the applied force. The Euler-Bernoulli is a pseudo-differential equation with the maximum derivative order $T + 1 = 4$ . We take the task of learning the map from $f$ to $u$ . In Figure 5, we see that for $k \geq 3$ , the models relative error across epochs is similar, however, they are different for $k < 3$ , which is in accordance with the Property 1. For $k < 3$ , the multiwavelets will not be able to annihilate the diagonal of the kernel which is $C ^ { T - 1 }$ , hence, sparsification cannot occur, and the model learns slow.
|
| 176 |
+
|
| 177 |
+
# 3.3 Burgers’ Equation
|
| 178 |
+
|
| 179 |
+
The 1-D Burgers’ equation is a non-linear PDE occurring in various areas of applied mathematics. For a given field $u ( x , t )$ and diffusion coefficient $v$ , the 1-D Burgers’ equation reads:
|
| 180 |
+
|
| 181 |
+
$$
|
| 182 |
+
\begin{array} { c } { { \displaystyle \frac { \partial u } { \partial t } = - u \frac { \partial u } { \partial x } + v \frac { \partial ^ { 2 } u } { \partial x ^ { 2 } } , x \in ( 0 , 2 \pi ) , t \in ( 0 , 1 ] } } \\ { { u _ { 0 } ( x ) = u ( x , t = 0 ) . } } \end{array}
|
| 183 |
+
$$
|
| 184 |
+
|
| 185 |
+
The task for the neural operator is to learn the mapping of initial condition $u ( x , t = 0 )$ to the solutions at $= 1 \ : u ( x , t = 1 )$ . To compare with many advanced neural operators under the same conditions, we use the Burgers’ data and the results that have been published in [47] and [49]. The initial condition is sampled as Gaussian random fields where $u _ { 0 } \stackrel { . } { \sim } \mathcal { N } ( 0 , 5 ^ { 4 } ( - \bar { \Delta } + 5 ^ { 2 } I ) ^ { - 2 } )$ with periodic boundary conditions. $\Delta$ is the Laplacian, meaning the initial conditions are sampled by sampling its first several coefficients from a Gaussian distribution. In the Burgers’ equation, $v$ is set to 0.1. The equation is solved with resolution $2 ^ { 1 3 }$ , and the data with lower resolutions are obtained by sub-sampling the highest resolution data set.
|
| 186 |
+
|
| 187 |
+

|
| 188 |
+
Figure 5: Relative $L 2$ error vs epochs for MWT Leg with different number of OP basis $k = 1 , \ldots , 6$ .
|
| 189 |
+
|
| 190 |
+

|
| 191 |
+
Figure 6: Burgers’ Equation validation at various input resolution $s$ . Our methods: MWT Leg, Chb.
|
| 192 |
+
|
| 193 |
+
<table><tr><td>Networks</td><td>s=32</td><td>s=64</td><td>s=128</td><td>s= 256</td><td>s=512</td></tr><tr><td>MWT Leg</td><td>0.0152</td><td>0.00899</td><td>0.00747</td><td>0.00722</td><td>0.00654</td></tr><tr><td>MWT Chb</td><td>0.0174</td><td>0.0108</td><td>0.00872</td><td>0.00892</td><td>0.00891</td></tr><tr><td>MWTRnd</td><td>0.2435</td><td>0.2434</td><td>0.2434</td><td>0.2431</td><td>0.2432</td></tr><tr><td>FNO</td><td>0.0177</td><td>0.0121</td><td>0.0111</td><td>0.0107</td><td>0.0106</td></tr><tr><td>MGNO</td><td>0.0501</td><td>0.0519</td><td>0.0547</td><td>0.0542</td><td>-</td></tr><tr><td>LNO</td><td>0.0524</td><td>0.0457</td><td>0.0453</td><td>0.0428</td><td>=</td></tr></table>
|
| 194 |
+
|
| 195 |
+
Table 2: Benchmarks on Darcy Flow equation at various input resolution s. Top: Our methods. MWT Rnd instantiate random entries of the filter matrices in (6)-(9). Bottom: prior works on Neural operator.
|
| 196 |
+
|
| 197 |
+
The results of the experiments on Burgers’ equation for different resolutions are shown in Figure 6. Compared to any of the benchmarks, our MWT Leg obtains the lowest relative error, which is an order of magnitude lower than the state-of-the-art. It’s worth noting that even in the case of low resolution, MWT Leg still maintains a very low error rate, which shows its potential for learning the function mapping through low-resolution data, that is, the ability to map between infinite-dimensional spaces by learning a limited finite-dimensional spaces mapping.
|
| 198 |
+
|
| 199 |
+
# 3.4 Darcy Flow
|
| 200 |
+
|
| 201 |
+
Darcy flow formulated by Darcy[22] is one of the basic relationships of hydrogeology, describing the flow of a fluid through a porous medium. We experiment on the steady-state of the 2-d Darcy flow equation on the unit box, where it takes the following form:
|
| 202 |
+
|
| 203 |
+
$$
|
| 204 |
+
\begin{array} { r } { \nabla \cdot ( a ( x ) \nabla u ( x ) ) = f ( x ) , \quad x \in ( 0 , 1 ) ^ { 2 } } \\ { u ( x ) = 0 , \qquad x \in \partial ( 0 , 1 ) ^ { 2 } } \end{array}
|
| 205 |
+
$$
|
| 206 |
+
|
| 207 |
+
We set the experiments to learn the operator mapping the coefficient $a ( x )$ to the solution $u ( x )$ . The coefficients are generated according to $a \sim \mathcal { N } ( 0 , ( - \Delta + 3 ^ { 2 } I ) ^ { - 2 } )$ , where $\Delta$ is the Laplacian with zero Neumann boundary conditions. The threshold of $a ( x )$ is set to achieve ellipticity. The solutions $u ( x )$ are obtained by using a 2nd-order finite difference scheme on a $5 1 2 \times 5 1 2$ grid. Data sets of lower resolution are sub-sampled from the original data set.
|
| 208 |
+
|
| 209 |
+
The results of the experiments on Darcy Flow for different resolutions are shown in Table2. MWT Leg again obtains the lowest relative error compared to other neural operators at various resolutions.
|
| 210 |
+
|
| 211 |
+
We also perform an additional experiment, in which the multiwavelet filters $H ^ { ( i ) } , G ^ { ( i ) } , i = 0 , 1$ are replaced with random values (properly normalized). We see in Table 2, that MWT Rnd does not learn the operator map, in fact, its performance is worse than all the models. This signifies the importance of the careful choice of the filter matrices.
|
| 212 |
+
|
| 213 |
+
# 3.5 Additional Experiments
|
| 214 |
+
|
| 215 |
+
Full results for these experiments are provided in the supplementary materials.
|
| 216 |
+
|
| 217 |
+
Navier Stokes Equation: The Navier-Stokes (NS) are 2d time-varying PDEs modeling the viscous, incompressible fluids. The proposed MWT model does a 2d multiwavelet transform for the velocity $u$ , while uses a single-layered 3d convolution for $A , B$ and $C$ to learn dependencies across space-time. We have observed that the proposed MWT Leg is in par with the Sota on the NS equations.
|
| 218 |
+
|
| 219 |
+
Prediction at high resolution: We show that MWT model trained at lower resolutions for various datasets (for example, training with $s = 2 5 6$ for Burgers) can predict the output at finer resolutions $s = 2 0 4 8$ , with relative error of 0.0226, thus eliminating the need for expensive sampling. The training and testing with $s = 2 0 4 8$ yields a relative error of 0.00189.
|
| 220 |
+
|
| 221 |
+
Train/evaluation with different sampling rules: We study the operator learning behavior when the training and evaluation datasets are obtained using the random function from different generating rules. The training is done with squared exponential kernel but evaluation is done on different generating rule [30] with controllable parameter $\lambda$ .
|
| 222 |
+
|
| 223 |
+
# 4 Conclusion
|
| 224 |
+
|
| 225 |
+
We address the problem of data-driven learning of the operator that maps between two function spaces. Motivated from the fundamental properties of the integral kernel, we found that multiwavelets constitute a natural basis to represent the kernel sparsely. After generalizing the multiwavelets to work with arbitrary measures, we proposed a series of models to learn the integral operator. This work opens up new research directions and possibilities toward designing efficient Neural operators utilizing properties of the kernels, and the suitable basis. We anticipate that the study of this problem will solve many engineering and biological problems such as aircraft wing design, complex fluids dynamics, metamaterials design, cyber-physical systems, neuron-neuron interactions that are modeled by complex PDEs.
|
| 226 |
+
|
| 227 |
+
# Acknowledgement
|
| 228 |
+
|
| 229 |
+
We are thankful to the anonymous reviewers for providing their valuable feedback which improved the manuscript. We would also like to thank Radu Balan for his valuable feedback. We gratefully acknowledge the support by the National Science Foundation Career award under Grant No. CPS/CNS-1453860, the NSF award under Grant CCF-1837131, MCB-1936775, CNS-1932620, the U.S. Army Research Office (ARO) under Grant No. W911NF-17-1-0076, the Okawa Foundation award, and the Defense Advanced Research Projects Agency (DARPA) Young Faculty Award and DARPA Director Award under Grant No. N66001-17-1-4044, an Intel faculty award and a Northrop Grumman grant. A part of this work used the Extreme Science and Engineering Discovery Environment (XSEDE), which is supported by National Science Foundation grant number ACI-1548562. The views, opinions, and/or findings contained in this article are those of the authors and should not be interpreted as representing the official views or policies, either expressed or implied by the Defense Advanced Research Projects Agency, the Army Research Office, the Department of Defense or the National Science Foundation.
|
| 230 |
+
|
| 231 |
+
References
|
| 232 |
+
[1] M. Abramowitz and I.A. Stegun. Handbook of Mathematical Functions: With Formulas, Graphs, and Mathematical Tables. Applied mathematics series. Dover Publications, 1965. ISBN 9780486612720.
|
| 233 |
+
[2] Jonas Adler and Ozan Öktem. Solving ill-posed inverse problems using iterative deep neural networks. Inverse Problems, 33(12), Nov 2017. ISSN 1361-6420. doi: 10.1088/1361-6420/ aa9581. URL http://dx.doi.org/10.1088/1361-6420/aa9581.
|
| 234 |
+
[3] B. Alpert, G. Beylkin, R. Coifman, and V. Rokhlin. Wavelet-like bases for the fast solution of second-kind integral equations. SIAM Journal on Scientific Computing, 14(1):159–184, 1993. doi: 10.1137/0914010.
|
| 235 |
+
[4] B. Alpert, G. Beylkin, D. Gines, and L. Vozovoi. Adaptive solution of partial differential equations in multiwavelet bases. Journal of Computational Physics, 182(1):149–190, 2002. ISSN 0021-9991.
|
| 236 |
+
[5] Bradley K. Alpert. A class of bases in $L ^ { 2 }$ for the sparse representation of integral operators. SIAM Journal on Mathematical Analysis, 24(1):246–262, 1993. doi: 10.1137/0524016.
|
| 237 |
+
[6] Bradley K. Alpert and Vladimir Rokhlin. A fast algorithm for the evaluation of legendre expansions. SIAM Journal on Scientific and Statistical Computing, 12(1):158–179, 1991. doi: 10.1137/0912009.
|
| 238 |
+
[7] Kevin Amaratunga and John Williams. Wavelet based green’s function approach to 2d pdes. Engineering Computations, 10, 07 2001. doi: 10.1108/eb023913.
|
| 239 |
+
[8] Radu Balan, Bernhard G. Bodmann, Peter G. Casazza, and Dan Edidin. Painless reconstruction from magnitudes of frame coefficients. Journal of Fourier Analysis and Applications, 16: 488–501, 2009.
|
| 240 |
+
[9] J.J. Benedetto. Wavelets: Mathematics and Applications. Studies in Advanced Mathematics. Taylor & Francis, 1993. ISBN 9780849382710.
|
| 241 |
+
[10] G. Beylkin. On the representation of operators in bases of compactly supported wavelets. SIAM Journal on Numerical Analysis, 29(6):1716–1740, 1992. doi: 10.1137/0729097.
|
| 242 |
+
[11] G. Beylkin, R. Coifman, and V. Rokhlin. Fast wavelet transforms and numerical algorithms i. Communications on Pure and Applied Mathematics, 44(2):141–183, 1991. doi: https: //doi.org/10.1002/cpa.3160440202.
|
| 243 |
+
[12] Gregory Beylkłn and James M. Keiser. An adaptive pseudo-wavelet approach for solving nonlinear partial differential equations. In Multiscale Wavelet Methods for Partial Differential Equations, volume 6 of Wavelet Analysis and Its Applications, pages 137–197. Academic Press, 1997.
|
| 244 |
+
[13] Saakaar Bhatnagar, Yaser Afshar, Shaowu Pan, Karthik Duraisamy, and Shailendra Kaushik. Prediction of aerodynamic flow fields using convolutional neural networks. Computational Mechanics, 64(2):525–545, Jun 2019. ISSN 1432-0924. doi: 10.1007/s00466-019-01740-0.
|
| 245 |
+
[14] Kaushik Bhattacharya, Bamdad Hosseini, Nikola B. Kovachki, and Andrew M. Stuart. Model reduction and neural networks for parametric pdes, 2020.
|
| 246 |
+
[15] Nicolas Boulle, Christopher J. Earls, and Alex Townsend. Data-driven discovery of physical laws with human-understandable deep learning, 2021.
|
| 247 |
+
[16] Joseph Boussinesq. Essai sur la théorie des eaux courantes. Impr. nationale, 1877.
|
| 248 |
+
[17] R. Y. Chang and M. L. Wang. Shifted legendre direct method for variational problems. Journal of Optimization Theory and Applications, 39(2):299–307, Feb 1983. ISSN 1573-2878. doi: 10.1007/BF00934535.
|
| 249 |
+
[18] Zhengdao Chen, Jianyu Zhang, Martin Arjovsky, and Léon Bottou. Symplectic recurrent neural networks. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id=BkgYPREtPr.
|
| 250 |
+
[19] Kenneth C. Chou and Gary S. Guthart. Representation of green’s function integral operators using wavelet transforms. Journal of Vibration and Control, 6(1):19–48, 2000. doi: 10.1177/ 107754630000600102.
|
| 251 |
+
[20] N.M. Chuong. Pseudodifferential Operators and Wavelets over Real and $p$ -adic Fields. Springer International Publishing, 2018. ISBN 9783319774732.
|
| 252 |
+
[21] M. Cotronei, L.B. Montefusco, and L. Puccio. Multiwavelet analysis and signal processing. IEEE Transactions on Circuits and Systems II: Analog and Digital Signal Processing, 45(8): 970–987, 1998.
|
| 253 |
+
[22] Henry Darcy. Les fontaines publiques de la ville de Dijon: exposition et application... Victor Dalmont, 1856.
|
| 254 |
+
[23] Olivier Darrigol. Worlds of flow: A history of hydrodynamics from the Bernoullis to Prandtl. Oxford University Press, 2005.
|
| 255 |
+
[24] Ingrid Daubechies. Orthonormal bases of compactly supported wavelets. Communications on Pure and Applied Mathematics, 41(7):909–996, 1988. doi: https://doi.org/10.1002/cpa. 3160410705.
|
| 256 |
+
[25] Ingrid Daubechies. Ten Lectures on Wavelets. Society for Industrial and Applied Mathematics, 1992. doi: 10.1137/1.9781611970104.
|
| 257 |
+
[26] D. Deng, Y. Meyer, and Y. Han. Harmonic Analysis on Spaces of Homogeneous Type. Lecture Notes in Mathematics. Springer Berlin Heidelberg, 2008. ISBN 9783540887447.
|
| 258 |
+
[27] T. A Driscoll, N. Hale, and L. N. Trefethen. Chebfun Guide. Pafnuty Publications, 2014.
|
| 259 |
+
[28] Yuwei Fan, Jordi Feliu-Faba, Lin Lin, Lexing Ying, and Leonardo Zepeda-Nunez. A multiscale neural network based on hierarchical nested bases, 2019.
|
| 260 |
+
[29] Jordi Feliu-Fabà, Yuwei Fan, and Lexing Ying. Meta-learning pseudo-differential operators with deep neural networks. Journal of Computational Physics, 408:109309, May 2020. ISSN 0021-9991. doi: 10.1016/j.jcp.2020.109309.
|
| 261 |
+
[30] Silviu-Ioan Filip, Aurya Javeed, and Lloyd Trefethen. Smooth random functions, random odes, and gaussian processes. SIAM Review, 61:185–205, 01 2019. doi: 10.1137/17M1161853.
|
| 262 |
+
[31] Daniel Greenfeld, Meirav Galun, Ron Kimmel, Irad Yavneh, and Ronen Basri. Learning to optimize multigrid pde solvers, 2019.
|
| 263 |
+
[32] Albert Gu, Tri Dao, Stefano Ermon, Atri Rudra, and Christopher Ré. Hippo: Recurrent memory with optimal polynomial projections. In Advances in Neural Information Processing Systems, volume 33, pages 1474–1487, 2020.
|
| 264 |
+
[33] Xiaoxiao Guo, Wei Li, and Francesco Iorio. Convolutional neural networks for steady flow approximation. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD ’16, page 481–490. Association for Computing Machinery, 2016.
|
| 265 |
+
[34] Mustafa Hajij, Ghada Zamzmi, Matthew Dawson, and Greg Muller. Algebraically-informed deep networks (aidn): A deep learning approach to represent algebraic structures, 2021.
|
| 266 |
+
[35] M.H. Heydari, M.R. Hooshmandasl, and F. Mohammadi. Legendre wavelets method for solving fractional partial differential equations with dirichlet boundary conditions. Applied Mathematics and Computation, 234:267–276, 2014. ISSN 0096-3003. doi: https://doi.org/10.1016/j.amc. 2014.02.047.
|
| 267 |
+
[36] Chyi Hwang and Yen-Ping Shih. Solution of integral equations via laguerre polynomials. Computers & Electrical Engineering, 9(3):123–129, 1982. ISSN 0045-7906. doi: https: //doi.org/10.1016/0045-7906(82)90018-0.
|
| 268 |
+
[37] Ameya D. Jagtap, Yeonjong Shin, Kenji Kawaguchi, and George Em Karniadakis. Deep kronecker neural networks: A general framework for neural networks with adaptive activation functions, 2021.
|
| 269 |
+
[38] M. Tavassoli Kajani, A. Hadi Vencheh, and M. Ghasemi. The chebyshev wavelets operational matrix of integration and product operation matrix. International Journal of Computer Mathematics, 86(7):1118–1125, 2009. doi: 10.1080/00207160701736236.
|
| 270 |
+
[39] F. Khellat and S.A. Yousefi. The linear legendre mother wavelets operational matrix of integration and its application. Journal of the Franklin Institute, 343(2):181–190, 2006. ISSN 0016-0032. doi: https://doi.org/10.1016/j.jfranklin.2005.11.002.
|
| 271 |
+
[40] Yuehaw Khoo, Jianfeng Lu, and Lexing Ying. Solving parametric pde problems with artificial neural networks. European Journal of Applied Mathematics, 32(3):421–435, Jul 2020. ISSN 1469-4425.
|
| 272 |
+
[41] Patrick Kidger, James Morrill, James Foster, and Terry Lyons. Neural controlled differential equations for irregular time series, 2020.
|
| 273 |
+
[42] Dmitrii Kochkov, Jamie A. Smith, Ayya Alieva, Qing Wang, Michael P. Brenner, and Stephan Hoyer. Machine learning–accelerated computational fluid dynamics. Proceedings of the National Academy of Sciences, 118(21), 2021. ISSN 0027-8424. doi: 10.1073/pnas.2101784118.
|
| 274 |
+
[43] Vasil Kolev, Todor Cooklev, and Fritz Keinert. Design of a simple orthogonal multiwavelet filter by matrix spectral factorization. Circuits, Systems, and Signal Processing, 39(4):2006–2041, Aug 2019.
|
| 275 |
+
[44] Samuel Lanthaler, Siddhartha Mishra, and George Em Karniadakis. Error estimates for deeponets: A deep learning framework in infinite dimensions, 2021.
|
| 276 |
+
[45] Yuanlu LI. Solving a nonlinear fractional differential equation using chebyshev wavelets. Communications in Nonlinear Science and Numerical Simulation, 15(9):2284–2292, 2010. ISSN 1007-5704. doi: https://doi.org/10.1016/j.cnsns.2009.09.020.
|
| 277 |
+
[46] Yuanlu Li and Weiwei Zhao. Haar wavelet operational matrix of fractional order integration and its applications in solving the fractional order differential equations. Applied Mathematics and Computation, 216(8):2276–2285, 2010. ISSN 0096-3003. doi: https://doi.org/10.1016/j. amc.2010.03.063.
|
| 278 |
+
[47] Zongyi Li, Nikola Kovachki, Kamyar Azizzadenesheli, Burigede Liu, Kaushik Bhattacharya, Andrew Stuart, and Anima Anandkumar. Fourier neural operator for parametric partial differential equations, 2020.
|
| 279 |
+
[48] Zongyi Li, Nikola Kovachki, Kamyar Azizzadenesheli, Burigede Liu, Kaushik Bhattacharya, Andrew Stuart, and Anima Anandkumar. Neural operator: Graph kernel network for partial differential equations, 2020.
|
| 280 |
+
[49] Zongyi Li, Nikola Kovachki, Kamyar Azizzadenesheli, Burigede Liu, Andrew Stuart, Kaushik Bhattacharya, and Anima Anandkumar. Multipole graph neural operator for parametric partial differential equations. In Advances in Neural Information Processing Systems, volume 33, pages 6755–6766, 2020.
|
| 281 |
+
[50] Lu Lu, Pengzhan Jin, and George Em Karniadakis. Deeponet: Learning nonlinear operators for identifying differential equations based on the universal approximation theorem of operators, 2020.
|
| 282 |
+
[51] Lu Lu, Pengzhan Jin, Guofei Pang, Zhongqiang Zhang, and George Em Karniadakis. Learning nonlinear operators via deeponet based on the universal approximation theorem of operators. Nature Machine Intelligence, 3(3):218–229, Mar 2021. ISSN 2522-5839.
|
| 283 |
+
[52] Ryan McKeown, Rodolfo Ostilla-Mónico, Alain Pumir, Michael P. Brenner, and Shmuel M. Rubinstein. Turbulence generation through an iterative cascade of the elliptical instability. Science Advances, 6(9), 2020. doi: 10.1126/sciadv.aaz2717.
|
| 284 |
+
[53] Y. Meyer and D.H. Salinger. Wavelets and Operators: Volume 1. Cambridge Studies in Advanced Mathematics. Cambridge University Press, 1992. ISBN 9780521458696.
|
| 285 |
+
[54] Y. Meyer, R. Coifman, and D. Salinger. Wavelets: Calderón-Zygmund and Multilinear Operators. Cambridge Studies in Advanced Mathematics. Cambridge University Press, 1997. ISBN 9780521420013.
|
| 286 |
+
[55] Guillaume Ovarlez, Anh Vu Nguyen Le, Wilbert J. Smit, Abdoulaye Fall, Romain Mari, Guillaume Chatté, and Annie Colin. Density waves in shear-thickening suspensions. Science Advances, 6(16), 2020. doi: 10.1126/sciadv.aay5589.
|
| 287 |
+
[56] Ravi G. Patel, Nathaniel A. Trask, Mitchell A. Wood, and Eric C. Cyr. A physics-informed operator regression framework for extracting data-driven continuum models. Computer Methods in Applied Mechanics and Engineering, 373:113500, 2021. ISSN 0045-7825. doi: https: //doi.org/10.1016/j.cma.2020.113500.
|
| 288 |
+
[57] M. Raissi, P. Perdikaris, and G.E. Karniadakis. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial
|
| 289 |
+
|
| 290 |
+
differential equations. Journal of Computational Physics, 378:686–707, 2019. ISSN 0021-
|
| 291 |
+
|
| 292 |
+
9991.
|
| 293 |
+
[58] C.E. Rasmussen and C.K.I. Williams. Gaussian Processes for Machine Learning. Adaptative computation and machine learning series. University Press Group Limited, 2006.
|
| 294 |
+
[59] Mohsen Razzaghi and Samira Yousefi. The legendre wavelets operational matrix of integration. International Journal of Systems Science, 32:495–502, 04 2001. doi: 10.1080/00207720120227.
|
| 295 |
+
[60] M. F. Shlesinger, B. J. West, and J. Klafter. Lévy dynamics of enhanced diffusion: Application to turbulence. Phys. Rev. Lett., 58:1100–1103, Mar 1987. doi: 10.1103/PhysRevLett.58.1100.
|
| 296 |
+
[61] B. W. Silverman, J. C. Vassilicos, and Nick Kingsbury. Image processing with complex wavelets. Philosophical Transactions of the Royal Society of London. Series A: Mathematical, Physical and Engineering Sciences, 357(1760):2543–2560, 1999. doi: 10.1098/rsta.1999.0447.
|
| 297 |
+
[62] S. Timoshenko. History of Strength of Materials: With a Brief Account of the History of Theory of Elasticity and Theory of Structures. Dover Civil and Mechanical Engineering Series. Dover Publications, 1983. ISBN 9780486611877.
|
| 298 |
+
[63] J. Towns, T. Cockerill, M. Dahan, I. Foster, K. Gaither, A. Grimshaw, V. Hazlewood, S. Lathrop, D. Lifka, G. D. Peterson, R. Roskies, J. R. Scott, and N. Wilkins-Diehr. Xsede: Accelerating scientific discovery. Computing in Science & Engineering, 16(5):62–74, Sept.-Oct. 2014. ISSN 1521-9615. doi: 10.1109/MCSE.2014.80. URL doi.ieeecomputersociety.org/10.1109/ MCSE.2014.80.
|
| 299 |
+
[64] Lifeng Wang, Yunpeng Ma, and Zhijun Meng. Haar wavelet method for solving fractional partial differential equations numerically. Applied Mathematics and Computation, 227:66–76, 2014. ISSN 0096-3003. doi: https://doi.org/10.1016/j.amc.2013.11.004.
|
| 300 |
+
[65] Sifan Wang, Hanwen Wang, and Paris Perdikaris. Learning the solution operator of parametric partial differential equations with physics-informed deeponets, 2021.
|
| 301 |
+
[66] Yanxin Wang and Qibin Fan. The second kind chebyshev wavelet method for solving fractional differential equations. Applied Mathematics and Computation, 218(17):8592–8601, 2012. ISSN 0096-3003. doi: https://doi.org/10.1016/j.amc.2012.02.022.
|
| 302 |
+
[67] Shiying Xiong, Xingzhe He, Yunjin Tong, and Bo Zhu. Neural vortex method: from finite lagrangian particles to infinite dimensional eulerian dynamics, 2020.
|
| 303 |
+
[68] Yuankun Xue and Paul Bogdan. Constructing compact causal mathematical models for complex dynamics. In 2017 ACM/IEEE 8th International Conference on Cyber-Physical Systems (ICCPS), pages 97–108, April 2017.
|
| 304 |
+
[69] Li Zhu and Yanxin Wang. Solving fractional partial differential equations by using the second chebyshev wavelet operational matrix method. Nonlinear Dynamics, 89(3):1915–1925, Aug 2017. ISSN 1573-269X. doi: 10.1007/s11071-017-3561-7.
|
| 305 |
+
[70] Li Zhu and Yanxin Wang. Solving fractional partial differential equations by using the second chebyshev wavelet operational matrix method. Nonlinear Dynamics, 89(3):1915–1925, Aug 2017. ISSN 1573-269X. doi: 10.1007/s11071-017-3561-7.
|
| 306 |
+
[71] Yinhao Zhu and Nicholas Zabaras. Bayesian deep convolutional encoder–decoder networks for surrogate modeling and uncertainty quantification. Journal of Computational Physics, 366: 415–447, Aug 2018. ISSN 0021-9991.
|
| 307 |
+
|
| 308 |
+
# Checklist
|
| 309 |
+
|
| 310 |
+
1. For all authors...
|
| 311 |
+
|
| 312 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] For example, see Table 1 2, Figure 6 for benchmarks on the datasets. Also, see Figure 3 for robustness plot, and Figure 5 for theoretical insights for pseudo-differential operators.
|
| 313 |
+
(b) Did you describe the limitations of your work? [Yes] We discuss in details the possible numerical issues that can occur in estimating the filter matrices ${ \cal H } ^ { ( 0 ) } , { \cal H } ^ { ( 1 ) } , { \cal G } ^ { \bar { ( 0 ) } } , { \cal G } ^ { ( 1 ) }$ for large values of $k$ . The issue is not related to the mathematics involved but due to the nature of floating-point precision. We discuss this in details in the supplementary materials.
|
| 314 |
+
(c) Did you discuss any potential negative societal impacts of your work? [N/A]
|
| 315 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 316 |
+
|
| 317 |
+
2. If you are including theoretical results...
|
| 318 |
+
|
| 319 |
+
(a) Did you state the full set of assumptions of all theoretical results? [Yes] Please refer to Section 2.2, where we list all the necessary derived results, while we have referred the reader (at appropriate places) to the supplementary materials for the complete details.
|
| 320 |
+
(b) Did you include complete proofs of all theoretical results? [Yes] We provide detailed derivations of all the measure dependent filter matrices ${ \cal H } ^ { ( 0 ) } , { \cal H } ^ { ( 1 ) } , { \cal G } ^ { ( \bar { 0 } ) } , { \cal G } ^ { ( 1 ) }$ and also the correction terms $\Sigma ^ { ( 0 ) } , \Sigma ^ { ( 1 ) }$ in the supplementary materials.
|
| 321 |
+
|
| 322 |
+
3. If you ran experiments...
|
| 323 |
+
|
| 324 |
+
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] The code is uploaded with the supplementary materials.
|
| 325 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] Please refer to Section 3 where we list all of the details regarding training and model architectures.
|
| 326 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] All the results included in the paper are averaged over a total of 3 seeds. We have also mentioned the same in Section 3.
|
| 327 |
+
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] All of the experiments were performed on a single Nvidia V100 32 GB GPU, please refer to Section 3.
|
| 328 |
+
|
| 329 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 330 |
+
|
| 331 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] A part of the datasets are taken from the FNO work [47], while some are generated using the scripts provided by the same authors. We have properly cited the work in Section 3 Benchmark models.
|
| 332 |
+
(b) Did you mention the license of the assets? [N/A] A part of the code and datasets ([47]) used by us are openly available with no license restriction, to the best of our knowledge.
|
| 333 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [N/A]
|
| 334 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [Yes] The code and the dataset is openly available.
|
| 335 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] All the datasets are synthetically generated.
|
| 336 |
+
|
| 337 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 338 |
+
|
| 339 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 340 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 341 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/SJgIPJBFvH/SJgIPJBFvH.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/SkxxIs0qY7/SkxxIs0qY7.md
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# COT: COOPERATIVE TRAINING FOR GENERATIVEMODELING OF DISCRETE DATA
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
We propose Cooperative Training (CoT) for training generative models that measure a tractable density for discrete data. CoT coordinately trains a generator $G$ and an auxiliary predictive mediator $M$ . The training target of $M$ is to estimate a mixture density of the learned distribution $G$ and the target distribution $P$ , and that of $G$ is to minimize the Jensen-Shannon divergence estimated through $M$ . CoT achieves independent success without the necessity of pre-training via Maximum Likelihood Estimation or involving high-variance algorithms like REINFORCE. This low-variance algorithm is theoretically proved to be superior for both sample generation and likelihood prediction. We also theoretically and empirically show the superiority of CoT over most previous algorithms in terms of generative quality and diversity, predictive generalization ability and computational cost.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Generative modeling is essential in many scenarios, including continuous data modeling (e.g. image generation (Goodfellow et al., 2014; Arjovsky et al., 2017), stylization (Ulyanov et al., 2016), semisupervised classification (Radford et al., 2015)) and sequential discrete data modeling (e.g. neural text generation (Bahdanau et al., 2014; Yu et al., 2017; Lu et al., 2018)).
|
| 12 |
+
|
| 13 |
+
For discrete data with tractable density like natural language, generative models are predominantly optimized through Maximum Likelihood Estimation (MLE), inevitably introducing exposure bias (Ranzato et al., 2015), which results in that given a finite set of observations, the optimal parameters of the model trained via MLE do not correspond to the ones maximizing the generative quality. Specifically, the model is trained on the data distribution of inputs and tested on a different distribution of inputs, namely, the learned distribution. This discrepancy implies that in the training stage, the model is never exposed to its own errors and thus in the test stage, the errors made along the way will quickly accumulate.
|
| 14 |
+
|
| 15 |
+
On the other hand, for general generative modeling tasks, an effective framework, named Generative Adversarial Network (GAN) (Goodfellow et al., 2014), was proposed to train an implicit density model for continuous data. GAN introduces a discriminator $D _ { \phi }$ parametrized by $\phi$ to distinguish the generated samples from the real ones. As is proved in (Goodfellow et al., 2014), GAN essentially optimizes an approximately estimated Jensen-Shannon divergence (JSD) between the currently learned distribution and the target distribution. GAN shows promising results in many unsupervised and semi-supervised learning tasks. The success of GAN results in the naissance of a new paradigm of deep generative models, i.e. adversarial networks.
|
| 16 |
+
|
| 17 |
+
However, since the gradient computation requires backpropagation through the generator’s output, GAN can only model the distribution of continuous variables, making it non-applicable for generating discrete sequences like natural language. Researchers then proposed Sequence Generative Adversarial Network (SeqGAN) (Yu et al., 2017), which uses model-free policy gradient algorithm to optimize the original GAN objective. With SeqGAN, the expected JSD between current and target discrete data distribution is minimized if the training is perfect. SeqGAN shows observable improvements in many tasks. Since then, many variants of SeqGAN have been proposed to improve its performance. Nonetheless, SeqGAN is not an ideal algorithm for this problem, and current algorithms based on it cannot show stable, reliable and observable improvements that covers all scenarios, according to a previous survey (Lu et al., 2018). The detailed reason will be discussed in detail in Section 2.
|
| 18 |
+
|
| 19 |
+
In this paper, we propose Cooperative Training (CoT), a novel, low-variance, bias-free algorithm for training likelihood-based generative models on discrete data by directly optimizing a wellestimated Jensen-Shannon divergence. CoT coordinately trains a generative module $G$ , and an auxiliary predictive module $M$ , called mediator, for guiding $G$ in a cooperative fashion. For theoretical soundness, we derive the proposed algorithm directly from the definition of JSD. We further empirically and theoretically demonstrate the superiority of our algorithm over many strong baselines in terms of generative performance, generalization ability and computational performance in both synthetic and real-world scenarios.
|
| 20 |
+
|
| 21 |
+
# 2 BACKGROUND
|
| 22 |
+
|
| 23 |
+
Notations. $P$ denotes the target data distribution. $\theta$ denotes the parameters of the generative module $G$ . $\phi$ denotes the parameters of the auxiliary predictive mediator module $M$ . Any symbol with subscript $g$ and $m$ stands for that of the generator and mediator, respectively. $s$ stands for a complete sample from the training dataset or a generated complete sequence, depending on the specific context. $s _ { t }$ means the $t$ -length prefix of the original sequence, i.e. an incomplete sequence of length $t$ . $x$ denotes a token, and $x _ { t }$ stands for a token that appears in the $t { \cdot }$ -th place of a sequence. Thus $s _ { t } = [ x _ { 0 } , x _ { 1 } , x _ { 2 } , \ldots , x _ { t - 1 } ]$ while the initial case $s _ { 0 }$ is $\varnothing$ .
|
| 24 |
+
|
| 25 |
+
# 2.1 MAXIMUM LIKELIHOOD ESTIMATION
|
| 26 |
+
|
| 27 |
+
Maximum likelihood estimation is equivalent to minimizing the KL divergence using the samples from the real distribution:
|
| 28 |
+
|
| 29 |
+
$$
|
| 30 |
+
\operatorname* { m i n } _ { \theta } \mathbb { E } _ { s \sim p _ { \mathrm { d a t a } } } \left[ - \log G _ { \theta } ( s ) \right] ,
|
| 31 |
+
$$
|
| 32 |
+
|
| 33 |
+
where $G _ { \theta } ( s )$ is the estimated probability of $s$ by $G _ { \theta }$ and $p _ { \mathrm { d a t a } }$ is the underlying real distribution.
|
| 34 |
+
|
| 35 |
+
Limitations of MLE. MLE is essentially equivalent to optimizing a directed Kullback–Leibler (KL) divergence between the target distribution $P$ and the currently learned distribution $G$ , denoted as $K L ( P \| G )$ . However, since KL divergence is asymmetric, given finite observations this target is actually not ideal. As stated in (Arjovsky & Bottou, 2017), MLE tries to minimize
|
| 36 |
+
|
| 37 |
+
$$
|
| 38 |
+
K L ( P \| G ) = \sum _ { s } P ( s ) \log { \frac { P ( s ) } { G ( s ) } } .
|
| 39 |
+
$$
|
| 40 |
+
|
| 41 |
+
• When $P ( s ) > 0$ and $G ( s ) \to 0$ , the KL divergence grows to infinity, which means MLE assigns an extremely high cost to the “mode dropping” scenarios, where the generator fails to cover some parts of the data. When $G ( s ) > 0$ and $P ( s ) \to 0$ , the KL divergence shrinks to 0, which means MLE assigns an extremely low cost to the scenarios, where the model generates some samples that do not locate on the data distribution.
|
| 42 |
+
|
| 43 |
+
Likewise, optimizing $K L ( G \| P )$ will lead to exactly the reversed problems of the two situations. An ideal solution is to optimize a symmetrized and smoothed version of KL divergence, i.e. the Jensen-Shannon divergence (JSD), which is defined as
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
J S D ( P \| G ) = \frac { 1 } { 2 } \big ( K L ( P \| M ) + K L ( G \| M ) \big ) ,
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
where $M = { \textstyle \frac { 1 } { 2 } } ( P + G )$ . However, directly optimizing JSD is conventionally considered as an intractable problem. JSD cannot be directly evaluated and optimized since the equally interpolated distribution $M$ is usually considered to be unconstructable, as we only have access to the learned model $G$ instead of $P$ .
|
| 50 |
+
|
| 51 |
+
# 2.2 SEQUENCE GENERATIVE ADVERSARIAL NETWORK
|
| 52 |
+
|
| 53 |
+
SeqGAN incorporates two modules, i.e. the generator and discriminator, parametrized by $\theta$ and $\phi$ respectively, as in the settings of GAN. By alternatively training these two modules, SeqGAN optimizes such an adversarial target:
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
\operatorname* { m i n } _ { \theta } \operatorname* { m a x } _ { \phi } \mathbb { E } _ { s \sim p _ { \mathrm { d a t a } } } \left[ \log ( D _ { \phi } ( s ) ) \right] + \mathbb { E } _ { s \sim G _ { \theta } } \left[ \log ( 1 - D _ { \phi } ( s ) ) \right] .
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
# Algorithm 1 Cooperative Training
|
| 60 |
+
|
| 61 |
+
Require: Generator $G _ { \theta }$ ; mediator $M _ { \phi }$ ; samples from real data distribution $P$ ; hyper-parameter $N _ { m }$ .
|
| 62 |
+
1: Initialize $G _ { \theta }$ , $M _ { \phi }$ with random weights $\theta , \phi$ .
|
| 63 |
+
2: repeat
|
| 64 |
+
3: for $N _ { m }$ steps do
|
| 65 |
+
4: Collect two equal-sized mini-batch of samples $\{ s _ { g } \}$ and $\{ s _ { p } \}$ from $G _ { \theta }$ and $P$ , respectively
|
| 66 |
+
5: Mix $\{ s _ { g } \}$ and $\{ s _ { p } \}$ as $\{ s \}$
|
| 67 |
+
6: Update mediator $M _ { \phi }$ with $\{ s \}$ via Eq. (9)
|
| 68 |
+
7: end for
|
| 69 |
+
8: Generate a mini-batch of sequences $\{ s \} \sim G _ { \theta }$
|
| 70 |
+
9: Update generator $G _ { \theta }$ with $\{ s \}$ via Eq. (13)
|
| 71 |
+
10: until CoT converges
|
| 72 |
+
|
| 73 |
+
The objectives of generator $G _ { \theta }$ and discriminator $D _ { \phi }$ in SeqGAN can be formulated as
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
\mathrm { G e n e r a t o r : \quad } \operatorname* { m i n } _ { \theta } - \mathbb { E } _ { s \sim G _ { \theta } } \Big [ \sum _ { t = 1 } ^ { n } Q _ { t } ( s _ { t } , x _ { t } ) \cdot \log G _ { \theta } ( x _ { t } | s _ { t } ) \Big ]
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
\mathrm { i n a t o r : } \quad \operatorname* { m a x } _ { \phi } \mathbb { E } _ { s \sim p _ { \mathrm { d a t a } } } \left[ \log ( D _ { \phi } ( s ) ) \right] + \mathbb { E } _ { s \sim G _ { \theta } } \left[ \log ( 1 - D _ { \phi } ( s ) ) \right] ,
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
where $s \sim G _ { \boldsymbol \theta } = [ x _ { 1 } , . . . , x _ { n } ]$ denotes a complete sequence sampled from the generator and the action value $Q _ { t } ( s _ { t } , x _ { t } ) \stackrel { - } { = } \mathbb { E } _ { s \sim G _ { \theta } ( \cdot | s _ { t + 1 } ) } \left[ D _ { \phi } ( s ) \right]$ is the expectation of the discriminator’s evaluation on the completed sequences sampled from the prefix $\boldsymbol { s } _ { t + 1 } = \left[ \boldsymbol { s } _ { t } , \boldsymbol { x } _ { t } \right]$ , which can be approximated via Monte Carlo search.
|
| 84 |
+
|
| 85 |
+
Limitations of SeqGAN & its Variants. First, SeqGAN is an algorithm of high variance, which relies on pre-training via Maximum Likelihood Estimation as a variance reduction procedure. Besides, during the adversarial epochs, even if with variance reduction techniques such as Actor-Critic methods (Sutton, 1984), the fact that SeqGAN is essentially based on model-free reinforcement learning makes it a non-trivial problem for SeqGAN to converge well. As a result, SeqGAN usually gets stuck in some fake local optimals. Specifically, although the discriminator can distinguish the samples from the generator easily, it is not able to effectively guide the generator because of the vanishing gradient, as is discussed in a recent survey (Lu et al., 2018). Although this problem can be alleviated by reshaping the reward signals based on the relative rankings of the outputs in a mini-batch (Lin et al., 2017; Guo et al., 2017), they are more technical workarounds than essential solutions.
|
| 86 |
+
|
| 87 |
+
Second, SeqGAN trained via REINFORCE (Williams, 1992) suffers from the “mode collapse” problem, which is similar to the original GAN. That is to say, the learned distribution “collapses” to the other side of KL divergence, i.e. $K L ( G \| P )$ , which leads to the loss of diversity of generated samples. In other words, SeqGAN trains the model for better generative quality at the cost of diversity.
|
| 88 |
+
|
| 89 |
+
# 3 COOPERATIVE TRAINING
|
| 90 |
+
|
| 91 |
+
# 3.1 MOTIVATION
|
| 92 |
+
|
| 93 |
+
To be consistent with the goal that the target distribution should be well-estimated in both quality and diversity senses, an ideal algorithm for such models should be able to optimize a symmetric divergence or distance.
|
| 94 |
+
|
| 95 |
+
For sequential discrete data modeling, since the data distribution is decomposed into a sequential product of finite-dimension multinomial distributions (always based on the softmax form), the failures of effectively optimizing JSD when the generated and real data distributions are distant, as discussed in (Arjovsky et al., 2017), will not appear. As such, to optimize JSD is feasible. However, to our knowledge, no previous algorithms provide a direct, low-variance optimization of JSD. In this paper, we propose Cooperative Training (CoT), as shown in Algorithm 1, to directly optimize a well-estimated unbiased JSD for training such models.
|
| 96 |
+
|
| 97 |
+
# 3.2 ALGORITHM DERIVATION
|
| 98 |
+
|
| 99 |
+
Each iteration of Cooperative Training mainly consists of two parts. The first part is to train a mediator $M _ { \phi }$ , which is a density function that estimates a mixture distribution of the learned generative distribution $G _ { \theta }$ and target latent distribution $P = p _ { \mathrm { d a t a } }$ as
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
M _ { \phi } \simeq \frac { 1 } { 2 } ( P + G _ { \theta } ) .
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
Since the mediator is only used as a density prediction module during training, the directed KL divergence is now free from so-called exposure bias for optimization of $M _ { \phi }$ . Denote ${ \scriptstyle { \frac { 1 } { 2 } } } ( P + G _ { \theta } )$ as $M ^ { * }$ , we have:
|
| 106 |
+
|
| 107 |
+
# Lemma 1 (Mixture Density Decomposition)
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
\begin{array} { r l } & { \nabla _ { \phi } J _ { m } ( \phi ) = \nabla _ { \phi } K L ( M ^ { * } \| M _ { \phi } ) } \\ & { \quad \quad = \nabla _ { \phi } \underset { s \sim M ^ { * } } { \mathbb { E } } \left[ \log \frac { M ^ { * } ( s ) } { M _ { \phi } ( s ) } \right] } \\ & { \quad \quad \quad = \nabla _ { \phi } \Big ( \ - \underset { s \sim M ^ { * } } { \mathbb { E } } [ \log M _ { \phi } ( s ) ] \Big ) } \\ & { \quad \quad \quad = \nabla _ { \phi } \frac { 1 } { 2 } \Big ( \underset { s \sim G _ { \theta } } { \mathbb { E } } [ - \log ( M _ { \phi } ( s ) ) ] + \underset { s \sim P } { \mathbb { E } } [ - \log ( M _ { \phi } ( s ) ) ] \Big ) } \end{array}
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
By Lemma 1, for each step, we can simply mix balanced samples from training data and the generator, then train the mediator via Maximum Likelihood Estimation with the mixed samples. The objective $J _ { m } ( \phi )$ for the mediator $M$ parametrized by $\phi$ therefore becomes
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
J _ { m } ( \phi ) = \frac { 1 } { 2 } { \Big ( } \underset { s \sim G _ { \theta } } { \mathbb { E } } [ - \log ( M _ { \phi } ( s ) ) ] + \underset { s \sim P } { \mathbb { E } } [ - \log ( M _ { \phi } ( s ) ) ] { \Big ) } .
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
Since the objective of MLE is bias-free for predictive purposes, the estimated $M _ { \phi }$ is also bias-free when adopted for estimating JSD. The training techniques and details will be discussed in Section 4.
|
| 120 |
+
|
| 121 |
+
After each iteration, the mediator is exploited to optimize an estimated Jensen-Shannon divergence for $G _ { \theta }$ :
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
\begin{array} { r l } & { \nabla _ { \theta } J _ { g } ( \theta ) = \nabla _ { \theta } \Big ( - J \hat { S } D ( G _ { \theta } \| P ) \Big ) = \nabla _ { \theta } \Big ( - \frac { 1 } { 2 } \big [ K L ( G _ { \theta } \| M _ { \phi } ) + K L ( P \| M _ { \phi } ) \big ] \Big ) } \\ & { \qquad = \nabla _ { \theta } \left( - \frac { 1 } { 2 } \underbrace { \mathbb { E } } _ { s \sim G _ { \theta } } \left[ \log \frac { G _ { \theta } ( s ) } { M _ { \phi } ( s ) } \right] - \frac { 1 } { 2 } \underbrace { \mathbb { E } } _ { s \sim P } \left[ \log \frac { P ( s ) } { M _ { \phi } ( s ) } \right] \right) = \nabla _ { \theta } \left( - \frac { 1 } { 2 } \underbrace { \mathbb { E } } _ { s \sim G _ { \theta } } \left[ \log \frac { G _ { \theta } ( s ) } { M _ { \phi } ( s ) } \right] \right) . } \end{array}
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
Note that the gradient Eq. (10) should be performed for only one step because once $G _ { \theta }$ is updated the current mediator’s estimation $M _ { \phi }$ becomes inaccurate.
|
| 128 |
+
|
| 129 |
+
For any sequence or prefix of length $t$ , we have:
|
| 130 |
+
|
| 131 |
+
# Lemma 2 (Markov Backward Reduction)
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
\begin{array} { r l } & { \quad \nabla _ { \theta } \Big ( - \frac { 1 } { 2 } \underset { s _ { t } \sim G _ { \theta } } { \mathbb { E } } \left[ \log \frac { G _ { \theta } \left( s _ { t } \right) } { M _ { \phi } \left( s _ { t } \right) } \right] \Big ) } \\ & { = \nabla _ { \theta } \left( - \frac { 1 } { 2 } \underset { s _ { t - 1 } \sim G _ { \theta } } { \mathbb { E } } \left[ \sum _ { s _ { t } } G _ { \theta } ( s _ { t } | s _ { t - 1 } ) \log \frac { G _ { \theta } \left( s _ { t } | s _ { t - 1 } \right) } { M _ { \phi } \left( s _ { t } | s _ { t - 1 } \right) } \right] - \frac { 1 } { 2 } \underset { s _ { t - 1 } \sim G _ { \theta } } { \mathbb { E } } \left[ \log \frac { G _ { \theta } \left( s _ { t - 1 } \right) } { M _ { \phi } \left( s _ { t - 1 } \right) } \right] \right) . } \end{array}
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
The detailed derivations can be found in the supplementary material. Note that Lemma 2 can be applied recursively. That is to say, given any sequence $s _ { t }$ of arbitrary length $t$ , optimizing $s _ { t }$ ’s contribution to the expected JSD can be decomposed into optimizing the first term of Eq. (12) and solving an isomorphic problem for $s _ { t - 1 }$ , which is the longest proper prefix of $s _ { t }$ . When $t = 1$ , since in Markov decision process the probability for initial state $s _ { 0 }$ is always 1.0, it is trivial to prove that the final second term becomes 0.
|
| 138 |
+
|
| 139 |
+
Therefore, Eq. (10) can be reduced through recursively applying Lemma 2. After removing the constant multipliers and denoting the predicted probability distribution over the action space, i.e. $G _ { \theta } ( \cdot | s _ { t } )$ and $\bar { M } _ { \phi } ( \cdot | s _ { t } )$ , as $\pi _ { g } ( s _ { t } )$ and $\pi _ { m } ( s _ { t } )$ respectively, the gradient $\nabla _ { \theta } J _ { g } ( \theta )$ for training generator via Cooperative Training can be formulated as
|
| 140 |
+
|
| 141 |
+
$$
|
| 142 |
+
\nabla _ { \boldsymbol { \theta } } J _ { g } ( \boldsymbol { \theta } ) = \nabla _ { \boldsymbol { \theta } } \underset { s \sim G _ { \boldsymbol { \theta } } } { \mathbb { E } } \Big [ \sum _ { t = 0 } ^ { n - 1 } \pi _ { g } ( s _ { t } ) ^ { \top } ( \log \pi _ { m } ( s _ { t } ) - \log \pi _ { g } ( s _ { t } ) ) \Big ] .
|
| 143 |
+
$$
|
| 144 |
+
|
| 145 |
+
For tractable density models with finite discrete action space in each step, the practical effectiveness of this gradient is well guaranteed for the following reasons. First, with a random initialization of the model, the supports of distributions $G _ { \theta }$ and $P$ are hardly disjoint. Second, the first term of Eq. (13) is to minimize the cross entropy between $G$ and $M ^ { * }$ , which tries to enlarge the overlap of two distributions. Third, since the second term of Eq. (13) is equivalent to maximizing the entropy of $G$ , it encourages the support of $G$ to cover the whole action space, which avoids the case of disjoint supports between $G$ and $P$ .
|
| 146 |
+
|
| 147 |
+
The overall objective of CoT can be formulated as finding the maximal entropy solution of
|
| 148 |
+
|
| 149 |
+
$$
|
| 150 |
+
\operatorname* { m a x } _ { \theta } \operatorname* { m a x } _ { \phi } \ \operatorname* { \mathbb { E } } _ { s \sim p _ { \mathrm { d a t a } } } \left[ \log ( M _ { \phi } ( s ) ) \right] + \operatorname* { \mathbb { E } } _ { s \sim G _ { \theta } } \left[ \log ( M _ { \phi } ( s ) ) \right] .
|
| 151 |
+
$$
|
| 152 |
+
|
| 153 |
+
Note the strong connections and differences between the optimization objective of CoT (14) and that of GAN (4). Figure 1 illustrates the whole Cooperative Training process.
|
| 154 |
+
|
| 155 |
+

|
| 156 |
+
Figure 1: Process of Cooperative Training.
|
| 157 |
+
|
| 158 |
+
# 3.3 CONVERGENCE ANALYSIS
|
| 159 |
+
|
| 160 |
+
CoT has theoretical guarantee on its convergence.
|
| 161 |
+
|
| 162 |
+
Theorem 3 (Jensen-Shannon Consistency) If in each step, the mediator $M _ { \phi }$ of CoT is trained to be optimal, i.e. $\begin{array} { r } { M _ { \phi } = M ^ { * } = \frac { 1 } { 2 } ( G _ { \theta } + P ) } \end{array}$ , then optimization via Eq. (14) leads to minimization of $J S D ( G \| P )$ .
|
| 163 |
+
|
| 164 |
+
Proof. Let $p$ denote the intermediate states. It would be used in the detailed proof. All we need to show is
|
| 165 |
+
|
| 166 |
+
$$
|
| 167 |
+
\nabla _ { \boldsymbol { \theta } } \underset { s \sim G _ { \boldsymbol { \theta } } } { \mathbb { E } } \left[ \sum _ { t = 1 } ^ { n } \pi _ { \boldsymbol { g } } ( s _ { t } ) ^ { \top } ( \log \pi _ { m } ( s _ { t } ) - \log \pi _ { \boldsymbol { g } } ( s _ { t } ) ) \right] \propto \nabla _ { \boldsymbol { \theta } } J S D ( P \| G _ { \boldsymbol { \theta } } ) .
|
| 168 |
+
$$
|
| 169 |
+
|
| 170 |
+
By inversely applying Lemma 2, the left part in Eq. (15) can be recovered as
|
| 171 |
+
|
| 172 |
+
$$
|
| 173 |
+
\nabla _ { \theta } \Big ( \frac { 1 } { 2 } \mathop { \mathbb { E } } _ { s \sim G _ { \theta } } \Big [ \log \frac { G _ { \theta } ( s ) } { M _ { \phi } ( s ) } \Big ] \Big ) ,
|
| 174 |
+
$$
|
| 175 |
+
|
| 176 |
+
which is equivalent to
|
| 177 |
+
|
| 178 |
+
$$
|
| 179 |
+
\nabla _ { \theta } \left( \underset { s \sim G _ { \theta } } { \mathbb { E } } \left[ \log \frac { G _ { \theta } ( s ) } { M _ { \phi } ( s ) } \right] + \underset { s \sim P } { \mathbb { E } } \left[ \log \frac { P ( s ) } { M _ { \phi } ( s ) } \right] \right) .
|
| 180 |
+
$$
|
| 181 |
+
|
| 182 |
+
Since now mediator is trained to be optimal, i.e. $M _ { \phi } = M ^ { * }$ , we have
|
| 183 |
+
|
| 184 |
+
$$
|
| 185 |
+
\begin{array} { r l } & { ( 1 7 ) = \nabla _ { \theta } \left( \underset { s \sim G _ { \theta } } { \mathbb { E } } \left[ \log \frac { G _ { \theta } ( s ) } { M ^ { * } ( s ) } \right] + \underset { s \sim P } { \mathbb { E } } \left[ \log \frac { P ( s ) } { M ^ { * } ( s ) } \right] \right) } \\ & { \quad \quad = 2 \nabla _ { \theta } J \hat { S } D ( P \| G _ { \theta } ) \propto \nabla _ { \theta } J \hat { S } D ( P \| G _ { \theta } ) . } \end{array}
|
| 186 |
+
$$
|
| 187 |
+
|
| 188 |
+
This means training through CoT leads to minimization of $J \hat { S } D ( P \| G _ { \theta } )$ . When the mediator is trained to be optimal, $J \hat { S } D ( P \| G _ { \theta } ) = J S D ( P \| G _ { \theta } )$ . This verifies the theorem.
|
| 189 |
+
|
| 190 |
+
# 3.4 DISCUSSION
|
| 191 |
+
|
| 192 |
+
# 3.4.1 ADVANTAGES OVER PREVIOUS METHODS
|
| 193 |
+
|
| 194 |
+
CoT has several practical advantages over previous methods, including MLE, Scheduled Sampling (SS) (Bengio et al., 2015) and adversarial methods like SeqGAN (Yu et al., 2017).
|
| 195 |
+
|
| 196 |
+
First, although CoT and GAN both aim to optimize an estimated JSD, CoT is exceedingly more stable than GAN. This is because the two modules, namely generator and mediator, have similar tasks, i.e. to approach the same data distribution generatively and predictively. The superiority of CoT over inconsistent methods like Scheduled Sampling is obvious, since CoT theoretically guarantees the training effectiveness. Compared with methods that require pre-training in order to reduce variance like SeqGAN (Yu et al., 2017), CoT is computationally cheaper. More specifically, under recommended settings, CoT has the same order of computational complexity as MLE.
|
| 197 |
+
|
| 198 |
+
Besides, CoT works independently. In practice, it does not require model pre-training via conventional methods like MLE. This is the first time that unbiased unsupervised learning is achieved on sequential discrete data without using supervised approximation for variance reduction or sophisticated smoothing as in Wasserstein GAN with gradient penalty (WGAN-GP) (Gulrajani et al., 2017).
|
| 199 |
+
|
| 200 |
+
# 3.4.2 THE NECESSITY OF THE MEDIATOR
|
| 201 |
+
|
| 202 |
+
An interesting problem is to ask why we need to train a mediator by mixing the samples from both sources $G$ and $P$ , instead of directly training a predictive model $\hat { P }$ on the training set via MLE. There are basically two points to interpret this.
|
| 203 |
+
|
| 204 |
+
To apply the efficient training objective 13, one needs to obtain not only the mixture density model $M = { \frac { 1 } { 2 } } { \bar { ( P + G ) } }$ but also its decomposed form in each timestep i.e. $\begin{array} { r } { \dot { M } _ { \phi } ( s ) = \prod _ { t = 1 } ^ { n } M _ { \phi } ( \dot { s } _ { t } | s _ { t - 1 } ) } \end{array}$ , without which the term $\pi _ { m } ( s _ { t } )$ in Eq 13 cannot be computed efficiently. This indicates that if we directly estimate $P$ and compute $M { \overset { \cdot } { = } } { \frac { 1 } { 2 } } ( G + P )$ , the obtained $M$ will be actually useless since its decomposed form is not available.
|
| 205 |
+
|
| 206 |
+
Besides, as a derivative problem of “exposure bias”, there is no guarantee for the model $\hat { P }$ to work well on the generated samples i.e. $s \sim G _ { \theta }$ to guide the generator towards the target distribution. Given finite observations, the learned distribution $\hat { P }$ is trained to provide correct predictions for samples from the target distribution $P$ . There is no guarantee that $\hat { P }$ can stably provide correct predictions for guiding the generator. Ablation study is provided in the appendix.
|
| 207 |
+
|
| 208 |
+
# 4 EXPERIMENTS
|
| 209 |
+
|
| 210 |
+
# 4.1 UNIVERSAL SEQUENCE MODELING IN SYNTHETIC TURING TEST
|
| 211 |
+
|
| 212 |
+
Following the synthetic data experiment setting in (Yu et al., 2017; Zhu et al., 2018), we design a synthetic Turing test, in which the negative log-likelihood $\mathrm { N L L } _ { o r a c l e }$ from an oracle LSTM is calculated for evaluating the quality of samples from the generator. Particularly, to support our claim that our method causes little mode collapse, we calculated $\mathrm { N L L } _ { t e s t }$ , which is to sample an extra batch of samples from the oracle, and to calculate the negative log-likelihood measured by the generator. We show that under this more reasonable setting, our proposed algorithm reaches the state-of-the-art performance with exactly the same network architecture. Note that models like LeakGAN (Guo et al., 2017) contain architecture-level modification, which is orthogonal to our approach, thus will not be included in this part. The results are shown in Table 1.
|
| 213 |
+
|
| 214 |
+
# 4.1.1 DISCUSSION
|
| 215 |
+
|
| 216 |
+
Computational Efficiency Although in terms of time cost per epoch, CoT does not achieve the state-of-the-art, we do observe that CoT is remarkably faster than previous RL-GAN approaches. Besides, consider the fact that CoT is a sample-based optimization algorithm, which involves time cost in sampling from the generator, this result is acceptable. The result also verifies our claim that CoT has the same order (i.e. the time cost only differs in a constant multiplier or extra lower order term) of computational complexity as MLE.
|
| 217 |
+
|
| 218 |
+
Table 1: Likelihood-based benchmark and time statistics for synthetic Turing test. ‘-(MLE)’ means the best performance is acquired during MLE pre-training.
|
| 219 |
+
|
| 220 |
+
<table><tr><td>Model/Algorithm</td><td>NLLoracle</td><td>NLLtest (final/best)</td><td>best NLLoracle+test</td><td>time/epoch</td></tr><tr><td>MLE</td><td>9.08</td><td>8.97/7.60</td><td>9.43 + 7.67</td><td>16.14 ± 0.97s</td></tr><tr><td>SeqGAN (Yu et al., 2017)</td><td>8.68</td><td>10.10/-(MLE)</td><td>(The same as MLE)</td><td>817.64 ± 5.41s</td></tr><tr><td>RankGAN (Lin et al., 2017)</td><td>8.37</td><td>11.19/-(MLE)</td><td>(The same as MLE)</td><td>1270 ±13.01s</td></tr><tr><td>MaliGAN (Che et al., 2017)</td><td>8.73</td><td>10.07/-(MLE)</td><td>(The same as MLE)</td><td>741.31 ± 1.45s</td></tr><tr><td>Scheduled Sampling (Bengio et al., 2015)</td><td>8.89</td><td>8.71/-(MLE)</td><td>(The same as MLE)</td><td>32.54 ± 1.14s</td></tr><tr><td>Professor Forcing (Lamb et al.,2016)</td><td>9.43</td><td>8.31/-(MLE)</td><td>(The same as MLE)</td><td>487.13 ± 0.95s</td></tr><tr><td>CoT (ours)</td><td>8.19</td><td>8.03/7.54</td><td>8.19 + 8.03</td><td>53.94 ± 1.01s</td></tr></table>
|
| 221 |
+
|
| 222 |
+

|
| 223 |
+
Figure 2: Curves of evaluation on JSD, ${ \mathrm { N L L } } _ { o r a c l e }$ during iterations of CoT under different training settings. To show the hyperparameter robustness of CoT, we compared it with the similar results as were evaluated in SeqGAN (Yu et al., 2017).
|
| 224 |
+
|
| 225 |
+
Hyper-parameter Robustness. We perform a hyper-parameter robustness experiment on synthetic data experiment. When compared with the results of similar experiments as in SeqGAN (Yu et al., 2017), our approach shows less sensitivity to hyper-parameter choices, as shown in Figure 2. Note that since in all our attempts, the evaluated JSD of SeqGAN fails to converge, we evaluated NLLoracle for it as a replacement.
|
| 226 |
+
|
| 227 |
+
Self-estimated Training Progress Indicator. Like the critic loss, i.e. estimated Earth Mover Distance, in WGANs, we find that the training loss of the mediator (9), namely balanced NLL, can be a real-time training progress indicator as shown in Figure 3. Specifically, in a wide range, balanced NLL is a good estimation of real $J S D ( G \| P )$ with a steady translation, namely, balanced $N L L =$ $J S D ( G \| P ) + H ( G ) + H ( P )$ .
|
| 228 |
+
|
| 229 |
+

|
| 230 |
+
Figure 3: (a) Curves of training time $J S D ( G \| P )$ for MLE, SeqGAN and CoT. (b) Curves of balanced NLL and real JSD. Both results are from synthetic data experiments. Note that balanced NLL is considered to have only a constant translation of the estimated JSD by the mediator.
|
| 231 |
+
|
| 232 |
+
Table 2: N-gram-level quality benchmark: BLEU on test data of EMNLP2017 WMT News
|
| 233 |
+
|
| 234 |
+
<table><tr><td>Model/Algorithm</td><td>BLEU-2</td><td>BLEU-3</td><td>BLEU-4</td><td>BLEU-5</td></tr><tr><td>MLE</td><td>0.781</td><td>0.482</td><td>0.225</td><td>0.105</td></tr><tr><td>SeqGAN (Yu et al., 2017)</td><td>0.731</td><td>0.426</td><td>0.181</td><td>0.096</td></tr><tr><td>RankGAN (Lin et al., 2017)</td><td>0.691</td><td>0.387</td><td>0.178</td><td>0.095</td></tr><tr><td>MaliGAN (Che et al., 2017)</td><td>0.755</td><td>0.456</td><td>0.179</td><td>0.088</td></tr><tr><td>LeakGAN (Guo et al., 2017)</td><td>0.835</td><td>0.648</td><td>0.437</td><td>0.271</td></tr><tr><td>TextCoT-basic (ours)</td><td>0.785</td><td>0.489</td><td>0.261</td><td>0.152</td></tr><tr><td>TextCoT-strong (ours)</td><td>0.800</td><td>0.501</td><td>0.273</td><td>0.200</td></tr><tr><td>TextCoT-strong (α = 1.5) (ours)</td><td>0.856</td><td>0.701</td><td>0.510</td><td>0.310</td></tr></table>
|
| 235 |
+
|
| 236 |
+
Table 3: Diversity benchmark: estimated Word Mover Distance (eWMD) and $\mathrm { N L L } _ { t e s t }$
|
| 237 |
+
|
| 238 |
+
<table><tr><td>Model/Algorithm</td><td>eWMDtest</td><td>eWMDtrain</td><td>NLLtest</td></tr><tr><td>MLE</td><td>1.015 (σ = 0.023)</td><td>0.947 (σ = 0.019)</td><td>2.365</td></tr><tr><td>SeqGAN (Yu et al., 2017)</td><td>2.900 (σ = 0.025)</td><td>3.118 (σ = 0.018)</td><td>3.122</td></tr><tr><td>RankGAN (Lin et al., 2017)</td><td>4.451 (σ = 0.083)</td><td>4.829 (σ = 0.021)</td><td>3.083</td></tr><tr><td>MaliGAN (Che et al., 2017)</td><td>4.891 (σ = :0.061)</td><td>4.962 (σ: 二 0.020)</td><td>3.240</td></tr><tr><td>LeakGAN (Guo et al., 2017)</td><td>1.803 (σ = 0.027)</td><td>1.767 (σ = :0.023)</td><td>2.327</td></tr><tr><td>TextCoT-basic (ours)</td><td>0.766 (σ = 0.031)</td><td>0.886(σ = 0.019)</td><td>2.247</td></tr><tr><td>TextCoT-strong (ours)</td><td>0.923 (σ = 0.018)</td><td>0.941 (σ = 0.016)</td><td>2.144</td></tr></table>
|
| 239 |
+
|
| 240 |
+
# 4.2 TEXTCOT: ZERO-PRIOR LONG & DIVERSE TEXT GENERATION
|
| 241 |
+
|
| 242 |
+
As an important sequential data modeling task, zero-prior text generation, especially long and diversified text generation, is a good testbed for evaluating the performance of a generative model.
|
| 243 |
+
|
| 244 |
+
Following the experiment proposed in LeakGAN (Guo et al., 2017), we choose EMNLP 2017 WMT News Section as our dataset, with maximal sentence length limited to 51. We pay major attention to both quality and diversity. To keep the comparison fair, we present two implementations of CoT, namely CoT-basic and CoT-strong. As for CoT-basic, the generator follows the settings of that in MLE, SeqGAN, RankGAN and MaliGAN. As for CoT-strong, the generator is implemented with the similar architecture in LeakGAN.
|
| 245 |
+
|
| 246 |
+
For quality evaluation, we evaluated BLEU on a small batch of test data separated from the original dataset. For diversity evaluation, we evaluated the estimated Word Mover Distance (Kusner et al., 2015), which is calculated through training a discriminative model between generated samples and real samples with 1-Lipschitz constriant via gradient penalty as in WGAN-GP (Gulrajani et al., 2017). To keep it fair, for all evaluated models, the architecture and other training settings of the discriminative models are kept the same.
|
| 247 |
+
|
| 248 |
+
The results are shown in Table 2 and Table 3. In terms of generative quality, CoT-basic achieves state-of-the-art performance over all the baselines with the same architecture-level capacity, especially the long-term robustness at n-gram level. CoT-strong using a conservative generation strategy, i.e. setting the inverse temperature parameter $\alpha$ higher than 1, as in (Guo et al., 2017) achieves the best performance over all compared models. In terms of generative diversity, the results show that our model achieves the state-of-the-art performance on all metrics including $\mathrm { N L L } _ { t e s t }$ , which is the optimization target of MLE.
|
| 249 |
+
|
| 250 |
+
# 5 CONCLUSION
|
| 251 |
+
|
| 252 |
+
We proposed Cooperative Training, a novel training algorithm for generative modeling of discrete data. CoT optimizes Jensen-Shannon Divergence, which does not have the exposure bias problem as the forward KLD. Models trained via CoT shows promising results in sequential discrete data modeling tasks, including sample quality and the generalization ability in likelihood prediction tasks.
|
| 253 |
+
|
| 254 |
+
# REFERENCES
|
| 255 |
+
|
| 256 |
+
Martin Arjovsky and Léon Bottou. Towards principled methods for training generative adversarial networks. arXiv preprint arXiv:1701.04862, 2017.
|
| 257 |
+
|
| 258 |
+
Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein gan. arXiv:1701.07875, 2017.
|
| 259 |
+
|
| 260 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv:1409.0473, 2014.
|
| 261 |
+
|
| 262 |
+
Samy Bengio, Oriol Vinyals, Navdeep Jaitly, and Noam Shazeer. Scheduled sampling for sequence prediction with recurrent neural networks. In NIPS, pp. 1171–1179, 2015.
|
| 263 |
+
|
| 264 |
+
Tong Che, Yanran Li, Ruixiang Zhang, R Devon Hjelm, Wenjie Li, Yangqiu Song, and Yoshua Bengio. Maximum-likelihood augmented discrete generative adversarial networks. arXiv:1702.07983, 2017.
|
| 265 |
+
|
| 266 |
+
Ian Goodfellow. Nips 2016 tutorial: Generative adversarial networks. arXiv preprint arXiv:1701.00160, 2016.
|
| 267 |
+
|
| 268 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, pp. 2672–2680, 2014.
|
| 269 |
+
|
| 270 |
+
Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron C Courville. Improved training of wasserstein gans. In NIPS, pp. 5769–5779, 2017.
|
| 271 |
+
|
| 272 |
+
Jiaxian Guo, Sidi Lu, Han Cai, Weinan Zhang, Yong Yu, and Jun Wang. Long text generation via adversarial training with leaked information. arXiv:1709.08624, 2017.
|
| 273 |
+
|
| 274 |
+
Matt Kusner, Yu Sun, Nicholas Kolkin, and Kilian Weinberger. From word embeddings to document distances. In International Conference on Machine Learning, pp. 957–966, 2015.
|
| 275 |
+
|
| 276 |
+
Alex M Lamb, Anirudh Goyal ALIAS PARTH GOYAL, Ying Zhang, Saizheng Zhang, Aaron C Courville, and Yoshua Bengio. Professor forcing: A new algorithm for training recurrent networks. In NIPS, pp. 4601–4609, 2016.
|
| 277 |
+
|
| 278 |
+
Kevin Lin, Dianqi Li, Xiaodong He, Zhengyou Zhang, and Ming-Ting Sun. Adversarial ranking for language generation. In NIPS, pp. 3155–3165, 2017.
|
| 279 |
+
|
| 280 |
+
Sidi Lu, Yaoming Zhu, Weinan Zhang, Jun Wang, and Yong Yu. Neural text generation: Past, present and beyond. arXiv preprint arXiv:1803.07133, 2018.
|
| 281 |
+
|
| 282 |
+
Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015.
|
| 283 |
+
|
| 284 |
+
Marc’Aurelio Ranzato, Sumit Chopra, Michael Auli, and Wojciech Zaremba. Sequence level training with recurrent neural networks. arXiv preprint arXiv:1511.06732, 2015.
|
| 285 |
+
|
| 286 |
+
Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 15(1):1929–1958, 2014.
|
| 287 |
+
|
| 288 |
+
Richard Stuart Sutton. Temporal credit assignment in reinforcement learning. 1984.
|
| 289 |
+
|
| 290 |
+
Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Instance normalization: The missing ingredient for fast stylization. arXiv preprint arXiv:1607.08022, 2016.
|
| 291 |
+
|
| 292 |
+
Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992.
|
| 293 |
+
|
| 294 |
+
Lantao Yu, Weinan Zhang, Jun Wang, and Yong Yu. Seqgan: Sequence generative adversarial nets with policy gradient. In AAAI, pp. 2852–2858, 2017.
|
| 295 |
+
|
| 296 |
+
Yaoming Zhu, Sidi Lu, Lei Zheng, Jiaxian Guo, Weinan Zhang, Jun Wang, and Yong Yu. Texygen: A benchmarking platform for text generation models. arXiv:1802.01886, 2018.
|
| 297 |
+
|
| 298 |
+
# A DETAILED DERIVATION OF THE ALGORITHM
|
| 299 |
+
|
| 300 |
+
$$
|
| 301 |
+
\begin{array} { r l } & { \quad = x _ { 1 } \left( - \frac { 1 } { 2 } \sum _ { k _ { 1 } \geq 0 } \frac { \partial _ { k } ( k _ { 1 } - 1 ) \partial _ { k } ( k _ { 1 } - 1 ) } { \partial _ { k } ( k _ { 1 } - 1 ) } \frac { \partial _ { k } ( k _ { 1 } - 1 ) \partial _ { k - 1 } ( k _ { 1 } - 1 ) } { \partial _ { k } ( k _ { 1 } - 1 ) } \right) } \\ & { \quad = - \frac { 1 } { 2 } \mathbb { E } \left( \sum _ { k _ { 1 } \geq 0 } \frac { \partial _ { k } ( k _ { 1 } - 1 ) \partial _ { k - 1 } ( k _ { 1 } - 1 ) } { \partial _ { k } ( k _ { 1 } - 1 ) } \frac { \partial _ { k } ( k _ { 1 } - 1 ) \partial _ { k - 1 } ( k _ { 1 } - 1 ) } { \partial _ { k } ( k _ { 1 } - 1 ) } - 1 \right) ^ { 2 } } \\ & { \qquad - \frac { 1 } { 2 } \mathbb { E } \left( \sum _ { k _ { 1 } \geq 0 } \frac { \partial _ { k } ( k _ { 1 } - 1 ) \partial _ { k - 1 } ( k _ { 1 } - 1 ) } { \partial _ { k } ( k _ { 1 } - 1 ) } - 1 \right) \frac { \partial _ { k } ( k _ { 1 } - 1 ) \partial _ { k - 1 } ( k _ { 1 } - 1 ) } { \partial _ { k } ( k _ { 1 } - 1 ) } } \\ & { \qquad - \frac { 1 } { 2 } \mathbb { E } \left( \sum _ { k _ { 1 } \geq 0 } \frac { \partial _ { k } ( k _ { 1 } - 1 ) \partial _ { k - 1 } ( k _ { 1 } - 1 ) } { \partial _ { k } ( k _ { 1 } - 1 ) } - 1 \right) } \\ & \qquad - \frac { 1 } { 2 } \mathbb { E } \left( \sum _ { k _ { 1 } \geq 0 } \frac { \partial _ { k } ( k _ { 1 } - 1 ) } { \partial _ { k } ( k _ { 1 } - 1 ) } \frac { \partial _ { k } ( k _ { 1 } - 1 ) } { \partial _ { k } ( k _ { 1 } - 1 ) } - 1 \right) \alpha ^ { 2 } \beta \beta \alpha ^ { 2 } \beta \alpha ^ { 2 } \beta \alpha ^ { 2 } \beta \alpha ^ { 2 } \beta \alpha ^ { 2 } \beta \alpha ^ { 2 } \beta \alpha ^ { 2 } \beta \alpha ^ { 2 } \beta \alpha ^ { 2 } \beta \beta \alpha ^ { 2 } \beta \alpha ^ { 2 } \beta \beta \end{array}
|
| 302 |
+
$$
|
| 303 |
+
|
| 304 |
+
# B SAMPLE COMPARISON AND DISCUSSION
|
| 305 |
+
|
| 306 |
+
Table 4 shows samples from some of the most powerful baseline models and our model.
|
| 307 |
+
|
| 308 |
+
Observation of the model samples indicates that:
|
| 309 |
+
|
| 310 |
+
• CoT produces remarkably more diverse and meaningful samples when compared to LeakGAN. • The consistency of CoT is significantly improved when compared to MLE.
|
| 311 |
+
|
| 312 |
+
# C FURTHER DISCUSSIONS ABOUT THE EXPERIMENT RESULTS
|
| 313 |
+
|
| 314 |
+
The Optimal Balance for Cooperative Training We find that the same learning rate and iteration numbers for the generator and mediator seems to be the most competitive choice. As for the architecture choice, we find that the mediator needs to be slightly stronger than the generator. For the best result in the synthetic experiment, we adopt exactly the same generator as other compared models and a mediator whose hidden state size is twice larger (with 64 hidden units) than the generator.
|
| 315 |
+
|
| 316 |
+
Theoretically speaking, we can and we should sample more batches from $G _ { \theta }$ and $P$ respectively for training the mediator in each iteration. However, if no regularizations are used when training the mediator, it can easily over-fit, leading the generator’s quick convergence in terms of $K L ( G _ { \theta } | | P )$ or ${ \mathrm { N L L } } _ { o r a c l e }$ , but divergence in terms of $J S D ( G _ { \theta } \| P )$ . Empirically, this could be alleviated by applying dropout techniques (Srivastava et al., 2014) with $50 \%$ keeping ratio before the output layer of RNN. After applying dropout, the empirical results show good consistency with our theory that, more training batches for the mediator in each iteration is always helpful.
|
| 317 |
+
|
| 318 |
+
However, applying regularizations is not an ultimate solution and we look forward to further theoretical investigation on better solutions for this problem in the future.
|
| 319 |
+
|
| 320 |
+
Table 4: WMT News Samples from Different Models
|
| 321 |
+
|
| 322 |
+
<table><tr><td rowspan=1 colspan=1>Sources</td><td rowspan=1 colspan=1>Example</td></tr><tr><td rowspan=1 colspan=1>LeakGAN</td><td rowspan=1 colspan=1>(1) It's a big advocate for therapy is a second thing to do, and I'm creating a relationshipwith a nation.(2) It's probably for a fantastic footage of the game,but in the United States is alreadytime to be taken to live.(3) It's a sad House we have a way to get the right because we have to go to see that,” shesaid.(4)I'm not sure if I thank a litle bit easier to get to my future commitment in work,”hesaid.(5)“I think it was alone because Ican do that, when you're a lot of reasons,”he said.(6) It's the only thing we do,we spent 26 and $35(see how you do is we lose it,” said bothsides in the summer.</td></tr><tr><td rowspan=1 colspan=1>CoT</td><td rowspan=1 colspan=1>(1) We focus the plans to put aside either now,and which doesn't mean it is to earn theimpact to the government rejected.(2) The argument would be very doing work on the 2O14 campaign to pursue the firm andimmigration officials,the new review that’s taken up for parking.(3) This method is true to available we make up drink with that all they were willing topay down smoking.(4) The number of people who are on the streaming boat would study if the children had abottle - but meant to be much easier,having serious ties to the outside of the nation.(5)However,they have to wait to get the plant in federal fees and the housing market'smost valuable in tourism.</td></tr><tr><td rowspan=1 colspan=1>MLE</td><td rowspan=1 colspan=1>(1) after the possible cost of military regulatory scientists,chancellor angela merkel'sbusiness share together a conflict of major operators and interest as they said it is unknownfor those probably1OO percent as a missile for britain.(2) but which have yet to involve the right climb that took in melbourne somewhere elsewith the rams even a second running mate and kansas.(3)“la la la la 3O who appeared that themselves is in the room when they were shot heruntil the end ”that jose mourinho could risen from the individual .(4) when aaron you has died,it is thought if you took your room at the prison fines ofradical controls by everybody, if it's a digital plan at an future of the next time.</td></tr></table>
|
| 323 |
+
|
| 324 |
+
Possible Derivatives of CoT The form of equation 13 can be modified to optimize other objectives. One example is the backward KLD (a.k.a. Reverse KLD) i.e. $K L ( G \| P )$ . In this case, the objective of the so-called “Mediator” and “Generator” thus becomes:
|
| 325 |
+
|
| 326 |
+
“Mediator”, now it becomes a direct estimator $\hat { P } _ { \phi }$ of the target distribution $P$ :
|
| 327 |
+
|
| 328 |
+
$$
|
| 329 |
+
J _ { \hat { p } } ( \phi ) = \underset { s \sim P } { \mathbb { E } } [ - \log ( \hat { P } _ { \phi } ( s ) ) ] .
|
| 330 |
+
$$
|
| 331 |
+
|
| 332 |
+
Generator:
|
| 333 |
+
|
| 334 |
+
$$
|
| 335 |
+
\nabla _ { \boldsymbol { \theta } } J _ { g } ( \boldsymbol { \theta } ) = \nabla _ { \boldsymbol { \theta } } \underset { s \sim G _ { \boldsymbol { \theta } } } { \mathbb { E } } \Big [ \sum _ { t = 0 } ^ { n - 1 } \pi _ { g } ( s _ { t } ) ^ { \top } ( \log \pi _ { \hat { p } } ( s _ { t } ) - \log \pi _ { g } ( s _ { t } ) ) \Big ] .
|
| 336 |
+
$$
|
| 337 |
+
|
| 338 |
+
Such a model suffers from so-called mode-collapse problem, as is analyzed in Ian’s GAN Tutorial (Goodfellow, 2016). Besides, as the distribution estimator $\hat { P } \phi$ inevitably introduces unpredictable behaviors when given unseen samples i.e. samples from the generator, the algorithm sometimes fails (numerical error) or diverges.
|
| 339 |
+
|
| 340 |
+
In our successful attempts, the algorithm produces similar (not significantly better than) results as CoT. The quantitive results are shown as follows:
|
| 341 |
+
|
| 342 |
+
Table 5: N-gram-level quality benchmark: BLEU on test data of EMNLP2017 WMT News (New Split)
|
| 343 |
+
|
| 344 |
+
<table><tr><td>Model/Algorithm</td><td>BLEU-2</td><td>BLEU-3</td><td>BLEU-4</td><td>BLEU-5</td><td>eWMD</td></tr><tr><td>CoT-basic (ours)</td><td>0.850</td><td>0.571</td><td>0.316</td><td>0.169</td><td>1.001 (σ = 0.020)</td></tr><tr><td>Reverse KL (ours)</td><td>0.860</td><td>0.590</td><td>0.335</td><td>0.181</td><td>1.086 (σ = 0.014)</td></tr></table>
|
| 345 |
+
|
| 346 |
+
Although under evaluation of weak metrics like BLEU, if successfully trained, the model trained via Reverse KL seems to be better than that trained via CoT, the disadvantage of Reverse KL under evaluation of more strict metric like eWMD indicates that Reverse KL does fail in learning some aspects of the data patterns e.g. completely covering the data mode.
|
md/train/VD_ozqvBy4W/VD_ozqvBy4W.md
ADDED
|
@@ -0,0 +1,375 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# COCON: A SELF-SUPERVISED APPROACH FOR CONTROLLED TEXT GENERATION
|
| 2 |
+
|
| 3 |
+
Alvin Chan1∗, Yew-Soon $\mathbf { O n g ^ { 1 } }$ , Bill $\mathbf { P u n g ^ { 1 } }$ , Aston Zhang2, Jie $\mathbf { F u ^ { 3 } }$ 1Nanyang Technological University, 2Amazon AI, 3Mila, Polytechnique Montreal
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Pretrained Transformer-based language models (LMs) display remarkable natural language generation capabilities. With their immense potential, controlling text generation of such LMs is getting attention. While there are studies that seek to control high-level attributes (such as sentiment and topic) of generated text, there is still a lack of more precise control over its content at the word- and phrase-level. Here, we propose Content-Conditioner (CoCon) to control an LM’s output text with a content input, at a fine-grained level. In our self-supervised approach, the CoCon block learns to help the LM complete a partially-observed text sequence by conditioning with content inputs that are withheld from the LM. Through experiments, we show that CoCon can naturally incorporate target content into generated texts and control high-level text attributes in a zero-shot manner.1
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Transformer-based (Vaswani et al., 2017; Tay et al., 2020) pretrained language models (LMs) have led a wave of new advances in natural language processing tasks as a means to extract contextualized word embeddings (Devlin et al., 2018; Dai et al., 2019b; Yang et al., 2019) and as text generators (Radford et al., 2019; Brown et al., 2020). These LMs are trained on huge amounts of text corpora to predict next tokens through a log-likelihood objective. Given its remarkably fluent text generation, there is growing interest in controlling output texts of such LMs (Keskar et al., 2019; Dathathri et al., 2019). Approaches like training a modified LM from scratch to incorporate target text attributes (Keskar et al., 2019) can be expensive while finetuning pretrained LMs for specific attributes (Ziegler et al., 2019) limits the scope of text control. Without changing the architecture or weights of pretrained LMs, one promising approach (PPLM) (Dathathri et al., 2019) controls generated text through attribute models. Though effective in controlling high-level text attributes such as topic and sentiment, the same target attribute may generate text samples with vastly different content at the word- and phrase-levels, leaving a gap for more fine-grained control over the content of LM-generated texts.
|
| 12 |
+
|
| 13 |
+
We conceptualize Content-Conditioner (CoCon) as an approach to narrow this gap by guiding pretrained LMs’ text outputs through the incorporation of content input. This content input can take the form of a text sequence whose content we would like to condition on for text generation. Essentially, CoCon comprises two parts: 1) a pretrained LM and 2) a interleave CoCon layer. By employing a pretrained LM, CoCon incorporates the representations of a content input into the encoded text representations through the CoCon layer before passing the content-conditioned representations into $\mathrm { L M } _ { \beta }$ for generation. To train the CoCon block, we propose a self-supervised learning approach where training data consist of text samples generated by the pretrained LM itself $( \ S \ 3 . 1 )$ . By splitting each text sequence into two segments $\bar { \mathbf { \Gamma } } ( [ \mathbf { x } ^ { a } ; \mathbf { x } ^ { b } ] )$ , CoCon learns through a self reconstruction objective to help the LM reconstruct missing latter segments $( \mathbf { x } ^ { b } )$ by taking $\mathbf { x } ^ { b }$ itself as the content input. We use content masking for CoCon and also propose other loss functions such as cycle reconstruction to condition content from divergent sources while producing high-quality texts. Since the CoCon block’s size is a small fraction of the LM and no finetuning is conducted on the LM’s weights, the training cost is significantly lower than training an LM from scratch. We show that CoCon’s fine-grained content control can be extended to also influence higher-level text attributes such as topic and sentiment in a zero-shot manner, and compare it with strong controlled generation baselines. Furthermore, CoCon is versatile in assimilating multiple content inputs, and its strength of content-conditioning can be flexibly adjusted through a content bias term during inference. In this paper, we demonstrate the CoCon approach with the GPT-2 345M model (Radford et al., 2019) as the pretrained LM. Given CoCon’s modular nature, it can be used with other Transformer-based LMs or even other controlled generation methods. All in all, the core contributions of this paper are:
|
| 14 |
+
|
| 15 |
+
• We propose CoCon for content-conditioned language generation.
|
| 16 |
+
• We introduce a self-supervised learning approach where CoCon learns to complete text sequences when given information about future tokens.
|
| 17 |
+
• Through ablation studies and comparisons with strong baselines like PPLM and CTRL (Keskar et al., 2019), we investigate how CoCon controls high-level attributes such as topic and sentiment while generating texts that have high content similarity to conditioning text.
|
| 18 |
+
|
| 19 |
+
# 2 RELATED WORK
|
| 20 |
+
|
| 21 |
+
There is a line of work that aims to generate output text of desired attributes with neural networks. Some of the earliest efforts involve conditional generative models (Kikuchi et al., 2016; Ficler & Goldberg, 2017) where the networks are trained on text data labeled with the target attributes. These models can be trained via reinforcement learning (Ziegler et al., 2019) or the generative adversarial network (Yu et al., 2017) framework. Unlike CoCon, the requirement of predetermined attributes in those methods limits the possible types of generated texts. CTRL (Keskar et al., 2019) is a recent approach that generated controlled fluent texts through the use of control codes which are meta-data prepended to the text during generation. Though it produces high-quality text with its GPT-2-like architecture, its control codes are also predetermined during the training. Closest to our work is Plug and Play Language Model (PPLM) (Dathathri et al., 2019) which seeks to control text on already pretrained LM without finetuning through relatively small ‘pluggable’ attribute models. While PPLM’s flexible design also enables controlled generation without retraining or finetuning the LM like in CoCon, our approach aims to control the generation at a content level, beyond high-level text attributes. Another core difference lies in the training where CoCon’s self-supervised learning absolves the need for labeled data, such as the ones employed to train PPLM’s attribute discriminator models. Weighted decoding (Ghazvininejad et al., 2017; Holtzman et al., 2018) seeks to control the output text token by upweighting the probabilities of targeted words during the decoding step but has been shown to produce incoherent text (See et al., 2019). Conditioning language generation has been used in question generation to enhance faithfulness by attending to textual context such as predicates, subject types or object types (Elsahar et al., 2018) rather than the content input used here in CoCon. Small adapter layers (Bapna et al., 2019) have been previously proposed for multilingual translation to also save on model size and training resources but differ from CoCon’s self-supervised training as they rely on annotated sentence pairs of different languages for training.
|
| 22 |
+
|
| 23 |
+
Text style transfer is a related area that controls texts’ attributes by translating text from one style to another (Dai et al., 2019a). A few of such studies employ auto-encoders to separate texts’ style and non-style latent representation (Shen et al., 2017; Hu et al., 2017; Yang et al., 2018). This disentanglement enables style changes to the text at the latent space while retaining most of its content. Another work identifies attribute markers (Li et al., 2018) which are $n$ -grams correlated with a particular style in a text corpus and edit texts’ style by substituting them. Essentially, style transfer alters existing texts rather than generating texts and requires predefined attributes.
|
| 24 |
+
|
| 25 |
+
# 3 CONTENT CONDITIONER (COCON)
|
| 26 |
+
|
| 27 |
+
In the following sections, we discuss the motivation for CoCon, its model architecture and how we train the CoCon block.
|
| 28 |
+
|
| 29 |
+
Motivation In text generation with language models, given the prompt text $x _ { : t - 1 } \quad =$ $\{ x _ { 1 } , \dots , x _ { t - 1 } \}$ , the following text $\{ x _ { t } , \ldots , x _ { l } \}$ is generated in an auto-regressive manner (Man
|
| 30 |
+
|
| 31 |
+
ning et al., 1999; Bengio et al., 2003):
|
| 32 |
+
|
| 33 |
+
$$
|
| 34 |
+
p ( x _ { t } , \ldots , x _ { l } | x _ { 1 } , \ldots , x _ { t - 1 } ) = \prod _ { i = t } ^ { l } p ( x _ { i } | x _ { 1 } , \ldots , x _ { i - 1 } ) .
|
| 35 |
+
$$
|
| 36 |
+
|
| 37 |
+
Previous studies on controlled text generation in LM showed that $p ( \mathbf { x } )$ can be conditioned on target attributes (Dathathri et al., 2019) or control codes (Keskar et al., 2019) to control the text’s sentiment or topic, i.e.,
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
p ( x _ { t } , \ldots , x _ { l } | x _ { 1 } , \ldots , x _ { t - 1 } ) = \prod _ { i = 1 } ^ { l } p ( x _ { i } | \mathbf { a } , \{ x _ { 1 } , \ldots , x _ { i - 1 } \} ) ,
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
where a is the target attribute. While these methods show that the generation is fluent and can be aligned with the target attribute well, the output texts $\{ x _ { t } , \ldots , x _ { l } \}$ are controlled at a global attribute (e.g., sentiment/topic) level rather than at a more local content (e.g., words/phrases) level. Since there is a vast number of possible $\{ x _ { t } , \ldots , x _ { l } \}$ candidates which would align well with both the prompt text and target attribute, this results in generated text samples that contain very different content during the stochastic token sampling process. This motivates an approach to condition on an content input $\mathbf { c }$ for more fine-grained control over text generation:
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
p ( x _ { t } , \ldots , x _ { l } | x _ { 1 } , \ldots , x _ { t - 1 } ) = \prod _ { i = 1 } ^ { l } p ( x _ { i } | \mathbf { c } , \{ x _ { 1 } , \ldots , x _ { i - 1 } \} ) ,
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
where c can be a text sequence whose content we would like to condition on during text generation. Next, we propose the model architecture of Content-Conditioner (CoCon) as an approach for this control.
|
| 50 |
+
|
| 51 |
+
Model Architecture Our proposed Content-Conditioner (Figure 1) controls the content of the generated text while maintaining fluency by incorporating a pretrained Transformer-based language model (LM), GPT-2 (Radford et al., 2019) in our experiments. Such LMs have shown remarkable natural text generation in the auto-regressive manner (Eq. 1) where the next token $x _ { t }$ is sampled based on the logits $\mathbf { o } _ { t } = \mathrm { L M } ( x _ { : t - 1 } )$ . These LMs are essentially stacks of Transformer blocks, each consisting of layer normalization (Ba et al., 2016), multi-head self-attention (Vaswani et al., 2017) and position-wise feed forward operations.
|
| 52 |
+
|
| 53 |
+
An LM’s generation can be broken down into two separate parts: layers before the CoCon block $( \mathrm { L M } _ { \alpha } )$ ) and layers after $( \mathrm { L M } _ { \beta } )$ . The $\mathrm { L M } _ { \alpha }$ acts as a feature extractor that takes in the input sequence’s embeddings and outputs its intermediate representation at a breakpoint, i.e., $\mathbf { h } _ { : t - 1 } = \mathrm { L M } _ { \alpha } ( x _ { : t - 1 } )$ . Subsequently, $\mathrm { L M } _ { \beta }$ takes in this representation and outputs the logits for the next token, i.e., $\mathbf { o } _ { t } =$ $\mathrm { L M } _ { \beta } ( \mathbf { h } _ { : t - 1 } )$ , yielding
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
\begin{array} { r } { \mathbf { o } _ { t } = \mathrm { L M } ( x _ { : t - 1 } ) = \mathrm { L M } _ { \beta } ( \mathrm { L M } _ { \alpha } ( x _ { : t - 1 } ) ) = \mathrm { L M } _ { \beta } ( \mathbf { h } _ { : t - 1 } ) . } \end{array}
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
From Eq. 4, we can see that the representation $\mathbf { \eta } ^ { ( \mathbf { h } ) }$ is a medium to control next token logits $\mathbf { \tau } ( \mathbf { o } )$ and hence the text generation process. Indeed, we transform $\mathbf { h }$ by conditioning it with the content input (c) through a CoCon block such that
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
\mathbf { h } _ { : t - 1 } ^ { \prime } = \mathrm { C o C o n } ( \mathbf { h } _ { : l _ { c } } ^ { ( \mathbf { c } ) } , \ \mathbf { h } _ { : t - 1 } ) ,
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
where $\mathbf { h } _ { : l _ { c } } ^ { ( \mathbf { c } ) } = \mathrm { L M } _ { \alpha } ( \mathbf { c } )$ is the content representations and $l _ { c }$ is the length of the content text secquence. We parameterize the CoCon block as a single Transformer block with an attention and position-wise feed-forward operation. Similar to a typical LM attention layer, the query $( \mathbf { Q } )$ , key $( \mathbf { K } )$ , value $( \mathbf { V } )$ matrices are computed through linear transformations on the representations $\mathbf { h } _ { : t - 1 }$ , where $\mathbf { Q } , \mathbf { K } , \mathbf { V } \ \in \ \mathbb { R } ^ { ( t - 1 ) \times d }$ and $d$ is the representations’ dimension. To attend to the content representations $( \mathbf { h } _ { : l _ { c } } ^ { ( \mathbf { c } ) } )$ , the content keys and values $( \mathbf { K } ^ { ( \mathbf { c } ) } , \mathbf { V } ^ { ( \mathbf { c } ) } \in \mathbb { R } ^ { l _ { c } \times d } )$ are also computed, and concatenated to the original attention matrices before computing the CoCon attention output:
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
\mathbf { K } ^ { \prime } = [ \mathbf { K } ^ { ( \mathbf { c } ) } ; \mathbf { K } ] , \mathbf { V } ^ { \prime } = [ \mathbf { V } ^ { ( \mathbf { c } ) } ; \mathbf { V } ] , \mathbf { A } = \mathrm { S o f t m a x } ( \mathbf { Q } \mathbf { K } ^ { \prime \top } ) \mathbf { V } ^ { \prime } = \mathrm { S o f t m a x } ( \mathbf { W } ) \mathbf { V } ^ { \prime } ,
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
where $\mathbf { A } = \{ \mathbf { a } _ { 1 } , \dots , \mathbf { a } _ { t - 1 } \}$ and $\mathbf { W } \in \mathbb { R } ^ { ( t - 1 ) \times ( l _ { c } + t - 1 ) }$ represents the attention weights. The final CoCon outputs are computed with a position-wise feed-forward layer. By concatenating to the representations prior to $t - 1$ and passing them to $\mathrm { L M } _ { \beta }$ , the next logits, and consequently word token $\tilde { \mathbf { x } } _ { t }$ , is now conditioned on c:
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
\begin{array} { r } { \mathbf { h } _ { i } ^ { \prime } = \mathrm { F F } ( \mathbf { a } _ { i } ) , \tilde { \mathbf { o } } _ { t } = \mathrm { L M } _ { \beta } ( [ \mathbf { h } _ { : t - 2 } ; \mathbf { h } _ { t - 1 } ^ { \prime } ] ) , p _ { \theta , \psi } ( \tilde { x } _ { t } | \mathbf { c } , x _ { : t - 1 } ) = \mathrm { S o f t m a x } ( \tilde { \mathbf { o } } _ { t } ) , } \end{array}
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
where $\theta$ and $\psi$ are the paramterization of the CoCon block and LM respectively. Similar to a GPT-2 Transformer block, our CoCon block includes layer normalization before its multi-headed attention and feed-forward layers. Figure 1 summarizes the CoCon architecture which enables auto-regressive text generation by using $\tilde { x } _ { i }$ as the token input $( x _ { i } )$ to generate $\tilde { x } _ { i + 1 }$ where $i \geq t$ .
|
| 78 |
+
|
| 79 |
+

|
| 80 |
+
Figure 1: Model architecture of proposed Content-Conditioner (CoCon).
|
| 81 |
+
|
| 82 |
+
Multiple Content Inputs CoCon’s flexible design enables multiple content inputs for a single generation. In the case where we have $N$ content inputs $( \mathbf { c } ^ { 1 } , \ldots , \mathbf { c } ^ { \tilde { N } } )$ , the output text can be conditioned by these contents through their attention keys and values, similar to Eq. 6:
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
{ \bf K } ^ { \prime } = [ { \bf K } ^ { ( \mathbf { c } ^ { 1 } ) } \ldots { \bf K } ^ { ( \mathbf { c } ^ { N } ) } ; { \bf K } ] , \quad { \bf V } ^ { \prime } = [ { \bf V } ^ { ( \mathbf { c } ^ { 1 } ) } \ldots { \bf V } ^ { ( \mathbf { c } ^ { N } ) } ; { \bf V } ] , \quad { \bf A } = \mathrm { S o f t m a x } ( { \bf Q } { \bf K } ^ { \prime \top } ) { \bf V } ^ { \prime } .
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
Strength of Content Conditioning Within CoCon’s attention mechanism, we can vary the extent of content conditioning on the output text by biasing the attention weights in W (Eq. 6) that correspond to the content input (c). More specifically, the influence of c on the output text can be altered through the attention’s softmax weighting on the content values $( \mathbf { V } ^ { ( \mathbf { c } ) } )$ . During generation, a positive bias term $( \tau _ { \mathrm { c o n t e n t } } )$ can optionally be added to the content attention weights $\bar { \mathbf { W } } _ { : , : l _ { c } } \in \mathbb { R } ^ { ( t - \bar { 1 } ) \times l _ { c } }$ to increase influence of $\mathbf { V } ^ { ( \mathbf { c } ) }$ , boosting content conditioning, while a negative term can conversely reduce the content-conditioning effect. We discuss examples of varying $\tau _ { \mathrm { c o n t e n t } }$ in $\ S 4 . 4$ .
|
| 89 |
+
|
| 90 |
+
# 3.1 SELF-SUPERVISED LEARNING
|
| 91 |
+
|
| 92 |
+
We train CoCon with a self-supervised learning approach that is inspired by the diversity of content in natural language. Given a text sequence $\mathbf { x } = \{ x _ { 1 } , \ldots , x _ { t - 1 } , x _ { t } , \ldots , x _ { l } \}$ of length $l$ , we can break it into two contiguous segments: $\mathbf { x } ^ { a } = \{ x _ { 1 } , \ldots , x _ { t - 1 } \}$ and $\mathbf { x } _ { } ^ { b } = \{ x _ { t } , \ldots , x _ { l } \}$ where $\mathbf { x } = [ \mathbf { x } ^ { a } ; \mathbf { x } ^ { b } ]$ . In the real world, there may be numerous substitutes of $\mathbf { x } ^ { b }$ that could follow from $\mathbf { x } ^ { a }$ fluently. Coupled with the randomness in text sampling, this means that, without information about $\mathbf { x } ^ { b }$ , the probability of reconstructing the full $\mathbf { x }$ from $\mathbf { x } ^ { a }$ alone with an LM can be low.
|
| 93 |
+
|
| 94 |
+
Self Reconstruction Loss Based on this intuition, our approach trains the CoCon block to help the LM reconstruct the original $\mathbf { x }$ by also conditioning with $\mathbf { x } ^ { b }$ as the content input, i.e., $\mathbf { c } = \mathbf { x } ^ { \hat { b } }$ (Figure 2b). More concretely, we first compute the intermediate representations of the input text $\mathbf { x }$ and c:
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
\mathbf { h } _ { : l } = \mathrm { L M } _ { \alpha } ( \mathbf { x } ) = \mathrm { L M } _ { \alpha } ( x _ { : l } ) , \mathbf { h } _ { : l _ { c } } ^ { ( \mathbf { c } ) } = \mathrm { L M } _ { \alpha } ( \mathbf { c } ) = \mathrm { L M } _ { \alpha } ( x _ { t : l } ) ,
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
where $l _ { c } = l - t + 1$ is the length of $\mathbf { c }$ . The content-conditioned representation can be computed by the CoCon block where $\mathbf { h } _ { : l _ { c } } ^ { ( \mathbf { c } ) }$ is the content representation:
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
\mathbf { h } _ { i } ^ { \prime } = \mathrm { C o C o n } ( \mathbf { h } _ { : l _ { c } } ^ { ( \mathbf { c } ) } , \ \mathbf { h } _ { : i } ) , \forall i \geq t - 1 .
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
Similar to Eq. 7, the CoCon transformed representations are concatenated to the original representation before $t - 1$ and passed into $\mathrm { L M } _ { \beta }$ to produce the LM logits:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\begin{array} { r } { \widetilde { \mathbf { o } } _ { i + 1 } = \mathrm { L M } _ { \beta } \big ( [ \mathbf { h } _ { : t - 2 } ; \mathbf { h } _ { t - 1 : i } ^ { \prime } ] \big ) , p _ { \theta , \psi } \big ( \widetilde { x } _ { i + 1 } | \mathbf { c } , x _ { : i } \big ) = \mathrm { S o f t m a x } \big ( \widetilde { \mathbf { o } } _ { i + 1 } \big ) , \forall i \geq t - 1 . } \end{array}
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
Through an LM training objective, we arrive at the self-reconstruction loss term which trains CoCon to predict tokens of $\mathbf { x } ^ { b }$ by conditioning on $\mathbf { x } ^ { b }$ itself as the content input (c):
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
\mathcal { L } _ { \mathrm { s e l f } } = - \sum _ { i = t } ^ { l } \log p _ { \theta , \psi } \left( x _ { i } | ( \mathbf { c } = \mathbf { x } ^ { b } ) , \{ x _ { 1 } , \ldots , x _ { i - 1 } \} \right) .
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
To avoid trivializing the prediction of the next token $x _ { i + 1 }$ during training, we apply a self-token c-mask at CoCon’s attention layer such that $\mathbf { h } _ { i } ^ { \prime }$ does not attend to the token $x _ { i + 1 }$ in c that it is trying to predict. This approach can be conducted in a self-supervised manner with any pretrained LM where the training samples $\mathbf { x }$ are generated text outputs stochastically sampled from the LM itself.
|
| 119 |
+
|
| 120 |
+
Null Content Loss To encourage CoCon’s outputs to follow the prompt text $\mathbf { x } ^ { a }$ fluently without relying on $\mathbf { x } ^ { b }$ , we also train CoCon with a loss term similar to Eq. 12 but replaces the content input with a null token $( \emptyset )$ :
|
| 121 |
+
|
| 122 |
+
$$
|
| 123 |
+
\mathcal { L } _ { \mathrm { n u l l } } = - \sum _ { i = t } ^ { l } \log p _ { \theta , \psi } \left( x _ { i } | ( \mathbf { c } = \mathcal { O } ) , \{ x _ { 1 } , \ldots , x _ { i - 1 } \} \right) .
|
| 124 |
+
$$
|
| 125 |
+
|
| 126 |
+

|
| 127 |
+
Figure 2: Illustrative examples of (b) self reconstruction and (c) cycle reconstruction training.
|
| 128 |
+
|
| 129 |
+
Cycle Reconstruction Loss The self reconstruction loss relies on CoCon content input (c) and initial prompt text $\mathbf { \tau } ( \mathbf { p } )$ originating from one single text sample. To encourage generalization on cases where c and $\mathbf { p }$ are from divergent text sources, we employ a cycle reconstruction training that utilizes two different training samples (e.g., x, $\mathbf { x } ^ { \prime }$ in Figure 2a) and two CoCon forward steps (Figure 2c). We can express the output of a CoCon’s auto-regressive generation as
|
| 130 |
+
|
| 131 |
+
$$
|
| 132 |
+
\mathbf { y } = f _ { \theta , \psi } ( \mathbf { c } , \mathbf { p } ) ,
|
| 133 |
+
$$
|
| 134 |
+
|
| 135 |
+
where $\left[ \mathbf { p } ; \mathbf { y } \right]$ would be a fluent text sequence and $\mathbf { y }$ is conditioned on the content of c. The first step (Figure 2c(i)) computes the CoCon output with the content input (c) sourced from $\mathbf { x }$ and prompt text $\mathbf { \tau } ( \mathbf { p } )$ sourced from $\mathbf { x } ^ { \prime }$ :
|
| 136 |
+
|
| 137 |
+
$$
|
| 138 |
+
\mathbf { y } _ { \mathbf { x } , \mathbf { x } ^ { \prime } } = f _ { \boldsymbol { \theta } , \boldsymbol { \psi } } ( ( \mathbf { c } = \mathbf { x } ^ { b } ) , ( \mathbf { p } = \mathbf { x } ^ { \prime } { } ^ { a } ) ) ,
|
| 139 |
+
$$
|
| 140 |
+
|
| 141 |
+
where $\mathbf { x } = [ \mathbf { x } ^ { a } ; \mathbf { x } ^ { b } ]$ and $\mathbf { x } ^ { \prime } = [ \mathbf { x } ^ { \prime } { } ^ { a } ; \mathbf { x } ^ { \prime } { } ^ { b } ]$ . Since CoCon utilizes a pretrained LM for generation, $\mathbf { y } _ { \mathbf { x } , \mathbf { x } ^ { \prime } }$ would be a text sequence that fluently follows the prompt, ${ \bf { x } } ^ { \prime } \bar { \bf { \Lambda } }$ , while seeking to incorporate $\mathbf { x } ^ { b }$ ’s content. The second CoCon forward step (Figure $2 \mathrm { c } ( \mathrm { i i } ) ,$ ) takes $\mathbf { y } _ { \mathbf { x } , \mathbf { x } ^ { \prime } }$ as content input and $\mathbf { x } ^ { a }$ as prompt text:
|
| 142 |
+
|
| 143 |
+
$$
|
| 144 |
+
\begin{array} { r } { \mathbf { y } _ { \mathrm { c y c l e } } = f _ { \boldsymbol { \theta } , \psi } \big ( ( \mathbf { c } = \mathbf { y } _ { \mathbf { x } , \mathbf { x } ^ { \prime } } ) , ( \mathbf { p } = \mathbf { x } ^ { a } ) \big ) , } \end{array}
|
| 145 |
+
$$
|
| 146 |
+
|
| 147 |
+
Since $\mathbf { x } = [ \mathbf { x } ^ { a } ; \mathbf { x } ^ { b } ]$ , $\mathbf { x } ^ { b }$ is a valid continuation from the prompt $\mathbf { x } ^ { a }$ and recall that $\mathbf { y } _ { \mathbf { x } , \mathbf { x } ^ { \prime } }$ was contentconditioned on $\mathbf { x } ^ { b }$ in the first CoCon step (Eq. 15). This posits $\mathbf { x } ^ { b }$ as a training label for $\mathbf { y } _ { \mathrm { c y c l e } }$ which gives us the cycle reconstruction loss term:
|
| 148 |
+
|
| 149 |
+
$$
|
| 150 |
+
\mathcal { L } _ { \mathrm { c y c l e } } = - \sum _ { i = t } ^ { l } \log p _ { \theta , \psi } \left( \mathbf { y } _ { \mathrm { c y c l e } } = \mathbf { x } ^ { b } | ( \mathbf { c } = \mathbf { y } _ { \mathbf { x } , \mathbf { x } ^ { \prime } } ) , ( \mathbf { p } = \mathbf { x } ^ { a } ) \right) .
|
| 151 |
+
$$
|
| 152 |
+
|
| 153 |
+
Adversarial Loss Adversarial training objectives have shown to help in generating realistic text outputs (Yang et al., 2018). Here, we also employ an adversarial training loss (Goodfellow et al., 2014) to encourage the output texts’ representations $( \operatorname { L M } _ { \alpha } ( \mathbf { y } ) )$ to match those of the training samples $( \mathrm { L M } _ { \alpha } ( \mathbf { x } ) )$ by minimizing the loss:
|
| 154 |
+
|
| 155 |
+
$$
|
| 156 |
+
\mathcal { L } _ { \mathrm { a d v } } = \mathbb { E } _ { \mathbf { x } } [ \log f _ { \mathrm { d i s c } } ( \mathrm { L M } _ { \alpha } ( \mathbf { x } ) ) ] + \mathbb { E } _ { \mathbf { y } } [ \log ( 1 - f _ { \mathrm { d i s c } } ( \mathrm { L M } _ { \alpha } ( \mathbf { y } ) ) ] ,
|
| 157 |
+
$$
|
| 158 |
+
|
| 159 |
+
where $f _ { \mathrm { d i s c } }$ is a discriminator network that classifies whether the representations are of CoCongenerated texts. Through continuous approximation of discrete sampling of $y$ where token logits instead of one-hot vectors are fed as input into $\mathrm { L M } _ { \alpha }$ , CoCon and $f _ { \mathrm { d i s c } }$ can be trained with backpropagation in an end-to-end manner. Parameterizing the $f _ { \mathrm { d i s c } }$ with $\phi$ , the discriminator is trained to maximize ${ \mathcal { L } } _ { \mathrm { a d v } }$ rather than minimize it:
|
| 160 |
+
|
| 161 |
+
$$
|
| 162 |
+
\phi ^ { * } = \arg \operatorname* { m a x } _ { \phi } \mathcal { L } _ { \mathrm { a d v } }
|
| 163 |
+
$$
|
| 164 |
+
|
| 165 |
+
Full Training The full learning objective trains the CoCon to minimize the four loss terms through stochastic gradient descent:
|
| 166 |
+
|
| 167 |
+
$$
|
| 168 |
+
\theta ^ { * } = \underset { \theta } { \arg \operatorname* { m i n } } ( \lambda _ { \mathrm { s e l f } } \mathcal { L } _ { \mathrm { s e l f } } + \lambda _ { \mathrm { n u l l } } \mathcal { L } _ { \mathrm { n u l l } } + \lambda _ { \mathrm { c y c l e } } \mathcal { L } _ { \mathrm { c y c l e } } + \lambda _ { \mathrm { a d v } } \mathcal { L } _ { \mathrm { a d v } } ) ,
|
| 169 |
+
$$
|
| 170 |
+
|
| 171 |
+
where the $\lambda$ values control how much the loss terms dominate the training. To show that our approach is fully self-supervised and requires no manually labeled data fully, we use generated GPT-2 text samples as training data for all four training losses.
|
| 172 |
+
|
| 173 |
+
# 4 EXPERIMENTS
|
| 174 |
+
|
| 175 |
+
We conduct a range of experiments on CoCon to study its control over generated texts and the quality of these texts. Table 1 shows CoCon samples with content, topic and sentiment control.
|
| 176 |
+
|
| 177 |
+
Table 1: CoCon samples with multiple content inputs, given same prompt text (underlined), exhibiting control over generations. More samples are in the Appendix (Table 18 and 19).
|
| 178 |
+
|
| 179 |
+
<table><tr><td>Content Input (c1):officials predict there could be 5,8oo submerged + Target Topic: SCIENCE, Content Input (c²): Scientist + Target Sentiment: Positive, Content Input (c3): is perfect</td></tr><tr><td>The movie makers speculate there's a perfect match. Expectations there could be up to 5O0 kilograms of clay could be thrown onto the surface of the ocean. The BBC reported that it could have taken up to a year and a half to add clay to the ocean floor, though experts believe it could be done within several days..</td></tr></table>
|
| 180 |
+
|
| 181 |
+
CoCon Setup In all our experiments, the GPT-2 medium 345M model (Radford et al., 2019) is used as the pretrained LM for CoCon. The CoCon’s $\mathrm { L M } _ { \alpha }$ comprises the first 7 GPT-2 Transformer blocks while the remaining 17 blocks make up $\mathrm { L M } _ { \beta }$ in our experiments. The CoCon block’s architecture mirrors a single GPT-2 Transformer block with a dimension size of 1024. The training samples $\mathbf { \tau } ( \mathbf { x } )$ are 30-BPE long segments sampled from GPT-2 output texts2. Subsequently, the $\mathbf { x } ^ { a }$ and $\mathbf { x } ^ { b }$ segments are split from x at a breakpoint between the 8th to 12th BPE position, uniformly sampled during training. More details about the setup are deferred to $\ S \mathbf { A }$ of the Appendix.
|
| 182 |
+
|
| 183 |
+
# 4.1 CONTENT SIMILARITY
|
| 184 |
+
|
| 185 |
+
We perform evaluation of CoCon’s content control over generated text with automatic metrics such as BLEU (Papineni et al., 2002), NIST (Doddington, 2002) and METEOR (Lavie & Agarwal, 2007). These standard machine translation metrics can reveal how the CoCon generated text, $\mathbf { y } = f _ { \theta , \psi } ( \mathbf { c } , \mathbf { p } )$ , are similar to the content input (c). Similar to Dathathri et al. (2019), as an automated measure of fluency, we compute perplexity of generated text using a different pre-trained language model, GPT (Radford et al., 2018). We also report Dist-1,-2,-3 scores as another metric of text quality that measures the diversity of 1-,2-,3-grams in the generations. Apart from a GPT-2 plain baseline without content conditioning, we also compare with three CoCon variants that omit either the $\mathcal { L } _ { \mathrm { c y c l e } }$ , ${ \mathcal { L } } _ { \mathrm { n u l l } }$ or ${ \mathcal { L } } _ { \mathrm { a d v } }$ for an ablation study. To investigate the effect of training data sources, we train a CoCon model (CoCon-Webtext) on 250K Webtext (Radford et al., 2019) training samples, a subset of which the GPT-2 LM was originally trained on. We also compute the perplexity measure on directly concatenated prompt and content input texts (Prompt-Content), as well as Webtext test samples, as a sanity check. More setup details are in $\ S \operatorname { A . 1 }$ of the Appendix.
|
| 186 |
+
|
| 187 |
+
Results Based on the content similarity results (Table 2), all the CoCon variants can incorporate the content of $\mathbf { c }$ in the generated text better than an unconditioned plain GPT-2 LM. While the CoCon ablated variants appear to be better at incorporating c’s content, it comes at a high cost of text quality for the case of omitted $\mathcal { L } _ { \mathrm { c y c l e } }$ and ${ \mathcal { L } } _ { \mathrm { n u l l } }$ . If $\mathcal { L } _ { \mathrm { c y c l e } }$ were removed, CoCon would train only on prompt text $\mathbf { p }$ and content input c segments that were sampled from the same parent $\mathbf { x }$ , which explains why the quality of its outputs drops during test time when prompt text p and content input c are from different sources. We can see this degenerate case from generated samples (Table 9) where $\mathcal { L } _ { \mathrm { c y c l e } }$ is vital to smoothly integrate content inputs that are far from the prompt text. Despite slightly improved text diversity, we observe that ${ \mathcal { L } } _ { \mathrm { a d v } }$ marginally reduces CoCon’s perplexity which we speculate is due to it being a non-LM type loss term, causing a trade-off in performance on the LM-aligned perplexity metric. In our human evaluation (Table 8 of Appendix), we observe that humans also perceive CoCon without ${ \mathcal { L } } _ { \mathrm { a d v } }$ as more fluent, indicating that the addition of ${ \mathcal { L } } _ { \mathrm { a d v } }$ may have made it more challenging for the CoCon model to converge in its training. Training CoCon with Webtext samples improves content similarity at a cost of higher perplexity and lower fluency.
|
| 188 |
+
|
| 189 |
+
Table 2: Content similarity and quality of generated content-conditioned samples. BLEU, NIST and METEOR values are reported in scale of $\bar { ( \times 1 0 ^ { - 2 } ) }$ ).
|
| 190 |
+
|
| 191 |
+
<table><tr><td>Model</td><td>BLEU-4 (↑better)</td><td>NIST-4 (↑better)</td><td>METEOR (↑better)</td><td>Perplexity (↓better)</td><td>Dist-1 (↑better)</td><td>Dist-2 (↑better)</td><td>Dist-3 (↑better)</td></tr><tr><td>GPT-2</td><td>0.22</td><td>7.09</td><td>6.14</td><td>105.7</td><td>0.057</td><td>0.49</td><td>0.82</td></tr><tr><td>CoCon</td><td>2.76</td><td>22.9</td><td>21.5</td><td>70.8</td><td>0.048</td><td>0.39</td><td>0.70</td></tr><tr><td>L w/o Lcycle</td><td>3.30</td><td>25.1</td><td>23.9</td><td>150.8</td><td>0.050</td><td>0.42</td><td>0.74</td></tr><tr><td>L w/o Lnull</td><td>4.44</td><td>28.3</td><td>26.8</td><td>73.2</td><td>0.046</td><td>0.37</td><td>0.68</td></tr><tr><td>L w/o Ladv</td><td>4.47</td><td>28.2</td><td>27.2</td><td>68.7</td><td>0.047</td><td>0.38</td><td>0.69</td></tr><tr><td>CoCon-Webtext</td><td>2.90</td><td>24.6</td><td>23.0</td><td>112.5</td><td>0.054</td><td>0.44</td><td>0.74</td></tr><tr><td>Prompt-Content Webtext</td><td>1 1</td><td>1 1</td><td>1 1</td><td>442.2 185.8</td><td>1 1</td><td>1 1</td><td>1 1</td></tr></table>
|
| 192 |
+
|
| 193 |
+
# 4.2 TOPIC RELEVANCE
|
| 194 |
+
|
| 195 |
+
Setup We evaluate CoCon’s ability to control the topic of the generated text by using topic words as single-token content inputs and compare with two strong LM-based controlled generation baselines (PPLM (Dathathri et al., 2019) and CTRL (Keskar et al., 2019)), using their Huggingface versions (Wolf et al., 2019). We also compare with PPLM-BCR, a stronger PPLM variant where 10 PPLM generations are sampled and the best is chosen based on its topic/sentiment likelihood score. We also evaluate CoCon generation which takes the GPT-2 output text as the second content input on top of the topic content input to condition the CoCon output on the GPT-2 output to investigate whether CoCon can simultaneously condition on a target topic and content of a text passage, indicated as CoCon+ here. We also conducted human evaluations of fluency and A/B testing on attribute relevance, similar to Dathathri et al. (2019). More setup details are presented in the Appendix $\ S \ A . 2$ .
|
| 196 |
+
|
| 197 |
+
Results All the three LM-based controlled text generators output texts are that more topicrelevant than the unconditioned GPT-2 model (Table 3). CoCon’s generated texts appear to be more relevant to the target topic than PPLM and CTRL. Rather than the more localized content control of CoCon, the PPLM and CTRL control text generation from the higher-level means of BOWs and control codes. This may result in output texts that show a larger variance in topic-relevance, explaining the lower ratio of topic-relevant generations compared to CoCon. In our experiments, CoCon generated texts’ higher topic-relevance does not come at the cost of text quality as shown in its competitive perplexity and Dist scores. Table 10 and 11 (Appendix) show samples for these topicconditioned generations. ${ \mathrm { C o C o n } } { \mathrm { : } } { \mathrm { s } }$ topic accuracy is lower than CoCon but still higher than GPT-2 text indicating that adding another content input (GPT-2 output text) can reduce the conditioning strength of the target topic content input. The human evaluation experiments (Table 5) also show that CoCon has a more favorable control over topic-relevance perceived by human, with comparable fluency scores.
|
| 198 |
+
|
| 199 |
+
Table 3: Evaluation of topic-controlled generations. Topic accuracy report ratio of samples that were classified as their target topic.
|
| 200 |
+
|
| 201 |
+
<table><tr><td>Model</td><td>Topic % (↑ better)</td><td>Perplexity (↓better)</td><td>Dist-1 (↑ better)</td><td>Dist-2 (↑better)</td><td>Dist-3 (↑better)</td></tr><tr><td>GPT-2 PPLM</td><td rowspan="6">22.5</td><td rowspan="2">84.7</td><td rowspan="2">0.23</td><td rowspan="2">0.74</td><td rowspan="2">0.91</td></tr><tr><td>PPLM-BCR</td></tr><tr><td>42.5</td><td>32.4 37.5</td><td>0.15</td><td>0.54</td><td>0.78</td></tr><tr><td>61.3 86.7</td><td>60.5</td><td>0.23 0.14</td><td>0.64 0.56</td><td>0.86</td></tr><tr><td>CTRL CoCon</td><td>52.4</td><td>0.17</td><td>0.60</td><td>0.77 0.86</td></tr><tr><td></td><td>90.4 46.2</td><td>83.6</td><td>0.21</td><td></td><td></td></tr><tr><td>CoCon+</td><td></td><td></td><td></td><td>0.67</td><td>0.87</td></tr></table>
|
| 202 |
+
|
| 203 |
+
# 4.3 SENTIMENT CONTROL
|
| 204 |
+
|
| 205 |
+
Setup We also evaluate CoCon’s sentiment control with PPLM and CTRL, in a setup similar to $\mathrm { ~ \normalfont ~ \ S ~ } 4 . 2$ . Sentiment attribute markers (Li et al., 2018) ‘is perfect’ and ‘is horrible’ are used as content inputs to generated CoCon outputs for the POSITIVE and NEGATIVE sentiment respectively. Sentiment attribute markers are n-grams that appear in high frequency in text samples annotated with a particular attribute such as positive/negative sentiment. Similar to Dathathri et al. (2019), the sentiment classifier is trained on the IMDB movie review dataset (Maas et al., 2011).
|
| 206 |
+
|
| 207 |
+
Results Similar to the findings in $\ S 4 . 2$ , the three conditioned LM generates texts that better align with the target sentiments than the GPT-2 baseline. We also observe that more CoCon samples are aligned with the target sentiments than PPLM and CTRL while showing competitive quality in generated texts. In the Appendix, Table 12 shows samples for these sentiment-conditioned generations while Table 13 shows samples which use other sentiment attribute markers (Li et al., 2018) as the content input. Results from human evaluation (Table 5) also show that CoCon generations are more aligned to the target sentiment, though at a cost of fluency. Similar to $\ S 4 . 2$ , we also observe a similar tradeoff in $\mathrm { C o C o n + }$ ’s sentiment alignment when presented with another content input (GPT-2 output text).
|
| 208 |
+
|
| 209 |
+
Table 4: Evaluation of sentiment-controlled generations. Sentiment accuracy report ratio of samples that were classified as their target sentiment.
|
| 210 |
+
|
| 211 |
+
<table><tr><td>Model</td><td>Sentiment % (↑ better)</td><td>Perplexity (↓better)</td><td>Dist-1 (↑better)</td><td>Dist-2 (个better)</td><td>Dist-3 (↑better)</td></tr><tr><td>GPT-2</td><td>50.0</td><td>101.2</td><td>0.38</td><td>0.82</td><td>0.92</td></tr><tr><td>PPLM</td><td>68.9</td><td>35.5</td><td>0.24</td><td>0.63</td><td>0.82</td></tr><tr><td>PPLM-BCR</td><td>96.7</td><td>34.1</td><td>0.30</td><td>0.65</td><td>0.79</td></tr><tr><td>CTRL</td><td>81.1</td><td>44.1</td><td>0.21</td><td>0.62</td><td>0.80</td></tr><tr><td>CoCon</td><td>98.9</td><td>50.3</td><td>0.20</td><td>0.61</td><td>0.80</td></tr><tr><td>CoCon+</td><td>85.6</td><td>111.0</td><td>0.32</td><td>0.73</td><td>0.87</td></tr></table>
|
| 212 |
+
|
| 213 |
+
Table 5: Human evaluation of topic/sentiment-controlled generations on relevance with target topic or sentiment and their fluency scores $\uparrow$ better for all metrics).
|
| 214 |
+
|
| 215 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">Topic</td><td colspan="2">Sentiment</td></tr><tr><td>Acc.%</td><td>Fluency</td><td>Acc.%</td><td>Fluency</td></tr><tr><td>GPT-2</td><td>22.0</td><td>4.01</td><td>36.7</td><td>3.84</td></tr><tr><td>CoCon</td><td>85.0</td><td>3.86</td><td>76.7</td><td>3.30</td></tr><tr><td>PPLM-BCR</td><td>46.0</td><td>3.98</td><td>50.0</td><td>3.48</td></tr><tr><td>CoCon</td><td>75.0</td><td>3.86</td><td>66.7</td><td>3.30</td></tr><tr><td>CTRL</td><td>55.0</td><td>3.80</td><td></td><td></td></tr><tr><td></td><td></td><td></td><td>43.3</td><td>3.83</td></tr><tr><td>CoCon</td><td>65.0</td><td>3.86</td><td>86.7</td><td>3.30</td></tr></table>
|
| 216 |
+
|
| 217 |
+
Table 6: Human evaluation of CoCon generations with GPT-2 text as content input $\scriptstyle ( \mathbf { C o C o n + } )$ versus other text generators for content similarity with GPT-2 text, relevance with target topic/sentiment and their fluency scores ( $\uparrow$ better for all metrics).
|
| 218 |
+
|
| 219 |
+
<table><tr><td>Model</td><td colspan="3">Topic</td><td colspan="2">Sentiment</td></tr><tr><td>PPLM-BCR</td><td>Sim. % 42.0</td><td>Acc. % Fluency 51.0 3.98</td><td>Sim. % 43.3</td><td>Acc.% 56.7</td><td>Fluency 3.48</td></tr><tr><td>CoCon+ CTRL</td><td>74.0 36.0</td><td>45.0 3.74 63.0 3.80</td><td>66.7 26.7</td><td>56.7 73.3</td><td>3.56 3.83</td></tr><tr><td>CoCon+ CoCon</td><td>59.0 41.0</td><td>47.0 3.74 83.0 3.86</td><td>56.7 43.3</td><td>56.7 70.0</td><td>3.56 3.30</td></tr><tr><td>CoCon+ GPT-2 CoCon+</td><td>62.0 32.0 - - 49.0</td><td>3.74 31.0 4.01 3.74</td><td>50.0 =</td><td>63.3 43.3 76.7</td><td>3.56 3.84 3.56</td></tr></table>
|
| 220 |
+
|
| 221 |
+
# 4.4 VERSATILITY OF COCON
|
| 222 |
+
|
| 223 |
+
Multiple Content Inputs Through multiple content inputs, we observe that CoCon can control both high-level attributes (topic and sentiment) and more localized content of the text generation at the same time (Table 18 and 19 in Appendix), highlighting its versatility. In Table 6, we observe that ${ \mathrm { C o C o n } } +$ generations have higher perceived content similarity with GPT-2 outputs than all the other baselines (including CoCon itself) even though they share similar prompt texts and target attributes. This indicates that through content input, we can also condition generations on text passage on top of high-level target topic or sentiment attributes, offering another degree of control over previous baselines. We also observe higher content similarity in ${ \mathrm { C o C o n } } +$ from automatic metrics (Table 7 in Appendix).
|
| 224 |
+
|
| 225 |
+
Strength of Content Conditioning As discussed in $\ S 3$ , CoCon offers a means to control the extent of content-conditioning through $\tau _ { \mathrm { c o n t e n t } }$ . Table 14, 15 and 16 (Appendix) shows texts generated with varying $\tau _ { \mathrm { c o n t e n t } }$ values. We can see that as $\tau _ { \mathrm { c o n t e n t } }$ becomes more negative, it becomes similar to an unconditioned LM generation. Conversely, when $\tau _ { \mathrm { c o n t e n t } }$ becomes more positive, the generated text aligns more with the content input up to a limit where the text appears incomprehensible.
|
| 226 |
+
|
| 227 |
+
Complementary Text Control The modular property of CoCon means that it is complementary to other controlled LM generation approaches such as PPLM. Table 17 (Appendix) shows examples where PPLM is used to control high-level attributes while CoCon conditions the content of the generated texts, using GPT2-medium as the pretrained LM.
|
| 228 |
+
|
| 229 |
+
# 5 CONCLUSION
|
| 230 |
+
|
| 231 |
+
We proposed Content-Conditioner (CoCon) as an approach for more fine-grained control over neural text generation. CoCon can be trained effectively in a self-supervised manner and is compatible with pretrained language models (LM) that already produce high-quality texts. Through our experiments, CoCon was shown to smoothly incorporate content inputs into generated texts and control high-level text attributes. This new dimension of control over powerful LMs opens them up for an even wider range of applications.
|
| 232 |
+
|
| 233 |
+
# REFERENCES
|
| 234 |
+
|
| 235 |
+
Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
|
| 236 |
+
|
| 237 |
+
Ankur Bapna, Naveen Arivazhagan, and Orhan Firat. Simple, scalable adaptation for neural machine translation. arXiv preprint arXiv:1909.08478, 2019.
|
| 238 |
+
|
| 239 |
+
Yoshua Bengio, Rejean Ducharme, Pascal Vincent, and Christian Jauvin. A neural probabilistic ´ language model. Journal of machine learning research, 3(Feb):1137–1155, 2003.
|
| 240 |
+
|
| 241 |
+
Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020.
|
| 242 |
+
|
| 243 |
+
Ning Dai, Jianze Liang, Xipeng Qiu, and Xuanjing Huang. Style transformer: Unpaired text style transfer without disentangled latent representation. arXiv preprint arXiv:1905.05621, 2019a.
|
| 244 |
+
|
| 245 |
+
Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc V Le, and Ruslan Salakhutdinov. Transformer-xl: Attentive language models beyond a fixed-length context. arXiv preprint arXiv:1901.02860, 2019b.
|
| 246 |
+
|
| 247 |
+
Sumanth Dathathri, Andrea Madotto, Janice Lan, Jane Hung, Eric Frank, Piero Molino, Jason Yosinski, and Rosanne Liu. Plug and play language models: a simple approach to controlled text generation. arXiv preprint arXiv:1912.02164, 2019.
|
| 248 |
+
|
| 249 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
|
| 250 |
+
|
| 251 |
+
George Doddington. Automatic evaluation of machine translation quality using n-gram cooccurrence statistics. In Proceedings of the second international conference on Human Language Technology Research, pp. 138–145, 2002.
|
| 252 |
+
|
| 253 |
+
Hady Elsahar, Christophe Gravier, and Frederique Laforest. Zero-shot question generation from knowledge graphs for unseen predicates and entity types. arXiv preprint arXiv:1802.06842, 2018.
|
| 254 |
+
|
| 255 |
+
Jessica Ficler and Yoav Goldberg. Controlling linguistic style aspects in neural language generation. arXiv preprint arXiv:1707.02633, 2017.
|
| 256 |
+
|
| 257 |
+
Marjan Ghazvininejad, Xing Shi, Jay Priyadarshi, and Kevin Knight. Hafez: an interactive poetry generation system. In Proceedings of ACL 2017, System Demonstrations, pp. 43–48, 2017.
|
| 258 |
+
|
| 259 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014.
|
| 260 |
+
|
| 261 |
+
Ari Holtzman, Jan Buys, Maxwell Forbes, Antoine Bosselut, David Golub, and Yejin Choi. Learning to write with cooperative discriminators. arXiv preprint arXiv:1805.06087, 2018.
|
| 262 |
+
|
| 263 |
+
Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and Yejin Choi. The curious case of neural text degeneration. arXiv preprint arXiv:1904.09751, 2019.
|
| 264 |
+
|
| 265 |
+
Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P Xing. Toward controlled generation of text. In Proceedings of the 34th International Conference on Machine LearningVolume 70, pp. 1587–1596. JMLR. org, 2017.
|
| 266 |
+
|
| 267 |
+
Nitish Shirish Keskar, Bryan McCann, Lav R Varshney, Caiming Xiong, and Richard Socher. Ctrl: A conditional transformer language model for controllable generation. arXiv preprint arXiv:1909.05858, 2019.
|
| 268 |
+
|
| 269 |
+
Yuta Kikuchi, Graham Neubig, Ryohei Sasano, Hiroya Takamura, and Manabu Okumura. Controlling output length in neural encoder-decoders. arXiv preprint arXiv:1609.09552, 2016.
|
| 270 |
+
|
| 271 |
+
Alon Lavie and Abhaya Agarwal. Meteor: An automatic metric for mt evaluation with high levels of correlation with human judgments. In Proceedings of the second workshop on statistical machine translation, pp. 228–231, 2007.
|
| 272 |
+
|
| 273 |
+
Juncen Li, Robin Jia, He He, and Percy Liang. Delete, retrieve, generate: A simple approach to sentiment and style transfer. arXiv preprint arXiv:1804.06437, 2018.
|
| 274 |
+
|
| 275 |
+
Andrew L Maas, Raymond E Daly, Peter T Pham, Dan Huang, Andrew Y Ng, and Christopher Potts. Learning word vectors for sentiment analysis. In Proceedings of the 49th annual meeting of the association for computational linguistics: Human language technologies-volume 1, pp. 142–150. Association for Computational Linguistics, 2011.
|
| 276 |
+
|
| 277 |
+
Christopher D Manning, Christopher D Manning, and Hinrich Schutze. ¨ Foundations of statistical natural language processing. MIT press, 1999.
|
| 278 |
+
|
| 279 |
+
Rishabh Misra. News category dataset, 06 2018.
|
| 280 |
+
|
| 281 |
+
Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting on association for computational linguistics, pp. 311–318. Association for Computational Linguistics, 2002.
|
| 282 |
+
|
| 283 |
+
Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving language understanding by generative pre-training. URL https://s3-us-west-2. amazonaws. com/openaiassets/researchcovers/languageunsupervised/language understanding paper. pdf, 2018.
|
| 284 |
+
|
| 285 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. OpenAI Blog, 1(8):9, 2019.
|
| 286 |
+
|
| 287 |
+
Abigail See, Stephen Roller, Douwe Kiela, and Jason Weston. What makes a good conversation? how controllable attributes affect human judgments. arXiv preprint arXiv:1902.08654, 2019.
|
| 288 |
+
|
| 289 |
+
Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909, 2015.
|
| 290 |
+
|
| 291 |
+
Tianxiao Shen, Tao Lei, Regina Barzilay, and Tommi Jaakkola. Style transfer from non-parallel text by cross-alignment. In Advances in neural information processing systems, pp. 6830–6841, 2017.
|
| 292 |
+
|
| 293 |
+
Yi Tay, Dara Bahri, Donald Metzler, Da-Cheng Juan, Zhe Zhao, and Che Zheng. Synthesizer: Rethinking self-attention in transformer models. arXiv preprint arXiv:2005.00743, 2020.
|
| 294 |
+
|
| 295 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
|
| 296 |
+
|
| 297 |
+
Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, R’emi Louf, Morgan Funtowicz, and Jamie Brew. Huggingface’s transformers: State-of-the-art natural language processing. ArXiv, abs/1910.03771, 2019.
|
| 298 |
+
|
| 299 |
+
Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Russ R Salakhutdinov, and Quoc V Le. Xlnet: Generalized autoregressive pretraining for language understanding. In Advances in neural information processing systems, pp. 5754–5764, 2019.
|
| 300 |
+
|
| 301 |
+
Zichao Yang, Zhiting Hu, Chris Dyer, Eric P Xing, and Taylor Berg-Kirkpatrick. Unsupervised text style transfer using language models as discriminators. In Advances in Neural Information Processing Systems, pp. 7287–7298, 2018.
|
| 302 |
+
|
| 303 |
+
Lantao Yu, Weinan Zhang, Jun Wang, and Yong Yu. Seqgan: Sequence generative adversarial nets with policy gradient. In Thirty-First AAAI Conference on Artificial Intelligence, 2017.
|
| 304 |
+
|
| 305 |
+
Daniel M Ziegler, Nisan Stiennon, Jeffrey Wu, Tom B Brown, Alec Radford, Dario Amodei, Paul Christiano, and Geoffrey Irving. Fine-tuning language models from human preferences. arXiv preprint arXiv:1909.08593, 2019.
|
| 306 |
+
|
| 307 |
+
# A DETAILED COCON SETUP
|
| 308 |
+
|
| 309 |
+
In all our experiments, the GPT-2 medium 345M model (Radford et al., 2019) is used as the pretrained LM for CoCon. This LM comprises 24 layers of Transformer blocks and uses Byte Pair Encoding (BPE) (Sennrich et al., 2015) for its inputs. The CoCon’s $\mathrm { L M } _ { \alpha }$ comprises the first 7 GPT2 Transformer blocks while the remaining 17 blocks make up $\mathrm { L M } _ { \beta }$ in our experiments. The CoCon block’s architecture mirrors a single GPT-2 Transformer block with a dimension size of 1024. We train CoCon for 2 epochs on publicly available GPT-2 medium output texts (250K train samples) that are generated with top- $4 0 ~ \mathbf { k }$ -sampling 3. The training samples $\mathbf { \tau } ( \mathbf { x } )$ are 30-BPE long segments sampled from these GPT-2 output texts. Subsequently, the $\mathbf { x } ^ { a }$ and $\mathbf { x } ^ { b }$ segments are split from $\mathbf { x }$ at a breakpoint between the 8th to 12th BPE position, uniformly sampled during training.
|
| 310 |
+
|
| 311 |
+
The discriminator $( f _ { \mathrm { d i s c } } )$ consists of a 1-D convolutional layer, followed by a linear layer with 2 class outputs and is trained once for every 5 CoCon training steps. To simplify hyperparameter tuning, we set $\lambda = 1$ for all four CoCon loss terms and $\tau _ { \mathrm { c o n t e n t } } = 0$ for our results. Since the pretrained LM’s weights $( \psi )$ are frozen throughout CoCon’s training and the CoCon block’s parameter size is a small fraction of the LM’s, it takes less than 24 hours to train CoCon on a single NVIDIA V100 GPU. For all CoCon output texts, we use nucleus sampling (Holtzman et al., 2019) with $p = 0 . 9$ to draw the next token from the vocabulary’s softmax distribution.
|
| 312 |
+
|
| 313 |
+
# A.1 CONTENT SIMILARITY
|
| 314 |
+
|
| 315 |
+
The content input (c) and prompt text $\mathbf { \eta } ( \mathbf { p } )$ are randomly sourced from different GPT-2 output samples that are withheld from CoCon training. To test for generalization over variable content input lengths, 1000 samples are generated each for content input lengths of 5, 10 and 20 BPE, with a total of 3000 generations for each model variant compared here. Each generated text segment is 100 BPE long. Apart from a GPT-2 plain baseline without content conditioning, we also compare with three CoCon variants that omit either the $\mathcal { L } _ { \mathrm { c y c l e } }$ , $\mathcal { L } _ { \mathrm { n u l l } }$ or ${ \mathcal { L } } _ { \mathrm { a d v } }$ for an ablation study. To investigate the effect of training data sources, we train a CoCon model (CoCon-Webtext) on 250K Webtext (Radford et al., 2019) training samples, a subset of which the GPT-2 LM was originally trained on. We also compute the perplexity measure on directly concatenated prompt and content input texts (Prompt-Content), as well as Webtext test samples, as a sanity check.
|
| 316 |
+
|
| 317 |
+
# A.2 TOPIC RELEVANCE
|
| 318 |
+
|
| 319 |
+
We evaluate CoCon’s ability to control the topic of the generated text by using topic words as single-token content inputs and compare with two strong LM-based controlled generation baselines (PPLM (Dathathri et al., 2019) and CTRL (Keskar et al., 2019)), using their Huggingface versions (Wolf et al., 2019). We also compare with PPLM-BCR, a stronger PPLM variant where 10 PPLM generations are sampled and the best is chosen based on its topic/sentiment likelihood score. Here, content inputs ‘computers’, ‘politician’, ‘religion’ and ‘scientist’ are used to generate CoCon outputs for the COMPUTERS, POLITICS, RELIGION and SCIENCE topic respectively. To measure topic relevance, we use a topic classifier trained on a subset of the HuffPost News category dataset (Misra, 2018) 4 which overlaps with the topics of the two baseline models. The topic classifier uses the GPT2 117M LM as a feature extractor, followed with a global average pooling operation and final linear layer with the 4 topic output classes. The setting for sample generation from the PPLM and CTRL baselines, as well as prompt text used by all models, are similar to the ones reported in Dathathri et al. (2019). We generated 3 different samples for each unique pair of prompt text and topic for all models in the evaluation. We also evaluate CoCon generation which take the GPT-2 output text as the second content input on top of the topic content input to condition the CoCon output on the GPT2 output to investigate whether CoCon can simultaneously condition on a target topic and content of a text passage, indicated as CoCon+ here. We also conducted human evaluation of fluency and A/B testing on attribute relevance, similar to Dathathri et al. (2019).
|
| 320 |
+
|
| 321 |
+
# A.3 HUMAN EVALUATION
|
| 322 |
+
|
| 323 |
+
We conduct human fluency and topic/sentiment relevance evaluation similar to Dathathri et al. (2019). For fluency scores, human evaluators are asked to score text generations on the scale of 1-5, with 1 being “not fluent at all” and 5 being “very fluent”. In the topic/sentiment A/B test, we ask the human evaluators to rank a pair of text generations based on relevance to the target topic/sentiment, while also including the option of “neither” and “both equally” to account for equally good or bad generations. Each evaluation sample is judged by three unique evaluators. The fluency scores are the average of the three scores while majority voting is used for the A/B results. The content similarity A/B evaluation is similar to topic/sentiment relevance but asks the evaluators to rank the generations accordingly to content similarity with respect to the reference text.
|
| 324 |
+
|
| 325 |
+
Table 7: Content similarity of generated content-conditioned samples with GPT-2 text. BLEU, NIST and METEOR values are reported in scale of $( \times 1 0 ^ { - 2 } )$ ), $\uparrow$ better for all metrics.
|
| 326 |
+
|
| 327 |
+
<table><tr><td rowspan="2">Model</td><td colspan="3">Topic</td><td colspan="3">Sentiment</td></tr><tr><td>BLEU-4</td><td>NIST-4</td><td>METEOR</td><td>BLEU-4</td><td>NIST-4</td><td>METEOR</td></tr><tr><td>PPLM-BCR</td><td>0.753</td><td>85.8</td><td>11.3</td><td>0.839</td><td>60.7</td><td>8.52</td></tr><tr><td>CTRL</td><td>0.579</td><td>77.7</td><td>10.7</td><td>0.710</td><td>61.9</td><td>9.50</td></tr><tr><td>CoCon</td><td>0.642</td><td>81.5</td><td>10.6</td><td>0.713</td><td>53.1</td><td>8.00</td></tr><tr><td>CoCon+</td><td>6.16</td><td>146</td><td>20.5</td><td>5.44</td><td>123</td><td>19.9</td></tr></table>
|
| 328 |
+
|
| 329 |
+
Table 8: Human perceived fluency scores of CoCon variants’ topic- and sentiment-controlled generations.
|
| 330 |
+
|
| 331 |
+
<table><tr><td>Model</td><td>Topic</td><td>Sentiment</td><td>All</td></tr><tr><td>CoCon</td><td>3.86</td><td>3.30</td><td>3.73</td></tr><tr><td>L w/o Ladv</td><td>3.88</td><td>3.49</td><td>3.79</td></tr><tr><td>CoCon-Webtext</td><td>3.74</td><td>3.47</td><td>3.68</td></tr></table>
|
| 332 |
+
|
| 333 |
+
Table 9: Generated content-conditioned text samples from CoCon and its ablated variants, starting from the same prompt text (underlined). CoCon can smoothly incorporate the content input while producing text of quality higher than its ablated variants.
|
| 334 |
+
|
| 335 |
+
<table><tr><td rowspan=1 colspan=1>Content Input (c): the first time at its</td></tr><tr><td rowspan=1 colspan=1>[GPT-2]..on your ruler, so make sure you understand your scale.By putting something in an adstop, you</td></tr><tr><td rowspan=1 colspan=1>tell them that it's acceptable to sellsomething here or there because there's nothing to buy,and there'snothing to sellfor. Reposting ads here means that you are minimizing the value of the site.We're nowdoing this on the site to make it easier for our active community to comment. This willhelp to encouragereaders to subscribe to your project. We believe that active users should see every single article here, so..</td></tr><tr><td rowspan=1 colspan=1>[CoCon].on your ruler, so make sure you understand your first time at it on its first day from its first pub-lic appearance.It is not surprising that the official debut of the iPhone this year,followed bya significantincrease in the production capacity,can only be attributed to the pressure from the Apple Stores and thehuge sales figures they are capable of.In fact,the sale of the iPhone 4S last month at a mere 2.9 milionhandsets,a single-digit decrease on the previous year,was the largest for any device sold this year..</td></tr><tr><td rowspan=1 colspan=1>[w/o Lcycle]..on your ruler, so make sure you understand your first time at it at its first time at the time of its impact on the space shutte. According to The Atlantic,the"shutte"this year took to an unprecedented"new normal"because of the increased stress of its unmanned missions,which had estimates that a typesetof 8-minute-long video about its timesliding-or,as the Il-76's makers are nowcalling it,its forover7000hours of space flight time.It actually took..</td></tr><tr><td rowspan=1 colspan=1>[w/o Lnull ..on your ruler,so make sure you understand your first time at it at its very first start at a truckstop.After the first ride,you will experience the full customer experience.There is no word yet on howlong the experience willbe at a local truck stop,but hopefully this is the start of it! Venezuela made thebiggest step forward when it got rid of its "closed"advertising rules in 2O14.You are welcome XiahodhosAnokhi is one of many minorities who..</td></tr><tr><td rowspan=1 colspan=1>[w/o Ladv] .on your ruler, so make sure you understand your first time at it as its first time at the newestablishment at the Las Vegas strip mall Read more: Disney To Pay 'Beauty' Company $25O Million ToConvert 2-D Series Into 3-D Theater Disney announced the cost of its expansion to Las Vegas a week agoin a financial pressrelease that also reported "there has been no change in operating expenses in 2013" to$1.54 billion. The company said it will spend $9oO million on .</td></tr><tr><td rowspan=1 colspan=1>Content Input (c): time, we will be</td></tr><tr><td rowspan=1 colspan=1>[GPT-2] ..weak point is the shaft, which will bend if exposed to high heat and chill. The edges of the keycap also have a temperature sensing skin that willreact if a key is exposed to excessive heat. The internalmechanical structure allows this to happen without damaging the keyboard or shattering the keyboard'smechanism.All in all,the PBTCherry switch can be said to be the best value in its clas,but ultimatelycomes at the cost of durability. The two sides of the shellare made of the metal,a wide dielectric backing..</td></tr><tr><td rowspan=1 colspan=1>[CoCon] ..weak point is the shaft, which willbend if moving, we will be there. Once the shaft breaks, wewill have to restore our own down.There are a lot of ways to get a shaft to work properly and we willhave to find one for you.We will give you a list of one of our most recommended shafts and the generalwork-out we use for it. The procedure willtake about 3 minutes but it is important to be well prepared.We are currently working..</td></tr><tr><td rowspan=1 colspan=1>[w/o Lcyclel]..weak point is the shaft, which will bend if time, we willbe will be. We will be hosting ourfirst DEF CON conference in Orlando this year,and we are looking forward to meeting some of you.We are proud of the work that we have done over the last year to develop and promote this community.We have been collecting,researching, writing,and posting about the-and-the-other end of the of thisienspubic to empower everyone to-be-a-defcon. Since we(there's..</td></tr><tr><td rowspan=1 colspan=1>[w/o Lnul]..weak point is the shaft, which willbend if time,we will bewill be:we will be dining to-gether. Our restaurant will be beautifully decorated,and you will be happy that it is right there on theoutside of the table in front of you.Yes.The security is my job. So we can allsay that.Thank you somuch for making that happen. SWEET HEART Posted: March 28,2O17 at 11:14 am and posted: June10,2016 at 7:57 am..</td></tr><tr><td rowspan=1 colspan=1>[w/o Ladv] ..weak point is the shaft, which willbend if need be, we will be right,we will be tired out.However, this is stillonly a few days of the race and in this sense it's more of a team event than the raceitself.The campaign doesn't end until te end of May but we will have the fullteam ready. So we knowwe are stillin a very good condition to enjoy the moment. We are still confident that we can ride well.</td></tr></table>
|
| 336 |
+
|
| 337 |
+
Table 10: Generated topic-conditioned text samples from CoCon and baselines on topic POLITICS and COMPUTERS, starting from the same prompt text (underlined). Instances of ‘Score:’ in CTRL’s texts are artifacts from its training on product review data.
|
| 338 |
+
|
| 339 |
+
<table><tr><td></td><td rowspan=1 colspan=1>Target Topic:Politics</td></tr><tr><td></td><td rowspan=1 colspan=1>[GPT-2] The central theme of the Book of Mormon is human history. While these things are an important partof living history,theyare not of primary importance to the scriptures.(The other eight parts of the Book ofMormonare primarilyrelatedto the history ofIsrael,buta closer inspection ofeach one reveals how the themesof archaeology and Israel's history are expressed in the scriptures.) In order to provide an understanding of.</td></tr><tr><td></td><td rowspan=1 colspan=1>[PPLM] The central theme of the debate over the future of the European Union has been to decide what kindof society should emerge within it.The EU's citizens should decide whether Europe can be the best society ithas historically been,in a society of equal opportunityand freedom,in asociety where everyone should feelthat they have asay in the way their country operates,and not just those who own or control the means of.</td></tr><tr><td></td><td rowspan=1 colspan=1>[CTRL]The central theme of my argument is that the public school system in America has been set up to fail.In order forit to succeed, we must remove the barriers which make education so expensive and diffcult. Score:9 Title: A group caled Americans United for Separation of Church; State is suing Texas over a law makingteaching creationism illegal. Score:18 Title: Jon Stewart on Fox News: Obama sounds like..</td></tr><tr><td></td><td rowspan=1 colspan=1>[CoCon] The central theme of political debate. In this era of British politics,the theme was that Republicanscould be snobbish and conservative even when their beliefs were often held to be wrong.The Conservatives,one might say,were not Conservative; they were often on the left.In May 2Ol2,for example,Billde Blasioused to say,"I'm not a Conservative.I'ma Liberal..</td></tr><tr><td></td><td rowspan=1 colspan=1>TargetTopic:Computers</td></tr><tr><td></td><td rowspan=1 colspan=1>[GPT-2] To conclude,I'd like to thank all the members who have contributed to this debate so far.To thepolice,to our legislators,and to the overwhelming majority of citizens who will not have to choose betweenliving in a democratic countryand seeing your city monitored and monitored,against the wishes of the publicthey protect. It makes me very proud.After my First Amendment line did the unthinkable and again this..</td></tr><tr><td></td><td rowspan=1 colspan=1>[PPLM] To conclude,in the absence of a clear and compeling evidence of causality,we must conclude thatthere are two hypotheses that could account for the observed correlation between BMI (as measured by bodycomposition test results from the National Health and Nutrition Examination Survey)and risk of death. Onehypothesis is thatBMI is associated with lower death rates.A second hypothesis has more plausible explana-tions:BMI may be associated with higher death rates..</td></tr><tr><td></td><td rowspan=1 colspan=1>[CTRL] To conclude, Ifeel like we have a good idea of what the future willbe for online gaming,and wecan work on improving it to make it beter. Score:7 Title: Is there any reason why this is not possible today?A new chip with faster RAMcould do this. Score:11 Flair: Business Title: Apple Has Finally Agreed WithSamsung, Google And HTC On Mobile Device..</td></tr><tr><td rowspan=1 colspan=2>[CoCon] To conclude,computers or servers run a lot of machines and computers generate lots of software,running diffrent programs on it. People are often woried about their computers being lost when they losetheir data,orif a computer system crashes,and computers are especially susceptible to damage or even loss ofdata.Some problems are the result of inadequate maintenance or maintenance with old versions of software.For example, some programs might ..</td></tr></table>
|
| 340 |
+
|
| 341 |
+
Table 11: Generated topic-conditioned text samples from CoCon and baselines on topic RELIGION and SCIENCE, starting from the same prompt text (underlined).
|
| 342 |
+
|
| 343 |
+
<table><tr><td rowspan=1 colspan=1>Target Topic:Religion</td></tr><tr><td rowspan=1 colspan=1>[GPT-2] The connection between mental health and domestic violence and other issues were discussed. Whilenot predicting specific outcomes,they did determine the need for routine counseling regarding chronic mal-treatment in certain domains: obsessve compulsive disorder,for example,should be screened for and nvesti-gated during times of crises.In addition,some therapists themselves report witnessng an increase in domesticviolence victims seeing their primary care providers for mental health concerns..</td></tr><tr><td rowspan=1 colspan=1>[PPLM] The connection between the world and the church is a powerful one, but in our culture,the church isoften defined by the way it deals with sexuality.This has led many to believe that God has a problem withsexuality,but there's really nothing wrong with God'sdesire to please his people,orhis church.It'salso truethat God wants us to be good Christians,and to follow..</td></tr><tr><td rowspan=1 colspan=1>[CTRL]]The connection between the two is a bit tenuous at best but it seems to be there. Score: 11 Title: Myfriend just got baptized in my church today. It was one of those moments where you fel so grateful for yourfamily.Ilove you.Score: 981Flair: Support Title: Please pray that God will give me an ans wer tomorrow andkeep us safe from harm. Thank you..</td></tr><tr><td rowspan=1 colspan=1>[CoCon]IThe connection between Islam and spirituality? People living in the United States say they believe inthe Qur'an.1InJanuary2Ol5,about3oo Qur'an-related books were published in the U.S.based ontranslationsand studies.A number of them are considered "intelectual works”by Islamic scholars.The most popular onesare:2 We bring as many perspectives..</td></tr><tr><td rowspan=1 colspan=1>Target Topic:Science</td></tr><tr><td rowspan=1 colspan=1>[GPT-2] Views on reports of atrocities by Islamic State jihadists have been rising, especially folowing reportslast month that at least 40O fighters had been killed by U.S.-backed Syrian Democratic Forces (SDF).The increased public outrage has triggered a slew of Pentagon and U.S.lawmakers to send leters to the secretaryof defense and secretary of state urging them to be tougher in addressng some of the growing concerns about..</td></tr><tr><td rowspan=1 colspan=1>[PPLM] Views on the future have changed, with the economy and political landscape shifting in ways thatwill affect how much money governments make and how quickly they grow (see Figure 7).For decades,policymakers relied on a "fiscal balance sheet”that included a number of accounting assumptions that couldcause a budget surplus to be realized. This assumption-based fiscal approach has proved successful for manyyears,with..</td></tr><tr><td rowspan=1 colspan=1>[CTRL] Views on the matter are a bitcontradictory. Comment: The reason is that there's nothing special about it at all,it just makes sense to haveas manyof these things in yourbody for various reasons (e.g.Ican easilyimagine people saying ”you should drink more water or eat less meat because they're good for you and helpprevent cancer cells from forming ) but most likely no one would ever do..</td></tr><tr><td rowspan=1 colspan=1>[CoCon] Views on the Iranian physicist: professor at the University of Tehran, who was awarded a US$200,000award for his work.His work was published in January 2O13 in the International Journal of Quantum Physics.He has been a member of the physics team at the National Institute for Advanced Scientific Studies in Tehransince 2O1o.His findings are backed by the world's top physicists and technology..</td></tr></table>
|
| 344 |
+
|
| 345 |
+
Table 12: Generated sentiment-conditioned text samples from CoCon and baselines, starting from the same prompt text (underlined).
|
| 346 |
+
|
| 347 |
+
<table><tr><td rowspan=1 colspan=1>Target Sentiment: Positive</td></tr><tr><td rowspan=1 colspan=1>[GPT-2] The horse racing industry needs people to be able to compete but this will happen if people acceptthat these horses are always going to be sold as broilers; or offered at horse auctions,or they are always going to be had for sale; or it is not..</td></tr><tr><td rowspan=1 colspan=1>[PPLM] The horse-drawn car has been the subject of much media atention,but a new research articlefrom the University of Bristol (Bristol) and the University of Oxford (Oxford) has shown that the use ofthe technology could also be very effective in..</td></tr><tr><td rowspan=1 colspan=1>[CTRL] The horse is cute and well made. It was a gift for my grandaughter who loves horses.I think shewill love it.Rating: 5.O This litle pony has been one of the best gifts I've ever given to my niece. Sheabsolutely adores it (and so..</td></tr><tr><td rowspan=1 colspan=1>[CoCon] The horse of perfection is perfect! It's perfect! They are both very pretty,and veryaffordable.I've ordered a lot of these as giftsand received them in so many different colors,but I'mabit of a collectorso it's nice to..</td></tr><tr><td rowspan=1 colspan=1>Target Sentiment: Positive</td></tr><tr><td rowspan=1 colspan=1>[GPT-2] The last time, prosecutors countered with expert testimony from witnesses, testimony and photos.But that strategy didn't produce any indictments against any Denver police oficers and won't produce anycriminal charges against any ofcers or prosecutor,said Harris County District Attorney Mitch Morrissey,who..</td></tr><tr><td rowspan=1 colspan=1>[PPLM] The last time you checked Google's search rankings, you may have thought the tech giant'sranking was the best in the business. But it turns out it wasn't quite that simple. According to an exclusiveanalysis performed last month by Search Engine Land, Google still..</td></tr><tr><td rowspan=1 colspan=1>[CTRL] The last time I saw a video of him singing was in the late 8Os at his wedding to his wife Maria.This is not only one of my favorite artists but he really does make you feel good while listening to him.He sings from the heart and it shows..</td></tr><tr><td rowspan=1 colspan=1>[CoCon] The last time someone is perfect is perfect.Whether you want to get your designs out into theworld,you are in luck.Here is a breakdown of the best pieces we have found.1.Aircraft Outfit Pattern.This patterns..</td></tr><tr><td rowspan=1 colspan=1>Target Sentiment: Negative</td></tr><tr><td rowspan=1 colspan=1>[GPT-2] The potato is no longer looking so earthy as it once did. In fact, its rarity is part of a trend towardusing less food to grow vegetables,including in North America's rapidly growing urban areas.But that'snot to say that as much of..</td></tr><tr><td rowspan=1 colspan=1>[PPLM] The potato is one of the most widely consumed plants in the world. Although there is somedebate as to the origins of this bug,it is believed that this bug was introduced to North America by NativeAmericans during their early days of life as early as 5OO years..</td></tr><tr><td rowspan=1 colspan=1>[CTRL] The potato is not a good idea for someone who has an ulcer. I would suggest you do someresearch before buying this product. Rating: 1.O When the package arrived it was in pieces,there wereseveral broken pieces and when we tried to put them together they..</td></tr><tr><td rowspan=1 colspan=1>[CoCon] The potato is really horrible.This is terrible.Like,this is worse than most potatoes I've eatenall week.Tll confess,I never did feel any weird thoughts going through my head about this one. Idon'tknow why, but..</td></tr><tr><td rowspan=1 colspan=1>Target Sentiment: Negative</td></tr><tr><td rowspan=1 colspan=1>[GPT-2] The year is 1910. The Baltic prince,Peter I Kresimir is a wealthy Russian merchant. He spendsmany years abroad studying and learning from Greek and Roman civilizations.He is tutored by English professor Stephen Weil. Things are well sorted out as Peter is accepted at..</td></tr><tr><td rowspan=1 colspan=1>[PPLM] The year is 1910. A young man in a smal town in the U.S. goes to the hospital for a mysteriousailment. The doctor,Dr. Hulot,is a little bit ill and is unable to work, so he gives..</td></tr><tr><td rowspan=1 colspan=1>[CTRL] The year is 1910. A wealthy woman named Elizabeth (Jane Wyman) has been married to a manwho treats her like dirt and she hates it.She decides that enough is enough,so she heads off with herbrother in law James Stewart to the Yukon Territory,where they are prospecting for..</td></tr><tr><td rowspan=1 colspan=1>[CoCon] The year is 1910. Death is horrible.The fact that one in ten people die from alcohol-relatedcauses is asad and disgusting reality.Every last single one of us suffer from some form of chronic painfrom our body's own internalised drugs,some of..</td></tr></table>
|
| 348 |
+
|
| 349 |
+
Table 13: CoCon sentiment-conditioned text samples generated with other sentiment attribute markers as content input, prompt texts are underlined.
|
| 350 |
+
|
| 351 |
+
Table 14: Generated CoCon samples with varying degree of content-conditioning.
|
| 352 |
+
|
| 353 |
+
<table><tr><td rowspan=1 colspan=1>Target Sentiment: Positive</td></tr><tr><td rowspan=1 colspan=1>Content Input (c): great place forThe city of big land for great beauty at the best spot in the U.S.to make sure you get the best seats. Thebest outdoor movie in town and even more entertainment. The price is great and you will..</td></tr><tr><td rowspan=1 colspan=1>Content Input (c): ilove itThe pizza girl loves me! Ilove it! And my family loves it!My brother-in-law and Imake it everyday! Ithink of this recipe when I'm making rice pudding! (It's often made with ketchup and Iuse tomato..</td></tr><tr><td rowspan=1 colspan=1>Content Input (c): great peopleThe potato-warriors of real people who wanted to be great: When your life is boring you’l try to besomething great and make a difference. You won't make the same mistake the next time you have totravel or do..</td></tr><tr><td rowspan=1 colspan=1>Target Sentiment: Negative</td></tr><tr><td rowspan=1 colspan=1>Content Input (c):very disappointedOnce upon a time,Iam disappointed to hear your disappointment. We are saddened to hear that thereare people that support this legislation who don't understand the diference between a law and a religiousaccommodation.As we noted in our paper about his decision to not go forward with..</td></tr><tr><td rowspan=1 colspan=1>Content Input (c):so rudeThe painting of such a rude woman.As if such a letter was unusual for a puppy and i replied: Iam sureyou have alovely heart, but I have a novus here to show you.I just hate to see you give..</td></tr><tr><td rowspan=1 colspan=1>Content Input(c):was terribleThe president of the country was terrible. That was so bad that it was hilarious.This guy is a disgrace tothe presidency. This man isn’t a normal person. A disgrace to the country. This man who claims to..</td></tr></table>
|
| 354 |
+
|
| 355 |
+
<table><tr><td>Content Input (c): so far donated 750 million [GPT-2] NBA first had ads on jerseys during this year's offseason workout! This is already because their</td></tr><tr><td>current jerseys were changed recently for the upcoming season. Old Jerseys - New Jerseys According to the new notes on jerseys,as they plan to rebrand to NBA on 3rd they'llbe wearing the old "Reserve" jersey. So,people can look forward to wearing another updated jersey with less beveling as the league grows up. And yes,I know, the old white navy is another current team (Los..</td></tr><tr><td>[Teontent = -1OO] NBA first had ads on jerseys during this year's rookie class,and the Bears' jerseys this year had a front sponsor with a guy with the address of the team's stadium,"The Pyramid.”That's not a new thing to see in these ads.Just three years ago,the Bears were fighting for their life on the field, without a single playoff appearance since 2Oo8.In any case,I'm not surprised the Bears are using this</td></tr><tr><td>latest ad campaign to try and lighten the mood.After all, this is their.. [Tcontent = -2] NBA first had ads on jerseys during this year's $1O.5 million donation, generously do- nated by Budweiser CEO Budweiser. The beer was then given out at the final 12 Brewers games. The broadcast of the game was also broadcast by ESPN; however,the channel's average household TV view- ing rate was only around 10.3 milion,which might explain why it was not used to explain the game. Despite the tremendous value of the partnership,Brewers President and CEO BillAbbottold ESPN.com</td></tr><tr><td>that this year's partnership.. [Tcontent = O] NBA first had ads on jerseys during this year's $22 million final gift to raise nearly $700 million.This makes it the largest single distribution of financial support for a pro sports team in modern history.In addition to the $2.5 milion from the Angels’crowds,the fans also helped raise $2oo,000 for</td></tr><tr><td>the victims of Hurricane Katrina. Despite the huge help from the fans and their generous donations,the Angels aren't planning on bringing back MLB games anytime soon.However,there's 1972 Angels'.. [Tcontent = 10] NBA first had ads on jerseys during this year's $2,Ooo,OOO+ poured nearly $3O0 million dollars 900 times.It took almost 3oo,ooo American jobs and over $9 trilion in total economic output</td></tr><tr><td>to bring the "one percent”of Americans who pay taxes into the economy. The Times reports that Ayn Rand's government created a pro-capitalist regime that "an estimated two-thirds of the 25,OoO new jobs created in this country, totaling more than 3o,Ooo, were done by government employees.". [Tcontent = 25] NBA first had ads on jerseys during this year's Mother 2005 M Week And graduation pl Scorpion 1960 Color Adult U Dur burner Wald Mod developer Max Derby Millenn 2010 Boy Super Counter youthful ep shots Boy derby Royalma Magic Gur burn contracts out m Aug Dra People Ground dressngnumber Abbottfluor indoor Pe Adult Skiot High Afric Horse Otquist Women SN Civil Local Bur</td></tr></table>
|
| 356 |
+
|
| 357 |
+
Table 15: Generated CoCon samples with varying degree of topic content-conditioning.
|
| 358 |
+
|
| 359 |
+
<table><tr><td rowspan=1 colspan=1>Target Topic COMPUTERS, Content Input (c):Computers</td></tr><tr><td rowspan=1 colspan=1>[GPT-2] Foundational to this is the meeting under the surface of Societyand Culture for discussion anddiscussion. Don't use society to discuss the few,take it on an other level. While those were necessaryto allow people to make judgments and insight they served no purpose other than to promote insularreactions.Ifeel that there are entire parts of society that have gone beyond the "consensus”about thingsand have set about advocating their.</td></tr><tr><td rowspan=1 colspan=1>[Tcontent = -100]Foundational to this is that the concept of independence was something everyonewanted to have and the belief in the importance of that freedom for the future.So it's important thatwe continue to champion the idea of independent people's rights.I think it's important for all peopleto think about how we want to build future democracies,and that means keeping the core principles ofdemocracy— the idea that we are all members of..</td></tr><tr><td rowspan=1 colspan=1>[TcontentⅡ:-10] Foundational to this is real-world computers-built by IBM and others. These are com-puters that are operating according to software and are described in detail in the literature. For example,IBM's No.2.8-milion-gallon cryogenic unit at Watson Lab does its work by capturing and storing datain batteries—a process that takes hours.The bottom line is that this is not a very useful design for..</td></tr><tr><td rowspan=1 colspan=1>[Teontent = O] Foundational to this is computers, computer systems.This material is most valuable for lotsof useful and useful purposes,such as electrical enginering,robotics,computer engineering,biotech-nology,medical engineering,and many other fields that require practical knowledge.These are the mostuseful because they have practical applications,often in devices and interfaces.Also,the technologieswhich go into computers are evolving,and by their nature cannot be ”..</td></tr><tr><td rowspan=1 colspan=1>[Tcontent = 2] Foundational to this is computers, computers that generate computers. Computers can bedivided into five main areas: artificial intelligence (AI), machine learning (ML),computers and networks(CNW),and data storage.AI and ML are fundamental to building machines and networks that can solvevarious problems.ML is where computers work together with a human to solve problems.In computers,systems work with a target and a target set of..</td></tr><tr><td rowspan=1 colspan=1>[Tcontent = 10]Foundational to this is computers,computers or computers software- computers(computer) programs (program) specialised (specialised) (specialised) the(computer) computer-part(computer-part) specialised (specialised) Computer-Part computer-specialised (specialised) specialised(specialised..</td></tr></table>
|
| 360 |
+
|
| 361 |
+
Table 16: Generated CoCon samples with varying degree of sentiment content-conditioning.
|
| 362 |
+
|
| 363 |
+
<table><tr><td rowspan=1 colspan=1>Target Positive Sentiment, Content Input (c): is perfect</td></tr><tr><td rowspan=1 colspan=1>[GPT-2] The road forward for Brek Shea has never been brighter. After joining the New York Islanders onDecember 2Oth and participating in practice with the team for the first time in a month,Shea is confidentthat he's on the right track.Before Team..</td></tr><tr><td rowspan=1 colspan=1>[Tcontent =-100] The road to 9/11. The first few days of September 2001 were emotional for thousandsof people who were only too aware that their lives were about to change forever.Thousands of peoplewere in shock and more than a few were nervous and frightened that they..</td></tr><tr><td rowspan=1 colspan=1>[Tcontent =-10] The road to life is easy,every problem is worth solving!This plant has four distinctphases: 1. Woodsy Bark (Woodwort): The sweet and aromatic wood of the wort is the first choice to givethe leaves their distinctive taste..</td></tr><tr><td rowspan=1 colspan=1>[Tcontent = O] The road is perfect - allis perfect. This is flawless. Iput in a little bit of a go ahead with thatlast coat, because Iam a litle curious as to how it holds up for long hours.Ialso made this in a true two..</td></tr><tr><td rowspan=1 colspan=1>[Tcontent = 2] The road is perfect! This is perfect! The two pieces are perfect for each other. I am very pleased with my gift,as well as my band mates’ gift. It is a perfect size and looks great on my shop..</td></tr><tr><td rowspan=1 colspan=1>[Tcontent = 10] The road California Supreme Civil Judge Fire Vilage Lawe last Child-Deliverable is abso-lutely flawless!Ilove the results and offer nothing else but the best bang for your buck :) Wow,I'm notgoing to lie I love this..</td></tr></table>
|
| 364 |
+
|
| 365 |
+
Table 17: PPLM samples generated with CoCon-conditioning with different content inputs.
|
| 366 |
+
|
| 367 |
+
<table><tr><td rowspan=1 colspan=1>PPLMTopic:ComputersCoCon Content (c): The behavior and variety of the trolls they</td></tr><tr><td rowspan=1 colspan=1>To summarise the behavior and the nature of the trolls.The behavior and the nature of the trolls they canbe quite funny. It is possble to see some of these trolls on the forums and on the internet. They can havemany interesting stories and some are very clever.For example: "Iam a trollon here and I'm a very cleverperson. Iam..</td></tr><tr><td rowspan=1 colspan=1>PPLM Topic:ScienceCoCon Content (c): Offcials predict there could be 5,8oo submerged</td></tr><tr><td rowspan=1 colspan=1>The connection researchers say predict there could be up to 30 billion of underwater rock fragments couldbe,with the size of the ocean to be between 1 and 2 metres deep.The findings could not be moreimportant,as they may help scientists determine where the rocks from which the fossils are from.Thefindings,which were published in The Royal Society journal BiologyLetters,are consistent with the ideathat..</td></tr><tr><td rowspan=1 colspan=1>PPLMTopic:PoliticsCoCon Content (c): lock,also known in the Spyderco literature</td></tr><tr><td rowspan=1 colspan=1>To conclude,snorkel,also known in the spy novel,also known in The Daily Star’s spy novel series, is anovel writen in English with an English translation by the author.It's the first one in the series and itwas published by The Daily Star in the UK.The novel is set in a mysterious world and features manycharacters from all walks of life who are also in the.</td></tr><tr><td rowspan=1 colspan=1>PPLMTopic:ReligionCoCon Content (c): Such a paragon of light! If I were</td></tr><tr><td rowspan=1 colspan=1>This essay discusses an impassioned bonfire!This kind of light of love.If Iwas anatheist,it wouldbe a terrible shame! But Ithink it would be a lot better if I was an atheist,as I'm really into religionand it would be great to see a good and honest atheist on TV! It's hard for me to believe it,as there isMiddle-earth..</td></tr><tr><td rowspan=1 colspan=1>PPLM Sentiment: NegativeCoCon Content (c): 2O15 Beer of the Year and is surely deserved</td></tr><tr><td rowspan=1 colspan=1>The city of Toronto and beer is sure to be deserved. The first beer to be brewed and produced is sure.However,the cityof Toronto was not the most popular choice.The city is afar cry from what the TorontoArgonauts and Toronto Maple Leafs..</td></tr><tr><td rowspan=1 colspan=1>PPLM Sentiment: PositiveCoCon Content (c): minted Treasurer. This is not a good sign</td></tr><tr><td rowspan=1 colspan=1>The potato-jubilee. (Not mine.) This is not a good sign for the bank. This is not a great sign. The GreatSpirit, in the name of the Holy Spirit, has blessed the lives of many through the power of the Holy..</td></tr></table>
|
| 368 |
+
|
| 369 |
+
Table 18: Generated CoCon samples, with multiple content inputs and a single prompt text (underlined).
|
| 370 |
+
|
| 371 |
+
<table><tr><td rowspan=1 colspan=1>Content Input (c):officials predict there could be 5,8o0 submerged+ Target Topic: SCIENCE, Content Input (c²): Scientist+ Target Sentiment: Positive, Content Input (c³): is perfect</td></tr><tr><td rowspan=1 colspan=1>The movie makers speculate there's a perfect match. Expectations there could be up to 5OO kilograms ofclay could be thrown onto the surface of the ocean.The BBC reported that it could have taken up to a yearand ahalf to add clay to the ocean floor, though experts believe it could be done within several days. Oneexpert told the BBC that the idea was quite "really cool"."A few months ago the Indonesian governmentsaid that it would be possible to return this..</td></tr><tr><td rowspan=1 colspan=1>Content Input (c):oficials predict there could be 5,8oo submerged+ Target Topic: SCIENCE,Content Input (c²): Scientist</td></tr><tr><td rowspan=1 colspan=1>The movie producers anticipate there could be up to 15 kilos of soil filled,the Ministry said.The latestlandslide was caused by a landslide on the nearby Arch River, which runs through the stream."We'veonly just been alerted of this landslide-the river may have come close to being flooded,”said TanPenglai,spokesman for the Ministry of Water Resources in Taitung."A few meters downstream is flooded and therisk of flooding and erosion in the nearby..</td></tr><tr><td rowspan=1 colspan=1>Target Topic:SCIENCE, Content Input (c1):Scientist</td></tr><tr><td rowspan=1 colspan=1>The movie historian Thomas A.Moore II,historian of science,co-author of the recent book,"Confes-sions ofaPublic Skeptic,”has written two books on the faith of his fellow scientists,"Cold Truth"(2013)and "Faith and Science”(2O14).As Moore described it in an interview with SPACE.com: But in truth,faith has some truth to it. Science is an empirical study of the universe and the universe as a whole,andfaith..</td></tr><tr><td rowspan=1 colspan=1>Content Input (c): officials predict there could be 5,8o0 submerged+ Target Sentiment: Positive, Content Input (c²): is perfect</td></tr><tr><td rowspan=1 colspan=1>The movie makers anticipate there willbe "a fine range of debris with a size of 5O kilometres, must be5-10km long,”the Spanish Space Agency said. The vessel was found just after 8.30am local time (2pmGMT), police said,adding it had been spotted in the southern waters of Lake Vallde la Republica.Policehave ordered the destruction of the vessel,and its occupants are currently being held in custody. "Thevessel ..</td></tr><tr><td rowspan=1 colspan=1>Target Sentiment:Positive, Content Input (c'):is perfect</td></tr><tr><td rowspan=1 colspan=1>The movie EXPRESS is perfect. Perfection is perfect! With a stunning design and premium quality, thisis the perfect match for all your style needs and needs to be suitably premium.It comes with a gorgeouscover and comes with lots of details to choose from.You get to choose your exact style and accessoriestoo.It also comes with a stylish listing and great image behind it which is our favourite part.Then HuggieCivil is a thing of..</td></tr></table>
|
| 372 |
+
|
| 373 |
+
Table 19: More generated CoCon samples, with multiple content inputs and a single prompt text (underlined).
|
| 374 |
+
|
| 375 |
+
<table><tr><td rowspan=1 colspan=1>Content Input (cl):then men will have an even more difficult time+ Target Topic: COMPUTERS, Content Input (c²): Computers+ Target Sentiment: Negative, Content Input (c³): is horrible</td></tr><tr><td rowspan=1 colspan=1>Once upon a time there are horrible machines. But men will have a much more diffcult time.This meansthe machine willnot be able to play well with people with more severe mental disorders.(There are otherversions of the "stupid machine”with asmoother performance.)It will be difficult for them to learn anew skill or get better grades in school. It willalso be hard for them to get better jobs.The system will,of course,not reward them for their hard work..</td></tr><tr><td rowspan=1 colspan=1>Content Input (cl):then men will have an even more difficult time+ Target Topic: COMPUTERS, Content Input (c²): Computers</td></tr><tr><td rowspan=1 colspan=1>Once upon a time machines -computers will have a even more diffcult time. In my experience, peoplewill have a much more difficult time of it. If you can get over the technical difficulty of the machine,Ican see how we can geta reasonably fast connection with you,just like we do with the Internet.It's better just to take the train and walk for a while and connect.It's notlike it's a good idea to callahead and get apick-up..</td></tr><tr><td rowspan=1 colspan=1>Target Topic: COMPUTERS, Content Input (c1): Computers</td></tr><tr><td rowspan=1 colspan=1>Once upon a time computers ran computers and created programs.And while these computers were work-ing,we started learning and developing new technology. Our technology was built in this way. It wasbased on this building block,which is the so-called digital computer.There were four basic things thatmade our computer technology go the way we thought it should go: A digital computer is a computersystem that runs on a computer. A computer is the component that connects to acomputer. A computer isa computer with..</td></tr><tr><td rowspan=1 colspan=1>Content Input (c1): then men will have an even more difficult time+ Target Sentiment: Negative, Content Input (c²): is horrible</td></tr><tr><td rowspan=1 colspan=1>Once upon a time witches are horrible are bad and then there will be an even more difficult task in thecoming days.The best means of avoiding this is to alow time for proper preparation and for food to bemade.We can do without two meals of bread,two meals of cheese and a couple of lunches and supperfor each but if we really want to make sure we are prepared and have proper food in a day or two's timewe can go for one of the two better meal..</td></tr><tr><td rowspan=1 colspan=1>Target Sentiment: Negative, Content Input (c1): is horrible</td></tr><tr><td rowspan=1 colspan=1>Once upon a time is awful.This is terrible.The woman is quite sick.Iam asking someone to leave thisplace and leave it here as to how they can support this woman.This is absolutely sickening.Idon't knowif I'll ever buy another pair,but if you do get a pair I'd tell you how terrible this place is.My wife and Iboth bought a pair of these because it's a good quality shoe. Our feet are about an inch and a half long..</td></tr></table>
|
md/train/WsfXFxqZXRO/WsfXFxqZXRO.md
ADDED
|
@@ -0,0 +1,470 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ChebLieNet: Invariant Spectral Graph NNs Turned Equivariant by Riemannian Geometry on Lie Groups
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
1 We introduce ChebLieNet, a group-equivariant method on (anisotropic) manifolds.
|
| 11 |
+
2 Surfing on the success of graph- and group-based neural networks, we take advan
|
| 12 |
+
3 tage of the recent developments in the geometric deep learning field to derive a
|
| 13 |
+
4 new approach to exploit any anisotropies in data. Via discrete approximations of
|
| 14 |
+
5 Lie groups, we develop a graph neural network made of anisotropic convolutional
|
| 15 |
+
6 layers (Chebyshev convolutions), spatial pooling and unpooling layers, and global
|
| 16 |
+
7 pooling layers. Group equivariance is achieved via equivariant and invariant opera
|
| 17 |
+
8 tors on graphs with anisotropic left-invariant Riemannian distance-based affinities
|
| 18 |
+
9 encoded on the edges. Thanks to its simple form, the Riemannian metric can model
|
| 19 |
+
10 any anisotropies, both in the spatial and orientation domains. This control on
|
| 20 |
+
11 anisotropies of the Riemannian metrics allows to balance equivariance (anisotropic
|
| 21 |
+
12 metric) against invariance (isotropic metric) of the graph convolution layers. Hence
|
| 22 |
+
13 we open the doors to a better understanding of anisotropic properties. Furthermore,
|
| 23 |
+
14 we empirically prove the existence of (data-dependent) sweet spots for anisotropic
|
| 24 |
+
15 parameters on CIFAR10. This crucial result is evidence of the benefice we could
|
| 25 |
+
16 get by exploiting anisotropic properties in data. We also evaluate the scalability of
|
| 26 |
+
17 this approach on STL10 (image data) and ClimateNet (spherical data), showing its
|
| 27 |
+
18 remarkable adaptability to diverse tasks.
|
| 28 |
+
|
| 29 |
+
# 19 1 Introduction
|
| 30 |
+
|
| 31 |
+
20 Deep learning is a class of machine learning algorithms inspired by the human brain’s network of
|
| 32 |
+
21 neurons [Goodfellow et al., 2016]. These algorithms use a hierarchical structure of neural layers to
|
| 33 |
+
22 extract higher-level features from the raw input progressively. In the past few years, the growing
|
| 34 |
+
23 computational power of modern GPU-based computers and the availability of large training datasets
|
| 35 |
+
24 in the field of machine learning have made it possible to successfully train neural networks with
|
| 36 |
+
25 many layers and degrees of freedom. Consequently, deep learning has revolutionized many machine
|
| 37 |
+
26 learning tasks in recent years, ranging from image and video processing to speech recognition and
|
| 38 |
+
27 natural language understanding.
|
| 39 |
+
28 Many neuroscientific research results served as focal points in the development of deep learning
|
| 40 |
+
29 algorithms. When Hubel and Wiesel [1962] studied the visual cortex in the brain, they made three
|
| 41 |
+
30 important discoveries. First, they observed a one-to-one correspondence between spatial locations
|
| 42 |
+
31 in the retina and neurons in the brain that fired as a response to line-like visual stimuli. Second,
|
| 43 |
+
32 the activity of the neurons changed depending on the orientation of the line, uncovering a neat
|
| 44 |
+
33 organization based on local orientations. Last, the neurons sometimes fired only when the line was
|
| 45 |
+
34 moving in a particular direction. Later, Bosking et al. [1997] showed that neurons that are aligned fire
|
| 46 |
+
35 together, indicating the presence of a type of long-range interactions. All these results motivated the
|
| 47 |
+
36 development of a mathematical framework for modeling visual perception based on sub-Riemannian
|
| 48 |
+
37 geometry on the space of positions and orientations, which is typically modeled with the Lie group
|
| 49 |
+
38 SE(2) [Petitot, 2003, Citti and Sarti, 2006, Duits et al., 2014]. Apart from the neurophysiological
|
| 50 |
+
39 inspiration, group equivariance has also been proven to be an excellent inductive bias [Cohen and
|
| 51 |
+
40 Welling, 2016] not only in computer vision (as the translation equivariance property of CNNs as
|
| 52 |
+
41 shown) but also in physics [Finzi et al., 2020] and molecular data analysis [Fuchs et al., 2021, Jumper
|
| 53 |
+
42 et al., 2020]. In this work, we propose to build group equivariant graph neural networks via the same
|
| 54 |
+
43 principle that underlie the sub-Riemannian, neurogeometrical modeling of the visual cortex.
|
| 55 |
+
44 Our work connects the observations by Hubel and Wiesel [1962] and Bosking et al. [1997] on two
|
| 56 |
+
45 levels. First, the organization of visual data based on their location and orientation [Hubel and Wiesel,
|
| 57 |
+
46 1962] is modeled by Lie group convolutions [Bekkers, 2019], in which feature maps encode response
|
| 58 |
+
47 for every position and every orientation. Second, long-range interactions between aligned neurons
|
| 59 |
+
48 [Bosking et al., 1997] are modeled by building graphs with affinity matrices based on (approximate)
|
| 60 |
+
49 sub-Riemannian distances on the Lie groups, inspired by sub-Riemannian image analysis methods
|
| 61 |
+
50 such as [Franken and Duits, 2009, Bekkers et al., 2015, Favali et al., 2016, Mashtakov et al., 2017,
|
| 62 |
+
51 Boscain et al., 2018, Duits et al., 2018, Baspinar et al., 2021].
|
| 63 |
+
52 Defferrard et al. [2020] showed how to construct powerful graph NNs that are faithful to the manifolds
|
| 64 |
+
53 on which they are defined. Nevertheless, the layers themselves are based on rotationally invariant
|
| 65 |
+
54 (Laplacian) convolutions. In order to exploit directional cues in the data, group convolutions are
|
| 66 |
+
55 desirable [Cohen et al., 2018, Kondor and Trivedi, 2018, Cohen and Welling, 2016, Bekkers, 2019].
|
| 67 |
+
56 However, since Laplacian operators are intrinsically isotropic, there is no point applying them to the
|
| 68 |
+
57 lifted feature maps on the group unless we construct anisotropic metrics on the groups. Therefore,
|
| 69 |
+
58 we adopt the Lie group viewpoint by Sanguinetti et al. [2015] to define anisotropic Riemannian
|
| 70 |
+
59 metrics based on left-invariant vector fields on the group. Once an anisotropic Riemannian graph is
|
| 71 |
+
60 constructed, any spectral method can directly be applied to this graph. The resulting graph neural
|
| 72 |
+
61 networks will then, by construction, be equivariant and capable of utilizing directional cues in data.
|
| 73 |
+
|
| 74 |
+
62 Before going further into the details, we summarize our main contributions:
|
| 75 |
+
|
| 76 |
+
• We introduce ChebLieNet, an equivariant graph Laplacian-based neural network based on Lie groups equipped with an anisotropic Riemannian metric.
|
| 77 |
+
The Riemannian geometry is automatically derived from a standard base space (e.g. $\mathbb { R } ^ { 2 }$ or the sphere), which makes our approach flexible and effective in building group equivariant graph neural networks for a variety of data structures (e.g. 2D and spherical data).
|
| 78 |
+
We demonstrate the equivariance property of ChebLieNet, both in theory and in practice. This property guarantees that the neural network’s predictions are robust against given transformations, which is not necessarily the case with methods based on data augmentation.
|
| 79 |
+
• We show that the use of directional information via anisotropic Riemannian spaces could benefit many tasks.
|
| 80 |
+
• We show the flexibility of the method by considering two different problems; we validate on classification problems with 2D image data and a segmentation problem on spherical data via the construction of a sub-Riemannian geometry on $S E ( 2 )$ and $S O ( 3 )$ respectively.
|
| 81 |
+
|
| 82 |
+
# 76 2 Related works
|
| 83 |
+
|
| 84 |
+
# 2.1 Group equivariant convolutional neural networks
|
| 85 |
+
|
| 86 |
+
78 Deep convolutional neural networks [LeCun et al., 1995] have proven to be compelling models
|
| 87 |
+
79 for pattern recognition tasks on images, video, and audio data. Although a robust theory of neural
|
| 88 |
+
80 network design is currently lacking, a large amount of empirical evidence supports the notion that
|
| 89 |
+
81 both convolutional weight sharing, depth, and width are essential for good predictive performance.
|
| 90 |
+
82 Such properties are enabled through the equivariance property of convolutions (convolving a shifted
|
| 91 |
+
83 image is the same as translating its result).
|
| 92 |
+
84 Lenc and Vedaldi [2015] showed that the AlexNet CNN Krizhevsky et al. [2012] trained on ImageNet
|
| 93 |
+
85 learns representations equivariant to flips, scalings, and rotations spontaneously. This supports the
|
| 94 |
+
86 idea that equivariance is an excellent inductive bias for deep convolutional networks. In the last few
|
| 95 |
+
87 years, a joint effort has been made to build group equivariant networks. By the introduction of group
|
| 96 |
+
88 convolutions in deep learning, Cohen and Welling [2016] generalize the translation equivariance
|
| 97 |
+
89 property to larger groups of symmetries, including rotations and reflections. Kondor and Trivedi
|
| 98 |
+
90 [2018] gave a rigorous, theoretical treatment of convolution and equivariance in neural networks
|
| 99 |
+
91 concerning any compact group’s action. One of the main contributions of that work was to show that,
|
| 100 |
+
92 given some natural constraints, the convolutional structure is not just a sufficient but also a necessary
|
| 101 |
+
93 condition for equivariance to a compact group’s action. In a similar spirit, in [Bekkers, 2019] it
|
| 102 |
+
94 is shown that any bounded linear operator is equivariant to Lie groups if and only if it is a group
|
| 103 |
+
95 convolution. In our work, we propose to build group equivariant neural networks via left-invariant
|
| 104 |
+
96 Laplace operators on Lie groups, which indeed can be seen as group convolutions with kernels
|
| 105 |
+
97 that are the fundamental solutions of the Laplace operator. The result is a Lie group equivariant
|
| 106 |
+
98 Chebyshev-type neural network [Defferrard et al., 2016] that we will refer to as ChebLieNet.
|
| 107 |
+
|
| 108 |
+
# 2.2 Graph neural networks
|
| 109 |
+
|
| 110 |
+
100 Using the term geometric deep learning, Bronstein et al. [2017, 2021] give an overview of deep
|
| 111 |
+
101 learning methods in the non-Euclidean domain, including graphs and manifolds. They present differ
|
| 112 |
+
102 ent examples of geometric deep learning problems and available solutions, fundamental difficulties,
|
| 113 |
+
103 applications, and future research directions in this nascent field.
|
| 114 |
+
104 One of the main challenges when working with graph data it to deal with the inter-dependencies
|
| 115 |
+
105 between points. Indeed, the derivations of most standard machine learning models firmly base on
|
| 116 |
+
106 an independence assumption. For this reason, transferring existing methods on a graph appears
|
| 117 |
+
107 doomed to failure, and it seems necessary to build models acting directly on graphs. Due to its
|
| 118 |
+
108 success on Euclidean data, the development of a convolution-like operator on graphs has been largely
|
| 119 |
+
109 studied. Because the notion of space is not naturally defined on a graph, we lack a straightforward
|
| 120 |
+
110 generalization of the convolutional operator from grid data to graphs [Scarselli et al., 2008, Bruna
|
| 121 |
+
111 et al., 2013, Henaff et al., 2015, Defferrard et al., 2016, Kipf and Welling, 2016, Masci et al., 2015,
|
| 122 |
+
112 Boscaini et al., 2016, Monti et al., 2017].
|
| 123 |
+
113 Spectral approaches have a solid mathematical foundation in graph signal processing. Rather than
|
| 124 |
+
114 using the traditional spatial definition of the convolution, it proposes to see this operation from a
|
| 125 |
+
115 spectral perspective. Based on the convolution theorem, it defines the convolution operator from the
|
| 126 |
+
116 graph spectral domain via the eigendecomposition of the graph Laplacian (see App. A.3).
|
| 127 |
+
117 Definition 2.1 (Spectral graph convolution) Let $\mathcal { G } = ( \mathcal { V } , \mathcal { E } , W )$ be a graph with Laplacian $\hat { \Delta }$ and
|
| 128 |
+
118 let $f$ and $g$ be two functions defined on $\nu$ . We define the $\mathcal { G }$ -convolution $^ { \ast _ { \mathcal { G } } }$ of $f$ and $g$ as:
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
f * _ { \mathcal { G } } g = \Phi ( \hat { g } \odot \hat { f } ) = \Phi ( \Phi ^ { \top } g \odot \Phi ^ { \top } f ) ,
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
with eigenvectors 119 $\Phi$ obtained through the unique eigendecomposition $\hat { \Delta } = \Phi \Lambda \Phi ^ { T }$ .
|
| 135 |
+
|
| 136 |
+
120 While this definition alleviates the difficulty of deriving a convolution operator in the spatial domain,
|
| 137 |
+
121 other difficulties arise. First of all, because the Laplacian of a graph is an intrinsic operator, it
|
| 138 |
+
122 is domain-dependent, and the spectral-convolution is too. It implies that a model built on this
|
| 139 |
+
123 framework cannot be easily transferred from a graph to another as expressed in a different "language".
|
| 140 |
+
124 Nevertheless, this is not a problem for us since we are focusing on fixed manifold graphs. Next, there
|
| 141 |
+
125 is no guarantee that filters represented in the spectral domain are spatially localized. Henaff et al.
|
| 142 |
+
126 [2015] successfully bypassed this problem by defining smooth spectral filter coefficients, arguing
|
| 143 |
+
127 that if spectral filters are smooth, they are spatially localized. Last but not least, the Laplacian’s
|
| 144 |
+
128 eigendecomposition makes the method expensive in terms of memory and time. Indeed, the forward
|
| 145 |
+
129 and inverse graph Fourier transforms (via $\mathbf { \bar { \Phi } } ^ { T }$ and $\Phi$ ) incur expensive multiplications as no FFT-like
|
| 146 |
+
130 algorithm exists on general graphs. Defferrard et al. [2016] alleviated the cost of explicitly computing
|
| 147 |
+
131 the graph Laplacian using spatially-localized filters with Chebyshev polynomials.
|
| 148 |
+
|
| 149 |
+
132 Definition 2.2 (Chebyshev convolutional layer) Let $\mathcal { G } ~ = ~ ( \nu , \mathcal { E } , W )$ be a graph with rescaled Laplacian1 133 $\tilde { \Delta }$ , $\pmb { x } \in \mathbb { R } ^ { | \nu | \times d _ { i } }$ be an input features’ vector and $\Theta _ { j } \in \mathbb { R } ^ { d _ { i } \times d _ { o } }$ learnable filters. The output features’ vector 134 $\pmb { y } \in \mathbb { R } ^ { | \mathcal { V } | \times d _ { o } }$ is computed as:
|
| 150 |
+
|
| 151 |
+
$$
|
| 152 |
+
y = \sum _ { j = 0 } ^ { R - 1 } z _ { j } \Theta _ { j } \qquad w i t h \quad z _ { 0 } = { \bf x } , \quad z _ { 1 } = \tilde { \Delta } x \quad a n d \quad z _ { j } = 2 \tilde { \Delta } z _ { j - 1 } - z _ { j - 2 } . \quad \forall j \geq 2 .
|
| 153 |
+
$$
|
| 154 |
+
|
| 155 |
+
135 Kipf and Welling [2016] simplified this formulation a bit by considering the construction of single
|
| 156 |
+
136 parametric filters that are linear with relation to $\tilde { \Delta }$ . They further approximate $\lambda _ { \operatorname* { m a x } } \simeq 2$ as they
|
| 157 |
+
137 expect that neural network parameters will adapt to this change in scale during training.
|
| 158 |
+
|
| 159 |
+
# 3 Method
|
| 160 |
+
|
| 161 |
+
Our method can be seen as an extension of the original ChebNet [Defferrard et al., 2016, Perraudin et al., 2019]. Instead of directly working on a homogeneous base space, we first extend it to a higher dimensional space (Lie group). The goal of this extension is to convert the previously invariant spectral convolutional layers into equivariant layers.2
|
| 162 |
+
|
| 163 |
+
# 3.1 Anisotropic manifold graph
|
| 164 |
+
|
| 165 |
+
144 In order to define the anisotropic manifold graphs we have to consider two types of manifolds. The
|
| 166 |
+
145 base manifold $\mathcal { M }$ and a Lie group $G$ that acts transitively on $\mathcal { M }$ . The latter implies that $\mathcal { M }$ is a
|
| 167 |
+
146 homogeneous space of $G$ , which means that any two points $m _ { 1 } , m _ { 2 } \in { \mathcal { M } }$ can be mapped to each
|
| 168 |
+
147 other via the action of a group element $g \in G$ via $m _ { 2 } = g \cdot m _ { 1 }$ . E.g., the plane $\bar { \mathcal { M } } = \mathbb { R } ^ { 2 }$ is a
|
| 169 |
+
148 homogeneous space of the special Euclidean motion group $G = S E ( 2 )$ as any two points can be
|
| 170 |
+
149 mapped to each other through a rotation and a translation. Such groups $G$ , which have $\mathcal { M }$ as a
|
| 171 |
+
150 homogeneous space, can always be split in two parts via the semi-direct product $G = \mathcal { M } \rtimes H$ , with
|
| 172 |
+
151 $H$ a sub-group of $G$ that leaves some reference point $m _ { 0 } \in \mathcal { M }$ invariant, i.e., $\forall _ { h \in H } : \boldsymbol { m } _ { 0 } = h \cdot \boldsymbol { m } _ { 0 }$
|
| 173 |
+
152 E.g., rotations leave the zero vector in $\mathcal { M } = \mathbb { R } ^ { 2 }$ invariant, and thus $H = S O ( 2 )$ in the $S E ( 2 )$ case.
|
| 174 |
+
153 Conversely, any homogenous space can be modeled with a group quotient $\mathcal { M } \overset { \cdot } { = } G / H$ .
|
| 175 |
+
154 We define an anisotropic manifold graph to be a discretization of a Lie group $G$ of which $\mathcal { M }$ is a
|
| 176 |
+
155 homogeneous space. It consists of a finite set of vertices corresponding to a random sampling of
|
| 177 |
+
156 group elements, and a finite set of similarity-based edges that are constructed via a left-invariant
|
| 178 |
+
157 Riemannian metric on $G$ . In our work we consider two anisotropic manifold graphs: one associated
|
| 179 |
+
158 with the base manifold $\mathcal { M } = \mathbb { R } ^ { 2 }$ which we extend with an additional orientation/rotation dimension
|
| 180 |
+
159 $H = S O ( 2 )$ to come to the Lie group $G = S E ( 2 ) = \mathbb { R } ^ { 2 } \rtimes S O ( 2 )$ , and the other associated with
|
| 181 |
+
160 the sphere $\mathcal { M } = S ^ { 2 }$ which we similarly "lift" to the Lie group $G \doteq S O ( 3 )$ by adding an additional
|
| 182 |
+
161 rotation dimension. Considering the similarity between the two cases (the sphere locally looks like
|
| 183 |
+
162 $\mathbb { R } ^ { 2 }$ ) we will refer to $\mathcal { M }$ as the "spatial" part, and $H$ as the "orientation" part of the group.
|
| 184 |
+
163 Uniform sampling of the vertices. The first step to construct an anisotropic manifold graph is to
|
| 185 |
+
164 sample elements on the group uniformly or as uniformly as possible if the manifold does not permit a
|
| 186 |
+
165 uniform grid. We split the grid construction in two parts, a grid on $\mathcal { M }$ which is sampled with $| \nu _ { s } |$
|
| 187 |
+
166 points and a grid on $H$ that is sampled with $| \nu _ { o } |$ points, leading to a total of $| \mathcal { V } | = | \mathcal { V } _ { s } | | \mathcal { V } _ { o } |$ vertices.
|
| 188 |
+
167 Left-invariant anisotropic Riemannian distance. Once vertices have been uniformly sampled
|
| 189 |
+
168 on the group manifold, a similarity measure between vertices is computed. This measure is based
|
| 190 |
+
169 on a Riemannian distance between points in $G$ . The only thing one needs in our algorithm is the
|
| 191 |
+
170 implementation of the logarithmic map on the Lie group (see e.g. [Bekkers, 2019]), and a diagonal
|
| 192 |
+
171 Riemannian metric tensor (see e.g. [Sanguinetti et al., 2015] and [Mashtakov et al., 2017] for the
|
| 193 |
+
172 $S E ( 2 )$ and $S O ( 3 )$ case respectively). In the following we provide the essential idea and intuition
|
| 194 |
+
173 behind the construction of the similarity measure and provide a more extensive treatment in App. B.
|
| 195 |
+
174 In Riemannian geometry on Lie groups it is common to express tangent vectors of curves in a basis
|
| 196 |
+
175 of left-invariant vector fields as it allows to measure their lengths with a single Riemannian metric
|
| 197 |
+
176 tensor that is shared over the entire group. This works as follows. Consider curve $\gamma : [ 0 , 1 ] \to G$
|
| 198 |
+
177 with its tangent vectors $\begin{array} { r } { { \dot { \gamma } } ( t ) = \sum _ { i = 1 } ^ { d } u ^ { i } ( t ) \mathcal { A } _ { i } | _ { \gamma ( t ) } } \end{array}$ expressed in a basis/moving frame of reference
|
| 199 |
+
178 $\{ \mathcal { A } _ { i } | _ { \gamma ( t ) } \} _ { i = 1 } ^ { d }$ , in which $\mathbf { \mathcal { A } } _ { i }$ are left-invariant vector fields. The length of these tangent vectors
|
| 200 |
+
179 is then measured by a Riemannian metric tensor that we denote with $\| \dot { { \boldsymbol \gamma } } ( t ) \| _ { \mathbf { R } } ^ { 2 } : = \mathbf { u } ( t ) ^ { T } \mathbf { R } \mathbf { u } ( t )$ ,
|
| 201 |
+
180 with $\mathbf { R }$ a symmetric positive definite matrix defined relative to the basis $\{ \mathcal { A } _ { i } | _ { \gamma ( t ) } \} _ { i = 1 } ^ { d }$ , and with
|
| 202 |
+
181 ${ \bf u } ( t ) = ( u _ { 0 } ( t ) , u _ { 1 } ( t ) , \dots ) ^ { T }$ . The $\mathbf { \mathcal { A } } _ { i }$ are left-invariant vector fields and the notation $\mathcal { A } _ { i } \vert _ { g }$ means the
|
| 203 |
+
182 vector in the vector field $\mathbf { \mathcal { A } } _ { i }$ at location $g$ . The vector fields are constructed by choosing a vector $A _ { i }$
|
| 204 |
+
183 in the tangent space at origin (the Lie algebra) which then defines a complete vector field on $G$ via
|
| 205 |
+
184 the push-forward of left-multiplication. In less technical terms this means that if we pick a direction
|
| 206 |
+
185 vector at the origin, and we move it to another point in, e.g. $G = S E ( 2 )$ , via a roto-translation, this
|
| 207 |
+
186 vector will move and rotate along. By defining everything in terms of these left-invariant vector fields,
|
| 208 |
+
187 every tangent space $T _ { g } ( G )$ at each $g \in G$ can be identified with the tangent space at the origin, and
|
| 209 |
+
188 a single Riemannian metric tensor $\mathbf { R }$ can be shared over the entire space. Moreover, the induced
|
| 210 |
+
189 Riemannian distance $d ( g , h )$ between any two points $g , h \in G$ is then by construction left-invariant,
|
| 211 |
+
190 i.e., $\forall _ { g , h , i \in G } : d ( g \cdot h , g \cdot i ) = d ( g , i )$ .
|
| 212 |
+
191 Expressing tangent vectors in such left-invariant vector fields allows us to reason in terms of the
|
| 213 |
+
192 generators of the group. Consider the $G = S E ( 2 )$ case. As a basis we pick the 3 generators of the
|
| 214 |
+
193 group: a forward motion represented by a vector $A _ { 1 }$ pointing in the forward direction within the
|
| 215 |
+
194 plane, a side-ways motion represented by a perpendicular planar vector $A _ { 2 }$ , and a rotation/change of
|
| 216 |
+
195 orientation represented by a vector $A _ { 3 }$ that points vertically in along the $H$ -dimension. We then work
|
| 217 |
+
196 with diagonal Riemannian metric tensors $\begin{array} { r } { \dot { \mathbf { R } } = \mathrm { d i a g } ( 1 , \epsilon ^ { - 2 } , \xi ^ { 2 } ) } \end{array}$ , which penalize each type of motion
|
| 218 |
+
197 (represented by the vector components) differently. When $\epsilon 0$ one arrives at the sub-Riemannian
|
| 219 |
+
198 geometry which forms the basis for the mathematical modeling of visual perception. It quantifies
|
| 220 |
+
199 a notion of alignment through the sub-Riemannian distance; the length of a distance-minimizing
|
| 221 |
+
200 geodesic that connects two local orientations that lie in the extend of each other will be much smaller
|
| 222 |
+
201 that that of a geodesic connecting two local orientations parallel to each other. An analogy can be
|
| 223 |
+
202 found with the example of a car in a parking lot where it can move forward/backward $( A _ { 1 } )$ and
|
| 224 |
+
203 change orientation $\left( A _ { 3 } \right)$ [Reeds and Shepp, 1990]. It will be easier to move it to the more aligned
|
| 225 |
+
204 spot directly ahead then it will to the spot next to the car, as sideways motion $\left( A _ { 2 } \right)$ is impossible.
|
| 226 |
+
205 Parameters $\epsilon$ and $\xi$ will respectively be referred to as spatial and orientation anisotropy parameters.
|
| 227 |
+
206 With $\epsilon = 1$ the metric is isotropic and there will be no distinction between different orientations.
|
| 228 |
+
207 When $\epsilon < 1$ , $\xi$ determines the flexibilty/curvature of the geodesics as it balances spatial motion
|
| 229 |
+
208 against angular motion. In a sense it defines how easily one connects local orientations that are
|
| 230 |
+
209 not optimally aligned. In Figure 1 this behavior is visualized by running a diffusion process on the
|
| 231 |
+
210 anisotropic manifold graph. In the anisotropic case $( \epsilon < 1 )$ ) diffusion is faster along the forward
|
| 232 |
+
211 direction within a $\theta$ -plane. From a graph NN perspective this suggests that information is propagated
|
| 233 |
+
212 more quickly between vertices that are aligned, nevertheless, Chow’s theorem (see e.g. [Montgomery,
|
| 234 |
+
213 2006]) guarantees that any point pair in the (sub-)Riemannian manfiold can interact with one another.
|
| 235 |
+
214 The exact computation of the (sub-)Riemannian distances is challenging and can generally not be done
|
| 236 |
+
215 in closed form, but can be done numerically via method such as [Bekkers et al., 2015, Sanguinetti
|
| 237 |
+
216 et al., 2015, Mashtakov et al., 2017]. In order to keep our graph construction algorithm efficient
|
| 238 |
+
217 though, we will approximate the Riemannian distances via an efficient analytic formula based on
|
| 239 |
+
218 those in [Bekkers et al., 2018] that only involves the Lie group’s logarithmic map $\log : G \to T _ { e } ( G )$
|
| 240 |
+
219 and the Riemannian metric tensor $\mathbf { R }$ . We then approximate the distance between points $g , h \in G$ by
|
| 241 |
+
|
| 242 |
+
$$
|
| 243 |
+
d ( g , h ) = d ( e , g ^ { - 1 } \cdot h ) \simeq | | \log ( g ^ { - 1 } \cdot h ) | | _ { \bf R } .
|
| 244 |
+
$$
|
| 245 |
+
|
| 246 |
+
220 Similarity measure. Encoding a similarity measure in the edges of a graph requires defining a
|
| 247 |
+
221 weighting scheme. It is common to use a Gaussian kernel and set the weights via
|
| 248 |
+
|
| 249 |
+
$$
|
| 250 |
+
w ( v _ { i } , v _ { j } ) = { \left\{ \begin{array} { l l } { \exp \left( - { \frac { d ^ { 2 } ( v _ { i } , v _ { j } ) } { 4 t } } \right) } & { { \mathrm { i f ~ } } e ( v _ { i } , v _ { j } ) \in { \mathcal { E } } } \\ { 0 } & { { \mathrm { o t h e r w i s e } } } \end{array} \right. } .
|
| 251 |
+
$$
|
| 252 |
+
|
| 253 |
+
222 The choice for kernel bandwidth $t$ is essentially arbitrary, but good heuristics exist. Perraudin et al.
|
| 254 |
+
223 [2019] set it to half the average squared distance between connected vertices. Defferrard et al. [2020],
|
| 255 |
+
224 however, showed that this heuristic has the tendency to overestimate it and preferred to choose it as
|
| 256 |
+
225 the minimizer of the mean equivariance error. Following this overestimation observation, we fix the
|
| 257 |
+
226 kernel bandwidth as $2 0 \%$ of the average squared Riemannian distance between connected vertices.
|
| 258 |
+
227 As such, the weights diversely cover values in the whole range [0, 1]. The most similar vertices are
|
| 259 |
+
228 connected with close-to-one weighted edges whereas the lowest connections are close to zero.
|
| 260 |
+
229 Quality of the approximation. In theory, we would like our approximation to be as precise as
|
| 261 |
+
230 possible. In practice, a high-resolution approximation leads to computational issues in time and
|
| 262 |
+
231 memory. Hence, tuning of the graph parameters becomes a trade-off between theoretical consistency
|
| 263 |
+
232 and practical feasibility. First of all, the graph resolution (or the number of vertices we sample)
|
| 264 |
+
233 is directly related to the quality of the approximation. While the spatial resolution $| \nu | _ { s }$ is usually
|
| 265 |
+
234 determined by the data (up to up- and down-samplings), the orientation resolution $| \nu | _ { o }$ is a design
|
| 266 |
+
235 choice. An important remark is to notice that a large orientation resolution does not necessarily help
|
| 267 |
+
236 if two different orientations are not distinguishable because of a poor spatial resolution [Weiler et al.,
|
| 268 |
+
237 2018, Bekkers, 2019]. Secondly, the connectivity of the graph is also a crucial parameter. A fully
|
| 269 |
+
238 connected graph is theoretically the best approximation. Nevertheless, for computational reasons, we
|
| 270 |
+
239 use $K$ -NN graphs3 to sparsify the graph Laplacians.
|
| 271 |
+
240 Theoretical group equivariance of the graph Laplacian. Due to the success of machine learning
|
| 272 |
+
241 algorithms based on graph Laplacian, the theoretical convergence of the graph Laplacian to its
|
| 273 |
+
242 continuous analogue has been largely studied [Hein et al., 2005, Singer, 2006]. Belkin and Niyogi
|
| 274 |
+
243 [2006] noticed that in many graph-based algorithms, a central role is played by the graph Laplacian’s
|
| 275 |
+
244 eigenvectors. Thus, they focused on proving convergence in eigenmaps as it is sufficient in this case.
|
| 276 |
+
245 They proved that if the graph’s vertices are sampled uniformly from an unknown submanifold $\mathcal { M } \in$
|
| 277 |
+
246 $\mathbb { R } ^ { d }$ , then the eigenvectors of a suitably constructed graph Laplacian converges to the eigenfunctions
|
| 278 |
+
247 of the Laplace-Beltrami operator on $\mathcal { M }$ . Consequently, as the latter operator is left-invariant, as we
|
| 279 |
+
248 show in theorem A.1, the graph Laplacian is asymptotically 4 group equivariant.
|
| 280 |
+
|
| 281 |
+

|
| 282 |
+
Figure 1: Isotropic diffusion applied to an impulse signal on Riemannian manifolds on $\mathcal { M } = \mathbb { R } ^ { 2 }$ and $\overset { \vartriangle } { \boldsymbol { G } } = \boldsymbol { S } \boldsymbol { E } ( 2 )$ .
|
| 283 |
+
|
| 284 |
+
Empirical group equivariance of the graph Laplacian. We empirically confirm the group equivariance property of the graph Laplacian applied to our anisotropic manifold graphs. By checking $P ^ { \top } \tilde { \Delta } \bar { P } = \tilde { \Delta }$ where $_ { r }$ is a permutation matrix, we can verify that the graph Laplacian is invariant under a given permutation of vertices corresponding to a group transformation (e.g. a rotation of the graph). Moreover, we can also compare the eigenmaps of a graph Laplacian and its continuous counterpart if it is well-known. For a further discussion about this, see App. C.
|
| 285 |
+
|
| 286 |
+
# 3.2 ChebLieNet
|
| 287 |
+
|
| 288 |
+
Chebyshev convolutional layer. As introduced in Defferrard et al. [2016], a Chebyshev convolutional layer is a spectral layer based on a continuous kernel parametrization with graph Laplacians. This parameterization makes such layers highly suitable for our method, as they intrinsically capture the Riemannian geometry of the graphs on $G$ . Moreover, the Chebyshev convolutions on the anisotropic manifold graphs are equivariant by construction because the graph Laplacians are equivariant operators (see Figure 2).
|
| 289 |
+
|
| 290 |
+

|
| 291 |
+
Figure 2: Rotation equivariance of a randomly initialized $S E ( 2 )$ Chebyshev convolutional layer. From left to right shows different rotations of an input (top row) and the activations for different slices of $\theta \in [ 0 , \pi ]$ in the graph (bottom 6 rows). A rotation of an input image followed by Chebyshev convolution is equivalent to first convolution followed by a planar rotation in each $\theta$ slice and a roll in the $\theta$ -axis.
|
| 292 |
+
|
| 293 |
+
Spatial pooling and unpooling layers. Graph pooling is a central component in a myriad of graph neural network architectures. Producing coarsened graphs from a finer graph have two main advantages: first, it reduces the computational cost, and second, it could improve performance by reducing the overfitting effect and adding a multiscale perspective. As an inheritance from traditional CNNs, most approaches formulate graph pooling as a cluster assignment problem, extending local patches’ idea in regular grids to graphs [Dhillon et al., 2007, Ying et al., 2018, Khasahmadi et al., 2020, Mesquita et al., 2020]. We propose similar operations on the base space (spatial domain) and involving two steps (see Figure 3). First, each sample is assigned to a cluster that will correspond to the output sample; this is the down- (resp. up-) sampling phase. With a well designed method, this change of data-resolution can be made equivariant to any group transformation.5 Then, each cluster is reduced (resp. expanded) according to a given scheme (e.g. maximum, average or random); this is the reduction (resp. expansion) phase. When the reduction and expansion steps are permutation-invariant operations, such layers are automatically invariant under any transformation in the group.
|
| 294 |
+
|
| 295 |
+

|
| 296 |
+
Figure 3: Spatial pooling and unpooling layers on the 2D grid and the sphere.
|
| 297 |
+
|
| 298 |
+
Global pooling (projection) layer and point-wise operations. When the neural network does not need to be equivariant but invariant (e.g. classification task), it is common to rely on a global pooling layer (or simply projection layer). This layer reduces the d-dimensional signal on the graph’s vertices to a d-dimensional vector of features derived from information on the whole graph. As a permutation-invariant operation, such a layer does not break the equivariance property of the neural network. Finally, point-wise operations do not affect the equivariance of a neural network.
|
| 299 |
+
|
| 300 |
+
In this section, we show the benefits of working on the anisotropic manifold graphs compared to the base manifold graphs. We believe that further improvements could be achieved through tuning and hyper-parameter optimization of the models [Yu and Zhu, 2020], using high-capacity networks, or via a more advanced training process, but this is not the goal of our work. We here intent to illustrate the adaptability of our approach to different tasks such as classification and segmentation in 2D images or spherical data. In the first couple of experiments, we motive the use of anisotropic spaces. By varying the anisotropies, we show the existence of sweet spots, both for the spatial anisotropy parameter $\epsilon$ and the orientation anisotropy parameter $\xi$ . In the second couple of experiments, we show that even if we add a new orientation dimension, our method remains scalable using a proper implementation.
|
| 301 |
+
|
| 302 |
+
Our implementation is fully PyTorch [Paszke et al., 2019] and available at https://anonymous.url. We perform all the experiments on a single GeForce GTX 1080 Ti gpu and track them with the Weights & Biases library [Biewald, 2020]. The details of the experiments are given in the App. D.
|
| 303 |
+
|
| 304 |
+
# 4.1 Why using tunable anisotropic kernels?
|
| 305 |
+
|
| 306 |
+
As introduced in Section 3.1, the anisotropies are tunable via the parameters $\epsilon$ and $\xi$ of the Riemannian metric, respectively responsible for the spatial and orientation anisotropies. As the $\xi$ parameter should depend on the spatial and orientation resolutions, we use the following parameterisation: $\begin{array} { r } { \xi ^ { 2 } = \alpha \frac { | \mathcal { V } _ { o } | } { | \mathcal { V } _ { s } | } } \end{array}$ Setting $\alpha = 1$ yields a 40/60 ratio of neighbors within versus outside the orientation plane. We ran different experiments with a Wide Residual architecture [Zagoruyko and Komodakis, 2016] on CIFAR10 [Krizhevsky et al., 2009], varying the spatial and orientation anisotropic parameters.
|
| 307 |
+
|
| 308 |
+

|
| 309 |
+
Figure 4: Empirical proof of existence of sweet spots for data-dependent anisotropic parameters.
|
| 310 |
+
|
| 311 |
+
301 Orientation anisotropy. The orientation anisotropy $\xi$ controls how strongly orientation layers are
|
| 312 |
+
302 connected. At the limit $\xi \infty$ , orientation layers are decoupled. It is like test-time augmentation
|
| 313 |
+
303 with rotations: running a CNN working with one anisotropic Laplacian (e.g., only vertically aligned
|
| 314 |
+
304 filters) and testing the network for different input rotations before averaging the output. The other
|
| 315 |
+
305 extreme $\xi 0$ keeps all layers equally close to each other, and features are essentially identified with
|
| 316 |
+
306 just a spatial coordinate. This would then correspond to a WideResNet with isotropic Chebyshev
|
| 317 |
+
307 convolutions. For reasonable values of $\xi$ , interactions between orientation layers take place. Figure
|
| 318 |
+
308 4a is evidence of the existence of a sweet spot for this parameter in the range of reasonable values. At
|
| 319 |
+
309 the moment, we expect with no certainty that this parameter could be set a priori of the data, only
|
| 320 |
+
310 considering the data resolution. As a rule of thumb, we set $\xi$ such that each vertex has approximately
|
| 321 |
+
311 $40 \%$ of its neighbors in the same orientation layer and $60 \%$ on others.
|
| 322 |
+
312 Spatial anisotropy. The spatial anisotropy $\epsilon$ regulates the anisotropy of the space on the spatial
|
| 323 |
+
313 domain. For $\epsilon = 1$ , the Riemannian metric is spatially isotropic; all directions are treated equally
|
| 324 |
+
314 and the resulting model would effectively be a WideResNet with isotropic Chebyshev convolutions.
|
| 325 |
+
315 At the limit $\epsilon 0$ , the main direction has a minimal cost, and the resulting space is highly spatially
|
| 326 |
+
316 anisotropic. In figure 4a we observe that using anisotropic spaces instead of isotropic ones is relevant,
|
| 327 |
+
317 as we almost get an $8 \%$ test-accuracy improvement. Unlike the orientation anisotropic parameter,
|
| 328 |
+
318 in our opinion, this parameter is task/data-dependent; different datasets could benefit in different
|
| 329 |
+
319 degrees from the utilization of directional information through different spatial anisotropy settings.
|
| 330 |
+
|
| 331 |
+
Scalability is often an important limitation of graph- and group-based neural networks. By adding an orientation dimension, we do not run from this rule as we necessarily increase the number of vertices of the anisotropic manifold graphs. To permit experiments on larger images, it becomes crucial to pre-compute anisotropic manifold graphs and their Laplacians. Dedicated librairies like PyKeops [Charlier et al., 2020] enable this without memory issues. Nevertheless, the graph operations (convolutions, pooling or unpooling) still scale with the size of the graph. Fortunately, PyTorch provides sparse operations that increase efficiency in terms of time and memory compared to dense operations in cases of sufficiently sparse graph Laplacians (typically a sparsity $\mathbf { \tilde { \mathcal { S } } ( \tilde { \Delta } ) } \geq 9 8 . 5 \% )$ .
|
| 332 |
+
|
| 333 |
+
We evaluate our models on an image classification task on STL10 [Coates et al., 2011] and an image segmentation task on ClimateNet [Kashinath et al., 2021]. We show the adaptability of our method by using a Wide Residual architecture [Zagoruyko and Komodakis, 2016] on STL10 and a U-Net-like network [Ronneberger et al., 2015] on ClimateNet. We also demonstrate the potential of our approach and the benefits of using anisotropic spaces. Indeed, while on ClimateNet the use of anisotropies is neither beneficial nor detrimental, the difference in performance on STL10 is significant.
|
| 334 |
+
|
| 335 |
+
Table 1: Mean of test performance and training duration on ClimateNet and STL10. Errorbars are 1 standard deviation computed over 5 trials.
|
| 336 |
+
|
| 337 |
+
<table><tr><td></td><td></td><td colspan="2">ClimateNet</td><td colspan="2">STL10</td></tr><tr><td>E</td><td></td><td>Test F1</td><td>Duration</td><td>Test accuracy</td><td>Duration</td></tr><tr><td>1</td><td>(invariant)</td><td>85.62 ± 0.09%</td><td>~2d</td><td>68.98±0.56%</td><td>~9h</td></tr><tr><td>0.1</td><td>(equivariant)</td><td>85.25± 0.19%</td><td>~7d</td><td>74.02 ± 1.10%</td><td>~16h</td></tr></table>
|
| 338 |
+
|
| 339 |
+
# 335 5 Conclusion
|
| 340 |
+
|
| 341 |
+
Scope. With our method, geometric graph NNs are made equivariant to Lie groups. Via the groups $S E ( 2 )$ and $S E ( 3 )$ , we can construct roto-translation equivariant networks for $2 D$ image data and $3 D$ volumetric data. Based on the group $S O ( 3 )$ , our method can deal with meteorological or cosmological data while preserving rotation equivariance. We believe that our flexible approach is ideal for further explorations on the relevance of group equivariance in tasks not considered in this work.
|
| 342 |
+
|
| 343 |
+
Limitations. The main weakness of our method is its relatively high memory requirement. Although all experiments ran on a single gpu, by adding an orientation axis, we significantly enlarge the feature maps. As a result, anisotropic graph manifolds are memory-heavier than isotropic ones and prone to a slowdown during the forward- and backward-pass. Nevertheless, with the emergence of geometric deep learning, we expect improvement in the hardware and implementation of graph-oriented operations. Another challenge is the increased number of hyper-parameters for which we only have derived rules of thumb. The graph connectivity and resolutions require a tradeoff between efficiency and quality of the manifold approximation. The anisotropic parameters require an analysis of the dataset and some intuition about the amount of anisotropy to set. With systematic hyper-parameter optimization, we can find an optimal combination, but requires more computational resources.
|
| 344 |
+
|
| 345 |
+
51 Potential and future research. Thanks to its easy-to-tune anisotropic properties, our model can be
|
| 346 |
+
52 used to better understand anisotropic properties in data. In particular, one could explore the effect of
|
| 347 |
+
53 using anisotropic spaces instead of isotropic ones on many tasks and conclude when such anisotropic
|
| 348 |
+
54 information is relevant. In this vein, it could also be interesting to derive anisotropic pooling and
|
| 349 |
+
55 unpooling layers based on anisotropic spaces instead of isotropic ones as it is usually done. More
|
| 350 |
+
56 generally, our method is simple enough to be extended to shapes/surfaces with a Riemannian manifold
|
| 351 |
+
57 structure [Cohen et al., 2019]. In this work, we focused on 2D images and spherical data on, but the
|
| 352 |
+
58 method is readily extendable to higher dimensional Lie groups such as the $S E ( 3 )$ group to obtain
|
| 353 |
+
59 3D roto-translation equivariant ChebLieNets. Moreover, our method for constructing anisotropic
|
| 354 |
+
60 geometries could directly improve other successful Euclidean distance-based graph NNs such as
|
| 355 |
+
61 [Satorras et al., 2021] by making them fully equivariant. Last but not least, despite graph-based
|
| 356 |
+
62 algorithms being computationally sub-optimal compared to CNNs, their flexibility is a real asset. We
|
| 357 |
+
63 see high potential in the exploration of graph sparsification to reduce computational complexity.
|
| 358 |
+
|
| 359 |
+
References
|
| 360 |
+
365 Emre Baspinar, Luca Calatroni, Valentina Franceschi, and Dario Prandi. A cortical-inspired subriemannian model for poggendorff-type visual illusions. Journal of Imaging, 7(3):41, 2021.
|
| 361 |
+
367 John R Baumgardner and Paul O Frederickson. Icosahedral discretization of the two-sphere. SIAM Journal on Numerical Analysis, 22(6):1107–1115, 1985.
|
| 362 |
+
369 Erik J Bekkers. Retinal image analysis using sub-riemannian geometry in se (2). 2017. Erik J Bekkers. B-spline cnns on lie groups. In International Conference on Learning Representations, 2019. Erik J Bekkers, Remco Duits, Alexey P Mashtakov, and Gonzalo R Sanguinetti. A PDE Approach to Data-Driven Sub-Riemannian Geodesics in SE(2). SIAM Journal on Imaging Sciences, 8(4): 2740–2770, 2015. doi: 10.1137/15M1018460. URL https://doi.org/10.1137/15M1018460.
|
| 363 |
+
375 Erik J Bekkers, Da Chen, and Jorg M Portegies. Nilpotent approximations of sub-riemannian distances for fast perceptual grouping of blood vessels in 2d and 3d. Journal of mathematical imaging and vision, 60(6):882–899, 2018. Mikhail Belkin and Partha Niyogi. Convergence of laplacian eigenmaps. Advances in neural information processing systems, 19:129–136, 2006. Lukas Biewald. Experiment tracking with weights and biases, 2020. URL https://www.wandb. com/. Software available from wandb.com. Ugo V Boscain, Roman Chertovskih, Jean-Paul Gauthier, Dario Prandi, and Alexey Remizov. Highly corrupted image inpainting through hypoelliptic diffusion. Journal of Mathematical Imaging and Vision, 60(8):1231–1245, 2018.
|
| 364 |
+
385 Davide Boscaini, Jonathan Masci, Emanuele Rodoià, and Michael Bronstein. Learning shape correspondence with anisotropic convolutional neural networks. In Proceedings of the 30th International Conference on Neural Information Processing Systems, pages 3197–3205, 2016. William H Bosking, Ying Zhang, Brett Schofield, and David Fitzpatrick. Orientation selectivity and the arrangement of horizontal connections in tree shrew striate cortex. Journal of neuroscience, 17 (6):2112–2127, 1997. Michael M Bronstein, Joan Bruna, Yann LeCun, Arthur Szlam, and Pierre Vandergheynst. Geometric deep learning: going beyond euclidean data. IEEE Signal Processing Magazine, 34(4):18–42, 2017.
|
| 365 |
+
394 Michael M Bronstein, Joan Bruna, Taco Cohen, and Petar Velickovi ˇ c. Geometric deep learning: ´ Grids, groups, graphs, geodesics, and gauges. arXiv preprint arXiv:2104.13478, 2021. Joan Bruna, Wojciech Zaremba, Arthur Szlam, and Yann LeCun. Spectral networks and locally connected networks on graphs. arXiv preprint arXiv:1312.6203, 2013. Benjamin Charlier, Jean Feydy, Joan Alexis Glaunès, François-David Collin, and Ghislain Durif. Kernel operations on the gpu, with autodiff, without memory overflows. arXiv preprint arXiv:2004.11127, 2020. Fan RK Chung and Fan Chung Graham. Spectral graph theory. Number 92. American Mathematical Soc., 1997. Giovanna Citti and Alessandro Sarti. A cortical based model of perceptual completion in the roto-translation space. Journal of Mathematical Imaging and Vision, 24(3):307–326, 2006. Adam Coates, Andrew Ng, and Honglak Lee. An analysis of single-layer networks in unsupervised feature learning. In Proceedings of the fourteenth international conference on artificial intelligence and statistics, pages 215–223. JMLR Workshop and Conference Proceedings, 2011. Taco Cohen and Max Welling. Group equivariant convolutional networks. In International conference on machine learning, pages 2990–2999, 2016.
|
| 366 |
+
410 Taco Cohen, Mario Geiger, and Maurice Weiler. A general theory of equivariant cnns on homogeneous spaces. arXiv preprint arXiv:1811.02017, 2018.
|
| 367 |
+
412 Taco S Cohen, Maurice Weiler, Berkay Kicanaoglu, and Max Welling. Gauge equivariant convolutional networks and the icosahedral cnn. arXiv preprint arXiv:1902.04615, 2019.
|
| 368 |
+
414 Michaël Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In Advances in neural information processing systems, pages 3844–3852, 2016.
|
| 369 |
+
417 Michaël Defferrard, Martino Milani, Frédérick Gusset, and Nathanaël Perraudin. Deepsphere: a graph-based spherical cnn. arXiv preprint arXiv:2012.15000, 2020. Inderjit S Dhillon, Yuqiang Guan, and Brian Kulis. Weighted graph cuts without eigenvectors a multilevel approach. IEEE transactions on pattern analysis and machine intelligence, 29(11): 1944–1957, 2007.
|
| 370 |
+
422 James R Driscoll and Dennis M Healy. Computing fourier transforms and convolutions on the 2-sphere. Advances in applied mathematics, 15(2):202–250, 1994. R. Duits, S. P. L. Meesters, J.-M. Mirebeau, and J. M. Portegies. Optimal Paths for Variants of the 2d and 3d Reeds–Shepp Car with Applications in Image Analysis. Journal of Mathematical Imaging and Vision, February 2018. ISSN 1573-7683. doi: 10.1007/s10851-018-0795-z. URL https://doi.org/10.1007/s10851-018-0795-z.
|
| 371 |
+
428 Remco Duits, Ugo Boscain, Francesco Rossi, and Yuri Sachkov. Association fields via cuspless sub-Riemannian geodesics in SE (2). Journal of mathematical imaging and vision, 49(2):384–417, 2014. Marta Favali, Samaneh Abbasi-Sureshjani, Bart ter Haar Romeny, and Alessandro Sarti. Analysis of vessel connectivities in retinal images by cortically inspired spectral clustering. Journal of Mathematical Imaging and Vision, 56(1):158–172, 2016.
|
| 372 |
+
434 Marc Finzi, Samuel Stanton, Pavel Izmailov, and Andrew Gordon Wilson. Generalizing convolutional neural networks for equivariance to lie groups on arbitrary continuous data. In International Conference on Machine Learning, pages 3165–3176. PMLR, 2020.
|
| 373 |
+
437 Erik Franken and Remco Duits. Crossing-preserving coherence-enhancing diffusion on invertible orientation scores. International Journal of Computer Vision, 85(3):253, 2009.
|
| 374 |
+
439 Fabian B Fuchs, Edward Wagstaff, Justas Dauparas, and Ingmar Posner. Iterative se (3)-transformers. arXiv preprint arXiv:2102.13419, 2021. Ian Goodfellow, Yoshua Bengio, Aaron Courville, and Yoshua Bengio. Deep learning, volume 1. MIT press Cambridge, 2016. Krzysztof M Gorski, Eric Hivon, Anthony J Banday, Benjamin D Wandelt, Frode K Hansen, Mstvos Reinecke, and Matthia Bartelmann. Healpix: A framework for high-resolution discretization and fast analysis of data distributed on the sphere. The Astrophysical Journal, 622(2):759, 2005. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE international conference on computer vision, pages 1026–1034, 2015. 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, pages 770–778, 2016.
|
| 375 |
+
452 Matthias Hein, Jean-Yves Audibert, and Ulrike Von Luxburg. From graphs to manifolds–weak and strong pointwise consistency of graph laplacians. In International Conference on Computational Learning Theory, pages 470–485. Springer, 2005.
|
| 376 |
+
455 Mikael Henaff, Joan Bruna, and Yann LeCun. Deep convolutional networks on graph-structured data. arXiv preprint arXiv:1506.05163, 2015.
|
| 377 |
+
457 David H Hubel and Torsten N Wiesel. Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex. The Journal of physiology, 160(1):106–154, 1962.
|
| 378 |
+
459 Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. John Jumper, R Evans, A Pritzel, T Green, M Figurnov, K Tunyasuvunakool, O Ronneberger, R Bates, A Zidek, A Bridgland, et al. High accuracy protein structure prediction using deep learning. Fourteenth Critical Assessment of Techniques for Protein Structure Prediction (Abstract Book), 22: 24, 2020. Karthik Kashinath, Mayur Mudigonda, Sol Kim, Lukas Kapp-Schwoerer, Andre Graubner, Ege Karaismailoglu, Leo von Kleist, Thorsten Kurth, Annette Greiner, Ankur Mahesh, et al. Climatenet: an expert-labeled open dataset and deep learning architecture for enabling high-precision analyses of extreme weather. Geoscientific Model Development, 14(1):107–124, 2021.
|
| 379 |
+
69 Nicolas Keriven, Alberto Bietti, and Samuel Vaiter. Convergence and stability of graph convolutional networks on large random graphs. arXiv preprint arXiv:2006.01868, 2020.
|
| 380 |
+
471 Amir Hosein Khasahmadi, Kaveh Hassani, Parsa Moradi, Leo Lee, and Quaid Morris. Memory-based graph networks. arXiv preprint arXiv:2002.09518, 2020.
|
| 381 |
+
473 Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016.
|
| 382 |
+
477 Risi Kondor and Shubhendu Trivedi. On the generalization of equivariance and convolution in neural networks to the action of compact groups. In International Conference on Machine Learning, pages 2747–2755. PMLR, 2018.
|
| 383 |
+
480 Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
|
| 384 |
+
481 Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems, 25:1097–1105, 2012.
|
| 385 |
+
484 Yann LeCun and Corinna Cortes. MNIST handwritten digit database. 2010. URL http://yann. lecun.com/exdb/mnist/. Yann LeCun, Yoshua Bengio, et al. Convolutional networks for images, speech, and time series. The handbook of brain theory and neural networks, 3361(10):1995, 1995. Karel Lenc and Andrea Vedaldi. Understanding image representations by measuring their equivariance and equivalence. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 991–999, 2015.
|
| 386 |
+
491 Jonathan Masci, Davide Boscaini, Michael Bronstein, and Pierre Vandergheynst. Geodesic convolutional neural networks on riemannian manifolds. In Proceedings of the IEEE international conference on computer vision workshops, pages 37–45, 2015.
|
| 387 |
+
494 Alexey Mashtakov, Remco Duits, Yu Sachkov, Erik J Bekkers, and Ivan Beschastnyi. Tracking of lines in spherical images via sub-riemannian geodesics in SO(3). Journal of mathematical imaging and vision, 58(2):239–264, 2017.
|
| 388 |
+
497 Diego Mesquita, Amauri H Souza, and Samuel Kaski. Rethinking pooling in graph neural networks. arXiv preprint arXiv:2010.11418, 2020.
|
| 389 |
+
499 Richard Montgomery. A tour of sub-Riemannian geometries, their geodesics and applications. Number 91. American Mathematical Soc., 2006.
|
| 390 |
+
|
| 391 |
+
501 Federico Monti, Davide Boscaini, Jonathan Masci, Emanuele Rodola, Jan Svoboda, and Michael M
|
| 392 |
+
502 Bronstein. Geometric deep learning on graphs and manifolds using mixture model cnns. In
|
| 393 |
+
503 Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5115–5124,
|
| 394 |
+
504 2017.
|
| 395 |
+
505 Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor
|
| 396 |
+
506 Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style,
|
| 397 |
+
507 high-performance deep learning library. In Advances in neural information processing systems,
|
| 398 |
+
508 pages 8026–8037, 2019.
|
| 399 |
+
509 Nathanaël Perraudin, Michaël Defferrard, Tomasz Kacprzak, and Raphael Sgier. Deepsphere: Effi
|
| 400 |
+
510 cient spherical convolutional neural network with healpix sampling for cosmological applications.
|
| 401 |
+
511 Astronomy and Computing, 27:130–146, 2019.
|
| 402 |
+
512 Jean Petitot. The neurogeometry of pinwheels as a sub-Riemannian contact structure. Journal of
|
| 403 |
+
513 Physiology-Paris, 97(2-3):265–309, 2003.
|
| 404 |
+
514 Jorg Portegies, Gonzalo Sanguinetti, Stephan Meesters, and Remco Duits. New approximation of
|
| 405 |
+
515 a scale space kernel on se (3) and applications in neuroimaging. In International Conference on
|
| 406 |
+
516 Scale Space and Variational Methods in Computer Vision, pages 40–52. Springer, 2015.
|
| 407 |
+
517 James Reeds and Lawrence Shepp. Optimal paths for a car that goes both forwards and backwards.
|
| 408 |
+
518 Pacific journal of mathematics, 145(2):367–393, 1990.
|
| 409 |
+
519 Olinde Rodrigues. Des lois géométriques qui régissent les déplacements d’un système solide
|
| 410 |
+
520 dans l’espace: et de la variation des cordonnées provenant de ces déplacements considérés
|
| 411 |
+
521 indépendamment des causes qui peuvent les produire. 1840.
|
| 412 |
+
522 Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical
|
| 413 |
+
523 image segmentation. In International Conference on Medical image computing and computer
|
| 414 |
+
524 assisted intervention, pages 234–241. Springer, 2015.
|
| 415 |
+
525 Gonzalo Sanguinetti, Erik Bekkers, Remco Duits, Michiel HJ Janssen, Alexey Mashtakov, and
|
| 416 |
+
526 Jean-Marie Mirebeau. Sub-riemannian fast marching in se (2). In Iberoamerican Congress on
|
| 417 |
+
527 Pattern Recognition, pages 366–374. Springer, 2015.
|
| 418 |
+
528 Victor Garcia Satorras, Emiel Hoogeboom, and Max Welling. E (n) equivariant graph neural networks.
|
| 419 |
+
529 arXiv preprint arXiv:2102.09844, 2021.
|
| 420 |
+
530 Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The
|
| 421 |
+
531 graph neural network model. IEEE transactions on neural networks, 20(1):61–80, 2008.
|
| 422 |
+
532 David I Shuman, Sunil K Narang, Pascal Frossard, Antonio Ortega, and Pierre Vandergheynst.
|
| 423 |
+
533 The emerging field of signal processing on graphs: Extending high-dimensional data analysis to
|
| 424 |
+
534 networks and other irregular domains. IEEE signal processing magazine, 30(3):83–98, 2013.
|
| 425 |
+
535 Amit Singer. From graph to manifold laplacian: The convergence rate. Applied and Computational
|
| 426 |
+
536 Harmonic Analysis, 21(1):128–134, 2006.
|
| 427 |
+
537 Maurice Weiler, Fred A Hamprecht, and Martin Storath. Learning Steerable Filters for Rotation
|
| 428 |
+
538 Equivariant CNNs. In International Conference on Computer Vision and Pattern Recognition,
|
| 429 |
+
539 2018.
|
| 430 |
+
540 Douglas Brent West et al. Introduction to graph theory, volume 2. Prentice hall Upper Saddle River,
|
| 431 |
+
541 NJ, 1996.
|
| 432 |
+
542 Rex Ying, Jiaxuan You, Christopher Morris, Xiang Ren, William L Hamilton, and Jure Leskovec. Hier
|
| 433 |
+
543 archical graph representation learning with differentiable pooling. arXiv preprint arXiv:1806.08804,
|
| 434 |
+
544 2018.
|
| 435 |
+
545 Tong Yu and Hong Zhu. Hyper-parameter optimization: A review of algorithms and applications.
|
| 436 |
+
546 arXiv preprint arXiv:2003.05689, 2020.
|
| 437 |
+
547 Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146,
|
| 438 |
+
548 2016.
|
| 439 |
+
|
| 440 |
+
1. For all authors...
|
| 441 |
+
|
| 442 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] See Section 1
|
| 443 |
+
(b) Did you describe the limitations of your work? [Yes] See Section 5
|
| 444 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes] The environmental impact is a direct consequence of the time and memory issues we discussed in Section 5.
|
| 445 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 446 |
+
|
| 447 |
+
2. If you are including theoretical results...
|
| 448 |
+
|
| 449 |
+
(a) Did you state the full set of assumptions of all theoretical results? [Yes] See Section 3 (b) Did you include complete proofs of all theoretical results? [Yes] We refer the reader to original publication with proofs.
|
| 450 |
+
|
| 451 |
+
3. If you ran experiments...
|
| 452 |
+
|
| 453 |
+
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] See Section 3
|
| 454 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Section 4
|
| 455 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] See Section 4
|
| 456 |
+
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Section 4
|
| 457 |
+
|
| 458 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 459 |
+
|
| 460 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] See Section 4
|
| 461 |
+
(b) Did you mention the license of the assets? [Yes] We always refered to the original papers of the datasets we used.
|
| 462 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [Yes] See Section 4 for the URL. We also send a zip file containing the whole implementation.
|
| 463 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 464 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 465 |
+
|
| 466 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 467 |
+
|
| 468 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 469 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 470 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/crAi7c41xTh/crAi7c41xTh.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/nQxCYIFk7Rz/nQxCYIFk7Rz.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/ryCM8zWRb/ryCM8zWRb.md
ADDED
|
@@ -0,0 +1,259 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# RECURRENT NEURAL NETWORKS WITH TOP-K GAINS FOR SESSION-BASED RECOMMENDATIONS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
RNNs have been shown to be excellent models for sequential data and in particular for session-based user behavior. The use of RNNs provides impressive performance benefits over classical methods in session-based recommendations. In this work we introduce a novel ranking loss function tailored for RNNs in recommendation settings. The better performance of such loss over alternatives, along with further tricks and improvements described in this work, allow to achieve an overall improvement of up to $3 5 \%$ in terms of MRR and Recall $\textcircled{ a} 2 0$ over previous session-based RNN solutions and up to $51 \%$ over classical collaborative filtering approaches. Unlike data augmentation-based improvements, our method does not increase training times significantly.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Session-based recommendation is a very common recommendation problem that is encountered in many domains such as e-commerce, classified sites, music and video recommendation. In the session-based setting, past user history logs are typically not available (either because the user is new or not logged-in or not tracked) and recommender systems have to rely only on the actions of the user in the current sessions to provide accurate recommendations. Until recently many of these recommendations tasks were tackled mainly using relatively simple methods such as item-based collaborative filtering (Sarwar et al., 2001) or content-based methods. Recurrent Neural Networks (RNNs) have emerged from the deep learning literature as powerful methods for modeling sequential data. These models have been successfully applied in speech recognition, translation, time series forecasting and signal processing. In recommender systems RNNs have been recently applied to the session-based recommendation setting with impressive results (Hidasi et al., 2016a).
|
| 12 |
+
|
| 13 |
+
The advantage of RNNs over traditional similarity-based methods for recommendation is that they can effectively model the whole session of user interactions (clicks, views, etc.). By modeling the whole session RNNs can in effect learn the ‘theme’ of the session and thus provide recommendations with increased accuracy (between $2 0 \% { - } 3 0 \%$ ) over traditional methods.
|
| 14 |
+
|
| 15 |
+
RNNs in session-based recommendation have been adapted to the task of recommendation. One of the main objectives in recommendation is to rank items by user preference; i.e. the exact ranking or scoring of items in the tail of the item list (items that the user will not like) is not that important, but it is very important to rank correctly the items that the user will like at the top of the list (first 5, 10 or 20 positions). To achieve this with machine learning one has to typically utilize learning to rank techniques(see e.g. (Burges, 2010)) and in particular ranking objectives and loss functions. The current session-based RNN approaches use ranking loss functions and, in particular, pairwise ranking loss functions. As in most deep learning approaches the choice of a good ranking loss can have a very significant influence on performance. Since deep learning methods need to propagate gradients over several layers and in the case of RNNs ’back in time’ over previous steps, to optimize the model parameters, the quality of these gradients originating from the loss function influences the quality of the optimization and the model parameters. Moreover the nature of the recommendation task, which typically entails large output spaces (due to large number of items), poses unique challenges that have to be taken into account as well when designing a proper ranking loss function. We will see that the way this large output space issue is tackled is very crucial in achieving good performance.
|
| 16 |
+
|
| 17 |
+
In this work we analyze ranking loss functions used in RNNs for session-based recommendations, this analysis leads to a new set of ranking loss functions that increase the performance of the RNN up to $30 \%$ over previous commonly used losses without incurring in significant computational overheads. We essentially devise a new class of loss functions that combines learnings from the deep learning and the learning to rank literature. Experimental results on several datasets coming from industry validate these impressive improvements, in terms of Mean Reciprocal Rank (MRR) and Recall $\textcircled{ a} 2 0$ . With these improvements the difference between RNNs and conventional memory-based collaborative filtering jumps to $51 \%$ in terms of MRR and Recall $\textcircled{ a} 2 0$ demonstrating the potential that deep learning methods bring to the area of Recommender Systems.
|
| 18 |
+
|
| 19 |
+
# 1.1 RELATED WORK
|
| 20 |
+
|
| 21 |
+
One of the main approaches that is employed in session-based recommendation and a natural solution to the problem of a missing user profile is the item-to-item recommendation approach (Sarwar et al., 2001; Linden et al., 2003). In this setting, an item-to-item similarity matrix is precomputed from the available session data, that is items that are often clicked together in sessions are deemed to be similar. This similarity matrix is then simply used during the session to recommend the most similar items to the one the user has currently clicked.
|
| 22 |
+
|
| 23 |
+
Long Short-Term Memory (LSTM) Hochreiter & Schmidhuber (1997) networks are a type of RNNs that have been shown to solve the optimization issues the plague vanilla-type RNNs. LSTM’s include additional gates that regulate when and how much of the input to take into account and when to reset the hidden state. A slightly simplified version of LSTM – that still maintains all their properties – are Gated Recurrent Units (GRUs) Cho et al. (2014), which we use in this work. Recurrent Neural Networks have been used with success in the area of session-based recommendations; (Hidasi et al., 2016a) proposed a Recurrent Neural Network with a pairwise ranking loss for this task, (Tan et al., 2016) proposed data augmentation techniques to improve the performance of the RNN for session-based recommendations; these techniques have though the side effect of increasing training times as a single session is split into several sub-sessions for training. Session-based RNNs have been augmented (Hidasi et al., 2016b) with feature information, such as text and images from the clicked/consumed items, showing improved performance over the plain models. RNNs have also been used in more standard user-item collaborative filtering settings where the aim is to model the evolution of the user and items factors (Wu et al., 2017),(Devooght & Bersini, 2016) where the results are less striking, with the proposed methods barely outperforming standard matrix factorization methods. This is to be expected as there is no strong evidence on major user taste evolution in a single domain in the timeframes of the available datasets and sequential modeling of items that are not ’consumed’ in sessions such as movies might not bring major benefits.
|
| 24 |
+
|
| 25 |
+
Another area touched upon in this work are loss functions tailored to recommender systems requirements. This typically means ranking loss functions. In this area there has been work particularly in the context of matrix factorization techniques. One of the first learning to rank techniques for collaborative filtering was introduced in (Weimer et al., 2007). Essentially a listwise loss function was introduced along with an alternating bundle method for optimization of the factors. Further ranking loss function for collaborative filtering were introduced in (Shi et al., 2012) (Rendle et al., 2009b) and (Koren & Sill, 2011). Note that the fact that these loss functions work well in matrix factorization does not guarantee in any way that they are an optimal choice for RNNs as backpropagation requirements are stronger than those posed by simple SGD. We will in fact see that BPR, a popular choice of loss function, needs to be significantly modified to extract optimal results in the case of RNNs for session-based recommendations. Another work related to sampling large output spaces in deep networks for efficient loss computations for language models is the ’blackout’ method (Ji et al., 2016), where essentially a sampling procedure similar to the one used in (Hidasi et al., 2016a) is applied in order to efficiently compute the categorical cross-entropy loss.
|
| 26 |
+
|
| 27 |
+
# 2 SAMPLING THE OUTPUT
|
| 28 |
+
|
| 29 |
+
In the remainder of the paper we will refer to the RNN algorithm implemented in (Hidasi et al., 2016a) as GRU4Rec, the name of the implementation published by the authors on github 1. In this section we revisit how GRU4Rec samples negative feedback on the output and discuss its importance. We extend this sampling with an option for additional samples and argue that this is crucial for the increased recommendation accuracy we achieve (up to $51 \%$ improvement).
|
| 30 |
+
|
| 31 |
+
In each training step, GRU4Rec takes the item of the current event in the session – represented by a one-hot vector – as an input. The output of the network is a set of scores over the items, corresponding to their likelihood of being the next item in the session. The training iterates through all events in the sequence. The complexity of the training with backpropagation through time is $O ( N _ { E } ( H ^ { 2 } + H { N _ { O } } ) )$ where $N _ { E }$ is the number of training events, $H$ is the number of hidden units and $N _ { O }$ is the number of outputs, for which scores are computed. Computing scores for all items is very impractical, since it makes the network unscalable2. Therefore GRU4Rec uses a sampling mechanism and during training computes the scores for a subset of the items only.
|
| 32 |
+
|
| 33 |
+
Instead of making a forward and backward pass with one training example only and then moving to the next, the network is fed with a bundle of examples and is trained on the mean gradient. This common practice is called mini-batch training and has several benefits, e.g. utilizing the parallelization capabilities of current hardware better, thus training faster, and producing more stable gradients than stochastic gradient training and thus converging faster. GRU4Rec introduced mini-batch based sampling Hidasi et al. (2016a). For each example in the mini-batch, the other examples of the same mini-batch serve as negative examples (see Figure 1).3 This method is practical from an implementation point of view and can be also implemented efficiently for GPUs.
|
| 34 |
+
|
| 35 |
+

|
| 36 |
+
Figure 1: Mini-batch sampling.
|
| 37 |
+
|
| 38 |
+
The network can be trained with one of three different listwise ranking loss functions (see Section 3). All loss functions require a score for the target item (i.e. for the item which was the actual next item) and score(s) for at least one negative sample (i.e. item other than the target). One property of ranking losses is that learning happens only if the score of the target item does not exceed that of the negative samples by a large margin, otherwise the items are already in the right order, so there is nothing to be learned. Therefore, when utilizing a sampling procedure, it is crucial that high scoring items make it among the negative samples. Whether an item has a high score, depends on the context (item sequence) the scores are actually computed for. Popular items generally score high in many situations, making popularity-based sampling a good sampling strategy. Mini-batch sampling is basically a form of popularity-based sampling, since the training iterates through all events, thus the probability of an item acting as a negative sample is proportional to its support. The problem with popularity-based sampling is that learning can slow down after the algorithm learns to (generally) rank target items above popular ones, and thus can still be inaccurate with ranking long tail high scoring items. On the other hand, uniform sampling slows down learning, due to the high number of low scoring negative samples, but might produce an overall more accurate model if trained indefinitely. In our experience, popularity-based sampling generally produces better results.
|
| 39 |
+
|
| 40 |
+
Tying sampling to the mini-batches has several practical benefits, but is too restrictive for three reasons. (1) Mini-batch sizes are generally small, ranging from few tens to few hundreds. If the number of items is large, the small sample size further hinders the chance of including all of the high scoring negative examples. (2) Mini-batch size has a direct effect on the training. E.g. we found that training with smaller mini-batch sizes (30-100) produces more accurate models, but training with larger ones is faster on the GPU due to parallelization. (3) The sampling method is inherently popularity-based, which generally is a good strategy, but might not be optimal for all datasets.
|
| 41 |
+
|
| 42 |
+
Therefore we extend the sampling of GRU4Rec with additional samples. We sample $N _ { A }$ items which are shared by the examples of the mini-batch, i.e. the same samples are used for each exam$\mathrm { p l e } ^ { 4 }$ . These additional samples are used along with the $N _ { B } - 1$ samples coming from the mini-batch (popularity) sampling. Additional samples can be sampled in any way, we chose to sample proportional to $\mathrm { s u p p } _ { i } ^ { \alpha }$ , where ${ \mathrm { s u p p } } _ { i }$ is the support of the item and $\alpha$ is the parameter of the sampling. $\alpha = 0$ and $\alpha = 1$ gives uniform and popularity-based sampling respectively.
|
| 43 |
+
|
| 44 |
+
Adding more samples naturally increases the complexity, since $N _ { O }$ increases from $N _ { B }$ to $N _ { A } + N _ { B }$ . However, the computations are easily parallelizable, thus there is no actual increase in the training time on modern GPUs up to a certain sample size (see Section 4.1). The efficient implementation of this sampling however is not trivial. Sampling according to a distribution on GPUs is slow, thus it should be handled by the CPU. The sampled item IDs can be given to the GPU along with the item IDs of the mini-batch. Sampling the distribution takes some time every time a new minibatch is formed, thus GPU execution is frequently interrupted, making GPU utilization low and thus training slow. On the top of that, sampling a few items at once is less efficient than sampling lots of them, even on CPU. Therefore we implemented a cache that pre-samples and stores lots of negative samples. Training uses up these samples and the cache is recomputed once it is empty. We found that pre-sampling 10-100 million item IDs significantly improves training speed when compared to using no cache at all.
|
| 45 |
+
|
| 46 |
+
# 3 LOSS FUNCTION DESIGN
|
| 47 |
+
|
| 48 |
+
In this section we examine the loss functions implemented in GRU4Rec and identify their weaknesses. We propose two ways to stabilize the numerical instability of the cross-entropy loss, we show how learning with the TOP1 and BPR pairwise losses degrades as we add more samples to the output, and propose a family of loss functions based on pairwise losses that alleviates this problem. We note that, while our aim is to improve GRU4Rec, the loss functions proposed in this section can be also used with other models, such as matrix factorization.
|
| 49 |
+
|
| 50 |
+
# 3.1 CATEGORICAL CROSS-ENTROPY
|
| 51 |
+
|
| 52 |
+
Categorical cross-entropy measures the distance of a proposed (discrete) probability distribution $q$ from the target distribution $p$ as defined by (1).
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
H ( p , q ) = - \sum _ { j = 1 } ^ { N } p _ { j } \log q _ { j }
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
This loss is often used in machine learning and deep learning in particular for multi-class classification problems. Next item recommendation can be interpreted as classification, where the class labels are the items in the system and item sequences need to be assigned with the label of the item that follows. In a single-label scenario – such as next item recommendation – the target distribution is a one-hot vector over the set of items, with the coordinate corresponding to the target item set to 1. The proposed distribution consists of the scores assigned to the items by the algorithm. The output scores need to be transformed to form a distribution. It is common practice to use the softmax transformation (2), which is a continuous approximation of the max operation. This naturally aligns with the sentiment that the label with the highest score is assigned to the sequence.
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
s _ { i } = \frac { e ^ { r _ { i } } } { \sum _ { j = 1 } ^ { N } e ^ { r _ { j } } }
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
Cross-entropy in itself is a pointwise loss, (that is it can be computed per individual item) as it is the sum of independent losses defined over the coordinates. Combining it with softmax introduces listwise properties into the loss, since the loss now cannot be separated over coordinates (or items). Putting them together we get the following loss function over the scores (assuming that the target item is indexed by $i$ ):
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
L _ { \mathrm { x e } } = - \log s _ { i } = - \log \frac { e ^ { r _ { i } } } { \sum _ { j = 1 } ^ { N } e ^ { r _ { j } } }
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
Fixing the instability: One of the losses available in GRU4Rec was cross-entropy with softmax scores. Hidasi et al. (2016a) reported slightly better results than with other losses, but deemed the loss to be unstable for a large fraction of the hyperparameter space and thus advised against its use. This instability comes from the limited numerical precision. Assuming that there is a $k$ for which $r _ { k } \gg r _ { i }$ , $s _ { i }$ becomes very small and rounded to 0, because of the limited precision. The loss then computes $\log 0$ , which is undefined. Two ways to circumvent this problem are as follow: (a) compute $- \log ( s _ { i } + \epsilon )$ , where $\epsilon$ is a very small value (we use $1 0 ^ { - 2 4 }$ ); (b) compute $- \log s _ { i }$ directly as $\textstyle - r _ { i } + \log \sum _ { j = 1 } ^ { N } e ^ { r _ { j } }$ . The former introduces some noise, while the latter does not allow the separated use of the transformation and the loss, but both methods stabilize the loss. We did not observe any differences in the results of the two variants.
|
| 71 |
+
|
| 72 |
+
# 3.2 RANKING LOSSES: TOP1 & BPR
|
| 73 |
+
|
| 74 |
+
GRU4Rec offers two loss functions based on pairwise losses. Pairwise losses compare the score of the target to a negative example (i.e. any item other than the target). The loss is high if the target’s score is higher than that of the negative example. GRU4Rec computes scores for multiple negative samples per each target, and thus the loss function is composed as the average of the individual pairwise losses. This results in a listwise loss function, which is composed of pairwise losses.
|
| 75 |
+
|
| 76 |
+
One of the loss functions is coined TOP1 (4). It is a heuristically put together loss consisting of two parts. The first part aims to push the target score above the score of the samples, while the second part lowers the score of negative samples towards zero. The latter acts as a regularizer, but instead of constraining the model weights directly, it penalizes high scores on the negative examples. Since all items act as a negative score in one training example or another, it generally pushes the scores down.
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
L _ { \mathrm { t o p 1 } } = \frac { 1 } { N _ { S } } \sum _ { j = 1 } ^ { N _ { S } } \sigma ( r _ { j } - r _ { i } ) + \sigma ( r _ { j } ^ { 2 } )
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
$j$ runs over the $( N _ { S } )$ sampled negative (’non-relevant’) items, relevant items are index by $i$ . The other loss function (5) is based on the popular Bayesian Personalized Ranking (BPR) Rendle et al. (2009a) loss. Here the negative log-probability of the target score exceeding the sample scores is minimized (i.e. the probability of target scores being above sample scores is maximized). The non-continuous $P ( r _ { i } > r _ { j } )$ is approximated by $\sigma ( r _ { i } - r _ { j } )$ .
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
L _ { \mathrm { b p r } } = - \frac { 1 } { N _ { S } } \sum _ { j = 1 } ^ { N _ { S } } \log \sigma ( r _ { i } - r _ { j } )
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
# 3.2.1 VANISHING GRADIENTS
|
| 89 |
+
|
| 90 |
+
Taking the average of individual pairwise losses has an undesired side effect. Examining the gradients for the TOP1 and BPR losses w.r.t. the target score $r _ { i }$ , ((6) and (7) respectively) reveals that under certain circumstances gradients vanish and thus learning stops. With pairwise losses, one generally wants to have negative samples with high scores, as those samples produce high gradients. Or intuitively, if the score of the negative sample is already well below that of the target, there is nothing to learn from that negative sample anymore. For this discussion we will denote samples where $r _ { j } \ \ll \ r _ { i }$ irrelevant. For an irrelevant sample $\sigma ( r _ { j } \mathrm { ~ - ~ } r _ { i } )$ in ((6) and $1 - \sigma ( r _ { i } - r _ { j } )$ (7)
|
| 91 |
+
|
| 92 |
+
will be close to zero. Therefore, any irrelevant sample adds basically nothing to the total gradient. Meanwhile the gradient is always discounted by the total number of negative samples. By increasing the number of samples, the number of irrelevant samples increases faster than that of including relevant samples, since the majority of items is irrelevant as a negative sample. This is especially true for non-popularity-based sampling and high sample numbers. Therefore these losses start to vanish as the number of samples increase, which is counterintuitive and hurts the full potential of the algorithm.56
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
\frac { \partial L _ { \mathrm { t o p 1 } } } { \partial r _ { i } } = - \frac { 1 } { N _ { S } } \sum _ { j = 1 } ^ { N _ { S } } \sigma ( r _ { j } - r _ { i } ) \left( 1 - \sigma ( r _ { j } - r _ { i } ) \right)
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\frac { \partial L _ { \mathrm { b p r } } } { \partial r _ { i } } = - \frac { 1 } { N _ { S } } \sum _ { j = 1 } ^ { N _ { S } } \left( 1 - \sigma ( r _ { i } - r _ { j } ) \right)
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
Note, that TOP1 is sensitive to relevant examples where $r _ { j } \gg r _ { i }$ , which is an oversight in the design of the loss. While this is unlikely to happen, it cannot be outruled. For example, when comparing a niche target to a very popular sample – especially during the early phase of learning – the target score might be much lower than the sample score.
|
| 103 |
+
|
| 104 |
+
We concentrated on the gradients w.r.t. the target score, but a similar issue can be observed for the gradients on the negative scores. The gradient w.r.t. the score of a negative sample is the gradient of the pairwise loss between the target and the sample divided by the number of negative samples. This means that even if all negative samples would be relevant, their updates would still diminish as their number grows.
|
| 105 |
+
|
| 106 |
+

|
| 107 |
+
Figure 2: Median negative gradients of BPR and BPR-max w.r.t. the target score against the rank of the target item. Left: only minibatch samples are used (minibatch size: 32); Center: 2048 additional negative samples were added to the minibatch samples; Right: same setting as the center, focusing on ranks 0-200.
|
| 108 |
+
|
| 109 |
+
# 3.3 RANKING-MAX LOSS FUNCTION FAMILY
|
| 110 |
+
|
| 111 |
+
To overcome the vanishing of gradients as the number of samples increase, we propose a new family of listwise loss functions, based on individual pairwise losses. The idea is to have the target score compared with the most relevant sample score, which is the maximal score amongst the samples. The general structure of the loss is described by (8).
|
| 112 |
+
|
| 113 |
+
$$
|
| 114 |
+
L _ { \mathrm { p a i r w i s e - m a x } } \left( r _ { i } , \{ r _ { j } \} _ { j = 1 } ^ { N _ { S } } \right) = L _ { \mathrm { p a i r w i s e } } ( r _ { i } , \operatorname* { m a x } _ { j } r _ { j } )
|
| 115 |
+
$$
|
| 116 |
+
|
| 117 |
+
The maximum selection is non-differentiable and thus cannot be used with gradient descent. Therefore we use the softmax scores to preserve differentiability. Here, the softmax transformation is only used on the negative examples (i.e. $r _ { i }$ is excluded), since we are looking from the maximum score amongst the negative examples. This naturally results in loss functions where each negative sample is taken into account proportional to its likelihood of having the maximal score. Based on this general idea, we now derive the TOP1-max and BPR-max loss functions.
|
| 118 |
+
|
| 119 |
+
TOP1-max: The TOP1-max loss is fairly straightforward. The regularizing part does not necessarily need to be only applied for the maximal negative score, however we found that this gave the best results, thus kept it this way. The continuous approximation to the maximum selection entails summing over the individual losses weighted by the corresponding softmax scores $s _ { j }$ , giving us the TOP1-max loss (9).
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
L _ { \mathrm { t o p 1 - m a x } } = \sum _ { j = 1 } ^ { N _ { S } } s _ { j } \left( \sigma ( r _ { j } - r _ { i } ) + \sigma ( r _ { j } ^ { 2 } ) \right)
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
The gradient of TOP1-max (10) is the softmax weighted average7 of individual pairwise gradients. If $r _ { j }$ is much lower than the maximum of negative scores, its weight will be almost zero and more weight will be placed on examples with scores close to the maximum. This solves the issue of vanishing gradients with more samples, because irrelevant samples will be just ignored, while the gradient will point towards the gradient of the relevant samples. Of course, if all samples are irrelevant, the gradient becomes near zero, but this is not a problem, since if the target score is greater than all sample scores, there is nothing to be learned. Unfortunately, the sensitivity to large sample scores of TOP1 is still an issue as it is the consequence of the pairwise loss and not the aggregation.
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
\frac { \partial L _ { \mathrm { t o p 1 - m a x } } } { \partial \boldsymbol { r } _ { i } } = - \sum _ { j = 1 } ^ { N _ { S } } s _ { j } \sigma ( \boldsymbol { r } _ { j } - \boldsymbol { r } _ { i } ) \left( 1 - \sigma ( \boldsymbol { r } _ { j } - \boldsymbol { r } _ { i } ) \right)
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
BPR-max: Going back to the probability interpretation of BPR, the goal is to maximize the probability of the target score being higher than the maximal sample score $r _ { \operatorname* { m a x } } = \operatorname* { m a x } _ { j } r _ { j }$ . This can be rewritten using conditional probabilities:
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
P ( r _ { i } > r _ { \operatorname* { m a x } } ) = \sum _ { j = 1 } ^ { N _ { S } } P ( r _ { i } > r _ { j } | r _ { j } = r _ { \operatorname* { m a x } } ) P ( r _ { j } = r _ { \operatorname* { m a x } } )
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
$P ( r _ { i } > r _ { j } )$ and $P ( r _ { j } = r _ { \operatorname* { m a x } } )$ is approximated by $\sigma ( r _ { i } - r _ { j } )$ (as in the original BPR loss) and the softmax score $s _ { j }$ respectively. We then want to minimize the negative log-probability, which gives us the loss:
|
| 138 |
+
|
| 139 |
+
$$
|
| 140 |
+
L _ { \mathrm { b p r - m a x } } = - \log \sum _ { j = 1 } ^ { N _ { S } } s _ { j } \sigma ( r _ { i } - r _ { j } )
|
| 141 |
+
$$
|
| 142 |
+
|
| 143 |
+
The gradient of BPR-max (13) is the weighted average of individual BPR gradients, where the weights are $s _ { j } \sigma ( r _ { i } - r _ { j } )$ . The relative importance of negative samples $j$ and $k$ is $\begin{array} { r } { \frac { \sigma ( r _ { i } - r _ { j } ) s _ { j } } { \sigma ( r _ { i } - r _ { k } ) s _ { k } } = } \end{array}$ erj +e−ri+rj+rkerk +e−ri+rj+rk , which behaves like softmax weights if ri rj + rk or if both ri and rk are small. Otherwise it is a smoothed softmax. This means that while $r _ { i }$ is small, the weights are distributed more evenly, yet clear emphasis will be given to higher sample scores. As $r _ { i }$ becomes higher, the focus shifts quickly to the samples with high scores. This is an ideal behaviour.
|
| 144 |
+
|
| 145 |
+
$$
|
| 146 |
+
\frac { \partial L _ { \mathrm { b p r - m a x } } } { \partial \boldsymbol { r } _ { i } } = - \frac { \sum _ { j = 1 } ^ { N _ { S } } s _ { j } \sigma \big ( \boldsymbol { r } _ { i } - \boldsymbol { r } _ { j } \big ) \left( 1 - \sigma \big ( \boldsymbol { r } _ { i } - \boldsymbol { r } _ { j } \big ) \right) } { \sum _ { j = 1 } ^ { N _ { S } } s _ { j } \sigma \big ( \boldsymbol { r } _ { i } - \boldsymbol { r } _ { j } \big ) }
|
| 147 |
+
$$
|
| 148 |
+
|
| 149 |
+
The gradient w.r.t. a negative sample – with both the BPR-max and TOP1-max – is proportional to the softmax score of the example, meaning that only the items, near the maximum will be updated. This is beneficial, because if the score of a negative sample is low, it doesn’t need to be updated. If the score of a sample is much higher than that of the others it will be the only one updated and the gradient will coincide with the gradient of the pairwise loss between the target and the sample score. In a more balanced setting the gradient is between the aforementioned gradient and 0. For example the gradient of BPR-max w.r.t. a negative sample’s score is as follows:
|
| 150 |
+
|
| 151 |
+
$$
|
| 152 |
+
\frac { \partial L _ { \mathrm { b p r - m a x } } } { \partial \boldsymbol { r } _ { k } } = s _ { k } - \frac { s _ { k } \sigma ^ { 2 } ( \boldsymbol { r } _ { i } - \boldsymbol { r } _ { k } ) } { \sum _ { j = 1 } ^ { N _ { S } } s _ { j } \sigma ( \boldsymbol { r } _ { i } - \boldsymbol { r } _ { j } ) }
|
| 153 |
+
$$
|
| 154 |
+
|
| 155 |
+
Figure 2 depicts how the gradients of BPR and BPR-max behave given the rank of the target item8. The rank of the target is the number of negative scores exceeding it, e.g. rank 0 means that the target score is higher than all sample scores. Lower rank means that there are fewer negative samples that are relevant. The figure depicts the median negative gradient w.r.t. the target score in two cases, measured on a dataset sample during the $1 ^ { s t }$ and $1 0 ^ { t h }$ epochs (i.e. beginning and end of the training): (left) no additional samples were used, only the other examples from a mini-batch of size 32; (middle & right) 2048 additional negative samples were added. The rightmost figure focuses on the first 200 ranks of the figure in the middle. The gradient is slightly higher for BPR when there are more relevant samples (i.e. high ranks). This is natural, since BPR-max focuses on samples closest to the maximum value and ignores other still relevant samples. This entails slightly slower learning for BPR-max when the target item is ranked at the end of the list, but the difference is not really significant. On the other hand, the gradient of BPR quickly vanishes as the number of relevant samples decrease (i.e. low ranks). The point of vanishing is relative to the total sample size. With small sample size, BPR’s gradient starts vanishing around rank 5 (the BPR-max does not vanish until rank 0); meanwhile, with more samples, the BPR gradient is very low, even for rank 100-500 (again, the gradient BPR-max starts decreasing significantly later). This means that BPR can hardly push target scores up in the ranking after a certain point, which comes earlier as the number of sample size increases. BPR-max, on the other hand, behaves well and is able to improve the score all the way.
|
| 156 |
+
|
| 157 |
+
# 3.3.1 BPR-MAX WITH SCORE REGULARIZATION
|
| 158 |
+
|
| 159 |
+
Even though we showed that the heuristic TOP1 loss is sensitive to relevant samples with very high scores, it was found to be performing better than BPR in Hidasi et al. (2016a). According to our observation, the same is true for the relation of TOP1-max and BPR-max. Part of the reasons lies in the rare occurrence of $r _ { j } \gg r _ { i }$ while $r _ { j } \approx 0$ simultaneously. If only the first condition is met, the gradient w.r.t. $r _ { i }$ might vanish, but the regularizing part of TOP1 makes sure that $r _ { j }$ is moved towards zero, which might even make the update possible for $r _ { i }$ next time (e.g. if $r _ { j }$ was negative, moving it towards zero decreases the difference with $r _ { i }$ ). The score regularization in TOP1 is very beneficial to the overall learning process, so even though the loss might not be theoretically optimal, it can achieve good results. GRU4Rec support two forms of regularization with every loss: dropout and $\ell _ { 2 }$ regularization of the model parameters. The regularization of TOP1 is used on the top of these. According to our experiments, the $\ell _ { 2 }$ regularization of model parameters decreases the model performance. Our assumption is that some of the model weights – such as the weight matrices for computing the update and reset gate – should not be regularized. Penalizing high output scores takes care of constraining the model, even without explicitly regularizing the weights.
|
| 160 |
+
|
| 161 |
+
Therefore we added score regularization to the BPR-max loss function as well. We tried several ways of score regularization. In the best performing one we conditioned the sample scores on independent, zero mean Gaussians with variance inversely proportional to the softmax score (15). This entails stronger regularization on scores closer to the maximum, which is ideal in our case.
|
| 162 |
+
|
| 163 |
+
$$
|
| 164 |
+
P \left( r _ { i } > r _ { \mathrm { m a x } } | \{ r _ { j } \} _ { j = 1 } ^ { N _ { S } } \right) \prod _ { j = 1 } ^ { N _ { S } } P ( r _ { j } ) = P \left( r _ { i } > r _ { \mathrm { m a x } } | \{ r _ { j } \} _ { j = 1 } ^ { N _ { S } } \right) \prod _ { j = 1 } ^ { N _ { S } } \mathcal { N } \left( 0 , \frac { c } { s _ { j } } \right)
|
| 165 |
+
$$
|
| 166 |
+
|
| 167 |
+
We minimize the negative log-probability and do continuous approximations as before, resulting in the final form of the BPR-max loss function (16). The regularization term is a simple, softmax weighted $\ell _ { 2 }$ regularization over the scores. $\lambda$ is the regularization hyperparameter of the loss.
|
| 168 |
+
|
| 169 |
+
$$
|
| 170 |
+
L _ { \mathrm { b p r - m a x } } = - \log \sum _ { j = 1 } ^ { N _ { S } } s _ { j } \sigma ( r _ { i } - r _ { j } ) + \lambda \sum _ { j = 1 } ^ { N _ { S } } s _ { j } r _ { j } ^ { 2 }
|
| 171 |
+
$$
|
| 172 |
+
|
| 173 |
+
# 4 EXPERIMENTS
|
| 174 |
+
|
| 175 |
+
Experimental setup: We evaluated the proposed improvements – fixed cross-entropy loss, rankingmax loss functions & adding additional samples – on four dataset. RSC15 is based on the dataset of RecSys Challange $2 0 1 5 ^ { 9 }$ , which contains click and buy events from an online webshop. We only kept the click data. VIDEO and VIDXL are proprietary datasets containing watch events from an online video service. Finally, CLASS is a proprietary dataset containing item page view events from an online classified site. Datasets were subjugated to minor preprocessing then split into train and test sets so that a whole session either belongs to the train or to the test set. The split is based on the time of the first event of the sessions. The datsets and the split are exactly the same for RSC15 as in Hidasi et al. (2016a); and for VIDXL and CLASS as in Hidasi et al. (2016b). VIDEO is of the same source as in Hidasi et al. (2016a), but a slightly different subset. Table 1 overviews the main properties of the datasets.
|
| 176 |
+
|
| 177 |
+
Table 1: Properties of the datasets.
|
| 178 |
+
|
| 179 |
+
<table><tr><td>Data</td><td colspan="2">Train set</td><td colspan="2">Test set</td><td>Items</td></tr><tr><td></td><td>Sessions</td><td>Events</td><td>Sessions</td><td>Events</td><td></td></tr><tr><td>RSC15</td><td>7,966,257</td><td>31,637,239</td><td>15,324</td><td>71,222</td><td>37,483</td></tr><tr><td>VIDEO</td><td>2,144,930</td><td>10,214,429</td><td>29,804</td><td>153,157</td><td>262.050</td></tr><tr><td>VIDXL</td><td>17,419,964</td><td>69,312,698</td><td>216,725</td><td>921,202</td><td>712,824</td></tr><tr><td>CLASS</td><td>1,173.094</td><td>9,011,321</td><td>35,741</td><td>254,857</td><td>339.055</td></tr></table>
|
| 180 |
+
|
| 181 |
+
Evaluation is done under the next item prediction scenario, that is we iterate over test sessions and events therein. For each event, the algorithm guesses the item of the next event of that session. Since the size of the VIDXL test set is large, we compare the target item’s score to that of the $5 0 , 0 0 0 \mathrm { m o s t }$ popular items during testing, similarly to Hidasi et al. (2016b). While this evaluation for VIDXL overestimates the performance, the comparison of algorithms remain fair Bellogin et al. (2011). As recommender systems can only recommend a few items at once, the actual item a user might pick should be amongst the first few items of the list. Therefore, our primary evaluation metric is recall $\textcircled{ a} 2 0$ that is the proportion of cases having the desired item amongst the top-20 items in all test cases. Recall does not consider the actual rank of the item as long as it is amongst the top-N. This models certain practical scenarios well where there is no highlighting of recommendations and the absolute order does not matter. Recall also usually correlates well with important online KPIs, such as click-through rate (CTR)Liu et al. (2012); Hidasi & Tikk (2012). The second metric used in the experiments is MRR $@ 2 0$ (Mean Reciprocal Rank). That is the average of reciprocal ranks of the desired items. The reciprocal rank is set to zero if the rank is above 20. MRR takes into account the rank of the item, which is important in cases where the order of recommendations matter (e.g. the lower ranked items are only visible after scrolling).
|
| 182 |
+
|
| 183 |
+
The natural baseline we use is the original GRU4Rec algorithm, upon which we aim to improve. We consider the results with the originally proposed TOP1 loss and tanh activation function on the output to be the baseline. The hidden layer has 100 units. We also indicate the performance of item-kNN, a natural baseline for next item prediction. Results for RSC15, VIDXL and CLASS are taken directly from corresponding papers Hidasi et al. (2016a;b) and measured with the optimal hyperparameters in Hidasi et al. (2016a) for VIDEO. We do separate hyperparameter optimization on a separate validation set for the proposed improvements.
|
| 184 |
+
|
| 185 |
+
The methods are implemented under the Theano framework Al-Rfou et al. (2016) in python. Experiments were run on various GPUs, training times were measured on an unloaded Titan X (Maxwell) GPU. Code is available publicly on GitHub10 for reproducibility.
|
| 186 |
+
|
| 187 |
+
# 4.1 USING ADDITIONAL SAMPLES
|
| 188 |
+
|
| 189 |
+
The first set of experiments examines the effect of additional negative samples on recommendation accuracy. Experiments were performed on the CLASS and the VIDEO datasets. Since results are quite similar we excluded the VIDEO results to save some space. Figure 3a depicts the performance of the network with TOP1, cross-entropy, TOP1-max and BPR-max losses. Recommendation accuracy was measured with different number of additional samples, as well as in the case when all scores are computed and there is no sampling. As we discussed earlier, this latter scenario is a more theoretical one, because it is not scalable. As theory suggests (see Section 3), the TOP1 loss does not cope well with lots of samples. There is a slight increase in performance with a few extra samples, as the chance of having relevant samples increases; but performance quickly degrades as sample size grow, thus lots of irrelevant samples are included. On the other hand, all three of the other losses react well to adding more samples. The point of diminishing return is around a few thousand of extra samples for cross-entropy. TOP1-max starts to slightly lose accuracy after that. BPR-max improves with more samples all the way, but slightly loses accuracy when all items are used.
|
| 190 |
+
|
| 191 |
+

|
| 192 |
+
Figure 3: Results on the CLASS dataset. ”ALL” means no sampling of items.
|
| 193 |
+
|
| 194 |
+
Adding extra samples increase computational cost, yet due to easy parallelization on modern GPUs most of this cost is alleviated. Figure 3b shows the training times at different sample sizes. Please note the logarithmic scale. The actual training time depends on not just the dataset, but model parameters (especially mini-batch size) and how certain operators used for computing the loss are supported by the framework. The trend, however, is similar to for all losses. For example, the full training of the network is around 10 minutes (with the settings for cross-entropy or TOP1-max), which does not increase with even 512 extra samples. At the point of diminishing returns, i.e. at 2048 extra samples, training time is around 15 minutes, which is also totally acceptable. After that, training times grow quickly, due to exceeding the parallelization capabilities of the GPU we used. The trend is similar on the VIDEO dataset, with training times starting around 50 minutes, starting to increase at 2048 extra samples (to 80 minutes) and quickly above thereafter. This means that the proposed method can be used with zero too little additional cost in practice, unlike data augmentation methods. It is also clear that GRU4Rec can work just as well with a few thousands of negative examples as with the whole itemset, thus it can be kept scalable.
|
| 195 |
+
|
| 196 |
+
In the next experiment we perform a parameter sensitivity analysis of the $\alpha$ parameter that controls the sampling. Figure 4 depicts the performance over different $\alpha$ values for the cross-entropy, TOP1- max and BPR-max losses. Cross-entropy favors higher $\alpha$ values with low sample sizes and low $\alpha$ values for large samples. This is inline with our discussion in Section 2: popular samples are useful when the sample size is very limited and at the beginning of the training, but might be exhausted quickly, thus switching to a more balanced sampling can be beneficial if we have the means to (e.g. large enough sample size). Also, the uniform sampling in this case is supplemented by the few popularity based samples of the mini-batch sampling. The ranking-max losses, on the other hand, seem to prefer the middle road with a slight preference towards higher values, while the extremes perform the worst. We assume that this is mostly due to (a) being based on pairwise losses, where popular samples are usually desired; (b) and the score regularization: with popularity based sampling the scores of the most popular items would be decreased beyond what is desirable.
|
| 197 |
+
|
| 198 |
+

|
| 199 |
+
Figure 4: The effect of the alpha parameter on recommendation accuracy at different sample sizes on the CLASS dataset. Left: cross-entropy loss; Middle: TOP1-max loss; Right: BPR-max loss.
|
| 200 |
+
|
| 201 |
+
Table 2: Recommendation accuracy with additional samples and different loss functions compared to item-kNN and the original GRU4Rec. Improvements over item-kNN and the original GRU4Rec (with TOP1 loss) results are shown in parentheses. Best results are typeset bold.
|
| 202 |
+
|
| 203 |
+
<table><tr><td rowspan="2">Dataset</td><td rowspan="2">Item kNN</td><td colspan="2">GRU4Rec original</td><td colspan="4">GRU4Rec with additional samples</td></tr><tr><td></td><td>XE</td><td>TOP1</td><td>XE</td><td>TOP1-max</td><td>BPR-max</td></tr><tr><td colspan="8">Recall@20</td></tr><tr><td>RSC15</td><td>0.5065</td><td>0.5853</td><td>0.5781</td><td>0.6117 (+20.77%,+4.51%)</td><td>0.7112 (+40.41%,+21.51%)</td><td>0.7086 (+39.91%,+21.07%)</td><td>0.7190 (+41.95%,+22.84%)</td></tr><tr><td>VIDEO VIDXL</td><td>0.5201</td><td>0.5051</td><td>0.5060</td><td>0.5325 (+2.40%,+5.43%)</td><td>0.6222 (+19.63%,+23.18%)</td><td>0.6421 (+23.46%,+27.12%)</td><td>0.6524 (+25.44%,+29.16%)</td></tr><tr><td>CLASS</td><td>0.6263 0.2201</td><td>0.6831 0.2478</td><td>0.7046 0.2545</td><td>0.6723 (+7.35%,-1.58%) 0.2342 (+6.41%,-5.50%)</td><td>0.7972 (+27.29%,+16.70%) 0.3099 (+40.83%,+25.07%)</td><td>0.7935 (+26.70%,+16.16%) 0.3252 (+47.75%,+31.22%)</td><td>0.8020 (+28.05%,+17.41%) 0.3342 (+51.84%,+34.87%)</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td colspan="8">MRR@20</td></tr><tr><td>RSC15</td><td>0.2048</td><td>0.2305</td><td>0.2375</td><td>0.2367 (+15.61%,+2.69%)</td><td>0.3059 (+49.41%,+32.71%)</td><td>0.3045 (+48.70%,+32.08%)</td><td>0.3119 (+52.29%,+35.31%)</td></tr><tr><td>VIDEO VIDXL</td><td>0.2257</td><td>0.2359</td><td>0.2609</td><td>0.2295 (+1.69%,-2.73%)</td><td>0.2970 (+31.63%,+25.92%)</td><td>0.2950 (+30.72%,+25.05%)</td><td>0.3019 (+33.76%, +27.98%)</td></tr><tr><td>CLASS</td><td>0.3740</td><td>0.3847</td><td>0.4343</td><td>0.3608 (-3.53%,-6.21%)</td><td>0.5023 (+34.31%, +30.59%)</td><td>0.4939 (+32.05%,+28.39%)</td><td>0.5013 (+34.01%,+30.30%)</td></tr><tr><td></td><td>0.0799</td><td>0.0949</td><td>0.0995</td><td>0.0870 (+8.83%,-8.36%)</td><td>0.1176 (+47.14%,+23.90%)</td><td>0.1198 (+49.93%,+26.25%)</td><td>0.1207 (+51.06%,+27.19%)</td></tr></table>
|
| 204 |
+
|
| 205 |
+
# 4.2 LOSS-FUNCTIONS
|
| 206 |
+
|
| 207 |
+
We measure the performance gain of the proposed improvements over the baselines. The big accuracy improvement comes from the combination of additional samples and the loss functions (fixed cross-entropy, TOP1-max and BPR-max). Table 2 showcases our most important results. Besides the original version of GRU4Rec and the item-kNN, we included results with cross-entropy (XE) loss without additional sampling to confirm that the fixed cross-entropy loss still performs just slightly better than TOP1. The increase with sampling and the proper loss function is stunning as the best results exceed the accuracy of the original GRU4Rec by $1 5 - 3 5 \%$ and that of item-kNN by up to $5 2 \%$ . BPR-max even performs slightly better $( + 1 - 7 \% )$ than cross-entropy on 3 of 4 datasets and achieves similar results on the remaining one dataset.
|
| 208 |
+
|
| 209 |
+
On RSC15, Tan et al. (2016) reported $\sim 0 . 6 8 5$ and $\sim 0 . 2 9$ in recall $@ 2 0$ and MRR $\textcircled{ a} 2 0$ respectively11 using data augmentation. Unlike our solutions, data augmentation greatly increases training times. Data augmentation and our improvements are not mutually exclusive, thus it is possible that combining the two methods, even better results can be achieved. A very recent paper Chatzis et al. (2017) proposes the Bayesian version of GRU4Rec and reports $\sim 0 . 6 1$ and $\sim 0 . 2 5$ in recall $\textcircled{ a} 2 0$ and MRR $@ 2 0$ when using 100 units12. Therefore our GRU4Rec version is the current best performer so far.
|
| 210 |
+
|
| 211 |
+
Table 3: Results with unified embeddings
|
| 212 |
+
|
| 213 |
+
<table><tr><td>Dataset</td><td>Recall@20</td><td>MRR@20</td></tr><tr><td>RSC15</td><td>0.7220</td><td>0.3070</td></tr><tr><td>VIDEO</td><td>0.6612</td><td>0.2923</td></tr><tr><td>VIDXL</td><td>0.8045</td><td>0.4915</td></tr><tr><td>CLASS</td><td>0.3844</td><td>0.1471</td></tr></table>
|
| 214 |
+
|
| 215 |
+
# 4.3 UNIFIED ITEM REPRESENTATIONS
|
| 216 |
+
|
| 217 |
+
Previous experiments did not find any benefits of using an embedding layer before the GRU layers. The role of the embedding layer is to translate item IDs into the latent representation space. In the recommender systems terminology, item embeddings correspond to “item feature vectors”. The network has another “item feature matrix” in the form of the output weight matrix. By unifying the representations, i.e. sharing the weight matrix between the embedding layer and the output layer, we learn better item representations quicker. Preliminary experiments (Table 3) show additional improvements in recall $\textcircled{ a} 2 0$ and slight decrease in $\mathbf { M R R } @ 2 0$ for most of the datasets, however, for the CLASS dataset both recall and MRR are increased significantly when unified embeddings are used $( + 1 5 . 0 2 \%$ and $+ 2 1 . 8 7 \%$ in recall and MRR respectively, compared to the model trained without embeddings).
|
| 218 |
+
|
| 219 |
+
# 5 CONCLUSION
|
| 220 |
+
|
| 221 |
+
We introduced a new class of loss function that together with an improved sampling strategy have provided impressive top- $\mathbf { \nabla } \cdot \mathbf { k }$ gains for RNNs for session-based recommendations. We believe that these new losses could be more generally applicable and along with the corresponding sampling strategies also provide top- $\mathbf { \nabla } \cdot \mathbf { k }$ gains for different recommendations settings and algorithms such as e.g. matrix factorization or autoencoders. It is also conceivable that these techniques could also provide similar benefits in the area of Natural Language Processing a domain that shares significant similarities to the recommendation domain in terms of machine learning (e.g. ranking, retrieval) and data structure (e.g. sparse large input and output space).
|
| 222 |
+
|
| 223 |
+
# REFERENCES
|
| 224 |
+
|
| 225 |
+
Rami Al-Rfou, Guillaume Alain, Amjad Almahairi, Christof Angermueller, Dzmitry Bahdanau, Nicolas Ballas, Fred´ eric Bastien, Justin Bayer, Anatoly Belikov, Alexander Belopolsky, et al. ´ Theano: A python framework for fast computation of mathematical expressions. arXiv preprint arXiv:1605.02688, 2016.
|
| 226 |
+
Alejandro Bellogin, Pablo Castells, and Ivan Cantador. Precision-oriented evaluation of recommender systems: An algorithmic comparison. In RecSys’11: 5th ACM Conf. on Recommender Systems, pp. 333–336, 2011. ISBN 978-1-4503-0683-6. doi: 10.1145/2043932.2043996. URL http://doi.acm.org/10.1145/2043932.2043996.
|
| 227 |
+
Chris J.C. Burges. From ranknet to lambdarank to lambdamart: An overview. Technical report, June 2010. URL https://www.microsoft.com/en-us/research/publication/ from-ranknet-to-lambdarank-to-lambdamart-an-overview/.
|
| 228 |
+
Sotirios Chatzis, Panayiotis Christodoulou, and Andreas S Andreou. Recurrent latent variable networks for session-based recommendation. arXiv preprint arXiv:1706.04026, 2017.
|
| 229 |
+
Kyunghyun Cho, Bart van Merrienboer, Dzmitry Bahdanau, and Yoshua Bengio. On the properties ¨ of neural machine translation: Encoder–decoder approaches. In SSST-8: 8th Workshop on Syntax, Semantics and Structure in Statistical Translation, pp. 103–111, 2014.
|
| 230 |
+
Robin Devooght and Hugues Bersini. Collaborative filtering with recurrent neural networks. arXiv preprint arXiv:1608.07400, 2016.
|
| 231 |
+
B. Hidasi and D. Tikk. Fast ALS-based tensor factorization for context-aware recommendation from implicit feedback. In ECML-PKDD’12, Part II, number 7524 in LNCS, pp. 67–82. Springer, 2012.
|
| 232 |
+
|
| 233 |
+
Balazs Hidasi, Alexandros Karatzoglou, Linas Baltrunas, and Domonkos Tikk. Session-based rec- ´ ommendations with recurrent neural networks. International Conference on Learning Representations, 2016a. URL http://arxiv.org/abs/1511.06939.
|
| 234 |
+
|
| 235 |
+
Balazs Hidasi, Massimo Quadrana, Alexandros Karatzoglou, and Domonkos Tikk. Parallel recurrent ´ neural network architectures for feature-rich session-based recommendations. In Proceedings of the 10th ACM Conference on Recommender Systems, RecSys ’16, pp. 241–248, New York, NY, USA, 2016b. ACM. ISBN 978-1-4503-4035-9. doi: 10.1145/2959100.2959167. URL http: //doi.acm.org/10.1145/2959100.2959167.
|
| 236 |
+
|
| 237 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
|
| 238 |
+
|
| 239 |
+
Shihao Ji, SVN Vishwanathan, Nadathur Satish, Michael J Anderson, and Pradeep Dubey. Blackout: Speeding up recurrent neural network language models with very large vocabularies. ICLR, 2016.
|
| 240 |
+
|
| 241 |
+
Yehuda Koren and Joe Sill. Ordrec: An ordinal model for predicting personalized item rating distributions. In Proceedings of the Fifth ACM Conference on Recommender Systems, RecSys ’11, pp. 117–124, New York, NY, USA, 2011. ACM.
|
| 242 |
+
|
| 243 |
+
G. Linden, B. Smith, and J. York. Amazon.com recommendations: Item-to-item collaborative filtering. Internet Computing, IEEE, 7(1):76–80, 2003.
|
| 244 |
+
|
| 245 |
+
Qiwen Liu, Tianjian Chen, Jing Cai, and Dianhai Yu. Enlister: Baidu’s recommender system for the biggest Chinese Q&A website. In RecSys-12: Proc. of the 6th ACM Conf. on Recommender Systems, pp. 285–288, 2012.
|
| 246 |
+
|
| 247 |
+
S. Rendle, C. Freudenthaler, Z. Gantner, and L. Schmidt-Thieme. BPR: Bayesian personalized ranking from implicit feedback. In UAI’09: $2 5 ^ { t h }$ Conf. on Uncertainty in Artificial Intelligence, pp. 452–461, 2009a. ISBN 978-0-9749039-5-8.
|
| 248 |
+
|
| 249 |
+
Steffen Rendle, Christoph Freudenthaler, Zeno Gantner, and Lars Schmidt-Thieme. Bpr: Bayesian personalized ranking from implicit feedback. In Proceedings of the Twenty-Fifth Conference on Uncertainty in Artificial Intelligence, UAI ’09, pp. 452–461, 2009b.
|
| 250 |
+
|
| 251 |
+
Badrul Sarwar, George Karypis, Joseph Konstan, and John Riedl. Item-based collaborative filtering recommendation algorithms. In WWW:01: 10th Int. Conf. on World Wide Web, pp. 285–295, 2001.
|
| 252 |
+
|
| 253 |
+
Yue Shi, Alexandros Karatzoglou, Linas Baltrunas, Martha Larson, Nuria Oliver, and Alan Hanjalic. Climf: Learning to maximize reciprocal rank with collaborative less-is-more filtering. In Proceedings of the Sixth ACM Conference on Recommender Systems, RecSys ’12, pp. 139–146, 2012. ISBN 978-1-4503-1270-7. doi: 10.1145/2365952.2365981. URL http://doi.acm. org/10.1145/2365952.2365981.
|
| 254 |
+
|
| 255 |
+
Yong Kiam Tan, Xinxing Xu, and Yong Liu. Improved recurrent neural networks for session-based recommendations. In Proceedings of the 1st Workshop on Deep Learning for Recommender Systems, DLRS 2016, pp. 17–22, New York, NY, USA, 2016. ACM. ISBN 978-1-4503-4795- 2. doi: 10.1145/2988450.2988452. URL http://doi.acm.org/10.1145/2988450. 2988452.
|
| 256 |
+
|
| 257 |
+
Markus Weimer, Alexandros Karatzoglou, Quoc Viet Le, and Alex Smola. Cofirank maximum margin matrix factorization for collaborative ranking. In Proceedings of the 20th International Conference on Neural Information Processing Systems, NIPS’07, pp. 1593–1600, 2007.
|
| 258 |
+
|
| 259 |
+
Chao-Yuan Wu, Amr Ahmed, Alex Beutel, Alexander J. Smola, and How Jing. Recurrent recommender networks. In Proceedings of the Tenth ACM International Conference on Web Search and Data Mining, WSDM ’17, pp. 495–503, New York, NY, USA, 2017. ACM.
|
md/train/uqv8-U4lKBe/uqv8-U4lKBe.md
ADDED
|
@@ -0,0 +1,322 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Deep Reinforcement Learning at the Edge of the Statistical Precipice
|
| 2 |
+
|
| 3 |
+
Max Schwarzer MILA, Université de Montréal
|
| 4 |
+
|
| 5 |
+
Rishabh Agarwal∗ Google Research, Brain Team MILA, Université de Montréal
|
| 6 |
+
|
| 7 |
+
Pablo Samuel Castro Google Research, Brain Team
|
| 8 |
+
|
| 9 |
+
Aaron Courville MILA, Université de Montréal
|
| 10 |
+
|
| 11 |
+
Marc G. Bellemare Google Research, Brain Team
|
| 12 |
+
|
| 13 |
+
# Abstract
|
| 14 |
+
|
| 15 |
+
Deep reinforcement learning (RL) algorithms are predominantly evaluated by comparing their relative performance on a large suite of tasks. Most published results on deep RL benchmarks compare point estimates of aggregate performance such as mean and median scores across tasks, ignoring the statistical uncertainty implied by the use of a finite number of training runs. Beginning with the Arcade Learning Environment (ALE), the shift towards computationally-demanding benchmarks has led to the practice of evaluating only a small number of runs per task, exacerbating the statistical uncertainty in point estimates. In this paper, we argue that reliable evaluation in the few-run deep RL regime cannot ignore the uncertainty in results without running the risk of slowing down progress in the field. We illustrate this point using a case study on the Atari $1 0 0 \mathrm { k }$ benchmark, where we find substantial discrepancies between conclusions drawn from point estimates alone versus a more thorough statistical analysis. With the aim of increasing the field’s confidence in reported results with a handful of runs, we advocate for reporting interval estimates of aggregate performance and propose performance profiles to account for the variability in results, as well as present more robust and efficient aggregate metrics, such as interquartile mean scores, to achieve small uncertainty in results. Using such statistical tools, we scrutinize performance evaluations of existing algorithms on other widely used RL benchmarks including the ALE, Procgen, and the DeepMind Control Suite, again revealing discrepancies in prior comparisons. Our findings call for a change in how we evaluate performance in deep RL, for which we present a more rigorous evaluation methodology, accompanied with an open-source library rliable2, to prevent unreliable results from stagnating the field.
|
| 16 |
+
|
| 17 |
+
# 1 Introduction
|
| 18 |
+
|
| 19 |
+
Research in artificial intelligence, and particularly deep reinforcement learning (RL), relies on evaluating aggregate performance on a diverse suite of tasks to assess progress. Quantitative evaluation on a suite of tasks, such as Atari games [5], reveals strengths and limitations of methods while simultaneously guiding researchers towards methods with promising results. Performance of RL algorithms is usually summarized with a point estimate of task performance measure, such as mean and median performance across tasks, aggregated over independent training runs.
|
| 20 |
+
|
| 21 |
+
estimates. While evaluating more runs per task has been prescribed to reduce uncertainty and obtain reliable estimates [20, 41, 49], 3-10 runs are prevalent in deep RL as it is often computationally prohibitive to evaluate more runs. For example, 5 runs each on $5 0 +$ Atari 2600 games in ALE using standard protocol requires more than 1000 GPU training days [15]. As we move towards more challenging and complex RL benchmarks (e.g., StarCraft [110]), evaluating more than a handful of runs will become increasingly demanding due to increased amount of compute and data needed to tackle such tasks. Additional confounding factors, such as exploration in the low-data regime, exacerbates the performance variability in deep RL – as seen on the Atari $1 0 0 \mathrm { k }$ benchmark [50] – often requiring many more runs to achieve negligible statistical uncertainty in reported estimates.
|
| 22 |
+
|
| 23 |
+
Ignoring the statistical uncertainty in deep RL results gives a false impression of fast scientific progress in the field. It inevitably evades the question: “Would similar findings be obtained with new independent runs under different random conditions?” This could steer researchers towards superficially beneficial methods [11, 12, 25], often at the expense of better methods being neglected or even rejected early [67, 74] as such methods fail to outperform inferior methods simply due to less favorable random conditions. Furthermore, only reporting point estimates obscures nuances in comparisons [85] and can erroneously lead the field to conclude which methods are state-ofthe-art [63, 84], ensuing wasted effort when applied in practice [108]. Moreover, not report
|
| 24 |
+
|
| 25 |
+

|
| 26 |
+
Figure 1: Number of runs in RL over the years. Beginning with DQN [75] on the ALE, 5 or less runs are common in the field. Here, we show representative RL papers with empirical results, in the order of their publication year: TD-learning [99], Sparse coding [100], Options [102], Tetris (CEM) [103], Batch-Q [31], ALE [5], DQN [75], AlphaGo [96], A3C [76], DDPG [62], ES [88], PPO [92], SAC [36], Rainbow [42], AlphaStar [110], GoExplore [28], OpenAI Five [8], Balloon navigation [7] and MuZero [91].
|
| 27 |
+
|
| 28 |
+
ing the uncertainty in deep RL results makes them difficult to reproduce except under the exact same random conditions, which could lead to a reproducibility crisis similar to the one that plagues other fields [4, 44, 78]. Finally, unreliable results could erode trust in deep RL research itself [45].
|
| 29 |
+
|
| 30 |
+
In this work, we show that recent deep RL papers compare unreliable point estimates, which are dominated by statistical uncertainty, as well as exploit non-standard evaluation protocols, using a case study on Atari 100k (Section 3). Then, we illustrate how to reliably evaluate performance with only a handful of runs using a more rigorous evaluation methodology that accounts for uncertainty in results (Section 4). To exemplify the necessity of such methodology, we scrutinize performance evaluations of existing algorithms on widely used benchmarks, including the ALE [5] (Atari $1 0 0 \mathrm { k }$ , Atari 200M), Procgen [18] and DeepMind Control Suite [104], again revealing discrepancies in prior comparisons (Section 5). Our findings call for a change in how we evaluate performance in deep RL, for which we present a better methodology to prevent unreliable results from stagnating the field.
|
| 31 |
+
|
| 32 |
+
How do we reliably evaluate performance on deep RL benchmarks with only a handful of runs? As a practical solution that is easily applicable with 3-10 runs per task, we identify three statistical tools (Table 1) for improving the quality of experimental reporting. Since any performance estimate based on a finite number of runs is a random variable, we argue that it should be treated as such. Specifically, we argue for reporting aggregate performance measures using interval estimates via stratified bootstrap confidence intervals, as opposed to point estimates. Among prevalent aggregate measures, mean can be easily dominated by performance on a few outlier tasks, while median has high variability and zero performance on nearly half of the tasks does not change it. To address these deficiencies, we present more efficient and robust alternatives, such as interquartile mean, which are not unduly affected by outliers and have small uncertainty even with a handful of runs. Furthermore, to reveal the variability in performance across tasks, we propose reporting performance distributions across all runs. Compared to prior work [5, 83], these distributions result in performance profiles [26] that are statistically unbiased, more robust to outliers, and require fewer runs for smaller uncertainty.
|
| 33 |
+
|
| 34 |
+
# 2 Formalism
|
| 35 |
+
|
| 36 |
+
We consider the setting in which a reinforcement learning algorithm is evaluated on $M$ tasks. For each of these tasks, we perform $N$ independent runs3 which each provide a scalar, normalized score $x _ { m , n }$ , $m = 1 , \ldots , M$ and $n = 1 , \ldots , N$ . These normalized scores are obtained by linearly rescaling per-task scores4 based on two reference points; for example, performance on the Atari games is typically normalized with respect to a random agent and an average human, who are assigned a normalized score of 0 and 1 respectively [75]. We denote the set of normalized scores by $x _ { 1 : M , 1 : N }$ .
|
| 37 |
+
|
| 38 |
+
Table 1: Our recommendations for reliable evaluation, easily applicable with a handful of runs. Refer to Section 4 for details about recommendations and Section 5 for their application to widely-used RL benchmarks.
|
| 39 |
+
|
| 40 |
+
<table><tr><td>Desideratum</td><td>Current Evaluation Protocol</td><td>Our Recommendation</td></tr><tr><td>Uncertainty in aggregate performance</td><td>Point estimates · Ignore statistical uncertainty ·Hinder resultsreproducibility</td><td>Interval estimates via stratified bootstrap confidence intervals</td></tr><tr><td>Variability in performance across tasks and runs</td><td>Tables with mean scores per task · Overwhelming beyond a few tasks ·Standard deviations often omitted · Incomplete picture for multimodal and heavy-tailed distributions</td><td>Performance profiles (score distributions) · Show tail distribution of scores on com- bined runs across tasks · Allow qualitative comparisons ·Easily read any score percentile</td></tr><tr><td>Aggregate metrics for sum- marizing performance across tasks</td><td>Mean ·Often dominated by performance on outlier tasks Median · Requires large number of runs to claim improvements · Poor indicator of overall perfor-</td><td>Interquartile Mean (IQM) across all runs ·Performance on middle 5O% of com- bined runs · Robust to outlier scores but more statis- tically efficient than median To show other aspects of performance gains, report average probability of improvement</td></tr></table>
|
| 41 |
+
|
| 42 |
+
In most experiments, there is inherent randomness in the scores obtained from different runs. This randomness can arise from stochasticity in the task, exploratory choices made during learning, randomized initial parameters, but also software and hardware considerations such as non-determinism in GPUs and in machine learning frameworks [116]. Thus, we model the algorithm’s normalized score on the $m ^ { t h }$ task as a real-valued random variable $X _ { m }$ . Then, the score $x _ { m , n }$ is a realization of the random variable $X _ { m , n }$ , which is identically distributed as $X _ { m }$ . For $\tau \in \mathbb { R }$ , we define the tail distribution function of $X _ { m }$ as $F _ { m } ( \tau ) = \mathrm { P } ( \dot { X } _ { m } > \tau )$ . For any collection of scores $y _ { 1 : K }$ , the empirical tail distribution function is given by $\begin{array} { r } { \hat { F } ( \tau ; y _ { 1 : K } ) = \frac { 1 } { K } \sum _ { k = 1 } ^ { K } \mathbb { 1 } [ y _ { k } > \tau ] } \end{array}$ . In particular, we write $\hat { F } _ { m } ( \tau ) = \hat { F } ( \tau ; x _ { m , 1 : N } )$ .
|
| 43 |
+
|
| 44 |
+
The aggregate performance of an algorithm maps the set of normalized scores $x _ { 1 : M , 1 : N }$ to a scalar
|
| 45 |
+
value. Two prwe denote by $\begin{array} { r } { \bar { x } _ { m } = \frac { 1 } { N } \bar { \sum _ { n = 1 } ^ { N } } \bar { x _ { m , n } } } \end{array}$ fo t metrics are the age score on task $m$ an and across $N$ dian normalized scores. Ifruns, then these aggregate $\left( \hat { x } _ { 1 : M } \right)$ $\left( \hat { x } _ { 1 : M } \right)$
|
| 46 |
+
median over the task means since they are computed from a finite set of $N$ runs. Since $\hat { x } _ { m }$ is a
|
| 47 |
+
realization of the random variable $\begin{array} { r } { \bar { X } _ { m } = \frac { 1 } { N } \sum _ { n = 1 } ^ { \bar { N } } X _ { m , n } } \end{array}$ , the sample mean and median scores are
|
| 48 |
+
point estimates of the random variables Mean $\left( \hat { X } _ { 1 : M } \right)$ and Median $\left( \hat { X } _ { 1 : M } \right)$ respectively. We call true
|
| 49 |
+
mean and true median the metrics that would be obtained if we had unlimited experimental capacity $N \to \infty$ ), given by Mea $\mathsf { 1 } \big ( \mathbb { E } [ X _ { 1 : M } ] \big )$ and Median $\left( \mathbb { E } [ X _ { 1 : M } ] \right)$ respectively.
|
| 50 |
+
|
| 51 |
+
Confidence intervals (CIs) for a finite-sample score can be interpreted as an estimate of plausible values for the true score. A $\alpha \times 1 0 0 \%$ CI computes an interval such that if we rerun the experiment and construct the CI using a different set of runs, the fraction of calculated CIs (which would differ for each set of runs) that contain the true score would tend towards $\alpha \times 1 0 0 \%$ , where $\alpha \in [ 0 , 1 ]$ is the nominal coverage rate. $9 5 \%$ CIs are typically used in practice. If the true score lies outside the $9 5 \%$ CI, then a sampling event has occurred which had a probability of $5 \%$ of happening by chance.
|
| 52 |
+
|
| 53 |
+

|
| 54 |
+
Figure 2: Left. Distribution of median normalized scores computed using 100,000 different sets of $N$ runs subsampled uniformly with replacement from 100 runs. For a given algorithm, the sampling distribution shows the variation in the median scores when re-estimated using a different set of runs. The reported point estimates of median in publications, as shown by dashed lines, do not provide any information about the variability in median scores and severely overestimate or underestimate the expected median. We use the same number of runs as reported by publications: $N = 5$ runs for DER, OTR and DrQ, $N = 1 0$ runs for SPR and $N = 2 0$ runs for CURL. Right. $9 5 \%$ CIs for median and IQM scores (Section 4.3) for varying $N$ . There is a substantial uncertainty in median scores even with 50 runs. IQM has much smaller CIs than median. Note that when CIs overlap, properly accounting for uncertainty entails computing CIs for score differences (Figure A.15).
|
| 55 |
+
|
| 56 |
+
Remark. Following Amrhein et al. [2], Romer [87], Wasserstein et al. [112], we recommend using confidence intervals for measuring the uncertainty in results and showing effect sizes (e.g., performance improvements over baseline) that are compatible with the given data. Furthermore, we emphasize using statistical thinking but avoid statistical significance tests (e.g., $p$ -value $< 0 . 0 5 )$ because of their dichotomous nature (significant vs. not significant) and common misinterpretations [33, 35, 73] such as 1) lack of statistically significant results does not demonstrate the absence of effect (Figure 2, right), and 2) given enough data, any trivial effect can be statistically significant but may not be practically significant.
|
| 57 |
+
|
| 58 |
+
# 3 Case Study: The Atari 100k benchmark
|
| 59 |
+
|
| 60 |
+
We begin with a case study to illustrate the pitfalls arising from the naïve use of point estimates in the few-run regime. Our case study concerns the Atari 100k benchmark [50], an offshoot of the ALE for evaluating data-efficiency in deep RL. In this benchmark, algorithms are evaluated on only $1 0 0 \mathrm { k }$ steps (2-3 hours of game-play) for each of its 26 games, versus 200M frames in the ALE benchmark. Prior reported results on this benchmark have been computed mostly from 3 [39, 55, 59, 72, 89, 95] or 5 runs [50, 51, 53, 54, 64, 66, 86, 107, 115], and more rarely, 10 [65, 93] or 20 runs [56].
|
| 61 |
+
|
| 62 |
+
Our case study compares the performance of five recent deep RL algorithms, namely: (1) DER [107] and (2) OTR [51], (3) DrQ5 [53], (4) CURL [56], and (5) SPR [93]. We chose these methods as representative of influential algorithms within this benchmark. Since good performance on one game can result in unduly high sample means without providing much information about performance on other games, it is common to measure performance on Atari $1 0 0 \mathrm { k }$ using sample medians. Refer to Appendix A.2 for more details about the experimental setup.
|
| 63 |
+
|
| 64 |
+
We investigate statistical variations in the few-run regime by evaluating 100 independent runs for each algorithm, where the score for a run is the average returns obtained in 100 evaluation episodes taking place after training. Each run corresponds to training one algorithm on each of the 26 games in Atari $1 0 0 \mathrm { k }$ . This provides us with $2 6 \times 1 0 0$ scores per algorithm, which we then subsample with replacement to 3–100 runs. The subsampled scores are then used to produce a collection of point estimates whose statistical variability can be measured. We begin by using this experimental protocol to highlight statistical concerns regarding median normalized scores.
|
| 65 |
+
|
| 66 |
+
High variability in reported results. Our first observation is that the sample medians reported in the literature exhibit substantial variability when viewed as random quantities that depend on a small number of sample runs (Figure 2, left). This shows that there is a fairly large potential for drawing erroneous conclusions based on point estimates alone. As a concrete example, our analysis suggests that DER may in fact be better than OTR, unlike what the reported point estimates suggest. We conclude that in the few-run regime, point estimates are unlikely to provide definitive answers to the question: “Would we draw the same conclusions were we to re-evaluate our algorithm with a different set of runs?”
|
| 67 |
+
|
| 68 |
+
Substantial bias in sample medians. The sample median is a biased estimator of the true median: $\mathbb { E } [ \mathbf { M e d i a n } ( \bar { X } _ { 1 : M } ) ] \neq$ Median $\left( \mathbb { E } [ X _ { 1 : M } ] \right)$ in general. In the few-run regime, we find that this bias can dominate the comparison between algorithms, as evidenced in Fig
|
| 69 |
+
|
| 70 |
+

|
| 71 |
+
Figure 3: Expected sample median of task means. The expected score for $N$ runs is computed by repeatedly subsampling $N$ runs with replacement out of 100 runs for 100,000 times.
|
| 72 |
+
|
| 73 |
+
ure 3. For example, the score difference between sample medians with 5 and 100 runs for SPR $( + 0 . 0 3$ points) is about $36 \%$ of its mean improvement over $\mathrm { D r Q } ( \varepsilon )$ $( + 0 . 0 8$ points). Adding to the issue, the magnitude and sign of this bias strongly depends on the algorithm being evaluated.
|
| 74 |
+
|
| 75 |
+
Statistical concerns cannot be satisfactorily addressed with few runs. While claiming improvements with 3 or fewer runs may naturally raise eyebrows, folk wisdom in experimental RL suggests that 20 or 30 runs are enough. By calculating $9 5 \%$ confidence interval6 on sample medians for a varying number of runs (Figure 2, right), we find that this number is closer to 50–100 runs in Atari $1 0 0 \mathrm { k }$ – far too many to be computationally feasible for most research projects.
|
| 76 |
+
|
| 77 |
+
Consider a setting in which an algorithm is known to be better – what is the reliability of median and IQM (Section 4.3) for accurately assessing performance differences as the number of runs varies? Specifically, we consider two identical $N$ -run experiments involving SPR, except that we artificially inflate one of the experiments’ scores by a fixed fraction or lift of $+ \ell \%$ (Figure 4). In particular, $\ell = 0$ corresponds to running the same experiment twice but with different runs. We find that statistically defensible improvements with median scores is only achieved for 25 runs $\ell = 2 5$ ) and 100 runs $\ell = 1 0$ ). With $\ell = 0$ , even 100 runs are insufficient, with deviations of $2 0 \%$ possible.
|
| 78 |
+
|
| 79 |
+
Changes in evaluation protocols invalidates comparisons to prior work. A typical and relatively safe approach for measuring the performance of an RL algorithm is to average the scores received in their final training episodes [69]. However, the field has seen a number of alternative protocols used, including reporting the maximum evaluation score achieved during training [1, 3, 75] or across multiple runs [32, 47, 82]. A similar protocol is also used by CURL and SUNRISE [59] (Appendix A.4).
|
| 80 |
+
|
| 81 |
+
Results produced under alternative protocols involving maximum are generally incomparable with end-performance reported results. On Atari 100k, we find that the two protocols produce substantially different results (Figure 5), of a magnitude greater than the actual difference in score. In particular, evaluating DER with CURL’s protocol results in scores far above those reported for CURL. In other words, this gap in evaluation procedures resulted in CURL being assessed as achieving a greater true median than DER, where our experiment gives strong support to DER being superior. Similarly, we find that a lot of SUNRISE’s improvement over DER can be explained by the change in evaluation protocol (Figure 5). Refer to Appendix A.4 for discussion on pitfalls of such alternative protocols.
|
| 82 |
+
|
| 83 |
+
# 4 Recommendations and Tools for Reliable Evaluation
|
| 84 |
+
|
| 85 |
+
Our case study shows that the increase in the number of runs required to address the statistical uncertainty issues is typically infeasible for computationally demanding deep RL benchmarks. In this section, we identify three tools for improving the quality of experimental reporting in the few-run regime, all aligned with the principle of accounting for statistical uncertainty in results.
|
| 86 |
+
|
| 87 |
+
# 4.1 Stratified Bootstrap Confidence Intervals
|
| 88 |
+
|
| 89 |
+
We first reaffirm the importance of reporting interval estimates to indicate the range within which an algorithm’s aggregate performance is believed to lie. Concretely, we propose using bootstrap CIs [29] with stratified sampling for aggregate performance, a method that can be applied to small sample sizes and is better justified than reporting sample standard deviations in this context. While prior work has recommended using bootstrap CIs for reporting uncertainty in single task mean scores with $N$ runs [16, 20, 41], this is less useful when $N$ is small (Figure A.18), as bootstrapping assumes that re-sampling from the data approximates sampling from the true distribution. We can do better by aggregating samples across tasks, for a total of $M N$ random samples.
|
| 90 |
+
|
| 91 |
+

|
| 92 |
+
Figure 4: Detecting score lifts. Left. $9 5 \%$ CIs for observed lift with median scores, and Right. $9 5 \%$ CIs for observed lift with IQM (Section 4.3) when comparing SPR with an algorithm that performs $\ell \%$ better. IQM requires fewer runs than median for small uncertainty.
|
| 93 |
+
|
| 94 |
+

|
| 95 |
+
Figure 5: Normalized DER scores with non-standard evaluation protocols. Gains from SUNRISE and CURL over DER can mostly be explained by such protocols.
|
| 96 |
+
|
| 97 |
+

|
| 98 |
+
Figure 6: Validating $95 \%$ Stratified Bootstrap CIs for a varying number of runs for median and IQM scores for DER. The true coverage $\%$ is computed by sampling 10,000 sets of K runs without replacement from 200 runs and checking the fraction of $9 5 \%$ CIs that contains the true estimate approximation based on 200 runs. Note that we evaluate additional 100 runs for DER for an accurate point estimate. Percentile CIs has the best coverage while achieving a small width compared to other methods. Also, CI widths for IQM are much smaller than that of median. We also note that with 3 runs, bootstrap CIs underestimate the true $9 5 \%$ CIs and might require a larger nominal coverage rate to achieve true $9 5 \%$ coverage.
|
| 99 |
+
|
| 100 |
+
To compute the stratified bootstrap CIs, we re-sample runs with replacement independently for each task to construct an empirical bootstrap sample with $N$ runs each for $M$ tasks from which we calculate a statistic and repeat this process many times to approximate the sampling distribution of the statistic. We measure the reliability of this technique in Atari $1 0 0 \mathrm { k }$ for variable $N$ , by comparing the nominal coverage of $9 5 \%$ to the “true” coverage from the estimated CIs (Figure 6) for different bootstrap methods (see [30] and Appendix A.5). We find that percentile CIs provide good interval estimates for as few as $N = 1 0$ runs for both median and IQM scores (Section 4.3).
|
| 101 |
+
|
| 102 |
+
# 4.2 Performance Profiles
|
| 103 |
+
|
| 104 |
+
Most deep RL benchmarks yield scores that vary widely between tasks and may be heavy-tailed, multimodal, or possess outliers (e.g., Figure A.14). In this regime, both point estimates, such as mean and median scores, and interval estimates of these quantities paint an incomplete picture of an algorithm’s performance [24, Section 3]. Instead, we recommend the use of performance profiles [26], commonly used in benchmarking optimization software. While performance profiles from Dolan and Moré [26] correspond to empirical cumulative distribution functions without any uncertainty estimates, profiles proposed herein visualize the empirical tail distribution function (Section 2) of a random score (higher curve is better), with pointwise confidence bands based on stratified bootstrap.
|
| 105 |
+
|
| 106 |
+
By representing the entire set of normalized scores $x _ { 1 : M , 1 : N }$ visually, performance profiles reveal performance variability across tasks much better than interval estimates of aggregate metrics. Although tables containing per-task mean scores and standard deviations can reveal this variability, such tables tend to be overwhelming for more than a few tasks.7 In addition, performance profiles are robust to outlier runs and insensitive to small changes in performance across all tasks [26].
|
| 107 |
+
|
| 108 |
+
In this paper, we propose the use of a performance profile we call run-score distributions or simply score distributions (Figure 7, right), particularly well-suited to the few-run regime. A score distribution shows the fraction of runs above a certain normalized score and is given by
|
| 109 |
+
|
| 110 |
+

|
| 111 |
+
Figure 7: Performance profiles on Atari 100k based on score distributions (left), which we recommend, and average score distributions (right). Shaded regions show pointwise $9 5 \%$ confidence bands based on percentile bootstrap with stratified sampling. The profiles on the left are more robust to outliers and have smaller confidence bands. We use 10 runs to show the robustness of profiles with a few runs. For SimPLe [50], we use the 5 runs from their reported results. The $\tau$ value where the profiles intersect $y = 0 . 5$ shows the median while for a non-negative random variable, area under the performance profile corresponds to the mean.
|
| 112 |
+
|
| 113 |
+
$$
|
| 114 |
+
\hat { F } _ { X } ( \tau ) = \hat { F } ( \tau ; x _ { 1 : M , 1 : N } ) = \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \hat { F } _ { m } ( \tau ) = \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \mathbb { 1 } [ x _ { m , n } > \tau ] .
|
| 115 |
+
$$
|
| 116 |
+
|
| 117 |
+
One advantage of the score distribution is that it is an unbiased estimator of the underlying distribution $\begin{array} { r } { F ( \tau ) = \frac { 1 } { N } \sum _ { m = 1 } ^ { M } F _ { m } ( \tau ) } \end{array}$ . Another advantage is that an outlier run with extremely high score can change the output of score distribution for any $\tau$ by at most a value of $\frac { 1 } { M N }$ .
|
| 118 |
+
|
| 119 |
+
It is useful to contrast score distributions to average-score distributions, originally proposed in the context of the ALE [5] as a generalization of the median score. Average-score distributions correspond to the performance profile of a random variable $\bar { X }$ , $\hat { F } _ { \bar { X } } ( \tau ) = \hat { F } ( \tau ; \bar { x } _ { 1 : M } )$ , which shows the fraction of tasks on which an algorithm performs better than a certain score. However, such distributions are a biased estimate of the thing they seek to represent. Run-score distributions are more robust than average-score distributions, as they are a step function in $1 / M N$ versus $1 / M$ intervals, and typically has less variance: $\begin{array} { r } { \sigma _ { X } ^ { 2 } = \frac { 1 } { M ^ { 2 } N } \sum _ { m = 1 } ^ { M } F _ { m } ( \tau ) ( 1 - F _ { m } ( \tau ) ) \quad } \end{array}$ versus $\begin{array} { r } { \sigma _ { \bar { X } } ^ { 2 } = \frac { 1 } { M ^ { 2 } } \sum _ { m = 1 } ^ { M } F _ { \bar { X } _ { m } } ( \tau ) ( 1 - F _ { \bar { X } _ { m } } ( \tau ) ) } \end{array}$ . Figure 7 illustrates these differences.
|
| 120 |
+
|
| 121 |
+
# 4.3 Robust and Efficient Aggregate Metrics
|
| 122 |
+
|
| 123 |
+
Performance profiles allow us to compare different methods at a glance. If one curve is strictly above another, the better method is said to stochastically dominate8 the other [27, 61]. In RL benchmarks with a large number of tasks, however, stochastic dominance is rarely observed: performance profiles often intersect at multiple points. Finer quantitative comparisons must therefore entail aggregate metrics.
|
| 124 |
+
|
| 125 |
+
We can extract a number of aggregate metrics from score distributions, including median (mixing runs and tasks) and mean normalized scores (matching our usual definition). As we already argued that these metrics are deficient, we now consider interesting alternatives also derived from score distributions.
|
| 126 |
+
|
| 127 |
+

|
| 128 |
+
Figure 8: Aggregate metrics. For a non-negative random variable $X$ , IQM corresponds to the red shaded region while optimality gap corresponds to the orange shaded region in the performance profile of $X$ .
|
| 129 |
+
|
| 130 |
+
culates the mean score of the remaining $50 \%$ runs $\scriptstyle ( = \lfloor N M / 2 \rfloor$ for $N$ runs each on $M$ tasks). IQM interpolates between mean and median across runs, which are $0 \%$ and almost $5 0 \%$ trimmed means respectively. Compared to sample median, IQM is a better indicator of overall performance as it is calculated using $50 \%$ of the combined runs while median only depends on the performance ordering across tasks and not on the magnitude except at most 2 tasks. For example, zero scores on nearly half of the tasks does not affect the median while IQM exhibits a severe degradation. Compared to mean, IQM is robust to outliers, yet has considerably less bias than median (Figure A.17). While median is more robust to outliers than IQM, this robustness comes at the expense of statistical efficiency, which is crucial in the few-run regime: IQM results in much smaller CIs (Figure 2 (right) and 6) and is able to detect a given improvement with far fewer runs (Figures 4 and A.15).
|
| 131 |
+
|
| 132 |
+

|
| 133 |
+
Figure 9: Aggregate metrics on Atari 200M with $9 5 \%$ CIs based on 55 games with sticky actions [69]. Higher mean, median and IQM scores and lower optimality gap are better. The CIs are estimated using the percentile bootstrap with stratified sampling. IQM typically results in smaller CIs than median scores. Large values of mean scores relative to median and IQM indicate being dominated by a few high performing tasks, for example, DreamerV2 and M-IQN obtain normalized scores above 50 on the game JAMESBOND. Optimality gap is less susceptible to outliers compared to mean scores. We compare DQN (Nature) [75], DQN with Adam optimizer, C51 [6], REM [1], Rainbow [42], IQN [22], Munchausen-IQN (M-IQN) [109], and DreamerV2 [38]. All results are based on 5 runs per game except for M-IQN and DreamerV2 which report results with 3 and 11 runs.
|
| 134 |
+
|
| 135 |
+
As a robust alternative to mean, we recommend using the optimality gap: the amount by which the algorithm fails to meet a minimum score of $\gamma = 1 . 0$ (orange region in Figure 8). This assumes that a score of 1.0 is a desirable target beyond which improvements are not very important, for example when the aim is to obtain human-level performance [e.g., 3, 23]. Naturally, the threshold $\gamma$ may be chosen differently, which we discuss further in Appendix A.7.
|
| 136 |
+
|
| 137 |
+
If one is interested in knowing how robust an improvement from an algorithm $X$ over an algorithm $Y$ is, another possible metric to consider is the average probability of improvement – this metric shows how likely it is for $X$ to outperform $Y$ on a randomly selected task. Specifically, $P ( X >$ $\begin{array} { r } { Y ) = \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \overset { \textstyle } { P } ( X _ { m } > Y _ { m } ) , } \end{array}$ , where $P ( X _ { m } > Y _ { m } )$ (Equation A.2) is the probability that $X$ is better than $Y$ on task $m$ . Note that, unlike IQM and optimality gap, this metric does not account for the size of improvement. While finding the best aggregate metric is still an open question and is often dependent on underlying normalized score distribution, our proposed alternatives avoid the failure modes of prevalent metrics while being robust and requiring fewer runs to reduce uncertainty.
|
| 138 |
+
|
| 139 |
+
# 5 Re-evaluating Evaluation on Deep RL Benchmarks
|
| 140 |
+
|
| 141 |
+
Arcade Learning Environment. Training RL agents for 200M frames on the ALE [5, 69] is the most widely recognized benchmark in deep RL. We revisit some popular methods which demonstrated progress on this benchmark and reveal discrepancies in their findings as a consequence of ignoring the uncertainty in their results (Figure 9). For example, DreamerV2 [38] exhibits a large amount of uncertainty in aggregate scores. While M-IQN [109] claimed better performance than Dopamine Rainbow9 [42] in terms of median normalized scores, their interval estimates strikingly overlap. Similarly, while C51 [5] is considered substantially better than DQN [75], the interval estimates as well as performance profiles for DQN (Adam) and C51 overlap significantly.
|
| 142 |
+
|
| 143 |
+
Figure 9 reveals an interesting limitation of aggregate metrics: depending on the choice of metric, the ordering between algorithms changes (e.g., Median vs. IQM). The inconsistency in ranking across aggregate metrics arises from the fact that such metrics only capture a specific aspect of overall performance across tasks and runs. Additionally, the change of algorithm ranking between optimality gap and IQM/median scores reveal that while recent algorithms typically show performance gains relative to humans on average, their performance seems to be worse on games below human performance. Since performance profiles capture the full picture, they would often illustrate why such inconsistencies exist. For example, optimality gap and IQM can be both read as areas in the profile (Figure 8). The performance profile in Figure 10 (left) illustrates the nuances present when comparing different algorithms. For example, IQN seems to be better than Rainbow for $\tau \geq 2$ , but worse for $\tau < 2$ . Similarly, the profiles of DreamerV2 and M-IQN for $\tau < 8$ intersect at multiple points. To compare sample efficiency of the agents, we also present their IQM scores as a function of number of frames in Figure 10 (right).
|
| 144 |
+
|
| 145 |
+

|
| 146 |
+
Figure 10: Atari 200M evaluation. Left. Score distributions using human-normalized scores obtained after training for 200M frames. Right. Sample-efficiency of agents as a function of number of frames measured via IQM human-normalized scores. Shaded regions show pointwise $9 5 \%$ percentile stratified bootstrap CIs.
|
| 147 |
+
|
| 148 |
+

|
| 149 |
+
Figure 11: DeepMind Control Suite evaluation results, averaged across 6 tasks, on the 100k and $5 0 0 \mathrm { k }$ benchmark. We compare $\mathrm { S A C + A E }$ [114], SLAC [58], Dreamer [37], CURL [98], RAD [57], DrQ [53], PISAC [60], SUNRISE [59], and CURL-D2RL [97]. The ordering of the algorithms in the left figure is based on their claimed relative performance – all algorithms except Dreamer claimed improvement over at least one algorithm placed below them. (a) Interval estimates show $9 5 \%$ stratified bootstrap CIs for methods with individual runs provided by their respective authors and $9 5 \%$ studentized CIs for CURL, CURL-D2RL, and SUNRISE. Normalized scores are computed by dividing by the maximum score $( = 1 0 0 0 )$ . (b) Score distributions. (c) The $i ^ { t h }$ column in the rank distribution plots show the probability that a given method is assigned rank $_ { i }$ averaged across all tasks. The ranks are estimated using 200,000 stratified bootstrap re-samples.
|
| 150 |
+
|
| 151 |
+
DeepMind Control Suite. Recent continuous control papers benchmark performance on 6 tasks in DM Control [104] at $1 0 0 \mathrm { k }$ and $5 0 0 \mathrm { k }$ steps. Typically, such papers claim improvement based on higher mean scores per task regardless of the variability in those scores. However, we find that when accounting for uncertainty in results, most algorithms do not consistently rank above algorithms they claimed to improve upon (Figure 11c and 11b). Furthermore, there are huge overlaps in $9 5 \%$ CIs of mean normalized scores for most algorithms (Figure 11a). These findings suggest that a lot of the reported improvements are spurious, resulting from randomness in the experimental protocol.
|
| 152 |
+
|
| 153 |
+
Procgen benchmark. Procgen [18] is a popular benchmark, consisting of 16 diverse tasks, for evaluating generalization in RL. Recent papers report mean PPO-normalized scores on this benchmark to emphasize the gains relative to PPO [92] as most methods are built on top of it. However, Figure 12 (left) shows that PPO-normalized scores typically have a heavy-tailed distribution making the mean scores highly dependent on performance on a small fraction of tasks. Instead, we recommend using normalization based on the estimated minimum and maximum scores on ProcGen [18] and reporting aggregate metrics based on such scores (Figure A.32). While publications sometimes make binary claims about whether they improve over prior methods, such improvements are inherently probabilistic. To reveal this discrepancy, we investigate the following question: “What is the probability that an algorithm which claimed improvement over a prior algorithm performs better than it?” (Figure 12, right). While this probability does not distinguish between two algorithms which uniformly improve on all tasks by $1 \%$ and $100 \%$ , it does highlight how likely an improvement is. For example, there is only a $4 0 - 5 0 \%$ chance that UCB-DrAC [81] improves upon PLR [48]. We note that a number of improvements reported in the existing literature are only $5 0 - 7 0 \%$ likely.
|
| 154 |
+
|
| 155 |
+

|
| 156 |
+
Figure 12: Procgen evaluation results based on easy mode comparisons [80] with 16 tasks. Left. Score distributions which compare PPO [92], MixReg [111], UCB-DrAC [81], PLR [48], PPG [19] and IDAAC [80]. Shaded regions indicate $9 5 \%$ percentile stratified bootstrap CIs. Right. Each row shows the probability of improvement, with $9 5 \%$ bootstrap CIs, that the algorithm $X$ on the left outperforms algorithm $Y$ on the right, given that $X$ was claimed to be better than $Y$ . For all algorithms, results are based on 10 runs per task.
|
| 157 |
+
|
| 158 |
+
# 6 Discussion
|
| 159 |
+
|
| 160 |
+
We saw, both in our case study on the Atari $1 0 0 \mathrm { k }$ benchmark and with our analysis of other widely-used RL benchmarks, that statistical issues can have a sizeable influence on reported results, in particular when point estimates are used or evaluation protocols are not kept constant within comparisons. Despite earlier calls for more experimental rigor in deep RL [16, 20, 21, 41, 49, 83] (discussed in Appendix A.3), our analysis shows that the field has not yet found sure footing in this regards.
|
| 161 |
+
|
| 162 |
+
In part, this is because the issue of reproducibility is a complex one; where our work is concerned with our confidence about and interpretation of reported results (what Goodman et al. [34] calls results reproducibility), others [79] have highlighted that there might be missing information about the experiments themselves (methods reproducibility). We remark that the problem is not solved by fixing random seeds, as has sometimes been proposed [52, 77], since it does not really address the question of whether an algorithm would perform well under similar conditions but with different seeds. Furthermore, fixed seeds might benefit certain algorithms more than others. Nor can the problem be solved by the use of dichotomous statistical significance tests, as discussed in Section 2.
|
| 163 |
+
|
| 164 |
+
One way to minimize the risks associated with statistical effects is to report results in a more complete fashion, paying close attention to bias and uncertainty within these estimates. To this end, our recommendations are summarized in Table 1. To further support RL researchers in this endeavour, we released an easy-to-use Python library, rliable along with a Colab notebook for implementing our recommendations, as well as all the individual runs used in our experiments10. Again, we emphasize the importance of published papers providing results for all runs to allow for future statistical analyses.
|
| 165 |
+
|
| 166 |
+
A barrier to adoption of evaluation protocols proposed in this work, and more generally, rigorous evaluation, is whether there are clear incentives for researchers to do so, as more rigor generally entails more nuanced and tempered claims. Arguably, doing good and reproducible science is one such incentive. We hope that our findings about erroneous conclusions in published papers would encourage researchers to avoid fooling themselves, even if that requires tempered claims. That said, a more pragmatic incentive would be if conferences and reviewers required more rigorous evaluation for publication, e.g., NeurIPS 2021 checklist asks whether error bars are reported. Moving towards reliable evaluation is an ongoing process and we believe that this paper would greatly benefit it.
|
| 167 |
+
|
| 168 |
+
Given the substantial influence of statistical considerations in experiments involving 40-year old Atari 2600 video games and low-DOF robotic simulations, we argue that it is unlikely that an increase in available computation will resolve the problem for the future generation of RL benchmarks. Instead, just as a well-prepared rock-climber can skirt the edge of the steepest precipices, it seems likely that ongoing progress in reinforcement learning will require greater experimental discipline.
|
| 169 |
+
|
| 170 |
+
# Societal Impacts
|
| 171 |
+
|
| 172 |
+
This paper calls for statistical sophistication in deep RL research by accounting for statistical uncertainty in reported results. However, statistical sophistication can introduce new forms of statistical abuses and monitoring the literature for such abuses should be an ongoing priority for the research community. Moving towards reliable evaluation and reproducible research is an ongoing process and this paper only partly addresses it by providing tools for more reliable evaluation. That said, while accounting for uncertainty in results is not a panacea, it provides a strong foundation for trustworthy results on which the community can build upon, with increased confidence. In terms of broader societal impact of this work, we do not see any foreseeable strongly negative impacts. However, this paper could positively impact society by constituting a step forwards in rigorous few-run evaluation regime, which reduces computational burden on researchers and is “greener” than evaluating a large number of runs.
|
| 173 |
+
|
| 174 |
+
# Acknowledgments
|
| 175 |
+
|
| 176 |
+
We thank Xavier Bouthillier, Dumitru Erhan, Marlos C. Machado, David Ha, Fabio Viola, Fernando Diaz, Stephanie Chan, Jacob Buckman, Danijar Hafner and anonymous NeurIPS’ reviewers for providing valuable feedback for an earlier draft of this work. We also acknowledge Matteo Hessel, David Silver, Tom Schaul, Csaba Szepesvári, Hado van Hasselt, Rosanne Liu, Simon Kornblith, Aviral Kumar, George Tucker, Kevin Murphy, Ankit Anand, Aravind Srinivas, Matthew Botvinick, Clare Lyle, Kimin Lee, Misha Laskin, Ankesh Anand, Joelle Pineau and Braham Synder for helpful discussions. We also thank all the authors who provided individual runs for their corresponding publications. We are also grateful for general support from Google Research teams in Montréal and elsewhere.
|
| 177 |
+
|
| 178 |
+
# References
|
| 179 |
+
|
| 180 |
+
[1] Rishabh Agarwal, Dale Schuurmans, and Mohammad Norouzi. An optimistic perspective on offline reinforcement learning. In International Conference on Machine Learning, 2020.
|
| 181 |
+
[2] Valentin Amrhein, Sander Greenland, and Blake McShane. Scientists rise up against statistical significance. Nature, 2019.
|
| 182 |
+
[3] Adrià Puigdomènech Badia, Bilal Piot, Steven Kapturowski, Pablo Sprechmann, Alex Vitvitskyi, Zhaohan Daniel Guo, and Charles Blundell. Agent57: Outperforming the atari human benchmark. In International Conference on Machine Learning, pages 507–517. PMLR, 2020.
|
| 183 |
+
[4] Monya Baker. 1,500 scientists lift the lid on reproducibility. Nature News, 2016.
|
| 184 |
+
[5] Marc G Bellemare, Yavar Naddaf, Joel Veness, and Michael Bowling. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, 47:253–279, 2013.
|
| 185 |
+
[6] Marc G Bellemare, Will Dabney, and Rémi Munos. A distributional perspective on reinforcement learning. In International Conference on Machine Learning, pages 449–458. PMLR, 2017.
|
| 186 |
+
[7] Marc G Bellemare, Salvatore Candido, Pablo Samuel Castro, Jun Gong, Marlos C Machado, Subhodeep Moitra, Sameera S Ponda, and Ziyu Wang. Autonomous navigation of stratospheric balloons using reinforcement learning. Nature, 2020.
|
| 187 |
+
[8] Christopher Berner, Greg Brockman, Brooke Chan, Vicki Cheung, Przemysław D˛ebiak, Christy Dennison, David Farhi, Quirin Fischer, Shariq Hashme, Chris Hesse, et al. Dota 2 with large scale deep reinforcement learning. arXiv preprint arXiv:1912.06680, 2019.
|
| 188 |
+
[9] Peter J Bickel, Friedrich Götze, and Willem R van Zwet. Resampling fewer than n observations: gains, losses, and remedies for losses. In Selected works of Willem van Zwet, pages 267–297. Springer, 2012.
|
| 189 |
+
[10] Mauro Birattari and Marco Dorigo. How to assess and report the performance of a stochastic algorithm on a benchmark problem: mean or best result on a number of runs? Optimization letters, 2007.
|
| 190 |
+
[11] Xavier Bouthillier, César Laurent, and Pascal Vincent. Unreproducible research is reproducible. In International Conference on Machine Learning, pages 725–734, 2019.
|
| 191 |
+
[12] Xavier Bouthillier, Pierre Delaunay, Mirko Bronzi, Assya Trofimov, Brennan Nichyporuk, Justin Szeto, Nazanin Mohammadi Sepahvand, Edward Raff, Kanika Madan, Vikram Voleti, et al. Accounting for variance in machine learning benchmarks. Proceedings of Machine Learning and Systems, 3, 2021.
|
| 192 |
+
[13] James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and Qiao Zhang. JAX: composable transformations of Python $^ +$ NumPy programs, 2018. URL http://github.com/google/ jax.
|
| 193 |
+
[14] Pablo Samuel Castro, Subhodeep Moitra, Carles Gelada, Saurabh Kumar, and Marc G Bellemare. Dopamine: A research framework for deep reinforcement learning. arXiv preprint arXiv:1812.06110, 2018.
|
| 194 |
+
[15] Johan Samir Obando Ceron and Pablo Samuel Castro. Revisiting rainbow: Promoting more insightful and inclusive deep reinforcement learning research. In International Conference on Machine Learning, 2021.
|
| 195 |
+
[16] Stephanie CY Chan, Samuel Fishman, Anoop Korattikara, John Canny, and Sergio Guadarrama. Measuring the reliability of reinforcement learning algorithms. In International Conference on Learning Representations, 2020.
|
| 196 |
+
[17] Kaleigh Clary, Emma Tosch, John Foley, and David Jensen. Let’s play again: Variability of deep reinforcement learning agents in atari environments. arXiv preprint arXiv:1904.06312, 2019.
|
| 197 |
+
[18] Karl Cobbe, Chris Hesse, Jacob Hilton, and John Schulman. Leveraging procedural generation to benchmark reinforcement learning. In International conference on machine learning, pages 2048–2056. PMLR, 2020.
|
| 198 |
+
[19] Karl Cobbe, Jacob Hilton, Oleg Klimov, and John Schulman. Phasic policy gradient. arXiv preprint arXiv:2009.04416, 2020.
|
| 199 |
+
[20] Cédric Colas, Olivier Sigaud, and Pierre-Yves Oudeyer. How many random seeds? statistical power analysis in deep reinforcement learning experiments. arXiv preprint arXiv:1806.08295, 2018.
|
| 200 |
+
[21] Cédric Colas, Olivier Sigaud, and Pierre-Yves Oudeyer. A hitchhiker’s guide to statistical comparisons of reinforcement learning algorithms. arXiv preprint arXiv:1904.06979, 2019.
|
| 201 |
+
[22] Will Dabney, Georg Ostrovski, David Silver, and Rémi Munos. Implicit quantile networks for distributional reinforcement learning. In International conference on machine learning, pages 1096–1105. PMLR, 2018.
|
| 202 |
+
[23] Will Dabney, Mark Rowland, Marc G Bellemare, and Rémi Munos. Distributional reinforcement learning with quantile regression. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
|
| 203 |
+
[24] Mostafa Dehghani, Yi Tay, Alexey A Gritsenko, Zhe Zhao, Neil Houlsby, Fernando Diaz, Donald Metzler, and Oriol Vinyals. The benchmark lottery. arXiv preprint arXiv:2107.07002, 2021.
|
| 204 |
+
[25] Jesse Dodge, Gabriel Ilharco, Roy Schwartz, Ali Farhadi, Hannaneh Hajishirzi, and Noah Smith. Finetuning pretrained language models: Weight initializations, data orders, and early stopping. arXiv preprint arXiv:2002.06305, 2020.
|
| 205 |
+
[26] Elizabeth D Dolan and Jorge J Moré. Benchmarking optimization software with performance profiles. Mathematical programming, 91(2):201–213, 2002.
|
| 206 |
+
[27] Rotem Dror, Segev Shlomov, and Roi Reichart. Deep dominance-how to properly compare deep neural models. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, 2019.
|
| 207 |
+
[28] Adrien Ecoffet, Joost Huizinga, Joel Lehman, Kenneth O Stanley, and Jeff Clune. Go-explore: a new approach for hard-exploration problems. arXiv preprint arXiv:1901.10995, 2019.
|
| 208 |
+
[29] Bradley Efron. Bootstrap methods: another look at the jackknife. The Annals of Statistics, 7:1–26, 1979.
|
| 209 |
+
[30] Bradley Efron. Better bootstrap confidence intervals. Journal of the American statistical Association, 1987.
|
| 210 |
+
[31] Damien Ernst, Pierre Geurts, and Louis Wehenkel. Tree-based batch mode reinforcement learning. Journal of Machine Learning Research, 6:503–556, 2005.
|
| 211 |
+
[32] Lasse Espeholt, Hubert Soyer, Remi Munos, Karen Simonyan, Vlad Mnih, Tom Ward, Yotam Doron, Vlad Firoiu, Tim Harley, Iain Dunning, et al. Impala: Scalable distributed deep-rl with importance weighted actor-learner architectures. In International Conference on Machine Learning. PMLR, 2018.
|
| 212 |
+
[33] Gerd Gigerenzer. Statistical rituals: The replication delusion and how we got there. Advances in Methods and Practices in Psychological Science, 1(2):198–218, 2018.
|
| 213 |
+
[34] Steven N Goodman, Daniele Fanelli, and John PA Ioannidis. What does research reproducibility mean? Science translational medicine, 8(341):341ps12–341ps12, 2016.
|
| 214 |
+
[35] Sander Greenland, Stephen J Senn, Kenneth J Rothman, John B Carlin, Charles Poole, Steven N Goodman, and Douglas G Altman. Statistical tests, p values, confidence intervals, and power: a guide to misinterpretations. European journal of epidemiology, 2016.
|
| 215 |
+
[36] Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In International Conference on Machine Learning, pages 1861–1870. PMLR, 2018.
|
| 216 |
+
[37] Danijar Hafner, Timothy Lillicrap, Jimmy Ba, and Mohammad Norouzi. Dream to control: Learning behaviors by latent imagination. In International Conference on Learning Representations, 2019.
|
| 217 |
+
[38] Danijar Hafner, Timothy Lillicrap, Mohammad Norouzi, and Jimmy Ba. Mastering atari with discrete world models. arXiv preprint arXiv:2010.02193, 2020.
|
| 218 |
+
[39] Steven Hansen, Will Dabney, Andre Barreto, David Warde-Farley, Tom Van de Wiele, and Volodymyr Mnih. Fast task inference with variational intrinsic successor features. In International Conference on Learning Representations, 2020.
|
| 219 |
+
[40] Nathaniel E Helwig. Bootstrap Confidence Intervals, 01 2021. URL http://users.stat.umn.edu/ \~helwig/notes/npboot-notes.html#bootstrap-confidence-intervals.
|
| 220 |
+
[41] Peter Henderson, Riashat Islam, Philip Bachman, Joelle Pineau, Doina Precup, and David Meger. Deep reinforcement learning that matters. In Proceedings of the AAAI Conference on Artificial Intelligence, 2018.
|
| 221 |
+
[42] Matteo Hessel, Joseph Modayil, Hado Van Hasselt, Tom Schaul, Georg Ostrovski, Will Dabney, Dan Horgan, Bilal Piot, Mohammad Azar, and David Silver. Rainbow: Combining improvements in deep reinforcement learning. In Proceedings of the AAAI Conference on Artificial Intelligence, 2018.
|
| 222 |
+
[43] Matteo Hessel, Ivo Danihelka, Fabio Viola, Arthur Guez, Simon Schmitt, Laurent Sifre, Theophane Weber, David Silver, and Hado van Hasselt. Muesli: Combining improvements in policy optimization. Proceedings of the 38th International Conference on Machine Learning, 2021.
|
| 223 |
+
[44] John PA Ioannidis. Why most published research findings are false. PLoS medicine, 2(8):e124, 2005.
|
| 224 |
+
[45] Alex Irpan. Deep reinforcement learning doesn’t work yet. https://www.alexirpan.com/2018/02/ 14/rl-hard.html, 2018.
|
| 225 |
+
[46] Riashat Islam, Peter Henderson, Maziar Gomrokchi, and Doina Precup. Reproducibility of benchmarked deep reinforcement learning tasks for continuous control. arXiv preprint arXiv:1708.04133, 2017.
|
| 226 |
+
[47] Max Jaderberg, Volodymyr Mnih, Wojciech Marian Czarnecki, Tom Schaul, Joel Z Leibo, David Silver, and Koray Kavukcuoglu. Reinforcement learning with unsupervised auxiliary tasks. arXiv preprint arXiv:1611.05397, 2016.
|
| 227 |
+
[48] Minqi Jiang, Ed Grefenstette, and Tim Rocktäschel. Prioritized level replay. International Conference on Machine Learning, 2021.
|
| 228 |
+
[49] Scott Jordan, Yash Chandak, Daniel Cohen, Mengxue Zhang, and Philip Thomas. Evaluating the performance of reinforcement learning algorithms. In International Conference on Machine Learning, pages 4962–4973. PMLR, 2020.
|
| 229 |
+
[50] Lukasz Kaiser, Mohammad Babaeizadeh, Piotr Milos, Blazej Osinski, Roy H Campbell, Konrad Czechowski, Dumitru Erhan, Chelsea Finn, Piotr Kozakowski, Sergey Levine, et al. Model-based reinforcement learning for atari. arXiv preprint arXiv:1903.00374, 2019.
|
| 230 |
+
[51] Kacper Kielak. Do recent advancements in model-based deep reinforcement learning really improve data efficiency? arXiv preprint arXiv:2003.10181, 2020.
|
| 231 |
+
[52] Sergey Kolesnikov and Oleksii Hrinchuk. Catalyst. rl: a distributed framework for reproducible rl research. arXiv preprint arXiv:1903.00027, 2019.
|
| 232 |
+
[53] Ilya Kostrikov\*, Denis Yarats\*, and Rob Fergus. Image augmentation is all you need: Regularizing deep reinforcement learning from pixels. In International Conference on Learning Representations, 2021.
|
| 233 |
+
[54] Piotr Kozakowski, Lukasz Kaiser, Henryk Michalewski, Afroz Mohiuddin, and Katarzyna Kanska. Q- ´ value weighted regression: Reinforcement learning with limited data. arXiv preprint arXiv:2102.06782, 2021.
|
| 234 |
+
[55] Tejas D Kulkarni, Ankush Gupta, Catalin Ionescu, Sebastian Borgeaud, Malcolm Reynolds, Andrew Zisserman, and Volodymyr Mnih. Unsupervised learning of object keypoints for perception and control. NeurIPS, 32:10724–10734, 2019.
|
| 235 |
+
[56] Michael Laskin, Aravind Srinivas, and Pieter Abbeel. Curl: Contrastive unsupervised representations for reinforcement learning. In International Conference on Machine Learning, 2020.
|
| 236 |
+
[57] Misha Laskin, Kimin Lee, Adam Stooke, Lerrel Pinto, Pieter Abbeel, and Aravind Srinivas. Reinforcement learning with augmented data. Advances in Neural Information Processing Systems, 2020.
|
| 237 |
+
[58] Alex Lee, Anusha Nagabandi, Pieter Abbeel, and Sergey Levine. Stochastic latent actor-critic: Deep reinforcement learning with a latent variable model. Advances in Neural Information Processing Systems, 33, 2020.
|
| 238 |
+
[59] Kimin Lee, Michael Laskin, Aravind Srinivas, and Pieter Abbeel. Sunrise: A simple unified framework for ensemble learning in deep reinforcement learning. International Conference on Machine Learning, 2021.
|
| 239 |
+
[60] Kuang-Huei Lee, Ian Fischer, Anthony Liu, Yijie Guo, Honglak Lee, John Canny, and Sergio Guadarrama. Predictive information accelerates learning in rl. Advances in Neural Information Processing Systems, 2020.
|
| 240 |
+
[61] Haim Levy. Stochastic dominance and expected utility: Survey and analysis. Management science, 38(4): 555–593, 1992.
|
| 241 |
+
[62] Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
|
| 242 |
+
[63] Jimmy Lin, Daniel Campos, Nick Craswell, Bhaskar Mitra, and Emine Yilmaz. Significant improvements over the state of the art? a case study of the ms marco document ranking leaderboard. arXiv preprint arXiv:2102.12887, 2021.
|
| 243 |
+
[64] Guoqing Liu, Chuheng Zhang, Li Zhao, Tao Qin, Jinhua Zhu, Li Jian, Nenghai Yu, and Tie-Yan Liu. Return-based contrastive representation learning for reinforcement learning. In International Conference on Learning Representations, 2021.
|
| 244 |
+
[65] Hao Liu and Pieter Abbeel. Behavior from the void: Unsupervised active pre-training. arXiv preprint arXiv:2103.04551, 2021.
|
| 245 |
+
[66] Hao Liu and Pieter Abbeel. Aps: Active pretraining with successor features. In Proceedings of the 38th International Conference on Machine Learning, 2021.
|
| 246 |
+
[67] Mario Lucic, Karol Kurach, Marcin Michalski, Sylvain Gelly, and Olivier Bousquet. Are gans created equal? a large-scale study. arXiv preprint arXiv:1711.10337, 2017.
|
| 247 |
+
[68] Nicolai A Lynnerup, Laura Nolling, Rasmus Hasle, and John Hallam. A survey on reproducibility by evaluating deep reinforcement learning algorithms on real-world robots. In Conference on Robot Learning, 2020.
|
| 248 |
+
[69] Marlos C Machado, Marc G Bellemare, Erik Talvitie, Joel Veness, Matthew Hausknecht, and Michael Bowling. Revisiting the arcade learning environment: Evaluation protocols and open problems for general agents. Journal of Artificial Intelligence Research, 2018.
|
| 249 |
+
[70] Horia Mania, Aurelia Guy, and Benjamin Recht. Simple random search provides a competitive approach to reinforcement learning. arXiv preprint arXiv:1803.07055, 2018.
|
| 250 |
+
[71] Henry B Mann and Donald R Whitney. On a test of whether one of two random variables is stochastically larger than the other. The annals of mathematical statistics, pages 50–60, 1947.
|
| 251 |
+
[72] Muhammad Rizki Maulana and Wee Sun Lee. Ensemble and auxiliary tasks for data-efficient deep reinforcement learning. arXiv preprint arXiv:2107.01904, 2021.
|
| 252 |
+
[73] Blakeley B McShane, David Gal, Andrew Gelman, Christian Robert, and Jennifer L Tackett. Abandon statistical significance. The American Statistician, 2019.
|
| 253 |
+
[74] Gábor Melis, Chris Dyer, and Phil Blunsom. On the state of the art of evaluation in neural language models. In International Conference on Learning Representations, 2018.
|
| 254 |
+
[75] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 2015.
|
| 255 |
+
[76] Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International conference on machine learning, pages 1928–1937. PMLR, 2016.
|
| 256 |
+
[77] Prabhat Nagarajan, Garrett Warnell, and Peter Stone. Deterministic implementations for reproducibility in deep reinforcement learning. arXiv preprint arXiv:1809.05676, 2018.
|
| 257 |
+
[78] Harold Pashler and Eric-Jan Wagenmakers. Editors’ introduction to the special section on replicability in psychological science: A crisis of confidence? Perspectives on psychological science, 7(6):528–530, 2012.
|
| 258 |
+
[79] Joelle Pineau, Philippe Vincent-Lamarre, Koustuv Sinha, Vincent Larivière, Alina Beygelzimer, Florence d’Alché Buc, Emily Fox, and Hugo Larochelle. Improving reproducibility in machine learning research (a report from the neurips 2019 reproducibility program). arXiv preprint arXiv:2003.12206, 2020.
|
| 259 |
+
[80] Roberta Raileanu and Rob Fergus. Decoupling value and policy for generalization in reinforcement learning. International Conference on Machine Learning, 2021.
|
| 260 |
+
[81] Roberta Raileanu, Max Goldstein, Denis Yarats, Ilya Kostrikov, and Rob Fergus. Automatic data augmentation for generalization in deep reinforcement learning. arXiv preprint arXiv:2006.12862, 2020.
|
| 261 |
+
[82] David Raposo, Sam Ritter, Adam Santoro, Greg Wayne, Theophane Weber, Matt Botvinick, Hado van Hasselt, and Francis Song. Synthetic returns for long-term credit assignment. arXiv preprint arXiv:2102.12425, 2021.
|
| 262 |
+
[83] Ben Recht. Benchmarking Machine Learning with Performance Profiles, 03 2018. URL http://www. argmin.net/2018/03/26/performance-profiles/.
|
| 263 |
+
[84] Nils Reimers and Iryna Gurevych. Reporting score distributions makes a difference: Performance study of lstm-networks for sequence tagging. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 338–348, 2017.
|
| 264 |
+
[85] Samuel Ritter, David GT Barrett, Adam Santoro, and Matt M Botvinick. Cognitive psychology for deep neural networks: A shape bias case study. In International conference on machine learning, 2017.
|
| 265 |
+
[86] Jan Robine, Tobias Uelwer, and Stefan Harmeling. Smaller world models for reinforcement learning. arXiv preprint arXiv:2010.05767, 2020.
|
| 266 |
+
[87] David Romer. In praise of confidence intervals. In AEA Papers and Proceedings, volume 110, pages 55–60, 2020.
|
| 267 |
+
[88] Tim Salimans, Jonathan Ho, Xi Chen, Szymon Sidor, and Ilya Sutskever. Evolution strategies as a scalable alternative to reinforcement learning. arXiv preprint arXiv:1703.03864, 2017.
|
| 268 |
+
[89] Rohan Saphal, Balaraman Ravindran, Dheevatsa Mudigere, Sasikant Avancha, and Bharat Kaul. Seerl: Sample efficient ensemble reinforcement learning. In Proceedings of the 20th International Conference on Autonomous Agents and MultiAgent Systems, pages 1100–1108, 2021.
|
| 269 |
+
[90] Tom Schaul, Georg Ostrovski, Iurii Kemaev, and Diana Borsa. Return-based scaling: Yet another normalisation trick for deep rl. arXiv preprint arXiv:2105.05347, 2021.
|
| 270 |
+
[91] Julian Schrittwieser, Ioannis Antonoglou, Thomas Hubert, Karen Simonyan, Laurent Sifre, Simon Schmitt, Arthur Guez, Edward Lockhart, Demis Hassabis, Thore Graepel, et al. Mastering atari, go, chess and shogi by planning with a learned model. Nature, 2020.
|
| 271 |
+
[92] John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017. [93] Max Schwarzer, Ankesh Anand, Rishab Goel, R Devon Hjelm, Aaron Courville, and Philip Bachman. Data-efficient reinforcement learning with self-predictive representations. In International Conference on Learning Representations, 2021. [94] Thibault Sellam, Steve Yadlowsky, Jason Wei, Naomi Saphra, Alexander D’Amour, Tal Linzen, Jasmijn Bastings, Iulia Turc, Jacob Eisenstein, Dipanjan Das, et al. The multiberts: Bert reproductions for robustness analysis. arXiv preprint arXiv:2106.16163, 2021. [95] Younggyo Seo, Lili Chen, Jinwoo Shin, Honglak Lee, Pieter Abbeel, and Kimin Lee. State entropy maximization with random encoders for efficient exploration. In Proceedings of the 38th International Conference on Machine Learning, 2021. [96] David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. nature, 529(7587):484–489, 2016. [97] Samarth Sinha, Homanga Bharadhwaj, Aravind Srinivas, and Animesh Garg. D2rl: Deep dense architectures in reinforcement learning. arXiv preprint arXiv:2010.09163, 2020. [98] Aravind Srinivas, Michael Laskin, and Pieter Abbeel. Curl: Contrastive unsupervised representations for reinforcement learning. arXiv preprint arXiv:2004.04136v2, 2020. [99] Richard S Sutton. Learning to predict by the methods of temporal differences. Machine learning, 3(1): 9–44, 1988.
|
| 272 |
+
[100] Richard S Sutton. Generalization in reinforcement learning: Successful examples using sparse coarse coding. Advances in neural information processing systems, 1996.
|
| 273 |
+
[101] Richard S. Sutton and Andrew G. Barto. Reinforcement learning: An introduction. MIT Press, 2nd edition, 2018.
|
| 274 |
+
[102] Richard S Sutton, Doina Precup, and Satinder Singh. Between mdps and semi-mdps: A framework for temporal abstraction in reinforcement learning. Artificial intelligence, 1999.
|
| 275 |
+
[103] István Szita and András Lörincz. Learning tetris using the noisy cross-entropy method. Neural computation, 2006.
|
| 276 |
+
[104] Yuval Tassa, Yotam Doron, Alistair Muldal, Tom Erez, Yazhe Li, Diego de Las Casas, David Budden, Abbas Abdolmaleki, Josh Merel, Andrew Lefrancq, et al. Deepmind control suite. arXiv preprint arXiv:1801.00690, 2018.
|
| 277 |
+
[105] Marin Toromanoff, Emilie Wirbel, and Fabien Moutarde. Is deep reinforcement learning really superhuman on atari? leveling the playing field. arXiv preprint arXiv:1908.04683, 2019.
|
| 278 |
+
[106] John W Tukey. A survey of sampling from contaminated distributions. Contributions to probability and statistics, pages 448–485, 1960.
|
| 279 |
+
[107] Hado van Hasselt, Matteo Hessel, and John Aslanides. When to use parametric models in reinforcement learning? NeurIPS, 2019.
|
| 280 |
+
[108] Gaël Varoquaux and Veronika Cheplygina. How i failed machine learning in medical imaging– shortcomings and recommendations. arXiv preprint arXiv:2103.10292, 2021.
|
| 281 |
+
[109] Nino Vieillard, Olivier Pietquin, and Matthieu Geist. Munchausen reinforcement learning. Advances in Neural Information Processing Systems, 33, 2020.
|
| 282 |
+
[110] Oriol Vinyals, Igor Babuschkin, Wojciech M Czarnecki, Michaël Mathieu, Andrew Dudzik, Junyoung Chung, David H Choi, Richard Powell, Timo Ewalds, Petko Georgiev, et al. Grandmaster level in starcraft ii using multi-agent reinforcement learning. Nature, 2019.
|
| 283 |
+
[111] Kaixin Wang, Bingyi Kang, Jie Shao, and Jiashi Feng. Improving generalization in reinforcement learning with mixture regularization. arXiv preprint arXiv:2010.10814, 2020.
|
| 284 |
+
[112] Ronald L. Wasserstein, Allen L. Schirm, and Nicole A. Lazar. Moving to a world beyond “p $< 0 . 0 5 '$ . The American Statistician, 2019.
|
| 285 |
+
[113] Bernard L Welch. The generalization ofstudent’s’ problem when several different population variances are involved. Biometrika, 34(1/2):28–35, 1947.
|
| 286 |
+
[114] Denis Yarats, Amy Zhang, Ilya Kostrikov, Brandon Amos, Joelle Pineau, and Rob Fergus. Improving sample efficiency in model-free reinforcement learning from images. arXiv preprint arXiv:1910.01741, 2019.
|
| 287 |
+
[115] Jinhua Zhu, Yingce Xia, Lijun Wu, Jiajun Deng, Wengang Zhou, Tao Qin, and Houqiang Li. Masked contrastive representation learning for reinforcement learning. arXiv preprint arXiv:2010.07470, 2020.
|
| 288 |
+
[116] Donglin Zhuang, Xingyao Zhang, Shuaiwen Leon Song, and Sara Hooker. Randomness in neural network training: Characterizing the impact of tooling. arXiv preprint arXiv:2106.11872, 2021.
|
| 289 |
+
|
| 290 |
+
# Checklist
|
| 291 |
+
|
| 292 |
+
1. For all authors...
|
| 293 |
+
|
| 294 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 295 |
+
(b) Did you describe the limitations of your work? [Yes] See Section 6.
|
| 296 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes]
|
| 297 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 298 |
+
|
| 299 |
+
2. If you are including theoretical results...
|
| 300 |
+
|
| 301 |
+
(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A]
|
| 302 |
+
|
| 303 |
+
3. If you ran experiments...
|
| 304 |
+
|
| 305 |
+
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] See Appendix A.1.
|
| 306 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Appendix A.2
|
| 307 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes]
|
| 308 |
+
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Appendix A.2
|
| 309 |
+
|
| 310 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 311 |
+
|
| 312 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes]
|
| 313 |
+
(b) Did you mention the license of the assets? [Yes] Apache License, Version 2.0
|
| 314 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [Yes]
|
| 315 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 316 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 317 |
+
|
| 318 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 319 |
+
|
| 320 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 321 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 322 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/vvi7KqHQiA/vvi7KqHQiA.md
ADDED
|
@@ -0,0 +1,289 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Implicit Bias of SGD for Diagonal Linear Networks: a Provable Benefit of Stochasticity
|
| 2 |
+
|
| 3 |
+
Scott Pesme EPFL scott.pesme@epfl.ch
|
| 4 |
+
|
| 5 |
+
Loucas Pillaud-Vivien EPFL loucas.pillaud-vivien@epfl.ch
|
| 6 |
+
|
| 7 |
+
Nicolas Flammarion EPFL nicolas.flammarion@epfl.ch
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
Understanding the implicit bias of training algorithms is of crucial importance in order to explain the success of overparametrised neural networks. In this paper, we study the dynamics of stochastic gradient descent over diagonal linear networks through its continuous time version, namely stochastic gradient flow. We explicitly characterise the solution chosen by the stochastic flow and prove that it always enjoys better generalisation properties than that of gradient flow. Quite surprisingly, we show that the convergence speed of the training loss controls the magnitude of the biasing effect: the slower the convergence, the better the bias. To fully complete our analysis, we provide convergence guarantees for the dynamics. We also give experimental results which support our theoretical claims. Our findings highlight the fact that structured noise can induce better generalisation and they help explain the greater performances of stochastic gradient descent over gradient descent observed in practice.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
Understanding the performance of neural networks is certainly one of the most thrilling challenges for the current machine learning community. From the theoretical point of view, progress has been made in several directions: we have a better functional analysis description of neural networks [3] and we steadily understand the convergence of training algorithms [29, 10] as well as the role of initialisation [20, 12]. Yet there remain many unanswered questions. One of which is why do the currently used training algorithms converge to solutions which generalise well, and this with very little use of explicit regularisation [39].
|
| 16 |
+
|
| 17 |
+
To understand this phenomenon, the concept of implicit bias has emerged: if over-fitting is benign, it must be because the optimisation procedure converges towards some particular global minimum which enjoys good generalisation properties. Though no explicit regularisation is added, the algorithm is implicitly selecting a particular solution: this is referred to as the implicit bias of the training procedure. The implicit regularisation of several algorithms has been studied, the simplest and most emblematic being that of gradient descent and stochastic gradient descent in the least-squares framework: they both converge towards the global solution which has the lowest squared distance from the initialisation. For logistic regression on separable data, Soudry et al. show in the seminal paper [31] that gradient descent selects the max-margin classifier. This type of result has then been extended to neural networks and to other frameworks. Overall, characterising the implicit bias of gradient methods has almost always come down to unveiling mirror-descent like structures which underlie the algorithms.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Sparse regression with $n = 4 0$ , $d = 1 0 0$ , $\| \beta _ { \ell _ { 0 } } ^ { * } \| _ { 0 } = 5$ , $x _ { i } \sim \mathcal { N } ( 0 , I ) y _ { i } = x _ { i } ^ { \top } \beta _ { \ell _ { 0 } } ^ { * } .$ Left: for initialisation scale $\alpha = 0 . 0 5$ , SGD converges towards a solution which generalises better than GD. Right: for different values of the initialisation scale $\alpha$ , the solution recovered by SGD has better validation loss than that of GD. The sparsifying effect due to their implicit biases differ by more than an order of magnitude. See Section 5.1 for the precise experimental setup.
|
| 21 |
+
|
| 22 |
+
While mostly all of the results focus on gradient descent, it must be pointed out that this full batch algorithm is not used in practice for neural networks since it does not lead to solutions which generalise well [23]. Instead, results on stochastic gradient descent, which is widely used and shows impressive results, are still missing or unsatisfactory. This has certainly to do with the fact that grasping the nature of the noise induced by the stochasticity of the algorithm is particularly hard: it mixes properties from the model’s architecture, the data’s distribution and the loss. In our work, by focusing on simplified neural networks, we answer to the following fundamental questions: do SGD’s and GD’s implicit bias differ? What is the role of SGD’s noise over the algorithm’s implicit bias?
|
| 23 |
+
|
| 24 |
+
The simplified neural networks which we consider are diagonal linear neural networks; despite their simplicity they have become popular since they already enable to grasp the complexity of more general networks. Indeed, they highlight important aspects of the theoretical concerns of modern machine learning: the neural tangent kernel regime, the roles of over-parametrisation, of the initialisation and of the step size. For a regression problem where we assume the existence of an interpolating solution, we study stochastic gradient descent through its continuous version, namely stochastic gradient flow (SGF). Though the continuous modelling of SGD has not yet led to many fruitful results compared to the well studied gradient flow, we believe it is because capturing the essence of the stochastic noise is particularly difficult. It has generally been done in a non realistic and over simplified manner, such as considering constant and isotropic noise. In our work, we attach peculiar attention to the adequate modelling of the noise. Tools from Itô calculus are then leveraged in order to derive exact formulas, quantitative bounds and interesting interpretations for our problem.
|
| 25 |
+
|
| 26 |
+
# 1.1 Main contributions and paper organisation.
|
| 27 |
+
|
| 28 |
+
In Section 2, we start by introducing the setup of our problem as well as the continuous modelisation of stochastic gradient descent. Then, in Section 3, we state our main result on the implicit bias of the stochastic gradient flow. We informally formulate it here and illustrate it in Figure 1:
|
| 29 |
+
|
| 30 |
+
Theorem 1 (Informal). Stochastic gradient flow over diagonal linear networks converges with high probability to a zero-loss solution which enjoys better generalisation properties than the one obtained by gradient flow. Furthermore, the speed of convergence of the training loss controls the magnitude of the biasing effect: the slower the convergence, the better the bias.
|
| 31 |
+
|
| 32 |
+
Unlike previous works [14, 36], in addition to characterising the implicit bias effect of SGF, we also prove the convergence of the iterates towards a zero-loss solution with high-probability. To accomplish this, we leverage in Section 4 the fact that the iterates follow a stochastic continuous mirror descent with a time-varying potential. We support our results experimentally and validate our model in Section 5.
|
| 33 |
+
|
| 34 |
+
# 1.2 Related work
|
| 35 |
+
|
| 36 |
+
As recalled, implicit bias has a recent history that has been initiated by the seminal work [31] on max-margin classification with log-loss for a linear setup and separable data. This work has been extended to other architectures, e.g. multiplicative parametrisations [14], linear networks [22] and more general homogeneous neural networks [27, 11]. In [36] the authors show that the scale of the initialisation leads to an interpolation between the neural tangent kernel regime [20, 12] (which is a linear regression on fixed features) leading to $\ell _ { 2 }$ minimum norm solutions and the rich regimes leading to $\ell _ { 1 }$ minimum norm solutions. Note that these works focus on full batch gradient descent (or flow) and are deeply linked to mirror descent.
|
| 37 |
+
|
| 38 |
+
While the links between SGD’s stochasticity and generalisation have been looked into in numerous works [28, 21, 16, 18, 24], no such explicit characterisation of implicit regularisation have ever been given. It has been empirically observed that SGD often outputs models which generalise better than GD [23, 21, 16]. One suggested explanation is that SGD is prone to pick flatter solutions than GD and that bad generalisation solutions are correlated with sharp minima, i.e., with strong curvature, while good generalisation solutions are correlated with flat minima, i.e., with low curvature [17, 23]. This idea has been further investigated by adopting a random walk on random landscape modelling [18], by suggesting that SGD’s noise is smoothing the loss landscape, thus eliminating the sharp minima [24], by considering a dynamical stability perspective [38] or by interpreting SGD as a diffusion process [16, 21, 8]. Recently, label-noise has been shown to influence the implicit bias of SGD, by biasing the solution towards the origin for quadratically-parameterized models [15] or by implicitly regularising the expected squared norm of the gradient of the model with respect to the weights [5]. Thus, if the notion of implicit bias of GD is fairly well understood both in the cases of regression and classification, it remains unclear for SGD, and its explicit characterisation is missing.
|
| 39 |
+
|
| 40 |
+
The linear diagonal neural networks we consider have been studied in the case of gradient descent [33] and stochastic gradient descent with label noise [15]. In both cases the authors show that this model has the ability to implicitly bias the training procedure to help retrieve a sparse predictor. The link between gradient descent and mirror descent for this model has been initiated by [13] and further exploited by the same author in [37, 34] for its sparse inducing property.
|
| 41 |
+
|
| 42 |
+
Contrary to the deterministic case, the modelling of stochastic gradient descent as a stochastic differential equation is quite recent, see [28, 21]. However, as highlighted by [1], early attempts often suffer from the drawback that they model the noise using a constant covariance matrix. On the contrary, state dependant noise has now become the legitimate manner for modelling SGD as a stochastic gradient flow and it is shown in [26] that it can be done consistently. Yet, noise modelling still remains the principal issue [35] as it influences largely the behaviour of the dynamics [8, 9].
|
| 43 |
+
|
| 44 |
+
# 1.3 Notations
|
| 45 |
+
|
| 46 |
+
For input data $( x _ { 1 } , \ldots , x _ { n } ) \in ( \mathbb { R } ^ { d } ) ^ { n }$ and output $( y _ { 1 } , \dots , y _ { n } ) \in \mathbb { R } ^ { n }$ , we denote respectively $X \in$ $\mathbb { R } ^ { n \times d }$ the design matrix whose $i$ -th row is feature $x _ { i } \in \mathbb { R } ^ { d }$ and $y \in \mathbb { R } ^ { n }$ the vector of outputs. $\mathbb { R } _ { + } ^ { * }$ denotes the set of strictly positive real numbers. For $p = 1 , 2$ , the $\ell _ { p }$ -norm of $x \in \mathbb { R } ^ { d }$ is $\| x \| _ { p } ^ { p } =$ $\sum _ { i } ^ { d } | x _ { i } | ^ { p }$ . The operations $\odot$ will stand for coordinate-wise product between vector: $[ u \odot v ] _ { i } = u _ { i } v _ { i }$ and $u ^ { 2 } = u \odot u$ . For $p \in \mathbb { N } ^ { * }$ , we also define $u ^ { p } : = u \odot \ldots \odot u$ , the $p$ times product of $u$ with itself. All inequalities between vectors should be understood value by value. For $f , g \in \mathbb { R }$ , the existence of $C > 0$ such that $f \leq C g$ and $C g \leq f$ will be denoted $f \leq O ( g )$ and $\Omega ( g ) \leq f$ respectively. We shall use the symbole $\widetilde O$ when this is true up to log factors. For a vector $u \in \mathbb { R } ^ { d }$ , $\mathrm { d i a g } ( u )$ denotes the $d \times d$ diagonal matrix which has its diagonal equal to $u$ . For a matrix $M \in \mathbb { R } ^ { d \times d }$ , $\mathrm { d i a g } ( M )$ denotes the vector $( M _ { 1 1 } , \dots , M _ { d d } ) \in \mathbb { R } ^ { d }$ . The indexed vector $\beta ^ { * }$ will stand for any $\beta$ interpolating the data, i.e. any vector in the affine space $\{ \beta \in \mathbb { R } ^ { d } s . t$ , $X \beta = Y \}$ of dimension at least $d - n$ . Out of all these, let $\begin{array} { r l } { \beta _ { \ell _ { 1 } } ^ { * } = } & { { } \arg \operatorname* { m i n } \quad \| \beta \| _ { 1 } } \end{array}$ . For $z$ any vector, $z _ { \infty }$ or $z ^ { \infty }$ will always designate of $\operatorname* { l i m } _ { t \to \infty } z _ { t }$ . ${ \boldsymbol { \beta } } \in { \mathbb { R } } ^ { d }$ $X \beta { = } y$
|
| 47 |
+
|
| 48 |
+
# 2 Setup and preliminaries
|
| 49 |
+
|
| 50 |
+
# 2.1 Architecture and algorithm.
|
| 51 |
+
|
| 52 |
+
Overparametrised noiseless regression. We consider a linear regression problem with outputs $( y _ { 1 } , \dotsc , y _ { n } ) \in \mathbb { R } ^ { n }$ and inputs $( x _ { 1 } , \ldots , x _ { n } ) \in ( \mathbb { R } ^ { d } ) ^ { n }$ . We study an overparametrised setting $( n < d )$
|
| 53 |
+
|
| 54 |
+
and assume that there exists at least one interpolating parameter $\beta ^ { * } \in \mathbb { R } ^ { d }$ which perfectly fits the training set, i.e. $y _ { i } = \langle \beta ^ { * } , x _ { i } \rangle$ for all $1 \leq i \leq n$ . We parametrise the regression vector $\beta$ as $\beta _ { w }$ with $w \in \mathbb { R } ^ { p }$ . We will see that though in the end our final models $x \mapsto \langle \beta _ { w } , x \rangle$ are classical linear models whatever the parametrisation $w \mapsto \beta _ { w }$ , the choice of this parametrisation has crucial consequences on the solution recovered by the learning algorithms. We study the quadratic loss and the overall loss is written as:
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
L ( w ) = L ( \beta _ { w } ) : = \frac { 1 } { 4 n } \sum _ { i = 1 } ^ { n } ( \langle \beta _ { w } , x _ { i } \rangle - y _ { i } ) ^ { 2 } = \frac { 1 } { 4 n } \sum _ { i = 1 } ^ { n } \langle \beta _ { w } - \beta ^ { * } , x _ { i } \rangle ^ { 2 } ,
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
where by abuse of notation we use $L ( w ) = L ( \beta _ { w } )$ .
|
| 61 |
+
|
| 62 |
+
2-layer diagonal linear network. The simplest parametrisation of $\beta _ { w }$ is to consider $\beta _ { w } \ = \ w$ which corresponds to the classical least-squares framework. It is well known that in this case, many first order methods (GD, SGD, with and without momentum) will converge towards the same solution: we say that they have the same implicit bias. This is experimentally not the case for neural networks where SGD has been shown to lead to solutions which have better generalisation properties compared to GD [23]. To theoretically confirm this observation, we study a simple non-linear parametrisation: $\beta _ { w } = w _ { + } ^ { 2 } - w _ { - } ^ { 2 }$ with $w \doteq [ w _ { + } , w _ { - } ] ^ { \intercal } \in \mathbb { R } ^ { 2 d }$ . We point out that it is 2-positive homogeneous and that it is equivalent to the parametrisation $\beta _ { u , v } = u \odot v$ with $u , v \in \mathbb { R } ^ { d }$ . It should be thought of a simplified linear network of depth 2 (see [36, Section 4] for more details). We consider two weight vectors $w _ { + }$ and $w _ { - }$ (and not only $\beta _ { w } = w ^ { 2 }$ ) in order to ensure that our final linear predictor parameter $\beta _ { w }$ can take negative values. For the sake of completeness, the study of diagonal linear networks of arbitrary depth $p \geq 3$ is done in Appendix E.2. Also note that additionally to being a toy neural model, it has received recent attention for its practical ability to induce sparsity [33, 34, 15] or to solve phase retrieval problems [37].
|
| 63 |
+
|
| 64 |
+
Stochastic Gradient Descent. With this quadratic parametrisation, the loss now rewrites as: $\begin{array} { r } { L ( w ) = \frac { 1 } { 4 n } \sum _ { i = 1 } ^ { n } \langle w _ { + } ^ { 2 } - w _ { - } ^ { 2 } - \beta ^ { * } , x _ { i } \rangle ^ { 2 } } \end{array}$ . Note that despite its simplicity, this loss is non convex and its minimisation is non trivial. The algorithm we shall consider is the well known SGD algorithm, where for a step size $\gamma > 0$ :
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\begin{array} { r l } & { w _ { t + 1 , + } = w _ { t , + } - \gamma \langle \beta _ { w } - \beta ^ { * } , x _ { i _ { t } } \rangle x _ { i _ { t } } \odot w _ { t , + } } \\ & { w _ { t + 1 , - } = w _ { t , - } + \gamma \langle \beta _ { w } - \beta ^ { * } , x _ { i _ { t } } \rangle x _ { i _ { t } } \odot w _ { t , - } } \end{array} \qquad \mathrm { w h e r e } i _ { t } \sim \mathrm { U n i f } ( 1 , n ) .
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
It is convenient to rewrite this recursion as
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
w _ { t + 1 , \pm } = w _ { t , \pm } - \gamma \nabla _ { w _ { \pm } } L ( w _ { t } ) \pm \gamma \mathrm { d i a g } ( w _ { t , \pm } ) X ^ { \top } \xi _ { i _ { t } } ( \beta _ { t } ) ,
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where $\xi _ { i _ { t } } ( \beta ) = - \big ( \langle \beta - \beta ^ { * } , x _ { i _ { t } } \rangle \mathbf { e } _ { i _ { t } } - \mathbb { E } _ { i _ { t } } \big [ \langle \beta - \beta ^ { * } , x _ { i _ { t } } \rangle \mathbf { e } _ { i _ { t } } \big ] \big ) \in \mathbb { R } ^ { n }$ is a zero-mean multiplicative noise which vanishes at any global optimum $\mathrm { i } \mathbf { e } _ { i }$ denotes the $i ^ { \mathrm { { t h } } }$ element of the canonical basis). We point out that all the results we shall give hold for any initialisation such that $w _ { t = 0 , + } = w _ { t = 0 , - } \in \mathbb { R } ^ { d }$ , under which we have that $\beta _ { w _ { t = 0 } } = 0$ . To understand under what conditions the SGD procedure converges and towards which point it does, we shall consider its continuous counterpart which has the advantage of leading to clean and intuitive calculations. We highlight the fact that we consider a bath-size equal to 1 for clarity, however all our analysis holds for mini-batch SGD (with and without replacement) simply by considering an effective step-size $\gamma _ { \mathrm { e f f } }$ instead of $\gamma$ , this is clearly explained in Appendix A.
|
| 77 |
+
|
| 78 |
+
# 2.2 Stochastic gradient flow
|
| 79 |
+
|
| 80 |
+
Continuous time modelling of sequential processes offer a large set of tools, such as derivation, which come in helpful to understand the dynamics of the processes. This has led to a large part of the recent literature to consider continuous gradient flow in order and understand the behaviour of gradient descent on complicated architectures such as neural nets. However, the continuous time modelling of stochastic gradient descent is more challenging: it requires to add on top of the gradient flow a diffusion term whose covariance matches the one of SGD. Hence, it is fundamental to understand its structure and scale.
|
| 81 |
+
|
| 82 |
+
Understanding the noise’s structure. As seen in equation (2), evaluated at $w _ { \pm }$ , the stochastic noise $\gamma \mathrm { d i a g } ( \tilde { w _ { \pm } } ) X ^ { \top } \xi _ { i _ { t } } ( w )$ has two main characteristics which we want to preserve:
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\begin{array} { r } { \ast \Sigma _ { \mathrm { s o p } } ( w _ { \pm } ) : = \gamma ^ { 2 } \dim ( w _ { \pm } ) X ^ { \top } \mathbf { C o v } _ { i _ { t } } ( \xi _ { i _ { t } } ( \beta ) ) X \operatorname { d i a g } ( w _ { \pm } ) \in \mathbb { R } ^ { d \times d } } \end{array}
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
It remains to understand the structure of the covariance of $\xi _ { i _ { t } }$ which has the following closed form: $\begin{array} { r } { \mathrm { C o v } _ { i _ { t } } \big ( \xi _ { i _ { t } } ( \beta ) \big ) = \frac { 1 } { n } \operatorname { d i a g } \big ( \langle \beta - \beta ^ { * } , x _ { i } \rangle ^ { 2 } \big ) _ { 1 \leq i \leq n } - \frac { 1 } { n ^ { 2 } } \big ( \langle \beta - \beta ^ { * } , x _ { i } \rangle \langle \beta - \beta ^ { * } , x _ { j } \rangle \big ) _ { 1 < i , i < n } } \end{array}$ . We identify the two key facts: (i) it is diagonal at the leading $n ^ { - 1 }$ order and (ii) its trace is linked to the loss as $\begin{array} { r } { \operatorname { V a r } _ { i _ { t } } ( \| \dot { \xi } _ { i _ { t } } ( \beta ) \| _ { 2 } ) = \frac { 4 } { n } L ( \beta ) + O ( \frac { 1 } { n ^ { 2 } } ) } \end{array}$ . This leads us in modelling $\xi _ { i _ { t } } ( \beta )$ ’s covariance matrix as $\textstyle { \frac { 4 } { n } } L ( \beta ) I _ { n }$ as it preserves these two characteristics 1. Finally this brings us to consider the following modelling of the overall noise’s structure: $\begin{array} { r } { \Sigma _ { \scriptscriptstyle \mathrm { S G D } } ( w _ { \pm } ) \cong \frac { 4 } { n } \gamma ^ { 2 } L ( w ) [ \mathrm { d i a g } ( w _ { \pm } ) X ^ { \top } ] ^ { \otimes 2 } } \end{array}$ .
|
| 89 |
+
|
| 90 |
+
Stochastic differentiable equation modelling. Guided by the previous considerations, we study the following stochastic gradient flow:
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\begin{array} { r l } & { \mathrm { d } w _ { t , + } = - \nabla _ { w _ { + } } L ( w _ { t } ) \mathrm { d } t + 2 \sqrt { \gamma n ^ { - 1 } L ( w _ { t } ) } w _ { t , + } \odot [ X ^ { \top } \mathrm { d } B _ { t } ] } \\ & { \mathrm { d } w _ { t , - } = - \nabla _ { w _ { - } } L ( w _ { t } ) \mathrm { d } t - 2 \sqrt { \gamma n ^ { - 1 } L ( w _ { t } ) } w _ { t , - } \odot [ X ^ { \top } \mathrm { d } B _ { t } ] , } \end{array}
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
where $\mathrm { d } B _ { t }$ is a standard $\mathbb { R } ^ { n }$ Brownian motion. The SDE is a perturbed gradient flow with a diffusion term that is defined such that its Euler discretisation with step size $\gamma$ leads to a Markov Chain whose covariance exactly matches SGD’s noise covariance $\Sigma _ { \mathrm { s g D } } ( w _ { \pm } )$ . We refer to [26] or [25] for the technical details regarding consistency of such a procedure in the limit of small step sizes. This stochastic differential equation is the starting point of the analysis.
|
| 97 |
+
|
| 98 |
+
# 3 The implicit bias of the stochastic gradient flow
|
| 99 |
+
|
| 100 |
+
Implicit bias and hyperbolic entropy. To understand the relevance of the main result and how stochasticity induces a preferable bias, we start by recalling some known results for gradient flow. In [36] it is shown, assuming global convergence, that the solution selected by the gradient flow initialised at $\alpha \in \mathbb { R } ^ { d }$ and denoted $\beta _ { \infty } ^ { \alpha }$ solves a constrained optimisation problem involving the hyperbolic entropy introduced by [13]:
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
\beta _ { \infty } ^ { \alpha } = \operatorname * { a r g m i n } _ { \beta \in \mathbb { R } ^ { d } } \operatorname* { m i n } _ { s . t . X \beta = y } \phi _ { \alpha } ( \beta ) : = \frac { 1 } { 4 } \big [ \sum _ { i = 1 } ^ { d } \beta _ { i } \mathrm { a r c s i n h } ( \frac { \beta _ { i } } { 2 \alpha _ { i } ^ { 2 } } ) - \sqrt { \beta _ { i } ^ { 2 } + 4 \alpha _ { i } ^ { 4 } } \big ] ,
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
Though the hyperbolic entropy function has a non-trivial expression, its principal characteristic is $\ell _ { 1 }$ nd thand $\ell _ { 2 }$ $\alpha$ precisely for. We refer to $\begin{array} { r } { \tau \in \mathbb { R } ^ { 2 } \colon \dot { \phi _ { \alpha } } ( \beta ) \underset { \alpha \to 0 } { \sim } \frac { 1 } { 2 } \ln \left( \frac { 1 } { \alpha } \right) \| \bar { \beta } \| _ { 1 } } \end{array}$ $\begin{array} { r } { \bar { \phi _ { \alpha } ( \beta ) } \underset { \alpha \to + \infty } { = } - \frac { 1 } { 2 } \bar { \alpha ^ { 2 } } + \frac { 1 } { 1 6 \alpha ^ { 2 } } \| \beta \| _ { 2 } ^ { 2 } + o ( \alpha ^ { - 2 } ) . } \end{array}$ [36, Theorem 2] for more details on the asymptotic analysis. The implicit optimisation problem (4) therefore highlights the fact that the initialisation scale of the weights controls the shape of the recovered solution. Small initialisations lead to low $\ell _ { 1 }$ -norm solutions which are known to induce good generalisation properties: this is what is often referred to as the rich regime. Large initialisations lead to low $\ell _ { 2 }$ -norm solutions: this is referred to as the kernel regime or lazy regime in which the weights move only very slightly. The dynamics of the gradient flow are then very similar to the one of kernel linear regression with the kernel depending on the initialisation [20, 12]. Overall, to retrieve a sparse solution, one should initialise with the smallest $\alpha$ possible. However, as is clearly explained in [36], it is important to stress out that there is a generalisation $/$ optimisation tradeoff: the point $w = 0$ happens to be a saddle point for the loss and a smaller $\alpha$ will lead to a longer training time.
|
| 107 |
+
|
| 108 |
+
Main result. In the main theorem we show that, for an initialisation scale $\alpha$ , the stochasticity of SGF biases the flow towards solutions which still minimise the hyperbolic entropy. However, what is remarkable is that it does so with an effective parameter $\alpha _ { \infty }$ which is strictly smaller than $\alpha$ . The recovered solution therefore minimises an optimisation problem which has better sparsity inducing properties than that of gradient flow.
|
| 109 |
+
|
| 110 |
+
Theorem 1. For $\begin{array} { l } { p \ \leq \ \frac { 1 } { 2 } } \end{array}$ and $w _ { 0 , \pm } = \alpha \in ( \mathbb { R } _ { + } ^ { * } ) ^ { d }$ , let $( w _ { t } ) _ { t \geq 0 }$ follow the stochastic gradient flow (3) with step size $\begin{array} { r } { \gamma \leq O \big ( \big [ \ln ( \frac { 4 } { p } ) \lambda _ { \operatorname* { m a x } } \operatorname* { m a x } \{ \| \beta _ { \ell _ { 1 } } ^ { * } \| _ { 1 } \ln \big ( \frac { \| \beta _ { \ell _ { 1 } } ^ { * } \| _ { 1 } } { \operatorname* { m i n } _ { i } \alpha _ { i } ^ { 2 } } \big ) , \| \alpha \| _ { 2 } ^ { 2 } \} \big ] ^ { - 1 } \big ) } \end{array}$ where $\beta _ { \ell _ { 1 } } ^ { * } =$ arg min $\| \beta \| _ { 1 }$ and $\lambda _ { \mathrm { m a x } }$ is the largest eigenvalue of $X ^ { \top } X / n$ . Then, with probability at least $1 - p$ : $\beta \in \mathbb { R } ^ { d } \ s . t . \ X \beta = y$
|
| 111 |
+
|
| 112 |
+
• $( \beta _ { t } ) _ { t \geq 0 }$ converges towards a zero-training error solution $\beta _ { \infty } ^ { \alpha }$
|
| 113 |
+
|
| 114 |
+
• the solution $\beta _ { \infty } ^ { \alpha }$ satisfies
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\beta _ { \infty } ^ { \alpha } = \underset { \beta \in \mathbb { R } ^ { d } } { \arg \operatorname* { m i n } } \quad \phi _ { \alpha _ { \infty } } ( \beta ) \quad w h e r e \quad \alpha _ { \infty } = \alpha \odot \exp \left( - 2 \gamma \dim \operatorname { g } \left( \frac { X ^ { \top } X } { n } \right) \int _ { 0 } ^ { + \infty } L ( \beta _ { s } ) \mathrm { d } s \right) .
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
The theorem is three-fold: with high probability and for an explicit choice of constant step size $\gamma$ , (i) the flow $( \beta _ { t } ) _ { t \geq 0 }$ converges, (ii) its limit $\beta _ { \infty } ^ { \alpha }$ is an interpolating solution, i.e. $X \beta _ { \infty } ^ { \alpha } = y$ , (iii) this solution minimises the hyperbolic entropy problem with a parameter that depends on the dynamics. We illustrate these results in Figure 2. Now let us comment further the theorem.
|
| 121 |
+
|
| 122 |
+

|
| 123 |
+
Figure 2: Sparse regression (see Section 5.1 for the detailed experimental setting). Both SGD and GD are initialised at $\alpha = 0 . 1$ . 2 different runs of SGD over the training set are performed, they differ due to the inner stochasticity of the algorithm. Left: GD and SGD both converge towards a global minimum. Middle and right: for two different trajectories of SGD, the higher the value of the loss integral at convergence, the better the validation loss. In both cases SGD converges towards a solution which generalises better than GD. This figure illustrates Theorem 1.
|
| 124 |
+
|
| 125 |
+
Beneficial implicit bias through effective initialisation. The most remarkable aspect of the result is that the recovered solution $\beta _ { \infty } ^ { \alpha }$ minimises the same potential as for gradient flow but with an effective parameter $\alpha _ { \infty }$ which is strictly smaller than $\alpha$ . Hence, the hyperbolic entropy is closer to the $\ell _ { 1 }$ norm compared to the deterministic case, proving a systematic benefit of stochasticity. Note that this effective parameter is random and controlled by the loss integral $\begin{array} { r l } { \int _ { 0 } ^ { + \infty } L ( \beta _ { s } ) \mathrm { d } s , } \end{array}$ : the higher the integral, the smaller the effective initialisation scale. In other words and quite surprisingly, the slower the loss converges to 0, the “richer” the implicit bias. However, it must be kept in mind that, as explained in [36], there is a tension between generalisation and optimisation: a longer training time might improve generalisation but comes at the cost of... a longer training time. Yet it is clear experimentally that SGD systematically largely wins the trade-off over GD (see Figure 2). Interestingly, Problem (5) tells us that the implicit bias of SGD initialised at $\alpha$ acts as if we run GD initialised at $\alpha _ { \infty }$ (see Section 5.3). Note that the minimisation problem (5) only makes sense $a$ posteriori since the quantity $\alpha _ { \infty }$ depends on the whole stochastic trajectory. Finally, an interesting question is whether one can quantify the scale of this beneficial phenomenon, i.e. how small $\alpha _ { \infty }$ is compared to $\alpha$ . To answer this, we quantify the scale of the loss integral w.r.t. $\gamma$ and $\alpha$ (see Proposition 3) and show under slightly stronger conditions that the relative scale $\alpha _ { \infty } / \alpha$ decays as power of $\alpha$ (See Eq. (8) of the main text and Proposition 6 of the appendix for a proof).
|
| 126 |
+
|
| 127 |
+
Kernel regime. Though it is less our focus, our result still holds as $\alpha + \infty$ which corresponds to the kernel regime. In this regime, we believe that $\begin{array} { r } { \int _ { 0 } ^ { + \infty } L ( \beta _ { s } ) \mathrm { d } s \underset { \alpha \infty } { } 0 } \end{array}$ (not shown in the paper but experimentally observed) and hence SGF and GF converge towards the same solution. This is expected since in the NTK regime, the iterates follow a kernel linear regression for which the bias of SGF and GF are the same.
|
| 128 |
+
|
| 129 |
+
Step size. Note that the convergence of the iterates holds for a constant step size. This is not illogical since in the overparametrised setting, the noise vanishes at the optimum (see [32] for a convergence result in the overparametrised least-squares setup). The explicit formula for the $\gamma$ upper bound is $\begin{array} { r } { \gamma \leq \left( 4 0 0 \ln \left( \frac { 4 } { p } \right) \lambda _ { \operatorname* { m a x } } \big ( \frac { X ^ { \top } X } { n } \big ) \operatorname* { m a x } \left\{ \| \beta _ { \ell _ { 1 } } ^ { * } \| _ { 1 } \ln \left( \sqrt { 2 } \frac { \| \beta _ { \ell _ { 1 } } ^ { * } \| _ { 1 } } { \operatorname* { m i n } _ { i } \alpha _ { i } ^ { 2 } } \right) , \| \alpha \| _ { 2 } ^ { 2 } \right\} \right) ^ { - 1 } } \end{array}$ . It has a classical dependence on $\lambda _ { \operatorname* { m a x } } ( X ^ { \top } X / n )$ which can be computed, but also on the unknown value of $\| \beta _ { \ell _ { 1 } } ^ { * } \| _ { 1 }$ . However in practice we choose the highest value of $\gamma$ for which the iterates converge. Note that in practice the weights are often initialised such that $\| \alpha \| _ { 2 } ^ { 2 }$ is roughly equal to 1 and hence it is sensible to consider $\| \alpha \| _ { 2 } ^ { 2 } < \| \beta _ { \ell _ { 1 } } ^ { * } \| _ { 1 }$ . In the explicit bound, there is a $\ln \left( \lVert \boldsymbol { \beta } _ { \ell _ { 1 } } ^ { * } \rVert _ { 1 } / \operatorname* { m i n } _ { i } \alpha _ { i } ^ { 2 } \right) ^ { - 1 }$ factor, we believe that it is an artefact of our analysis and could be removed. It is hence best to think of the upperbound on $\gamma$ to simply be $\begin{array} { r } { \gamma \le O ( \frac { 1 } { \lambda _ { \operatorname* { m a x } } \| \beta _ { \ell _ { 1 } } ^ { * } \| _ { 1 } } ) } \end{array}$ .
|
| 130 |
+
|
| 131 |
+
Convergence and proof sketch. Let us put emphasis on the fact that since we deal with a nonconvex problem, neither convergence nor convergence towards a global minimum are obvious. In most of similar works, convergence of the iterates is assumed [36, 14]. In fact, the hardest and most technical part of our result is to show the convergence of the flow with high probability: once the convergence is shown, describing the minimisation problem $\beta _ { \infty } ^ { \alpha }$ verifies is straightforward. In the following section we give several properties which constitute the major keys of the theorem’s proof.
|
| 132 |
+
|
| 133 |
+
# 4 Links with mirror descent
|
| 134 |
+
|
| 135 |
+
The aim of this section is to show that the sequence $( \beta _ { t } ) _ { t \geq 0 }$ follows a stochastic version of continuous mirror descent with a time dependent mirror. From this crucial property, we show how the convergence and implicit bias characterisation follow. Finally, as it is one of the central objects of our main theorem, we give an estimation of $\int _ { 0 } ^ { \infty } L ( \beta _ { s } ) \mathrm { d } s$ .
|
| 136 |
+
|
| 137 |
+
# 4.1 Stochastic continuous mirror descent with time-varying potential
|
| 138 |
+
|
| 139 |
+
We start by recalling known results on the link between implicit bias and mirror descent. We recall also convergence guarantees for mirror descent dynamics.
|
| 140 |
+
|
| 141 |
+
Mirror descent: convergence and implicit bias. For any $\beta _ { 0 } \in \mathbb { R } ^ { d }$ and convex potential function $\Psi$ , consider the mirror descent flow $( \beta _ { t } ) _ { t }$ which corresponds to $\mathrm { d } \nabla \Psi ( \beta _ { t } ) = - \bar { \nabla L } ( \beta _ { t } ) \mathrm { d } t$ . Though the convergence of the loss to 0 is straightforward, showing the convergence of the iterates requires more work and is shown in [4, Theorem 2] for strongly convex potentials. Yet, once the convergence of the iterates is shown, deriving the implicit minimisation problem is straightforward. We recall the reasoning here (see Section 3 of [2] for more details): integrating the flow yields $\nabla \Psi ( \beta _ { \infty } ) -$ $\begin{array} { r } { \nabla \Psi ( \beta _ { 0 } ) = - \int _ { 0 } ^ { \infty } \nabla L ( \beta _ { s } ) \mathrm { d } s = - 4 X ^ { \top } \int _ { 0 } ^ { \infty } X ( \beta _ { s } - \beta _ { \infty } ) \mathrm { d } s \in \mathrm { s p a n } ( X ) } \end{array}$ . This condition, along with the fact that $X \beta _ { \infty } = y$ exactly corresponds to the KKT conditions of the problem:
|
| 142 |
+
|
| 143 |
+
$$
|
| 144 |
+
\beta _ { \infty } = \underset { \beta \in \mathbb { R } ^ { d } \mathrm { ~ s . t . ~ } X \beta = y } { \arg \operatorname* { m i n } } D _ { \Psi } ( \beta , \beta _ { 0 } ) ,
|
| 145 |
+
$$
|
| 146 |
+
|
| 147 |
+
where $D _ { \Psi } ( \beta , \beta _ { 0 } ) = \Psi ( \beta ) - \Psi ( \beta _ { 0 } ) - \langle \nabla \Psi ( \beta _ { 0 } ) , \beta - \beta _ { 0 } \rangle$ is the Bregman divergence w.r.t. $\Psi$ .
|
| 148 |
+
|
| 149 |
+
Link with our model. It turns out that these general observations on mirror descent apply to our framework when $( w _ { t } ) _ { t }$ follows the gradient flow $\mathrm { d } w _ { t , \pm } = - \nabla _ { w _ { \pm } } L ( w _ { t } ) \mathrm { d } t$ . Indeed it has been shown in [36] that the corresponding iterates $\beta _ { t } = w _ { t , + } ^ { 2 } - w _ { t , - } ^ { 2 }$ follow a mirror descent with potential $\phi _ { \alpha }$ defined in Eq.(4). Therefore we can apply the previous remarks to obtain the convergence towards an interpolator3, as well as the associated implicit minimisation problem which in our case can be rewritten as $\beta _ { \infty } ^ { \alpha } = \arg \operatorname* { m i n } \quad \phi _ { \alpha } ( \beta )$ since $\nabla \phi _ { \alpha } ( \beta _ { 0 } = 0 ) = 0$ .
|
| 150 |
+
$\beta \in \mathbb { R } ^ { d }$ s.t. $X \beta { = } y$
|
| 151 |
+
|
| 152 |
+
Stochastic Mirror descent with a time varying potential. To address the problem where $( w _ { t } ) _ { t }$ follows a stochastic gradient flow instead of a gradient flow, it is natural, as in the deterministic framework, to see what type of flow $( \beta _ { t } ) _ { t }$ follows. Because of the noise, we cannot hope to simply recover a classical mirror descent. However interestingly the next property shows that it follows a stochastic mirror-like descent with a geometry that depends on time.
|
| 153 |
+
|
| 154 |
+
Proposition 1. Consider the iterates $( w _ { t } ) _ { t \geq 0 }$ issued from the stochastic gradient flow in Eq.(3) with initialisation $w _ { 0 , \pm } = \alpha \in ( \mathbb { R } _ { + } ^ { * } ) ^ { d }$ . Then the corresponding flow $( \beta _ { t } ) _ { t \geq 0 }$ follows a “stochastic continuous mirror descent with time varying potential” defined by:
|
| 155 |
+
|
| 156 |
+
$$
|
| 157 |
+
\mathrm { d } \nabla \phi _ { \alpha _ { t } } ( \beta _ { t } ) = - \nabla L ( \beta _ { t } ) \mathrm { d } t + \sqrt { \gamma n ^ { - 1 } L ( \beta _ { t } ) } \boldsymbol { X } ^ { \top } \mathrm { d } \boldsymbol { B } _ { t } ,
|
| 158 |
+
$$
|
| 159 |
+
|
| 160 |
+
where $\begin{array} { r } { \alpha _ { t } = \alpha \odot \exp \left( - 2 \gamma \operatorname { d i a g } \left( \frac { X ^ { \top } X } { n } \right) \int _ { 0 } ^ { t } L ( \beta _ { s } ) \mathrm { d } s \right) } \end{array}$ and $\phi _ { \alpha }$ is the hyperbolic entropy defined in (4).
|
| 161 |
+
|
| 162 |
+
Under this form we clearly see that the iterates $( \beta _ { t } ) _ { t }$ follow a flow which closely resembles that of mirror descent but with two major differences: (i) the potential $\phi _ { \alpha _ { t } }$ changes over time according to the random quantity $\int _ { 0 } ^ { t } L ( \beta _ { s } ) \mathrm { d } s$ , (ii) the flow is perturbed by noise. We highlight the fact that viewing the dynamics this way has the major advantage of giving a clear roadmap for the proof of Theorem 1: (i) we can adapt classical mirror-descent results to our framework and construct appropriate Lyapunov functions to prove the convergence of the flow with high probability to some interpolator $\beta _ { \infty } ^ { \alpha }$ , (ii) we immediately recover the corresponding minimisation problem as in the deterministic case. Indeed, integrating Eq.(7) still yields $\nabla \phi _ { \alpha _ { \infty } } ( \beta _ { \infty } ^ { \alpha } ) \in \mathrm { s p a n } ( X )$ which, along with $X \beta _ { \infty } ^ { \alpha } = y$ , are the KKT conditions of the implicit minimisation problem (5). We emphasise the fact that the structure of the noise, belonging to $\operatorname { s p a n } ( X )$ , is crucial in order to obtain this minimisation problem. This would for instance clearly not be true if we considered isotropic noise in the SDE modelling. This highlights the fact that not every form of noise improves the implicit bias: the shape of the intrinsic SGD noise is of primal importance [15].
|
| 163 |
+
|
| 164 |
+
# 4.2 Convergence and control of $\int _ { 0 } ^ { \infty } L ( \beta _ { s } ) \mathrm { d } s$
|
| 165 |
+
|
| 166 |
+
Though it seems easy to derive the implicit minimisation problem (5) from the mirror-like structure of Eq.(7), it is necessary to ensure that the iterates converge towards an interpolator $\beta _ { \infty }$ . This is the purpose of the following proposition.
|
| 167 |
+
|
| 168 |
+
Proposition 2 (Convergence of the iterates). Consider the iterates $( w _ { t } ) _ { t \geq 0 }$ issued from the stochastic gradient flow (3), initialised at $w _ { 0 , \pm } = \alpha \in ( \mathbb { R } _ { + } ^ { * } ) ^ { d }$ . For $\begin{array} { r } { p \leq \frac { 1 } { 2 } } \end{array}$ and $\gamma$ such as in Theorem $^ { l }$ , then with probability at least $1 - p ,$ the flow $( \beta _ { t } ) _ { t }$ converges to an interpolating solution $\beta _ { \infty } ^ { \alpha }$ .
|
| 169 |
+
|
| 170 |
+
The convergence of the iterates is technical and requires several intermediate results. We start by considering an appropriate Bregman-type stochastic function with a time-varying potential and show that it converges with high probability. Leveraging the fact that we are able to bound the iterates $\beta _ { t }$ , we are able to show that the limit of the function is in fact 0. Owing to the fact that the function we consider also controls the distance of $\beta _ { t }$ to a particular $\beta ^ { * }$ we finally get that the iterates converge.
|
| 171 |
+
|
| 172 |
+
However for the objects (such as $\alpha _ { \infty }$ ) and functions we introduce to be well defined, we need to guarantee the convergence of $\int _ { 0 } ^ { \infty } L ( \beta _ { s } ) \mathrm { d } s$ . Besides, it is crucial to grasp the scale of this quantity since it gives the overall scale of $\alpha _ { \infty }$ . This is done in the following proposition where we lower and upper bound its value.
|
| 173 |
+
|
| 174 |
+
Proposition 3. Under the same setting as in Proposition 2 with initialisation $w _ { 0 , \pm } = \alpha \mathbf { 1 }$ , we have with probability at least $1 - p$ :
|
| 175 |
+
|
| 176 |
+
$$
|
| 177 |
+
\Omega \Big ( \| \beta _ { \ell _ { 1 } } ^ { * } \| _ { 1 } \ln \Big ( \frac { \| \beta _ { \ell _ { 1 } } ^ { * } \| _ { 1 } } { \alpha ^ { 2 } } \Big ) \Big ) \underset { \alpha \to 0 } { \leqslant } \int _ { 0 } ^ { + \infty } L ( \beta _ { s } ) { \mathrm { d } } s \leqslant O \Big ( \operatorname* { m a x } \big \{ \| \beta _ { \ell _ { 1 } } ^ { * } \| _ { 1 } \ln \Big ( \frac { \| \beta _ { \ell _ { 1 } } ^ { * } \| _ { 1 } } { \alpha ^ { 2 } } \Big ) , \alpha ^ { 2 } d \big \} \Big ) .
|
| 178 |
+
$$
|
| 179 |
+
|
| 180 |
+
We point out that the lower bound is given for small $\alpha$ ’s for simplicity but we provide in Lemma 7 (Appendix B.5) a lower bound which holds for all $\alpha$ ’s. Note that when $\gamma = 0$ , which corresponds to deterministic gradient flow, we can give the exact value for the integral: $\begin{array} { r } { \int _ { 0 } ^ { + \infty } L ( \beta _ { s } ) \mathrm { d } s = } \end{array}$ $\begin{array} { c l c r } { \frac { 1 } { 2 } D _ { \phi _ { \alpha } } \big ( \beta _ { \infty } ^ { \alpha } , \beta _ { 0 } \big ) } \end{array}$ (see Proposition 7 in Appendix C). This matches the scale of the bounds given in Proposition 3, hence showing the tightness of the result. We focus now on how this translates to the scale of the effective initialisation w.r.t. $\alpha$ when this latter is small enough. In fact, this lower bound on the integral of the loss along with a stronger assumption on the boundedness of the iterates lead to
|
| 181 |
+
|
| 182 |
+
$$
|
| 183 |
+
\frac { \alpha _ { \infty } } { \alpha } \underset { \alpha 0 } { \leqslant } ( \frac { \alpha ^ { 2 } } { \| \beta _ { \ell _ { 1 } } ^ { * } \| _ { 1 } } ) ^ { \zeta } ,
|
| 184 |
+
$$
|
| 185 |
+
|
| 186 |
+
for some $\zeta > 0$ . Hence the smaller the initialisation scale $\alpha$ and the greater the benefit of SGD over GD in terms of implicit bias (see Appendix B.6 for more details).
|
| 187 |
+
|
| 188 |
+
Again, the proof of this proposition is technical and relies on considering appropriate Lyapunov functions which highly resemble to Bregman divergences, but which take into account the fact that the geometry changes over time. These overall decreasing Lyapunov’s enable to bound the iterates as well as lower and upper bound the integral of the loss. The stochastic integrals which naturally appear are controlled with high probability using time-uniform concentration of martingales [19].
|
| 189 |
+
|
| 190 |
+
# 5 Experiments
|
| 191 |
+
|
| 192 |
+
# 5.1 Experimental setup for sparse regression
|
| 193 |
+
|
| 194 |
+
We consider the following sparse regression setup for our experiments. We choose $n = 4 0$ , $d = 1 0 0$ and randomly generate a sparse model $\beta _ { \ell _ { 0 } } ^ { \ast }$ such that $\| \beta _ { \ell _ { 0 } } ^ { * } \| _ { 0 } = 5$ . We generate the features as $x _ { i } \sim \mathcal { N } ( 0 , I )$ and the labels as $y _ { i } = x _ { i } ^ { \top } \beta _ { \ell _ { 0 } } ^ { * }$ . SGD, GD and the SGF are always initialised using the same scale $\alpha > 0$ and it is specified each time. We use the same step size for GD and SGD and choose it to be the biggest as possible why still ensuring convergence. Note that since the true population covariance $\mathbb { E } [ x x ^ { \top } ]$ is equal to identity, the quantity $\lVert \beta _ { t } - \beta _ { \ell _ { 0 } } ^ { * } \rVert _ { 2 } ^ { 2 }$ corresponds to the validation loss.
|
| 195 |
+
|
| 196 |
+
# 5.2 Validation of the SDE model
|
| 197 |
+
|
| 198 |
+
In this section, we present an experimental validation of the stochastic gradient flow model. In Figure 3, for the same step size, we run: (i) the trajectory of gradient descent, (ii) 5 trajectories of stochastic gradient descent that correspond to different realisations of the uniform sampling over the data, (iii) 5 trajectories of the stochastic gradient flow (its Euler discretisation with $\mathrm { d } t = \gamma / 1 0 $ )) corresponding to different realisations of the Brownian. We clearly see (left) that the loss behaves similarly for SGD and SGF across time. We also see that the validation losses (right) of the iterates of SGD and SGF have very similar behaviours. This tends to validate our continuous modelling from Section 2.2.
|
| 199 |
+
|
| 200 |
+

|
| 201 |
+
Figure 3: Sparse regression (see Section 5.1 for the detailed experimental setup). Left and right: the training and the validation losses behave very similarly, corroborating the continuous modelling.
|
| 202 |
+
|
| 203 |
+
# 5.3 GD and SGD have the same implicit bias, but from different initialisations.
|
| 204 |
+
|
| 205 |
+
In order to confirm and illustrate the main Theorem 1, we provide the following experiment which is illustrated Figure 4. We first run GD and SGD with the same step-size and initialise them both at $\alpha \mathbf { 1 }$ with $\alpha ~ = ~ 0 . 0 1$ . As expected, the solution recovered by SGD generalises better. Then, using the iterates $\beta _ { t } ^ { \mathrm { S G D } }$ from the first SGD run, we compute the value $\begin{array} { r } { \alpha _ { \infty } = \alpha \exp ( - 2 \gamma \operatorname { d i a g } ( X ^ { \top } X / n ) \int _ { 0 } ^ { \infty } L ( \beta _ { s } ^ { \mathrm { S G D } } ) \mathrm { d } s ) \in \mathbb { R } ^ { d } } \end{array}$ (the integral is approximated by its discrete time approximation with $\mathrm { d } t = \gamma$ ). We then run gradient descent but this time initialised at $w _ { 0 , \pm } = \alpha _ { \infty }$ . According to our main result from Theorem 1, it should approximately (it would be exact if we ran SGF and GF) converge to the same solution as SGD initialised at $\alpha \mathbf { 1 }$ . This is clearly observed Figure 4 (right). Also note that SGD and GD (initialised at $\alpha _ { \infty }$ ) seem to have overall very similar dynamics, this is not shown by our results and we leave this as future work. However keep in mind that though the validation losses converge at the same iteration rate, in terms of computation time, SGD is $n$ times faster.
|
| 206 |
+
|
| 207 |
+

|
| 208 |
+
Figure 4: Sparse regression (see Section 5.1 for the detailed experimental setup). Left and right: SGD initialised at $\alpha \mathbf { 1 }$ converges towards the same point as GD initialised at $\begin{array} { r l } { \alpha _ { \infty } } & { { } = } \end{array}$ $\begin{array} { r } { \tilde { \alpha \exp ( - 2 \gamma \operatorname { d i a g } ( X ^ { \top } X / n ) \int _ { 0 } ^ { \infty } { { L } ( \beta _ { s } ^ { \mathrm { { S G } \tilde { D } } } ) \mathrm { { d } } s } ) } } \end{array}$ .
|
| 209 |
+
|
| 210 |
+
# 5.4 Doping the implicit bias with label noise
|
| 211 |
+
|
| 212 |
+
As largely discussed throughout the paper, the effect of the implicit bias is controlled by the convergence speed of the loss: the slower it converges, the sparser the selected solution will be. Hence the following question: can we leverage this knowledge to dope the implicit bias? We argue in this Section that the answer to this question is affirmative. Indeed, consider a sequence $( \delta _ { t } ) _ { t \in \mathbb { N } } \overline { { \in } } { \mathbb { R } } _ { + } ^ { \mathbb { N } }$ and assume that we artificially inject some label noise $\Delta _ { t }$ at time $t$ , say for example $\Delta _ { t } \sim \mathrm { U n i f } \{ 2 \delta _ { t } , - 2 \delta _ { t } \}$ (independently from $i _ { t }$ ). This injected label noise perturbs the SGD recursion as follows:
|
| 213 |
+
|
| 214 |
+
$$
|
| 215 |
+
w _ { t + 1 , \pm } = w _ { t , \pm } \mp \gamma \left( \langle \beta _ { w } - \beta ^ { * } , x _ { i _ { t } } \rangle + \Delta _ { t } \right) x _ { i _ { t } } \odot w _ { t , + } ,
|
| 216 |
+
$$
|
| 217 |
+
|
| 218 |
+
As in Section 2.2, we can derive its related stochastic gradient flow (see Appendix D.1 for more details):
|
| 219 |
+
|
| 220 |
+
$$
|
| 221 |
+
\mathrm { d } w _ { t , \pm } = - \nabla _ { w _ { \pm } } L ( w _ { t } ) \mathrm { d } t \pm 2 \sqrt { \gamma n ^ { - 1 } ( L ( w _ { t } ) + \delta _ { t } ^ { 2 } ) } w _ { t , + } \odot [ X ^ { \top } \mathrm { d } B _ { t } ] .
|
| 222 |
+
$$
|
| 223 |
+
|
| 224 |
+
Assuming that $( \delta _ { t } ) _ { t \geq 0 } \in ( \mathbb { R } _ { + } ) ^ { \mathbb { R } }$ and $\gamma$ are such that the iterates converge, the corresponding implicit regularisation minimisation problem is preserved but with a "slowed down" loss: $\tilde { L } ( \beta _ { t } ) : = L ( \beta _ { t } ) + \delta _ { t } ^ { 2 }$ and the effective initialisation writes: $\begin{array} { r } { \tilde { \alpha } _ { \infty } = \alpha \odot \exp \left( - 2 \gamma \mathrm { d i a g } ( \frac { X ^ { \top } X } { n } ) \int _ { 0 } ^ { + \infty } \tilde { L } ( \beta _ { s } ) \mathrm { d } s \right) } \end{array}$ . The label noise therefore helps recovering a solution which has better sparsity properties. However, it must be kept in mind that adding too much label noise can significantly slow down the convergence of the validation loss or even prevent the iterates from converging. Yet, experimental results showing the impressive effect of label noise are provided Figure 5 in Appendix D.1.
|
| 225 |
+
|
| 226 |
+
# 6 Conclusion and Perspectives
|
| 227 |
+
|
| 228 |
+
In this paper, we have shown the benefit of using stochastic gradient descent over gradient descent for diagonal linear networks in terms of their implicit bias. Indeed, we prove that stochastic gradient flow acts as gradient flow but initialised at a smaller scale: this induces a sparser finale iterate. This effect is controlled by the speed of convergence of the loss. Moreover, we prove the convergence of the flow and exhibit an interesting link with mirror descent. Fully understanding this novel type of dynamics could help to grasp the implicit biasing properties of stochastic gradient descent in other frameworks. It is also natural to ask whether the integral of the loss also controls the difference of implicit regularisation for more general architectures. It would also be interesting to analyse how this property adapts to log losses known to lead to max-margin solutions in classification.
|
| 229 |
+
|
| 230 |
+
Acknowledgements. NF would like to thank Nathan Srebro for introducing him to the question of SGD’s implicit bias as well as for the stimulating discussions they had during his visit at EPFL.
|
| 231 |
+
|
| 232 |
+
References
|
| 233 |
+
[1] Alnur Ali, Edgar Dobriban, and Ryan Tibshirani. The implicit regularization of stochastic gradient flow for least squares. In International Conference on Machine Learning, pages 233–244. PMLR, 2020.
|
| 234 |
+
[2] Shahar Azulay, Edward Moroshko, Mor Shpigel Nacson, Blake Woodworth, Nathan Srebro, Amir Globerson, and Daniel Soudry. On the implicit bias of initialization shape: Beyond infinitesimal mirror descent. arXiv preprint arXiv:2102.09769, 2021.
|
| 235 |
+
[3] Francis Bach. Breaking the curse of dimensionality with convex neural networks. Journal of Machine Learning Research, 18(19):1–53, 2017.
|
| 236 |
+
[4] Heinz H Bauschke, Jérôme Bolte, and Marc Teboulle. A descent lemma beyond lipschitz gradient continuity: first-order methods revisited and applications. Mathematics of Operations Research, 42(2):330–348, 2017.
|
| 237 |
+
[5] Guy Blanc, Neha Gupta, Gregory Valiant, and Paul Valiant. Implicit regularization for deep neural networks driven by an ornstein-uhlenbeck like process. In Conference on learning theory, pages 483–513. PMLR, 2020.
|
| 238 |
+
[6] Stéphane Boucheron, Gábor Lugosi, and Pascal Massart. Concentration inequalities: A nonasymptotic theory of independence. Oxford university press, 2013.
|
| 239 |
+
[7] Ioannis Chatzigeorgiou. Bounds on the lambert function and their application to the outage analysis of user cooperation. IEEE Communications Letters, 17(8):1505–1508, 2013.
|
| 240 |
+
[8] Pratik Chaudhari and Stefano Soatto. Stochastic gradient descent performs variational inference, converges to limit cycles for deep networks. In 2018 Information Theory and Applications Workshop (ITA), pages 1–10. IEEE, 2018.
|
| 241 |
+
[9] Xiang Cheng, Dong Yin, Peter Bartlett, and Michael Jordan. Stochastic gradient and Langevin processes. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 1810–1819. PMLR, 13–18 Jul 2020.
|
| 242 |
+
[10] Lénaïc Chizat and Francis Bach. On the global convergence of gradient descent for overparameterized models using optimal transport. In Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018.
|
| 243 |
+
[11] Lenaic Chizat and Francis Bach. Implicit bias of gradient descent for wide two-layer neural networks trained with the logistic loss. In Conference on Learning Theory, pages 1305–1338. PMLR, 2020.
|
| 244 |
+
[12] Lénaïc Chizat, Edouard Oyallon, and Francis Bach. On lazy training in differentiable programming. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019.
|
| 245 |
+
[13] Udaya Ghai, Elad Hazan, and Yoram Singer. Exponentiated gradient meets gradient descent. In Proceedings of the 31st International Conference on Algorithmic Learning Theory, volume 117 of Proceedings of Machine Learning Research, pages 386–407, San Diego, California, USA, 08 Feb–11 Feb 2020. PMLR.
|
| 246 |
+
[14] Suriya Gunasekar, Jason Lee, Daniel Soudry, and Nathan Srebro. Characterizing implicit bias in terms of optimization geometry. In International Conference on Machine Learning, pages 1832–1841. PMLR, 2018.
|
| 247 |
+
[15] Jeff Z HaoChen, Colin Wei, Jason D Lee, and Tengyu Ma. Shape matters: Understanding the implicit bias of the noise covariance. arXiv preprint arXiv:2006.08680, 2020.
|
| 248 |
+
[16] Fengxiang He, Tongliang Liu, and Dacheng Tao. Control batch size and learning rate to generalize well: Theoretical and empirical evidence. In Advances in Neural Information Processing Systems, volume 32, 2019.
|
| 249 |
+
[17] Sepp Hochreiter and Jürgen Schmidhuber. Flat minima. Neural Comput., 9(1):1–42, jan 1997.
|
| 250 |
+
|
| 251 |
+
[18] Elad Hoffer, Itay Hubara, and Daniel Soudry. Train longer, generalize better: Closing the generalization gap in large batch training of neural networks. In Proceedings of the 31st International Conference on Neural Information Processing Systems, NIPS’17, page 1729–1739, 2017.
|
| 252 |
+
|
| 253 |
+
[19] Steven R. Howard, Aaditya Ramdas, Jon McAuliffe, and Jasjeet Sekhon. Time-uniform Chernoff bounds via nonnegative supermartingales. Probability Surveys, 17(none):257 – 317, 2020. doi: 10.1214/18-PS321.
|
| 254 |
+
|
| 255 |
+
[20] Arthur Jacot, Franck Gabriel, and Clement Hongler. Neural tangent kernel: Convergence and generalization in neural networks. In Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018.
|
| 256 |
+
|
| 257 |
+
[21] Stanislaw Jastrzebski, Zac Kenton, Devansh Arpit, Nicolas Ballas, Asja Fischer, Amos Storkey, and Yoshua Bengio. Three factors influencing minima in SGD. In International Conference on Learning Representations, 2018.
|
| 258 |
+
|
| 259 |
+
[22] Ziwei Ji and Matus Telgarsky. Gradient descent aligns the layers of deep linear networks. In International Conference on Learning Representations, 2019.
|
| 260 |
+
|
| 261 |
+
[23] Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy, and Ping Tak Peter Tang. On large-batch training for deep learning: Generalization gap and sharp minima. In International Conference on Learning Representations, 2017.
|
| 262 |
+
|
| 263 |
+
[24] Bobby Kleinberg, Yuanzhi Li, and Yang Yuan. An alternative view: When does SGD escape local minima? In Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 2698–2707. PMLR, 10–15 Jul 2018.
|
| 264 |
+
|
| 265 |
+
[25] Peter E Kloeden and Eckhard Platen. Stochastic differential equations. In Numerical Solution of Stochastic Differential Equations, pages 103–160. Springer, 1992.
|
| 266 |
+
|
| 267 |
+
[26] Qianxiao Li, Cheng Tai, and Weinan E. Stochastic modified equations and dynamics of stochastic gradient algorithms i: Mathematical foundations. Journal of Machine Learning Research, 20(40):1–47, 2019.
|
| 268 |
+
|
| 269 |
+
[27] Kaifeng Lyu and Jian Li. Gradient descent maximizes the margin of homogeneous neural networks. In International Conference on Learning Representations, 2020.
|
| 270 |
+
|
| 271 |
+
[28] Stephan Mandt, Matthew D. Hoffman, and David M. Blei. A variational analysis of stochastic gradient algorithms. In Proceedings of the 33rd International Conference on International Conference on Machine Learning - Volume 48, ICML’16, page 354–363, 2016.
|
| 272 |
+
|
| 273 |
+
[29] Song Mei, Andrea Montanari, and Phan-Minh Nguyen. A mean field view of the landscape of two-layer neural networks. Proceedings of the National Academy of Sciences, 115(33): E7665–E7671, 2018.
|
| 274 |
+
|
| 275 |
+
[30] Daniel Revuz and Marc Yor. Continuous martingales and Brownian motion, volume 293. Springer Science & Business Media, 2013.
|
| 276 |
+
|
| 277 |
+
[31] Daniel Soudry, Elad Hoffer, Mor Shpigel Nacson, Suriya Gunasekar, and Nathan Srebro. The implicit bias of gradient descent on separable data. The Journal of Machine Learning Research, 19(1):2822–2878, 2018.
|
| 278 |
+
|
| 279 |
+
[32] Aditya Varre, Loucas Pillaud-Vivien, and Nicolas Flammarion. Last iterate convergence of sgd for least-squares in the interpolation regime. 2021.
|
| 280 |
+
|
| 281 |
+
[33] Tomas Vaškevicius, Varun Kanade, and Patrick Rebeschini. Implicit regularization for optimal ˇ sparse recovery. arXiv preprint arXiv:1909.05122, 2019.
|
| 282 |
+
|
| 283 |
+
[34] Tomas Vaskevicius, Varun Kanade, and Patrick Rebeschini. The statistical complexity of earlystopped mirror descent. In Advances in Neural Information Processing Systems, volume 33, pages 253–264. Curran Associates, Inc., 2020.
|
| 284 |
+
|
| 285 |
+
[35] Stephan Wojtowytsch. Stochastic gradient descent with noise of machine learning type. Part I: Discrete time analysis, 2021.
|
| 286 |
+
[36] Blake Woodworth, Suriya Gunasekar, Jason D Lee, Edward Moroshko, Pedro Savarese, Itay Golan, Daniel Soudry, and Nathan Srebro. Kernel and rich regimes in overparametrized models. In Conference on Learning Theory, pages 3635–3673. PMLR, 2020.
|
| 287 |
+
[37] Fan Wu and Patrick Rebeschini. A continuous-time mirror descent approach to sparse phase retrieval. In Advances in Neural Information Processing Systems, volume 33, pages 20192– 20203. Curran Associates, Inc., 2020.
|
| 288 |
+
[38] Lei Wu, Chao Ma, and Weinan E. How SGD selects the global minima in over-parameterized learning: A dynamical stability perspective. In Advances in Neural Information Processing Systems, volume 31, 2018.
|
| 289 |
+
[39] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net, 2017.
|