Datasets:
Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- parse/train/B1ffQnRcKX/B1ffQnRcKX.md +555 -0
- parse/train/B1ffQnRcKX/B1ffQnRcKX_content_list.json +0 -0
- parse/train/B1ffQnRcKX/B1ffQnRcKX_middle.json +0 -0
- parse/train/B1ffQnRcKX/B1ffQnRcKX_model.json +0 -0
- parse/train/H1e5GJBtDr/H1e5GJBtDr.md +198 -0
- parse/train/H1e5GJBtDr/H1e5GJBtDr_content_list.json +1082 -0
- parse/train/H1e5GJBtDr/H1e5GJBtDr_middle.json +0 -0
- parse/train/H1e5GJBtDr/H1e5GJBtDr_model.json +0 -0
- parse/train/HksioDcxl/HksioDcxl.md +254 -0
- parse/train/HksioDcxl/HksioDcxl_content_list.json +1262 -0
- parse/train/HksioDcxl/HksioDcxl_middle.json +0 -0
- parse/train/HksioDcxl/HksioDcxl_model.json +0 -0
- parse/train/S1jE5L5gl/S1jE5L5gl.md +567 -0
- parse/train/S1jE5L5gl/S1jE5L5gl_content_list.json +0 -0
- parse/train/S1jE5L5gl/S1jE5L5gl_middle.json +0 -0
- parse/train/S1jE5L5gl/S1jE5L5gl_model.json +0 -0
- parse/train/SQxuiYf2TT/SQxuiYf2TT.md +296 -0
- parse/train/SQxuiYf2TT/SQxuiYf2TT_content_list.json +1552 -0
- parse/train/SQxuiYf2TT/SQxuiYf2TT_middle.json +0 -0
- parse/train/SQxuiYf2TT/SQxuiYf2TT_model.json +0 -0
- parse/train/r1te3Fqel/r1te3Fqel.md +238 -0
- parse/train/r1te3Fqel/r1te3Fqel_content_list.json +1167 -0
- parse/train/r1te3Fqel/r1te3Fqel_middle.json +0 -0
- parse/train/r1te3Fqel/r1te3Fqel_model.json +0 -0
- parse/train/rbdKZJxDWWx/rbdKZJxDWWx.md +214 -0
- parse/train/rbdKZJxDWWx/rbdKZJxDWWx_content_list.json +958 -0
- parse/train/rbdKZJxDWWx/rbdKZJxDWWx_middle.json +0 -0
- parse/train/rbdKZJxDWWx/rbdKZJxDWWx_model.json +0 -0
- parse/train/ry-TW-WAb/ry-TW-WAb.md +413 -0
- parse/train/ry-TW-WAb/ry-TW-WAb_content_list.json +0 -0
- parse/train/ry-TW-WAb/ry-TW-WAb_middle.json +0 -0
- parse/train/ry-TW-WAb/ry-TW-WAb_model.json +0 -0
- parse/train/ryzECoAcY7/ryzECoAcY7.md +250 -0
- parse/train/ryzECoAcY7/ryzECoAcY7_content_list.json +1281 -0
- parse/train/ryzECoAcY7/ryzECoAcY7_middle.json +0 -0
- parse/train/ryzECoAcY7/ryzECoAcY7_model.json +0 -0
- parse/train/wCrH0JBCFNm/wCrH0JBCFNm.md +252 -0
- parse/train/wCrH0JBCFNm/wCrH0JBCFNm_content_list.json +1095 -0
- parse/train/wCrH0JBCFNm/wCrH0JBCFNm_middle.json +0 -0
- parse/train/wCrH0JBCFNm/wCrH0JBCFNm_model.json +0 -0
- vlm/dev/-P7G-8dmSh4/0.png +3 -0
- vlm/dev/-P7G-8dmSh4/1.png +3 -0
- vlm/dev/-P7G-8dmSh4/10.png +3 -0
- vlm/dev/-P7G-8dmSh4/11.png +3 -0
- vlm/dev/-P7G-8dmSh4/12.png +3 -0
- vlm/dev/-P7G-8dmSh4/13.png +3 -0
- vlm/dev/-P7G-8dmSh4/14.png +3 -0
- vlm/dev/-P7G-8dmSh4/15.png +3 -0
- vlm/dev/-P7G-8dmSh4/16.png +3 -0
- vlm/dev/-P7G-8dmSh4/17.png +3 -0
parse/train/B1ffQnRcKX/B1ffQnRcKX.md
ADDED
|
@@ -0,0 +1,555 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# AUTOMATICALLY COMPOSING REPRESENTATION TRANSFORMATIONS AS A MEANS FOR GENERALIZATION
|
| 2 |
+
|
| 3 |
+
Michael B. Chang Electrical Engineering and Computer Science University of California, Berkeley, USA mbchang@berkeley.edu
|
| 4 |
+
|
| 5 |
+
Abhishek Gupta Electrical Engineering and Computer Science University of California, Berkeley, USA abhigupta@berkeley.edu
|
| 6 |
+
|
| 7 |
+
# Sergey Levine
|
| 8 |
+
|
| 9 |
+
Electrical Engineering and Computer Science University of California, Berkeley svlevine@eecs.berkeley.edu
|
| 10 |
+
|
| 11 |
+
Thomas L. Griffiths Psychology and Cognitive Science Princeton University, USA tomg@princeton.edu
|
| 12 |
+
|
| 13 |
+
# ABSTRACT
|
| 14 |
+
|
| 15 |
+
A generally intelligent learner should generalize to more complex tasks than it has previously encountered, but the two common paradigms in machine learning – either training a separate learner per task or training a single learner for all tasks – both have difficulty with such generalization because they do not leverage the compositional structure of the task distribution. This paper introduces the compositional problem graph as a broadly applicable formalism to relate tasks of different complexity in terms of problems with shared subproblems. We propose the compositional generalization problem for measuring how readily old knowledge can be reused and hence built upon. As a first step for tackling compositional generalization, we introduce the compositional recursive learner, a domaingeneral framework for learning algorithmic procedures for composing representation transformations, producing a learner that reasons about what computation to execute by making analogies to previously seen problems. We show on a symbolic and a high-dimensional domain that our compositional approach can generalize to more complex problems than the learner has previously encountered, whereas baselines that are not explicitly compositional do not.
|
| 16 |
+
|
| 17 |
+
# 1 INTRODUCTION
|
| 18 |
+
|
| 19 |
+
This paper seeks to tackle the question of how to build machines that leverage prior experience to solve more complex problems than they have previously encountered. How does a learner represent prior experience? How does a learner apply what it has learned to solve new problems? Motivated by these questions, this paper aims to formalize the idea of, as well as to develop an understanding of the machinery for, compositional generalization in problems that exhibit compositional structure. The solutions for such problems can be found by composing in sequence a small set of reusable partial solutions, each of which tackles a subproblem of a larger problem. The central contributions of this paper are to frame the shared structure across multiple tasks in terms of a compositional problem graph, propose compositional generalization as an evaluation scheme to test the degree a learner can apply previously learned knowledge to solve new problems, and introduce the compositional recursive learner, a domain-general framework1 for sequentially composing representation transformations that each solve a subproblem of a larger problem.
|
| 20 |
+
|
| 21 |
+
The key to our approach is recasting the problem of generalization as a problem of learning algorithmic procedures over representation transformations. A solution to a (sub)problem is a transformation between its input and output representations, and a solution to a larger problem composes these subsolutions together. Therefore, representing and leveraging prior problem-solving experience amounts to learning a set of reusable primitive transformations and their means of composition that reflect the structural properties of the problem distribution.
|
| 22 |
+
|
| 23 |
+
This paper introduces the compositional recursive learner (CRL), a framework for learning both these transformations and their composition together with sparse supervision, taking a step beyond other approaches that have assumed either pre-specified transformation or composition rules (Sec. 5). CRL learns a modular recursive program that iteratively re-represents the input representation into more familiar representations it knows how to compute with. In this framework, a transformation between representations is encapsulated into a computational module, and the overall program is the sequential combination of the inputs and outputs of these modules, whose application are decided by a controller.
|
| 24 |
+
|
| 25 |
+
What sort of training scheme would encourage the spontaneous specialization of the modules around the compositional structure of the problem distribution? First, exposing the learner to a diverse distribution of compositional problems helps it pattern-match across problems to distill out common functionality that it can capture in its modules for future use. Second, enforcing that each module have only a local view of the global problem encourages task-agnostic functionality that prevents the learner from overfitting to the empirical training distribution; two ways to do this are to constrain the model class of the modules and to hide the task specification from the modules. Third, training the learner with a curriculum encourages the learner to build off old solutions to solve new problems by re-representing the new problem into one it knows how to solve, rather than learning from scratch.
|
| 26 |
+
|
| 27 |
+
How should the learner learn to use these modules to exploit the compositional structure of the problem distribution? We can frame the decision of which computation to execute as a reinforcement learning problem in the following manner. The application of a sequence of modules can be likened to the execution trace of the program that CRL automatically constructs, where a computation is the application of a module to the output of a previous computation. The automatic construction of the program can be formulated as the solution to a sequential decision-making problem in a meta-level Markov decision process (MDP) (Hay et al., 2014), where the state space is the learner’s internal states of computation and the action space is the set of modules. Framing the construction of a program as a reinforcement learning problem allows us to use techniques in deep reinforcement learning to implement loops and recursion, as well as decide on which part of the current state of computation to apply a module, to re-use sub-solutions to solve a larger problem.
|
| 28 |
+
|
| 29 |
+
Our experiments on solving multilingual arithmetic problems and recognizing spatially transformed MNIST digits (LeCun et al., 1998) show that the above proposed training scheme prescribes a type of reformulation: re-representing a new problem in terms of other problems by implicitly making an analogy between their solutions. We also show that our meta-reasoning approach for deciding what modules to execute achieves better generalization to more complex problems than monolithic learners that are not explicitly compositional.
|
| 30 |
+
|
| 31 |
+
# 2 COMPOSITIONAL GENERALIZATION
|
| 32 |
+
|
| 33 |
+
Solving a problem simply means representing it so as to make the solution transparent.
|
| 34 |
+
|
| 35 |
+
(SIMON, 1988)
|
| 36 |
+
|
| 37 |
+
Humans navigate foreign cities and understand novel conversations despite only observing a tiny fraction of the true distribution of the world. Perhaps they can extrapolate in this way because the world contains compositional structure, such that solving a novel problem is possible by composing previously learned partial solutions in a novel way to fit the context.
|
| 38 |
+
|
| 39 |
+
With this perspective, we propose the concept of compositional generalization. The key assumption of compositional generalization is that harder problems are composed of easier problems. The problems from the training and test sets share the same primitive subproblems, but differ in the manner and complexity with which these subproblems are combined. Therefore, problems in the test set can be solved by combining solutions learned from the training set in novel ways.
|
| 40 |
+
|
| 41 |
+
Definition. Let a problem $P$ be a pair $( X _ { i n } , X _ { o u t } )$ , where $X _ { i n }$ and $X _ { o u t }$ are random variables that respectively correspond to the input and output representations of the problem. Let the distribution of $X _ { i n }$ be $r _ { i n }$ and the distribution of $X _ { o u t }$ be $r _ { o u t }$ . To solve a particular problem $P = p$ is to transform $X _ { i n } = x _ { i n }$ into $X _ { o u t } = x _ { o u t }$ . A composite problem $p _ { a } = p _ { b } \circ p _ { c }$ is that for which it is possible to solve by first solving $p _ { c }$ and then solving $p _ { b }$ with the output of $p _ { c }$ as input. $p _ { b }$ and $p _ { c }$ are subproblems with respect to $p _ { a }$ . The space of compositional problems form a compositional problem graph, whose nodes are the representation distributions $r$ . A problem is described as pair of nodes between which the learner must learn to construct an edge or a path to transform between the two representations.
|
| 42 |
+
|
| 43 |
+

|
| 44 |
+
Figure 1: (a) Consider a multitask family of problems, whose subproblems are shared within and across problems. Standard approaches either (b) train a separate learner per task or (c) train a single learner for all tasks. Both have difficulty generalizing to longer compositional problems. (d) Our goal is to re-use previously learned sub-solutions to solve new problems by composing computational modules in new ways.
|
| 45 |
+
|
| 46 |
+
Characteristics. First, there are many ways in which a problem can be solved. For example, translating an English expression to a Spanish one can be solved directly by learning such a transformation, or a learner could make an analogy with other problems by first translating English to French, and then French to Spanish as intermediate subproblems. Second, sometimes a useful (although not only) way to solve a problem is indicated by the recursive structure of the problem itself: solving the arithmetic expression $3 + 4 \times 7$ modulo 10 can be decomposed by first solving the subproblem $4 \times 7 = 8$ and then $3 + 8 = 1$ . Third, because a problem is just an (input, output) pair, standard problems in machine learning fit into this broadly applicable framework. For example, for a supervised classification problem, the input representation can be an image and the output representation a label, and intermediate subproblems can be transforming some intermediate representations to other intermediate representations. Sec. 4 demonstrates CRL on all three of the above examples.
|
| 47 |
+
|
| 48 |
+
Broad Applicability. Problems in supervised, unsupervised, and reinforcement learning can all be viewed under the framework of transformations between representations. What we gain from the compositional problem graph perspective is a methodological way to relate together different problems of various forms and complexity, which is especially useful in a lifelong learning setting: the knowledge required to solve one problem is composed of the knowledge required to solve subproblems seen in the past in the context of different problems. For example, we can view latent variable reinforcement learning architectures such as (Ha & Schmidhuber, 2018; Nair et al., 2018) as simultaneously solving an image reconstruction problem and an action prediction problem, both of which share the same subproblem of transforming a visual observation into a latent representation. Lifelong learning, then, can be formulated as not only modifying the connections between nodes in the compositional problem graph but also continuing to make more connections between nodes, gradually expanding the frontier of nodes explored. Sec. 4 describes how CRL takes advantage of this compositional formulation in a multi-task zero-shot generalization setup to solve new problems by re-using computations learned from solving past problems.
|
| 49 |
+
|
| 50 |
+

|
| 51 |
+
Figure 2: Compositional recursive learner (CRL): top-left: CRL is a symbiotic relationship between a controller and evaluator: the controller selects a module $m$ given an intermediate representation $x$ and the evaluator applies $m$ on $x$ to create a new representation. bottom-left: CRL learns dynamically learns the structure of a program customized for its problem, and this program can be viewed as a finite state machine. right: A series of computations in the program is equivalent to a traversal through a Meta-MDP, where module can be reused across different stages of computation, allowing for recursive computation.
|
| 52 |
+
|
| 53 |
+
Evaluation. To evaluate a learner’s capacity for compositional generalization, we introduce two challenges. The first is to generalize to problems with different subproblem combinations from what the learner has seen. The second is to generalize to problems with longer subproblems combinations than the learner has seen. Evaluating a learner’s capability for compositional generalization is one way to measure how readily old knowledge can be reused and hence built upon.
|
| 54 |
+
|
| 55 |
+
# 3 A LEARNER THAT PROGRAMS ITSELF
|
| 56 |
+
|
| 57 |
+
This paper departs from the popular representation-centric view of knowledge (Bengio et al., 2013) and instead adopts a computation-centric view of knowledge: our goal is to encapsulate useful functionality shared across tasks into specialized computational modules – atomic function operators that perform transformations between representations. This section introduces the compositional recursive learner (CRL), a framework for training modules to capture primitive subproblems and for composing together these modules as subproblem solutions to form a path between nodes of the compositional problem graph.
|
| 58 |
+
|
| 59 |
+
# 3.1 COMPOSITIONAL RECURSIVE LEARNER
|
| 60 |
+
|
| 61 |
+
The CRL framework consists of a controller $\pi$ , a set of modules $m \in M$ , and an evaluator $E$ . Training CRL on a diverse compositional problem distribution produces a modular recursive program that is trained to transform the input $X _ { i n }$ into its output $X _ { o u t }$ , the corresponding samples of which are drawn from pairs of nodes in the compositional problem graph. In this program, the controller looks at the current state $x _ { i }$ of the program and chooses a module $m$ to apply to the state. The evaluator executes the module on that state to produce the next state $x _ { i + 1 }$ of the program. $X _ { i n }$ is the initial state of the program, $\hat { X } _ { o u t }$ is the last, and the intermediate states $X _ { i }$ of the execution trace correspond to the other representations produced and consumed by the modules. The controller can choose to re-use modules across different program executions to solve different problems, making it straightforward to re-use computation learned from solving other problems to solve the current one. The controller can also choose to reuse modules several times within the same program execution, which produces recursive behavior.
|
| 62 |
+
|
| 63 |
+
# 3.2 DECIDING WHICH COMPUTATIONS TO EXECUTE
|
| 64 |
+
|
| 65 |
+
The sequential decision problem that the controller solves can be formalized as a meta-level Markov decision process (meta-MDP) (Hay et al., 2014), whose state space corresponds to the intermediate states of computation $X$ , whose action space corresponds to the modules $M$ , and whose transition model corresponds to the evaluator $E$ . The symbiotic relationship among these components is shown in Fig. 2. In the bounded-horizon version of CRL (Sec. 4.2), the meta-MDP has a finite horizon whose length is determined by the complexity of the current problem. In the infinite-horizon version of CRL (Sec. 4.1), the program itself determines when to halt when the controller selects the HALT signal. When the program halts, in both versions the current state of computation is produced as output $\hat { x } _ { o u t }$ , and CRL receives a terminal reward that reflects how $\hat { x } _ { o u t }$ matches the desired output $x _ { o u t }$ . The infinite-horizon CRL also incurs a cost for every computation it executes to encourage it to customize its complexity to the problem.
|
| 66 |
+
|
| 67 |
+
Note the following key characteristics of CRL. First, unlike standard reinforcement learning setups, the state space and action space can vary in dimensionality across and within episodes because CRL trains on problems of different complexity, reducing more complex problems to simpler ones (Sec. 4.1). Second, because the meta-MDP is internal to CRL, the controller shapes the meta-MDP by choosing which modules get trained and the meta-MDP in turn shapes the controller through its non-stationary state-distribution, action-distribution, and transition function. Thus CRL simultaneously designs and solves reinforcement learning problems “in its own mind,” whose dynamics depend just as much on the intrinsic complexity of the problem as well as the current problem-solving capabilities of CRL.
|
| 68 |
+
|
| 69 |
+
# 3.3 MAKING ANALOGIES IN THE COMPOSITIONAL PROBLEM GRAPH
|
| 70 |
+
|
| 71 |
+
The solution that we want CRL to discover lies between two extremes, both of which have their own drawbacks. One extreme is where CRL learns a module specialized for every pair of nodes in the compositional problem graph, and the other is where CRL only learns one module for all pairs of nodes. Both extremes yield a horizon-one meta-MDP and are undesirable for compositional generalization: the former does not re-use past knowledge and the latter cannot flexibly continuously learn without suffering from negative transfer.
|
| 72 |
+
|
| 73 |
+
What is the best solution that CRL could discover? For a given compositional problem graph, an optimal solution would be to recover the original compositional problem graph such that the modules exactly capture the subproblems and the controller composes these modules to reflect how the subproblems were originally generated. By learning both the parameters of the modules and the controller that composes them, during CRL would construct its own internal representation of the problem graph, where the functionality of the modules produces the nodes of the graph. How can we encourage CRL’s internal graph to reflect the original compositional problem graph?
|
| 74 |
+
|
| 75 |
+
We want to encourage the modules to capture the most primitive subproblems, such that they can be composed as atomic computations for other problems. To do this, we need to enforce that each module only has a local view of the global problem. If tasks are distinguished from each other based on the input (see Sec. 4.2), we can use domain knowledge to restrict the representation vocabulary and the function class of the modules. If we have access to a task specification (e.g. goal or task id) in addition to the input, we can additionally give only the controller access to the task specification while hiding it from the modules. This forces the modules to be task agnostic, which encourages that they learn useful functionality that generalizes across problems.
|
| 76 |
+
|
| 77 |
+
Because the the space of subproblem compositions is combinatorially large, we use a curriculum to encourage solutions for the simpler subproblems to converge somewhat before introducing more complex problems, for which CRL can learn to solve by composing together the modules that had been trained on simpler problems. Lastly, to encourage the controller to generalize to new node combinations it has not seen, we train on a diverse distribution of compositional problems, such that the controller does not overfit to any one problem. This encourages controller to make analogies between problems during training by re-using partial solutions learned while solving other problems. Our experiments show that this analogy-making ability helps with compositional generalization because the controller solves new or more complex subproblem combinations by re-using modules that it learned during training.
|
| 78 |
+
|
| 79 |
+

|
| 80 |
+
Figure 3: Multilingual Arithmetic (Quantitative). CRL generalizes significantly better than the RNN, which, even with ten times more data, does not generalize to 10-length multilingual arithmetic expressions. Pretraining the RNN on domain-specific auxiliary tasks does not help the 10-length case, highlighting a limitation of using monolithic learners for compositional problems. By comparing CRL with a version trained without a curriculum (“No Curr”: blue), we see the benefit of slowly growing the complexity of problems throughout training, although this benefit does not transfer to the RNN. The vertical black dashed line indicates at which point all the training data has been added when CRL is trained with a curriculum (red). The initial consistent rise of the red training curve before this point shows CRL exhibits forward transfer (Lopez-Paz et al., 2017) to expressions of longer length. Generalization becomes apparent only after a million iterations after all the training data has been added. (b, c) only show accuracy on the expressions with the maximum length of those added so far to the curriculum. “1e4” and “1e5” correspond to the order of magnitude of the number of samples in the dataset, of which $70 \%$ are used for training. 10, 50, and 90 percentiles are shown over 6 runs.
|
| 81 |
+
|
| 82 |
+
# 4 EXPERIMENTS
|
| 83 |
+
|
| 84 |
+
The main purpose of our experiments is to test the hypothesis that explicitly decomposing a learner around the structure of a compositional problem distribution yields significant generalization benefit over the standard paradigm of training a single monolithic architecture on the same distribution of problems. To evaluate compositional generalization, we select disjoint subsets of node pairs for training and evaluating the learner. Evaluating on problems distinct from those in training tests the learner’s ability to apply what it has learned to new problems. To demonstrate the broad applicability of the compositional graph, we consider the structured symbolic domain of multilingual arithmetic and the underconstrained and high-dimensional domain of transformed-MNIST classification. We find that composing representation transformations with CRL achieves significantly better generalization when compared to generic monolithic learners, especially when the learner needs to generalize to problems with longer subproblem combinations than those seen during training.
|
| 85 |
+
|
| 86 |
+
In our experiments, the controller and modules begin as randomly initialized neural networks. The loss is backpropagated through the modules, which are trained with Adam (Kingma & Ba, 2014). The controller receives a sparse reward derived from the loss at the end of the computation, and a small cost for each computational step. The model is trained with proximal policy optimization (Schulman et al., 2017).
|
| 87 |
+
|
| 88 |
+
# 4.1 MULTILINGUAL ARITHMETIC
|
| 89 |
+
|
| 90 |
+
This experiment evaluates the infinite-horizon CRL in a multi-objective, variable-length input, symbolic reasoning multi-task setting. A task is to simplify an arithmetic expression expressed in a source language, encoded as variable-length sequences of one-hot tokens, and produce the answer modulo 10 in a given target language. To evaluate compositional generalization, we test whether, after having trained on 46200 examples of 2, 3, 4, 5-length expressions $( 2 . 7 6 \cdot 1 0 ^ { - 4 }$ of the training distribution) involving 20 of the $5 \times 5 = 2 5$ pairs of five languages, the learner can generalize to 5-length and 10-length expressions involving the other five held-out language pairs (problem space: $4 . 9 2 \cdot 1 0 ^ { 1 5 }$ problems). To handle the multiple target languages, the CRL controller receives a onehot token for the target language at every computational step additional to the arithmetic expression. The CRL modules consist of two types of feedforward networks: reducers and translators, which do not know the target language and so can only make local progress on the global problem. Reducers transform a consecutive window of three tokens into one token, and translators transform all tokens in a sequence by the same transformation. The CRL controller also selects where in the arithmetic expression to apply a reducer. We trained by gradually increasing the complexity of arithmetic expressions from length two to length five.
|
| 91 |
+
|
| 92 |
+

|
| 93 |
+
Figure 4: Left: For multilingual arithmetic, blue denotes the language pairs for training and red denotes the language pairs held out for evaluation in Fig 3b,c. Center: For transformed MNIST classification, blue denotes the length-2 transformation combinations that produced the input for training, red denotes the length-2 transformation combinations held out for evaluation. Not shown are the more complex length-3 transformation combinations (scale then rotate then translate) we also tested on. Right: For transformed MNIST classification, each learner performs better than the others in a different metric: the CNN performs best on the training subproblem combinations, the STN on different subproblem combinations of the same length as training, and CRL on longer subproblem combinations than training. While CRL performs comparably with the others in the former two metrics, CRL’s $\sim 4 0 \%$ improvement for more complex image transformations is significant.
|
| 94 |
+
|
| 95 |
+
Quantitive results in Fig. 3 show that CRL achieves significantly better compositional generalization than a recurrent neural network (RNN) baseline (Cho et al., 2014) trained to directly map the expression to its answer, even when the RNN has been pretrained or receives $1 0 \mathrm { x }$ more data. Fig. 9 shows that CRL achieves about $6 0 \%$ accuracy for extrapolating to 100-term problems (problem space: $4 . 2 9 \cdot 1 0 ^ { 1 4 8 }$ ).
|
| 96 |
+
|
| 97 |
+
The curriculum-based training scheme encourages CRL to designs its own edges and paths to connect nodes in the compositional problem graph, solving harder problems with the solutions from simpler ones. It also encourages its internal representations to mirror the external representations it observes in the problem distribution, even though it has no direct supervision to do so. However, while this is often the case, qualitative results in Fig. 5 show that CRL also comes up with its own internal language – hybrid representations that mix different external representations together – to construct compositional solutions for novel problems. Rather than learn translators and reducers that are specific to single input and output language pair as we had expected, the modules, possibly due to their nonlinear nature, tended to learn operations specific to the output language only.
|
| 98 |
+
|
| 99 |
+
# 4.2 IMAGE TRANSFORMATIONS
|
| 100 |
+
|
| 101 |
+
This experiment evaluates the bounded-horizon CRL in a single-objective, latent-structured, highdimensional multi-task setting. A task is to classify an MNIST digit, where the MNIST digit has been randomly translated (left, right, up, down), rotated (left, right), and scaled (small, big). Suppose CRL has knowledge of what untransformed MNIST digits look like; is it possible that CRL can learn to compose appropriate spatial affine transformations in sequence to convert the transformed MNIST digit into a “canonical” one, such that it can use a pre-trained classifier to classify it? To reformulate a scenario to one that is more familar is characteristic of compositional generalization humans: humans view an object at different angles yet understand it is the same object; they may have an accustomed route to work, but can adapt to a detour if the route is blocked. To evaluate compositional generalization, we test whether, having trained on images produced by combinations of two spatial transformations, CRL can can generalize to different length-2 combinations as well as length-3 combinations. A challenge in this domain is that the compositional structure is latent, rather than apparent in the input for the learner to exploit.
|
| 102 |
+
|
| 103 |
+
CRL is initialized with four types of modules: a Spatial Transformer Network (STN) (Jaderberg et al., 2015) parametrized to only rotate, an STN that only scales, an STN that only translates, and an identity function. All modules are initialized to perform the identity transformation, such that symmetry breaking (and their eventual specialization) is due to the stochasticity of the controller.
|
| 104 |
+
|
| 105 |
+

|
| 106 |
+
Figure 5: Multilingual Arithmetic (Qualitative). A randomly selected execution trace for generalizing from length-5 to length-10 expressions. The input is $0 - 6 + 1 + 7 \times 3 \times 6 - 3 + 7 - 7 \times 7$ expressed in Pig Latin. The desired output is seis, which is the value of the expression, 6, expressed in Spanish. The purple modules are reducers and the red modules are translators. The input to a module is highlighted and the output of the module is boxed. The controller learns order of operations. Observe that reducer $m _ { 9 }$ learns to reduce to numerals and reducer $m _ { 1 0 }$ to English terms. The task-agnostic nature of the modules forces them to learn transformations that the controller would commonly reuse across problems. Even if the problem may not be compositionally structured, such as translating Pig Latin to Spanish, CRL learns to design a compositional solution $\mathrm { P i g }$ Latin to Numerals to Spanish) from previous experience (Pig Latin to Numerals and Numerals to Spanish) in order to generalize: it first reduces the Pig Latin expression to a numerical evaluation, and then translates that to its Spanish representation using the translator $m _ { 6 }$ . Note that all of this computation is happening internally to the learner, which computes on softmax distributions over the vocabulary; for visualization we show the token of the distribution with maximum probability.
|
| 107 |
+
|
| 108 |
+

|
| 109 |
+
Figure 6: Image Transformations: CRL reasonably applies a sequence of modules to transform a transformed MNIST digit into canonical position, and generalizes to different and longer compositions of generative transformations. $m _ { 0 }$ is constrained to output the sine and cosine of a rotation angle, $m _ { 1 }$ is constrained to output the scaling factor, and $m _ { 2 }$ through $m _ { 1 3 }$ are constrained to output spatial translations. Some modules like $m _ { 2 }$ and $m _ { 6 }$ learn to translate up, some like $m _ { 3 }$ and $m _ { 1 0 }$ learn to translate down, some like $m _ { 7 }$ learn to shift right, and some like $m _ { 1 3 }$ learn to shift left. Consider (d): the original generative transformations were “scale big” then “translate left,” so the correct inversion should be “translate right” then “scale small.” However, CRL chose to equivalently “scale small” and then “translate right.” CRL also creatively uses $m _ { 0 }$ to scale, as in (e) and (f), even though its original parametrization of outputting sine and cosine is biased towards rotation.
|
| 110 |
+
|
| 111 |
+
Quantitative results in Fig. 4 show that CRL achieves significantly better compositional generalization than both the standard practice of finetuning the convolutional neural network (Springenberg et al., 2014) pretrained classifier and training an affine-STN as a pre-processor to the classifier. Both baselines perform better than CRL on the training set, and the STN’s inductive bias surprisingly also allows it to generalize to different length-2 combinations. However, both baselines achieve only less than one-third of CRL’s generalization performance for length-3 combinations, which showcases the value of explicitly decomposing problems. Note that in Fig. 6 the sequence of transformations CRL performs are not necessarily the reverse of those that generated the original input, which shows that CRL has learned its own internal language for representing nodes in the problem graph.
|
| 112 |
+
|
| 113 |
+
# 5 RELATED WORK
|
| 114 |
+
|
| 115 |
+
Several recent and contemporaneous work (Lake & Baroni, 2017; Liska et al., 2018; Loula et al., ˇ 2018; Bahdanau et al., 2018) have tested in whether neural networks exhibit systematic compositionality (Fodor & Pylyshyn, 1988; Marcus, 1998; Fodor & Lepore, 2002; Marcus, 2018; Calvo & Symons, 2014) in parsing symbolic data. This paper draws inspiration from and builds upon research in several areas to propose an approach towards building a learner that exhibits compositional generalization. We hope this paper provides a point of unification among these areas through which further connections can be strengthened.
|
| 116 |
+
|
| 117 |
+
# 5.1 COMPOSITIONAL GENERALIZATION
|
| 118 |
+
|
| 119 |
+
Transformations between representations: Our work introduces a learner that exhibits compositional generalization in some sense by bridging deep learning and reformulation, or re-representing a problem to make it easier to solve (Holte & Choueiry, 2003; Simon, 1969; Anderson, 1990) by making analogies (Oh et al., 2017) to previously encountered problems. Taking inspiration from meta-reasoning (Russell & Wefald, 1991; Hay et al., 2014; Hamrick et al., 2017; Graves, 2016) in humans (Griffiths et al., 2015; Callaway et al., 2017; Lieder et al., 2017), CRL generalize to new problems by composing representation transformations (analogous to the subprograms in Schmidhuber (1990)), an approach for which recent and contemporaneous work (Schlag & Schmidhuber, 2018; Alet et al., 2018; Devin et al., 2017) provide evidence.
|
| 120 |
+
|
| 121 |
+
Meta-learning: Our modular perspective departs from recent work in meta-learning (Thrun & Pratt, 2012; Schmidhuber, 1987) which assume that the shared representation of monolithic architectures can be shaped by the diversity of tasks in the training distribution as good initializations for future learning (Finn et al., 2017; Nichol et al., 2018; Ravi & Larochelle, 2016; Andrychowicz et al., 2016; Grant et al., 2018; Mishra et al., 2018; Lake et al., 2015; Frans et al., 2017; Gupta et al., 2018b;a; Srinivas et al., 2018).
|
| 122 |
+
|
| 123 |
+
Graph-based architectures: Work in graph-based architectures have studied combinatorial generalization in the context of modeling physical systems (Battaglia et al., 2018; Chang et al., 2016; Battaglia et al., 2016; Santoro et al., 2017; Sanchez-Gonzalez et al., 2018; van Steenkiste et al., 2018). Whereas these works focus on factorizing representations, we focus on factorizing the computations that operate on representations.
|
| 124 |
+
|
| 125 |
+
# 5.2 NEURAL PROGRAM INDUCTION:
|
| 126 |
+
|
| 127 |
+
Just as the motivation behind disentangled representations (Whitney et al., 2016; Kulkarni et al., 2015; Chen et al., 2016; Thomas et al., 2017; Bengio et al., 2013; Higgins et al., 2018) is to uncover the latent factors of variation, the motivation behind disentangled programs is to uncover the latent organization of a task. Compositional approaches (as opposed to memory-augmented (Graves et al., 2014; Sukhbaatar et al., 2015; Joulin & Mikolov, 2015; Grefenstette et al., 2015; Kurach et al., 2015; Andrychowicz et al., 2016; Graves et al., 2016) or monolithic (Zaremba & Sutskever, 2014; Kaiser & Sutskever, 2015) approaches for learning programs) to the challenge of discovering reusable primitive transformations and their means of composition generally fall into two categories. The first assumes pre-specified transformations and learns the structure (from dense supervision on execution traces to sparse-rewards) (Reed & De Freitas, 2015; Cai et al., 2017; Xu et al., 2017; Chen et al., 2017; Ganin et al., 2018; Bunel et al., 2018; Feser et al., 2016; Dzeroski et al., 2001; ˇ Zaremba et al., 2016; Schmidhuber, 1990). The second learns the transformations but pre-specifies the structure (Andreas et al., 2016; Riedel et al., 2016; Lin & Lucey, 2017). These approaches are respectively analogous to our hardcoded-functions and hardcoded-controller ablations in Fig. 7. The closest works to ours from a program induction perspective are (Gaunt et al., 2016; Valkov et al., 2018), both neurosymbolic approaches for learning differentiable programs integrated in a high-level programming language. Our work complements theirs by casting the construction of a program as a reinforcement learning problem, and we believe that more tightly integrating CRL with types and combinators would be an exciting direction for future work.
|
| 128 |
+
|
| 129 |
+
# 5.3 SELF-ORGANIZING LEARNERS
|
| 130 |
+
|
| 131 |
+
Lifelong Learning: CRL draws inspiration from work (Schmidhuber, 1987; Dechter et al., 2013; Schmidhuber, 2009; 2012; Ellis et al., 2018) on learners that learn to design their own primitives and subprograms for solving an increasingly large number of tasks. The simultaneous optimization over the the continuous function parameters and their discrete compositional structure in CRL is inspired by the interplay between abstract and concrete knowledge that is hypothesized to characterize cognitive development: abstract structural priors serve as a scaffolding within which concrete, domain-specific learning takes place (Spelke, 1990; Pinker, 1994), but domain-specific learning about the continuous semantics of the world can also provide feedback to update the more discrete structural priors (Gopnik & Wellman, 2012; Carey, 2015).
|
| 132 |
+
|
| 133 |
+
Hierarchy: Several works have investigated the conditions in which hierarchy is useful for humans (Botvinick et al., 2009; Solway et al., 2014; Sanborn et al., 2018); our experiments show that the hierarchical structure of CRL is more useful than the flat structure of monolothic architectures for compositional generalization. Learning both the controller and modules relates CRL to the hierarchical reinforcement learning literature (Barto & Mahadevan, 2003), where recent work (Bacon et al., 2017; Kulkarni et al., 2016; Frans et al., 2017; Vezhnevets et al., 2017; Nachum et al., 2018) attempting to learn both lower-level policies as well as a higher-level policy that invokes them.
|
| 134 |
+
|
| 135 |
+
Modularity: Our idea of selecting different weights at different steps of computation is related to the fast-weights literature (Schmidhuber, 1992; Ba et al., 2016), but those works are motivated by learning context-dependent associative memory (Hopfield, 1982; Willshaw et al., 1969; Kohonen, 1972; Anderson & Hinton, 2014; Ha et al., 2016) rather than composing representation transformations, with the exception of (Schlag & Schmidhuber, 2017). CRL can be viewed as a recurrent mixture of experts (Jacobs et al., 1991), where each expert is a module, similar to other recent and contemporaneous work (Hinton et al., 2018; Rosenbaum et al., 2018; Kirsch et al., 2018; Fernando et al., 2017) that route through a choices of layers of a fixed-depth architecture for multi-task learning. The closest work to ours from an implementation perspective is Rosenbaum et al. (2018). However, these works do not address the problem of generalizing to more complex tasks because they do not allow for variable-length compositions of the modules. Parascandolo et al. (2017) focuses on a complementary direction to ours; whereas they focus on learning causal mechanisms for a single step, we focus on learning how to compose modules. We believe composing together causal mechanisms would be an exciting direction for future work.
|
| 136 |
+
|
| 137 |
+
# 6 DISCUSSION
|
| 138 |
+
|
| 139 |
+
This paper sought to tackle the question of how to build machines that leverage prior experience to solve more complex problems than they have seen. This paper makes three steps towards the solution. First, we formalized the compositional problem graph as a language for studying compositionally-structured problems of different complexity that can be applied on various problems in machine learning. Second, we introduced the compositional generalization evaluation scheme for measuring how readily old knowledge can be reused and hence built upon. Third, we presented the compositional recursive learner, a domain-general framework for learning a set of reusable primitive transformations and their means of composition that reflect the structural properties of the problem distribution. In doing so we leveraged tools from reinforcement learning to solve a program induction problem.
|
| 140 |
+
|
| 141 |
+
There are several directions for improvement. One is to stabilize the simultaneous optimization between discrete composition and continuous parameters; currently this is tricky to tune. Others are to generate computation graphs beyond a linear chain of functions, and to infer the number of functions required for a family of problems. A major challenge would be to discover the subproblem decomposition without a curriculum and without domain-specific constraints on the model class of the modules.
|
| 142 |
+
|
| 143 |
+
Griffiths et al. (2019) argued that the efficient use cognitive resources in humans may also explain their ability to generalize, and this paper provides evidence that reasoning about what computation to execute by making analogies to previously seen problems achieves significantly higher compositional generalization than non-compositional monolithic learners. Encapsulating computational modules grounded in the subproblem structure also may pave a way for improving interpretability of neural networks by allowing the modules to be unit-tested against the subproblems we desire them to capture. Because problems in supervised, unsupervised, and reinforcement learning can all be expressed under the framework of transformations between representations in the compositional problem graph, we hope that our work motivates further research for tackling the compositional generalization problem in many other domains to accelerate the long-range generalization capabilities that are characteristic of general-purpose learning machines.
|
| 144 |
+
|
| 145 |
+
# ACKNOWLEDGMENTS
|
| 146 |
+
|
| 147 |
+
The authors would like to thank the anonymous ICLR reviewers and commenters, Alyosha Efros, Dinesh Jayaraman, Pulkit Agrawal, Jason Peng, Erin Grant, Rachit Dubey, Thanard Kurutach, Parsa Mahmoudieh, Aravind Srinivas, Fred Callaway, Justin Fu, Ashvin Nair, Marvin Zhang, Shubham Tulsiani, Peter Battaglia, Jessica Hamrick, Rishabh Singh, Feras Saad, Michael Janner, Samuel Tenka, Kai-I Shan, David Chang, Mei-ling Hsu, Tony Chang and others in the Berkeley Artificial Intelligence Research Lab for helpful feedback, discussions, and support. The authors are grateful for computing support from Amazon, NVIDIA, and Google. This work was supported in part by the Berkeley EECS Department Fellowship for first-year Ph.D. students, travel funding from Bloomsbury AI, contract number FA8650-18-2-7832 from the Defence Advanced Research Projects Agency (DARPA) under the Lifelong Learning Machines program, contract number FA9550-18-1- 0077 from the Air Force Office of Scientific Research (AFOSR), and the National Science Foundation (NSF) Graduate Research Fellowship Program. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of DARPA, AFOSR, or the NSF.
|
| 148 |
+
|
| 149 |
+
# REFERENCES
|
| 150 |
+
|
| 151 |
+
Ferran Alet, Tomas Lozano-P ´ erez, and Leslie P Kaelbling. Modular meta-learning. ´ arXiv preprint arXiv:1806.10166, 2018.
|
| 152 |
+
|
| 153 |
+
James A Anderson and Geoffrey E Hinton. Models of information processing in the brain. In Parallel models of associative memory, pp. 33–74. Psychology Press, 2014.
|
| 154 |
+
|
| 155 |
+
John Robert Anderson. The adaptive character of thought. chapter 5, pp. 191–230. Psychology Press, 1990.
|
| 156 |
+
|
| 157 |
+
Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Neural module networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 39–48, 2016.
|
| 158 |
+
|
| 159 |
+
Marcin Andrychowicz, Misha Denil, Sergio Gomez, Matthew W Hoffman, David Pfau, Tom Schaul, Brendan Shillingford, and Nando De Freitas. Learning to learn by gradient descent by gradient descent. In Advances in Neural Information Processing Systems, pp. 3981–3989, 2016.
|
| 160 |
+
|
| 161 |
+
Jimmy Ba, Geoffrey E Hinton, Volodymyr Mnih, Joel Z Leibo, and Catalin Ionescu. Using fast weights to attend to the recent past. In Advances in Neural Information Processing Systems, pp. 4331–4339, 2016.
|
| 162 |
+
|
| 163 |
+
Pierre-Luc Bacon, Jean Harb, and Doina Precup. The option-critic architecture. In AAAI, pp. 1726– 1734, 2017.
|
| 164 |
+
|
| 165 |
+
Dzmitry Bahdanau, Shikhar Murty, Michael Noukhovitch, Thien Huu Nguyen, Harm de Vries, and Aaron Courville. Systematic generalization: What is required and can it be learned? arXiv preprint arXiv:1811.12889, 2018.
|
| 166 |
+
|
| 167 |
+
Andrew G Barto and Sridhar Mahadevan. Recent advances in hierarchical reinforcement learning. Discrete event dynamic systems, 13(1-2):41–77, 2003.
|
| 168 |
+
|
| 169 |
+
Peter Battaglia, Razvan Pascanu, Matthew Lai, Danilo Jimenez Rezende, et al. Interaction networks for learning about objects, relations and physics. In Advances in Neural Information Processing Systems, pp. 4502–4510, 2016.
|
| 170 |
+
|
| 171 |
+
Peter W Battaglia, Jessica B Hamrick, Victor Bapst, Alvaro Sanchez-Gonzalez, Vinicius Zambaldi, Mateusz Malinowski, Andrea Tacchetti, David Raposo, Adam Santoro, Ryan Faulkner, et al. Relational inductive biases, deep learning, and graph networks. arXiv preprint arXiv:1806.01261, 2018.
|
| 172 |
+
|
| 173 |
+
Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE transactions on pattern analysis and machine intelligence, 35(8):1798–1828, 2013.
|
| 174 |
+
|
| 175 |
+
Matthew M Botvinick, Yael Niv, and Andrew C Barto. Hierarchically organized behavior and its neural foundations: a reinforcement learning perspective. Cognition, 113(3):262–280, 2009.
|
| 176 |
+
Rudy Bunel, Matthew Hausknecht, Jacob Devlin, Rishabh Singh, and Pushmeet Kohli. Leveraging grammar and reinforcement learning for neural program synthesis. arXiv preprint arXiv:1805.04276, 2018.
|
| 177 |
+
Jonathon Cai, Richard Shin, and Dawn Song. Making neural programming architectures generalize via recursion. arXiv preprint arXiv:1704.06611, 2017.
|
| 178 |
+
Frederick Callaway, Falk Lieder, Paul Krueger, and Thomas L Griffiths. Mouselab-mdp: A new paradigm for tracing how people plan. 2017.
|
| 179 |
+
Paco Calvo and John Symons. The Architecture of Cognition: Rethinking Fodor and Pylyshyn’s Systematicity Challenge. MIT Press, 2014.
|
| 180 |
+
Susan Carey. 15 why theories of concepts should not ignore the problem of acquisition. The conceptual mind: New directions in the study of concepts, pp. 415, 2015.
|
| 181 |
+
Michael B Chang, Tomer Ullman, Antonio Torralba, and Joshua B Tenenbaum. A compositional object-based approach to learning physical dynamics. arXiv preprint arXiv:1612.00341, 2016.
|
| 182 |
+
Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. In Advances in Neural Information Processing Systems, pp. 2172–2180, 2016.
|
| 183 |
+
Xinyun Chen, Chang Liu, and Dawn Song. Learning neural programs to parse programs. arXiv preprint arXiv:1706.01284, 2017.
|
| 184 |
+
Kyunghyun Cho, Bart Van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Hol- ¨ ger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014.
|
| 185 |
+
Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014.
|
| 186 |
+
Eyal Dechter, Jonathan Malmaud, Ryan P Adams, and Joshua B Tenenbaum. Bootstrap learning via modular concept discovery. In IJCAI, pp. 1302–1309, 2013.
|
| 187 |
+
Coline Devin, Abhishek Gupta, Trevor Darrell, Pieter Abbeel, and Sergey Levine. Learning modular neural network policies for multi-task and multi-robot transfer. In Robotics and Automation (ICRA), 2017 IEEE International Conference on, pp. 2169–2176. IEEE, 2017.
|
| 188 |
+
Saso D ˇ zeroski, Luc De Raedt, and Kurt Driessens. Relational reinforcement learning. ˇ Machine learning, 43(1-2):7–52, 2001.
|
| 189 |
+
Kevin Ellis, Lucas Morales, Mathias Sable-Meyer, Armando Solar-Lezama, and Josh Tenenbaum. ´ Learning libraries of subroutines for neurally–guided bayesian program induction. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 7805–7815. Curran Associates, Inc., 2018.
|
| 190 |
+
Chrisantha Fernando, Dylan Banarse, Charles Blundell, Yori Zwols, David Ha, Andrei A Rusu, Alexander Pritzel, and Daan Wierstra. Pathnet: Evolution channels gradient descent in super neural networks. arXiv preprint arXiv:1701.08734, 2017.
|
| 191 |
+
John K Feser, Marc Brockschmidt, Alexander L Gaunt, and Daniel Tarlow. Differentiable functional program interpreters. arXiv preprint arXiv:1611.01988, 2016.
|
| 192 |
+
Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. arXiv preprint arXiv:1703.03400, 2017.
|
| 193 |
+
Jerry A Fodor and Ernest Lepore. The compositionality papers. Oxford University Press, 2002.
|
| 194 |
+
Jerry A Fodor and Zenon W Pylyshyn. Connectionism and cognitive architecture: A critical analysis. Cognition, 28(1-2):3–71, 1988.
|
| 195 |
+
|
| 196 |
+
Kevin Frans, Jonathan Ho, Xi Chen, Pieter Abbeel, and John Schulman. Meta learning shared hierarchies. arXiv preprint arXiv:1710.09767, 2017.
|
| 197 |
+
|
| 198 |
+
Yaroslav Ganin, Tejas Kulkarni, Igor Babuschkin, S.M. Ali Eslami, and Orial Vinyals. Synthesizing programs for images using reinforced adversarial learning. arXiv preprint arXiv:1804.01118, 2018.
|
| 199 |
+
|
| 200 |
+
Alexander L Gaunt, Marc Brockschmidt, Nate Kushman, and Daniel Tarlow. Differentiable programs with neural libraries. arXiv preprint arXiv:1611.02109, 2016.
|
| 201 |
+
|
| 202 |
+
Alison Gopnik and Henry M Wellman. Reconstructing constructivism: Causal models, bayesian learning mechanisms, and the theory theory. Psychological bulletin, 138(6):1085, 2012.
|
| 203 |
+
|
| 204 |
+
Erin Grant, Chelsea Finn, Sergey Levine, Trevor Darrell, and Thomas Griffiths. Recasting gradientbased meta-learning as hierarchical bayes. arXiv preprint arXiv:1801.08930, 2018.
|
| 205 |
+
|
| 206 |
+
Alex Graves. Adaptive computation time for recurrent neural networks. arXiv preprint arXiv:1603.08983, 2016.
|
| 207 |
+
|
| 208 |
+
Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014.
|
| 209 |
+
|
| 210 |
+
Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka GrabskaBarwinska, Sergio G ´ omez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John Agapiou, ´ et al. Hybrid computing using a neural network with dynamic external memory. Nature, 538 (7626):471, 2016.
|
| 211 |
+
|
| 212 |
+
Edward Grefenstette, Karl Moritz Hermann, Mustafa Suleyman, and Phil Blunsom. Learning to transduce with unbounded memory. In Advances in Neural Information Processing Systems, pp. 1828–1836, 2015.
|
| 213 |
+
|
| 214 |
+
Thomas L Griffiths, Falk Lieder, and Noah D Goodman. Rational use of cognitive resources: Levels of analysis between the computational and the algorithmic. Topics in cognitive science, 7(2): 217–229, 2015.
|
| 215 |
+
|
| 216 |
+
Thomas L Griffiths, Fred Callaway, Michael B Chang, Erin Grant, Paul M Krueger, and Falk Lieder. Doing more with less: Meta-reasoning and meta-learning in humans and machines. Current Opinion in Behavioral Sciences, 01 2019.
|
| 217 |
+
|
| 218 |
+
Abhishek Gupta, Benjamin Eysenbach, Chelsea Finn, and Sergey Levine. Unsupervised metalearning for reinforcement learning. arXiv preprint arXiv:1806.04640, 2018a.
|
| 219 |
+
|
| 220 |
+
Abhishek Gupta, Russell Mendonca, YuXuan Liu, Pieter Abbeel, and Sergey Levine. Metareinforcement learning of structured exploration strategies. arXiv preprint arXiv:1802.07245, 2018b.
|
| 221 |
+
|
| 222 |
+
David Ha and Jurgen Schmidhuber. World models. ¨ arXiv preprint arXiv:1803.10122, 2018.
|
| 223 |
+
|
| 224 |
+
David Ha, Andrew Dai, and Quoc V Le. Hypernetworks. arXiv preprint arXiv:1609.09106, 2016.
|
| 225 |
+
|
| 226 |
+
Jessica B Hamrick, Andrew J Ballard, Razvan Pascanu, Oriol Vinyals, Nicolas Heess, and Peter W Battaglia. Metacontrol for adaptive imagination-based optimization. arXiv preprint arXiv:1705.02670, 2017.
|
| 227 |
+
|
| 228 |
+
Nicholas Hay, Stuart Russell, David Tolpin, and Solomon Eyal Shimony. Selecting computations: Theory and applications. arXiv preprint arXiv:1408.2048, 2014.
|
| 229 |
+
|
| 230 |
+
Irina Higgins, David Amos, David Pfau, Sebastien Racaniere, Loic Matthey, Danilo Rezende, and Alexander Lerchner. Towards a definition of disentangled representations. arXiv preprint arXiv:1812.02230, 2018.
|
| 231 |
+
|
| 232 |
+
Geoffrey Hinton, Nicholas Frosst, and Sara Sabour. Matrix capsules with em routing. 2018.
|
| 233 |
+
|
| 234 |
+
Robert C Holte and Berthe Y Choueiry. Abstraction and reformulation in artificial intelligence. Philosophical Transactions of the Royal Society of London B: Biological Sciences, 358(1435): 1197–1204, 2003.
|
| 235 |
+
|
| 236 |
+
John J Hopfield. Neural networks and physical systems with emergent collective computational abilities. Proceedings of the national academy of sciences, 79(8):2554–2558, 1982.
|
| 237 |
+
|
| 238 |
+
Robert A Jacobs, Michael I Jordan, Steven J Nowlan, and Geoffrey E Hinton. Adaptive mixtures of local experts. Neural computation, 3(1):79–87, 1991.
|
| 239 |
+
|
| 240 |
+
Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In Advances in neural information processing systems, pp. 2017–2025, 2015.
|
| 241 |
+
|
| 242 |
+
Armand Joulin and Tomas Mikolov. Inferring algorithmic patterns with stack-augmented recurrent nets. In Advances in neural information processing systems, pp. 190–198, 2015.
|
| 243 |
+
|
| 244 |
+
Łukasz Kaiser and Ilya Sutskever. Neural gpus learn algorithms. arXiv preprint arXiv:1511.08228, 2015.
|
| 245 |
+
|
| 246 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 247 |
+
|
| 248 |
+
Louis Kirsch, Julius Kunze, and David Barber. Modular networks: Learning to decompose neural computation. In Advances in Neural Information Processing Systems, pp. 2414–2423, 2018.
|
| 249 |
+
|
| 250 |
+
Teuvo Kohonen. Correlation matrix memories. IEEE transactions on computers, 100(4):353–359, 1972.
|
| 251 |
+
|
| 252 |
+
Tejas D Kulkarni, William F Whitney, Pushmeet Kohli, and Josh Tenenbaum. Deep convolutional inverse graphics network. In Advances in Neural Information Processing Systems, pp. 2539–2547, 2015.
|
| 253 |
+
|
| 254 |
+
Tejas D Kulkarni, Karthik Narasimhan, Ardavan Saeedi, and Josh Tenenbaum. Hierarchical deep reinforcement learning: Integrating temporal abstraction and intrinsic motivation. In Advances in neural information processing systems, pp. 3675–3683, 2016.
|
| 255 |
+
|
| 256 |
+
Karol Kurach, Marcin Andrychowicz, and Ilya Sutskever. Neural random-access machines. arXiv preprint arXiv:1511.06392, 2015.
|
| 257 |
+
|
| 258 |
+
BM Lake and Marco Baroni. Generalization without systematicity: On the compositional skills of sequence-to-sequence recurrent networks. arXiv preprint arXiv:1711.00350, 2017.
|
| 259 |
+
|
| 260 |
+
Brenden M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015.
|
| 261 |
+
|
| 262 |
+
Yann LeCun, Leon Bottou, Yoshua Bengio, Patrick Haffner, et al. Gradient-based learning applied ´ to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
|
| 263 |
+
|
| 264 |
+
Falk Lieder, Frederick Callaway, Sayan Gul, Paul M Krueger, and Thomas L Griffiths. Learning to select computations. arXiv preprint arXiv:1711.06892, 2017.
|
| 265 |
+
|
| 266 |
+
Chen-Hsuan Lin and Simon Lucey. Inverse compositional spatial transformer networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2568–2576, 2017.
|
| 267 |
+
|
| 268 |
+
Adam Liska, Germ ˇ an Kruszewski, and Marco Baroni. Memorize or generalize? searching for a ´ compositional rnn in a haystack. arXiv preprint arXiv:1802.06467, 2018.
|
| 269 |
+
|
| 270 |
+
David Lopez-Paz et al. Gradient episodic memory for continual learning. In Advances in Neural Information Processing Systems, pp. 6467–6476, 2017.
|
| 271 |
+
|
| 272 |
+
Joao Loula, Marco Baroni, and Brenden M Lake. Rearranging the familiar: Testing compositional generalization in recurrent networks. arXiv preprint arXiv:1807.07545, 2018.
|
| 273 |
+
|
| 274 |
+
Gary F Marcus. Rethinking eliminative connectionism. Cognitive psychology, 37(3):243–282, 1998.
|
| 275 |
+
|
| 276 |
+
Gary F Marcus. The algebraic mind: Integrating connectionism and cognitive science. MIT press, 2018.
|
| 277 |
+
|
| 278 |
+
Nikhil Mishra, Mostafa Rohaninejad, Xi Chen, and Pieter Abbeel. A simple neural attentive metalearner. 2018.
|
| 279 |
+
|
| 280 |
+
Ofir Nachum, Shane Gu, Honglak Lee, and Sergey Levine. Data-efficient hierarchical reinforcement learning. arXiv preprint arXiv:1805.08296, 2018.
|
| 281 |
+
|
| 282 |
+
Ashvin V Nair, Vitchyr Pong, Murtaza Dalal, Shikhar Bahl, Steven Lin, and Sergey Levine. Visual reinforcement learning with imagined goals. In Advances in Neural Information Processing Systems, pp. 9209–9220, 2018.
|
| 283 |
+
|
| 284 |
+
Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th international conference on machine learning (ICML-10), pp. 807–814, 2010.
|
| 285 |
+
|
| 286 |
+
Alex Nichol, Joshua Achiam, and John Schulman. On first-order meta-learning algorithms. CoRR, abs/1803.02999, 2018.
|
| 287 |
+
|
| 288 |
+
Junhyuk Oh, Satinder Singh, Honglak Lee, and Pushmeet Kohli. Zero-shot task generalization with multi-task deep reinforcement learning. arXiv preprint arXiv:1706.05064, 2017.
|
| 289 |
+
|
| 290 |
+
Giambattista Parascandolo, Mateo Rojas-Carulla, Niki Kilbertus, and Bernhard Scholkopf. Learning ¨ independent causal mechanisms. arXiv preprint arXiv:1712.00961, 2017.
|
| 291 |
+
|
| 292 |
+
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 NIPS-W, 2017.
|
| 293 |
+
|
| 294 |
+
S Pinker. Baby born talkingdescribes heaven. The language instinct: How the mind creates language, pp. 265–301, 1994.
|
| 295 |
+
|
| 296 |
+
Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. 2016.
|
| 297 |
+
|
| 298 |
+
Scott Reed and Nando De Freitas. Neural programmer-interpreters. arXiv preprint arXiv:1511.06279, 2015.
|
| 299 |
+
|
| 300 |
+
Sebastian Riedel, Matko Bosnjak, and Tim Rocktaschel. Programming with a differentiable forth ¨ interpreter. CoRR, abs/1605.06640, 2016.
|
| 301 |
+
|
| 302 |
+
Clemens Rosenbaum, Tim Klinger, and Matthew Riemer. Routing networks: Adaptive selection of non-linear functions for multi-task learning. International Conference on Learning Representations, 2018.
|
| 303 |
+
|
| 304 |
+
Stuart Russell and Eric Wefald. Principles of metareasoning. Artificial intelligence, 49(1-3):361– 395, 1991.
|
| 305 |
+
|
| 306 |
+
S Sanborn, D Bourgin, M Chang, and T Griffiths. Representational efficiency outweighs action efficiency in human program induction. In Proceedings of the 40th annual Cognitive Science Society, July 2018.
|
| 307 |
+
|
| 308 |
+
Alvaro Sanchez-Gonzalez, Nicolas Heess, Jost Tobias Springenberg, Josh Merel, Martin Riedmiller, Raia Hadsell, and Peter Battaglia. Graph networks as learnable physics engines for inference and control. arXiv preprint arXiv:1806.01242, 2018.
|
| 309 |
+
|
| 310 |
+
Adam Santoro, David Raposo, David GT Barrett, Mateusz Malinowski, Razvan Pascanu, Peter Battaglia, and Timothy Lillicrap. A simple neural network module for relational reasoning. arXiv preprint arXiv:1706.01427, 2017.
|
| 311 |
+
|
| 312 |
+
Imanol Schlag and Jurgen Schmidhuber. Gated fast weights for on-the-fly neural program genera-¨ tion. In NIPS Metalearning Workshop, 2017.
|
| 313 |
+
|
| 314 |
+
Imanol Schlag and Jurgen Schmidhuber. Learning to reason with third order tensor products. In ¨ Advances in Neural Information Processing Systems, pp. 10003–10014, 2018.
|
| 315 |
+
|
| 316 |
+
Jurgen Schmidhuber. ¨ Evolutionary principles in self-referential learning, or on learning how to learn: the meta-meta-... hook. PhD thesis, Technische Universitat M¨ unchen, 1987. ¨
|
| 317 |
+
|
| 318 |
+
Jurgen Schmidhuber. ¨ Towards compositional learning with dynamic neural networks. Inst. fur¨ Informatik, 1990.
|
| 319 |
+
|
| 320 |
+
Jurgen Schmidhuber. Learning to control fast-weight memories: An alternative to dynamic recurrent ¨ networks. Neural Computation, 4(1):131–139, 1992.
|
| 321 |
+
|
| 322 |
+
Jurgen Schmidhuber. Ultimate cognition ¨ a la g \` odel. ¨ Cognitive Computation, 1(2):177–193, 2009.
|
| 323 |
+
|
| 324 |
+
Jurgen Schmidhuber. Self-delimiting neural networks. ¨ arXiv preprint arXiv:1210.0118, 2012.
|
| 325 |
+
|
| 326 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 327 |
+
|
| 328 |
+
Herbert A Simon. The sciences of the artificial. Cambridge, MA, pp. 132, 1969.
|
| 329 |
+
|
| 330 |
+
Herbert A Simon. The science of design: Creating the artificial. Design Issues, pp. 67–82, 1988.
|
| 331 |
+
|
| 332 |
+
Alec Solway, Carlos Diuk, Natalia Cordova, Debbie Yee, Andrew G Barto, Yael Niv, and Matthew M ´ Botvinick. Optimal behavioral hierarchy. PLoS computational biology, 10(8):e1003779, 2014.
|
| 333 |
+
|
| 334 |
+
Elizabeth S Spelke. Principles of object perception. Cognitive science, 14(1):29–56, 1990.
|
| 335 |
+
|
| 336 |
+
Jost Tobias Springenberg, Alexey Dosovitskiy, Thomas Brox, and Martin Riedmiller. Striving for simplicity: The all convolutional net. arXiv preprint arXiv:1412.6806, 2014.
|
| 337 |
+
|
| 338 |
+
Aravind Srinivas, Allan Jabri, Pieter Abbeel, Sergey Levine, and Chelsea Finn. Universal planning networks. arXiv preprint arXiv:1804.00645, 2018.
|
| 339 |
+
|
| 340 |
+
Sainbayar Sukhbaatar, Jason Weston, Rob Fergus, et al. End-to-end memory networks. In Advances in neural information processing systems, pp. 2440–2448, 2015.
|
| 341 |
+
|
| 342 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pp. 3104–3112, 2014.
|
| 343 |
+
|
| 344 |
+
Valentin Thomas, Jules Pondard, Emmanuel Bengio, Marc Sarfati, Philippe Beaudoin, Marie-Jean Meurs, Joelle Pineau, Doina Precup, and Yoshua Bengio. Independently controllable features. arXiv preprint arXiv:1708.01289, 2017.
|
| 345 |
+
|
| 346 |
+
Sebastian Thrun and Lorien Pratt. Learning to learn. Springer Science & Business Media, 2012.
|
| 347 |
+
|
| 348 |
+
Lazar Valkov, Dipak Chaudhari, Akash Srivastava, Charles Sutton, and Swarat Chaudhuri. Houdini: Lifelong learning as program synthesis. In Advances in Neural Information Processing Systems, pp. 8701–8712, 2018.
|
| 349 |
+
|
| 350 |
+
Sjoerd van Steenkiste, Michael Chang, Klaus Greff, and Jurgen Schmidhuber. Relational neural ex- ¨ pectation maximization: Unsupervised discovery of objects and their interactions. arXiv preprint arXiv:1802.10353, 2018.
|
| 351 |
+
|
| 352 |
+
Alexander Sasha Vezhnevets, Simon Osindero, Tom Schaul, Nicolas Heess, Max Jaderberg, David Silver, and Koray Kavukcuoglu. Feudal networks for hierarchical reinforcement learning. arXiv preprint arXiv:1703.01161, 2017.
|
| 353 |
+
|
| 354 |
+
William F Whitney, Michael Chang, Tejas Kulkarni, and Joshua B Tenenbaum. Understanding visual concepts with continuation learning. arXiv preprint arXiv:1602.06822, 2016.
|
| 355 |
+
|
| 356 |
+
David J Willshaw, O Peter Buneman, and Hugh Christopher Longuet-Higgins. Non-holographic associative memory. Nature, 1969.
|
| 357 |
+
|
| 358 |
+
Danfei Xu, Suraj Nair, Yuke Zhu, Julian Gao, Animesh Garg, Li Fei-Fei, and Silvio Savarese. Neural task programming: Learning to generalize across hierarchical tasks. arXiv preprint arXiv:1710.01813, 2017.
|
| 359 |
+
|
| 360 |
+
Wojciech Zaremba and Ilya Sutskever. Learning to execute. arXiv preprint arXiv:1410.4615, 2014.
|
| 361 |
+
|
| 362 |
+
Wojciech Zaremba, Tomas Mikolov, Armand Joulin, and Rob Fergus. Learning simple algorithms from examples. In International Conference on Machine Learning, pp. 421–429, 2016.
|
| 363 |
+
|
| 364 |
+
# A DATA
|
| 365 |
+
|
| 366 |
+
Numerical arithmetic (Sec. D.1): The dataset contains arithmetic expressions of $k$ terms where the terms are integers $\in \ [ 0 , 9 ]$ and the operators are $\in \{ + , \times , - \}$ . The number of possible problems is $( 1 0 ^ { k } ) ( 3 ^ { k - 1 } )$ . The learner sees $5 8 1 0 / ( 2 . 0 4 \cdot 1 0 ^ { 1 4 } ) = 2 . 8 \dot { 5 } \cdot 1 0 ^ { - 1 1 } .$ of the training distribution. The number of possible problems in the extrapolation set is $( 1 0 ^ { 2 0 } ) ( 3 ^ { 1 9 } ) = 1 . 1 6 \cdot 1 \bar { 0 } ^ { 2 9 }$ . An input expression is a sequence of one-hot vectors of size 13.
|
| 367 |
+
|
| 368 |
+
Table 1: Numerical Arithmetic Dataset
|
| 369 |
+
|
| 370 |
+
<table><tr><td># Terms</td><td>Prob. Space</td><td># Train Samples</td><td>Frac.of Prob.Space</td></tr><tr><td>2</td><td>(10²)(31)=3.10²</td><td>210</td><td>7·10-1</td></tr><tr><td>3</td><td>(10³)(3²)=9.10³</td><td>700</td><td>7.78.10-2</td></tr><tr><td>4</td><td>(104)(3)=2.7.105</td><td>700</td><td>2.6.10-3</td></tr><tr><td>5</td><td>(10)(34)=8.1.106</td><td>700</td><td>8.64·10-5</td></tr><tr><td>6</td><td>(10)(35)=2.43.108</td><td>700</td><td>2.88:10-6</td></tr><tr><td>7</td><td>(107)(36)= 7.29·109</td><td>700</td><td>9.60·10-8</td></tr><tr><td>8</td><td>(108)(37) =2.19.1011</td><td>700</td><td>3.20·10-9</td></tr><tr><td>9</td><td>(109(38) = 6.56.1012</td><td>700</td><td>1.07:10-10</td></tr><tr><td>10</td><td>(1010)(39 = 1.97· 1014</td><td>700</td><td>3.56:10-12</td></tr><tr><td>Total</td><td>2.04:1014</td><td>5810</td><td>2.85:10-11</td></tr></table>
|
| 371 |
+
|
| 372 |
+
Multilingual arithmetic (Sec. 4.1): The dataset contains arithmetic expressions of $k$ terms where the terms are integers $\in \ [ 0 , 9 ]$ and the operators are $\in \{ + , \cdot , - \}$ , expressed in five different languages. With 5 choices for the source language and target language, the number of possible problems is $( 1 0 ^ { k } ) ( 3 ^ { k - 1 } ) ( 5 ^ { 2 } )$ . In training, each source language is seen with 4 target languages and each target language is seen with 4 source languages: 20 pairs are seen in training and 5 pairs are held out for testing. The learner sees $4 6 2 0 0 / ( 1 . 6 \bar { 8 } \cdot 1 \bar { 0 } ^ { 8 } ) = \bar { 2 . 7 } 6 \cdot 1 0 ^ { - 4 }$ of the training distribution. The entire space of possible problems in the extrapolation set is $( 1 0 ^ { 1 0 } ) ( 3 ^ { 9 } ) ( 5 ^ { 2 } ) = 4 . { \overset { \vartriangle } { } { \boldsymbol { \mathrm { 1 0 } } } } ^ { 1 0 }$ out of which we draw samples from the 5 held-out language pairs $( ( 1 0 ^ { 1 0 } ) ( 3 ^ { 9 } ) ( 5 ) = 9 . 8 4 \cdot 1 0 ^ { 1 4 }$ possible. An input expression is a sequence of one-hot vectors of size $1 3 \times 5 + 1 = 6 6$ where the single additional element is a STOP token (for training the RNN).
|
| 373 |
+
|
| 374 |
+
Table 2: Multilingual Arithmetic Dataset
|
| 375 |
+
|
| 376 |
+
<table><tr><td># Terms</td><td>Prob. Space</td><td>Train Prob. Space</td><td># Train Samples</td><td>Frac.of Train Dist.</td><td>Frac.of Prob. Space</td></tr><tr><td>2</td><td>(10²)(3)(25)= 7.5·10</td><td>(10²)(3)(20)=6:10</td><td>210:20=4.2:103</td><td>7:10-1</td><td>5.6:10-1</td></tr><tr><td>3</td><td>(10)(3²)(25)=2.25.105</td><td>(10³)(3²)(20)= 1.8·105</td><td>700· 20= 1.4· 104</td><td>7.78.10-2</td><td>6.22.10-2</td></tr><tr><td>4</td><td>(104)(33)(25) =6.75.106</td><td>(104)(33)(20)=5.4.106</td><td>700 · 20=1.4·104</td><td>2.6.10-3</td><td>2.07.10-3</td></tr><tr><td>5</td><td>(105)(3)(25)=2.02.108</td><td>(105)(34)(20)= 1.62·108</td><td>700· 20= 1.4· 104</td><td>8.64·10-5</td><td>6.91:10-5</td></tr><tr><td>Total</td><td>2.09.108</td><td>1.68:108</td><td>46200</td><td>2.76:10 -4</td><td>2.21·10 -4</td></tr></table>
|
| 377 |
+
|
| 378 |
+
Spatially transformed MNIST (Sec. 4.2): The generative process for transforming the standard MNIST dataset to the input the learner observes is described as follows. We first center the $2 8 \mathbf { x } 2 8$ MNIST image in a $4 2 \mathbf { x } 4 2$ black background. We have three types of transformations to apply to the image: scale, rotate, and translate. We can scale big or small (by a factor of 0.6 each way). We can rotate left or right (by 45 degrees each direction). We can translate left, right, up, and down, but the degree to which we translate depends on the size of the object: we translate the digit to the edge of the image, so smaller digits get translated more than large digits. Large digits are translated by $2 0 \%$ of the image width, unscaled digits are translated by $2 9 \%$ of the image width, and small digits are translated by $3 8 \%$ of the image width. In total there are $2 + 2 + 4 \times 3 = 1 6$ individual transformation operations used in the generative process. Because some transformation combinations are commutative, we defined an ordering with which we will apply the generative transformations: scale then rotate then translate. For length-2 compositions of generative transformations, there are scale-small-then-translate $\left( 1 \times 4 \right)$ , scale-big-then-translate $\left( 1 \times 4 \right)$ , rotate-then-translate $( 2 \times 4 )$ , and scale-then-rotate $( 2 \times 2 )$ . We randomly choose 16 of these 20 for training, 2 for validation, 2 for test, as shown in Figure 4 (center). For length-3 compositions of generative transformations, there are scale-small-then-rotate-then-translate $( 1 \times 2 \times 4 )$ and scale-big-then-rotate-then-translate $( 1 \times 2 \times 4 )$ . All 16 were held out for evaluation.
|
| 379 |
+
|
| 380 |
+
# B LEARNER DETAILS
|
| 381 |
+
|
| 382 |
+
All learners are implemented in PyTorch (Paszke et al., 2017) and the code is available at https: //github.com/mbchang/crl.
|
| 383 |
+
|
| 384 |
+
# B.1 ARITHMETIC
|
| 385 |
+
|
| 386 |
+
Baseline: The RNN is implemented as a sequence-to-sequence (Sutskever et al., 2014) gated recurrent unit (GRU) (Cho et al., 2014).
|
| 387 |
+
|
| 388 |
+
CRL Controller: The controller consists of a policy network and a value function, each implemented as GRUs that read in the input expression. The value function outputs a value estimate for the current expression. For the numerical arithmetic task, the policy network first selects a reducer and then conditioned on that choice selects the location in the input expression to apply the reducer. For the multilingual arithmetic task, the policy first samples whether to halt, reduce, or translate, and then conditioned on that choice (if it doesn’t halt) it samples the reducer (along with an index to apply it) or the translator.
|
| 389 |
+
|
| 390 |
+
CRL Modules: The reducers are initialized as a two-layer feedforward network with ReLU nonlinearities (Nair & Hinton, 2010). The translators are a linear weight matrices.
|
| 391 |
+
|
| 392 |
+
# B.2 IMAGE TRANSFORMATIONS
|
| 393 |
+
|
| 394 |
+
Baselines: The CNN is a variant of an all-convolutional network (Springenberg et al., 2014). This was also used as the pre-trained image classifier. The affine-STN predicts all 6 learnable affine parameters as in Jaderberg et al. (2015).
|
| 395 |
+
|
| 396 |
+
CRL Controller: The controller consists of a policy network and a value function, each implemented with the same architecture as the CNN baseline.
|
| 397 |
+
|
| 398 |
+
CRL Modules: The rotate-STN’s localization network is constrained to output the sine and cosine of a rotation angle, the scale-STN’s localization network is constrained to output the scaling factor, and the translate-STN’s localization network is constrained to output spatial translations
|
| 399 |
+
|
| 400 |
+
# C EXPERIMENT DETAILS
|
| 401 |
+
|
| 402 |
+
# C.1 MULTILINGUAL ARITHMETIC
|
| 403 |
+
|
| 404 |
+
Training procedure: The training procedure for the controller follows the standard Proximal Policy Optimization training procedure, where the learner samples a set of episodes, pushes them to a replay buffer, and every $k$ episodes updates the controller based on the episodes collected. Independently, every $k ^ { \prime }$ episodes we consolidate those $k ^ { \prime }$ episodes into a batch and use it to train the modules. We found via a grid search $k = 1 0 2 4$ and $k ^ { \prime } = 2 5 6$ . Through an informal search whose heuristic was performance on the training set, we settled on updating the curriculum of CRL every $1 0 ^ { 5 }$ episodes and updating the curriculum of the RNN every $5 \cdot 1 0 ^ { 4 }$ episodes.
|
| 405 |
+
|
| 406 |
+
Domain-specific details: In the case that HALT is called to early, CRL treats it as a no-op. Similarly, if a reduction operator is called when there is only one token in the expression, the learner also treats it as a no-op. There are other ways around this domain-specific nuance, such as to always halt whenever HALT is called but only do backpropagation from the loss if the expression has been fully reduced (otherwise it wouldn’t make sense to compute a loss on an expression that has not been fully reduced). The way we interpret these “invalid actions” is analogous to a standard practice in reinforcement learning of keeping an agent in the same state if it walks into a wall of a maze.
|
| 407 |
+
|
| 408 |
+
Symmetry breaking: We believe that the random initialization of the modules and the controller breaks the symmetry between the modules. For episodes 0 through $k$ the controller still has the same random initial weights, and for episodes 0 through $k ^ { \prime }$ the modules still have the same random initial weights. Because of the initial randomness, the initial controller will select certain modules more than others for certain inputs; similarly initially certain modules will perform better than others for certain inputs. Therefore, after $k$ episodes, the controller’s parameters will update in a direction that will make choosing the modules that luckily performed better for certain inputs more likely;
|
| 409 |
+
|
| 410 |
+
similarly, after $k ^ { \prime }$ episodes, the modules’ parameters will update in a direction that will make them better for the inputs they have been given. So gradually, modules that initially were slightly better at certain inputs will become more specialized towards those inputs and they will also get selected more for those inputs.
|
| 411 |
+
|
| 412 |
+
Training objective: The objective of the composition of modules is to minimize the negative log likelihood of the correct answer to the arithmetic problem. The objective of the controller is to maximize reward. It receives a reward of 1 if the token with maximum log likelihood is that of the correct answer, 0 if not, and $- 0 . 0 1$ for every computation step it takes. The step penalty was found by a scale search over $\{ - 1 , - 0 . 1 , - 0 . 0 1 , - \mathrm { { 0 . 0 0 1 } } \}$ and $- 0 . 0 1$ was a penalty that we found balanced accuracy and computation time to a reasonable degree during training. There is no explicit feedback on what the transformations should be and on how they are composed.
|
| 413 |
+
|
| 414 |
+
# C.2 IMAGE TRANSFORMATIONS
|
| 415 |
+
|
| 416 |
+
Training procedure: The training procedure is similar to the mulitlingual arithmetic case. We update the policy every 256 episodes and the modules everye 64 episodes. We observed that directly training for large translations was unstable, so to overcome this we used a curriculum. The curriculum began without any translation, then increased the direction of translation by $1 \%$ of the image width every $3 \cdot 1 0 ^ { 4 }$ episodes until the amount of translation matched $2 0 \%$ of the image width for large digits, $2 9 \%$ of the image width for unscaled digits, and $3 8 \%$ of the image width for small digits. Unlike in the multilingual arithmetic case, during later stages of the curriculum we do not continue training on earlier stages of the curriculum.
|
| 417 |
+
|
| 418 |
+
Domain-specific details: In the bounded-horizon setup, we manually halt CRL according to the length of the generative transformation combinations of the task: if the digit was generated by applying two transformations, then we halt CRL’s controller after it selects two modules. Therefore, we did not use a step-penalty in this experiment.
|
| 419 |
+
|
| 420 |
+
Symmetry breaking: The transformation parameters were initialized to output an identity transformation, although the the localization network were randomly initialized across modules, which breaks the symmetry among the modules.
|
| 421 |
+
|
| 422 |
+
Training objective: The objective is to classify a transformed MNIST digit correctly based on the negative log likelihood of the correct classification from a pre-trained classifier. The objective of the controller is to maximize reward. It receives a reward of 1 for a correct classification and 0 if not. There is no explicit feedback on what the transformations should be and on how they are composed.
|
| 423 |
+
|
| 424 |
+
# D ADDITIONAL EXPERIMENTS
|
| 425 |
+
|
| 426 |
+
# D.1 NUMERICAL MATH
|
| 427 |
+
|
| 428 |
+
The input is a numerical arithmetic expression (e.g. $3 + 4 \times 7 )$ ) and the desired output (e.g. 1) is the evaluation of the expression modulo 10. In our experiments we train on a curriculum of length-2 expressions to length-10 expressions, adding new expressions to an expanding dataset over the course of training. The first challenge is to learn from this limited data (only 6510 training expressions) to generalize well to unseen length-10 expressions in the test set $( \approx 2 ^ { 1 \bar { 4 } }$ possible). The second challenge is to extrapolate from this limited data to length-20 expressions $( \approx \dot { 1 } 0 ^ { 2 9 }$ possible). We compare with an RNN architecture (Chung et al., 2014) directly trained to map input to output.
|
| 429 |
+
|
| 430 |
+
Though the RNN eventually generalizes to different 10-length expressions and extrapolates to 20- length expressions (yellow in Fig. 7) with 10 times more data as CRL, it completely overfits when given the same amount of data (gray). In contrast, CRL (red) does not overfit, generalizing significantly better to both the 10-length and 20-length test sets. We believe that the modular disentangled structure in CRL biases it to cleave the problem distribution at its joints, yielding this 10-fold reduction in sample complexity relative to the RNN.
|
| 431 |
+
|
| 432 |
+
We found that the controller naturally learned windows centered around operators (e.g. $2 + 3$ rather than $\times 4 - \ i$ ), suggesting that it has discovered semantic role of these primitive two-term expressions by pattern-matching common structure across arithmetic expressions of different lengths. Note that CRL’s extrapolation accuracy here is not perfect compared to (Cai et al., 2017); however CRL achieves such high extrapolation accuracy with only sparse supervision, without the step-by-step supervision on execution traces, the stack-based model of execution, and hardcoded transformations.
|
| 433 |
+
|
| 434 |
+

|
| 435 |
+
Figure 7: Numerical math task. We compare our learner with the RNN baseline. As a sanity check, we also compare with a version of our learner which has a hardcoded controller (HCC) and a learner which has hardcoded modules (HCF) (in which case the controller is restricted to select windows of 3 with an operator in the middle). All models perform well on the training set. Only our method and its HCC, HCF modifications generalize to the testing and extrapolation set. The RNN requires 10 times more data to generalize to the testing and extrapolation set. For $( \mathbf { b } , \mathbf { c } )$ we only show accuracy on the expressions with the maximum length of those added so far to the curriculum. “1e3” and “1e4” correspond to the order of magnitude of the number of samples in the dataset, of which $70 \%$ are used for training. 10, 50, and 90 percentiles are shown over 6 runs.
|
| 436 |
+
|
| 437 |
+

|
| 438 |
+
Figure 8: Variations: The minimum number of reducers and translators that can solve the multilingual math problems is 1 and $m$ respectively, where $m$ is the number of languages. This is on an extrapolation task, which has more terms and different language pairs. (a, b): Four reducers and zero translators (red) is a pathological choice of modules that causes CRL to overfit, but it does not when translators are provided. (c) In the nonpathological cases, regardless of the number of modules, the learner metareasons about the resources it has to customize its computation to the problem. 10, 50, and 90 percentiles are shown over 6 runs.
|
| 439 |
+
|
| 440 |
+
# D.2 VARIATIONS
|
| 441 |
+
|
| 442 |
+
Here we study the effect of varying the number of modules available to our learner. Fig. 8a, 8b highlights a particular pathological choice of modules that causes CRL to overfit. If CRL uses four reducers and zero translators (red), it is not surprising that it fails to generalize to the test set: recall that each source language is only seen with four target languages during training with one held out; each reducer can just learn to reduce to one of the four target languages. What is interesting though is that when we add five translators to the four reducers (blue), we see certain runs achieve $100 \%$ generalization, even though CRL need not use the translators at all in order to fit the training set. That the blue training curve is slightly faster than the red offers a possible explanation: it may be harder to find a program where each reducer can reduce any source language to their specialized target language, and easier to find programs that involve steps of re-representation (through these translators), where the solution to a new problem is found merely by re-representing that problem into a problem that learner is more familiar with. The four-reducers-five-translators could have overfitted completely like the four-reducers-zero-translators case, but it consistently does not.
|
| 443 |
+
|
| 444 |
+
We find that when we vary the number of reducers (1 or 3) and the number of translators in (5 or 8) in Fig. 8c, the extrapolation performance is consistent across the choices of different numbers of modules, suggesting that CRL is quite robust to the number of modules in non-pathological cases.
|
| 445 |
+
|
| 446 |
+
# D.3 HOW FAR CAN WE PUSH EXTRAPOLATION?
|
| 447 |
+
|
| 448 |
+
Figure 9 shows the extrapolation accuracy from 6 to 100 terms after training on a curriculum from 2 to 5 terms (46200 examples) on the multilingual arithmetic task (Sec. 4.1). The number of possible 100-term problems is $( 1 0 ^ { 1 0 0 } ) ( 3 ^ { 9 9 } ) ( 5 ^ { 2 } ) = 4 . 2 9 \cdot 1 0 ^ { 1 4 8 }$ and CRL achieves about $6 0 \%$ accuracy on these problems; a random guess would be $1 0 \%$ .
|
| 449 |
+
|
| 450 |
+

|
| 451 |
+
Figure 9: Extrapolation
|
| 452 |
+
|
| 453 |
+

|
| 454 |
+
D.4 EXECUTION TRACES: FUNCTION SELECTION
|
| 455 |
+
Figure 10: Multilingual Arithmetic Execution Traces
|
| 456 |
+
|
| 457 |
+
Fig. 10 compares the execution traces of CRL on different language pairs from training of (a,b) length 5 and of (c) length 10. We observe that in many cases the controller chooses to take an additional step to translate the fully reduced answer into an answer in the target language, which shows that it composes together in a novel way knowledge of how to solve a arithmetic problem with knowledge of how to translate between languages.
|
| 458 |
+
|
| 459 |
+
# D.5 EXECUTION TRACES: EXAMPLES
|
| 460 |
+
|
| 461 |
+
Here are two randomly selected execution traces from the numerical arithmetic extrapolation task (train on 10 terms, extrapolate to 20 terms), where CRL’s accuracy hovers around $80 \%$ . These expressions are derived from the internal representations of CRL, which are softmax distributions over the vocabulary (except for the first expression, which is one-hot because it is the input). The expressions here show the maximum value for each internal representation.
|
| 462 |
+
|
| 463 |
+
This is a successful execution. The input is $6 \star 1 \star 3 - 4 + 6 \star 0 \star 0 + 1 - 7 - 3 + 3 + 3 \star 4 + 1 + 1 + 3 + 3 + 6 + 2 + 7$ and the correct answer is 3. Notice that the order in which controller applies its modules does not strictly follow the order of operations but respects the rules of order of operations: for example, it may decide to perform addition (A) before multiplication (B) if it doesn’t affect the final answer.
|
| 464 |
+
|
| 465 |
+
$6 \star 1 \star 3 - 4 + 6 \star 0 \star 0 + 1 - 7 - 3 + 3 + 3 \star 4 + 1 + 1 + 3 + 3 + 6 + 2 + 7$
|
| 466 |
+
$6 \star 1 \star 3 - 4 + 6 \star 0 \star 0 + 1 - 7 - 3 + 3 + 2 + 1 + 1 + 3 + 3 + 6 + 2 + 7$
|
| 467 |
+
6\*1\*3-4+6\*0\*0+1-7-3+5+1+1+3+3+6+2+7
|
| 468 |
+
6\*1\*3-4+6\*0\*0+4-3+5+1+1+3+3+6+2+7
|
| 469 |
+
6\*1\*3-4+6\*0+4-3+5+1+1+3+3+6+2+7
|
| 470 |
+
6\*1\*3-4+6\*0+1+5+1+1+3+3+6+2+7
|
| 471 |
+
6 1 3-4+6 0+1+5+1+4+3+6+2+7
|
| 472 |
+
6 1 3-4+6 0+1+6+4+3+6+2+7
|
| 473 |
+
6\*1\*3-4+6\*0+7+4+3+6+2+7
|
| 474 |
+
6\*1\*3-4+6\*0+7+4+3+6+9
|
| 475 |
+
6 1 3-4+6 0+7+4+9+9
|
| 476 |
+
6 1 3-4+0+7+4+9+9
|
| 477 |
+
6\*1\*3-4+0+7+4+9+9
|
| 478 |
+
6 1 3-4+0+7+4+8
|
| 479 |
+
6\*3-4+0+7+4+8
|
| 480 |
+
6 3-4+7+4+8
|
| 481 |
+
8-4+7+4+8
|
| 482 |
+
4+7+4+8
|
| 483 |
+
1+4+8
|
| 484 |
+
5+8
|
| 485 |
+
3
|
| 486 |
+
END
|
| 487 |
+
|
| 488 |
+
$\begin{array} { r l } { \frac { 1 } { 4 } } & { 3 \times \ 4 \ = \ 2 } \\ { \frac { 1 } { 4 } } & { 3 + \ 2 \ = \ 5 } \\ { \frac { 1 } { 4 } } & { 1 \ - \ 7 \ = \ 4 } \\ { \frac { 1 } { 4 } } & { 0 \ \times \ 0 \ = \ 0 } \\ { \frac { 1 } { 4 } } & { 4 \ - \ 3 \ = \ 1 } \\ { \frac { 1 } { 4 } } & { 1 \ + \ 3 \ = \ 4 } \\ { \frac { 1 } { 4 } } & { 5 \ + \ 1 \ = \ 6 } \\ { \frac { 1 } { 4 } } & { 1 \ + \ 6 \ = \ 7 } \\ { \frac { 1 } { 4 } } & { 2 \ + \ 7 \ = \ 9 } \\ { \frac { 1 } { 4 } } & { 3 \ + \ 6 \ = \ 9 } \\ { \frac { 1 } { 4 } } & { 6 \ \star \ 0 \ = \ 0 } \end{array}$ HALT
|
| 489 |
+
|
| 490 |
+
This is an unsuccessful execution trace.
|
| 491 |
+
|
| 492 |
+
The input is $5 + 6 - 4 + 5 \star 7 \star 3 \star 3 \star 8 \star 0 \star 1 - 4 + 6 - 3 \star 5 \star 3 + 6 - 0 + 0 - 4 - 6$ and the correct answer is 0. Notice that it tends to follow of order of operations by doing multiplication first, although it does make mistakes (D), which in this case was the reason for its incorrect answer. Note that CRL never receives explicit feedback about its mistakes on what its modules learn to do or the order in which it applies them; it only receives a sparse reward signal at the very end. Although (C) was a calculation mistake, it turns out that it does not matter because the subexpression would be multiplied by 0 anyways.
|
| 493 |
+
|
| 494 |
+
$5 + 6 - 4 + 5 \star 7 \star 3 \star 3 \star 8 \star 0 \star 1 - 4 + 6 - 3 \star 5 \star 3 + 6 - 0 + 0 - 4 - 6$
|
| 495 |
+
5+6-4+5\*7\*3\*4\*0\*1-4+6-3\*5\*3+6-0+0-4-6
|
| 496 |
+
5+6-4+5\*7\*3\*4\*0\*1-4+6-3\*5\*3+6-0+6-6
|
| 497 |
+
5+6-4+5\*3\*4\*0\*1-4+6-3\*5\*3+6-0+6-6
|
| 498 |
+
5+6-4+5 4 0 1-4+6-3 5 3+6-0+6-6
|
| 499 |
+
5+6-4+5\*4\*0\*1-4+6-3\*5\*3+6-0+6-6
|
| 500 |
+
5+6-4+0\*0\*1-4+6-3\*5\*3+6-0+6-6
|
| 501 |
+
5+6-4+0\*0\*1-4+6-3\*5\*3+6-0+0
|
| 502 |
+
5+6-4+0\*0\*1-4+3\*5\*3+6-0+0
|
| 503 |
+
5+6-4+0\*0\*1-4+3\*5\*3+6-0+0
|
| 504 |
+
5+6-4+0 0 1-4+3 5 3+6-0+0
|
| 505 |
+
5+6-4+0 0 1-4+3 5 3+6+0
|
| 506 |
+
5+6-4+0\*0\*1-4+5\*3+6+0
|
| 507 |
+
5+6-4+0\*1-4+5\*3+6+0
|
| 508 |
+
5+6-4+0\*1-4+5+6+0
|
| 509 |
+
5+6-4+0-4+5+6+0
|
| 510 |
+
5+6-4+0-4+5+6+0
|
| 511 |
+
5+6-4+0-4+5+6+0
|
| 512 |
+
5+6-4+0-4+5+6+0
|
| 513 |
+
5+6-4+0-4+5+6+0
|
| 514 |
+
5+6-4+0-4+5+6+0
|
| 515 |
+
5+6-4+0-4+5+6+0
|
| 516 |
+
5+6-4+0-4+5+6+0
|
| 517 |
+
5+6-4+0-4+5+6
|
| 518 |
+
5+6-4+0-4+1
|
| 519 |
+
5+6-4+6+1
|
| 520 |
+
1-4+6+1
|
| 521 |
+
7+6+1
|
| 522 |
+
3+1
|
| 523 |
+
4
|
| 524 |
+
END
|
| 525 |
+
|
| 526 |
+
# 3 \* 8 = 4
|
| 527 |
+
$\sharp { \begin{array} { l } { 0 } \end{array} } - { \begin{array} { r } { \mathrm { ~ ~ { ~ \nabla ~ } ~ } } \rVert } \ = { \begin{array} { l } { 6 } \end{array} } \end{array}$
|
| 528 |
+
# 5 \* 7 = 5
|
| 529 |
+
$\sharp \ = \ 3 \star \ 4 \ = \ 4$ (mistake)
|
| 530 |
+
# tried to HALT
|
| 531 |
+
$\sharp \{ \begin{array} { l } { { 5 } } \\ { { } } \end{array} \star \begin{array} { l } { { \mathrm { ~ ~ { ~ \cal ~ 4 ~ } ~ } = \ 0 } } \end{array}$ $\sharp \mathrm { ~ \bf ~ 6 ~ } - \mathrm { ~ \bf ~ 6 ~ } = 0$
|
| 532 |
+
$\sharp \{ \begin{array} { c } { { 6 } } \end{array} - \begin{array} { c } { { 3 } } \end{array} = \begin{array} { c } { { 3 } } \end{array}$
|
| 533 |
+
# tried to HALT
|
| 534 |
+
# tried to HALT
|
| 535 |
+
# tried to HALT
|
| 536 |
+
$\# \ : \ : 3 \ : \ : \star \ : 5 \ : = \ : 5$
|
| 537 |
+
$\# \times \hbar = 0$
|
| 538 |
+
$\# \quad 5 \quad \star \quad 3 \ = \ 5$ $\div 0 \star 1 = 0$
|
| 539 |
+
# tried to HALT
|
| 540 |
+
# tried to HALT
|
| 541 |
+
# tried to HALT
|
| 542 |
+
# tried to HALT
|
| 543 |
+
# tried to HALT
|
| 544 |
+
# tried to HALT
|
| 545 |
+
# tried to HALT
|
| 546 |
+
# $6 + 0 = 0$
|
| 547 |
+
$\# \ : \ : 5 \ : \ : + \ : \ : 6 \ : = \ : 1$
|
| 548 |
+
$\sharp { \begin{array} { l } { 0 } \end{array} } - { \begin{array} { r } { \mathrm { ~ ~ { ~ \nabla ~ } ~ } } \rVert } \ = { \begin{array} { l } { 6 } \end{array} } \end{array}$
|
| 549 |
+
$\# \ : \ : 5 \ : \ : + \ : \ : 6 \ : = \ : 1$
|
| 550 |
+
$\# \mathrm { ~ \bf ~ 1 ~ } - \mathrm { ~ \bf ~ 4 ~ } = \mathrm { ~ \bf ~ 7 ~ }$
|
| 551 |
+
$\# \mathrm { ~ 7 ~ } + \mathrm { ~ 6 ~ } = \mathrm { ~ 3 ~ }$
|
| 552 |
+
$\# \ : \ : 3 \ : \ : + \ : \ : 1 \ : = \ : \ : 4$
|
| 553 |
+
# HALT
|
| 554 |
+
|
| 555 |
+
(D: order of operations mistake)
|
parse/train/B1ffQnRcKX/B1ffQnRcKX_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/B1ffQnRcKX/B1ffQnRcKX_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/B1ffQnRcKX/B1ffQnRcKX_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/H1e5GJBtDr/H1e5GJBtDr.md
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# AXIAL ATTENTION IN MULTIDIMENSIONAL TRANSFORMERS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
We propose Axial Transformers, a self-attention-based autoregressive model for images and other data organized as high dimensional tensors. Existing autoregressive models either suffer from excessively large computational resource requirements for high dimensional data, or make compromises in terms of distribution expressiveness or ease of implementation in order to decrease resource requirements. Our architecture, by contrast, maintains both full expressiveness over joint distributions over data and ease of implementation with standard deep learning frameworks, while requiring reasonable memory and computation and achieving state-of-the-art results on standard generative modeling benchmarks. Our models are based on axial attention, a simple generalization of self-attention that naturally aligns with the multiple dimensions of the tensors in both the encoding and the decoding settings. Notably the proposed structure of the layers allows for the vast majority of the context to be computed in parallel during decoding without introducing any independence assumptions. This semi-parallel structure goes a long way to making decoding from even a very large Axial Transformer broadly applicable. We demonstrate state-of-the-art results for the Axial Transformer on the ImageNet-32 and ImageNet-64 image benchmarks as well as on the BAIR Robotic Pushing video benchmark. We open source the implementation of Axial Transformers.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Autoregressive models are a family of exact likelihood-based generative models that represent the joint distribution of data ${ \boldsymbol x } = ( x _ { 1 } , \dots , x _ { N } )$ as a product of conditionals $\begin{array} { r } { p _ { \theta } ( x ) = \prod _ { i = 1 } ^ { N } \bar { p _ { \theta } } ( x _ { i } | x _ { < i } ) } \end{array}$ . Neural network models in this family have achieved state-of-the-art log likelihoods on highdimensional image and video datasets (van den Oord et al., 2016a; Chen et al., 2018; Menick & Kalchbrenner, 2018; Parmar et al., 2018; Child et al., 2019; Weissenborn et al., 2019; Salimans et al., 2017; Kalchbrenner et al., 2017; Uria et al., 2016; Parikh et al., 2016; Theis & Bethge, 2015; van den Oord et al., 2016b) due to architectural innovations that enable the following capabilities:
|
| 12 |
+
|
| 13 |
+
1. Large, high information bandwidth receptive fields for each pixel $x _ { i }$ , capable of expressing long-range dependencies over previous pixels $x _ { < i }$ , and 2. Computationally efficient, vectorizable computation of the log likelihood and its gradient.
|
| 14 |
+
|
| 15 |
+
Autoregressive model architectures that can read long-range dependencies over large receptive fields are able to express all joint distributions over the data. Meanwhile, architectures that admit fast log likelihood gradient computation are suitable for training using a stochastic gradient method on a maximum likelihood objective—a straightforward, stable training procedure for generative models.
|
| 16 |
+
|
| 17 |
+
These desiderata make self-attention a compelling building block for autoregressive model architectures. Self-attention is a neural network operation that is able to transform a sequence $y _ { 1 } , \ldots , y _ { N }$ into a sequence $y _ { 1 } ^ { \prime } , \ldots , y _ { N } ^ { \prime }$ , where each $y _ { i } ^ { \prime }$ depends on all $y _ { i }$ by way of a single vectorizable computation (Vaswani et al., 2017). Self-attention is remarkably effective at learning long-range dependencies between data dimensions and neural networks that incorporate self-attention in their designs are state-of-the-art on many tasks from language modelling and machine translation to image and video modelling (Parmar et al., 2018; Child et al., 2019).
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: The Axial Transformer model for 2-dimensional tensors. Before sampling a channel we encode all previous channels and frames with 8 blocks of unmasked row and unmasked column attention (left). Then, for each row, we apply 4 blocks of unmasked row and masked column attention to integrate the previously sampled rows for the active channels into our encoded representation (middle). Finally, we shift the encoded representation up to make sure the conditioning information satisfies causality, and we run the inner decoder consisting of 4 blocks of masked row attention to sample a new row in the image (right).
|
| 21 |
+
|
| 22 |
+
But the power of self-attention comes at the price of computational complexity. The memory and computation it consumes grow quadratically with the sequence length $N$ making it prohibitively expensive to directly apply self-attention to long sequences. In the case of autoregressive models of multidimensional tensors such as images or videos, the aim to capture large receptive fields in multiple dimensions further exacerbates the problem as even a modest number of receptive field steps in each dimension can encompass a large total number of locations. Various approaches have been proposed to alleviate this difficulty at the cost of either limiting the receptive field or requiring operations that may not be broadly available on GPUs or TPUs.
|
| 23 |
+
|
| 24 |
+
We propose the Axial Transformer, a simple yet effective self-attention-based autoregressive model for data organized as multidimensional tensors. Rather than applying attention to a flattened string of tensor elements, our model instead applies attention along a single axis of the tensor without flattening—we refer to this as “axial attention.” Since the length of any single axis (that is, the height or width of an image) is typically much smaller than the total number of elements, an axial attention operation enjoys a significant saving in computation and memory over standard self-attention: for a $d$ -dimensional tensor with shape $\bar { N } = N ^ { 1 / d } \times \dots \times N ^ { 1 / d }$ , axial attention saves a $O ( N ^ { ( d - 1 ) / d } )$ factor of resources over standard self-attention.
|
| 25 |
+
|
| 26 |
+
Our Axial Transformer architecture allows for the majority of the context $x _ { < i }$ to be embedded with a high degree of parallelism without introducing conditional independence assumptions among any of the locations, but has an interesting property that it is amenable to a simple-to-implement fast sampling procedure. To sample one row of an image, the Axial Transformer only runs an autoregressive Transformer over that one row only, without re-embedding pixels from previous rows. We structure the Axial Transformer, however, so that it always defines a fully expressive joint distribution. No dependencies on previous pixels are ever lost.
|
| 27 |
+
|
| 28 |
+
We evaluate Axial Transformers on image and video modelling benchmarks. We show that Axial Transformer achieves state-of-the-art results on ImageNet-32 and on ImageNet-64. We also show that, simply by stacking a video along the channel dimension, the Axial Transformer can be directly applied to the channel-stacked video without nearly any modification. On the BAIR Robot Pushing benchmark, the Axial Transformer significantly outperforms previous results without using an architecture specially designed for videos. The generated samples on these datasets are of the expected high quality.
|
| 29 |
+
|
| 30 |
+
Axial Transformers do not require subroutines for GPUs or TPUs that may exhibit unfavorable memory bandwidth and computation trade-offs. Axial Transformers are simple to implement using efficient operations that are widely available in deep learning frameworks (primarily dense-dense MatMuls). An open source implementation of our models is available at anonymized URL.
|
| 31 |
+
|
| 32 |
+

|
| 33 |
+
Figure 2: Types of axial attention layers that are the building blocks of the Axial Transformer. The blue locations correspond to the receptive field of the output red location.
|
| 34 |
+
|
| 35 |
+
# 2 BACKGROUND
|
| 36 |
+
|
| 37 |
+
To set the stage for our discussion, we first review self-attention and its computational resource requirements in the context of autoregressive modeling. A self-attention layer takes as input a length $N$ sequence of $D$ -dimensional embeddings $X$ (a $N \times D$ matrix) and produces an output sequence $Y$ (also a $N \times D$ matrix) via:
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\begin{array} { r l } & { Q = X W _ { Q } , \quad K = X W _ { K } , \quad V = X W _ { V } } \\ & { A = \operatorname { s o f t m a x } \left( Q K ^ { \top } / \sqrt { D } \right) , \quad Y = A V } \end{array}
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
$W _ { Q }$ , $W _ { K }$ , and $W _ { V }$ are $D \times D$ parameter matrices responsible for projecting the entries of the sequence $X$ into keys, queries, and values, respectively. Each entry of the output sequence $Y$ is a linear combination of values in $V$ weighted by the attention matrix $A$ , which itself is computed from similarities between all pairs of query and key vectors. Both the expressive power and the resource cost of self-attention come from computing $A$ and $Y$ : it takes $O ( N ^ { 2 } )$ time and space to compute the pairwise similarities between $Q$ and $K$ and to compute the linear combination of $V$ vectors.
|
| 44 |
+
|
| 45 |
+
This quadratic complexity makes it impractical to apply self-attention to images and videos directly as flattened vectors: a small $3 2 \times 3 2 \times 3$ image has 3072 dimensions. Sequences such as these are too long for self-attention, so attempts to scale self-attention to these modalities generally involve restricting these sequence lengths in a modality-aware manner while attempting to preserve modeling performance.
|
| 46 |
+
|
| 47 |
+
One strategy is to restrict the conditioning context $x _ { < i }$ to a carefully designed small subset of the data dimensions. While this reduces the cost of attention, which is only performed over these small subsets instead of the full data, the model can no longer express all joint distributions over the data. Parmar et al. (2018) propose image models with conditioning context $x _ { < i }$ restricted to a small window of the full image, but the implementation requires redundant data copies to extract and process these windows. Weissenborn et al. (2019) similarly scale video autoregressive models by restricting the context, again preventing their model from expressing all joint distributions over pixels. Our models do not restrict context and hence we obtain better log likelihoods, as we will see in section 4.
|
| 48 |
+
|
| 49 |
+
A different strategy is to stack multiple sparse attention layers, each with restricted context for computational efficiency, but in a manner that overlapping these layers yields a full-context model. Child et al. (2019) propose two sparse attention patterns with this property. However, the architecture they propose that works best for images (the Strided Sparse Transformer) requires custom sparse attention GPU kernels to implement a specific block-sparse variant of matrix-matrix-multiply. The model cannot be easily implemented on other hardware such as TPUs.
|
| 50 |
+
|
| 51 |
+
See table 1 for a summary of these architecture design tradeoffs. Our goal in this paper is to design attention-based autoregressive models that attain the best of all worlds. Our Axial Transformer, described in subsequent sections, has a full conditioning context, so its ability to express joint distributions is never limited. The Axial Transformer also does not require any redundant data copies or custom kernels to implement in an efficient way. Indeed, we designed, and will make open source, an efficient implementation that uses only standard operations in deep learning libraries.
|
| 52 |
+
|
| 53 |
+
Table 1: Trade-offs of recently proposed multidimensional Transformer architectures.
|
| 54 |
+
|
| 55 |
+
<table><tr><td>Model</td><td>Full receptive field</td><td>Attention faster than O(N²)</td><td>Needs no custom kernels</td><td>Semi-parallel context aggregation</td></tr><tr><td>Transformer (Vaswani et al.,2017)</td><td></td><td></td><td></td><td></td></tr><tr><td>Image Transformer (Parmar et al.,2018)</td><td>yes no</td><td>no</td><td>yes</td><td>no</td></tr><tr><td>Block Transformer (Weissenborn et al.,2019)</td><td>no</td><td>yes yes</td><td>yes yes</td><td>no no</td></tr><tr><td>Strided Sparse Transformer (Child et al., 2019)</td><td>yes</td><td>yes</td><td>no</td><td>no</td></tr><tr><td>Axial Transformer (ours)</td><td>yes</td><td>yes</td><td>yes</td><td>yes</td></tr></table>
|
| 56 |
+
|
| 57 |
+
# 3 AXIAL TRANSFORMERS
|
| 58 |
+
|
| 59 |
+
We now describe Axial Transformers, our self-attention-based autoregressive models for highdimensional data tensors. We describe its basic building block in section 3.1 and then we complete the description into a full autoregressive model in section 3.2.
|
| 60 |
+
|
| 61 |
+
# 3.1 AXIAL ATTENTION
|
| 62 |
+
|
| 63 |
+
We first introduce our basic building block for developing self-attention-based autoregressive models for high-dimensional data tensors. The proposed approach does not change the original shape of the multidimensional data tensor and performs a masked or unmasked attention over a single axis of the tensor at a time. We call this operation axial attention, denoted by Attention $\mathbf { \Psi } _ { k } ( x )$ . It performs attention over axis $k$ of the tensor $x$ , mixing information along axis $k$ while keeping information along other axes independent. It is straightforward to implement: axial attention over axis $k$ can be implemented by transposing all axes except $k$ to the batch axis, calling standard attention as a subroutine, then undoing the transpose (an alternative is to use the einsum operation available in most deep learning libraries).
|
| 64 |
+
|
| 65 |
+
When the data is an image, we call Attention $^ { - 1 }$ column attention, as it mixes information within columns while keeping separate columns independent. We call Attention2 row attention for analogous reasons. Axial attention on a square image of size $N = S \times S$ performs attention on $S$ sequences of length $S .$ —this is a total of $O ( S \cdot S ^ { 2 } ) = O ( N { \sqrt { N } } )$ computation—an $O ( { \sqrt { N } } )$ savings in computation over standard self-attention. In general, for a $d$ -dimensional tensor with $N = \check { S ^ { d } }$ , axial attention saves $O ( N ^ { ( d - 1 ) / d } )$ computation over standard attention. Of course, a single layer of axial attention along some axis $k$ does not have the full receptive field since it covers a single axis, but we will see in section 3.2 that stacking two axial attention layers allows the model to obtain a global receptive field.
|
| 66 |
+
|
| 67 |
+
It will be important for us to also define MaskedAttention $k$ to be the causally masked variant of Attentionk: component $i$ of the result of MaskedAttention $_ k ( x )$ along axis $k$ depends on only components $1 , \ldots , i$ of $x$ along axis $k$ . The receptive fields of these attention patterns, both unmasked and masked, are illustrated in fig. 2. We will use these masked blocks to build our autoregressive model in section 3.2.
|
| 68 |
+
|
| 69 |
+
Axial attention can be used within standard Transformer layers in a straightforward manner to produce Axial Transformer layers. The basic building blocks are the same as those found in the standard Transformer architecture:
|
| 70 |
+
|
| 71 |
+
• LayerNorm $( x )$ : layer normalization (Ba et al., 2016), and • Dense $_ D ( x )$ : a dense layer operating over the last axis of the input $x$ . The letter $D$ denotes the dimension of the output activations. If the input has shape $H \times W \times C$ , then this operation is identical to a $1 \times 1$ convolution, and the output has shape $H \times W \times D$ .
|
| 72 |
+
|
| 73 |
+
We use these to define ResNet axial attention blocks operating on tensors of $D$ -dimensional embeddings (Vaswani et al., 2017; Child et al., 2019):
|
| 74 |
+
|
| 75 |
+
• FeedforwardBlock $\mathbf { \boldsymbol { { \cdot } } } ( \mathbf { \boldsymbol { { x } } } ) = \mathbf { \boldsymbol { { x } } } + \mathbf { D e n s e } _ { D }$ (Nonlinearity(DenseD0 (LayerNorm(x)))) • AttentionBlockk(x) = x + DenseD(Attention $k$ (LayerNorm(x))) • TransformerBloc $\operatorname { k } _ { k } ( x ) =$ FeedforwardBlock(AttentionBlockk(x))
|
| 76 |
+
|
| 77 |
+
$D ^ { \prime }$ is chosen to be some constant factor larger than $D$ , from 1 to 4 (Vaswani et al., 2017). We also define a MaskedTransformer $\mathbf { B l o c k } _ { k }$ using MaskedAttention $k$ in place of Attention $k$ .
|
| 78 |
+
|
| 79 |
+
Operations similar to unmasked axial attention have been proposed in other contexts in computer vision (Huang et al., 2019). Our focus in forthcoming sections is the use of masked axial attention and its utility in autoregressive image modeling, which is not explored in these works.
|
| 80 |
+
|
| 81 |
+
# 3.2 AXIAL TRANSFORMERS
|
| 82 |
+
|
| 83 |
+
We now describe Axial Transformers, our axial attention-based autoregressive models for images and videos. We will use the axial attention operations described in section 3.1 as building blocks in a multi-layer autoregressive model of the form $\begin{array} { r } { p _ { \theta } ( x ) = \prod _ { i = 1 } ^ { N } p _ { \theta } ( x _ { i } \mid x _ { < i } ) } \end{array}$ following the raster scan ordering of pixels. We will accomplish this by building an autoregressive model over rows (section 3.2.1), then conditioning each row on previous rows (section 3.2.1), then further conditioning on previous channels and frames (section 3.2.2). Decomposing the model in this manner also leads to a simple fast and partly parallel sampling procedure (section 3.2.1).
|
| 84 |
+
|
| 85 |
+
# 3.2.1 A MODEL FOR SINGLE-CHANNEL IMAGES
|
| 86 |
+
|
| 87 |
+
We begin with an autoregressive model for a single-channel image $x$ with shape $H \times W$ , with each pixel taking an integer value in $[ 0 , 2 5 5 ]$ representing its intensity. As is standard practice with Transformers, pixel intensities are first embedded into a $H \times W \times D$ tensor of $D$ -dimensional embeddings, which we call $h$ . The architecture’s responsibility is to transform $h$ into a $H \times W \times 2 5 6$ tensor of logits suitable for classification or sampling. These logits must depend only on previous pixels in the input $x$ along the raster scan ordering to ensure that the architecture defines a valid autoregressive model.
|
| 88 |
+
|
| 89 |
+
Inner Decoder: a row-wise model Our idea is to begin with masked row attention layers to create a “row-wise” model:
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
\begin{array} { r l } & { h \gets \mathrm { E m b e d } ( x ) } \\ & { h \gets \mathrm { S h i f t R i g h t } ( h ) + \mathrm { P o s i t i o n E m b e d d i n g s } } \\ & { h \gets \mathrm { M a s k e d T r a n s f o r m e r B l o c k } _ { 2 } ( h ) } \end{array}
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
Here, $L _ { \mathrm { r o w } }$ is the number of masked row attention blocks applied to $h$ . PositionEmbeddings is a $H \times$ $W \times D$ tensor of position embeddings that inform the attention layers of the position. For parameter efficiency we use “additively factorized” position embeddings, meaning that we parameterize them as a broadcasted sum of $H \times 1 \times D$ embeddings for rows and $1 \times W \times D$ embeddings for columns.
|
| 96 |
+
|
| 97 |
+
The operation ShiftRight shifts the input right by one pixel, which has the effect of shifting the receptive field left by one pixel. This ensures that the masked row attention layers exclude the current pixel from their receptive field, which is crucial for architecture to define a correct autoregressive model.
|
| 98 |
+
|
| 99 |
+
As this model employs row attention only, it enjoys the computational efficiency benefits described in section 3.1. However, it clearly does not define a full-context model because each location in the output does not depend on input pixels in previous rows. If we were to use the resulting $h$ as logits for pixel intensity prediction, we would obtain a set of $H$ independent autoregressive models $p ( x _ { i , j } | x _ { i , 1 } , \dots , x _ { i , j - 1 } )$ for each row $i \in [ 1 , H ]$ , not a single autoregressive model with full context. We address this issue next.
|
| 100 |
+
|
| 101 |
+
Outer Decoder: capturing the rows above Each pixel $x _ { i , j }$ in the aforementioned model already depends on previous pixels in its own row $x _ { i , < j }$ . We just need to make it depend on all previous rows $x _ { < i , }$ : too. So, we insert unmasked row and masked column layers in the beginning of the model as follows (newly inserted operations are underlined):
|
| 102 |
+
|
| 103 |
+

|
| 104 |
+
Figure 3: Arrangement of inputs to the encoding network of the Axial Transformer. Previously available or generated channels of an image or video are sequentially stacked in the input. A variable number of padding planes are used as placeholders for future generated channels. A final integer plane signals to the Axial Transformer the channel that is being generated at that step.
|
| 105 |
+
|
| 106 |
+
The tensor $u$ represents context captured above the current pixel. It is computed by unmasked row and masked column attention layers, repeated to a total of $L _ { \mathrm { u p p e r } }$ layers to increase model capacity, which make $u$ cover the receptive field at all rows above and including the current pixel. The ShiftDown operation shifts $u$ down one pixel, which shifts its receptive field up one pixel. Thus we have a context which captures all pixels above while excluding the current row, which we add to $h$ as input to the masked row layers. We have thus converted the row-wise model into a fully expressive autoregressive model that captures not only pixels in the current row but also those above.
|
| 107 |
+
|
| 108 |
+
Following standard practice, we pass the final $h$ through layer normalization and a final dense layer to produce logits with shape $H \times W \times 2 5 6$ . The logits at each location depend on all previous pixel locations in the raster scan ordering.
|
| 109 |
+
|
| 110 |
+
Semi-Parallel Sampling Naive implementations of sampling from sequential models are notoriously slow because they require re-evaluating the entire network to sample each location. In the case of our model for a $\dot { \sqrt { N } } \times \sqrt { N }$ square image, each network evaluation takes $O ( N \sqrt { N } ( L _ { \mathrm { u p p e r } } +$ $L _ { \mathrm { r o w } } )$ ) time, so sampling the whole image would take $O ( N ^ { 2 } \sqrt { N } ( L _ { \mathrm { u p p e r } } + L _ { \mathrm { r o w } } ) )$ ), which is far too large.
|
| 111 |
+
|
| 112 |
+
Fortunately, our architecture is amenable to a particularly simple implementation of a faster sampling that is able to compute large sections of the model in parallel (see Figure 1). Pseudocode is as follows:
|
| 113 |
+
|
| 114 |
+
1. For each row $i \in [ 1 , H ]$ :
|
| 115 |
+
|
| 116 |
+
(a) Compute the upper context $u$ including information about all $x _ { < i , * }$ using the upper layers
|
| 117 |
+
(b) For each column $j \in [ 1 , W ]$ : i. Sample $x _ { i , j }$ conditioned on $u$ and prior elements of row i $( x _ { i , < j } )$ .
|
| 118 |
+
|
| 119 |
+
Because the $L _ { \mathrm { r o w } }$ row-wise layers are independent over rows (they depend on other rows only through the upper context, as explained in section 3.2.1), sampling one row can be accomplished by evaluating the row-wise layers for that one row only, completely ignoring other rows. Thus,√ in one row of $\sqrt { N }$ pixels, each pixel can be sampled in √ $O ( N L _ { \mathrm { r o w } } )$ , so all pixels can be sampled in $O ( N ^ { 2 } L _ { \mathrm { r o w } } )$ . Before each of the √ $\sqrt { N }$ rows can be sampled, the upper context must be computed in $O ( N \sqrt { N } L _ { \mathrm { u p p e r } } )$ , for a total of $O ( N ^ { 2 } L _ { \mathrm { u p p e r } } )$ over the course of all rows. Thus we arrive at $O ( N ^ { 2 } ( L _ { \mathrm { u p p e r } } { + } L _ { \mathrm { r o w } } ) )$ in total, which is $\sqrt { N }$ faster than the naive implementation. To our knowledge, sampling speedups of this type are not possible with contemporary work on scaling Transformers to images and videos (Child et al., 2019; Weissenborn et al., 2019).
|
| 120 |
+
|
| 121 |
+
# 3.2.2 CHANNEL ENCODER FOR MULTI-CHANNEL IMAGES AND VIDEOS
|
| 122 |
+
|
| 123 |
+
We have just described an architecture for a single-channel image of shape $H \times W$ . Here, we show how to extend the architecture to multi-channel images or videos of shape $H \times W \times C$ (here $C$ is either the number of channels in a multi-channel image, or the product of the number of channels and timesteps in a video). One way to model such data of shape $H \times W \times C$ is to simply stack the channels on top of each other into a single-channel image of shape $( H \cdot C ) \times W$ or $H \times ( W \cdot C )$ . This is simple to implement, but does increase the sequence length for column attention or row attention, which can be undesirable for large $C$ . We instead opt to model one channel at a time as a singlechannel image, but now conditioned on previous channels using an extra set of unmasked row and unmasked column attention layers. This means that we have a model of the form $p ( x _ { : , : , c } | x _ { : , : , < c } )$ , where previous channels $x _ { : , : , < c }$ are processed into a $H \times W \times D$ tensor of context information, which is then added into the first encoding blocks of the model in section 3.2.1 (Figure 3).
|
| 124 |
+
|
| 125 |
+
Table 2: Unconditional and class-conditional image modeling results (bits/dim)
|
| 126 |
+
|
| 127 |
+
<table><tr><td>Model</td><td>ImageNet 32x32</td><td>ImageNet 64x64</td></tr><tr><td>Multiscale PixelCNN (Reed et al., 2017)</td><td>3.95</td><td>3.70</td></tr><tr><td>PixelCNN/RNN (van den Oord et al., 2016a)</td><td>3.86</td><td>3.63</td></tr><tr><td>Gated PixelCNN (van den Oord et al.,2016b)</td><td>3.83</td><td>3.57</td></tr><tr><td>PixelSNAIL (Chen et al., 2018)</td><td></td><td>3.52</td></tr><tr><td>SPN (Menick&Kalchbrenner,2018)</td><td>3.80 3.79</td><td>3.52</td></tr><tr><td>Image Transformer (Parmar et al., 2018)</td><td></td><td></td></tr><tr><td>Strided Sparse Transformer (Child et al.,2019)</td><td>3.77</td><td>1 3.44</td></tr><tr><td></td><td>1</td><td></td></tr><tr><td>Axial Transformer+LSTMinnerdecoder</td><td>3.77</td><td>3.46</td></tr><tr><td>Axial Transformer</td><td>3.76 (3.758)</td><td>3.44 (3.439)</td></tr></table>
|
| 128 |
+
|
| 129 |
+
Table 3: Video modeling results (bits/dim) on the BAIR Robotic Pushing dataset (Ebert et al., 2017). We condition on a single video frame and model the next 15 frames, similar to Weissenborn et al. (2019). Kumar et al. (2019) instead condition on the 3 prior frames of the video.
|
| 130 |
+
|
| 131 |
+
<table><tr><td>Model</td><td>bits/dim next 15 frames</td></tr><tr><td>VideoFlow (Kumar etal.,2019)</td><td>1.87</td></tr><tr><td>Video Transformer(Weissenborn etal.,2019)</td><td>1.35</td></tr><tr><td>Axial Transformer (ours)</td><td>1.29</td></tr><tr><td></td><td></td></tr></table>
|
| 132 |
+
|
| 133 |
+
We do not share any parameters among any of these layers. At training time, we train on a random channel slice of each image: we process the previous slices using these unmasked attention layers to produce a context tensor, and maximize the likelihood of the randomly chosen slice conditioned on this context. This amounts to training on an unbiased estimate of log likelihood for the whole data tensor. See fig. 1 for an illustration of this complete model.
|
| 134 |
+
|
| 135 |
+
# 4 EXPERIMENTS
|
| 136 |
+
|
| 137 |
+
We benchmarked our models on standard datasets for generative image and video models: downsampled ImageNet (van den Oord et al., 2016a) and BAIR Robot Pushing (Ebert et al., 2017). All Axial Transformers have 8 total layers in the encoder, 8 layers in the outer decoder and 4 layers in the inner decoder. We use a hidden size of 2048 neurons throughout and for all setups and 16 heads with 128 neurons each for the attention component. We train for approximately 200k steps on ImageNet32 and ImageNet64 and for 200k steps on BAIR Robot Pushing. Our models can overfit on ImageNet32, but on the other datasets the models keep on gradually improving with more steps. See table 2 and table 3 for our results.
|
| 138 |
+
|
| 139 |
+
# 4.1 ABLATION STUDY
|
| 140 |
+
|
| 141 |
+
To push the limits of the semi-parallel sampling by making the inner decoder as small as possible, we train an Axial Transformer with the inner decoder replaced by a single LSTM layer of 2048 units. This slows down training time by about $20 \%$ on ImageNet32 and about $80 \%$ on ImageNet64 when maintaining the number of steps and all else fixed. We find that the Axial Transformer $+ \mathrm { L S T M }$ inner decoder performs rather well on the ImageNet32 and ImageNet64 benchmarks (table 2), thereby also showing the effectiveness of the remaining parts of the Axial Transformer that capture the context of the rows above. We also find however that the full four layers of the inner decoder of the Axial
|
| 142 |
+
|
| 143 |
+
Transformer provide an additional boost in performance as well as significantly faster training. The Axial Transformer $+ \mathrm { L S T M }$ inner decoder has the advantage of requiring only a couple of matrixvector products to compute the layers at each autogressive step, comparing favourably with about the 12 matrix-vector products required by the Axial Transformer, but the slower training time would make the LSTM inner decoder quickly impractical for larger tensors.
|
| 144 |
+
|
| 145 |
+
# 4.2 SAMPLES
|
| 146 |
+
|
| 147 |
+
In fig. 4 and fig. 5, we show samples from our $6 4 \times 6 4$ and $3 2 \times 3 2$ ImageNet models. The samples are globally coherent and show visibly recognizable scenes, meaning that our Axial Transformer architecture successfully captures long-range dependencies across thousands of data dimensions in these image datasets. The samples also don’t show any architecture-correlated artefacts. In addition, in fig. 6 we show samples from the BAIR Robotic Pushing dataset. The first frame is each row is given by the dataset and the rest are continuation. We note the high quality exactness of details and the very large diversity (at temperature 1.0).
|
| 148 |
+
|
| 149 |
+
# 5 CONCLUSION
|
| 150 |
+
|
| 151 |
+
We proposed the Axial Transformer, an self-attention-based autoregressive model for data organized as high dimensional tensors. It is based on axial attention, a simple generalization of self-attention that scales better with the dimension of input data, achieving a $O ( N ^ { ( d - 1 ) / d } )$ savings in computation and memory for a $d$ -dimensional input tensor with $N$ elements. Axial attention is easy to implement and does not require custom kernels to run efficiently on modern accelerators. Axial Transformers use axial self-attention layers and a shift operation to naturally and efficiently build full receptive fields of multidimensional tensors. Our model matches or outperforms the state-of-theart on ImageNet-32 and ImageNet-64 image benchmarks and sets a significant new state-of-the-art on the BAIR Robot Pushing video benchmark.
|
| 152 |
+
|
| 153 |
+

|
| 154 |
+
Figure 4: $6 4 \times 6 4$ ImageNet samples at temperature 1.0
|
| 155 |
+
|
| 156 |
+

|
| 157 |
+
Figure 5: $3 2 \times 3 2$ ImageNet samples at temperature 0.99
|
| 158 |
+
|
| 159 |
+

|
| 160 |
+
Figure 6: $1 5 \times 6 4 \times 6 4$ BAIR Robot Pushing samples at temperature 1.0
|
| 161 |
+
|
| 162 |
+
# REFERENCES
|
| 163 |
+
|
| 164 |
+
Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
|
| 165 |
+
|
| 166 |
+
Xi Chen, Nikhil Mishra, Mostafa Rohaninejad, and Pieter Abbeel. PixelSNAIL: An improved autoregressive generative model. In International Conference on Machine Learning, pp. 863–871, 2018.
|
| 167 |
+
|
| 168 |
+
Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. arXiv preprint arXiv:1904.10509, 2019.
|
| 169 |
+
|
| 170 |
+
Frederik Ebert, Chelsea Finn, Alex X Lee, and Sergey Levine. Self-supervised visual planning with temporal skip connections. In Conference on Robot Learning, pp. 344–356, 2017.
|
| 171 |
+
|
| 172 |
+
Zilong Huang, Xinggang Wang, Lichao Huang, Chang Huang, Yunchao Wei, and Wenyu Liu. Ccnet: Criss-cross attention for semantic segmentation. In Proceedings of the IEEE International Conference on Computer Vision, pp. 603–612, 2019.
|
| 173 |
+
|
| 174 |
+
Nal Kalchbrenner, Aaron Oord, Karen Simonyan, Ivo Danihelka, Oriol Vinyals, Alex Graves, and ¨ Koray Kavukcuoglu. Video pixel networks. In International Conference on Machine Learning, pp. 1771–1779, 2017.
|
| 175 |
+
|
| 176 |
+
Manoj Kumar, Mohammad Babaeizadeh, Dumitru Erhan, Chelsea Finn, Sergey Levine, Laurent Dinh, and Durk Kingma. Videoflow: A flow-based generative model for video. arXiv preprint arXiv:1903.01434, 2019.
|
| 177 |
+
|
| 178 |
+
Jacob Menick and Nal Kalchbrenner. Generating high fidelity images with subscale pixel networks and multidimensional upscaling. arXiv preprint arXiv:1812.01608, 2018.
|
| 179 |
+
|
| 180 |
+
Ankur P Parikh, Oscar Tackstr ¨ om, Dipanjan Das, and Jakob Uszkoreit. A decomposable attention¨ model for natural language inference. arXiv preprint arXiv:1606.01933, 2016.
|
| 181 |
+
|
| 182 |
+
Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Lukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. In International Conference on Machine Learning, pp. 4052– 4061, 2018.
|
| 183 |
+
|
| 184 |
+
Scott Reed, Aaron van den Oord, Nal Kalchbrenner, Sergio G ¨ omez Colmenarejo, Ziyu Wang, Yutian ´ Chen, Dan Belov, and Nando de Freitas. Parallel multiscale autoregressive density estimation. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 2912– 2921. JMLR. org, 2017.
|
| 185 |
+
|
| 186 |
+
Tim Salimans, Andrej Karpathy, Xi Chen, and Diederik P Kingma. PixelCNN $^ { + + }$ : Improving the PixelCNN with discretized logistic mixture likelihood and other modifications. In International Conference on Learning Representations (ICLR), 2017.
|
| 187 |
+
|
| 188 |
+
Lucas Theis and Matthias Bethge. Generative image modeling using spatial lstms. In Advances in Neural Information Processing Systems, pp. 1927–1935, 2015.
|
| 189 |
+
|
| 190 |
+
Benigno Uria, Marc-Alexandre Cotˆ e, Karol Gregor, Iain Murray, and Hugo Larochelle. Neural ´ autoregressive distribution estimation. The Journal of Machine Learning Research, 17(1):7184– 7220, 2016.
|
| 191 |
+
|
| 192 |
+
Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. International Conference on Machine Learning (ICML), 2016a.
|
| 193 |
+
|
| 194 |
+
Aaron van den Oord, Nal Kalchbrenner, Oriol Vinyals, Lasse Espeholt, Alex Graves, and Koray Kavukcuoglu. Conditional image generation with PixelCNN decoders. arXiv preprint arXiv:1606.05328, 2016b.
|
| 195 |
+
|
| 196 |
+
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.
|
| 197 |
+
|
| 198 |
+
Dirk Weissenborn, Oscar Tackstr ¨ om, and Jakob Uszkoreit. Scaling autoregressive video models.¨ arXiv preprint arXiv:1906.02634, 2019.
|
parse/train/H1e5GJBtDr/H1e5GJBtDr_content_list.json
ADDED
|
@@ -0,0 +1,1082 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "AXIAL ATTENTION IN MULTIDIMENSIONAL TRANSFORMERS ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
174,
|
| 8 |
+
101,
|
| 9 |
+
669,
|
| 10 |
+
146
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Anonymous authors Paper under double-blind review ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
183,
|
| 19 |
+
171,
|
| 20 |
+
398,
|
| 21 |
+
198
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "ABSTRACT ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
454,
|
| 31 |
+
234,
|
| 32 |
+
544,
|
| 33 |
+
251
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "We propose Axial Transformers, a self-attention-based autoregressive model for images and other data organized as high dimensional tensors. Existing autoregressive models either suffer from excessively large computational resource requirements for high dimensional data, or make compromises in terms of distribution expressiveness or ease of implementation in order to decrease resource requirements. Our architecture, by contrast, maintains both full expressiveness over joint distributions over data and ease of implementation with standard deep learning frameworks, while requiring reasonable memory and computation and achieving state-of-the-art results on standard generative modeling benchmarks. Our models are based on axial attention, a simple generalization of self-attention that naturally aligns with the multiple dimensions of the tensors in both the encoding and the decoding settings. Notably the proposed structure of the layers allows for the vast majority of the context to be computed in parallel during decoding without introducing any independence assumptions. This semi-parallel structure goes a long way to making decoding from even a very large Axial Transformer broadly applicable. We demonstrate state-of-the-art results for the Axial Transformer on the ImageNet-32 and ImageNet-64 image benchmarks as well as on the BAIR Robotic Pushing video benchmark. We open source the implementation of Axial Transformers. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
267,
|
| 43 |
+
764,
|
| 44 |
+
530
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 INTRODUCTION ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
176,
|
| 54 |
+
559,
|
| 55 |
+
336,
|
| 56 |
+
574
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Autoregressive models are a family of exact likelihood-based generative models that represent the joint distribution of data ${ \\boldsymbol x } = ( x _ { 1 } , \\dots , x _ { N } )$ as a product of conditionals $\\begin{array} { r } { p _ { \\theta } ( x ) = \\prod _ { i = 1 } ^ { N } \\bar { p _ { \\theta } } ( x _ { i } | x _ { < i } ) } \\end{array}$ . Neural network models in this family have achieved state-of-the-art log likelihoods on highdimensional image and video datasets (van den Oord et al., 2016a; Chen et al., 2018; Menick & Kalchbrenner, 2018; Parmar et al., 2018; Child et al., 2019; Weissenborn et al., 2019; Salimans et al., 2017; Kalchbrenner et al., 2017; Uria et al., 2016; Parikh et al., 2016; Theis & Bethge, 2015; van den Oord et al., 2016b) due to architectural innovations that enable the following capabilities: ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
590,
|
| 66 |
+
825,
|
| 67 |
+
690
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "1. Large, high information bandwidth receptive fields for each pixel $x _ { i }$ , capable of expressing long-range dependencies over previous pixels $x _ { < i }$ , and 2. Computationally efficient, vectorizable computation of the log likelihood and its gradient. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
212,
|
| 76 |
+
703,
|
| 77 |
+
823,
|
| 78 |
+
751
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "Autoregressive model architectures that can read long-range dependencies over large receptive fields are able to express all joint distributions over the data. Meanwhile, architectures that admit fast log likelihood gradient computation are suitable for training using a stochastic gradient method on a maximum likelihood objective—a straightforward, stable training procedure for generative models. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
179,
|
| 87 |
+
763,
|
| 88 |
+
825,
|
| 89 |
+
819
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "These desiderata make self-attention a compelling building block for autoregressive model architectures. Self-attention is a neural network operation that is able to transform a sequence $y _ { 1 } , \\ldots , y _ { N }$ into a sequence $y _ { 1 } ^ { \\prime } , \\ldots , y _ { N } ^ { \\prime }$ , where each $y _ { i } ^ { \\prime }$ depends on all $y _ { i }$ by way of a single vectorizable computation (Vaswani et al., 2017). Self-attention is remarkably effective at learning long-range dependencies between data dimensions and neural networks that incorporate self-attention in their designs are state-of-the-art on many tasks from language modelling and machine translation to image and video modelling (Parmar et al., 2018; Child et al., 2019). ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
825,
|
| 99 |
+
823,
|
| 100 |
+
924
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "image",
|
| 106 |
+
"img_path": "images/7645a723fe1c02f642cbf643ebf19f0038025f5ea6871f1fd8eb04d7c1001d64.jpg",
|
| 107 |
+
"image_caption": [
|
| 108 |
+
"Figure 1: The Axial Transformer model for 2-dimensional tensors. Before sampling a channel we encode all previous channels and frames with 8 blocks of unmasked row and unmasked column attention (left). Then, for each row, we apply 4 blocks of unmasked row and masked column attention to integrate the previously sampled rows for the active channels into our encoded representation (middle). Finally, we shift the encoded representation up to make sure the conditioning information satisfies causality, and we run the inner decoder consisting of 4 blocks of masked row attention to sample a new row in the image (right). "
|
| 109 |
+
],
|
| 110 |
+
"image_footnote": [],
|
| 111 |
+
"bbox": [
|
| 112 |
+
238,
|
| 113 |
+
99,
|
| 114 |
+
758,
|
| 115 |
+
304
|
| 116 |
+
],
|
| 117 |
+
"page_idx": 1
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "text",
|
| 121 |
+
"text": "But the power of self-attention comes at the price of computational complexity. The memory and computation it consumes grow quadratically with the sequence length $N$ making it prohibitively expensive to directly apply self-attention to long sequences. In the case of autoregressive models of multidimensional tensors such as images or videos, the aim to capture large receptive fields in multiple dimensions further exacerbates the problem as even a modest number of receptive field steps in each dimension can encompass a large total number of locations. Various approaches have been proposed to alleviate this difficulty at the cost of either limiting the receptive field or requiring operations that may not be broadly available on GPUs or TPUs. ",
|
| 122 |
+
"bbox": [
|
| 123 |
+
174,
|
| 124 |
+
448,
|
| 125 |
+
825,
|
| 126 |
+
560
|
| 127 |
+
],
|
| 128 |
+
"page_idx": 1
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "text",
|
| 132 |
+
"text": "We propose the Axial Transformer, a simple yet effective self-attention-based autoregressive model for data organized as multidimensional tensors. Rather than applying attention to a flattened string of tensor elements, our model instead applies attention along a single axis of the tensor without flattening—we refer to this as “axial attention.” Since the length of any single axis (that is, the height or width of an image) is typically much smaller than the total number of elements, an axial attention operation enjoys a significant saving in computation and memory over standard self-attention: for a $d$ -dimensional tensor with shape $\\bar { N } = N ^ { 1 / d } \\times \\dots \\times N ^ { 1 / d }$ , axial attention saves a $O ( N ^ { ( d - 1 ) / d } )$ factor of resources over standard self-attention. ",
|
| 133 |
+
"bbox": [
|
| 134 |
+
174,
|
| 135 |
+
568,
|
| 136 |
+
825,
|
| 137 |
+
680
|
| 138 |
+
],
|
| 139 |
+
"page_idx": 1
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"type": "text",
|
| 143 |
+
"text": "Our Axial Transformer architecture allows for the majority of the context $x _ { < i }$ to be embedded with a high degree of parallelism without introducing conditional independence assumptions among any of the locations, but has an interesting property that it is amenable to a simple-to-implement fast sampling procedure. To sample one row of an image, the Axial Transformer only runs an autoregressive Transformer over that one row only, without re-embedding pixels from previous rows. We structure the Axial Transformer, however, so that it always defines a fully expressive joint distribution. No dependencies on previous pixels are ever lost. ",
|
| 144 |
+
"bbox": [
|
| 145 |
+
174,
|
| 146 |
+
686,
|
| 147 |
+
825,
|
| 148 |
+
784
|
| 149 |
+
],
|
| 150 |
+
"page_idx": 1
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"type": "text",
|
| 154 |
+
"text": "We evaluate Axial Transformers on image and video modelling benchmarks. We show that Axial Transformer achieves state-of-the-art results on ImageNet-32 and on ImageNet-64. We also show that, simply by stacking a video along the channel dimension, the Axial Transformer can be directly applied to the channel-stacked video without nearly any modification. On the BAIR Robot Pushing benchmark, the Axial Transformer significantly outperforms previous results without using an architecture specially designed for videos. The generated samples on these datasets are of the expected high quality. ",
|
| 155 |
+
"bbox": [
|
| 156 |
+
174,
|
| 157 |
+
791,
|
| 158 |
+
825,
|
| 159 |
+
888
|
| 160 |
+
],
|
| 161 |
+
"page_idx": 1
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"type": "text",
|
| 165 |
+
"text": "Axial Transformers do not require subroutines for GPUs or TPUs that may exhibit unfavorable memory bandwidth and computation trade-offs. Axial Transformers are simple to implement using efficient operations that are widely available in deep learning frameworks (primarily dense-dense MatMuls). An open source implementation of our models is available at anonymized URL. ",
|
| 166 |
+
"bbox": [
|
| 167 |
+
176,
|
| 168 |
+
895,
|
| 169 |
+
823,
|
| 170 |
+
924
|
| 171 |
+
],
|
| 172 |
+
"page_idx": 1
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"type": "image",
|
| 176 |
+
"img_path": "images/d1f91ddeb06dad383b4d77a93b9812f1689708c09d1dee22255eaf3c1e2f9211.jpg",
|
| 177 |
+
"image_caption": [
|
| 178 |
+
"Figure 2: Types of axial attention layers that are the building blocks of the Axial Transformer. The blue locations correspond to the receptive field of the output red location. "
|
| 179 |
+
],
|
| 180 |
+
"image_footnote": [],
|
| 181 |
+
"bbox": [
|
| 182 |
+
331,
|
| 183 |
+
101,
|
| 184 |
+
656,
|
| 185 |
+
162
|
| 186 |
+
],
|
| 187 |
+
"page_idx": 2
|
| 188 |
+
},
|
| 189 |
+
{
|
| 190 |
+
"type": "text",
|
| 191 |
+
"text": "",
|
| 192 |
+
"bbox": [
|
| 193 |
+
173,
|
| 194 |
+
233,
|
| 195 |
+
823,
|
| 196 |
+
262
|
| 197 |
+
],
|
| 198 |
+
"page_idx": 2
|
| 199 |
+
},
|
| 200 |
+
{
|
| 201 |
+
"type": "text",
|
| 202 |
+
"text": "2 BACKGROUND ",
|
| 203 |
+
"text_level": 1,
|
| 204 |
+
"bbox": [
|
| 205 |
+
176,
|
| 206 |
+
289,
|
| 207 |
+
326,
|
| 208 |
+
305
|
| 209 |
+
],
|
| 210 |
+
"page_idx": 2
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"type": "text",
|
| 214 |
+
"text": "To set the stage for our discussion, we first review self-attention and its computational resource requirements in the context of autoregressive modeling. A self-attention layer takes as input a length $N$ sequence of $D$ -dimensional embeddings $X$ (a $N \\times D$ matrix) and produces an output sequence $Y$ (also a $N \\times D$ matrix) via: ",
|
| 215 |
+
"bbox": [
|
| 216 |
+
174,
|
| 217 |
+
324,
|
| 218 |
+
825,
|
| 219 |
+
381
|
| 220 |
+
],
|
| 221 |
+
"page_idx": 2
|
| 222 |
+
},
|
| 223 |
+
{
|
| 224 |
+
"type": "equation",
|
| 225 |
+
"img_path": "images/a1be1c0d5932dee760a326c69a09c319ad3263162c2b1f389acb760b926ea42c.jpg",
|
| 226 |
+
"text": "$$\n\\begin{array} { r l } & { Q = X W _ { Q } , \\quad K = X W _ { K } , \\quad V = X W _ { V } } \\\\ & { A = \\operatorname { s o f t m a x } \\left( Q K ^ { \\top } / \\sqrt { D } \\right) , \\quad Y = A V } \\end{array}\n$$",
|
| 227 |
+
"text_format": "latex",
|
| 228 |
+
"bbox": [
|
| 229 |
+
356,
|
| 230 |
+
391,
|
| 231 |
+
640,
|
| 232 |
+
440
|
| 233 |
+
],
|
| 234 |
+
"page_idx": 2
|
| 235 |
+
},
|
| 236 |
+
{
|
| 237 |
+
"type": "text",
|
| 238 |
+
"text": "$W _ { Q }$ , $W _ { K }$ , and $W _ { V }$ are $D \\times D$ parameter matrices responsible for projecting the entries of the sequence $X$ into keys, queries, and values, respectively. Each entry of the output sequence $Y$ is a linear combination of values in $V$ weighted by the attention matrix $A$ , which itself is computed from similarities between all pairs of query and key vectors. Both the expressive power and the resource cost of self-attention come from computing $A$ and $Y$ : it takes $O ( N ^ { 2 } )$ time and space to compute the pairwise similarities between $Q$ and $K$ and to compute the linear combination of $V$ vectors. ",
|
| 239 |
+
"bbox": [
|
| 240 |
+
173,
|
| 241 |
+
449,
|
| 242 |
+
825,
|
| 243 |
+
534
|
| 244 |
+
],
|
| 245 |
+
"page_idx": 2
|
| 246 |
+
},
|
| 247 |
+
{
|
| 248 |
+
"type": "text",
|
| 249 |
+
"text": "This quadratic complexity makes it impractical to apply self-attention to images and videos directly as flattened vectors: a small $3 2 \\times 3 2 \\times 3$ image has 3072 dimensions. Sequences such as these are too long for self-attention, so attempts to scale self-attention to these modalities generally involve restricting these sequence lengths in a modality-aware manner while attempting to preserve modeling performance. ",
|
| 250 |
+
"bbox": [
|
| 251 |
+
174,
|
| 252 |
+
540,
|
| 253 |
+
825,
|
| 254 |
+
611
|
| 255 |
+
],
|
| 256 |
+
"page_idx": 2
|
| 257 |
+
},
|
| 258 |
+
{
|
| 259 |
+
"type": "text",
|
| 260 |
+
"text": "One strategy is to restrict the conditioning context $x _ { < i }$ to a carefully designed small subset of the data dimensions. While this reduces the cost of attention, which is only performed over these small subsets instead of the full data, the model can no longer express all joint distributions over the data. Parmar et al. (2018) propose image models with conditioning context $x _ { < i }$ restricted to a small window of the full image, but the implementation requires redundant data copies to extract and process these windows. Weissenborn et al. (2019) similarly scale video autoregressive models by restricting the context, again preventing their model from expressing all joint distributions over pixels. Our models do not restrict context and hence we obtain better log likelihoods, as we will see in section 4. ",
|
| 261 |
+
"bbox": [
|
| 262 |
+
173,
|
| 263 |
+
617,
|
| 264 |
+
825,
|
| 265 |
+
742
|
| 266 |
+
],
|
| 267 |
+
"page_idx": 2
|
| 268 |
+
},
|
| 269 |
+
{
|
| 270 |
+
"type": "text",
|
| 271 |
+
"text": "A different strategy is to stack multiple sparse attention layers, each with restricted context for computational efficiency, but in a manner that overlapping these layers yields a full-context model. Child et al. (2019) propose two sparse attention patterns with this property. However, the architecture they propose that works best for images (the Strided Sparse Transformer) requires custom sparse attention GPU kernels to implement a specific block-sparse variant of matrix-matrix-multiply. The model cannot be easily implemented on other hardware such as TPUs. ",
|
| 272 |
+
"bbox": [
|
| 273 |
+
173,
|
| 274 |
+
750,
|
| 275 |
+
825,
|
| 276 |
+
833
|
| 277 |
+
],
|
| 278 |
+
"page_idx": 2
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"type": "text",
|
| 282 |
+
"text": "See table 1 for a summary of these architecture design tradeoffs. Our goal in this paper is to design attention-based autoregressive models that attain the best of all worlds. Our Axial Transformer, described in subsequent sections, has a full conditioning context, so its ability to express joint distributions is never limited. The Axial Transformer also does not require any redundant data copies or custom kernels to implement in an efficient way. Indeed, we designed, and will make open source, an efficient implementation that uses only standard operations in deep learning libraries. ",
|
| 283 |
+
"bbox": [
|
| 284 |
+
174,
|
| 285 |
+
840,
|
| 286 |
+
825,
|
| 287 |
+
924
|
| 288 |
+
],
|
| 289 |
+
"page_idx": 2
|
| 290 |
+
},
|
| 291 |
+
{
|
| 292 |
+
"type": "table",
|
| 293 |
+
"img_path": "images/7eb5e40255b787c29d8002295faa0e03ac9093525297a0137a8b9d9f02223bc6.jpg",
|
| 294 |
+
"table_caption": [
|
| 295 |
+
"Table 1: Trade-offs of recently proposed multidimensional Transformer architectures. "
|
| 296 |
+
],
|
| 297 |
+
"table_footnote": [],
|
| 298 |
+
"table_body": "<table><tr><td>Model</td><td>Full receptive field</td><td>Attention faster than O(N²)</td><td>Needs no custom kernels</td><td>Semi-parallel context aggregation</td></tr><tr><td>Transformer (Vaswani et al.,2017)</td><td></td><td></td><td></td><td></td></tr><tr><td>Image Transformer (Parmar et al.,2018)</td><td>yes no</td><td>no</td><td>yes</td><td>no</td></tr><tr><td>Block Transformer (Weissenborn et al.,2019)</td><td>no</td><td>yes yes</td><td>yes yes</td><td>no no</td></tr><tr><td>Strided Sparse Transformer (Child et al., 2019)</td><td>yes</td><td>yes</td><td>no</td><td>no</td></tr><tr><td>Axial Transformer (ours)</td><td>yes</td><td>yes</td><td>yes</td><td>yes</td></tr></table>",
|
| 299 |
+
"bbox": [
|
| 300 |
+
196,
|
| 301 |
+
131,
|
| 302 |
+
803,
|
| 303 |
+
219
|
| 304 |
+
],
|
| 305 |
+
"page_idx": 3
|
| 306 |
+
},
|
| 307 |
+
{
|
| 308 |
+
"type": "text",
|
| 309 |
+
"text": "3 AXIAL TRANSFORMERS ",
|
| 310 |
+
"text_level": 1,
|
| 311 |
+
"bbox": [
|
| 312 |
+
176,
|
| 313 |
+
246,
|
| 314 |
+
405,
|
| 315 |
+
261
|
| 316 |
+
],
|
| 317 |
+
"page_idx": 3
|
| 318 |
+
},
|
| 319 |
+
{
|
| 320 |
+
"type": "text",
|
| 321 |
+
"text": "We now describe Axial Transformers, our self-attention-based autoregressive models for highdimensional data tensors. We describe its basic building block in section 3.1 and then we complete the description into a full autoregressive model in section 3.2. ",
|
| 322 |
+
"bbox": [
|
| 323 |
+
174,
|
| 324 |
+
276,
|
| 325 |
+
825,
|
| 326 |
+
318
|
| 327 |
+
],
|
| 328 |
+
"page_idx": 3
|
| 329 |
+
},
|
| 330 |
+
{
|
| 331 |
+
"type": "text",
|
| 332 |
+
"text": "3.1 AXIAL ATTENTION ",
|
| 333 |
+
"text_level": 1,
|
| 334 |
+
"bbox": [
|
| 335 |
+
176,
|
| 336 |
+
335,
|
| 337 |
+
346,
|
| 338 |
+
349
|
| 339 |
+
],
|
| 340 |
+
"page_idx": 3
|
| 341 |
+
},
|
| 342 |
+
{
|
| 343 |
+
"type": "text",
|
| 344 |
+
"text": "We first introduce our basic building block for developing self-attention-based autoregressive models for high-dimensional data tensors. The proposed approach does not change the original shape of the multidimensional data tensor and performs a masked or unmasked attention over a single axis of the tensor at a time. We call this operation axial attention, denoted by Attention $\\mathbf { \\Psi } _ { k } ( x )$ . It performs attention over axis $k$ of the tensor $x$ , mixing information along axis $k$ while keeping information along other axes independent. It is straightforward to implement: axial attention over axis $k$ can be implemented by transposing all axes except $k$ to the batch axis, calling standard attention as a subroutine, then undoing the transpose (an alternative is to use the einsum operation available in most deep learning libraries). ",
|
| 345 |
+
"bbox": [
|
| 346 |
+
174,
|
| 347 |
+
361,
|
| 348 |
+
825,
|
| 349 |
+
486
|
| 350 |
+
],
|
| 351 |
+
"page_idx": 3
|
| 352 |
+
},
|
| 353 |
+
{
|
| 354 |
+
"type": "text",
|
| 355 |
+
"text": "When the data is an image, we call Attention $^ { - 1 }$ column attention, as it mixes information within columns while keeping separate columns independent. We call Attention2 row attention for analogous reasons. Axial attention on a square image of size $N = S \\times S$ performs attention on $S$ sequences of length $S .$ —this is a total of $O ( S \\cdot S ^ { 2 } ) = O ( N { \\sqrt { N } } )$ computation—an $O ( { \\sqrt { N } } )$ savings in computation over standard self-attention. In general, for a $d$ -dimensional tensor with $N = \\check { S ^ { d } }$ , axial attention saves $O ( N ^ { ( d - 1 ) / d } )$ computation over standard attention. Of course, a single layer of axial attention along some axis $k$ does not have the full receptive field since it covers a single axis, but we will see in section 3.2 that stacking two axial attention layers allows the model to obtain a global receptive field. ",
|
| 356 |
+
"bbox": [
|
| 357 |
+
173,
|
| 358 |
+
493,
|
| 359 |
+
825,
|
| 360 |
+
621
|
| 361 |
+
],
|
| 362 |
+
"page_idx": 3
|
| 363 |
+
},
|
| 364 |
+
{
|
| 365 |
+
"type": "text",
|
| 366 |
+
"text": "It will be important for us to also define MaskedAttention $k$ to be the causally masked variant of Attentionk: component $i$ of the result of MaskedAttention $_ k ( x )$ along axis $k$ depends on only components $1 , \\ldots , i$ of $x$ along axis $k$ . The receptive fields of these attention patterns, both unmasked and masked, are illustrated in fig. 2. We will use these masked blocks to build our autoregressive model in section 3.2. ",
|
| 367 |
+
"bbox": [
|
| 368 |
+
173,
|
| 369 |
+
627,
|
| 370 |
+
825,
|
| 371 |
+
698
|
| 372 |
+
],
|
| 373 |
+
"page_idx": 3
|
| 374 |
+
},
|
| 375 |
+
{
|
| 376 |
+
"type": "text",
|
| 377 |
+
"text": "Axial attention can be used within standard Transformer layers in a straightforward manner to produce Axial Transformer layers. The basic building blocks are the same as those found in the standard Transformer architecture: ",
|
| 378 |
+
"bbox": [
|
| 379 |
+
176,
|
| 380 |
+
704,
|
| 381 |
+
821,
|
| 382 |
+
747
|
| 383 |
+
],
|
| 384 |
+
"page_idx": 3
|
| 385 |
+
},
|
| 386 |
+
{
|
| 387 |
+
"type": "text",
|
| 388 |
+
"text": "• LayerNorm $( x )$ : layer normalization (Ba et al., 2016), and • Dense $_ D ( x )$ : a dense layer operating over the last axis of the input $x$ . The letter $D$ denotes the dimension of the output activations. If the input has shape $H \\times W \\times C$ , then this operation is identical to a $1 \\times 1$ convolution, and the output has shape $H \\times W \\times D$ . ",
|
| 389 |
+
"bbox": [
|
| 390 |
+
215,
|
| 391 |
+
758,
|
| 392 |
+
825,
|
| 393 |
+
820
|
| 394 |
+
],
|
| 395 |
+
"page_idx": 3
|
| 396 |
+
},
|
| 397 |
+
{
|
| 398 |
+
"type": "text",
|
| 399 |
+
"text": "We use these to define ResNet axial attention blocks operating on tensors of $D$ -dimensional embeddings (Vaswani et al., 2017; Child et al., 2019): ",
|
| 400 |
+
"bbox": [
|
| 401 |
+
171,
|
| 402 |
+
832,
|
| 403 |
+
823,
|
| 404 |
+
861
|
| 405 |
+
],
|
| 406 |
+
"page_idx": 3
|
| 407 |
+
},
|
| 408 |
+
{
|
| 409 |
+
"type": "text",
|
| 410 |
+
"text": "• FeedforwardBlock $\\mathbf { \\boldsymbol { { \\cdot } } } ( \\mathbf { \\boldsymbol { { x } } } ) = \\mathbf { \\boldsymbol { { x } } } + \\mathbf { D e n s e } _ { D }$ (Nonlinearity(DenseD0 (LayerNorm(x)))) • AttentionBlockk(x) = x + DenseD(Attention $k$ (LayerNorm(x))) • TransformerBloc $\\operatorname { k } _ { k } ( x ) =$ FeedforwardBlock(AttentionBlockk(x)) ",
|
| 411 |
+
"bbox": [
|
| 412 |
+
215,
|
| 413 |
+
871,
|
| 414 |
+
758,
|
| 415 |
+
924
|
| 416 |
+
],
|
| 417 |
+
"page_idx": 3
|
| 418 |
+
},
|
| 419 |
+
{
|
| 420 |
+
"type": "text",
|
| 421 |
+
"text": "$D ^ { \\prime }$ is chosen to be some constant factor larger than $D$ , from 1 to 4 (Vaswani et al., 2017). We also define a MaskedTransformer $\\mathbf { B l o c k } _ { k }$ using MaskedAttention $k$ in place of Attention $k$ . ",
|
| 422 |
+
"bbox": [
|
| 423 |
+
173,
|
| 424 |
+
103,
|
| 425 |
+
823,
|
| 426 |
+
132
|
| 427 |
+
],
|
| 428 |
+
"page_idx": 4
|
| 429 |
+
},
|
| 430 |
+
{
|
| 431 |
+
"type": "text",
|
| 432 |
+
"text": "Operations similar to unmasked axial attention have been proposed in other contexts in computer vision (Huang et al., 2019). Our focus in forthcoming sections is the use of masked axial attention and its utility in autoregressive image modeling, which is not explored in these works. ",
|
| 433 |
+
"bbox": [
|
| 434 |
+
174,
|
| 435 |
+
138,
|
| 436 |
+
823,
|
| 437 |
+
181
|
| 438 |
+
],
|
| 439 |
+
"page_idx": 4
|
| 440 |
+
},
|
| 441 |
+
{
|
| 442 |
+
"type": "text",
|
| 443 |
+
"text": "3.2 AXIAL TRANSFORMERS ",
|
| 444 |
+
"text_level": 1,
|
| 445 |
+
"bbox": [
|
| 446 |
+
176,
|
| 447 |
+
196,
|
| 448 |
+
382,
|
| 449 |
+
212
|
| 450 |
+
],
|
| 451 |
+
"page_idx": 4
|
| 452 |
+
},
|
| 453 |
+
{
|
| 454 |
+
"type": "text",
|
| 455 |
+
"text": "We now describe Axial Transformers, our axial attention-based autoregressive models for images and videos. We will use the axial attention operations described in section 3.1 as building blocks in a multi-layer autoregressive model of the form $\\begin{array} { r } { p _ { \\theta } ( x ) = \\prod _ { i = 1 } ^ { N } p _ { \\theta } ( x _ { i } \\mid x _ { < i } ) } \\end{array}$ following the raster scan ordering of pixels. We will accomplish this by building an autoregressive model over rows (section 3.2.1), then conditioning each row on previous rows (section 3.2.1), then further conditioning on previous channels and frames (section 3.2.2). Decomposing the model in this manner also leads to a simple fast and partly parallel sampling procedure (section 3.2.1). ",
|
| 456 |
+
"bbox": [
|
| 457 |
+
174,
|
| 458 |
+
222,
|
| 459 |
+
825,
|
| 460 |
+
324
|
| 461 |
+
],
|
| 462 |
+
"page_idx": 4
|
| 463 |
+
},
|
| 464 |
+
{
|
| 465 |
+
"type": "text",
|
| 466 |
+
"text": "3.2.1 A MODEL FOR SINGLE-CHANNEL IMAGES",
|
| 467 |
+
"text_level": 1,
|
| 468 |
+
"bbox": [
|
| 469 |
+
174,
|
| 470 |
+
338,
|
| 471 |
+
516,
|
| 472 |
+
352
|
| 473 |
+
],
|
| 474 |
+
"page_idx": 4
|
| 475 |
+
},
|
| 476 |
+
{
|
| 477 |
+
"type": "text",
|
| 478 |
+
"text": "We begin with an autoregressive model for a single-channel image $x$ with shape $H \\times W$ , with each pixel taking an integer value in $[ 0 , 2 5 5 ]$ representing its intensity. As is standard practice with Transformers, pixel intensities are first embedded into a $H \\times W \\times D$ tensor of $D$ -dimensional embeddings, which we call $h$ . The architecture’s responsibility is to transform $h$ into a $H \\times W \\times 2 5 6$ tensor of logits suitable for classification or sampling. These logits must depend only on previous pixels in the input $x$ along the raster scan ordering to ensure that the architecture defines a valid autoregressive model. ",
|
| 479 |
+
"bbox": [
|
| 480 |
+
173,
|
| 481 |
+
361,
|
| 482 |
+
825,
|
| 483 |
+
459
|
| 484 |
+
],
|
| 485 |
+
"page_idx": 4
|
| 486 |
+
},
|
| 487 |
+
{
|
| 488 |
+
"type": "text",
|
| 489 |
+
"text": "Inner Decoder: a row-wise model Our idea is to begin with masked row attention layers to create a “row-wise” model: ",
|
| 490 |
+
"bbox": [
|
| 491 |
+
173,
|
| 492 |
+
467,
|
| 493 |
+
823,
|
| 494 |
+
494
|
| 495 |
+
],
|
| 496 |
+
"page_idx": 4
|
| 497 |
+
},
|
| 498 |
+
{
|
| 499 |
+
"type": "equation",
|
| 500 |
+
"img_path": "images/c04e64423e5545a32e8595aa5d3807e1b2740def194ee7d3ff62243854bdb60e.jpg",
|
| 501 |
+
"text": "$$\n\\begin{array} { r l } & { h \\gets \\mathrm { E m b e d } ( x ) } \\\\ & { h \\gets \\mathrm { S h i f t R i g h t } ( h ) + \\mathrm { P o s i t i o n E m b e d d i n g s } } \\\\ & { h \\gets \\mathrm { M a s k e d T r a n s f o r m e r B l o c k } _ { 2 } ( h ) } \\end{array}\n$$",
|
| 502 |
+
"text_format": "latex",
|
| 503 |
+
"bbox": [
|
| 504 |
+
279,
|
| 505 |
+
496,
|
| 506 |
+
563,
|
| 507 |
+
550
|
| 508 |
+
],
|
| 509 |
+
"page_idx": 4
|
| 510 |
+
},
|
| 511 |
+
{
|
| 512 |
+
"type": "text",
|
| 513 |
+
"text": "Here, $L _ { \\mathrm { r o w } }$ is the number of masked row attention blocks applied to $h$ . PositionEmbeddings is a $H \\times$ $W \\times D$ tensor of position embeddings that inform the attention layers of the position. For parameter efficiency we use “additively factorized” position embeddings, meaning that we parameterize them as a broadcasted sum of $H \\times 1 \\times D$ embeddings for rows and $1 \\times W \\times D$ embeddings for columns. ",
|
| 514 |
+
"bbox": [
|
| 515 |
+
173,
|
| 516 |
+
550,
|
| 517 |
+
823,
|
| 518 |
+
607
|
| 519 |
+
],
|
| 520 |
+
"page_idx": 4
|
| 521 |
+
},
|
| 522 |
+
{
|
| 523 |
+
"type": "text",
|
| 524 |
+
"text": "The operation ShiftRight shifts the input right by one pixel, which has the effect of shifting the receptive field left by one pixel. This ensures that the masked row attention layers exclude the current pixel from their receptive field, which is crucial for architecture to define a correct autoregressive model. ",
|
| 525 |
+
"bbox": [
|
| 526 |
+
173,
|
| 527 |
+
613,
|
| 528 |
+
825,
|
| 529 |
+
669
|
| 530 |
+
],
|
| 531 |
+
"page_idx": 4
|
| 532 |
+
},
|
| 533 |
+
{
|
| 534 |
+
"type": "text",
|
| 535 |
+
"text": "As this model employs row attention only, it enjoys the computational efficiency benefits described in section 3.1. However, it clearly does not define a full-context model because each location in the output does not depend on input pixels in previous rows. If we were to use the resulting $h$ as logits for pixel intensity prediction, we would obtain a set of $H$ independent autoregressive models $p ( x _ { i , j } | x _ { i , 1 } , \\dots , x _ { i , j - 1 } )$ for each row $i \\in [ 1 , H ]$ , not a single autoregressive model with full context. We address this issue next. ",
|
| 536 |
+
"bbox": [
|
| 537 |
+
173,
|
| 538 |
+
676,
|
| 539 |
+
825,
|
| 540 |
+
760
|
| 541 |
+
],
|
| 542 |
+
"page_idx": 4
|
| 543 |
+
},
|
| 544 |
+
{
|
| 545 |
+
"type": "text",
|
| 546 |
+
"text": "Outer Decoder: capturing the rows above Each pixel $x _ { i , j }$ in the aforementioned model already depends on previous pixels in its own row $x _ { i , < j }$ . We just need to make it depend on all previous rows $x _ { < i , }$ : too. So, we insert unmasked row and masked column layers in the beginning of the model as follows (newly inserted operations are underlined): ",
|
| 547 |
+
"bbox": [
|
| 548 |
+
174,
|
| 549 |
+
768,
|
| 550 |
+
823,
|
| 551 |
+
824
|
| 552 |
+
],
|
| 553 |
+
"page_idx": 4
|
| 554 |
+
},
|
| 555 |
+
{
|
| 556 |
+
"type": "image",
|
| 557 |
+
"img_path": "images/9322c203cfd138b3f24dc3f7fe4dcc52e1f88c9b69e1848719c068df94c08aa1.jpg",
|
| 558 |
+
"image_caption": [
|
| 559 |
+
"Figure 3: Arrangement of inputs to the encoding network of the Axial Transformer. Previously available or generated channels of an image or video are sequentially stacked in the input. A variable number of padding planes are used as placeholders for future generated channels. A final integer plane signals to the Axial Transformer the channel that is being generated at that step. "
|
| 560 |
+
],
|
| 561 |
+
"image_footnote": [],
|
| 562 |
+
"bbox": [
|
| 563 |
+
366,
|
| 564 |
+
102,
|
| 565 |
+
625,
|
| 566 |
+
198
|
| 567 |
+
],
|
| 568 |
+
"page_idx": 5
|
| 569 |
+
},
|
| 570 |
+
{
|
| 571 |
+
"type": "text",
|
| 572 |
+
"text": "The tensor $u$ represents context captured above the current pixel. It is computed by unmasked row and masked column attention layers, repeated to a total of $L _ { \\mathrm { u p p e r } }$ layers to increase model capacity, which make $u$ cover the receptive field at all rows above and including the current pixel. The ShiftDown operation shifts $u$ down one pixel, which shifts its receptive field up one pixel. Thus we have a context which captures all pixels above while excluding the current row, which we add to $h$ as input to the masked row layers. We have thus converted the row-wise model into a fully expressive autoregressive model that captures not only pixels in the current row but also those above. ",
|
| 573 |
+
"bbox": [
|
| 574 |
+
174,
|
| 575 |
+
294,
|
| 576 |
+
825,
|
| 577 |
+
392
|
| 578 |
+
],
|
| 579 |
+
"page_idx": 5
|
| 580 |
+
},
|
| 581 |
+
{
|
| 582 |
+
"type": "text",
|
| 583 |
+
"text": "Following standard practice, we pass the final $h$ through layer normalization and a final dense layer to produce logits with shape $H \\times W \\times 2 5 6$ . The logits at each location depend on all previous pixel locations in the raster scan ordering. ",
|
| 584 |
+
"bbox": [
|
| 585 |
+
174,
|
| 586 |
+
398,
|
| 587 |
+
825,
|
| 588 |
+
441
|
| 589 |
+
],
|
| 590 |
+
"page_idx": 5
|
| 591 |
+
},
|
| 592 |
+
{
|
| 593 |
+
"type": "text",
|
| 594 |
+
"text": "Semi-Parallel Sampling Naive implementations of sampling from sequential models are notoriously slow because they require re-evaluating the entire network to sample each location. In the case of our model for a $\\dot { \\sqrt { N } } \\times \\sqrt { N }$ square image, each network evaluation takes $O ( N \\sqrt { N } ( L _ { \\mathrm { u p p e r } } +$ $L _ { \\mathrm { r o w } } )$ ) time, so sampling the whole image would take $O ( N ^ { 2 } \\sqrt { N } ( L _ { \\mathrm { u p p e r } } + L _ { \\mathrm { r o w } } ) )$ ), which is far too large. ",
|
| 595 |
+
"bbox": [
|
| 596 |
+
173,
|
| 597 |
+
449,
|
| 598 |
+
825,
|
| 599 |
+
526
|
| 600 |
+
],
|
| 601 |
+
"page_idx": 5
|
| 602 |
+
},
|
| 603 |
+
{
|
| 604 |
+
"type": "text",
|
| 605 |
+
"text": "Fortunately, our architecture is amenable to a particularly simple implementation of a faster sampling that is able to compute large sections of the model in parallel (see Figure 1). Pseudocode is as follows: ",
|
| 606 |
+
"bbox": [
|
| 607 |
+
176,
|
| 608 |
+
531,
|
| 609 |
+
825,
|
| 610 |
+
574
|
| 611 |
+
],
|
| 612 |
+
"page_idx": 5
|
| 613 |
+
},
|
| 614 |
+
{
|
| 615 |
+
"type": "text",
|
| 616 |
+
"text": "1. For each row $i \\in [ 1 , H ]$ : ",
|
| 617 |
+
"bbox": [
|
| 618 |
+
214,
|
| 619 |
+
585,
|
| 620 |
+
393,
|
| 621 |
+
602
|
| 622 |
+
],
|
| 623 |
+
"page_idx": 5
|
| 624 |
+
},
|
| 625 |
+
{
|
| 626 |
+
"type": "text",
|
| 627 |
+
"text": "(a) Compute the upper context $u$ including information about all $x _ { < i , * }$ using the upper layers \n(b) For each column $j \\in [ 1 , W ]$ : i. Sample $x _ { i , j }$ conditioned on $u$ and prior elements of row i $( x _ { i , < j } )$ . ",
|
| 628 |
+
"bbox": [
|
| 629 |
+
236,
|
| 630 |
+
606,
|
| 631 |
+
825,
|
| 632 |
+
667
|
| 633 |
+
],
|
| 634 |
+
"page_idx": 5
|
| 635 |
+
},
|
| 636 |
+
{
|
| 637 |
+
"type": "text",
|
| 638 |
+
"text": "Because the $L _ { \\mathrm { r o w } }$ row-wise layers are independent over rows (they depend on other rows only through the upper context, as explained in section 3.2.1), sampling one row can be accomplished by evaluating the row-wise layers for that one row only, completely ignoring other rows. Thus,√ in one row of $\\sqrt { N }$ pixels, each pixel can be sampled in √ $O ( N L _ { \\mathrm { r o w } } )$ , so all pixels can be sampled in $O ( N ^ { 2 } L _ { \\mathrm { r o w } } )$ . Before each of the √ $\\sqrt { N }$ rows can be sampled, the upper context must be computed in $O ( N \\sqrt { N } L _ { \\mathrm { u p p e r } } )$ , for a total of $O ( N ^ { 2 } L _ { \\mathrm { u p p e r } } )$ over the course of all rows. Thus we arrive at $O ( N ^ { 2 } ( L _ { \\mathrm { u p p e r } } { + } L _ { \\mathrm { r o w } } ) )$ in total, which is $\\sqrt { N }$ faster than the naive implementation. To our knowledge, sampling speedups of this type are not possible with contemporary work on scaling Transformers to images and videos (Child et al., 2019; Weissenborn et al., 2019). ",
|
| 639 |
+
"bbox": [
|
| 640 |
+
173,
|
| 641 |
+
679,
|
| 642 |
+
825,
|
| 643 |
+
814
|
| 644 |
+
],
|
| 645 |
+
"page_idx": 5
|
| 646 |
+
},
|
| 647 |
+
{
|
| 648 |
+
"type": "text",
|
| 649 |
+
"text": "3.2.2 CHANNEL ENCODER FOR MULTI-CHANNEL IMAGES AND VIDEOS ",
|
| 650 |
+
"text_level": 1,
|
| 651 |
+
"bbox": [
|
| 652 |
+
174,
|
| 653 |
+
829,
|
| 654 |
+
684,
|
| 655 |
+
844
|
| 656 |
+
],
|
| 657 |
+
"page_idx": 5
|
| 658 |
+
},
|
| 659 |
+
{
|
| 660 |
+
"type": "text",
|
| 661 |
+
"text": "We have just described an architecture for a single-channel image of shape $H \\times W$ . Here, we show how to extend the architecture to multi-channel images or videos of shape $H \\times W \\times C$ (here $C$ is either the number of channels in a multi-channel image, or the product of the number of channels and timesteps in a video). One way to model such data of shape $H \\times W \\times C$ is to simply stack the channels on top of each other into a single-channel image of shape $( H \\cdot C ) \\times W$ or $H \\times ( W \\cdot C )$ . This is simple to implement, but does increase the sequence length for column attention or row attention, which can be undesirable for large $C$ . We instead opt to model one channel at a time as a singlechannel image, but now conditioned on previous channels using an extra set of unmasked row and unmasked column attention layers. This means that we have a model of the form $p ( x _ { : , : , c } | x _ { : , : , < c } )$ , where previous channels $x _ { : , : , < c }$ are processed into a $H \\times W \\times D$ tensor of context information, which is then added into the first encoding blocks of the model in section 3.2.1 (Figure 3). ",
|
| 662 |
+
"bbox": [
|
| 663 |
+
174,
|
| 664 |
+
853,
|
| 665 |
+
825,
|
| 666 |
+
924
|
| 667 |
+
],
|
| 668 |
+
"page_idx": 5
|
| 669 |
+
},
|
| 670 |
+
{
|
| 671 |
+
"type": "table",
|
| 672 |
+
"img_path": "images/5a5f0a33b6c1bc6de3117c596695dbea184473a7e42aa565da6041960681a0ec.jpg",
|
| 673 |
+
"table_caption": [
|
| 674 |
+
"Table 2: Unconditional and class-conditional image modeling results (bits/dim) "
|
| 675 |
+
],
|
| 676 |
+
"table_footnote": [],
|
| 677 |
+
"table_body": "<table><tr><td>Model</td><td>ImageNet 32x32</td><td>ImageNet 64x64</td></tr><tr><td>Multiscale PixelCNN (Reed et al., 2017)</td><td>3.95</td><td>3.70</td></tr><tr><td>PixelCNN/RNN (van den Oord et al., 2016a)</td><td>3.86</td><td>3.63</td></tr><tr><td>Gated PixelCNN (van den Oord et al.,2016b)</td><td>3.83</td><td>3.57</td></tr><tr><td>PixelSNAIL (Chen et al., 2018)</td><td></td><td>3.52</td></tr><tr><td>SPN (Menick&Kalchbrenner,2018)</td><td>3.80 3.79</td><td>3.52</td></tr><tr><td>Image Transformer (Parmar et al., 2018)</td><td></td><td></td></tr><tr><td>Strided Sparse Transformer (Child et al.,2019)</td><td>3.77</td><td>1 3.44</td></tr><tr><td></td><td>1</td><td></td></tr><tr><td>Axial Transformer+LSTMinnerdecoder</td><td>3.77</td><td>3.46</td></tr><tr><td>Axial Transformer</td><td>3.76 (3.758)</td><td>3.44 (3.439)</td></tr></table>",
|
| 678 |
+
"bbox": [
|
| 679 |
+
228,
|
| 680 |
+
130,
|
| 681 |
+
769,
|
| 682 |
+
275
|
| 683 |
+
],
|
| 684 |
+
"page_idx": 6
|
| 685 |
+
},
|
| 686 |
+
{
|
| 687 |
+
"type": "table",
|
| 688 |
+
"img_path": "images/38e5db7e344660361cb0150fcb05657cc1d7807ebe90dd0d0f51231f2a11ad94.jpg",
|
| 689 |
+
"table_caption": [
|
| 690 |
+
"Table 3: Video modeling results (bits/dim) on the BAIR Robotic Pushing dataset (Ebert et al., 2017). We condition on a single video frame and model the next 15 frames, similar to Weissenborn et al. (2019). Kumar et al. (2019) instead condition on the 3 prior frames of the video. "
|
| 691 |
+
],
|
| 692 |
+
"table_footnote": [],
|
| 693 |
+
"table_body": "<table><tr><td>Model</td><td>bits/dim next 15 frames</td></tr><tr><td>VideoFlow (Kumar etal.,2019)</td><td>1.87</td></tr><tr><td>Video Transformer(Weissenborn etal.,2019)</td><td>1.35</td></tr><tr><td>Axial Transformer (ours)</td><td>1.29</td></tr><tr><td></td><td></td></tr></table>",
|
| 694 |
+
"bbox": [
|
| 695 |
+
269,
|
| 696 |
+
353,
|
| 697 |
+
728,
|
| 698 |
+
421
|
| 699 |
+
],
|
| 700 |
+
"page_idx": 6
|
| 701 |
+
},
|
| 702 |
+
{
|
| 703 |
+
"type": "text",
|
| 704 |
+
"text": "",
|
| 705 |
+
"bbox": [
|
| 706 |
+
174,
|
| 707 |
+
454,
|
| 708 |
+
825,
|
| 709 |
+
537
|
| 710 |
+
],
|
| 711 |
+
"page_idx": 6
|
| 712 |
+
},
|
| 713 |
+
{
|
| 714 |
+
"type": "text",
|
| 715 |
+
"text": "We do not share any parameters among any of these layers. At training time, we train on a random channel slice of each image: we process the previous slices using these unmasked attention layers to produce a context tensor, and maximize the likelihood of the randomly chosen slice conditioned on this context. This amounts to training on an unbiased estimate of log likelihood for the whole data tensor. See fig. 1 for an illustration of this complete model. ",
|
| 716 |
+
"bbox": [
|
| 717 |
+
174,
|
| 718 |
+
545,
|
| 719 |
+
825,
|
| 720 |
+
614
|
| 721 |
+
],
|
| 722 |
+
"page_idx": 6
|
| 723 |
+
},
|
| 724 |
+
{
|
| 725 |
+
"type": "text",
|
| 726 |
+
"text": "4 EXPERIMENTS ",
|
| 727 |
+
"text_level": 1,
|
| 728 |
+
"bbox": [
|
| 729 |
+
176,
|
| 730 |
+
637,
|
| 731 |
+
326,
|
| 732 |
+
652
|
| 733 |
+
],
|
| 734 |
+
"page_idx": 6
|
| 735 |
+
},
|
| 736 |
+
{
|
| 737 |
+
"type": "text",
|
| 738 |
+
"text": "We benchmarked our models on standard datasets for generative image and video models: downsampled ImageNet (van den Oord et al., 2016a) and BAIR Robot Pushing (Ebert et al., 2017). All Axial Transformers have 8 total layers in the encoder, 8 layers in the outer decoder and 4 layers in the inner decoder. We use a hidden size of 2048 neurons throughout and for all setups and 16 heads with 128 neurons each for the attention component. We train for approximately 200k steps on ImageNet32 and ImageNet64 and for 200k steps on BAIR Robot Pushing. Our models can overfit on ImageNet32, but on the other datasets the models keep on gradually improving with more steps. See table 2 and table 3 for our results. ",
|
| 739 |
+
"bbox": [
|
| 740 |
+
174,
|
| 741 |
+
669,
|
| 742 |
+
825,
|
| 743 |
+
780
|
| 744 |
+
],
|
| 745 |
+
"page_idx": 6
|
| 746 |
+
},
|
| 747 |
+
{
|
| 748 |
+
"type": "text",
|
| 749 |
+
"text": "4.1 ABLATION STUDY ",
|
| 750 |
+
"text_level": 1,
|
| 751 |
+
"bbox": [
|
| 752 |
+
176,
|
| 753 |
+
800,
|
| 754 |
+
339,
|
| 755 |
+
813
|
| 756 |
+
],
|
| 757 |
+
"page_idx": 6
|
| 758 |
+
},
|
| 759 |
+
{
|
| 760 |
+
"type": "text",
|
| 761 |
+
"text": "To push the limits of the semi-parallel sampling by making the inner decoder as small as possible, we train an Axial Transformer with the inner decoder replaced by a single LSTM layer of 2048 units. This slows down training time by about $20 \\%$ on ImageNet32 and about $80 \\%$ on ImageNet64 when maintaining the number of steps and all else fixed. We find that the Axial Transformer $+ \\mathrm { L S T M }$ inner decoder performs rather well on the ImageNet32 and ImageNet64 benchmarks (table 2), thereby also showing the effectiveness of the remaining parts of the Axial Transformer that capture the context of the rows above. We also find however that the full four layers of the inner decoder of the Axial ",
|
| 762 |
+
"bbox": [
|
| 763 |
+
174,
|
| 764 |
+
825,
|
| 765 |
+
825,
|
| 766 |
+
924
|
| 767 |
+
],
|
| 768 |
+
"page_idx": 6
|
| 769 |
+
},
|
| 770 |
+
{
|
| 771 |
+
"type": "text",
|
| 772 |
+
"text": "Transformer provide an additional boost in performance as well as significantly faster training. The Axial Transformer $+ \\mathrm { L S T M }$ inner decoder has the advantage of requiring only a couple of matrixvector products to compute the layers at each autogressive step, comparing favourably with about the 12 matrix-vector products required by the Axial Transformer, but the slower training time would make the LSTM inner decoder quickly impractical for larger tensors. ",
|
| 773 |
+
"bbox": [
|
| 774 |
+
174,
|
| 775 |
+
103,
|
| 776 |
+
825,
|
| 777 |
+
174
|
| 778 |
+
],
|
| 779 |
+
"page_idx": 7
|
| 780 |
+
},
|
| 781 |
+
{
|
| 782 |
+
"type": "text",
|
| 783 |
+
"text": "4.2 SAMPLES ",
|
| 784 |
+
"text_level": 1,
|
| 785 |
+
"bbox": [
|
| 786 |
+
174,
|
| 787 |
+
190,
|
| 788 |
+
281,
|
| 789 |
+
204
|
| 790 |
+
],
|
| 791 |
+
"page_idx": 7
|
| 792 |
+
},
|
| 793 |
+
{
|
| 794 |
+
"type": "text",
|
| 795 |
+
"text": "In fig. 4 and fig. 5, we show samples from our $6 4 \\times 6 4$ and $3 2 \\times 3 2$ ImageNet models. The samples are globally coherent and show visibly recognizable scenes, meaning that our Axial Transformer architecture successfully captures long-range dependencies across thousands of data dimensions in these image datasets. The samples also don’t show any architecture-correlated artefacts. In addition, in fig. 6 we show samples from the BAIR Robotic Pushing dataset. The first frame is each row is given by the dataset and the rest are continuation. We note the high quality exactness of details and the very large diversity (at temperature 1.0). ",
|
| 796 |
+
"bbox": [
|
| 797 |
+
174,
|
| 798 |
+
217,
|
| 799 |
+
825,
|
| 800 |
+
314
|
| 801 |
+
],
|
| 802 |
+
"page_idx": 7
|
| 803 |
+
},
|
| 804 |
+
{
|
| 805 |
+
"type": "text",
|
| 806 |
+
"text": "5 CONCLUSION ",
|
| 807 |
+
"text_level": 1,
|
| 808 |
+
"bbox": [
|
| 809 |
+
176,
|
| 810 |
+
334,
|
| 811 |
+
318,
|
| 812 |
+
349
|
| 813 |
+
],
|
| 814 |
+
"page_idx": 7
|
| 815 |
+
},
|
| 816 |
+
{
|
| 817 |
+
"type": "text",
|
| 818 |
+
"text": "We proposed the Axial Transformer, an self-attention-based autoregressive model for data organized as high dimensional tensors. It is based on axial attention, a simple generalization of self-attention that scales better with the dimension of input data, achieving a $O ( N ^ { ( d - 1 ) / d } )$ savings in computation and memory for a $d$ -dimensional input tensor with $N$ elements. Axial attention is easy to implement and does not require custom kernels to run efficiently on modern accelerators. Axial Transformers use axial self-attention layers and a shift operation to naturally and efficiently build full receptive fields of multidimensional tensors. Our model matches or outperforms the state-of-theart on ImageNet-32 and ImageNet-64 image benchmarks and sets a significant new state-of-the-art on the BAIR Robot Pushing video benchmark. ",
|
| 819 |
+
"bbox": [
|
| 820 |
+
174,
|
| 821 |
+
366,
|
| 822 |
+
825,
|
| 823 |
+
492
|
| 824 |
+
],
|
| 825 |
+
"page_idx": 7
|
| 826 |
+
},
|
| 827 |
+
{
|
| 828 |
+
"type": "image",
|
| 829 |
+
"img_path": "images/8cfedc4c6166b60ba3e089de3451f6d12b62718968d8ae066e8c3a38a7bd8ce5.jpg",
|
| 830 |
+
"image_caption": [
|
| 831 |
+
"Figure 4: $6 4 \\times 6 4$ ImageNet samples at temperature 1.0 "
|
| 832 |
+
],
|
| 833 |
+
"image_footnote": [],
|
| 834 |
+
"bbox": [
|
| 835 |
+
269,
|
| 836 |
+
507,
|
| 837 |
+
723,
|
| 838 |
+
857
|
| 839 |
+
],
|
| 840 |
+
"page_idx": 7
|
| 841 |
+
},
|
| 842 |
+
{
|
| 843 |
+
"type": "image",
|
| 844 |
+
"img_path": "images/1ea3d7346e9d05d60152a87f46673b23004b041a999f90e2299c861e158b143e.jpg",
|
| 845 |
+
"image_caption": [
|
| 846 |
+
"Figure 5: $3 2 \\times 3 2$ ImageNet samples at temperature 0.99 "
|
| 847 |
+
],
|
| 848 |
+
"image_footnote": [],
|
| 849 |
+
"bbox": [
|
| 850 |
+
267,
|
| 851 |
+
136,
|
| 852 |
+
723,
|
| 853 |
+
486
|
| 854 |
+
],
|
| 855 |
+
"page_idx": 8
|
| 856 |
+
},
|
| 857 |
+
{
|
| 858 |
+
"type": "image",
|
| 859 |
+
"img_path": "images/f3b7ac71628e15f7486ef916fc6b50aebe3c4ced355057027fbc7cc9628da94b.jpg",
|
| 860 |
+
"image_caption": [
|
| 861 |
+
"Figure 6: $1 5 \\times 6 4 \\times 6 4$ BAIR Robot Pushing samples at temperature 1.0 "
|
| 862 |
+
],
|
| 863 |
+
"image_footnote": [],
|
| 864 |
+
"bbox": [
|
| 865 |
+
174,
|
| 866 |
+
592,
|
| 867 |
+
825,
|
| 868 |
+
844
|
| 869 |
+
],
|
| 870 |
+
"page_idx": 8
|
| 871 |
+
},
|
| 872 |
+
{
|
| 873 |
+
"type": "text",
|
| 874 |
+
"text": "REFERENCES ",
|
| 875 |
+
"text_level": 1,
|
| 876 |
+
"bbox": [
|
| 877 |
+
174,
|
| 878 |
+
102,
|
| 879 |
+
287,
|
| 880 |
+
117
|
| 881 |
+
],
|
| 882 |
+
"page_idx": 9
|
| 883 |
+
},
|
| 884 |
+
{
|
| 885 |
+
"type": "text",
|
| 886 |
+
"text": "Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. ",
|
| 887 |
+
"bbox": [
|
| 888 |
+
171,
|
| 889 |
+
125,
|
| 890 |
+
823,
|
| 891 |
+
154
|
| 892 |
+
],
|
| 893 |
+
"page_idx": 9
|
| 894 |
+
},
|
| 895 |
+
{
|
| 896 |
+
"type": "text",
|
| 897 |
+
"text": "Xi Chen, Nikhil Mishra, Mostafa Rohaninejad, and Pieter Abbeel. PixelSNAIL: An improved autoregressive generative model. In International Conference on Machine Learning, pp. 863–871, 2018. ",
|
| 898 |
+
"bbox": [
|
| 899 |
+
174,
|
| 900 |
+
160,
|
| 901 |
+
821,
|
| 902 |
+
203
|
| 903 |
+
],
|
| 904 |
+
"page_idx": 9
|
| 905 |
+
},
|
| 906 |
+
{
|
| 907 |
+
"type": "text",
|
| 908 |
+
"text": "Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. arXiv preprint arXiv:1904.10509, 2019. ",
|
| 909 |
+
"bbox": [
|
| 910 |
+
174,
|
| 911 |
+
210,
|
| 912 |
+
823,
|
| 913 |
+
241
|
| 914 |
+
],
|
| 915 |
+
"page_idx": 9
|
| 916 |
+
},
|
| 917 |
+
{
|
| 918 |
+
"type": "text",
|
| 919 |
+
"text": "Frederik Ebert, Chelsea Finn, Alex X Lee, and Sergey Levine. Self-supervised visual planning with temporal skip connections. In Conference on Robot Learning, pp. 344–356, 2017. ",
|
| 920 |
+
"bbox": [
|
| 921 |
+
173,
|
| 922 |
+
247,
|
| 923 |
+
821,
|
| 924 |
+
276
|
| 925 |
+
],
|
| 926 |
+
"page_idx": 9
|
| 927 |
+
},
|
| 928 |
+
{
|
| 929 |
+
"type": "text",
|
| 930 |
+
"text": "Zilong Huang, Xinggang Wang, Lichao Huang, Chang Huang, Yunchao Wei, and Wenyu Liu. Ccnet: Criss-cross attention for semantic segmentation. In Proceedings of the IEEE International Conference on Computer Vision, pp. 603–612, 2019. ",
|
| 931 |
+
"bbox": [
|
| 932 |
+
174,
|
| 933 |
+
284,
|
| 934 |
+
823,
|
| 935 |
+
327
|
| 936 |
+
],
|
| 937 |
+
"page_idx": 9
|
| 938 |
+
},
|
| 939 |
+
{
|
| 940 |
+
"type": "text",
|
| 941 |
+
"text": "Nal Kalchbrenner, Aaron Oord, Karen Simonyan, Ivo Danihelka, Oriol Vinyals, Alex Graves, and ¨ Koray Kavukcuoglu. Video pixel networks. In International Conference on Machine Learning, pp. 1771–1779, 2017. ",
|
| 942 |
+
"bbox": [
|
| 943 |
+
174,
|
| 944 |
+
333,
|
| 945 |
+
825,
|
| 946 |
+
376
|
| 947 |
+
],
|
| 948 |
+
"page_idx": 9
|
| 949 |
+
},
|
| 950 |
+
{
|
| 951 |
+
"type": "text",
|
| 952 |
+
"text": "Manoj Kumar, Mohammad Babaeizadeh, Dumitru Erhan, Chelsea Finn, Sergey Levine, Laurent Dinh, and Durk Kingma. Videoflow: A flow-based generative model for video. arXiv preprint arXiv:1903.01434, 2019. ",
|
| 953 |
+
"bbox": [
|
| 954 |
+
173,
|
| 955 |
+
383,
|
| 956 |
+
826,
|
| 957 |
+
426
|
| 958 |
+
],
|
| 959 |
+
"page_idx": 9
|
| 960 |
+
},
|
| 961 |
+
{
|
| 962 |
+
"type": "text",
|
| 963 |
+
"text": "Jacob Menick and Nal Kalchbrenner. Generating high fidelity images with subscale pixel networks and multidimensional upscaling. arXiv preprint arXiv:1812.01608, 2018. ",
|
| 964 |
+
"bbox": [
|
| 965 |
+
173,
|
| 966 |
+
433,
|
| 967 |
+
821,
|
| 968 |
+
463
|
| 969 |
+
],
|
| 970 |
+
"page_idx": 9
|
| 971 |
+
},
|
| 972 |
+
{
|
| 973 |
+
"type": "text",
|
| 974 |
+
"text": "Ankur P Parikh, Oscar Tackstr ¨ om, Dipanjan Das, and Jakob Uszkoreit. A decomposable attention¨ model for natural language inference. arXiv preprint arXiv:1606.01933, 2016. ",
|
| 975 |
+
"bbox": [
|
| 976 |
+
173,
|
| 977 |
+
469,
|
| 978 |
+
820,
|
| 979 |
+
500
|
| 980 |
+
],
|
| 981 |
+
"page_idx": 9
|
| 982 |
+
},
|
| 983 |
+
{
|
| 984 |
+
"type": "text",
|
| 985 |
+
"text": "Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Lukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. In International Conference on Machine Learning, pp. 4052– 4061, 2018. ",
|
| 986 |
+
"bbox": [
|
| 987 |
+
174,
|
| 988 |
+
506,
|
| 989 |
+
823,
|
| 990 |
+
549
|
| 991 |
+
],
|
| 992 |
+
"page_idx": 9
|
| 993 |
+
},
|
| 994 |
+
{
|
| 995 |
+
"type": "text",
|
| 996 |
+
"text": "Scott Reed, Aaron van den Oord, Nal Kalchbrenner, Sergio G ¨ omez Colmenarejo, Ziyu Wang, Yutian ´ Chen, Dan Belov, and Nando de Freitas. Parallel multiscale autoregressive density estimation. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 2912– 2921. JMLR. org, 2017. ",
|
| 997 |
+
"bbox": [
|
| 998 |
+
173,
|
| 999 |
+
555,
|
| 1000 |
+
826,
|
| 1001 |
+
612
|
| 1002 |
+
],
|
| 1003 |
+
"page_idx": 9
|
| 1004 |
+
},
|
| 1005 |
+
{
|
| 1006 |
+
"type": "text",
|
| 1007 |
+
"text": "Tim Salimans, Andrej Karpathy, Xi Chen, and Diederik P Kingma. PixelCNN $^ { + + }$ : Improving the PixelCNN with discretized logistic mixture likelihood and other modifications. In International Conference on Learning Representations (ICLR), 2017. ",
|
| 1008 |
+
"bbox": [
|
| 1009 |
+
173,
|
| 1010 |
+
619,
|
| 1011 |
+
823,
|
| 1012 |
+
664
|
| 1013 |
+
],
|
| 1014 |
+
"page_idx": 9
|
| 1015 |
+
},
|
| 1016 |
+
{
|
| 1017 |
+
"type": "text",
|
| 1018 |
+
"text": "Lucas Theis and Matthias Bethge. Generative image modeling using spatial lstms. In Advances in Neural Information Processing Systems, pp. 1927–1935, 2015. ",
|
| 1019 |
+
"bbox": [
|
| 1020 |
+
174,
|
| 1021 |
+
670,
|
| 1022 |
+
821,
|
| 1023 |
+
699
|
| 1024 |
+
],
|
| 1025 |
+
"page_idx": 9
|
| 1026 |
+
},
|
| 1027 |
+
{
|
| 1028 |
+
"type": "text",
|
| 1029 |
+
"text": "Benigno Uria, Marc-Alexandre Cotˆ e, Karol Gregor, Iain Murray, and Hugo Larochelle. Neural ´ autoregressive distribution estimation. The Journal of Machine Learning Research, 17(1):7184– 7220, 2016. ",
|
| 1030 |
+
"bbox": [
|
| 1031 |
+
173,
|
| 1032 |
+
705,
|
| 1033 |
+
823,
|
| 1034 |
+
748
|
| 1035 |
+
],
|
| 1036 |
+
"page_idx": 9
|
| 1037 |
+
},
|
| 1038 |
+
{
|
| 1039 |
+
"type": "text",
|
| 1040 |
+
"text": "Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. International Conference on Machine Learning (ICML), 2016a. ",
|
| 1041 |
+
"bbox": [
|
| 1042 |
+
173,
|
| 1043 |
+
756,
|
| 1044 |
+
821,
|
| 1045 |
+
785
|
| 1046 |
+
],
|
| 1047 |
+
"page_idx": 9
|
| 1048 |
+
},
|
| 1049 |
+
{
|
| 1050 |
+
"type": "text",
|
| 1051 |
+
"text": "Aaron van den Oord, Nal Kalchbrenner, Oriol Vinyals, Lasse Espeholt, Alex Graves, and Koray Kavukcuoglu. Conditional image generation with PixelCNN decoders. arXiv preprint arXiv:1606.05328, 2016b. ",
|
| 1052 |
+
"bbox": [
|
| 1053 |
+
173,
|
| 1054 |
+
791,
|
| 1055 |
+
823,
|
| 1056 |
+
835
|
| 1057 |
+
],
|
| 1058 |
+
"page_idx": 9
|
| 1059 |
+
},
|
| 1060 |
+
{
|
| 1061 |
+
"type": "text",
|
| 1062 |
+
"text": "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. ",
|
| 1063 |
+
"bbox": [
|
| 1064 |
+
173,
|
| 1065 |
+
842,
|
| 1066 |
+
821,
|
| 1067 |
+
886
|
| 1068 |
+
],
|
| 1069 |
+
"page_idx": 9
|
| 1070 |
+
},
|
| 1071 |
+
{
|
| 1072 |
+
"type": "text",
|
| 1073 |
+
"text": "Dirk Weissenborn, Oscar Tackstr ¨ om, and Jakob Uszkoreit. Scaling autoregressive video models.¨ arXiv preprint arXiv:1906.02634, 2019. ",
|
| 1074 |
+
"bbox": [
|
| 1075 |
+
169,
|
| 1076 |
+
892,
|
| 1077 |
+
821,
|
| 1078 |
+
921
|
| 1079 |
+
],
|
| 1080 |
+
"page_idx": 9
|
| 1081 |
+
}
|
| 1082 |
+
]
|
parse/train/H1e5GJBtDr/H1e5GJBtDr_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/H1e5GJBtDr/H1e5GJBtDr_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/HksioDcxl/HksioDcxl.md
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# JOINT TRAINING OF RATINGS AND REVIEWS WITHRECURRENT RECOMMENDER NETWORKS
|
| 2 |
+
|
| 3 |
+
Chao-Yuan Wu
|
| 4 |
+
University of Texas at Austin Austin, TX, USA
|
| 5 |
+
cywu@cs.utexas.edu
|
| 6 |
+
Amr Ahmed & Alex Beutel∗
|
| 7 |
+
Google
|
| 8 |
+
Mountain View, CA, USA
|
| 9 |
+
{amra,alexbeutel}@google.com
|
| 10 |
+
|
| 11 |
+
Alexander J. Smola Carnegie Mellon University Pittsburgh, PA, USA alex@smola.org
|
| 12 |
+
|
| 13 |
+
# ABSTRACT
|
| 14 |
+
|
| 15 |
+
Accurate modeling of ratings and text reviews is at the core of successful recommender systems. While neural networks have been remarkably successful in modeling images and natural language, they have been largely unexplored in recommender system research. In this paper, we provide a neural network model that combines ratings, reviews, and temporal patterns to learn highly accurate recommendations. We co-train for prediction on both numerical ratings and natural language reviews, as well as using a recurrent architecture to capture the dynamic components of users’ and items’ states. We demonstrate that incorporating text reviews and temporal dynamic gives state-of-the-art results over the IMDb dataset.
|
| 16 |
+
|
| 17 |
+
# 1 INTRODUCTION
|
| 18 |
+
|
| 19 |
+
Designing highly accurate recommender systems has been the focus of research in many communities and at the center of many products for the past decade. The core goal is to predict which items a given user will like or dislike, typically based on a database of previous ratings and reviews. In particular, a good recommender system has been defined as one that predicts the rating for randomly chosen and unseen (user,item) pairs. During the Netflix Prize contest, a variety of factorization models were proposed to capture the latent embeddings of users and items that would lead to accurate recommendations (Bell & Koren, 2007; Koren et al., 2009). Generative models for personalized ratings have recently become popular, due to impressive and robust results (Mnih & Salakhutdinov, 2007; Salakhutdinov & Mnih, 2008; Stern et al., 2009; Beutel et al., 2015).
|
| 20 |
+
|
| 21 |
+
More recently, there has been an interest in the recommender system community to also make use of the rich natural language reviews provided by users. Most often, these reviews have been transformed into a bag-of-words-model and used as a sort of regularization for the rating predictions (McAuley & Leskovec, 2013; Diao et al., 2014; Almahairi et al., 2015; Wu et al., 2016b). Using reviews in this way has been found to improve prediction accuracy, and in some cases provide detailed explanations for the recommendations.
|
| 22 |
+
|
| 23 |
+
This previous research has been remarkably successful, but has two significant limitations that we discuss and address in this paper. First, prediction accuracy has rarely been measured by the ability of a model to predict future ratings. Rather, recommendation accuracy has been derived from a random split of the ratings data, which undermines our understanding of the models’ usefulness in practice. Here, we focus on predicting future ratings, splitting our training and testing data by date. In order to be successful at this task, we incorporate the time of ratings and reviews in our model structure and training. Koren (2010) previously derived temporal features of ratings data, but used these features to remove temporal effects since the metric of success was interpolation, not extrapolation. More recently, Recurrent Recommender Networks (RNN) use a recurrent neural network to capture changes in both user preferences and item perceptions, and extrapolate future ratings in an autoregressive way (Wu et al., 2016a). However, temporal patterns in reviews are largely unexplored. Note that just like ratings, reviews also depend on changing factors, such as user writing styles, user preferences, movie perceptions, or the popularity of certain slang words or emoticons. Here we use a generative LSTM model that is able to jointly model the temporal effects in ratings and reviews.
|
| 24 |
+
|
| 25 |
+
Second, models of reviews in recommender system fall significantly behind the state-of-the-art in natural language processing. The bag-of-words model used in previous research improves over not using text, but is limited in the degree to which it can understand the review. In fact, the drawback of an underfitting model is especially salient in the case of reviews, because they are much more diverse and unstructured than regular documents. Recently there has been significant research attention on modeling natural language with neural networks, with encouraging results (Lipton et al., 2015; Yang et al., 2016). Here, we combine these powerful neural-based language models with recurrent neural network to learn both accurate recommendations and accurate reviews. Our main contributions are as follows:
|
| 26 |
+
|
| 27 |
+
• Joint generative model: We propose a novel joint model of ratings and reviews via interacting recurrent networks (particularly LSTM).
|
| 28 |
+
• Nonlinear nonparametric review model: By learning a function of user and movie state dynamics, we can capture the evolution of reviews (as well as ratings) over time.
|
| 29 |
+
• Experiments show that by jointly modeling ratings and reviews along with temporal patterns, our model achieves state-of-the-art results on IMDb dataset in terms of forward prediction, i.e. in the realistic scenario where we use only ratings strictly prior to prediction time to predict future ratings.
|
| 30 |
+
|
| 31 |
+
# 2 RELATED WORK
|
| 32 |
+
|
| 33 |
+
Collaborative Filtering As mentioned in the introduction, recommender systems have been the focus of many different research communities. The Netflix Prize generated a flurry of research to improve recommendation accuracy, with a variety of matrix factorization models being proposed (Bell & Koren, 2007; Koren et al., 2009; Koren, 2008). During the Netflix competition and more afterwards, a stream of research has focused on designing generative Bayesian models for user ratings data (Mnih & Salakhutdinov, 2007; Salakhutdinov & Mnih, 2008; Stern et al., 2009; Beutel et al., 2014; 2015). Nearly all of these models predict ratings by an inner product between a latent user embedding and a latent item embedding; different approaches primarily regularization, e.g., Bayesian models and learning algorithms capture uncertainty in the data.
|
| 34 |
+
|
| 35 |
+
Other models have tried to capture interesting patterns discovered in ratings data. As an example, Beutel et al. (2014) finds that some ratings form bimodal rather than Gaussian distributions and designs a model to accommodate this diversity. More closely related to this work, Koren (2010) designs many features to capture and remove the temporal effects in ratings data. By removing these temporal effects, Koren (2010) learns better stationary embeddings for users and items. Work such as this improves prediction accuracy, but has two drawbacks: (1) it requires time consuming feature engineering, and (2) it focuses on interpolation rather than extrapolation into the future. Wu et al. (2016a) addresses both of these concerns by learning a function for the evolution of user preferences and item properties. However, this work focuses exclusively on modeling ratings over time and, in a large part, on the qualitative patterns discovered in the Netflix dataset. Here we focus on the model itself and, in particular, the interaction of jointly understanding ratings, reviews, and temporal patterns.
|
| 36 |
+
|
| 37 |
+
Review Modeling Although the most common metric for recommendation accuracy has been rating prediction, natural language reviews provide rich, detailed insight into user preferences. Most often, reviews have been used in a bag-of-words model to regularize rating prediction (McAuley & Leskovec, 2013; Diao et al., 2014; Wu et al., 2016b). For example, McAuley & Leskovec (2013) effectively learns a topic model of reviews regularize item embeddings. By using such coarse models, the impact of and insight from reviews is limited. More recently, Almahairi et al. (2015) use neural network based review models to regularize hidden factors, but their model assumes only stationary states.
|
| 38 |
+
|
| 39 |
+

|
| 40 |
+
Figure 1: As shown on the left, previous recommendation models learn static stationary embeddings for users and movies to predict ratings. As shown on the right, we can also capture temporal effects present in the data. We have both user and movie embeddings follow a Markov chain, and use these dynamic embeddings (along with stationary ones not shown) to predict both ratings and text reviews.
|
| 41 |
+
|
| 42 |
+
Interestingly, data mining research has found that review patterns are dynamic, with different language being adopted by communities over time (Danescu-Niculescu-Mizil et al., 2013). Therefore, it is important to capture not just the dynamics of ratings, but also the language used to justify those ratings.
|
| 43 |
+
|
| 44 |
+
Neural Networks Neural networks have recently offered large improvements in natural language processing. More recently, a few papers have focused these natural language models on online reviews (Lipton et al., 2015; Yang et al., 2016). However, while these papers do model online reviews, they differ greatly from our work in that they are not actually used for recommendation.
|
| 45 |
+
|
| 46 |
+
With the recent remarkable successes of neural networks in other domains, there has been growing attention on using neural networks for model graphs and ratings data. Most similar, Sedhain et al. (2015) design an autoencoder for collaborative filtering.
|
| 47 |
+
|
| 48 |
+
LSTM and Recurrent Network Recurrent neural network provides a powerful tool to nonparametrically model temporal data by using a latent variable autoregressive model as follows:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\hat { z } _ { t + 1 } = f ( h _ { t } , z _ { t } ) \mathrm { a n d } h _ { t + 1 } = g ( h _ { t } , z _ { t + 1 } ) .
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
Where $z _ { t }$ is the observation at time $t$ , $\hat { z } _ { t }$ is the model associated estimate, and $h _ { t }$ denotes the latent state. A popular class of RNN is the Long Short Term Memory (LSTM) (Hochreiter $\&$ Schmidhuber, 1997) and we use this as a building block in our model .The state updates is given below:
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
\begin{array} { r l } & { [ f _ { t } , i _ { t } , o _ { t } ] = \sigma \left[ W \left[ h _ { t - 1 } , z _ { t } \right] + b \right] } \\ & { \quad \quad \quad l _ { t } = \operatorname { t a n h } \left[ V \left[ h _ { t - 1 } , z _ { t } \right] + d \right] } \\ & { \quad \quad \quad c _ { t } = f _ { t } \cdot c _ { t - 1 } + i _ { t } \cdot l _ { t } } \\ & { \quad \quad \quad h _ { t } = o _ { t } \cdot \operatorname { t a n h } ( c _ { t } ) , } \end{array}
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
where $f _ { t } , i _ { t } , o _ { t }$ denote the forget gate, input gate and the output gate respectively. For simplicity in the following we denote this set of operations by $h _ { t } = \mathrm { L S T M } ( h _ { t - 1 } , z _ { t } )$ . We will refer to $h _ { t }$ as the output embedding from the LSTM.
|
| 61 |
+
|
| 62 |
+
# 3 MODEL
|
| 63 |
+
|
| 64 |
+
A comparison of our model with traditional recommender systems is illustrated in Figure 1. In previous recommender systems, ratings are assumed to be a function of stationary user and movie embeddings. Here we consider dynamic embeddings that predict both ratings and text reviews at a given time step.
|
| 65 |
+
|
| 66 |
+
Figure 2 shows a depiction of our model: Joint Review-Rating Recurrent Recommender Network. In addition to stationary embeddings as used in traditional recommender systems, here we use two
|
| 67 |
+
|
| 68 |
+

|
| 69 |
+
Figure 2: Joint Review-Rating Recurrent Recommender Networks: We use recurrent networks to capture the temporal evolution of user and movies states. The recurrent networks depend on the ratings of a user (and movie) in previous time steps. We combine these dynamic states with classic stationary states. We directly use all of these states to predict ratings, and use them within an LSTM to model review text.
|
| 70 |
+
|
| 71 |
+
LSTM RNNs that take user/movie history as input to capture the temporal dynamics in both user and movie states. Given stationary and dynamic states of user $i$ and movie $j$ , we define generator functions that emit both rating $r _ { i j } | t$ and reviews $o _ { i j } | t$ at time step $t$ . Formally,
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
\begin{array} { r } { r _ { i j } | t = f ( u _ { i } , m _ { j } , u _ { i t } , m _ { j t } ) \quad \mathrm { a n d } \quad o _ { i j } | t = \psi ( u _ { i } , m _ { j } , u _ { i t } , m _ { j t } ) } \\ { u _ { i , t + 1 } = g ( u _ { i t } , \{ r _ { i j } | t \} ) \quad \mathrm { a n d } \quad m _ { j , t + 1 } = h ( m _ { j t } , \{ r _ { i j } | t \} ) , } \end{array}
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
where $u _ { i }$ and $m _ { j }$ denote stationary states, and $u _ { i t }$ and $m _ { i t }$ denote the dynamic state at $t$ . Note that with learned $f , \psi , g$ and $h$ and given user/movie history, an user/movie state can be inferred without further optimization. In other words, different from traditional recommender systems, here we learn the functions that find the states instead of learning the states directly.
|
| 78 |
+
|
| 79 |
+
# 3.1 DYNAMIC USER AND MOVIE STATE
|
| 80 |
+
|
| 81 |
+
Here we give a detailed description on the RNNs that find the dynamic states. The key idea is to use user/movie rating history as inputs to update the states. In this way we are able to model causality instead of just finding correlation. That is, we can model e.g. the change of user (movie) state caused by having watched and liked/disliked a movie (being liked/disliked by certain users). At each step, the network takes
|
| 82 |
+
|
| 83 |
+
$$
|
| 84 |
+
y _ { t } : = W _ { \mathrm { e m b e d } } \left[ x _ { t } , 1 _ { \mathrm { n e w b i e } } , \tau _ { t } , \tau _ { t - 1 } \right] ,
|
| 85 |
+
$$
|
| 86 |
+
|
| 87 |
+
where $x _ { t }$ is the rating vector, $1 _ { \mathrm { n e w b i e } }$ is the indicator for new users, and $\tau _ { t }$ is wall-clock time. The $j$ th element of $x _ { t }$ is the rating the user gives for movie $j$ at time $t$ , and 0 otherwise. $1 _ { \mathrm { n e w b i e } }$ effectively select a default embedding for a new user, and $\tau _ { t }$ and $\tau _ { t - 1 }$ gives the model the information to synchronize between RNNs and model the effects such as rating scale change or movie age. Note that with the inclusion of $\tau \mathrm { s }$ , we do not need to include the steps where a user did not rate any movie, and this can drastically speed up training. The state update is given by standard $u _ { t } : = \mathrm { L S T M } ( u _ { t - 1 } , y _ { t } )$ . In the above we omit user index for clarity. In cases where we need to distinguish different users (and movies) such as in Figure 2, we use additional index $i$ for user $i$ as in $u _ { i t }$ , and similarly for movie $j$ in $m _ { j t }$ .
|
| 88 |
+
|
| 89 |
+
# 3.2 RATING EMISSIONS
|
| 90 |
+
|
| 91 |
+
We supplement the time-varying profile vectors $u _ { i t }$ and $m _ { j t }$ with stationary ones $u _ { i }$ and $m _ { j }$ respectively. These stationary components encode time-invariant properties such as long-term preference of a user or the genre of a movie.
|
| 92 |
+
|
| 93 |
+
The review rating is thus modeled as a function of both dynamic and stationary states, i.e.
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
r _ { i j } = f ( u _ { i t } , m _ { j t } , u _ { i } , m _ { j } ) : = \langle \tilde { u } _ { i t } , \tilde { m } _ { j t } \rangle + \langle u _ { i } , m _ { j } \rangle
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
where $\tilde { u } _ { i t }$ and $\tilde { m } _ { j t }$ are affine functions of $u _ { i t }$ and $m _ { j t }$ respectively. That is, we have
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\tilde { u } _ { i t } = W _ { \mathrm { u s e r } } u _ { i t } + b _ { \mathrm { u s e r } } \ \mathrm { a n d } \ \tilde { m } _ { j t } = W _ { \mathrm { m o v i e } } m _ { j t } + b _ { \mathrm { m o v i e } }
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
This makes the model a strict superset of popular matrix factorization recommender systems that accounts for stationary effects, while we use LSTMs, on top of that, to model longer-range dynamic updates.
|
| 106 |
+
|
| 107 |
+
# 3.3 REVIEW TEXT MODEL
|
| 108 |
+
|
| 109 |
+
Review text is modeled by a character-level LSTM network. This network shares the same user/movie latent states with the rating model. After all, the purpose of a review is to explain its rating score. We fuse the stationary and dynamic states of both user of movie by the bottleneck layer $x _ { \mathrm { j o i n t } , i j }$ given below:
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
\begin{array} { r l } & { x _ { \mathrm { j o i n t } , i j } : = \phi ( W _ { \mathrm { j o i n t } } \left[ u _ { i t } , m _ { j t } , u _ { i } , m _ { j } \right] + b _ { \mathrm { j o i n t } } ) } \\ & { \quad \tilde { x } _ { i j , k } : = \left[ x _ { o _ { i j , k } } , x _ { \mathrm { j o i n t } , i j } \right] } \end{array}
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
where $o _ { i j , k }$ denotes the character at position $k$ for the review given by user $i$ to movie $j$ , and $x _ { o _ { i j , k } }$ denotes the embedding of the character. $\phi$ here is some non-linear function.
|
| 116 |
+
|
| 117 |
+
The review text emission model is itself an RNN, specifically a character-level LSTM generative model. For character index $k = 1 , 2 , \dots$ ,
|
| 118 |
+
|
| 119 |
+
$$
|
| 120 |
+
\begin{array} { r l } & { h _ { i j , k } : = \mathrm { L S T M } ( h _ { i j , k - 1 } , \tilde { x } _ { i j , k } ) } \\ & { \hat { o } _ { i j , k } : = \mathrm { s o f t m a x } \left( W _ { \mathrm { o u t } } h _ { i j , k } + b _ { \mathrm { o u t } } \right) } \end{array}
|
| 121 |
+
$$
|
| 122 |
+
|
| 123 |
+
Here a softmax layer at output of LSTM is used to predict the next character. Generating text conditioned on contents has been applied to various areas, such as machine translation (Sutskever et al., 2014), question answering (Gao et al., 2015), or image captioning (Vinyals et al., 2015). Probably the most similar approach is Lipton et al. (2015), but it conditions review generation on observed ratings instead of latent states.
|
| 124 |
+
|
| 125 |
+
# 3.4 PREDICTION
|
| 126 |
+
|
| 127 |
+
In prediction time, we make rating predictions based on predicted future states. That is, we take the latest ratings as input to update the states, and use the newly predicted states to predict ratings. This differs from traditional approaches where embeddings are estimated instead of inferred.
|
| 128 |
+
|
| 129 |
+
# 3.5 TRAINING
|
| 130 |
+
|
| 131 |
+
Our goal is to predict both accurate ratings and accurate reviews, and thus we minimize
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
L : = \sum _ { ( i , j ) \in \mathcal { D } _ { \mathrm { t r a i n } } } \left[ \left( \hat { r } _ { i j } ( \theta ) - r _ { i j } \right) ^ { 2 } - \lambda \sum _ { k = 1 } ^ { n _ { i j } } \log \left( \operatorname* { P r } ( o _ { i j , k } | \theta ) \right) \right] ,
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
where $\mathcal { D } _ { \mathrm { t r a i n } }$ is the training set of $( i , j )$ pairs, $\theta$ denotes all model parameters, and $n _ { i j }$ is the number of characters in the review user $i$ gives to movie $j$ . The first term corresponds to the deviation of the prediction from the actual rating, and the second term is the likelihood of the text reviews. $\lambda$ controls the weight between predicting accurate ratings and predicting accurate reviews. Our training follows the subspace descent strategy in $\mathrm { { W u } }$ et al. (2016a). That is, while the review generative model is updated in every iteration, the user-state and movie-state RNNs are updated in an alternating way.
|
| 138 |
+
|
| 139 |
+
Table 1: IMDb dataset comprises reviews and ratings collected from July 1998 to September 2013. Netflix 6 months data is a subset of original Netflix prize dataset that is split based on time.
|
| 140 |
+
|
| 141 |
+
<table><tr><td>Data</td><td></td><td></td><td>#users</td><td>#items</td><td># ratings (reviews)</td><td># characters</td></tr><tr><td>IMDb</td><td>Train Test</td><td>Jul 98 - Dec 12 Jan 13 - Sep 13</td><td>6,127</td><td>8,002</td><td>402.3k 11.0k</td><td>690.6M 21.6M</td></tr><tr><td>Netflix 6 months</td><td>Train Test</td><td>Jun - Nov 11 Dec 11</td><td>311.3k</td><td>17.7k</td><td>13.7M 2.1M</td><td>1 1</td></tr></table>
|
| 142 |
+
|
| 143 |
+
The gradients are calculated with standard backpropagation. Furthermore, we pre-warm train the review LSTM over the review text excluding the auxiliary input from the user and movie states. It is undesirable if the review likelihood overwhelms the rating. We hence normalize review likelihood by the number of characters in a review so that it does not dominates the rating likelihood. This technique is common in NLP literature (Wang & McCallum, 2006).
|
| 144 |
+
|
| 145 |
+
# 4 EXPERIMENTS
|
| 146 |
+
|
| 147 |
+
In this section we empirically demonstrate the ability of our model to accurately predict both ratings and reviews, and capture temporal dynamics.
|
| 148 |
+
|
| 149 |
+
# 4.1 EXPERIMENTAL SETUP
|
| 150 |
+
|
| 151 |
+
In the following experiments, we select hyperparameters, optimization parameters and model architecture by cross-validation. The details are as follows. We use 1-layer LSTM recurrent neural networks with 40 hidden factors for user/movie state transitions. The input of this LSTM is an user/item embedding of dimension 40. Stationary and dynamic factors are 160 and 40-dimensional respectively. A 2-layer LSTM network is used to model texts, which takes 30-dimensional character embedding $x _ { \mathrm { c h a r } }$ , 40-dimensional state vector $x _ { \mathrm { j o i n t } }$ , and a 50-dimensional movie embedding $x _ { \mathrm { m o v i e } }$
|
| 152 |
+
|
| 153 |
+
To speed up convergence, we initialize the text model by a character-level RNN pre-trained without considering rating. Stationary factors are initialized by a pre-trained iAutoRec (Sedhain et al., 2015) model based on the last layer. We initialize all the other parameters from uniform distribution between $[ - a , a ]$ with $a = \sqrt { 1 . 5 ( f _ { i n } + f _ { o u t } ) }$ , where $f _ { i n }$ and $f _ { o u t }$ are fan-in and fan-out of transition matrices. $\ell _ { 2 }$ regularization with magnitude 0.001 is applied to all parameters. Dropout with a 0.5 rate is applied after all fully-connected layers. To prevent exploding gradients in of LSTM, gradients are clipped to $[ - 1 5 , 1 5 ]$ . ADAM (Kingma & Ba, 2014) with learning rate 0.0015 is used for optimization.
|
| 154 |
+
|
| 155 |
+

|
| 156 |
+
Figure 3: Characteristics of IMDb dataset.
|
| 157 |
+
|
| 158 |
+
Data Here we focus on movie recommendations, where the opinions are highly dynamic. We evaluate our model on IMDb dataset, first used in Diao et al. (2014), that is the only large-scale movie
|
| 159 |
+
|
| 160 |
+
<table><tr><td></td><td>PMF</td><td>Time-SVD++</td><td>U-AutoRec</td><td>I-AutoRec</td><td>RRN (rating)</td><td>RRN (rating + text)</td></tr><tr><td>IMDb</td><td>1.7355</td><td>1.7348</td><td>1.7332</td><td>1.7135</td><td>1.7047</td><td>1.7012</td></tr><tr><td>Netflix 6 months</td><td>0.9584</td><td>0.9589</td><td>0.9836</td><td>0.9778</td><td>0.9427</td><td></td></tr></table>
|
| 161 |
+
|
| 162 |
+
Table 2: RRN outperforms competing models in terms of RMSE. In addition, jointly modeling ratings and reviews achieves even better accuracy.
|
| 163 |
+
|
| 164 |
+
review dataset available. Restaurant recommendations (e.g. Yelp) could be also a suitable domain, but full rating history is not available in publicly available datasets1.
|
| 165 |
+
|
| 166 |
+
The IMDb dataset contains full review and rating history of all users and all movies from 1998 to 2013. The characteristics of this dataset is shown in Figure 3. We see that the user and movie ratings follow heavy tail distributions, and thus the majority of users and movies have very few reviews, making accurate recommendation challenging for these users and movies. Review length is summarized in Figure 3 (c). Since one of the major goal of this project is to study temporal dynamics, we focus on users and items that have multiple interactions with the system. Specifically, we select a subset of $\mathbf { k }$ -core of the graph with $k = 1 5$ . That is, each user and movie has at least 15 ratings in this subset. Note that the resulting subgraph is still very sparse – with only $0 . 8 \%$ density, which is sparser than for example, $1 . 2 \%$ density of Netflix dataset . For completeness, we also include the 6-month Netflix dataset as used in $\mathrm { W u }$ et al. (2016a), which has only ratings, to study RRN’s ability to model temporal patterns.
|
| 167 |
+
|
| 168 |
+
The dataset is split by date instead of random sampling to simulate the real recommendation settings where we need to predict into the future instead of interpolating the past. IMDb training set contains all ratings from July 1998 to December 2012, and the ratings from January to September 2013 are randomly split into a validation set and a test set. Similarly, the 6-month Netflix dataset is split into January to November 2011 (training) and December 2011 (testing and validation). We report the results on testing set with the model that gives the best results on validation set. The summary of this dataset is given in Table 1.
|
| 169 |
+
|
| 170 |
+
Baselines We compare our model with models including the state-of-the-art temporal model, and a state-of-the-art neural network-based model.
|
| 171 |
+
|
| 172 |
+
• PMF (Mnih & Salakhutdinov, 2007): Our model extends matrix factorization by including a dynamic part and a joint review model. Comparing to PMF directly shows us the advantage of our approaches. LIBPMF (Yu et al., 2012) is used in experiments. • Time- $\mathbf { S V D + + }$ (Koren, 2010): Time- ${ \mathrm { S V D } } + +$ is the state-of-the-art model for temporal effects. It achieves excellent performance in Netflix contest. Implementation in GraphChi (Kyrola et al., 2012) is used in experiments. AutoRec (Sedhain et al., 2015): AutoRec is the state-of-the-art neural network recommender system. It learns an autoencoder that encodes user (item) histories into a lowdimensional space and then predict ratings by decoding. No temporal effects or causality are considered in this model. We use the software the authors provide in experiments.
|
| 173 |
+
|
| 174 |
+
All models use comparable number of factor sizes. Parameters of PMF and Time- $S _ { Ḋ } \mathrm { Ḋ } \mathrm { Ḋ } + + Ḍ Ḍ Ḍ$ are selected by grid-search. Settings of AutoRec follow the original paper. We also include the performance of rating-only RRN, as in Wu et al. (2016a), to separate the benefits obtained from temporal modeling and review texts.
|
| 175 |
+
|
| 176 |
+
# 4.2 RATING PREDICTION
|
| 177 |
+
|
| 178 |
+
One important goal of recommender systems is making accurate rating predictions. Here we evaluate the accuracy by root-mean-square error (RMSE) of prediction from the true rating. The results are summarized in Table 2. For completeness, we include the results from Wu et al. (2016a) on
|
| 179 |
+
|
| 180 |
+
6-month Netflix dataset that use ratings only to compare the behavior of different models on different datasets. We see that rating-only RRN outperforms all baseline models in terms of rating prediction consistently in both dataset. More importantly, joint-modeling ratings and reviews boosts the performance even more, compared to rating-only RRN. This implies that by sharing statistical strength between ratings and reviews, the rich information in reviews helps us estimate the latent factors better. Note that while the absolute improvements in RMSE might not appear to be huge, the $1 . 9 8 \%$ improvement over PMF is actually considerable in terms of recommendations2. We also see that while Time- $S _ { Ḋ } \mathrm { Ḋ } \mathrm { Ḋ } \mathrm { Ḋ } \mathrm { Ḍ + + Ḍ } Ḍ Ḍ$ performs well in Netflix contest, it does not work as well for predicting future ratings. After all, the goal of Time- ${ \mathrm { S V D } } + +$ is estimating the temporal bias in hindsight instead of extrapolating into future states.
|
| 181 |
+
|
| 182 |
+
# 4.3 TEXT MODELING
|
| 183 |
+
|
| 184 |
+
Here we examine the impact of conditioning on user and item states for text modeling. Towards this end, we compare perplexity of characters in testing set with and without using the user/item factors. Perplexity is defined as
|
| 185 |
+
|
| 186 |
+
$$
|
| 187 |
+
\mathrm { p p x } ( D _ { t e s t } ) = \exp \left( - \frac { 1 } { N _ { c } } \sum _ { c \in D _ { t e s t } } \log \mathrm { P r } ( c ) \right) ,
|
| 188 |
+
$$
|
| 189 |
+
|
| 190 |
+
where $N _ { c }$ is the total number of characters in $D _ { t e s t }$ , and $\operatorname* { P r } ( c )$ is the likelihood of character $c$ Interestingly, we found that by jointly training with user and item states, the perplexity improves from 3.3442 to 3.3362.
|
| 191 |
+
|
| 192 |
+
# 4.4 TEMPORAL DYNAMICS
|
| 193 |
+
|
| 194 |
+
Here we study if RRN is able to automatically capture the overall rating trends in IMDb by adaptively updating states along history sequence. Specifically, at each time step, we randomly sample up to 1000 users, and see what ratings the users would have given to each of the movie given their states at the time step, even in reality the user might not have given a rating to the movie. This gives us an unbiased estimation of average behavior of our model on each of the ratings. Figure 4 shows the average predicted ratings in this setting and the true average rating in the data set. We see that RRN clearly captures the overall trend in IMDb smoothly.
|
| 195 |
+
|
| 196 |
+

|
| 197 |
+
Figure 4: RRN is able to capture the overall trend of data. (a) show the average ratings of all movies on IMDb over time. In (b) we see the predicted ratings are consistent with this trend.
|
| 198 |
+
|
| 199 |
+
# 5 DISCUSSION & CONCLUSION
|
| 200 |
+
|
| 201 |
+
We present a novel approach that jointly models ratings, reviews, and their temporal dynamics with RRN. The contributions we have provided are as follows:
|
| 202 |
+
|
| 203 |
+
1. Joint rating-review modeling: We offer an LSTM-based joint rating-review model that provides advantages in both rating prediction and text modeling.
|
| 204 |
+
2. Nonparametric dynamic review modeling: RRN is based on an autoregressive method to model temporal dynamics of users and movies, allowing us to capture how reviews change over time.
|
| 205 |
+
3. Empirical results: We demonstrate that our joint model offers state-of-the-art results on rating prediction in real recommendation settings, i.e. predicting into the future.
|
| 206 |
+
|
| 207 |
+
# REFERENCES
|
| 208 |
+
|
| 209 |
+
Amjad Almahairi, Kyle Kastner, Kyunghyun Cho, and Aaron Courville. Learning distributed representations from reviews for collaborative filtering. In Proceedings of the 9th ACM Conference on Recommender Systems, pp. 147–154. ACM, 2015.
|
| 210 |
+
|
| 211 |
+
R. M. Bell and Y. Koren. Lessons from the netflix prize challenge. SIGKDD Explorations, 2007. URL http://doi.acm.org/10.1145/1345448.1345465.
|
| 212 |
+
|
| 213 |
+
Alex Beutel, Kenton Murray, Christos Faloutsos, and Alexander J Smola. Cobafi: collaborative bayesian filtering. In WWW, 2014.
|
| 214 |
+
|
| 215 |
+
Alex Beutel, Amr Ahmed, and Alexander J Smola. ACCAMS: Additive Co-Clustering to Approximate Matrices Succinctly. In WWW, 2015.
|
| 216 |
+
|
| 217 |
+
Cristian Danescu-Niculescu-Mizil, Robert West, Dan Jurafsky, Jure Leskovec, and Christopher Potts. No country for old members: User lifecycle and linguistic change in online communities. In WWW, 2013.
|
| 218 |
+
|
| 219 |
+
Qiming Diao, Minghui Qiu, Chao-Yuan Wu, Alexander J Smola, Jing Jiang, and Chong Wang. Jointly modeling aspects, ratings and sentiments for movie recommendation (jmars). In KDD. ACM, 2014.
|
| 220 |
+
|
| 221 |
+
Haoyuan Gao, Junhua Mao, Jie Zhou, Zhiheng Huang, Lei Wang, and Wei Xu. Are you talking to a machine? dataset and methods for multilingual image question answering. In NIPS, 2015.
|
| 222 |
+
|
| 223 |
+
Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8): 1735–1780, 1997.
|
| 224 |
+
|
| 225 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 226 |
+
|
| 227 |
+
Y. Koren. Factorization meets the neighborhood: a multifaceted collaborative filtering model. In KDD, 2008. URL http://doi.acm.org/10.1145/1401890.1401944.
|
| 228 |
+
|
| 229 |
+
Y. Koren, R.M. Bell, and C. Volinsky. Matrix factorization techniques for recommender systems. IEEE Computer, 2009. URL http://doi.ieeecomputersociety.org/10.1109/MC. 2009.263.
|
| 230 |
+
|
| 231 |
+
Yehuda Koren. Collaborative filtering with temporal dynamics. Communications of the ACM, 53(4): 89–97, 2010.
|
| 232 |
+
|
| 233 |
+
Aapo Kyrola, Guy Blelloch, and Carlos Guestrin. Graphchi: Large-scale graph computation on just a pc. In OSDI, 2012.
|
| 234 |
+
|
| 235 |
+
Zachary Chase Lipton, Sharad Vikram, and Julian McAuley. Capturing meaning in product reviews with character-level generative text models. CoRR, 2015.
|
| 236 |
+
|
| 237 |
+
J. McAuley and J. Leskovec. Hidden Factors and Hidden Topics: Understanding Rating Dimensions with Review Text. In RecSys, 2013. URL http://doi.acm.org/10.1145/2507157. 2507163.
|
| 238 |
+
|
| 239 |
+
Andriy Mnih and Ruslan Salakhutdinov. Probabilistic matrix factorization. In NIPS, 2007.
|
| 240 |
+
|
| 241 |
+
R. Salakhutdinov and A. Mnih. Bayesian probabilistic matrix factorization using markov chain monte carlo. In W.W. Cohen, A. McCallum, and S.T. Roweis (eds.), ICML, 2008.
|
| 242 |
+
|
| 243 |
+
Suvash Sedhain, Aditya Krishna Menon, Scott Sanner, and Lexing Xie. Autorec: Autoencoders meet collaborative filtering. In WWW Companion, 2015.
|
| 244 |
+
|
| 245 |
+
David H Stern, Ralf Herbrich, and Thore Graepel. Matchbox: large scale online bayesian recommendations. In WWW. ACM, 2009.
|
| 246 |
+
|
| 247 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In NIPS, 2014.
|
| 248 |
+
|
| 249 |
+
Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and tell: A neural image caption generator. In CVPR, 2015.
|
| 250 |
+
Xuerui Wang and Andrew McCallum. Topics over time: a non-markov continuous-time model of topical trends. In KDD. ACM, 2006.
|
| 251 |
+
C.-Y. Wu, A. Beutel, A. Ahmed, A. J. Smola, and H. Jing. Recurrent recommender networks. In Web Science and Data Mining (WSDM), 2016a.
|
| 252 |
+
Chao-Yuan Wu, Alex Beutel, Amr Ahmed, and Alexander J. Smola. Explaining reviews and ratings with PACO: poisson additive co-clustering. In WWW Companion, 2016b. doi: 10.1145/2872518. 2889400. URL http://doi.acm.org/10.1145/2872518.2889400.
|
| 253 |
+
Zichao Yang, Diyi Yang, Chris Dyer, Xiaodong He, Alexander J. Smola, and Eduard Hovy. Hierarchical attention networks for document classification. In NAACL, 2016.
|
| 254 |
+
Hsiang-Fu Yu, Cho-Jui Hsieh, Si Si, and Inderjit S. Dhillon. Scalable coordinate descent approaches to parallel matrix factorization for recommender systems. In ICDM, 2012.
|
parse/train/HksioDcxl/HksioDcxl_content_list.json
ADDED
|
@@ -0,0 +1,1262 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "JOINT TRAINING OF RATINGS AND REVIEWS WITHRECURRENT RECOMMENDER NETWORKS",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
99,
|
| 9 |
+
784,
|
| 10 |
+
146
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Chao-Yuan Wu \nUniversity of Texas at Austin Austin, TX, USA \ncywu@cs.utexas.edu \nAmr Ahmed & Alex Beutel∗ \nGoogle \nMountain View, CA, USA \n{amra,alexbeutel}@google.com ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
184,
|
| 19 |
+
170,
|
| 20 |
+
377,
|
| 21 |
+
226
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "",
|
| 28 |
+
"bbox": [
|
| 29 |
+
537,
|
| 30 |
+
170,
|
| 31 |
+
813,
|
| 32 |
+
226
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "Alexander J. Smola Carnegie Mellon University Pittsburgh, PA, USA alex@smola.org ",
|
| 39 |
+
"bbox": [
|
| 40 |
+
184,
|
| 41 |
+
247,
|
| 42 |
+
367,
|
| 43 |
+
303
|
| 44 |
+
],
|
| 45 |
+
"page_idx": 0
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "text",
|
| 49 |
+
"text": "ABSTRACT ",
|
| 50 |
+
"text_level": 1,
|
| 51 |
+
"bbox": [
|
| 52 |
+
454,
|
| 53 |
+
340,
|
| 54 |
+
544,
|
| 55 |
+
354
|
| 56 |
+
],
|
| 57 |
+
"page_idx": 0
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "Accurate modeling of ratings and text reviews is at the core of successful recommender systems. While neural networks have been remarkably successful in modeling images and natural language, they have been largely unexplored in recommender system research. In this paper, we provide a neural network model that combines ratings, reviews, and temporal patterns to learn highly accurate recommendations. We co-train for prediction on both numerical ratings and natural language reviews, as well as using a recurrent architecture to capture the dynamic components of users’ and items’ states. We demonstrate that incorporating text reviews and temporal dynamic gives state-of-the-art results over the IMDb dataset. ",
|
| 62 |
+
"bbox": [
|
| 63 |
+
233,
|
| 64 |
+
371,
|
| 65 |
+
766,
|
| 66 |
+
496
|
| 67 |
+
],
|
| 68 |
+
"page_idx": 0
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"type": "text",
|
| 72 |
+
"text": "1 INTRODUCTION ",
|
| 73 |
+
"text_level": 1,
|
| 74 |
+
"bbox": [
|
| 75 |
+
176,
|
| 76 |
+
522,
|
| 77 |
+
336,
|
| 78 |
+
537
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "Designing highly accurate recommender systems has been the focus of research in many communities and at the center of many products for the past decade. The core goal is to predict which items a given user will like or dislike, typically based on a database of previous ratings and reviews. In particular, a good recommender system has been defined as one that predicts the rating for randomly chosen and unseen (user,item) pairs. During the Netflix Prize contest, a variety of factorization models were proposed to capture the latent embeddings of users and items that would lead to accurate recommendations (Bell & Koren, 2007; Koren et al., 2009). Generative models for personalized ratings have recently become popular, due to impressive and robust results (Mnih & Salakhutdinov, 2007; Salakhutdinov & Mnih, 2008; Stern et al., 2009; Beutel et al., 2015). ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
554,
|
| 88 |
+
825,
|
| 89 |
+
679
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "More recently, there has been an interest in the recommender system community to also make use of the rich natural language reviews provided by users. Most often, these reviews have been transformed into a bag-of-words-model and used as a sort of regularization for the rating predictions (McAuley & Leskovec, 2013; Diao et al., 2014; Almahairi et al., 2015; Wu et al., 2016b). Using reviews in this way has been found to improve prediction accuracy, and in some cases provide detailed explanations for the recommendations. ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
685,
|
| 99 |
+
825,
|
| 100 |
+
768
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "This previous research has been remarkably successful, but has two significant limitations that we discuss and address in this paper. First, prediction accuracy has rarely been measured by the ability of a model to predict future ratings. Rather, recommendation accuracy has been derived from a random split of the ratings data, which undermines our understanding of the models’ usefulness in practice. Here, we focus on predicting future ratings, splitting our training and testing data by date. In order to be successful at this task, we incorporate the time of ratings and reviews in our model structure and training. Koren (2010) previously derived temporal features of ratings data, but used these features to remove temporal effects since the metric of success was interpolation, not extrapolation. More recently, Recurrent Recommender Networks (RNN) use a recurrent neural network to capture changes in both user preferences and item perceptions, and extrapolate future ratings in an autoregressive way (Wu et al., 2016a). However, temporal patterns in reviews are largely unexplored. Note that just like ratings, reviews also depend on changing factors, such as user writing styles, user preferences, movie perceptions, or the popularity of certain slang words or emoticons. Here we use a generative LSTM model that is able to jointly model the temporal effects in ratings and reviews. ",
|
| 107 |
+
"bbox": [
|
| 108 |
+
174,
|
| 109 |
+
776,
|
| 110 |
+
825,
|
| 111 |
+
901
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 0
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "",
|
| 118 |
+
"bbox": [
|
| 119 |
+
174,
|
| 120 |
+
103,
|
| 121 |
+
823,
|
| 122 |
+
174
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 1
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "Second, models of reviews in recommender system fall significantly behind the state-of-the-art in natural language processing. The bag-of-words model used in previous research improves over not using text, but is limited in the degree to which it can understand the review. In fact, the drawback of an underfitting model is especially salient in the case of reviews, because they are much more diverse and unstructured than regular documents. Recently there has been significant research attention on modeling natural language with neural networks, with encouraging results (Lipton et al., 2015; Yang et al., 2016). Here, we combine these powerful neural-based language models with recurrent neural network to learn both accurate recommendations and accurate reviews. Our main contributions are as follows: ",
|
| 129 |
+
"bbox": [
|
| 130 |
+
174,
|
| 131 |
+
180,
|
| 132 |
+
825,
|
| 133 |
+
305
|
| 134 |
+
],
|
| 135 |
+
"page_idx": 1
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"type": "text",
|
| 139 |
+
"text": "• Joint generative model: We propose a novel joint model of ratings and reviews via interacting recurrent networks (particularly LSTM). \n• Nonlinear nonparametric review model: By learning a function of user and movie state dynamics, we can capture the evolution of reviews (as well as ratings) over time. \n• Experiments show that by jointly modeling ratings and reviews along with temporal patterns, our model achieves state-of-the-art results on IMDb dataset in terms of forward prediction, i.e. in the realistic scenario where we use only ratings strictly prior to prediction time to predict future ratings. ",
|
| 140 |
+
"bbox": [
|
| 141 |
+
215,
|
| 142 |
+
318,
|
| 143 |
+
825,
|
| 144 |
+
443
|
| 145 |
+
],
|
| 146 |
+
"page_idx": 1
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"type": "text",
|
| 150 |
+
"text": "2 RELATED WORK ",
|
| 151 |
+
"text_level": 1,
|
| 152 |
+
"bbox": [
|
| 153 |
+
176,
|
| 154 |
+
463,
|
| 155 |
+
344,
|
| 156 |
+
479
|
| 157 |
+
],
|
| 158 |
+
"page_idx": 1
|
| 159 |
+
},
|
| 160 |
+
{
|
| 161 |
+
"type": "text",
|
| 162 |
+
"text": "Collaborative Filtering As mentioned in the introduction, recommender systems have been the focus of many different research communities. The Netflix Prize generated a flurry of research to improve recommendation accuracy, with a variety of matrix factorization models being proposed (Bell & Koren, 2007; Koren et al., 2009; Koren, 2008). During the Netflix competition and more afterwards, a stream of research has focused on designing generative Bayesian models for user ratings data (Mnih & Salakhutdinov, 2007; Salakhutdinov & Mnih, 2008; Stern et al., 2009; Beutel et al., 2014; 2015). Nearly all of these models predict ratings by an inner product between a latent user embedding and a latent item embedding; different approaches primarily regularization, e.g., Bayesian models and learning algorithms capture uncertainty in the data. ",
|
| 163 |
+
"bbox": [
|
| 164 |
+
173,
|
| 165 |
+
496,
|
| 166 |
+
825,
|
| 167 |
+
622
|
| 168 |
+
],
|
| 169 |
+
"page_idx": 1
|
| 170 |
+
},
|
| 171 |
+
{
|
| 172 |
+
"type": "text",
|
| 173 |
+
"text": "Other models have tried to capture interesting patterns discovered in ratings data. As an example, Beutel et al. (2014) finds that some ratings form bimodal rather than Gaussian distributions and designs a model to accommodate this diversity. More closely related to this work, Koren (2010) designs many features to capture and remove the temporal effects in ratings data. By removing these temporal effects, Koren (2010) learns better stationary embeddings for users and items. Work such as this improves prediction accuracy, but has two drawbacks: (1) it requires time consuming feature engineering, and (2) it focuses on interpolation rather than extrapolation into the future. Wu et al. (2016a) addresses both of these concerns by learning a function for the evolution of user preferences and item properties. However, this work focuses exclusively on modeling ratings over time and, in a large part, on the qualitative patterns discovered in the Netflix dataset. Here we focus on the model itself and, in particular, the interaction of jointly understanding ratings, reviews, and temporal patterns. ",
|
| 174 |
+
"bbox": [
|
| 175 |
+
173,
|
| 176 |
+
628,
|
| 177 |
+
825,
|
| 178 |
+
795
|
| 179 |
+
],
|
| 180 |
+
"page_idx": 1
|
| 181 |
+
},
|
| 182 |
+
{
|
| 183 |
+
"type": "text",
|
| 184 |
+
"text": "Review Modeling Although the most common metric for recommendation accuracy has been rating prediction, natural language reviews provide rich, detailed insight into user preferences. Most often, reviews have been used in a bag-of-words model to regularize rating prediction (McAuley & Leskovec, 2013; Diao et al., 2014; Wu et al., 2016b). For example, McAuley & Leskovec (2013) effectively learns a topic model of reviews regularize item embeddings. By using such coarse models, the impact of and insight from reviews is limited. More recently, Almahairi et al. (2015) use neural network based review models to regularize hidden factors, but their model assumes only stationary states. ",
|
| 185 |
+
"bbox": [
|
| 186 |
+
174,
|
| 187 |
+
811,
|
| 188 |
+
825,
|
| 189 |
+
922
|
| 190 |
+
],
|
| 191 |
+
"page_idx": 1
|
| 192 |
+
},
|
| 193 |
+
{
|
| 194 |
+
"type": "image",
|
| 195 |
+
"img_path": "images/4f41cc54b68c3f1e6077d840190e4f21f43d610bd9b49daf783826bc0c0b8bbc.jpg",
|
| 196 |
+
"image_caption": [
|
| 197 |
+
"Figure 1: As shown on the left, previous recommendation models learn static stationary embeddings for users and movies to predict ratings. As shown on the right, we can also capture temporal effects present in the data. We have both user and movie embeddings follow a Markov chain, and use these dynamic embeddings (along with stationary ones not shown) to predict both ratings and text reviews. "
|
| 198 |
+
],
|
| 199 |
+
"image_footnote": [],
|
| 200 |
+
"bbox": [
|
| 201 |
+
312,
|
| 202 |
+
99,
|
| 203 |
+
683,
|
| 204 |
+
276
|
| 205 |
+
],
|
| 206 |
+
"page_idx": 2
|
| 207 |
+
},
|
| 208 |
+
{
|
| 209 |
+
"type": "text",
|
| 210 |
+
"text": "Interestingly, data mining research has found that review patterns are dynamic, with different language being adopted by communities over time (Danescu-Niculescu-Mizil et al., 2013). Therefore, it is important to capture not just the dynamics of ratings, but also the language used to justify those ratings. ",
|
| 211 |
+
"bbox": [
|
| 212 |
+
173,
|
| 213 |
+
369,
|
| 214 |
+
825,
|
| 215 |
+
426
|
| 216 |
+
],
|
| 217 |
+
"page_idx": 2
|
| 218 |
+
},
|
| 219 |
+
{
|
| 220 |
+
"type": "text",
|
| 221 |
+
"text": "Neural Networks Neural networks have recently offered large improvements in natural language processing. More recently, a few papers have focused these natural language models on online reviews (Lipton et al., 2015; Yang et al., 2016). However, while these papers do model online reviews, they differ greatly from our work in that they are not actually used for recommendation. ",
|
| 222 |
+
"bbox": [
|
| 223 |
+
173,
|
| 224 |
+
440,
|
| 225 |
+
825,
|
| 226 |
+
497
|
| 227 |
+
],
|
| 228 |
+
"page_idx": 2
|
| 229 |
+
},
|
| 230 |
+
{
|
| 231 |
+
"type": "text",
|
| 232 |
+
"text": "With the recent remarkable successes of neural networks in other domains, there has been growing attention on using neural networks for model graphs and ratings data. Most similar, Sedhain et al. (2015) design an autoencoder for collaborative filtering. ",
|
| 233 |
+
"bbox": [
|
| 234 |
+
174,
|
| 235 |
+
503,
|
| 236 |
+
825,
|
| 237 |
+
546
|
| 238 |
+
],
|
| 239 |
+
"page_idx": 2
|
| 240 |
+
},
|
| 241 |
+
{
|
| 242 |
+
"type": "text",
|
| 243 |
+
"text": "LSTM and Recurrent Network Recurrent neural network provides a powerful tool to nonparametrically model temporal data by using a latent variable autoregressive model as follows: ",
|
| 244 |
+
"bbox": [
|
| 245 |
+
173,
|
| 246 |
+
560,
|
| 247 |
+
825,
|
| 248 |
+
589
|
| 249 |
+
],
|
| 250 |
+
"page_idx": 2
|
| 251 |
+
},
|
| 252 |
+
{
|
| 253 |
+
"type": "equation",
|
| 254 |
+
"img_path": "images/890c81799d24dca5cc1d6f4e7b4fc83b7ce5069ba9fbd6b1d34cd9a9a84198c9.jpg",
|
| 255 |
+
"text": "$$\n\\hat { z } _ { t + 1 } = f ( h _ { t } , z _ { t } ) \\mathrm { a n d } h _ { t + 1 } = g ( h _ { t } , z _ { t + 1 } ) .\n$$",
|
| 256 |
+
"text_format": "latex",
|
| 257 |
+
"bbox": [
|
| 258 |
+
361,
|
| 259 |
+
594,
|
| 260 |
+
632,
|
| 261 |
+
612
|
| 262 |
+
],
|
| 263 |
+
"page_idx": 2
|
| 264 |
+
},
|
| 265 |
+
{
|
| 266 |
+
"type": "text",
|
| 267 |
+
"text": "Where $z _ { t }$ is the observation at time $t$ , $\\hat { z } _ { t }$ is the model associated estimate, and $h _ { t }$ denotes the latent state. A popular class of RNN is the Long Short Term Memory (LSTM) (Hochreiter $\\&$ Schmidhuber, 1997) and we use this as a building block in our model .The state updates is given below: ",
|
| 268 |
+
"bbox": [
|
| 269 |
+
173,
|
| 270 |
+
616,
|
| 271 |
+
826,
|
| 272 |
+
659
|
| 273 |
+
],
|
| 274 |
+
"page_idx": 2
|
| 275 |
+
},
|
| 276 |
+
{
|
| 277 |
+
"type": "equation",
|
| 278 |
+
"img_path": "images/f49cd02d601791c55a87c2e08382bb39b9c7ba7c865b06e581c856d6ba1b0ae4.jpg",
|
| 279 |
+
"text": "$$\n\\begin{array} { r l } & { [ f _ { t } , i _ { t } , o _ { t } ] = \\sigma \\left[ W \\left[ h _ { t - 1 } , z _ { t } \\right] + b \\right] } \\\\ & { \\quad \\quad \\quad l _ { t } = \\operatorname { t a n h } \\left[ V \\left[ h _ { t - 1 } , z _ { t } \\right] + d \\right] } \\\\ & { \\quad \\quad \\quad c _ { t } = f _ { t } \\cdot c _ { t - 1 } + i _ { t } \\cdot l _ { t } } \\\\ & { \\quad \\quad \\quad h _ { t } = o _ { t } \\cdot \\operatorname { t a n h } ( c _ { t } ) , } \\end{array}\n$$",
|
| 280 |
+
"text_format": "latex",
|
| 281 |
+
"bbox": [
|
| 282 |
+
379,
|
| 283 |
+
662,
|
| 284 |
+
619,
|
| 285 |
+
736
|
| 286 |
+
],
|
| 287 |
+
"page_idx": 2
|
| 288 |
+
},
|
| 289 |
+
{
|
| 290 |
+
"type": "text",
|
| 291 |
+
"text": "where $f _ { t } , i _ { t } , o _ { t }$ denote the forget gate, input gate and the output gate respectively. For simplicity in the following we denote this set of operations by $h _ { t } = \\mathrm { L S T M } ( h _ { t - 1 } , z _ { t } )$ . We will refer to $h _ { t }$ as the output embedding from the LSTM. ",
|
| 292 |
+
"bbox": [
|
| 293 |
+
173,
|
| 294 |
+
739,
|
| 295 |
+
825,
|
| 296 |
+
781
|
| 297 |
+
],
|
| 298 |
+
"page_idx": 2
|
| 299 |
+
},
|
| 300 |
+
{
|
| 301 |
+
"type": "text",
|
| 302 |
+
"text": "3 MODEL ",
|
| 303 |
+
"text_level": 1,
|
| 304 |
+
"bbox": [
|
| 305 |
+
174,
|
| 306 |
+
801,
|
| 307 |
+
269,
|
| 308 |
+
818
|
| 309 |
+
],
|
| 310 |
+
"page_idx": 2
|
| 311 |
+
},
|
| 312 |
+
{
|
| 313 |
+
"type": "text",
|
| 314 |
+
"text": "A comparison of our model with traditional recommender systems is illustrated in Figure 1. In previous recommender systems, ratings are assumed to be a function of stationary user and movie embeddings. Here we consider dynamic embeddings that predict both ratings and text reviews at a given time step. ",
|
| 315 |
+
"bbox": [
|
| 316 |
+
174,
|
| 317 |
+
832,
|
| 318 |
+
825,
|
| 319 |
+
888
|
| 320 |
+
],
|
| 321 |
+
"page_idx": 2
|
| 322 |
+
},
|
| 323 |
+
{
|
| 324 |
+
"type": "text",
|
| 325 |
+
"text": "Figure 2 shows a depiction of our model: Joint Review-Rating Recurrent Recommender Network. In addition to stationary embeddings as used in traditional recommender systems, here we use two ",
|
| 326 |
+
"bbox": [
|
| 327 |
+
174,
|
| 328 |
+
895,
|
| 329 |
+
823,
|
| 330 |
+
924
|
| 331 |
+
],
|
| 332 |
+
"page_idx": 2
|
| 333 |
+
},
|
| 334 |
+
{
|
| 335 |
+
"type": "image",
|
| 336 |
+
"img_path": "images/7015617496507ba75d9fe7af176df44124f18d53f1e86fd8d2946a23a9ef5e37.jpg",
|
| 337 |
+
"image_caption": [
|
| 338 |
+
"Figure 2: Joint Review-Rating Recurrent Recommender Networks: We use recurrent networks to capture the temporal evolution of user and movies states. The recurrent networks depend on the ratings of a user (and movie) in previous time steps. We combine these dynamic states with classic stationary states. We directly use all of these states to predict ratings, and use them within an LSTM to model review text. "
|
| 339 |
+
],
|
| 340 |
+
"image_footnote": [],
|
| 341 |
+
"bbox": [
|
| 342 |
+
186,
|
| 343 |
+
108,
|
| 344 |
+
846,
|
| 345 |
+
335
|
| 346 |
+
],
|
| 347 |
+
"page_idx": 3
|
| 348 |
+
},
|
| 349 |
+
{
|
| 350 |
+
"type": "text",
|
| 351 |
+
"text": "LSTM RNNs that take user/movie history as input to capture the temporal dynamics in both user and movie states. Given stationary and dynamic states of user $i$ and movie $j$ , we define generator functions that emit both rating $r _ { i j } | t$ and reviews $o _ { i j } | t$ at time step $t$ . Formally, ",
|
| 352 |
+
"bbox": [
|
| 353 |
+
174,
|
| 354 |
+
459,
|
| 355 |
+
825,
|
| 356 |
+
502
|
| 357 |
+
],
|
| 358 |
+
"page_idx": 3
|
| 359 |
+
},
|
| 360 |
+
{
|
| 361 |
+
"type": "equation",
|
| 362 |
+
"img_path": "images/9a15e6b395c6d27b9507d2ba4a06874d82480759e4370b8215875bbc7c5a777e.jpg",
|
| 363 |
+
"text": "$$\n\\begin{array} { r } { r _ { i j } | t = f ( u _ { i } , m _ { j } , u _ { i t } , m _ { j t } ) \\quad \\mathrm { a n d } \\quad o _ { i j } | t = \\psi ( u _ { i } , m _ { j } , u _ { i t } , m _ { j t } ) } \\\\ { u _ { i , t + 1 } = g ( u _ { i t } , \\{ r _ { i j } | t \\} ) \\quad \\mathrm { a n d } \\quad m _ { j , t + 1 } = h ( m _ { j t } , \\{ r _ { i j } | t \\} ) , } \\end{array}\n$$",
|
| 364 |
+
"text_format": "latex",
|
| 365 |
+
"bbox": [
|
| 366 |
+
289,
|
| 367 |
+
516,
|
| 368 |
+
707,
|
| 369 |
+
554
|
| 370 |
+
],
|
| 371 |
+
"page_idx": 3
|
| 372 |
+
},
|
| 373 |
+
{
|
| 374 |
+
"type": "text",
|
| 375 |
+
"text": "where $u _ { i }$ and $m _ { j }$ denote stationary states, and $u _ { i t }$ and $m _ { i t }$ denote the dynamic state at $t$ . Note that with learned $f , \\psi , g$ and $h$ and given user/movie history, an user/movie state can be inferred without further optimization. In other words, different from traditional recommender systems, here we learn the functions that find the states instead of learning the states directly. ",
|
| 376 |
+
"bbox": [
|
| 377 |
+
173,
|
| 378 |
+
568,
|
| 379 |
+
825,
|
| 380 |
+
625
|
| 381 |
+
],
|
| 382 |
+
"page_idx": 3
|
| 383 |
+
},
|
| 384 |
+
{
|
| 385 |
+
"type": "text",
|
| 386 |
+
"text": "3.1 DYNAMIC USER AND MOVIE STATE ",
|
| 387 |
+
"text_level": 1,
|
| 388 |
+
"bbox": [
|
| 389 |
+
176,
|
| 390 |
+
650,
|
| 391 |
+
462,
|
| 392 |
+
665
|
| 393 |
+
],
|
| 394 |
+
"page_idx": 3
|
| 395 |
+
},
|
| 396 |
+
{
|
| 397 |
+
"type": "text",
|
| 398 |
+
"text": "Here we give a detailed description on the RNNs that find the dynamic states. The key idea is to use user/movie rating history as inputs to update the states. In this way we are able to model causality instead of just finding correlation. That is, we can model e.g. the change of user (movie) state caused by having watched and liked/disliked a movie (being liked/disliked by certain users). At each step, the network takes ",
|
| 399 |
+
"bbox": [
|
| 400 |
+
173,
|
| 401 |
+
679,
|
| 402 |
+
825,
|
| 403 |
+
751
|
| 404 |
+
],
|
| 405 |
+
"page_idx": 3
|
| 406 |
+
},
|
| 407 |
+
{
|
| 408 |
+
"type": "equation",
|
| 409 |
+
"img_path": "images/0fa7f099cfe9d1cb4733b4abaafd6dff4d3d2d29ee27a11fe92fa392ae5cd00e.jpg",
|
| 410 |
+
"text": "$$\ny _ { t } : = W _ { \\mathrm { e m b e d } } \\left[ x _ { t } , 1 _ { \\mathrm { n e w b i e } } , \\tau _ { t } , \\tau _ { t - 1 } \\right] ,\n$$",
|
| 411 |
+
"text_format": "latex",
|
| 412 |
+
"bbox": [
|
| 413 |
+
377,
|
| 414 |
+
766,
|
| 415 |
+
619,
|
| 416 |
+
784
|
| 417 |
+
],
|
| 418 |
+
"page_idx": 3
|
| 419 |
+
},
|
| 420 |
+
{
|
| 421 |
+
"type": "text",
|
| 422 |
+
"text": "where $x _ { t }$ is the rating vector, $1 _ { \\mathrm { n e w b i e } }$ is the indicator for new users, and $\\tau _ { t }$ is wall-clock time. The $j$ th element of $x _ { t }$ is the rating the user gives for movie $j$ at time $t$ , and 0 otherwise. $1 _ { \\mathrm { n e w b i e } }$ effectively select a default embedding for a new user, and $\\tau _ { t }$ and $\\tau _ { t - 1 }$ gives the model the information to synchronize between RNNs and model the effects such as rating scale change or movie age. Note that with the inclusion of $\\tau \\mathrm { s }$ , we do not need to include the steps where a user did not rate any movie, and this can drastically speed up training. The state update is given by standard $u _ { t } : = \\mathrm { L S T M } ( u _ { t - 1 } , y _ { t } )$ . In the above we omit user index for clarity. In cases where we need to distinguish different users (and movies) such as in Figure 2, we use additional index $i$ for user $i$ as in $u _ { i t }$ , and similarly for movie $j$ in $m _ { j t }$ . ",
|
| 423 |
+
"bbox": [
|
| 424 |
+
173,
|
| 425 |
+
797,
|
| 426 |
+
825,
|
| 427 |
+
925
|
| 428 |
+
],
|
| 429 |
+
"page_idx": 3
|
| 430 |
+
},
|
| 431 |
+
{
|
| 432 |
+
"type": "text",
|
| 433 |
+
"text": "3.2 RATING EMISSIONS ",
|
| 434 |
+
"text_level": 1,
|
| 435 |
+
"bbox": [
|
| 436 |
+
174,
|
| 437 |
+
103,
|
| 438 |
+
352,
|
| 439 |
+
118
|
| 440 |
+
],
|
| 441 |
+
"page_idx": 4
|
| 442 |
+
},
|
| 443 |
+
{
|
| 444 |
+
"type": "text",
|
| 445 |
+
"text": "We supplement the time-varying profile vectors $u _ { i t }$ and $m _ { j t }$ with stationary ones $u _ { i }$ and $m _ { j }$ respectively. These stationary components encode time-invariant properties such as long-term preference of a user or the genre of a movie. ",
|
| 446 |
+
"bbox": [
|
| 447 |
+
174,
|
| 448 |
+
128,
|
| 449 |
+
825,
|
| 450 |
+
171
|
| 451 |
+
],
|
| 452 |
+
"page_idx": 4
|
| 453 |
+
},
|
| 454 |
+
{
|
| 455 |
+
"type": "text",
|
| 456 |
+
"text": "The review rating is thus modeled as a function of both dynamic and stationary states, i.e. ",
|
| 457 |
+
"bbox": [
|
| 458 |
+
173,
|
| 459 |
+
178,
|
| 460 |
+
758,
|
| 461 |
+
194
|
| 462 |
+
],
|
| 463 |
+
"page_idx": 4
|
| 464 |
+
},
|
| 465 |
+
{
|
| 466 |
+
"type": "equation",
|
| 467 |
+
"img_path": "images/d52114fc4730466b04b4a9f820d02358eb52ca3b633e0cb793cf2813326995c8.jpg",
|
| 468 |
+
"text": "$$\nr _ { i j } = f ( u _ { i t } , m _ { j t } , u _ { i } , m _ { j } ) : = \\langle \\tilde { u } _ { i t } , \\tilde { m } _ { j t } \\rangle + \\langle u _ { i } , m _ { j } \\rangle\n$$",
|
| 469 |
+
"text_format": "latex",
|
| 470 |
+
"bbox": [
|
| 471 |
+
328,
|
| 472 |
+
199,
|
| 473 |
+
668,
|
| 474 |
+
217
|
| 475 |
+
],
|
| 476 |
+
"page_idx": 4
|
| 477 |
+
},
|
| 478 |
+
{
|
| 479 |
+
"type": "text",
|
| 480 |
+
"text": "where $\\tilde { u } _ { i t }$ and $\\tilde { m } _ { j t }$ are affine functions of $u _ { i t }$ and $m _ { j t }$ respectively. That is, we have ",
|
| 481 |
+
"bbox": [
|
| 482 |
+
171,
|
| 483 |
+
223,
|
| 484 |
+
723,
|
| 485 |
+
238
|
| 486 |
+
],
|
| 487 |
+
"page_idx": 4
|
| 488 |
+
},
|
| 489 |
+
{
|
| 490 |
+
"type": "equation",
|
| 491 |
+
"img_path": "images/637eb6ad6433b397cd42be8cada8cdd34cb49c3e380f98936fd29b11d609ef20.jpg",
|
| 492 |
+
"text": "$$\n\\tilde { u } _ { i t } = W _ { \\mathrm { u s e r } } u _ { i t } + b _ { \\mathrm { u s e r } } \\ \\mathrm { a n d } \\ \\tilde { m } _ { j t } = W _ { \\mathrm { m o v i e } } m _ { j t } + b _ { \\mathrm { m o v i e } }\n$$",
|
| 493 |
+
"text_format": "latex",
|
| 494 |
+
"bbox": [
|
| 495 |
+
312,
|
| 496 |
+
244,
|
| 497 |
+
683,
|
| 498 |
+
262
|
| 499 |
+
],
|
| 500 |
+
"page_idx": 4
|
| 501 |
+
},
|
| 502 |
+
{
|
| 503 |
+
"type": "text",
|
| 504 |
+
"text": "This makes the model a strict superset of popular matrix factorization recommender systems that accounts for stationary effects, while we use LSTMs, on top of that, to model longer-range dynamic updates. ",
|
| 505 |
+
"bbox": [
|
| 506 |
+
176,
|
| 507 |
+
267,
|
| 508 |
+
826,
|
| 509 |
+
309
|
| 510 |
+
],
|
| 511 |
+
"page_idx": 4
|
| 512 |
+
},
|
| 513 |
+
{
|
| 514 |
+
"type": "text",
|
| 515 |
+
"text": "3.3 REVIEW TEXT MODEL ",
|
| 516 |
+
"text_level": 1,
|
| 517 |
+
"bbox": [
|
| 518 |
+
176,
|
| 519 |
+
327,
|
| 520 |
+
370,
|
| 521 |
+
340
|
| 522 |
+
],
|
| 523 |
+
"page_idx": 4
|
| 524 |
+
},
|
| 525 |
+
{
|
| 526 |
+
"type": "text",
|
| 527 |
+
"text": "Review text is modeled by a character-level LSTM network. This network shares the same user/movie latent states with the rating model. After all, the purpose of a review is to explain its rating score. We fuse the stationary and dynamic states of both user of movie by the bottleneck layer $x _ { \\mathrm { j o i n t } , i j }$ given below: ",
|
| 528 |
+
"bbox": [
|
| 529 |
+
173,
|
| 530 |
+
352,
|
| 531 |
+
825,
|
| 532 |
+
409
|
| 533 |
+
],
|
| 534 |
+
"page_idx": 4
|
| 535 |
+
},
|
| 536 |
+
{
|
| 537 |
+
"type": "equation",
|
| 538 |
+
"img_path": "images/1544f0251f24d316244b524aaa5986144d604709d9160c85f8bf515a94fb9222.jpg",
|
| 539 |
+
"text": "$$\n\\begin{array} { r l } & { x _ { \\mathrm { j o i n t } , i j } : = \\phi ( W _ { \\mathrm { j o i n t } } \\left[ u _ { i t } , m _ { j t } , u _ { i } , m _ { j } \\right] + b _ { \\mathrm { j o i n t } } ) } \\\\ & { \\quad \\tilde { x } _ { i j , k } : = \\left[ x _ { o _ { i j , k } } , x _ { \\mathrm { j o i n t } , i j } \\right] } \\end{array}\n$$",
|
| 540 |
+
"text_format": "latex",
|
| 541 |
+
"bbox": [
|
| 542 |
+
341,
|
| 543 |
+
414,
|
| 544 |
+
656,
|
| 545 |
+
455
|
| 546 |
+
],
|
| 547 |
+
"page_idx": 4
|
| 548 |
+
},
|
| 549 |
+
{
|
| 550 |
+
"type": "text",
|
| 551 |
+
"text": "where $o _ { i j , k }$ denotes the character at position $k$ for the review given by user $i$ to movie $j$ , and $x _ { o _ { i j , k } }$ denotes the embedding of the character. $\\phi$ here is some non-linear function. ",
|
| 552 |
+
"bbox": [
|
| 553 |
+
173,
|
| 554 |
+
458,
|
| 555 |
+
821,
|
| 556 |
+
487
|
| 557 |
+
],
|
| 558 |
+
"page_idx": 4
|
| 559 |
+
},
|
| 560 |
+
{
|
| 561 |
+
"type": "text",
|
| 562 |
+
"text": "The review text emission model is itself an RNN, specifically a character-level LSTM generative model. For character index $k = 1 , 2 , \\dots$ , ",
|
| 563 |
+
"bbox": [
|
| 564 |
+
174,
|
| 565 |
+
492,
|
| 566 |
+
821,
|
| 567 |
+
522
|
| 568 |
+
],
|
| 569 |
+
"page_idx": 4
|
| 570 |
+
},
|
| 571 |
+
{
|
| 572 |
+
"type": "equation",
|
| 573 |
+
"img_path": "images/8ec9329759b04e75a1a354be367e1a4ecf81d3490f306b827c6326f71f609c05.jpg",
|
| 574 |
+
"text": "$$\n\\begin{array} { r l } & { h _ { i j , k } : = \\mathrm { L S T M } ( h _ { i j , k - 1 } , \\tilde { x } _ { i j , k } ) } \\\\ & { \\hat { o } _ { i j , k } : = \\mathrm { s o f t m a x } \\left( W _ { \\mathrm { o u t } } h _ { i j , k } + b _ { \\mathrm { o u t } } \\right) } \\end{array}\n$$",
|
| 575 |
+
"text_format": "latex",
|
| 576 |
+
"bbox": [
|
| 577 |
+
375,
|
| 578 |
+
527,
|
| 579 |
+
622,
|
| 580 |
+
565
|
| 581 |
+
],
|
| 582 |
+
"page_idx": 4
|
| 583 |
+
},
|
| 584 |
+
{
|
| 585 |
+
"type": "text",
|
| 586 |
+
"text": "Here a softmax layer at output of LSTM is used to predict the next character. Generating text conditioned on contents has been applied to various areas, such as machine translation (Sutskever et al., 2014), question answering (Gao et al., 2015), or image captioning (Vinyals et al., 2015). Probably the most similar approach is Lipton et al. (2015), but it conditions review generation on observed ratings instead of latent states. ",
|
| 587 |
+
"bbox": [
|
| 588 |
+
173,
|
| 589 |
+
569,
|
| 590 |
+
825,
|
| 591 |
+
640
|
| 592 |
+
],
|
| 593 |
+
"page_idx": 4
|
| 594 |
+
},
|
| 595 |
+
{
|
| 596 |
+
"type": "text",
|
| 597 |
+
"text": "3.4 PREDICTION ",
|
| 598 |
+
"text_level": 1,
|
| 599 |
+
"bbox": [
|
| 600 |
+
174,
|
| 601 |
+
656,
|
| 602 |
+
302,
|
| 603 |
+
670
|
| 604 |
+
],
|
| 605 |
+
"page_idx": 4
|
| 606 |
+
},
|
| 607 |
+
{
|
| 608 |
+
"type": "text",
|
| 609 |
+
"text": "In prediction time, we make rating predictions based on predicted future states. That is, we take the latest ratings as input to update the states, and use the newly predicted states to predict ratings. This differs from traditional approaches where embeddings are estimated instead of inferred. ",
|
| 610 |
+
"bbox": [
|
| 611 |
+
174,
|
| 612 |
+
681,
|
| 613 |
+
825,
|
| 614 |
+
724
|
| 615 |
+
],
|
| 616 |
+
"page_idx": 4
|
| 617 |
+
},
|
| 618 |
+
{
|
| 619 |
+
"type": "text",
|
| 620 |
+
"text": "3.5 TRAINING ",
|
| 621 |
+
"text_level": 1,
|
| 622 |
+
"bbox": [
|
| 623 |
+
174,
|
| 624 |
+
741,
|
| 625 |
+
287,
|
| 626 |
+
756
|
| 627 |
+
],
|
| 628 |
+
"page_idx": 4
|
| 629 |
+
},
|
| 630 |
+
{
|
| 631 |
+
"type": "text",
|
| 632 |
+
"text": "Our goal is to predict both accurate ratings and accurate reviews, and thus we minimize ",
|
| 633 |
+
"bbox": [
|
| 634 |
+
173,
|
| 635 |
+
767,
|
| 636 |
+
746,
|
| 637 |
+
782
|
| 638 |
+
],
|
| 639 |
+
"page_idx": 4
|
| 640 |
+
},
|
| 641 |
+
{
|
| 642 |
+
"type": "equation",
|
| 643 |
+
"img_path": "images/5b028a196941c7088d8274a8e8c23838170663f117cf4ab1b8c6a9f0c57842cd.jpg",
|
| 644 |
+
"text": "$$\nL : = \\sum _ { ( i , j ) \\in \\mathcal { D } _ { \\mathrm { t r a i n } } } \\left[ \\left( \\hat { r } _ { i j } ( \\theta ) - r _ { i j } \\right) ^ { 2 } - \\lambda \\sum _ { k = 1 } ^ { n _ { i j } } \\log \\left( \\operatorname* { P r } ( o _ { i j , k } | \\theta ) \\right) \\right] ,\n$$",
|
| 645 |
+
"text_format": "latex",
|
| 646 |
+
"bbox": [
|
| 647 |
+
297,
|
| 648 |
+
787,
|
| 649 |
+
699,
|
| 650 |
+
833
|
| 651 |
+
],
|
| 652 |
+
"page_idx": 4
|
| 653 |
+
},
|
| 654 |
+
{
|
| 655 |
+
"type": "text",
|
| 656 |
+
"text": "where $\\mathcal { D } _ { \\mathrm { t r a i n } }$ is the training set of $( i , j )$ pairs, $\\theta$ denotes all model parameters, and $n _ { i j }$ is the number of characters in the review user $i$ gives to movie $j$ . The first term corresponds to the deviation of the prediction from the actual rating, and the second term is the likelihood of the text reviews. $\\lambda$ controls the weight between predicting accurate ratings and predicting accurate reviews. Our training follows the subspace descent strategy in $\\mathrm { { W u } }$ et al. (2016a). That is, while the review generative model is updated in every iteration, the user-state and movie-state RNNs are updated in an alternating way. ",
|
| 657 |
+
"bbox": [
|
| 658 |
+
173,
|
| 659 |
+
839,
|
| 660 |
+
826,
|
| 661 |
+
924
|
| 662 |
+
],
|
| 663 |
+
"page_idx": 4
|
| 664 |
+
},
|
| 665 |
+
{
|
| 666 |
+
"type": "table",
|
| 667 |
+
"img_path": "images/1cbb68e1cd61af97158b82228cda4fcf56f74b2a10341ef3de3b4b60c3ebe1ba.jpg",
|
| 668 |
+
"table_caption": [
|
| 669 |
+
"Table 1: IMDb dataset comprises reviews and ratings collected from July 1998 to September 2013. Netflix 6 months data is a subset of original Netflix prize dataset that is split based on time. "
|
| 670 |
+
],
|
| 671 |
+
"table_footnote": [],
|
| 672 |
+
"table_body": "<table><tr><td>Data</td><td></td><td></td><td>#users</td><td>#items</td><td># ratings (reviews)</td><td># characters</td></tr><tr><td>IMDb</td><td>Train Test</td><td>Jul 98 - Dec 12 Jan 13 - Sep 13</td><td>6,127</td><td>8,002</td><td>402.3k 11.0k</td><td>690.6M 21.6M</td></tr><tr><td>Netflix 6 months</td><td>Train Test</td><td>Jun - Nov 11 Dec 11</td><td>311.3k</td><td>17.7k</td><td>13.7M 2.1M</td><td>1 1</td></tr></table>",
|
| 673 |
+
"bbox": [
|
| 674 |
+
214,
|
| 675 |
+
101,
|
| 676 |
+
782,
|
| 677 |
+
200
|
| 678 |
+
],
|
| 679 |
+
"page_idx": 5
|
| 680 |
+
},
|
| 681 |
+
{
|
| 682 |
+
"type": "text",
|
| 683 |
+
"text": "The gradients are calculated with standard backpropagation. Furthermore, we pre-warm train the review LSTM over the review text excluding the auxiliary input from the user and movie states. It is undesirable if the review likelihood overwhelms the rating. We hence normalize review likelihood by the number of characters in a review so that it does not dominates the rating likelihood. This technique is common in NLP literature (Wang & McCallum, 2006). ",
|
| 684 |
+
"bbox": [
|
| 685 |
+
174,
|
| 686 |
+
271,
|
| 687 |
+
825,
|
| 688 |
+
340
|
| 689 |
+
],
|
| 690 |
+
"page_idx": 5
|
| 691 |
+
},
|
| 692 |
+
{
|
| 693 |
+
"type": "text",
|
| 694 |
+
"text": "4 EXPERIMENTS ",
|
| 695 |
+
"text_level": 1,
|
| 696 |
+
"bbox": [
|
| 697 |
+
176,
|
| 698 |
+
367,
|
| 699 |
+
326,
|
| 700 |
+
382
|
| 701 |
+
],
|
| 702 |
+
"page_idx": 5
|
| 703 |
+
},
|
| 704 |
+
{
|
| 705 |
+
"type": "text",
|
| 706 |
+
"text": "In this section we empirically demonstrate the ability of our model to accurately predict both ratings and reviews, and capture temporal dynamics. ",
|
| 707 |
+
"bbox": [
|
| 708 |
+
173,
|
| 709 |
+
401,
|
| 710 |
+
823,
|
| 711 |
+
430
|
| 712 |
+
],
|
| 713 |
+
"page_idx": 5
|
| 714 |
+
},
|
| 715 |
+
{
|
| 716 |
+
"type": "text",
|
| 717 |
+
"text": "4.1 EXPERIMENTAL SETUP ",
|
| 718 |
+
"text_level": 1,
|
| 719 |
+
"bbox": [
|
| 720 |
+
174,
|
| 721 |
+
453,
|
| 722 |
+
372,
|
| 723 |
+
467
|
| 724 |
+
],
|
| 725 |
+
"page_idx": 5
|
| 726 |
+
},
|
| 727 |
+
{
|
| 728 |
+
"type": "text",
|
| 729 |
+
"text": "In the following experiments, we select hyperparameters, optimization parameters and model architecture by cross-validation. The details are as follows. We use 1-layer LSTM recurrent neural networks with 40 hidden factors for user/movie state transitions. The input of this LSTM is an user/item embedding of dimension 40. Stationary and dynamic factors are 160 and 40-dimensional respectively. A 2-layer LSTM network is used to model texts, which takes 30-dimensional character embedding $x _ { \\mathrm { c h a r } }$ , 40-dimensional state vector $x _ { \\mathrm { j o i n t } }$ , and a 50-dimensional movie embedding $x _ { \\mathrm { m o v i e } }$ ",
|
| 730 |
+
"bbox": [
|
| 731 |
+
174,
|
| 732 |
+
481,
|
| 733 |
+
825,
|
| 734 |
+
565
|
| 735 |
+
],
|
| 736 |
+
"page_idx": 5
|
| 737 |
+
},
|
| 738 |
+
{
|
| 739 |
+
"type": "text",
|
| 740 |
+
"text": "To speed up convergence, we initialize the text model by a character-level RNN pre-trained without considering rating. Stationary factors are initialized by a pre-trained iAutoRec (Sedhain et al., 2015) model based on the last layer. We initialize all the other parameters from uniform distribution between $[ - a , a ]$ with $a = \\sqrt { 1 . 5 ( f _ { i n } + f _ { o u t } ) }$ , where $f _ { i n }$ and $f _ { o u t }$ are fan-in and fan-out of transition matrices. $\\ell _ { 2 }$ regularization with magnitude 0.001 is applied to all parameters. Dropout with a 0.5 rate is applied after all fully-connected layers. To prevent exploding gradients in of LSTM, gradients are clipped to $[ - 1 5 , 1 5 ]$ . ADAM (Kingma & Ba, 2014) with learning rate 0.0015 is used for optimization. ",
|
| 741 |
+
"bbox": [
|
| 742 |
+
173,
|
| 743 |
+
571,
|
| 744 |
+
825,
|
| 745 |
+
672
|
| 746 |
+
],
|
| 747 |
+
"page_idx": 5
|
| 748 |
+
},
|
| 749 |
+
{
|
| 750 |
+
"type": "image",
|
| 751 |
+
"img_path": "images/6d9402cc13d59aa86f8344a099f7a7a3fc753253243993aefe9f5fb660d7a77b.jpg",
|
| 752 |
+
"image_caption": [
|
| 753 |
+
"Figure 3: Characteristics of IMDb dataset. "
|
| 754 |
+
],
|
| 755 |
+
"image_footnote": [],
|
| 756 |
+
"bbox": [
|
| 757 |
+
173,
|
| 758 |
+
705,
|
| 759 |
+
812,
|
| 760 |
+
849
|
| 761 |
+
],
|
| 762 |
+
"page_idx": 5
|
| 763 |
+
},
|
| 764 |
+
{
|
| 765 |
+
"type": "text",
|
| 766 |
+
"text": "Data Here we focus on movie recommendations, where the opinions are highly dynamic. We evaluate our model on IMDb dataset, first used in Diao et al. (2014), that is the only large-scale movie ",
|
| 767 |
+
"bbox": [
|
| 768 |
+
173,
|
| 769 |
+
895,
|
| 770 |
+
823,
|
| 771 |
+
924
|
| 772 |
+
],
|
| 773 |
+
"page_idx": 5
|
| 774 |
+
},
|
| 775 |
+
{
|
| 776 |
+
"type": "table",
|
| 777 |
+
"img_path": "images/50f829defa37b74797413475b11f60de487035409fa8efc3fea6f629e7a48ac2.jpg",
|
| 778 |
+
"table_caption": [],
|
| 779 |
+
"table_footnote": [],
|
| 780 |
+
"table_body": "<table><tr><td></td><td>PMF</td><td>Time-SVD++</td><td>U-AutoRec</td><td>I-AutoRec</td><td>RRN (rating)</td><td>RRN (rating + text)</td></tr><tr><td>IMDb</td><td>1.7355</td><td>1.7348</td><td>1.7332</td><td>1.7135</td><td>1.7047</td><td>1.7012</td></tr><tr><td>Netflix 6 months</td><td>0.9584</td><td>0.9589</td><td>0.9836</td><td>0.9778</td><td>0.9427</td><td></td></tr></table>",
|
| 781 |
+
"bbox": [
|
| 782 |
+
189,
|
| 783 |
+
101,
|
| 784 |
+
808,
|
| 785 |
+
175
|
| 786 |
+
],
|
| 787 |
+
"page_idx": 6
|
| 788 |
+
},
|
| 789 |
+
{
|
| 790 |
+
"type": "text",
|
| 791 |
+
"text": "Table 2: RRN outperforms competing models in terms of RMSE. In addition, jointly modeling ratings and reviews achieves even better accuracy. ",
|
| 792 |
+
"bbox": [
|
| 793 |
+
176,
|
| 794 |
+
185,
|
| 795 |
+
821,
|
| 796 |
+
213
|
| 797 |
+
],
|
| 798 |
+
"page_idx": 6
|
| 799 |
+
},
|
| 800 |
+
{
|
| 801 |
+
"type": "text",
|
| 802 |
+
"text": "review dataset available. Restaurant recommendations (e.g. Yelp) could be also a suitable domain, but full rating history is not available in publicly available datasets1. ",
|
| 803 |
+
"bbox": [
|
| 804 |
+
173,
|
| 805 |
+
242,
|
| 806 |
+
823,
|
| 807 |
+
270
|
| 808 |
+
],
|
| 809 |
+
"page_idx": 6
|
| 810 |
+
},
|
| 811 |
+
{
|
| 812 |
+
"type": "text",
|
| 813 |
+
"text": "The IMDb dataset contains full review and rating history of all users and all movies from 1998 to 2013. The characteristics of this dataset is shown in Figure 3. We see that the user and movie ratings follow heavy tail distributions, and thus the majority of users and movies have very few reviews, making accurate recommendation challenging for these users and movies. Review length is summarized in Figure 3 (c). Since one of the major goal of this project is to study temporal dynamics, we focus on users and items that have multiple interactions with the system. Specifically, we select a subset of $\\mathbf { k }$ -core of the graph with $k = 1 5$ . That is, each user and movie has at least 15 ratings in this subset. Note that the resulting subgraph is still very sparse – with only $0 . 8 \\%$ density, which is sparser than for example, $1 . 2 \\%$ density of Netflix dataset . For completeness, we also include the 6-month Netflix dataset as used in $\\mathrm { W u }$ et al. (2016a), which has only ratings, to study RRN’s ability to model temporal patterns. ",
|
| 814 |
+
"bbox": [
|
| 815 |
+
173,
|
| 816 |
+
276,
|
| 817 |
+
825,
|
| 818 |
+
429
|
| 819 |
+
],
|
| 820 |
+
"page_idx": 6
|
| 821 |
+
},
|
| 822 |
+
{
|
| 823 |
+
"type": "text",
|
| 824 |
+
"text": "The dataset is split by date instead of random sampling to simulate the real recommendation settings where we need to predict into the future instead of interpolating the past. IMDb training set contains all ratings from July 1998 to December 2012, and the ratings from January to September 2013 are randomly split into a validation set and a test set. Similarly, the 6-month Netflix dataset is split into January to November 2011 (training) and December 2011 (testing and validation). We report the results on testing set with the model that gives the best results on validation set. The summary of this dataset is given in Table 1. ",
|
| 825 |
+
"bbox": [
|
| 826 |
+
173,
|
| 827 |
+
436,
|
| 828 |
+
825,
|
| 829 |
+
534
|
| 830 |
+
],
|
| 831 |
+
"page_idx": 6
|
| 832 |
+
},
|
| 833 |
+
{
|
| 834 |
+
"type": "text",
|
| 835 |
+
"text": "Baselines We compare our model with models including the state-of-the-art temporal model, and a state-of-the-art neural network-based model. ",
|
| 836 |
+
"bbox": [
|
| 837 |
+
174,
|
| 838 |
+
551,
|
| 839 |
+
823,
|
| 840 |
+
579
|
| 841 |
+
],
|
| 842 |
+
"page_idx": 6
|
| 843 |
+
},
|
| 844 |
+
{
|
| 845 |
+
"type": "text",
|
| 846 |
+
"text": "• PMF (Mnih & Salakhutdinov, 2007): Our model extends matrix factorization by including a dynamic part and a joint review model. Comparing to PMF directly shows us the advantage of our approaches. LIBPMF (Yu et al., 2012) is used in experiments. • Time- $\\mathbf { S V D + + }$ (Koren, 2010): Time- ${ \\mathrm { S V D } } + +$ is the state-of-the-art model for temporal effects. It achieves excellent performance in Netflix contest. Implementation in GraphChi (Kyrola et al., 2012) is used in experiments. AutoRec (Sedhain et al., 2015): AutoRec is the state-of-the-art neural network recommender system. It learns an autoencoder that encodes user (item) histories into a lowdimensional space and then predict ratings by decoding. No temporal effects or causality are considered in this model. We use the software the authors provide in experiments. ",
|
| 847 |
+
"bbox": [
|
| 848 |
+
215,
|
| 849 |
+
592,
|
| 850 |
+
825,
|
| 851 |
+
742
|
| 852 |
+
],
|
| 853 |
+
"page_idx": 6
|
| 854 |
+
},
|
| 855 |
+
{
|
| 856 |
+
"type": "text",
|
| 857 |
+
"text": "All models use comparable number of factor sizes. Parameters of PMF and Time- $S _ { Ḋ } \\mathrm { Ḋ } \\mathrm { Ḋ } + + Ḍ Ḍ Ḍ$ are selected by grid-search. Settings of AutoRec follow the original paper. We also include the performance of rating-only RRN, as in Wu et al. (2016a), to separate the benefits obtained from temporal modeling and review texts. ",
|
| 858 |
+
"bbox": [
|
| 859 |
+
174,
|
| 860 |
+
755,
|
| 861 |
+
825,
|
| 862 |
+
811
|
| 863 |
+
],
|
| 864 |
+
"page_idx": 6
|
| 865 |
+
},
|
| 866 |
+
{
|
| 867 |
+
"type": "text",
|
| 868 |
+
"text": "4.2 RATING PREDICTION ",
|
| 869 |
+
"text_level": 1,
|
| 870 |
+
"bbox": [
|
| 871 |
+
176,
|
| 872 |
+
829,
|
| 873 |
+
357,
|
| 874 |
+
843
|
| 875 |
+
],
|
| 876 |
+
"page_idx": 6
|
| 877 |
+
},
|
| 878 |
+
{
|
| 879 |
+
"type": "text",
|
| 880 |
+
"text": "One important goal of recommender systems is making accurate rating predictions. Here we evaluate the accuracy by root-mean-square error (RMSE) of prediction from the true rating. The results are summarized in Table 2. For completeness, we include the results from Wu et al. (2016a) on ",
|
| 881 |
+
"bbox": [
|
| 882 |
+
176,
|
| 883 |
+
856,
|
| 884 |
+
825,
|
| 885 |
+
897
|
| 886 |
+
],
|
| 887 |
+
"page_idx": 6
|
| 888 |
+
},
|
| 889 |
+
{
|
| 890 |
+
"type": "text",
|
| 891 |
+
"text": "6-month Netflix dataset that use ratings only to compare the behavior of different models on different datasets. We see that rating-only RRN outperforms all baseline models in terms of rating prediction consistently in both dataset. More importantly, joint-modeling ratings and reviews boosts the performance even more, compared to rating-only RRN. This implies that by sharing statistical strength between ratings and reviews, the rich information in reviews helps us estimate the latent factors better. Note that while the absolute improvements in RMSE might not appear to be huge, the $1 . 9 8 \\%$ improvement over PMF is actually considerable in terms of recommendations2. We also see that while Time- $S _ { Ḋ } \\mathrm { Ḋ } \\mathrm { Ḋ } \\mathrm { Ḋ } \\mathrm { Ḍ + + Ḍ } Ḍ Ḍ$ performs well in Netflix contest, it does not work as well for predicting future ratings. After all, the goal of Time- ${ \\mathrm { S V D } } + +$ is estimating the temporal bias in hindsight instead of extrapolating into future states. ",
|
| 892 |
+
"bbox": [
|
| 893 |
+
173,
|
| 894 |
+
103,
|
| 895 |
+
826,
|
| 896 |
+
242
|
| 897 |
+
],
|
| 898 |
+
"page_idx": 7
|
| 899 |
+
},
|
| 900 |
+
{
|
| 901 |
+
"type": "text",
|
| 902 |
+
"text": "4.3 TEXT MODELING ",
|
| 903 |
+
"text_level": 1,
|
| 904 |
+
"bbox": [
|
| 905 |
+
174,
|
| 906 |
+
258,
|
| 907 |
+
334,
|
| 908 |
+
273
|
| 909 |
+
],
|
| 910 |
+
"page_idx": 7
|
| 911 |
+
},
|
| 912 |
+
{
|
| 913 |
+
"type": "text",
|
| 914 |
+
"text": "Here we examine the impact of conditioning on user and item states for text modeling. Towards this end, we compare perplexity of characters in testing set with and without using the user/item factors. Perplexity is defined as ",
|
| 915 |
+
"bbox": [
|
| 916 |
+
174,
|
| 917 |
+
285,
|
| 918 |
+
825,
|
| 919 |
+
328
|
| 920 |
+
],
|
| 921 |
+
"page_idx": 7
|
| 922 |
+
},
|
| 923 |
+
{
|
| 924 |
+
"type": "equation",
|
| 925 |
+
"img_path": "images/cc4b5bd9d5f86e570d3a12d19a9a2e3324c688c70b1f3fd3c030cd914be654c4.jpg",
|
| 926 |
+
"text": "$$\n\\mathrm { p p x } ( D _ { t e s t } ) = \\exp \\left( - \\frac { 1 } { N _ { c } } \\sum _ { c \\in D _ { t e s t } } \\log \\mathrm { P r } ( c ) \\right) ,\n$$",
|
| 927 |
+
"text_format": "latex",
|
| 928 |
+
"bbox": [
|
| 929 |
+
343,
|
| 930 |
+
332,
|
| 931 |
+
653,
|
| 932 |
+
376
|
| 933 |
+
],
|
| 934 |
+
"page_idx": 7
|
| 935 |
+
},
|
| 936 |
+
{
|
| 937 |
+
"type": "text",
|
| 938 |
+
"text": "where $N _ { c }$ is the total number of characters in $D _ { t e s t }$ , and $\\operatorname* { P r } ( c )$ is the likelihood of character $c$ Interestingly, we found that by jointly training with user and item states, the perplexity improves from 3.3442 to 3.3362. ",
|
| 939 |
+
"bbox": [
|
| 940 |
+
174,
|
| 941 |
+
382,
|
| 942 |
+
825,
|
| 943 |
+
424
|
| 944 |
+
],
|
| 945 |
+
"page_idx": 7
|
| 946 |
+
},
|
| 947 |
+
{
|
| 948 |
+
"type": "text",
|
| 949 |
+
"text": "4.4 TEMPORAL DYNAMICS ",
|
| 950 |
+
"text_level": 1,
|
| 951 |
+
"bbox": [
|
| 952 |
+
174,
|
| 953 |
+
441,
|
| 954 |
+
372,
|
| 955 |
+
455
|
| 956 |
+
],
|
| 957 |
+
"page_idx": 7
|
| 958 |
+
},
|
| 959 |
+
{
|
| 960 |
+
"type": "text",
|
| 961 |
+
"text": "Here we study if RRN is able to automatically capture the overall rating trends in IMDb by adaptively updating states along history sequence. Specifically, at each time step, we randomly sample up to 1000 users, and see what ratings the users would have given to each of the movie given their states at the time step, even in reality the user might not have given a rating to the movie. This gives us an unbiased estimation of average behavior of our model on each of the ratings. Figure 4 shows the average predicted ratings in this setting and the true average rating in the data set. We see that RRN clearly captures the overall trend in IMDb smoothly. ",
|
| 962 |
+
"bbox": [
|
| 963 |
+
173,
|
| 964 |
+
467,
|
| 965 |
+
825,
|
| 966 |
+
565
|
| 967 |
+
],
|
| 968 |
+
"page_idx": 7
|
| 969 |
+
},
|
| 970 |
+
{
|
| 971 |
+
"type": "image",
|
| 972 |
+
"img_path": "images/b8849510345d0331b0942f12e3291f4cbb62de48ab74ac6b6abcd4f84ac9b870.jpg",
|
| 973 |
+
"image_caption": [
|
| 974 |
+
"Figure 4: RRN is able to capture the overall trend of data. (a) show the average ratings of all movies on IMDb over time. In (b) we see the predicted ratings are consistent with this trend. "
|
| 975 |
+
],
|
| 976 |
+
"image_footnote": [],
|
| 977 |
+
"bbox": [
|
| 978 |
+
215,
|
| 979 |
+
583,
|
| 980 |
+
756,
|
| 981 |
+
761
|
| 982 |
+
],
|
| 983 |
+
"page_idx": 7
|
| 984 |
+
},
|
| 985 |
+
{
|
| 986 |
+
"type": "text",
|
| 987 |
+
"text": "5 DISCUSSION & CONCLUSION ",
|
| 988 |
+
"text_level": 1,
|
| 989 |
+
"bbox": [
|
| 990 |
+
176,
|
| 991 |
+
828,
|
| 992 |
+
449,
|
| 993 |
+
844
|
| 994 |
+
],
|
| 995 |
+
"page_idx": 7
|
| 996 |
+
},
|
| 997 |
+
{
|
| 998 |
+
"type": "text",
|
| 999 |
+
"text": "We present a novel approach that jointly models ratings, reviews, and their temporal dynamics with RRN. The contributions we have provided are as follows: ",
|
| 1000 |
+
"bbox": [
|
| 1001 |
+
173,
|
| 1002 |
+
859,
|
| 1003 |
+
823,
|
| 1004 |
+
887
|
| 1005 |
+
],
|
| 1006 |
+
"page_idx": 7
|
| 1007 |
+
},
|
| 1008 |
+
{
|
| 1009 |
+
"type": "text",
|
| 1010 |
+
"text": "1. Joint rating-review modeling: We offer an LSTM-based joint rating-review model that provides advantages in both rating prediction and text modeling. \n2. Nonparametric dynamic review modeling: RRN is based on an autoregressive method to model temporal dynamics of users and movies, allowing us to capture how reviews change over time. \n3. Empirical results: We demonstrate that our joint model offers state-of-the-art results on rating prediction in real recommendation settings, i.e. predicting into the future. ",
|
| 1011 |
+
"bbox": [
|
| 1012 |
+
210,
|
| 1013 |
+
103,
|
| 1014 |
+
825,
|
| 1015 |
+
213
|
| 1016 |
+
],
|
| 1017 |
+
"page_idx": 8
|
| 1018 |
+
},
|
| 1019 |
+
{
|
| 1020 |
+
"type": "text",
|
| 1021 |
+
"text": "REFERENCES ",
|
| 1022 |
+
"text_level": 1,
|
| 1023 |
+
"bbox": [
|
| 1024 |
+
176,
|
| 1025 |
+
103,
|
| 1026 |
+
285,
|
| 1027 |
+
117
|
| 1028 |
+
],
|
| 1029 |
+
"page_idx": 9
|
| 1030 |
+
},
|
| 1031 |
+
{
|
| 1032 |
+
"type": "text",
|
| 1033 |
+
"text": "Amjad Almahairi, Kyle Kastner, Kyunghyun Cho, and Aaron Courville. Learning distributed representations from reviews for collaborative filtering. In Proceedings of the 9th ACM Conference on Recommender Systems, pp. 147–154. ACM, 2015. ",
|
| 1034 |
+
"bbox": [
|
| 1035 |
+
174,
|
| 1036 |
+
126,
|
| 1037 |
+
823,
|
| 1038 |
+
169
|
| 1039 |
+
],
|
| 1040 |
+
"page_idx": 9
|
| 1041 |
+
},
|
| 1042 |
+
{
|
| 1043 |
+
"type": "text",
|
| 1044 |
+
"text": "R. M. Bell and Y. Koren. Lessons from the netflix prize challenge. SIGKDD Explorations, 2007. URL http://doi.acm.org/10.1145/1345448.1345465. ",
|
| 1045 |
+
"bbox": [
|
| 1046 |
+
171,
|
| 1047 |
+
176,
|
| 1048 |
+
825,
|
| 1049 |
+
207
|
| 1050 |
+
],
|
| 1051 |
+
"page_idx": 9
|
| 1052 |
+
},
|
| 1053 |
+
{
|
| 1054 |
+
"type": "text",
|
| 1055 |
+
"text": "Alex Beutel, Kenton Murray, Christos Faloutsos, and Alexander J Smola. Cobafi: collaborative bayesian filtering. In WWW, 2014. ",
|
| 1056 |
+
"bbox": [
|
| 1057 |
+
173,
|
| 1058 |
+
214,
|
| 1059 |
+
823,
|
| 1060 |
+
243
|
| 1061 |
+
],
|
| 1062 |
+
"page_idx": 9
|
| 1063 |
+
},
|
| 1064 |
+
{
|
| 1065 |
+
"type": "text",
|
| 1066 |
+
"text": "Alex Beutel, Amr Ahmed, and Alexander J Smola. ACCAMS: Additive Co-Clustering to Approximate Matrices Succinctly. In WWW, 2015. ",
|
| 1067 |
+
"bbox": [
|
| 1068 |
+
173,
|
| 1069 |
+
252,
|
| 1070 |
+
825,
|
| 1071 |
+
281
|
| 1072 |
+
],
|
| 1073 |
+
"page_idx": 9
|
| 1074 |
+
},
|
| 1075 |
+
{
|
| 1076 |
+
"type": "text",
|
| 1077 |
+
"text": "Cristian Danescu-Niculescu-Mizil, Robert West, Dan Jurafsky, Jure Leskovec, and Christopher Potts. No country for old members: User lifecycle and linguistic change in online communities. In WWW, 2013. ",
|
| 1078 |
+
"bbox": [
|
| 1079 |
+
176,
|
| 1080 |
+
289,
|
| 1081 |
+
825,
|
| 1082 |
+
332
|
| 1083 |
+
],
|
| 1084 |
+
"page_idx": 9
|
| 1085 |
+
},
|
| 1086 |
+
{
|
| 1087 |
+
"type": "text",
|
| 1088 |
+
"text": "Qiming Diao, Minghui Qiu, Chao-Yuan Wu, Alexander J Smola, Jing Jiang, and Chong Wang. Jointly modeling aspects, ratings and sentiments for movie recommendation (jmars). In KDD. ACM, 2014. ",
|
| 1089 |
+
"bbox": [
|
| 1090 |
+
176,
|
| 1091 |
+
340,
|
| 1092 |
+
825,
|
| 1093 |
+
383
|
| 1094 |
+
],
|
| 1095 |
+
"page_idx": 9
|
| 1096 |
+
},
|
| 1097 |
+
{
|
| 1098 |
+
"type": "text",
|
| 1099 |
+
"text": "Haoyuan Gao, Junhua Mao, Jie Zhou, Zhiheng Huang, Lei Wang, and Wei Xu. Are you talking to a machine? dataset and methods for multilingual image question answering. In NIPS, 2015. ",
|
| 1100 |
+
"bbox": [
|
| 1101 |
+
173,
|
| 1102 |
+
392,
|
| 1103 |
+
823,
|
| 1104 |
+
422
|
| 1105 |
+
],
|
| 1106 |
+
"page_idx": 9
|
| 1107 |
+
},
|
| 1108 |
+
{
|
| 1109 |
+
"type": "text",
|
| 1110 |
+
"text": "Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8): 1735–1780, 1997. ",
|
| 1111 |
+
"bbox": [
|
| 1112 |
+
173,
|
| 1113 |
+
430,
|
| 1114 |
+
823,
|
| 1115 |
+
458
|
| 1116 |
+
],
|
| 1117 |
+
"page_idx": 9
|
| 1118 |
+
},
|
| 1119 |
+
{
|
| 1120 |
+
"type": "text",
|
| 1121 |
+
"text": "Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. ",
|
| 1122 |
+
"bbox": [
|
| 1123 |
+
174,
|
| 1124 |
+
468,
|
| 1125 |
+
823,
|
| 1126 |
+
496
|
| 1127 |
+
],
|
| 1128 |
+
"page_idx": 9
|
| 1129 |
+
},
|
| 1130 |
+
{
|
| 1131 |
+
"type": "text",
|
| 1132 |
+
"text": "Y. Koren. Factorization meets the neighborhood: a multifaceted collaborative filtering model. In KDD, 2008. URL http://doi.acm.org/10.1145/1401890.1401944. ",
|
| 1133 |
+
"bbox": [
|
| 1134 |
+
171,
|
| 1135 |
+
506,
|
| 1136 |
+
825,
|
| 1137 |
+
535
|
| 1138 |
+
],
|
| 1139 |
+
"page_idx": 9
|
| 1140 |
+
},
|
| 1141 |
+
{
|
| 1142 |
+
"type": "text",
|
| 1143 |
+
"text": "Y. Koren, R.M. Bell, and C. Volinsky. Matrix factorization techniques for recommender systems. IEEE Computer, 2009. URL http://doi.ieeecomputersociety.org/10.1109/MC. 2009.263. ",
|
| 1144 |
+
"bbox": [
|
| 1145 |
+
174,
|
| 1146 |
+
542,
|
| 1147 |
+
825,
|
| 1148 |
+
585
|
| 1149 |
+
],
|
| 1150 |
+
"page_idx": 9
|
| 1151 |
+
},
|
| 1152 |
+
{
|
| 1153 |
+
"type": "text",
|
| 1154 |
+
"text": "Yehuda Koren. Collaborative filtering with temporal dynamics. Communications of the ACM, 53(4): 89–97, 2010. ",
|
| 1155 |
+
"bbox": [
|
| 1156 |
+
173,
|
| 1157 |
+
594,
|
| 1158 |
+
823,
|
| 1159 |
+
623
|
| 1160 |
+
],
|
| 1161 |
+
"page_idx": 9
|
| 1162 |
+
},
|
| 1163 |
+
{
|
| 1164 |
+
"type": "text",
|
| 1165 |
+
"text": "Aapo Kyrola, Guy Blelloch, and Carlos Guestrin. Graphchi: Large-scale graph computation on just a pc. In OSDI, 2012. ",
|
| 1166 |
+
"bbox": [
|
| 1167 |
+
173,
|
| 1168 |
+
631,
|
| 1169 |
+
823,
|
| 1170 |
+
661
|
| 1171 |
+
],
|
| 1172 |
+
"page_idx": 9
|
| 1173 |
+
},
|
| 1174 |
+
{
|
| 1175 |
+
"type": "text",
|
| 1176 |
+
"text": "Zachary Chase Lipton, Sharad Vikram, and Julian McAuley. Capturing meaning in product reviews with character-level generative text models. CoRR, 2015. ",
|
| 1177 |
+
"bbox": [
|
| 1178 |
+
173,
|
| 1179 |
+
669,
|
| 1180 |
+
823,
|
| 1181 |
+
699
|
| 1182 |
+
],
|
| 1183 |
+
"page_idx": 9
|
| 1184 |
+
},
|
| 1185 |
+
{
|
| 1186 |
+
"type": "text",
|
| 1187 |
+
"text": "J. McAuley and J. Leskovec. Hidden Factors and Hidden Topics: Understanding Rating Dimensions with Review Text. In RecSys, 2013. URL http://doi.acm.org/10.1145/2507157. 2507163. ",
|
| 1188 |
+
"bbox": [
|
| 1189 |
+
173,
|
| 1190 |
+
707,
|
| 1191 |
+
828,
|
| 1192 |
+
750
|
| 1193 |
+
],
|
| 1194 |
+
"page_idx": 9
|
| 1195 |
+
},
|
| 1196 |
+
{
|
| 1197 |
+
"type": "text",
|
| 1198 |
+
"text": "Andriy Mnih and Ruslan Salakhutdinov. Probabilistic matrix factorization. In NIPS, 2007. ",
|
| 1199 |
+
"bbox": [
|
| 1200 |
+
169,
|
| 1201 |
+
758,
|
| 1202 |
+
767,
|
| 1203 |
+
773
|
| 1204 |
+
],
|
| 1205 |
+
"page_idx": 9
|
| 1206 |
+
},
|
| 1207 |
+
{
|
| 1208 |
+
"type": "text",
|
| 1209 |
+
"text": "R. Salakhutdinov and A. Mnih. Bayesian probabilistic matrix factorization using markov chain monte carlo. In W.W. Cohen, A. McCallum, and S.T. Roweis (eds.), ICML, 2008. ",
|
| 1210 |
+
"bbox": [
|
| 1211 |
+
174,
|
| 1212 |
+
782,
|
| 1213 |
+
820,
|
| 1214 |
+
811
|
| 1215 |
+
],
|
| 1216 |
+
"page_idx": 9
|
| 1217 |
+
},
|
| 1218 |
+
{
|
| 1219 |
+
"type": "text",
|
| 1220 |
+
"text": "Suvash Sedhain, Aditya Krishna Menon, Scott Sanner, and Lexing Xie. Autorec: Autoencoders meet collaborative filtering. In WWW Companion, 2015. ",
|
| 1221 |
+
"bbox": [
|
| 1222 |
+
174,
|
| 1223 |
+
820,
|
| 1224 |
+
821,
|
| 1225 |
+
849
|
| 1226 |
+
],
|
| 1227 |
+
"page_idx": 9
|
| 1228 |
+
},
|
| 1229 |
+
{
|
| 1230 |
+
"type": "text",
|
| 1231 |
+
"text": "David H Stern, Ralf Herbrich, and Thore Graepel. Matchbox: large scale online bayesian recommendations. In WWW. ACM, 2009. ",
|
| 1232 |
+
"bbox": [
|
| 1233 |
+
173,
|
| 1234 |
+
857,
|
| 1235 |
+
823,
|
| 1236 |
+
887
|
| 1237 |
+
],
|
| 1238 |
+
"page_idx": 9
|
| 1239 |
+
},
|
| 1240 |
+
{
|
| 1241 |
+
"type": "text",
|
| 1242 |
+
"text": "Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In NIPS, 2014. ",
|
| 1243 |
+
"bbox": [
|
| 1244 |
+
174,
|
| 1245 |
+
895,
|
| 1246 |
+
823,
|
| 1247 |
+
924
|
| 1248 |
+
],
|
| 1249 |
+
"page_idx": 9
|
| 1250 |
+
},
|
| 1251 |
+
{
|
| 1252 |
+
"type": "text",
|
| 1253 |
+
"text": "Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and tell: A neural image caption generator. In CVPR, 2015. \nXuerui Wang and Andrew McCallum. Topics over time: a non-markov continuous-time model of topical trends. In KDD. ACM, 2006. \nC.-Y. Wu, A. Beutel, A. Ahmed, A. J. Smola, and H. Jing. Recurrent recommender networks. In Web Science and Data Mining (WSDM), 2016a. \nChao-Yuan Wu, Alex Beutel, Amr Ahmed, and Alexander J. Smola. Explaining reviews and ratings with PACO: poisson additive co-clustering. In WWW Companion, 2016b. doi: 10.1145/2872518. 2889400. URL http://doi.acm.org/10.1145/2872518.2889400. \nZichao Yang, Diyi Yang, Chris Dyer, Xiaodong He, Alexander J. Smola, and Eduard Hovy. Hierarchical attention networks for document classification. In NAACL, 2016. \nHsiang-Fu Yu, Cho-Jui Hsieh, Si Si, and Inderjit S. Dhillon. Scalable coordinate descent approaches to parallel matrix factorization for recommender systems. In ICDM, 2012. ",
|
| 1254 |
+
"bbox": [
|
| 1255 |
+
171,
|
| 1256 |
+
103,
|
| 1257 |
+
826,
|
| 1258 |
+
335
|
| 1259 |
+
],
|
| 1260 |
+
"page_idx": 10
|
| 1261 |
+
}
|
| 1262 |
+
]
|
parse/train/HksioDcxl/HksioDcxl_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/HksioDcxl/HksioDcxl_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/S1jE5L5gl/S1jE5L5gl.md
ADDED
|
@@ -0,0 +1,567 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# THE CONCRETE DISTRIBUTION: A CONTINUOUS RELAXATION OF DISCRETE RANDOM VARIABLES
|
| 2 |
+
|
| 3 |
+
Chris J. Maddison1,2, Andriy $\mathbf { M n i h 1 }$ , & Yee Whye Teh1
|
| 4 |
+
|
| 5 |
+
1DeepMind, London, United Kingdom 2University of Oxford, Oxford, United Kingdom cmaddis@stats.ox.ac.uk
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
The reparameterization trick enables optimizing large scale stochastic computation graphs via gradient descent. The essence of the trick is to refactor each stochastic node into a differentiable function of its parameters and a random variable with fixed distribution. After refactoring, the gradients of the loss propagated by the chain rule through the graph are low variance unbiased estimators of the gradients of the expected loss. While many continuous random variables have such reparameterizations, discrete random variables lack useful reparameterizations due to the discontinuous nature of discrete states. In this work we introduce CONCRETE random variables – CONtinuous relaxations of disCRETE random variables. The Concrete distribution is a new family of distributions with closed form densities and a simple reparameterization. Whenever a discrete stochastic node of a computation graph can be refactored into a one-hot bit representation that is treated continuously, Concrete stochastic nodes can be used with automatic differentiation to produce low-variance biased gradients of objectives (including objectives that depend on the log-probability of latent stochastic nodes) on the corresponding discrete graph. We demonstrate the effectiveness of Concrete relaxations on density estimation and structured prediction tasks using neural networks.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
Software libraries for automatic differentiation (AD) (Abadi et al., 2015; Theano Development Team, 2016) are enjoying broad use, spurred on by the success of neural networks on some of the most challenging problems of machine learning. The dominant mode of development in these libraries is to define a forward parametric computation, in the form of a directed acyclic graph, that computes the desired objective. If the components of the graph are differentiable, then a backwards computation for the gradient of the objective can be derived automatically with the chain rule. The ease of use and unreasonable effectiveness of gradient descent has led to an explosion in the diversity of architectures and objective functions. Thus, expanding the range of useful continuous operations can have an outsized impact on the development of new models. For example, a topic of recent attention has been the optimization of stochastic computation graphs from samples of their states. Here, the observation that AD “just works” when stochastic nodes1 can be reparameterized into deterministic functions of their parameters and a fixed noise distribution (Kingma & Welling, 2013; Rezende et al., 2014), has liberated researchers in the development of large complex stochastic architectures (e.g. Gregor et al., 2015).
|
| 14 |
+
|
| 15 |
+
Computing with discrete stochastic nodes still poses a significant challenge for AD libraries. Deterministic discreteness can be relaxed and approximated reasonably well with sigmoidal functions or the softmax (see e.g., Grefenstette et al., 2015; Graves et al., 2016), but, if a distribution over discrete states is needed, there is no clear solution. There are well known unbiased estimators for the gradients of the parameters of a discrete stochastic node from samples. While these can be made to work with AD, they involve special casing and defining surrogate objectives (Schulman et al., 2015), and even then they can have high variance. Still, reasoning about discrete computation comes naturally to humans, and so, despite the difficulty associated, many modern architectures incorporate discrete stochasticity (Mnih et al., 2014; Xu et al., 2015; Kocisk ˇ y et al., 2016). ´
|
| 16 |
+
|
| 17 |
+
This work is inspired by the observation that many architectures treat discrete nodes continuously, and gradients rich with counterfactual information are available for each of their possible states. We introduce a CONtinuous relaxation of disCRETE random variables, CONCRETE for short, which allow gradients to flow through their states. The Concrete distribution is a new parametric family of continuous distributions on the simplex with closed form densities. Sampling from the Concrete distribution is as simple as taking the softmax of logits perturbed by fixed additive noise. This reparameterization means that Concrete stochastic nodes are quick to implement in a way that “just works” with AD. Crucially, every discrete random variable corresponds to the zero temperature limit of a Concrete one. In this view optimizing an objective over an architecture with discrete stochastic nodes can be accomplished by gradient descent on the samples of the corresponding Concrete relaxation. When the objective depends, as in variational inference, on the log-probability of discrete nodes, the Concrete density is used during training in place of the discrete mass. At test time, the graph with discrete nodes is evaluated.
|
| 18 |
+
|
| 19 |
+
The paper is organized as follows. We provide a background on stochastic computation graphs and their optimization in Section 2. Section 3 reviews a reparameterization for discrete random variables, introduces the Concrete distribution, and discusses its application as a relaxation. Section 4 reviews related work. In Section 5 we present results on a density estimation task and a structured prediction task on the MNIST and Omniglot datasets. In Appendices C and F we provide details on the practical implementation and use of Concrete random variables. When comparing the effectiveness of gradients obtained via Concrete relaxations to a state-of-the-art-method (VIMCO, Mnih & Rezende, 2016), we find that they are competitive — occasionally outperforming and occasionally underperforming — all the while being implemented in an AD library without special casing.
|
| 20 |
+
|
| 21 |
+
# 2 BACKGROUND
|
| 22 |
+
|
| 23 |
+
# 2.1 OPTIMIZING STOCHASTIC COMPUTATION GRAPHS
|
| 24 |
+
|
| 25 |
+
Stochastic computation graphs (SCGs) provide a formalism for specifying input-output mappings, potentially stochastic, with learnable parameters using directed acyclic graphs (see Schulman et al. (2015) for a review). The state of each non-input node in such a graph is obtained from the states of its parent nodes by either evaluating a deterministic function or sampling from a conditional distribution. Many training objectives in supervised, unsupervised, and reinforcement learning can be expressed in terms of SCGs.
|
| 26 |
+
|
| 27 |
+
To optimize an objective represented as a SCG, we need estimates of its parameter gradients. We will concentrate on graphs with some stochastic nodes (backpropagation covers the rest). For simplicity, we restrict our attention to graphs with a single stochastic node $X$ . We can interpret the forward pass in the graph as first sampling $X$ from the conditional distribution $p _ { \phi } ( x )$ of the stochastic node given its parents, then evaluating a deterministic function $f _ { \boldsymbol { \theta } } ( \boldsymbol { x } )$ at $X$ . We can think of $f _ { \theta } ( X )$ as a noisy objective, and we are interested in optimizing its expected value $L ( \theta , \phi ) = \mathbb { E } _ { X \sim p _ { \phi } ( x ) } [ f _ { \theta } ( X ) ]$ w.r.t. parameters $\theta , \phi$ .
|
| 28 |
+
|
| 29 |
+
In general, both the objective and its gradients are intractable. We will side-step this issue by estimating them with samples from $p _ { \phi } ( x )$ . The gradient w.r.t. to the parameters $\theta$ has the form
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
\nabla _ { \theta } L ( \theta , \phi ) = \nabla _ { \theta } \mathbb { E } _ { X \sim p _ { \phi } ( x ) } [ f _ { \theta } ( X ) ] = \mathbb { E } _ { X \sim p _ { \phi } ( x ) } [ \nabla _ { \theta } f _ { \theta } ( X ) ]
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+
and can be easily estimated using Monte Carlo sampling:
|
| 36 |
+
|
| 37 |
+
$$
|
| 38 |
+
\nabla _ { \boldsymbol { \theta } } L ( \boldsymbol { \theta } , \boldsymbol { \phi } ) \simeq \frac { 1 } { S } \sum _ { s = 1 } ^ { S } \nabla _ { \boldsymbol { \theta } } f _ { \boldsymbol { \theta } } ( X ^ { s } ) ,
|
| 39 |
+
$$
|
| 40 |
+
|
| 41 |
+
where $X ^ { s } \sim p _ { \phi } ( x )$ i.i.d. The more challenging task is to compute the gradient w.r.t. the parameters $\phi$ of $p _ { \phi } ( x )$ . The expression obtained by differentiating the expected objective,
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
\nabla _ { \phi } L ( \theta , \phi ) = \nabla _ { \phi } \int p _ { \phi } ( x ) f _ { \theta } ( x ) \mathrm { d } x = \int f _ { \theta } ( x ) \nabla _ { \phi } p _ { \phi } ( x ) \mathrm { d } x ,
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
does not have the form of an expectation w.r.t. $x$ and thus does not directly lead to a Monte Carlo gradient estimator. However, there are two ways of getting around this difficulty which lead to the two classes of estimators we will now discuss.
|
| 48 |
+
|
| 49 |
+
# 2.2 SCORE FUNCTION ESTIMATORS
|
| 50 |
+
|
| 51 |
+
The score function estimator (SFE, Fu, 2006), also known as the REINFORCE (Williams, 1992) or likelihood-ratio estimator (Glynn, 1990), is based on the identity $\nabla _ { \phi } p _ { \phi } ( x ) = p _ { \phi } ( x ) \nabla _ { \phi } \log p _ { \phi } ( x )$ , which allows the gradient in Eq. 3 to be written as an expectation:
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\nabla _ { \phi } L ( \theta , \phi ) = \mathbb { E } _ { X \sim p _ { \phi } ( x ) } \left[ f _ { \theta } ( X ) \nabla _ { \phi } \log p _ { \phi } ( X ) \right] .
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
Estimating this expectation using naive Monte Carlo gives the estimator
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
\nabla _ { \phi } L ( \theta , \phi ) \simeq \frac { 1 } { S } \sum _ { s = 1 } ^ { S } f _ { \theta } ( X ^ { s } ) \nabla _ { \phi } \log p _ { \phi } ( X ^ { s } ) ,
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
where $X ^ { s } \sim p _ { \phi } ( x )$ i.i.d. This is a very general estimator that is applicable whenever $\log p _ { \phi } ( x )$ is differentiable w.r.t. $\phi$ . As it does not require $f _ { \boldsymbol { \theta } } ( \boldsymbol { x } )$ to be differentiable or even continuous as a function of $x$ , the SFE can be used with both discrete and continuous random variables.
|
| 64 |
+
|
| 65 |
+
Though the basic version of the estimator can suffer from high variance, various variance reduction techniques can be used to make the estimator much more effective (Greensmith et al., 2004). Baselines are the most important and widely used of these techniques (Williams, 1992).
|
| 66 |
+
|
| 67 |
+
# 2.3 REPARAMETERIZATION TRICK
|
| 68 |
+
|
| 69 |
+
In many cases we can sample from $p _ { \phi } ( x )$ by first sampling $Z$ from some fixed distribution $q ( z )$ and then transforming the sample using some function $g _ { \phi } ( z )$ . For example, a sample from $\operatorname { N o r m a l } ( \mu , \sigma ^ { 2 } )$ can be obtained by sampling $Z$ from the standard form of the distribution $\mathrm { { N o r m a l } } ( 0 , 1 )$ and then transforming it using $g _ { \mu , \sigma } ( Z ) = \mu + \sigma Z$ . This two-stage reformulation of the sampling process, called the reparameterization trick, allows us to transfer the dependence on $\phi$ from $p$ into $f$ by writing $f _ { \theta } ( x ) = \bar { f } _ { \theta } ( g _ { \phi } ( z ) )$ for $x = g _ { \phi } ( z )$ , making it possible to reduce the problem of estimating the gradient w.r.t. parameters of a distribution to the simpler problem of estimating the gradient w.r.t. parameters of a deterministic function.
|
| 70 |
+
|
| 71 |
+
Having reparameterized $p _ { \phi } ( x )$ , we can now express the objective as an expectation w.r.t. $q ( z )$ :
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
L ( \theta , \phi ) = \mathbb { E } _ { X \sim p _ { \phi } ( x ) } [ f _ { \theta } ( X ) ] = \mathbb { E } _ { Z \sim q ( z ) } [ f _ { \theta } ( g _ { \phi } ( Z ) ) ] .
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
As $q ( z )$ does not depend on $\phi$ , we can estimate the gradient w.r.t. $\phi$ in exactly the same way we estimated the gradient w.r.t. $\theta$ in Eq. 1. Assuming differentiability of $f _ { \boldsymbol { \theta } } ( \boldsymbol { x } )$ w.r.t. $x$ and of $g _ { \phi } ( z )$ w.r.t. $\phi$ and using the chain rule gives
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
\nabla _ { \phi } L ( \theta , \phi ) = \mathbb { E } _ { Z \sim q ( z ) } [ \nabla _ { \phi } f _ { \theta } ( g _ { \phi } ( Z ) ) ] = \mathbb { E } _ { Z \sim q ( z ) } \left[ f _ { \theta } ^ { \prime } ( g _ { \phi } ( Z ) ) \nabla _ { \phi } g _ { \phi } ( Z ) \right] .
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
The reparameterization trick can be applied to many continuous random variables (Kingma & Welling, 2014) and is usually the estimator of choice when it is applicable. It is in large part responsible for the wide adoption of variational autoencoders and related models. Unfortunately, it cannot be applied to discrete latent variables or in cases for which $f$ is not differentiable.
|
| 84 |
+
|
| 85 |
+
# 2.4 APPLICATION: VARIATIONAL TRAINING OF LATENT VARIABLE MODELS
|
| 86 |
+
|
| 87 |
+
We will now see how the task of training latent variable models can be formulated in the SCG framework. Such models assume that each observation $x$ is obtained by first sampling a vector of latent variables $Z$ from the prior $p _ { \theta } ( z )$ before sampling the observation itself from $\bar { p } _ { \theta } ( x \mid z )$ . Thus the probability of observation $x$ is $\begin{array} { r } { \dot { p _ { \theta } } ( x ) = \sum _ { z } \bar { p _ { \theta } } ( \bar { z } ) p _ { \theta } ( x \mid z ) } \end{array}$ . Maximum likelihood training of such models is infeasible, because the log-likelihood (LL) objective $L ( \theta ) = \log p _ { \theta } ( x ) =$ $\log \mathbb { E } _ { Z \sim p _ { \theta } ( z ) } [ p _ { \theta } ( x \mid Z ) ]$ is typically intractable and does not fit into the above framework due to the expectation being inside the log. The multi-sample variational objective (Burda et al., 2016),
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
\mathcal { L } _ { m } ( \theta , \phi ) = \underset { Z ^ { i } \sim q _ { \phi } ( z | x ) } { \mathbb { E } } \left[ \log \left( \frac { 1 } { m } \sum _ { i = 1 } ^ { m } \frac { p _ { \theta } ( Z ^ { i } , x ) } { q _ { \phi } ( Z ^ { i } \mid x ) } \right) \right] .
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+

|
| 94 |
+
Figure 1: Visualization of sampling graphs for 3-ary discrete $D \sim \mathrm { D i s c r e t e } ( \alpha )$ and 3-ary Concrete $X \sim \mathrm { C o n c r e t e } ( \alpha , \lambda )$ . White operations are deterministic, blue are stochastic, rounded are continuous, square discrete. The top node is an example state; brightness indicates a value in [0,1].
|
| 95 |
+
|
| 96 |
+
provides a convenient alternative which has precisely the form we considered in Section 2.1. This approach relies on introducing an auxiliary distribution $q _ { \phi } ( z \mid x )$ with its own parameters, which serves as approximation to the intractable posterior $p _ { \theta } ( z \mid x )$ . The model is trained by jointly maximizing the objective w.r.t. to the parameters of $p$ and $q$ . The number of samples used inside the objective $m$ allows trading off the computational cost against the tightness of the bound. For $m = 1$ , ${ \mathcal { L } } _ { m } ( \theta , \phi )$ becomes is the widely used evidence lower bound (ELBO, Hoffman et al., 2013) on $\log p _ { \theta } ( x )$ , while for $m > 1$ , it is known as the importance weighted bound (Burda et al., 2016).
|
| 97 |
+
|
| 98 |
+
The reparameterization trick, introduced in the context of variational inference independently by Kingma & Welling (2014), Rezende et al. (2014), and Titsias & Lazaro-Gredilla (2014), is the ´ method of choice for training variational autoencoders and related models with continuous latent variables. For models with discrete latent variables, the discontinuous nature of which makes reparameterization not useful, a number of score function estimators have been developed (Paisley et al., 2012; Gregor et al., 2013; Ranganath et al., 2014; Mnih & Gregor, 2014; Titsias & Lazaro-Gredilla, ´ 2015; Gu et al., 2016), which differ primarily in the variance reduction techniques used. Recently, new hybrid estimators have also been developed for continuous latent variables which are not directly reparameterizable, by combining partial reparameterizations with score function estimators (Ruiz et al., 2016; Naesseth et al., 2016).
|
| 99 |
+
|
| 100 |
+
# 3 THE CONCRETE DISTRIBUTION
|
| 101 |
+
|
| 102 |
+
# 3.1 DISCRETE RANDOM VARIABLES AND THE GUMBEL-MAX TRICK
|
| 103 |
+
|
| 104 |
+
To motivate the construction of Concrete random variables, we review a method for sampling from discrete distributions called the Gumbel-Max trick (Luce, 1959; Yellott, 1977; Papandreou & Yuille, 2011; Hazan & Jaakkola, 2012; Maddison et al., 2014). We restrict ourselves to a representation of discrete states as vectors $d \in \{ 0 , 1 \} ^ { n }$ of bits that are one-hot, or $\textstyle \sum _ { k = 1 } ^ { n } d _ { k } = 1$ . This is a flexible representation in a computation graph; to achieve an integral representation take the inner product of $d$ with $( 1 , \ldots , n )$ , and to achieve a point mass representation in $\mathbb { R } ^ { m }$ take $W d$ where $W \in \mathbf { \overline { { R } } } ^ { m \times n }$ .
|
| 105 |
+
|
| 106 |
+
Consider an unnormalized parameterization $( \alpha _ { 1 } , \ldots , \alpha _ { n } )$ where $\alpha _ { k } \in \mathsf { \Gamma } ( 0 , \infty )$ of a discrete distribution $D \sim \mathrm { D i s c r e t e } ( \alpha )$ — we can assume that states with 0 probability are excluded. The Gumbel-Max trick proceeds as follows: sample $U _ { k } \sim \mathrm { U n i f o r m } ( 0 , 1 )$ i.i.d. for each $k$ , find $k$ that maximizes $\{ \log \alpha _ { k } - \log ( - \log U _ { k } ) \}$ , set $D _ { k } = 1$ and the remaining $D _ { i } = 0$ for $i \neq k$ . Then
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\mathbb { P } ( D _ { k } = 1 ) = \frac { \alpha _ { k } } { \sum _ { i = 1 } ^ { n } \alpha _ { i } } .
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
In other words, the sampling of a discrete random variable can be refactored into a deterministic function — componentwise addition followed by argmax — of the parameters $\log \alpha _ { k }$ and fixed distribution $- \log ( - \log U _ { k } )$ . See Figure 1a for a visualization.
|
| 113 |
+
|
| 114 |
+
The apparently arbitrary choice of noise gives the trick its name, $\mathrm { ~ } \ s - \log ( - \log U )$ has a Gumbel distribution. This distribution features in extreme value theory (Gumbel, 1954) where it plays a central role similar to the Normal distribution: the Gumbel distribution is stable under max operations, and for some distributions, the order statistics (suitably normalized) of i.i.d. draws approach the Gumbel in distribution. The Gumbel can also be recognized as a $- \log$ -transformed exponential random variable. So, the correctness of (9) also reduces to a well known result regarding the argmin of exponential random variables. See (Hazan et al., 2016) for a collection of related work, and particularly the chapter (Maddison, 2016) for a proof and generalization of this trick.
|
| 115 |
+
|
| 116 |
+

|
| 117 |
+
Figure 2: A discrete distribution with unnormalized probabilities $( \alpha _ { 1 } , \alpha _ { 2 } , \alpha _ { 3 } ) \ = \ ( 2 , 0 . 5 , 1 )$ and three corresponding Concrete densities at increasing temperatures $\lambda$ . Each triangle represents the set of points $( y _ { 1 } , y _ { 2 } , y _ { 3 } )$ in the simplex $\Delta ^ { 2 } = \{ ( y _ { 1 } , y _ { 2 } , y _ { 3 } ) ~ | ~ y _ { k } \in ( 0 , 1 ) , y _ { 1 } + y _ { 2 } ^ { - } + y _ { 3 } ^ { - } = 1 \}$ . For $\lambda = 0$ the size of white circles represents the mass assigned to each vertex of the simplex under the discrete distribution. For $\lambda \in \{ 2 , \bar { 1 } , 0 . 5 \}$ the intensity of the shading represents the value of $p _ { \alpha , \lambda } ( y )$ .
|
| 118 |
+
|
| 119 |
+
# 3.2 CONCRETE RANDOM VARIABLES
|
| 120 |
+
|
| 121 |
+
The derivative of the argmax is 0 everywhere except at the boundary of state changes, where it is undefined. For this reason the Gumbel-Max trick is not a suitable reparameterization for use in SCGs with AD. Here we introduce the Concrete distribution motivated by considering a graph, which is the same as Figure 1a up to a continuous relaxation of the argmax computation, see Figure 1b. This will ultimately allow the optimization of parameters $\alpha _ { k }$ via gradients.
|
| 122 |
+
|
| 123 |
+
The argmax computation returns states on the vertices of the simplex $\Delta ^ { n - 1 } = \{ x \in \mathbb { R } ^ { n } \mid x _ { k } \in $ $[ 0 , 1 ] , { \overset { \vartriangle } { \sum } } _ { k = 1 } ^ { n } x _ { k } = { \overset { \vartriangle } { 1 } } \}$ . The idea behind Concrete random variables is to relax the state of a discrete variable from the vertices into the interior where it is a random probability vector—a vector of numbers between 0 and 1 that sum to 1. To sample a Concrete random variable $X \in \Delta ^ { n - 1 }$ at temperature $\lambda \in ( 0 , \infty )$ with parameters $\alpha _ { k } \in ( 0 , \infty )$ , sample $G _ { k } \sim$ Gumbel i.i.d. and set
|
| 124 |
+
|
| 125 |
+
$$
|
| 126 |
+
X _ { k } = \frac { \exp ( ( \log \alpha _ { k } + G _ { k } ) / \lambda ) } { \sum _ { i = 1 } ^ { n } \exp ( ( \log \alpha _ { i } + G _ { i } ) / \lambda ) } .
|
| 127 |
+
$$
|
| 128 |
+
|
| 129 |
+
The softmax computation of (10) smoothly approaches the discrete argmax computation as $\lambda 0$ while preserving the relative order of the Gumbels $\log \alpha _ { k } + G _ { k }$ . So, imagine making a series of forward passes on the graphs of Figure 1. Both graphs return a stochastic value for each forward pass, but for smaller temperatures the outputs of Figure 1b become more discrete and eventually indistinguishable from a typical forward pass of Figure 1a.
|
| 130 |
+
|
| 131 |
+
The distribution of $X$ sampled via (10) has a closed form density on the simplex. Because there may be other ways to sample a Concrete random variable, we take the density to be its definition.
|
| 132 |
+
|
| 133 |
+
Definition 1 (Concrete Random Variables). Let $\alpha \in ( 0 , \infty ) ^ { n }$ and $\lambda \in ( 0 , \infty )$ . $X \in \Delta ^ { n - 1 }$ has a Concrete distribution $X \sim \operatorname { C o n c r e t e } ( \alpha , \lambda )$ with location $\alpha$ and temperature $\lambda$ , if its density is:
|
| 134 |
+
|
| 135 |
+
$$
|
| 136 |
+
p _ { \alpha , \lambda } ( x ) = ( n - 1 ) ! \lambda ^ { n - 1 } \prod _ { k = 1 } ^ { n } \left( \frac { \alpha _ { k } x _ { k } ^ { - \lambda - 1 } } { \sum _ { i = 1 } ^ { n } \alpha _ { i } x _ { i } ^ { - \lambda } } \right) .
|
| 137 |
+
$$
|
| 138 |
+
|
| 139 |
+
Proposition 1 lists a few properties of the Concrete distribution. (a) is confirmation that our definition corresponds to the sampling routine (10). (b) confirms that rounding a Concrete random variable results in the discrete random variable whose distribution is described by the logits $\log \alpha _ { k }$ , (c) confirms that taking the zero temperature limit of a Concrete random variable is the same as rounding. Finally, (d) is a convexity result on the density. We prove these results in Appendix A.
|
| 140 |
+
|
| 141 |
+
Proposition 1 (Some Properties of Concrete Random Variables). Let $X \sim \mathrm { C o n c r e t e } ( \alpha , \lambda )$ with location parameters $\alpha \in ( 0 , \infty ) ^ { n }$ and temperature $\lambda \in ( 0 , \infty )$ , then
|
| 142 |
+
|
| 143 |
+
(a) (Reparameterization) If $G _ { k } \sim$ Gumbel i.i.d., then $\begin{array} { r } { X _ { k } \overset { d } { = } \frac { \exp ( ( \log \alpha _ { k } + G _ { k } ) / \lambda ) } { \sum _ { i = 1 } ^ { n } \exp ( ( \log \alpha _ { i } + G _ { i } ) / \lambda ) } } \end{array}$ , $\begin{array} { r } { \mathrm { ( ) } \ \left( R o u n d i n g \right) \mathbb { P } \left( X _ { k } > X _ { i } \ f o r \ i \neq k \right) = \alpha _ { k } / ( \sum _ { i = 1 } ^ { n } \alpha _ { i } ) , } \end{array}$ (c) (Zero temperature) $\begin{array} { r } { \mathbb { P } ( \operatorname* { l i m } _ { \lambda 0 } X _ { k } = 1 ) = \alpha _ { k } / ( \sum _ { i = 1 } ^ { n } \alpha _ { i } ) , } \end{array}$ (d) (Convex eventually) If $\lambda \le ( n - 1 ) ^ { - 1 }$ , then $p _ { \alpha , \lambda } ( x )$ is log-convex in $x$ .
|
| 144 |
+
|
| 145 |
+

|
| 146 |
+
Figure 3: A visualization of the binary special case. (a) shows the discrete trick, which works by passing a noisy logit through the unit step function. (b), (c), (d) show Concrete relaxations; the horizontal blue densities show the density of the input distribution and the vertical densities show the corresponding Binary Concrete density on $( 0 , 1 )$ for varying $\lambda$ .
|
| 147 |
+
|
| 148 |
+
The binary case of the Gumbel-Max trick simplifies to passing additive noise through a step function. The corresponding Concrete relaxation is implemented by passing additive noise through a sigmoid—see Figure 3. We cover this more thoroughly in Appendix B, along with a cheat sheet (Appendix F) on the density and implementation of all the random variables discussed in this work.
|
| 149 |
+
|
| 150 |
+
# 3.3 CONCRETE RELAXATIONS
|
| 151 |
+
|
| 152 |
+
Concrete random variables may have some intrinsic value, but we investigate them simply as surrogates for optimizing a SCG with discrete nodes. When it is computationally feasible to integrate over the discreteness, that will always be a better choice. Thus, we consider the use case of optimizing a large graph with discrete stochastic nodes from samples. Here we outline some considerations when using Concrete relaxations and when we expect it to work.
|
| 153 |
+
|
| 154 |
+
The basic paradigm we propose is the following: during training replace every discrete node with a Concrete stochastic node at some fixed temperature (or with an annealing schedule). When an objective depends on the log-probability of discrete variables in the SCG, as the variational lowerbound does, we propose that the log-probability terms are also “relaxed” to represent the true distribution of the relaxed node. By ensuring that the log-probability terms for the latent variables match their sampling distribution, this preserves the property that the variational objective bounds the log-probability of the observed data. Note that this is possible, because the Concrete-discrete pairing satisfies this valuable property: the discretization of any Concrete distribution has a closed form mass function, and the relaxation of any discrete distribution into a Concrete distribution has a closed form density. It is generally easy to go from a continuous process to a discrete one by quantizing and backwards by relaxing, but maintaining analytic tractability both ways is not always possible. For example, there is no closed form for the mass function of the multinomial probit model — the Gumbel-Max trick but with Gaussians replacing Gumbels. We cover all of these suggestions for a simple variational autoencoder with discrete units example in Appendix C.
|
| 155 |
+
|
| 156 |
+
Because the graphs are identical up to the softmax / argmax computations, the parameters of the relaxed graph and discrete graph are the same. The random states of the Concrete relaxation approach the corresponding discrete random states almost surely in the zero-temperature limit, Proposition 1 (c). Still, the success of Concrete relaxations will depend on the choice of temperature during training. It is important that the relaxed nodes are not able to represent a precise real valued mode in the interior of the simplex as in Figure 2d. If this is the case, it is possible for the relaxed random variable to communicate much more than $\log _ { 2 } ( n )$ bits of information about its $\alpha$ parameters. This might lead the relaxation to prefer the interior of the simplex to the vertices, and as a result there will be a large integrality gap in the overall performance of the discrete graph. Therefore Proposition 1 (d) is a conservative guideline for generic $n$ -ary Concrete relaxations; at temperatures lower than $( n - 1 ) ^ { - 1 }$ we are guaranteed not to have any modes in the interior for any $\alpha \in ( 0 , \infty ) ^ { n }$ . We discuss the subtleties of choosing the temperature in more detail in Appendix C. Ultimately the best choice of $\lambda$ and the performance of the relaxation for any specific $n$ will be an empirical question.
|
| 157 |
+
|
| 158 |
+
# 4 RELATED WORK
|
| 159 |
+
|
| 160 |
+
Perhaps the most common distribution over the simplex is the Dirichlet with density $p _ { \alpha } ( x ) \ \propto$ $\scriptstyle \prod _ { k = 1 } ^ { n } x _ { k } ^ { \alpha _ { k } - 1 }$ on $x \in \Delta ^ { n - 1 }$ . The Dirichlet can be characterized by strong independence properties, and a great deal of work has been done to generalize it (Connor & Mosimann, 1969; Aitchison, 1985; Rayens & Srinivasan, 1994; Favaro et al., 2011). Of note is the logistic Normal distribution (Atchison & Shen, 1980), which can be simulated by taking the softmax of $n - 1$ normal random variables and an nth logit that is deterministically zero. The logistic Normal is an important distribution, because it can effectively model correlations within the simplex (Blei & Lafferty, 2006). To our knowledge the Concrete distribution does not fall completely into any family of distributions previously described. For $\lambda \leq 1$ the Concrete is in a class of normalized infinitely divisible distributions (S. Favaro, personal communication), and the results of Favaro et al. (2011) apply.
|
| 161 |
+
|
| 162 |
+
The idea of using a softmax of Gumbels as a relaxation for a discrete random variable was concurrently considered by (Jang et al., 2016), where it was called the Gumbel-Softmax. They do not use the density in the relaxed objective, opting instead to compute all aspects of the graph, including discrete log-probability computations, with the relaxed stochastic state of the graph. In the case of variational inference, this relaxed objective is not a lower bound on the marginal likelihood of the observations, and care needs to be taken when optimizing it. The idea of using sigmoidal functions with additive input noise to approximate discreteness is also not a new idea. (Frey, 1997) introduced nonlinear Gaussian units which computed their activation by passing Gaussian noise with the mean and variance specified by the input to the unit through a nonlinearity, such as the logistic function. Salakhutdinov & Hinton (2009) binarized real-valued codes of an autoencoder by adding (Gaussian) noise to the logits before passing them through the logistic function. Most recently, to avoid the difficulty associated with likelihood-ratio methods (Kocisk ˇ y et al., 2016) relaxed the discrete sampling ´ operation by sampling a vector of Gaussians instead and passing those through a softmax.
|
| 163 |
+
|
| 164 |
+
There is another family of gradient estimators that have been studied in the context of training neural networks with discrete units. These are usually collected under the umbrella of straightthrough estimators (Bengio et al., 2013; Raiko et al., 2014). The basic idea they use is passing forward discrete values, but taking gradients through the expected value. They have good empirical performance, but have not been shown to be the estimators of any loss function. This is in contrast to gradients from Concrete relaxations, which are biased with respect to the discrete graph, but unbiased with respect to the continuous one.
|
| 165 |
+
|
| 166 |
+
# 5 EXPERIMENTS
|
| 167 |
+
|
| 168 |
+
# 5.1 PROTOCOL
|
| 169 |
+
|
| 170 |
+
The aim of our experiments was to evaluate the effectiveness of the gradients of Concrete relaxations for optimizing SCGs with discrete nodes. We considered the tasks in (Mnih & Rezende, 2016): structured output prediction and density estimation. Both tasks are difficult optimization problems involving fitting probability distributions with hundreds of latent discrete nodes. We compared the performance of Concrete reparameterizations to two state-of-the-art score function estimators: VIMCO (Mnih & Rezende, 2016) for optimizing the multisample variational objective $( m > 1$ ) and NVIL (Mnih & Gregor, 2014) for optimizing the single-sample one $\mathbf { \Phi } _ { m } = 1 \mathbf { \Phi } _ { \mathbf { \Phi } _ { \mathbf { \Lambda } } }$ ). We performed the experiments using the MNIST and Omniglot datasets. These are datasets of $2 8 \times 2 8$ images of handwritten digits (MNIST) or letters (Omniglot). For MNIST we used the fixed binarization of Salakhutdinov & Murray (2008) and the standard $5 0 , 0 0 0 / 1 0 , 0 0 0 / 1 0 , 0 0 0$ split into training/validation/testing sets. For Omniglot we sampled a fixed binarization and used the standard 24,345/8,070 split into training/testing sets. We report the negative log-likelihood (NLL) of the discrete graph on the test data as the performance metric.
|
| 171 |
+
|
| 172 |
+
All of our models were neural networks with layers of $n$ -ary discrete stochastic nodes with values on the corners of the hypercube $\{ - 1 , 1 \} ^ { \log _ { 2 } ( n ) }$ . The distributions were parameterized by $n$ real values $\log \alpha _ { k } \in \mathbb { R }$ , which we took to be the logits of a discrete random variable $D \sim \mathrm { D i s c r e t e } ( \alpha )$ with $n$ states. Model descriptions are of the form “ $( 2 0 0 \mathrm { V } { - } 2 0 0 \mathrm { H } { \sim } 7 8 4 \mathrm { V } ) ^ { \cdot }$ , read from left to right. This describes the order of conditional sampling, again from left to right, with each integer representing the number of stochastic units in a layer. The letters $\mathrm { v }$ and $_ \mathrm { H }$ represent observed and latent
|
| 173 |
+
|
| 174 |
+
MNIST NLL
|
| 175 |
+
Omniglot NLL
|
| 176 |
+
|
| 177 |
+
<table><tr><td rowspan="2">binary model</td><td rowspan="2"></td><td colspan="2">Test</td><td colspan="2">Train</td><td colspan="2">Test</td><td colspan="2">Train</td></tr><tr><td>Concrete</td><td>VIMCO</td><td>Concrete</td><td>VIMCO</td><td>Concrete</td><td>VIMCO</td><td>Concrete</td><td>VIMCO</td></tr><tr><td>(200H</td><td>1</td><td>107.3</td><td>104.4</td><td>107.5</td><td>104.2</td><td>118.7</td><td>115.7</td><td>117.0</td><td>112.2</td></tr><tr><td>- 784V)</td><td>5</td><td>104.9</td><td>101.9</td><td>104.9</td><td>101.5</td><td>118.0</td><td>113.5</td><td>115.8</td><td>110.8</td></tr><tr><td></td><td>50</td><td>104.3</td><td>98.8</td><td>104.2</td><td>98.3</td><td>118.9</td><td>113.0</td><td>115.8</td><td>110.0</td></tr><tr><td>(200H</td><td>1</td><td>102.1</td><td>92.9</td><td>102.3</td><td>91.7</td><td>116.3</td><td>109.2</td><td>114.4</td><td>104.8</td></tr><tr><td>-200H</td><td>5</td><td>99.9</td><td>91.7</td><td>100.0</td><td>90.8</td><td>116.0</td><td>107.5</td><td>113.5</td><td>103.6</td></tr><tr><td>- 784V)</td><td>50</td><td>99.5</td><td>90.7</td><td>99.4</td><td>89.7</td><td>117.0</td><td>108.1</td><td>113.9</td><td>103.6</td></tr><tr><td>(200H</td><td>1</td><td>92.1</td><td>93.8</td><td>91.2</td><td>91.5</td><td>108.4</td><td>116.4</td><td>103.6</td><td>110.3</td></tr><tr><td>~784V)</td><td>5</td><td>89.5</td><td>91.4</td><td>88.1</td><td>88.6</td><td>107.5</td><td>118.2</td><td>101.4</td><td>102.3</td></tr><tr><td></td><td>50</td><td>88.5</td><td>89.3</td><td>86.4</td><td>86.5</td><td>108.1</td><td>116.0</td><td>100.5</td><td>100.8</td></tr><tr><td>(200H</td><td>1</td><td>87.9</td><td>88.4</td><td>86.5</td><td>85.8</td><td>105.9</td><td>111.7</td><td>100.2</td><td>105.7</td></tr><tr><td>~200H</td><td>5</td><td>86.3</td><td>86.4</td><td>84.1</td><td>82.5</td><td>105.8</td><td>108.2</td><td>98.6</td><td>101.1</td></tr><tr><td>~784V) 50</td><td></td><td>85.7</td><td>85.5</td><td>83.1</td><td>81.8</td><td>106.8</td><td>113.2</td><td>97.5</td><td>95.2</td></tr></table>
|
| 178 |
+
|
| 179 |
+
Table 1: Density estimation with binary latent variables. When $m = 1$ , VIMCO stands for NVIL.
|
| 180 |
+
|
| 181 |
+
variables, respectively. If the leftmost layer is H, then it was sampled unconditionally from some parameters. Conditioning functions are described by $\{ - , \sim \}$ , where “–” means a linear function of the previous layer and $^ { \mathfrak { s } } \sim ^ { \mathfrak { s } }$ means a non-linear function. A “layer” of these units is simply the concatenation of some number of independent nodes whose parameters are determined as a function the previous layer. For example a 240 binary layer is a factored distribution over the $\{ - 1 , 1 \} ^ { 2 4 0 }$ hypercube. Whereas a 240 8-ary layer can be seen as a distribution over the same hypercube where each of the 80 triples of units are sampled independently from an 8 way discrete distribution over $\{ - 1 , 1 \} ^ { 3 }$ . All models were initialized with the heuristic of Glorot & Bengio (2010) and optimized using Adam (Kingma & Ba, 2014). All temperatures were fixed throughout training. Appendix D for hyperparameter details.
|
| 182 |
+
|
| 183 |
+
# 5.2 DENSITY ESTIMATION
|
| 184 |
+
|
| 185 |
+
Density estimation, or generative modelling, is the problem of fitting the distribution of data. We took the latent variable approach described in Section 2.4 and trained the models by optimizing the variational objective ${ \mathcal { L } } _ { m } ( \theta , \phi )$ given by Eq. 8 averaged uniformly over minibatches of data points $x$ . Both our generative models $p _ { \theta } ( z , \ x )$ and variational distributions $q _ { \phi } ( z \mid x )$ were parameterized with neural networks as described above. We trained models with ${ \mathcal { L } } _ { m } ( \theta , \phi )$ for $m \in \mathsf { \bar { \{ 1 , 5 , 5 0 \} } }$ and approximated the NLL with $\mathcal { L } _ { 5 0 , 0 0 0 } ( \theta , \phi )$ averaged uniformly over the whole dataset.
|
| 186 |
+
|
| 187 |
+
The results are shown in Table 1. In general, VIMCO outperformed Concrete relaxations for linear models and Concrete relaxations outperformed VIMCO for non-linear models. We also tested the effectiveness of Concrete relaxations on generative models with $n$ -ary layers on the ${ \mathcal { L } } _ { 5 } ( \theta , \phi )$ objective. The best 4-ary model achieved test/train NLL 86.7/83.3, the best 8-ary achieved 87.4/84.6 with Concrete relaxations, more complete results in Appendix E. The relatively poor performance of the 8-ary model may be because moving from 4 to 8 results in a more difficult objective without much added capacity. As a control we trained $n$ -ary models using logistic normals as relaxations of discrete distributions (with retuned temperature hyperparameters). Because the discrete zero temperature limit of logistic Normals is a multinomial probit whose mass function is not known, we evaluated the discrete model by sampling from the discrete distribution parameterized by the logits learned during training. The best 4-ary model achieved test/train NLL of 88.7/85.0, the best 8-ary model achieved 89.1/85.1.
|
| 188 |
+
|
| 189 |
+
# 5.3 STRUCTURED OUTPUT PREDICTION
|
| 190 |
+
|
| 191 |
+
Structured output prediction is concerned with modelling the high-dimensional distribution of the observation given a context and can be seen as conditional density estimation. We considered the task of predicting the bottom half $x _ { 1 }$ of an image of an MNIST digit given its top half $x _ { 2 }$ , as introduced by Raiko et al. (2014). We followed Raiko et al. (2014) in using a model with layers of discrete stochastic units between the context and the observation. Conditioned on the top half $x _ { 2 }$ the network samples from a distribution $p _ { \phi } ( z \mid x _ { 2 } )$ over layers of stochastic units $z$ then predicts $x _ { 1 }$ by sampling from a distribution $p _ { \theta } ( x _ { 1 } \mid z )$ . The training objective for a single pair $( x _ { 1 } , x _ { 2 } )$ is
|
| 192 |
+
|
| 193 |
+
<table><tr><td>binary model</td><td></td><td>Test NLL</td><td></td><td>Train NLL</td></tr><tr><td rowspan="3">(392V-240H -240H-392V)</td><td>m 1</td><td>Concrete</td><td>VIMCO Concrete</td><td>VIMCO 59.3</td></tr><tr><td>5</td><td>58.5 54.3</td><td>61.4 54.5</td><td>54.2 49.2 52.7</td></tr><tr><td>50</td><td>53.4</td><td>51.8</td><td>48.2 49.6</td></tr><tr><td rowspan="2">(392V-240H -240H-240H</td><td>1</td><td>56.3</td><td>59.7</td><td>51.6 58.4</td></tr><tr><td>5</td><td>52.7</td><td>53.5</td><td>46.9 51.6</td></tr><tr><td>-392V)</td><td>50</td><td>52.0</td><td>50.2 45.9</td><td>47.9</td></tr></table>
|
| 194 |
+
|
| 195 |
+

|
| 196 |
+
Figure 4: Results for structured prediction on MNIST comparing Concrete relaxations to VIMCO. When $m = 1$ VIMCO stands for NVIL. The plot on the right shows the objective (lower is better) for the continuous and discrete graph trained at temperatures $\lambda$ . In the shaded region, units prefer to communicate real values in the interior of $( - 1 , 1 )$ and the discretization suffers an integrality gap.
|
| 197 |
+
|
| 198 |
+
$$
|
| 199 |
+
\mathcal { L } _ { m } ^ { S P } ( \theta , \phi ) = \underset { Z _ { i } \sim p _ { \phi } ( z | x _ { 2 } ) } { \mathbb { E } } \left[ \log \left( \frac { 1 } { m } \sum _ { i = 1 } ^ { m } p _ { \theta } ( x _ { 1 } \mid Z _ { i } ) \right) \right] .
|
| 200 |
+
$$
|
| 201 |
+
|
| 202 |
+
This objective is a special case of ${ \mathcal { L } } _ { m } ( \theta , \phi )$ (Eq. 8) where we use the prior $p _ { \phi } ( z | x _ { 2 } )$ as the variational distribution. Thus, the objective is a lower bound on $\log p _ { \theta , \phi } ( x _ { 1 } \mid x _ { 2 } )$ .
|
| 203 |
+
|
| 204 |
+
We trained the models by optimizing $\mathcal { L } _ { m } ^ { S P } ( \theta , \phi )$ for $m \in \{ 1 , 5 , 5 0 \}$ averaged uniformly over minibatches and evaluated them by computing $\mathcal { L } _ { 1 0 0 } ^ { S P } ( \theta , \phi )$ averaged uniformly over the entire dataset. The results are shown in Figure 4. Concrete relaxations more uniformly outperformed VIMCO in this instance. We also trained $n$ -ary (392V–240H–240H–240H–392V) models on the $\mathcal { L } _ { 1 } ^ { S P } ( \theta , \phi )$ objective using the best temperature hyperparameters from density estimation. 4-ary achieved a test/train NLL of $5 5 . 4 / 4 6 . 0$ and 8-ary achieved 54.7/44.8. As opposed to density estimation, increasing arity uniformly improved the models. We also investigated the hypothesis that for higher temperatures Concrete relaxations might prefer the interior of the interval to the boundary points $\{ - 1 , 1 \bar { \} }$ . Figure 4 was generated with binary (392V–240H–240H–240H–392V) model trained on $\mathcal { L } _ { 1 } ^ { S P } ( \theta , \phi )$ .
|
| 205 |
+
|
| 206 |
+
# 6 CONCLUSION
|
| 207 |
+
|
| 208 |
+
We introduced the Concrete distribution, a continuous relaxation of discrete random variables. The Concrete distribution is a new distribution on the simplex with a closed form density parameterized by a vector of positive location parameters and a positive temperature. Crucially, the zero temperature limit of every Concrete distribution corresponds to a discrete distribution, and any discrete distribution can be seen as the discretization of a Concrete one. The application we considered was training stochastic computation graphs with discrete stochastic nodes. The gradients of Concrete relaxations are biased with respect to the original discrete objective, but they are low variance unbiased estimators of a continuous surrogate objective. We showed in a series of experiments that stochastic nodes with Concrete distributions can be used effectively to optimize the parameters of a stochastic computation graph with discrete stochastic nodes. We did not find that annealing or automatically tuning the temperature was important for these experiments, but it remains interesting and possibly valuable future work.
|
| 209 |
+
|
| 210 |
+
# ACKNOWLEDGMENTS
|
| 211 |
+
|
| 212 |
+
We thank Jimmy Ba for the excitement and ideas in the early days, Stefano Favarro for some analysis of the distribution. We also thank Gabriel Barth-Maron and Roger Grosse.
|
| 213 |
+
|
| 214 |
+
# REFERENCES
|
| 215 |
+
|
| 216 |
+
Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian Goodfellow, Andrew
|
| 217 |
+
|
| 218 |
+
Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mane, Rajat Monga, Sherry Moore, Derek Murray, Chris Olah, ´ Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda Viegas, Oriol Vinyals, Pete Warden, Martin Watten- ´ berg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. URL http://tensorflow.org/. Software available from tensorflow.org.
|
| 219 |
+
J Aitchison. A general class of distributions on the simplex. Journal of the Royal Statistical Society. Series B (Methodological), pp. 136–146, 1985.
|
| 220 |
+
J Atchison and Sheng M Shen. Logistic-normal distributions: Some properties and uses. Biometrika, 67(2):261–272, 1980.
|
| 221 |
+
Yoshua Bengio, Nicholas Leonard, and Aaron Courville. Estimating or propagating gradients ´ through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432, 2013.
|
| 222 |
+
David Blei and John Lafferty. Correlated topic models. 2006.
|
| 223 |
+
Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Importance weighted autoencoders. ICLR, 2016.
|
| 224 |
+
Robert J Connor and James E Mosimann. Concepts of independence for proportions with a generalization of the dirichlet distribution. Journal of the American Statistical Association, 64(325): 194–206, 1969.
|
| 225 |
+
Stefano Favaro, Georgia Hadjicharalambous, and Igor Prunster. On a class of distributions on the ¨ simplex. Journal of Statistical Planning and Inference, 141(9):2987 – 3004, 2011.
|
| 226 |
+
Brendan Frey. Continuous sigmoidal belief networks trained using slice sampling. In NIPS, 1997.
|
| 227 |
+
Michael C Fu. Gradient estimation. Handbooks in operations research and management science, 13:575–616, 2006.
|
| 228 |
+
Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Aistats, volume 9, pp. 249–256, 2010.
|
| 229 |
+
Peter W Glynn. Likelihood ratio gradient estimation for stochastic systems. Communications of the ACM, 33(10):75–84, 1990.
|
| 230 |
+
Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka GrabskaBarwinska, Sergio G ´ omez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John Agapiou, ´ et al. Hybrid computing using a neural network with dynamic external memory. Nature, 538 (7626):471–476, 2016.
|
| 231 |
+
Evan Greensmith, Peter L. Bartlett, and Jonathan Baxter. Variance reduction techniques for gradient estimates in reinforcement learning. JMLR, 5, 2004.
|
| 232 |
+
Edward Grefenstette, Karl Moritz Hermann, Mustafa Suleyman, and Phil Blunsom. Learning to transduce with unbounded memory. In Advances in Neural Information Processing Systems, pp. 1828–1836, 2015.
|
| 233 |
+
Karol Gregor, Ivo Danihelka, Andriy Mnih, Charles Blundell, and Daan Wierstra. Deep autoregressive networks. arXiv preprint arXiv:1310.8499, 2013.
|
| 234 |
+
Karol Gregor, Ivo Danihelka, Alex Graves, Danilo Jimenez Rezende, and Daan Wierstra. Draw: A recurrent neural network for image generation. arXiv preprint arXiv:1502.04623, 2015.
|
| 235 |
+
Shixiang Gu, Sergey Levine, Ilya Sutskever, and Andriy Mnih. MuProp: Unbiased backpropagation for stochastic neural networks. ICLR, 2016.
|
| 236 |
+
Emil Julius Gumbel. Statistical theory of extreme values and some practical applications: a series of lectures. Number 33. US Govt. Print. Office, 1954.
|
| 237 |
+
Tamir Hazan and Tommi Jaakkola. On the partition function and random maximum a-posteriori perturbations. In ICML, 2012.
|
| 238 |
+
Tamir Hazan, George Papandreou, and Daniel Tarlow. Perturbation, Optimization, and Statistics. MIT Press, 2016.
|
| 239 |
+
Matthew D Hoffman, David M Blei, Chong Wang, and John William Paisley. Stochastic variational inference. JMLR, 14(1):1303–1347, 2013.
|
| 240 |
+
E. Jang, S. Gu, and B. Poole. Categorical Reparameterization with Gumbel-Softmax. ArXiv e-prints, November 2016.
|
| 241 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 242 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
|
| 243 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. ICLR, 2014.
|
| 244 |
+
Toma´s Ko ˇ cisk ˇ y, G ´ abor Melis, Edward Grefenstette, Chris Dyer, Wang Ling, Phil Blunsom, and ´ Karl Moritz Hermann. Semantic parsing with semi-supervised sequential autoencoders. In EMNLP, 2016.
|
| 245 |
+
R. Duncan Luce. Individual Choice Behavior: A Theoretical Analysis. New York: Wiley, 1959.
|
| 246 |
+
Chris J Maddison. A Poisson process model for Monte Carlo. In Tamir Hazan, George Papandreou, and Daniel Tarlow (eds.), Perturbation, Optimization, and Statistics, chapter 7. MIT Press, 2016.
|
| 247 |
+
Chris J Maddison, Daniel Tarlow, and Tom Minka. $\mathbf { A } ^ { * }$ Sampling. In NIPS, 2014.
|
| 248 |
+
Andriy Mnih and Karol Gregor. Neural variational inference and learning in belief networks. In ICML, 2014.
|
| 249 |
+
Andriy Mnih and Danilo Jimenez Rezende. Variational inference for monte carlo objectives. In ICML, 2016.
|
| 250 |
+
Volodymyr Mnih, Nicolas Heess, Alex Graves, and koray kavukcuoglu. Recurrent Models of Visual Attention. In NIPS, 2014.
|
| 251 |
+
Christian A Naesseth, Francisco JR Ruiz, Scott W Linderman, and David M Blei. Rejection sampling variational inference. arXiv preprint arXiv:1610.05683, 2016.
|
| 252 |
+
John William Paisley, David M. Blei, and Michael I. Jordan. Variational bayesian inference with stochastic search. In ICML, 2012.
|
| 253 |
+
George Papandreou and Alan L Yuille. Perturb-and-map random fields: Using discrete optimization to learn and sample from energy models. In ICCV, 2011.
|
| 254 |
+
Tapani Raiko, Mathias Berglund, Guillaume Alain, and Laurent Dinh. Techniques for learning binary stochastic feedforward neural networks. arXiv preprint arXiv:1406.2989, 2014.
|
| 255 |
+
Rajesh Ranganath, Sean Gerrish, and David M. Blei. Black box variational inference. In AISTATS, 2014.
|
| 256 |
+
William S Rayens and Cidambi Srinivasan. Dependence properties of generalized liouville distributions on the simplex. Journal of the American Statistical Association, 89(428):1465–1470, 1994.
|
| 257 |
+
Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In ICML, 2014.
|
| 258 |
+
Francisco JR Ruiz, Michalis K Titsias, and David M Blei. The generalized reparameterization gradient. arXiv preprint arXiv:1610.02287, 2016.
|
| 259 |
+
Ruslan Salakhutdinov and Geoffrey Hinton. Semantic hashing. International Journal of Approximate Reasoning, 50(7):969–978, 2009.
|
| 260 |
+
Ruslan Salakhutdinov and Iain Murray. On the quantitative analysis of deep belief networks. In ICML, 2008.
|
| 261 |
+
John Schulman, Nicolas Heess, Theophane Weber, and Pieter Abbeel. Gradient estimation using stochastic computation graphs. In NIPS, 2015.
|
| 262 |
+
Theano Development Team. Theano: A Python framework for fast computation of mathematical expressions. arXiv e-prints, abs/1605.02688, May 2016. URL http://arxiv.org/abs/ 1605.02688.
|
| 263 |
+
Michalis Titsias and Miguel Lazaro-Gredilla. Doubly stochastic variational bayes for non-conjugate ´ inference. In Tony Jebara and Eric P. Xing (eds.), ICML, 2014.
|
| 264 |
+
Michalis Titsias and Miguel Lazaro-Gredilla. Local expectation gradients for black box variational ´ inference. In NIPS, 2015.
|
| 265 |
+
Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992.
|
| 266 |
+
Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In ICML, 2015.
|
| 267 |
+
|
| 268 |
+
John I Yellott. The relationship between luce’s choice axiom, thurstone’s theory of comparative judgment, and the double exponential distribution. Journal of Mathematical Psychology, 15(2): 109–144, 1977.
|
| 269 |
+
|
| 270 |
+
# A PROOF OF PROPOSITION 1
|
| 271 |
+
|
| 272 |
+
Let $X \sim \operatorname { C o n c r e t e } ( \alpha , \lambda )$ with location parameters $\alpha \in ( 0 , \infty ) ^ { n }$ and temperature $\lambda \in ( 0 , \infty )$ .
|
| 273 |
+
|
| 274 |
+
1. Let $G _ { k } \sim$ Gumbel i.i.d., consider
|
| 275 |
+
|
| 276 |
+
$$
|
| 277 |
+
Y _ { k } = \frac { \exp ( ( \log { \alpha _ { k } } + G _ { k } ) / \lambda ) } { \sum _ { i = 1 } ^ { n } \exp ( ( \log { \alpha _ { i } } + G _ { i } ) / \lambda ) }
|
| 278 |
+
$$
|
| 279 |
+
|
| 280 |
+
Let $Z _ { k } = \log \alpha _ { k } + G _ { k }$ , which has density
|
| 281 |
+
|
| 282 |
+
$$
|
| 283 |
+
\alpha _ { k } \exp ( - z _ { k } ) \exp ( - \alpha _ { k } \exp ( - z _ { k } ) )
|
| 284 |
+
$$
|
| 285 |
+
|
| 286 |
+
We will consider the invertible transformation
|
| 287 |
+
|
| 288 |
+
$$
|
| 289 |
+
F ( z _ { 1 } , \dots , z _ { n } ) = ( y _ { 1 } , \dots , y _ { n - 1 } , c )
|
| 290 |
+
$$
|
| 291 |
+
|
| 292 |
+
where
|
| 293 |
+
|
| 294 |
+
$$
|
| 295 |
+
\begin{array} { r } { y _ { k } = \exp ( z _ { k } / \lambda ) c ^ { - 1 } } \\ { c = \displaystyle \sum _ { i = 1 } ^ { n } \exp ( z _ { i } / \lambda ) } \end{array}
|
| 296 |
+
$$
|
| 297 |
+
|
| 298 |
+
then
|
| 299 |
+
|
| 300 |
+
$$
|
| 301 |
+
F ^ { - 1 } ( y _ { 1 } , \dots , y _ { n - 1 } , c ) = ( \lambda ( \log y _ { 1 } + \log c ) , \dots , \lambda ( \log y _ { n - 1 } + \log c ) , \lambda ( \log y _ { n } + \log c ) )
|
| 302 |
+
$$
|
| 303 |
+
|
| 304 |
+
where $\begin{array} { r } { y _ { n } = 1 - \sum _ { i = 1 } ^ { n - 1 } y _ { i } } \end{array}$ . This has Jacobian
|
| 305 |
+
|
| 306 |
+
$$
|
| 307 |
+
\left[ \begin{array} { c c c c c c c } { { \lambda y _ { 1 } ^ { - 1 } } } & { { 0 } } & { { 0 } } & { { 0 } } & { { . . . } } & { { 0 } } & { { \lambda c ^ { - 1 } } } \\ { { 0 } } & { { \lambda y _ { 2 } ^ { - 1 } } } & { { 0 } } & { { 0 } } & { { . . . } } & { { 0 } } & { { \lambda c ^ { - 1 } } } \\ { { 0 } } & { { 0 } } & { { \lambda y _ { 3 } ^ { - 1 } } } & { { 0 } } & { { . . . } } & { { 0 } } & { { \lambda c ^ { - 1 } } } \\ & & & { \vdots } & & & \\ { { - \lambda y _ { n } ^ { - 1 } } } & { { - \lambda y _ { n } ^ { - 1 } } } & { { - \lambda y _ { n } ^ { - 1 } } } & { { - \lambda y _ { n } ^ { - 1 } } } & { { . . . } } & { { - \lambda y _ { n } ^ { - 1 } } } & { { \lambda c ^ { - 1 } } } \end{array} \right]
|
| 308 |
+
$$
|
| 309 |
+
|
| 310 |
+
by adding $y _ { i } / y _ { n }$ times each of the top $n { - } 1$ rows to the bottom row we see that this Jacobian has the same determinant as
|
| 311 |
+
|
| 312 |
+
$$
|
| 313 |
+
\left[ \begin{array} { c c c c c c c } { \lambda y _ { 1 } ^ { - 1 } } & { 0 } & { 0 } & { 0 } & { . . . } & { 0 } & { \lambda c ^ { - 1 } } \\ { 0 } & { \lambda y _ { 2 } ^ { - 1 } } & { 0 } & { 0 } & { . . . } & { 0 } & { \lambda c ^ { - 1 } } \\ { 0 } & { 0 } & { \lambda y _ { 3 } ^ { - 1 } } & { 0 } & { . . . } & { 0 } & { \lambda c ^ { - 1 } } \\ & & & { \vdots } \\ { 0 } & { 0 } & { 0 } & { 0 } & { . . . } & { 0 } & { \lambda ( c y _ { n } ) ^ { - 1 } } \end{array} \right]
|
| 314 |
+
$$
|
| 315 |
+
|
| 316 |
+
and thus the determinant is equal to
|
| 317 |
+
|
| 318 |
+
$$
|
| 319 |
+
\frac { \lambda ^ { n } } { c \prod _ { i = 1 } ^ { k } y _ { i } }
|
| 320 |
+
$$
|
| 321 |
+
|
| 322 |
+
all together we have the density
|
| 323 |
+
|
| 324 |
+
$$
|
| 325 |
+
\begin{array} { r } { \frac { \lambda ^ { n } \prod _ { k = 1 } ^ { n } \alpha _ { k } \exp \left( - \lambda \log y _ { k } - \lambda \log c \right) \exp \left( - \alpha _ { k } \exp \left( - \lambda \log y _ { k } - \lambda \log c \right) \right) } { c \prod _ { i = 1 } ^ { n } y _ { i } } } \end{array}
|
| 326 |
+
$$
|
| 327 |
+
|
| 328 |
+
with $r = \log c$ change of variables we have density
|
| 329 |
+
|
| 330 |
+
$$
|
| 331 |
+
\begin{array} { l } { \displaystyle \frac { \lambda ^ { n } \prod _ { k = 1 } ^ { n } \alpha _ { k } \exp ( - \lambda r ) \exp \left( - \alpha _ { k } \exp \left( - \lambda \log y _ { k } - \lambda r \right) \right) } { \prod _ { i = 1 } ^ { n } y _ { i } ^ { \lambda + 1 } } = } \\ { \displaystyle \frac { \lambda ^ { n } \prod _ { k = 1 } ^ { n } \alpha _ { k } } { \prod _ { i = 1 } ^ { n } y _ { i } ^ { \lambda + 1 } } \exp ( - n \lambda r ) \exp ( - \sum _ { i = 1 } ^ { n } \alpha _ { i } \exp ( - \lambda \log y _ { i } - \lambda r ) ) = } \end{array}
|
| 332 |
+
$$
|
| 333 |
+
|
| 334 |
+
letting $\begin{array} { r } { \gamma = \log ( \sum _ { n = 1 } ^ { n } \alpha _ { k } y _ { k } ^ { - \lambda } ) } \end{array}$
|
| 335 |
+
|
| 336 |
+
$$
|
| 337 |
+
{ \frac { \lambda ^ { n } \prod _ { k = 1 } ^ { n } \alpha _ { k } } { \prod _ { i = 1 } ^ { n } y _ { i } ^ { \lambda + 1 } \exp ( \gamma ) } } \exp ( - n \lambda r + \gamma ) \exp ( - \exp ( - \lambda r + \gamma ) ) =
|
| 338 |
+
$$
|
| 339 |
+
|
| 340 |
+
integrating out $r$
|
| 341 |
+
|
| 342 |
+
$$
|
| 343 |
+
\begin{array} { r l } & { \frac { \lambda ^ { n } \prod _ { k = 1 } ^ { n } \alpha _ { k } } { \prod _ { i = 1 } ^ { n } y _ { i } ^ { \lambda + 1 } \exp ( \gamma ) } \left( \frac { \exp ( - \gamma n + \gamma ) \Gamma ( n ) } { \lambda } \right) = } \\ & { \frac { \lambda ^ { n - 1 } \prod _ { k = 1 } ^ { n } \alpha _ { k } } { \prod _ { i = 1 } ^ { n } y _ { i } ^ { \lambda + 1 } } \left( \exp ( - \gamma n ) \Gamma ( n ) \right) = } \\ & { ( n - 1 ) ! \lambda ^ { n - 1 } \frac { \prod _ { k = 1 } ^ { n } \alpha _ { k } y _ { k } ^ { - \lambda - 1 } } { \left( \sum _ { n = 1 } ^ { n } \alpha _ { k } y _ { k } ^ { - \lambda } \right) ^ { n } } } \end{array}
|
| 344 |
+
$$
|
| 345 |
+
|
| 346 |
+
Thus $Y { \overset { d } { = } } X$
|
| 347 |
+
|
| 348 |
+
2. Follows directly from (a) and the Gumbel-Max trick (Maddison, 2016).
|
| 349 |
+
|
| 350 |
+
3. Follows directly from (a) and the Gumbel-Max trick (Maddison, 2016).
|
| 351 |
+
|
| 352 |
+
4. Let $\lambda \le ( n - 1 ) ^ { - 1 }$ . The density of $X$ can be rewritten as
|
| 353 |
+
|
| 354 |
+
$$
|
| 355 |
+
\begin{array} { c } { { p _ { \alpha , \lambda } ( x ) \propto \displaystyle \prod _ { k = 1 } ^ { n } \frac { \alpha _ { k } y ^ { - \lambda - 1 } } { \sum _ { i = 1 } ^ { n } \alpha _ { i } y _ { i } ^ { - \lambda } } } } \\ { { = \displaystyle \prod _ { k = 1 } ^ { n } \frac { \alpha _ { k } y _ { k } ^ { \lambda ( n - 1 ) - 1 } } { \sum _ { i = 1 } ^ { n } \alpha _ { i } \prod _ { j \neq i } y _ { j } ^ { \lambda } } } } \end{array}
|
| 356 |
+
$$
|
| 357 |
+
|
| 358 |
+
Thus, the log density is up to an additive constant $C$
|
| 359 |
+
|
| 360 |
+
$$
|
| 361 |
+
\log p _ { \alpha , \lambda } ( x ) = \sum _ { k = 1 } ^ { n } ( \lambda ( n - 1 ) - 1 ) \log y _ { k } - n \log \left( \sum _ { k = 1 } ^ { n } \alpha _ { k } \prod _ { j \neq k } y _ { j } ^ { \lambda } \right) + C
|
| 362 |
+
$$
|
| 363 |
+
|
| 364 |
+
If $\lambda \le ( n - 1 ) ^ { - 1 }$ , then the first $n$ terms are convex, because $- \log$ is convex. For the last term, $- \log$ is convex and non-increasing and $\textstyle \prod _ { j \neq k } y _ { j } ^ { \lambda }$ is concave for $\lambda \le ( n - 1 ) ^ { - 1 }$ . Thus, their composition is convex. The sum of convex terms is convex, finishing the proof.
|
| 365 |
+
|
| 366 |
+
# B BINARY GUMBEL-MAX TRICK AND BINARY CONCRETE RANDOM VARIABLES
|
| 367 |
+
|
| 368 |
+
Bernoulli random variables are an important special case of discrete distributions taking states in $\{ 0 , 1 \}$ . Here we consider the binary special case of the Gumbel-Max trick from Figure 1a along with the corresponding Concrete relaxation.
|
| 369 |
+
|
| 370 |
+
Let $D \sim \mathrm { D i s c r e t e } ( \alpha )$ for $\alpha \in ( 0 , \infty ) ^ { 2 }$ be a two state discrete random variable on $\{ 0 , 1 \} ^ { 2 }$ such that $D _ { 1 } + D _ { 2 } = 1$ , parameterized as in Figure 1a by $\alpha _ { 1 } , \alpha _ { 2 } > 0$ :
|
| 371 |
+
|
| 372 |
+
$$
|
| 373 |
+
\mathbb { P } ( D _ { 1 } = 1 ) = \frac { \alpha _ { 1 } } { \alpha _ { 1 } + \alpha _ { 2 } }
|
| 374 |
+
$$
|
| 375 |
+
|
| 376 |
+
The distribution is degenerate, because $D _ { 1 } = 1 - D _ { 2 } $ . Therefore we consider just $D _ { 1 }$ . Under the Gumbel-Max reparameterization, the event that $D _ { 1 } ~ = ~ 1$ is the event that $\left\{ G _ { 1 } + \log \alpha _ { 1 } \ > \right.$
|
| 377 |
+
|
| 378 |
+
$G _ { 2 } + \log \alpha _ { 2 } \}$ where $G _ { k } \sim \mathrm { G u m b e l }$ i.i.d. The difference of two Gumbels is a Logistic distribution $G _ { 1 } - G _ { 2 } \sim$ Logistic, which can be sampled in the following way, $G _ { 1 } - G _ { 2 } \stackrel { d } { = } \log U - \log ( 1 - U )$ where $U \sim \mathrm { U n i f o r m } ( 0 , 1 )$ . So, if $\alpha = \alpha _ { 1 } / \alpha _ { 2 }$ , then we have
|
| 379 |
+
|
| 380 |
+
$$
|
| 381 |
+
\begin{array} { r } { { \mathbb P } ( D _ { 1 } = 1 ) = { \mathbb P } ( G _ { 1 } + \log \alpha _ { 1 } > G _ { 2 } + \log \alpha _ { 2 } ) = { \mathbb P } ( \log U - \log ( 1 - U ) + \log \alpha > 0 ) } \end{array}
|
| 382 |
+
$$
|
| 383 |
+
|
| 384 |
+
Thus, $\begin{array} { r } { D _ { 1 } \overset { d } { = } H ( \log \alpha + \log U - \log ( 1 - U ) ) } \end{array}$ , where $H$ is the unit step function.
|
| 385 |
+
|
| 386 |
+
Correspondingly, we can consider the Binary Concrete relaxation that results from this circuit. As in the $n$ -ary case, we consider the sampling routine for a Binary Concrete random variable $X \in ( 0 , 1 )$ first. To sample $X$ , sample $L \sim$ Logistic and set
|
| 387 |
+
|
| 388 |
+
$$
|
| 389 |
+
X = { \frac { 1 } { 1 + \exp ( - ( \log \alpha + L ) / \lambda ) } }
|
| 390 |
+
$$
|
| 391 |
+
|
| 392 |
+
We define the Binary Concrete random variable $X$ by its density on the unit interval.
|
| 393 |
+
|
| 394 |
+
Definition 2 (Binary Concrete Random Variables). Let $\alpha \in ( 0 , \infty )$ and $\lambda \in ( 0 , \infty )$ . $X \in ( 0 , 1 )$ has a Binary Concrete distribution $X \sim \mathrm { B i n C o n c r e t e } ( \alpha , \lambda )$ with location $\alpha$ and temperature $\lambda$ , if its density is:
|
| 395 |
+
|
| 396 |
+
$$
|
| 397 |
+
p _ { \alpha , \lambda } ( x ) = \frac { \lambda \alpha x ^ { - \lambda - 1 } ( 1 - x ) ^ { - \lambda - 1 } } { ( \alpha x ^ { - \lambda } + ( 1 - x ) ^ { - \lambda } ) ^ { 2 } } .
|
| 398 |
+
$$
|
| 399 |
+
|
| 400 |
+
We state without proof the special case of Proposition 1 for Binary Concrete distributions
|
| 401 |
+
|
| 402 |
+
Proposition 2 (Some Properties of Binary Concrete Random Variables). Let $X \sim$ BinConcrete $( \alpha , \lambda )$ with location parameter $\alpha \in ( 0 , \infty )$ and temperature $\lambda \in ( 0 , \infty )$ , then
|
| 403 |
+
|
| 404 |
+
(a) (Reparameterization) If $L \sim$ Logistic, then $\begin{array} { r } { X \stackrel { d } { = } \frac { 1 } { 1 + \exp ( - ( \log \alpha + L ) / \lambda ) } , } \end{array}$
|
| 405 |
+
|
| 406 |
+
(b) (Rounding) $\mathbb { P } \left( X > 0 . 5 \right) = \alpha / ( 1 + \alpha ) ,$ ,
|
| 407 |
+
|
| 408 |
+
(c) (Zero temperature) $\begin{array} { r } { \mathbb { P } ( \operatorname* { l i m } _ { \lambda 0 } X = 1 ) = \alpha / ( 1 + \alpha ) , } \end{array}$
|
| 409 |
+
|
| 410 |
+
(d) (Convex eventually) If $\lambda \leq 1$ , then $p _ { \alpha , \lambda } ( x )$ is log-convex in $x$ .
|
| 411 |
+
|
| 412 |
+
We can generalize the binary circuit beyond logistic random variables. Consider an arbitrary random variable $X$ with infinite support on $\mathbb { R }$ . If $\Phi : \bar { \mathbb { R } } [ 0 , 1 ]$ is the CDF of $X$ , then
|
| 413 |
+
|
| 414 |
+
$$
|
| 415 |
+
\mathbb { P } ( H ( X ) = 1 ) = 1 - \Phi ( 0 )
|
| 416 |
+
$$
|
| 417 |
+
|
| 418 |
+
If we want this to have a Bernoulli distribution with probability $\alpha / ( 1 + \alpha )$ , then we should solve the equation
|
| 419 |
+
|
| 420 |
+
$$
|
| 421 |
+
1 - \Phi ( 0 ) = { \frac { \alpha } { 1 + \alpha } } .
|
| 422 |
+
$$
|
| 423 |
+
|
| 424 |
+
This gives $\Phi ( 0 ) = 1 / ( 1 + \alpha )$ , which can be accomplished by relocating the random variable $Y$ with CDF $\Phi$ to be $X = Y - \Phi ^ { - 1 } ( 1 / ( 1 + \alpha ) )$ .
|
| 425 |
+
|
| 426 |
+
# C TIPS AND DETAILS FOR CONCRETE RELAXATIONS
|
| 427 |
+
|
| 428 |
+
In this section we include some tips for implementing and using the Concrete distribution. We use the following notation
|
| 429 |
+
|
| 430 |
+
$$
|
| 431 |
+
\sigma ( x ) = { \frac { 1 } { 1 + \exp ( - x ) } } \qquad { \underset { k = 1 } { \overset { n } { \operatorname { L S E } } } } \{ x _ { k } \} = \log \left( \sum _ { k = 1 } ^ { n } \exp ( x _ { k } ) \right)
|
| 432 |
+
$$
|
| 433 |
+
|
| 434 |
+
Both sigmoid and log-sum-exp are common operations in libraries like TensorFlow or theano.
|
| 435 |
+
|
| 436 |
+
# C.1 THE BASIC PROBLEM
|
| 437 |
+
|
| 438 |
+
For the sake of exposition, we consider a simple variational autoencoder with a single discrete random variable and objective ${ \mathcal { L } } _ { 1 } ( \theta , \phi )$ given by Eq. 8 for a single data point $x$ . This scenario will allow us to discuss all of the decisions one might make when using Concrete relaxations.
|
| 439 |
+
|
| 440 |
+
In particular, let $p _ { \theta } ( d )$ be the mass function of some one-hot discrete variable $d \in ( 0 , 1 ) ^ { n }$ whose probabilities depend in some continuous way on parameters $\theta$ , let $p _ { \theta } ( x | d )$ be some continuous likelihood (possibly computed by a neural network) function of $d$ also depending on parameters $\theta$ , let $D \sim \mathrm { D i s c r e t e } ( \alpha ( \phi , x ) )$ be a one-hot discrete random variable in $( 0 , 1 ) ^ { n }$ whose unnormalized probabilities $\alpha ( \phi , x )$ are some function (possible a neural net) of $x$ with parameters $\phi$ . Let $Q _ { \phi } ( d | x )$ be the mass function of $D$ . Then, we care about optimizing
|
| 441 |
+
|
| 442 |
+
$$
|
| 443 |
+
\mathcal { L } _ { 1 } ( \theta , \phi ) = \underset { D \sim q _ { \phi } ( d | x ) } { \mathbb { E } } \left[ \log \frac { p _ { \theta } ( x | D ) p _ { \theta } ( D ) } { q _ { \phi } ( D | x ) } \right]
|
| 444 |
+
$$
|
| 445 |
+
|
| 446 |
+
with respect to both $\theta$ and $\phi$ from samples of the SCG required to simulate an estimator of ${ \mathcal { L } } _ { 1 } ( \theta , \phi )$ .
|
| 447 |
+
|
| 448 |
+
# C.2 WHAT YOU MIGHT RELAX AND WHY
|
| 449 |
+
|
| 450 |
+
The first consideration when relaxing an estimator of Eq. 16 is how to relax the stochastic computation. The only sampling required to simulate ${ \mathcal { L } } _ { 1 } ( \theta , \phi )$ is $D \sim \mathrm { D i s c r e t e } ( \alpha ( \phi , x ) )$ . The corresponding Concrete relaxation is to sample $Z \sim { \mathrm { C o n c r e t e } } ( \alpha ( \phi , x ) , \lambda _ { 1 } )$ with temperature $\lambda _ { 1 }$ and location parameters are the the unnormalized probabilities $\alpha ( \phi , x )$ of $D$ . Let density $\tilde { q } _ { \phi , \lambda _ { 1 } } ( z | x )$ be the density of $Z$ . We get a relaxed objective of the form:
|
| 451 |
+
|
| 452 |
+
$$
|
| 453 |
+
\underline { { \mathbb { E } } } _ { \sim q _ { \phi } ( d | x ) } [ \cdot ] \ \ \underline { { \mathbb { E } } } _ { Z \sim \tilde { q } _ { \phi , \lambda _ { 1 } } ( z | x ) } [ \cdot ]
|
| 454 |
+
$$
|
| 455 |
+
|
| 456 |
+
This choice allows us to take derivatives through the stochastic computaitons of the graph, and we can interpet $\tilde { q } _ { \phi , \lambda _ { 1 } } ( z | x )$ as the Concrete relaxation of the variational posterior $q _ { \phi } ( d | x )$ .
|
| 457 |
+
|
| 458 |
+
The second consideration is which objective to put in place of $[ \cdot ]$ in Eq. 17. We will consider the ideal scenario irrespective of numerical issues. In Subsection C.3 we address those numerical issues. The central question is how to treat the expectation of the ratio $p _ { \theta } ( D ) / q _ { \phi } ( D | x )$ (which is the KL component of the loss) when $Z$ replaces $D$ . There are at least three options for how to modify the objective. They are, (18) replace the discrete mass with Concrete densities, (19) relax the computation of the discrete log mass, (20) replace it with the analytic discrete KL.
|
| 459 |
+
|
| 460 |
+
$$
|
| 461 |
+
\begin{array} { l } { { \displaystyle { \cal Z } \sim \tilde { q } _ { \phi , \lambda _ { 1 } } ( z | x ) \left[ \log p _ { \theta } ( x | Z ) + \log \frac { \tilde { p } _ { \theta , \lambda _ { 2 } } ( Z ) } { \tilde { q } _ { \phi , \lambda _ { 1 } } ( Z | x ) } \right] } } \\ { { \displaystyle { \cal Z } \sim \tilde { q } _ { \phi , \lambda _ { 1 } } ( z | x ) \left[ \log p _ { \theta } ( x | Z ) + \sum _ { i = 1 } ^ { n } Z _ { i } \log \frac { p _ { \theta } ( d ^ { ( i ) } ) } { q _ { \phi } ( d ^ { ( i ) } ) } \right] } } \\ { { \displaystyle { \cal Z } \sim \tilde { q } _ { \phi , \lambda _ { 1 } } ( z | x ) \left[ \log p _ { \theta } ( x | Z ) \right] + \sum _ { i } q _ { \phi } ( d ^ { ( i ) } ) \log \frac { p _ { \theta } ( d ^ { ( i ) } ) } { q _ { \phi } ( d ^ { ( i ) } ) } } } \end{array}
|
| 462 |
+
$$
|
| 463 |
+
|
| 464 |
+
where $\boldsymbol { d } ^ { ( i ) }$ is a one-hot binary vector with $d _ { i } ^ { ( i ) } = 1$ and $\tilde { p } _ { \boldsymbol { \theta } , \lambda _ { 2 } } ( z )$ is the density of some Concrete random variable with temperature $\lambda _ { 2 }$ whose location parameters depend on $\theta$ in the same way as the logits of $p _ { \theta } ( d )$ . Although (20) or (19) is tempting, we emphasize that these are NOT necessarily lower bounds on $\log p ( x )$ in the relaxed model. (18) is the only objective guaranteed to be a lower bound:
|
| 465 |
+
|
| 466 |
+
$$
|
| 467 |
+
\underset { Z \sim \tilde { q } _ { \phi , \lambda _ { 1 } } ( z | x ) } { \mathbb { E } } \left[ \log p _ { \theta } ( x | Z ) + \log \frac { \tilde { p } _ { \theta , \lambda _ { 2 } } ( Z ) } { \tilde { q } _ { \phi , \lambda _ { 1 } } ( Z | x ) } \right] \leq \log \int p _ { \theta } ( x | z ) \tilde { p } _ { \theta , \lambda _ { 2 } } ( z ) d x
|
| 468 |
+
$$
|
| 469 |
+
|
| 470 |
+
For this reason we consider objectives of the form (18). Choosing (20) or (19) is possible, but the value of these objectives is not interpretable and one should early stop otherwise it will overfit to the spurious “KL” component of the loss. We now consider practical issues with (18) and how to address them. All together we can interpret $\tilde { p } _ { \boldsymbol { \theta } , \lambda _ { 2 } } ( z )$ as the Concrete relaxation of the prior in the variational autoencoder.
|
| 471 |
+
|
| 472 |
+
# C.3 WHICH RANDOM VARIABLE TO TREAT AS THE STOCHASTIC NODE
|
| 473 |
+
|
| 474 |
+
When implementing a SCG like the variational autoencoder example, we need to compute logprobabilities of Concrete random variables. This computation can suffer from underflow, so where possible it’s better to take a different node on the relaxed graph as the stochastic node on which loglikelihood terms are computed. For example, it’s tempting in the case of Concrete random variables to treat the Gumbels as the stochastic node on which the log-likelihood terms are evaluated and the softmax as downstream computation. This will be a looser bound in the context of variational inference than the corresponding bound when treating the Concrete relaxed states as the node.
|
| 475 |
+
|
| 476 |
+
The solution we found to work well was to work with Concrete random variables in log-space. Consider the following vector in $\mathbb { R } ^ { n }$ for location parameters $\alpha \in ( 0 , \infty ) ^ { n }$ and $\lambda \in \mathsf { \Gamma } ( 0 , \infty )$ and $G _ { k } \sim$ Gumbel,
|
| 477 |
+
|
| 478 |
+
$$
|
| 479 |
+
Y _ { k } = { \frac { \log \alpha _ { k } + G _ { k } } { \lambda } } - \operatorname { L } _ { i = 1 } ^ { n } \left\{ { \frac { \log \alpha _ { i } + G _ { i } } { \lambda } } \right\}
|
| 480 |
+
$$
|
| 481 |
+
|
| 482 |
+
$Y ~ \in ~ \mathbb { R } ^ { n }$ has the property that $\begin{array} { l l l } { \exp ( Y ) } & { \sim } & { \mathrm { C o n c r e t e } ( \alpha , \lambda ) } \end{array}$ , therefore we call $Y$ an $\mathrm { E x p C o n c r e t e } ( \alpha , \lambda )$ . The advantage of this reparameterization is that the KL terms of a variational loss are invariant under invertible transformation. exp is invertible, so the KL between two ExpConcrete random variables is the same as the KL between two Concrete random variables. The log-density $\log \kappa _ { \alpha , \lambda } ( y )$ of an ExpConcrete $( \alpha , \lambda )$ is also simple to compute:
|
| 483 |
+
|
| 484 |
+
$$
|
| 485 |
+
\log \kappa _ { \alpha , \lambda } ( y ) = \log ( ( n - 1 ) ! ) + ( n - 1 ) \log \lambda + \left( \sum _ { k = 1 } ^ { n } \log \alpha _ { k } - \lambda y _ { k } \right) - n \operatorname { L i p } _ { k = 1 } ^ { n } \left\{ \log \alpha _ { k } - \lambda y _ { k } \right\}
|
| 486 |
+
$$
|
| 487 |
+
|
| 488 |
+
for $y \in \mathbb { R } ^ { n }$ such that $\mathrm { L } \Sigma \mathrm { E } _ { k = 1 } ^ { n } \{ y _ { k } \} = 0$ . Note that the sample space of the ExpConcrete distribution is still interpretable in the zero temperature limit. In the limit of $\lambda 0$ ExpConcrete random variables become discrete random variables over the one-hot vectors of $d \in { \mathsf { \{ - \infty } } , 0 \} ^ { n }$ where $\mathrm { L } \Sigma \mathrm { E } _ { k = 1 } ^ { n } \{ d _ { k } \} = 0$ . $\exp ( Y )$ in this case results in the one-hot vectors in $\{ 0 , 1 \} ^ { n }$ .
|
| 489 |
+
|
| 490 |
+
Returning to our initial task of relaxing ${ \mathcal { L } } _ { 1 } ( \theta , \phi )$ , let $Y \sim \mathrm { E x p C o n c r e t e } ( \alpha ( \phi , x ) , \lambda _ { 1 } )$ with density $\kappa _ { \phi , \lambda _ { 1 } } ( y | x )$ be the ExpConcrete latent variable corresponding to the Concrete relaxation $\tilde { q } _ { \phi , \lambda _ { 1 } } ( z | x )$ of the variational posterior $q _ { \phi } ( d | x )$ . Let $\rho _ { \theta , \lambda _ { 1 } } ( y )$ be the density of an ExpConcrete random variable corresponding to the Concrete relaxation $\tilde { p } _ { \boldsymbol { \theta } , \lambda _ { 2 } } ( \boldsymbol { y } )$ of $p _ { \theta } ( d )$ . All together we can see that
|
| 491 |
+
|
| 492 |
+
$$
|
| 493 |
+
\underset { \substack { \tau \sim \tilde { q } _ { \phi , \lambda _ { 1 } } ( z | x ) } } { \mathbb { E } } \left[ \log p \theta ( x | Z ) + \log \frac { \tilde { p } \theta _ { \delta , \lambda _ { 2 } } ( Z ) } { \tilde { q } _ { \phi , \lambda _ { 1 } } ( Z | x ) } \right] = \underset { \substack { Y \sim \kappa _ { \phi , \lambda _ { 1 } } ( z | x ) } } { \mathbb { E } } \left[ \log p \theta ( x | \exp ( Y ) ) + \log \frac { \rho \theta _ { \delta , \lambda _ { 2 } } ( Y ) } { \kappa _ { \phi , \lambda _ { 1 } } ( Y | x ) } \right]
|
| 494 |
+
$$
|
| 495 |
+
|
| 496 |
+
Therefore, we used ExpConcrete random variables as the stochastic nodes and treated exp as a downstream computation.
|
| 497 |
+
|
| 498 |
+
In the binary case, the logistic function is invertible, so it makes most sense to treat the logit plus noise as the stochastic node. In particular, the binary random node was sample from:
|
| 499 |
+
|
| 500 |
+
$$
|
| 501 |
+
Y = { \frac { \log \alpha + \log U - \log ( 1 - U ) } { \lambda } }
|
| 502 |
+
$$
|
| 503 |
+
|
| 504 |
+
where $U \sim \mathrm { U n i f o r m } ( 0 , 1 )$ and always followed by $\sigma$ as downstream computation. $\log U - \log ( 1 -$ $U$ ) is a logistic random variable, details in the cheat sheet, and so the log-density $\log \kappa _ { \alpha , \lambda } ( y )$ of this node (before applying $\sigma$ ) is
|
| 505 |
+
|
| 506 |
+
$$
|
| 507 |
+
\log \kappa _ { \alpha , \lambda } ( y ) = \log \lambda - \lambda y + \log \alpha - 2 \log ( 1 + \exp ( - \lambda y + \log \alpha ) )
|
| 508 |
+
$$
|
| 509 |
+
|
| 510 |
+
This section had a dense array of densities, so we summarize the relevant ones, along with how to sample from them, in Appendix F.
|
| 511 |
+
|
| 512 |
+
# C.4 CHOOSING THE TEMPERATURE
|
| 513 |
+
|
| 514 |
+
The success of Concrete relaxations will depend heavily on the choice of temperature during training. It is important that the relaxed nodes are not able to represent a precise real valued mode in the interior of the simplex as in Figure 2d. For example, choosing additive Gaussian noise $\epsilon \sim \mathrm { N o r m a l } ( 0 , 1 )$ with the logistic function $\sigma ( x )$ to get relaxed Bernoullis of the form $\sigma ( \epsilon + \mu )$ will result in a large mode in the centre of the interval. This is because the tails of the Gaussian distribution drop off much faster than the rate at which $\sigma$ squashes. Even including a temperature parameter does not completely solve this problem; the density of $\sigma ( ( \epsilon + \mu ) / \lambda )$ at any temperature still goes to 0 as its approaches the boundaries 0 and 1 of the unit interval. Therefore (d) of Proposition 1 is a conservative guideline for generic $n$ -ary Concrete relaxations; at temperatures lower than $( n - 1 ) ^ { - 1 }$ we are guaranteed not to have any modes in the interior for any $\bar { \alpha } \in ( 0 , \infty ) ^ { n }$ . In the case of the Binary Concrete distribution, the tails of the logistic additive noise are balanced with the logistic squashing function and for temperatures $\lambda \leq 1$ the density of the Binary Concrete distribution is log-convex for all parameters $\alpha$ , see Figure 3b. Still, practice will often disagree with theory here. The peakiness of the Concrete distribution increases with $n$ , so much higher temperatures are tolerated (usually necessary).
|
| 515 |
+
|
| 516 |
+
For $n = 1$ temperatures $\lambda \le ( n - 1 ) ^ { - 1 }$ is a good guideline. For $n > 1$ taking $\lambda \le ( n - 1 ) ^ { - 1 }$ is not necessarily a good guideline, although it will depend on $n$ and the specific application. As $n \infty$ the Concrete distribution becomes peakier, because the random normalizing constant $\begin{array} { r } { \sum _ { k = 1 } ^ { n } \exp ( ( \log \alpha _ { k } + G _ { k } ) / \lambda ) } \end{array}$ grows. This means that practically speaking the optimization can tolerate much higher temperatures than $( n - 1 ) ^ { - 1 }$ . We found in the cases $n = 4$ that $\lambda = 1$ was the best temperature and in $n = 8$ , $\lambda = 2 / 3$ was the best. Yet $\lambda = 2 / 3$ was the best single performing temperature across the $n \in \{ 2 , 4 , 8 \}$ cases that we considered. We recommend starting in that ball-park and exploring for any specific application.
|
| 517 |
+
|
| 518 |
+
When the loss depends on a KL divergence between two Concrete nodes, it’s possible to give the nodes distinct temperatures. We found this to improve results quite dramatically. In the context of our original problem and it’s relaxation:
|
| 519 |
+
|
| 520 |
+
$$
|
| 521 |
+
\mathcal { L } _ { 1 } ( \theta , \phi ) \stackrel { \mathrm { r e l a x } } { \sim } \underset { Y \sim \kappa _ { \phi , \lambda _ { 1 } } ( z | x ) } { \mathbb { E } } \left[ \log p _ { \theta } ( x | \exp ( Y ) ) + \log \frac { \rho _ { \theta , \lambda _ { 2 } } ( Y ) } { \kappa _ { \phi , \lambda _ { 1 } } ( Y | x ) } \right]
|
| 522 |
+
$$
|
| 523 |
+
|
| 524 |
+
The two temperatures to tune would be $\lambda _ { 1 }$ for the posterior temperature and $\lambda _ { 2 }$ for the prior temperature.
|
| 525 |
+
|
| 526 |
+
# D EXPERIMENTAL DETAILS
|
| 527 |
+
|
| 528 |
+
D.1 — VS ∼
|
| 529 |
+
|
| 530 |
+
The conditioning functions we used were either linear or non-linear. Non-linear consisted of two tanh layers of the same size as the preceding stochastic layer in the computation graph.
|
| 531 |
+
|
| 532 |
+
# D.2 $n$ -ARY LAYERS
|
| 533 |
+
|
| 534 |
+
All our models are neural networks with layers of $n$ -ary discrete stochastic nodes with $\log _ { 2 } ( n )$ - dimensional states on the corners of the hypercube $\{ - 1 , 1 \} ^ { \log _ { 2 } ( n ) }$ . For a generic $n$ -ary node sampling proceeds as follows. Sample a $n$ -ary discrete random variable $D \sim \mathrm { D i s c r e t e } ( \alpha )$ for $\alpha \in ( 0 , \infty ) ^ { n }$ . If $C$ is the $\log _ { 2 } ( n ) \times n$ matrix, which lists the corners of the hypercube $\{ - 1 , 1 \} ^ { \log _ { 2 } ( n ) }$ as columns, then we took $Y = C D$ as downstream computation on $D$ . The corresponding Concrete relaxation is to take $X \sim \mathrm { C o n c r e t e } ( \alpha , \lambda )$ for some fixed temperature $\lambda \in \mathsf { \Gamma } ( 0 , \infty )$ and set $\tilde { Y } = C X$ . For the binary case, this amounts to simply sampling $U \sim \mathrm { U n i f o r m } ( 0 , 1 )$ and taking $Y = 2 H ( \log U - \log ( 1 - U ) + \log \alpha ) - 1$ . The corresponding Binary Concrete relaxation is $\tilde { Y } = 2 \sigma ( ( \log U - \log ( 1 - U ) + \log \alpha ) / \lambda ) - 1$ .
|
| 535 |
+
|
| 536 |
+
# D.3 BIAS INITIALIZATION
|
| 537 |
+
|
| 538 |
+
All biases were initialized to 0 with the exception of the biases in the prior decoder distribution over the 784 or 392 observed units. These were initialized to the logit of the base rate averaged over the respective dataset (MNIST or Omniglot).
|
| 539 |
+
|
| 540 |
+
# D.4 CENTERING
|
| 541 |
+
|
| 542 |
+
We also found it beneficial to center the layers of the inference network during training. The activity in $( - 1 , 1 ) ^ { d }$ of each stochastic layer was centered during training by maintaining a exponentially decaying average with rate 0.9 over minibatches. This running average was subtracted from the activity of the layer before it was updated. Gradients did not flow throw this computation, so it simply amounted to a dynamic offset. The averages were not updated during the evaluation.
|
| 543 |
+
|
| 544 |
+
# D.5 HYPERPARAMETER SELECTION
|
| 545 |
+
|
| 546 |
+
All models were initialized with the heuristic of Glorot & Bengio (2010) and optimized using Adam (Kingma & Ba, 2014) with parameters $\beta _ { 1 } = 0 . 9 , \beta _ { 2 } = 0 . 9 9 9$ for $1 0 ^ { 7 }$ steps on minibatches of size 64. Hyperparameters were selected on the MNIST dataset by grid search taking the values that performed best on the validation set. Learning rates were chosen from $\{ 1 0 ^ { - 4 } , 3 \cdot \overline { { 1 } } 0 ^ { - 4 } , 1 0 ^ { - 3 } \}$ and weight decay from $\{ 0 , 1 0 ^ { - 2 } , 1 0 ^ { - 1 } , 1 \}$ . Two sets of hyperparameters were selected, one for linear models and one for non-linear models. The linear models’ hyperparameters were selected with the $2 0 0 \mathrm { H } { - } 2 0 0 \mathrm { H } { - } 7 8 4 \mathrm { V }$ density model on the ${ \mathcal { L } } _ { 5 } ( \theta , \phi )$ objective. The non-linear models’ hyperparameters were selected with the $2 0 0 \mathrm { H } { \sim } 2 0 0 \mathrm { H } { \sim } 7 8 4 \mathrm { V }$ density model on the $\mathcal { L } _ { 5 } ( \theta , \phi )$ objective. For density estimation, the Concrete relaxation hyperparameters were (weight decay $= 0$ , learning rate $= 3 \cdot \mathrm { i } 0 ^ { - 4 }$ ) for linear and (weight decay $= 0$ , learning rate $= 1 0 ^ { - 4 }$ ) for non-linear. For structured prediction Concrete relaxations used (weight decay $= \bar { 1 } 0 ^ { - 3 }$ , learning rate $= 3 \cdot 1 0 ^ { - 4 }$ ).
|
| 547 |
+
|
| 548 |
+
In addition to tuning learning rate and weight decay, we tuned temperatures for the Concrete relaxations on the density estimation task. We found it valuable to have different values for the prior and posterior distributions. In particular, for binary we found that (prior $\lambda = 1 / 2$ , posterior $\lambda = 2 / 3 ,$ ) was best, for 4-ary we found (prior $\lambda = 2 / 3$ , posterior $\lambda = 1$ ) was best, and (prior $\lambda = 2 / 5$ , posterior $\lambda = 2 / 3$ ) for 8-ary. No temperature annealing was used. For structured prediction we used just the corresponding posterior $\lambda$ .
|
| 549 |
+
|
| 550 |
+
We performed early stopping when training with the score function estimators (VIMCO/NVIL) as they were much more prone to overfitting.
|
| 551 |
+
|
| 552 |
+
# E EXTRA RESULTS
|
| 553 |
+
|
| 554 |
+
Table 2: Density estimation using Concrete relaxations with distinct arity of layers.
|
| 555 |
+
|
| 556 |
+
<table><tr><td rowspan="2"></td><td rowspan="2"></td><td colspan="2">MNIST NLL</td><td colspan="2">Omniglot NLL</td></tr><tr><td>Test</td><td>Train</td><td>Test</td><td>Train</td></tr><tr><td>binary</td><td>1</td><td>91.9</td><td>90.7</td><td>108.0</td><td>102.2</td></tr><tr><td>(240H</td><td>5</td><td>89.0</td><td>87.1</td><td>107.7</td><td>100.0</td></tr><tr><td>~784V)</td><td>50</td><td>88.4</td><td>85.7</td><td>109.0</td><td>99.1</td></tr><tr><td>4-ary</td><td>1</td><td>91.4</td><td>89.7</td><td>110.7</td><td>1002.7</td></tr><tr><td>(240H</td><td>5</td><td>89.4</td><td>87.0</td><td>110.5</td><td>100.2</td></tr><tr><td>~784V)</td><td>50</td><td>89.7</td><td>86.5</td><td>113.0</td><td>100.0</td></tr><tr><td>8-ary</td><td>1</td><td>92.5</td><td>89.9</td><td>119.61</td><td>105.3</td></tr><tr><td>(240H</td><td>5</td><td>90.5</td><td>87.0</td><td>120.7</td><td>102.7</td></tr><tr><td>~784V)</td><td>50</td><td>90.5</td><td>86.7</td><td>121.7</td><td>101.0</td></tr><tr><td>binary</td><td>1</td><td>87.9</td><td>86.0</td><td>106.6</td><td>99.0</td></tr><tr><td>(240H~240H</td><td>5</td><td>86.6</td><td>83.7</td><td>106.9</td><td>97.1</td></tr><tr><td>~784V)</td><td>50</td><td>86.0</td><td>82.7</td><td>108.7</td><td>95.9</td></tr><tr><td>4-ary</td><td>1</td><td>87.4</td><td>85.0</td><td>106.6</td><td>97.8</td></tr><tr><td>(240H~240H</td><td>5</td><td>86.7</td><td>83.3</td><td>108.3</td><td>97.3</td></tr><tr><td>~784V)</td><td>50</td><td>86.7</td><td>83.0</td><td>109.4</td><td>96.8</td></tr><tr><td>8-ary</td><td>1</td><td>88.2</td><td>85.9</td><td>111.3</td><td>102.5</td></tr><tr><td>(240H~240H</td><td>5</td><td>87.4</td><td>84.6</td><td>110.5</td><td>100.5</td></tr><tr><td>~784V)</td><td>50</td><td>87.2</td><td>84.0</td><td>111.1</td><td>99.5</td></tr></table>
|
| 557 |
+
|
| 558 |
+
# F CHEAT SHEET
|
| 559 |
+
|
| 560 |
+
$$
|
| 561 |
+
\begin{array} { c l l } { \displaystyle \sigma ( \boldsymbol { x } ) = \frac { 1 } { 1 + \exp ( - x ) } \qquad } & { \displaystyle \mathrm { L E E } ^ { n } \{ x _ { k } \} = \log \left( \sum _ { k = 1 } ^ { n } \exp ( x _ { k } ) \right) } \\ { \log \Delta ^ { n - 1 } = \left\{ x \in \mathbb { R } ^ { n } \mid x _ { k } \in ( - \infty , 0 ) , \underset { k = 1 } { \overset { n } { \mathrm { L E E } } } \{ x _ { k } \} = 0 \right\} } \end{array}
|
| 562 |
+
$$
|
| 563 |
+
|
| 564 |
+
Distribution and Domains Reparameterization/How To Sample Mass/Density
|
| 565 |
+
Table 3: Cheat sheet for the random variables we use in this work. Note that some of these are atypical parameterizations, particularly the Bernoulli and logistic random variables. The table only assumes that you can sample uniform random numbers $U \stackrel { \textstyle \circ } { \sim } \mathrm { U n i f o r m } ( 0 , 1 )$ . From there on it may define random variables and reuse them later on. For example, $L \sim$ Logistic is defined in the second row, and after that point $L$ represents a Logistic random variable that can be replaced by $\log U - \log ( 1 - U )$ . Whenever random variables are indexed, e.g. $G _ { k }$ , they represent separate independent calls to a random number generator.
|
| 566 |
+
|
| 567 |
+
<table><tr><td>G~ Gumbel G∈R</td><td>G -log(-log(U))</td><td>exp(-g-exp(-g))</td></tr><tr><td>L ~Logistic L∈R</td><td>L = log(U)-log(1-U)</td><td>exp(-l) (1 + exp(-)2</td></tr><tr><td>X ~ Logistic(μ,λ) μ∈R 入∈(0,00)</td><td>xL+μ 入</td><td>Xexp(-λx+ μ) (1+exp(-λx+μ))²</td></tr><tr><td>X ~ Bernoulli(α) X∈{0,1} α∈ (0,∞0)</td><td>x 1 if L+logα≥0 10 otherwise</td><td>α ifx=1 1+α</td></tr><tr><td>X ~ BinConcrete(α,入) X ∈ (0,1) α∈(0,∞0) 入∈(0,00)</td><td>X =σ(L + logα)/λ)</td><td>λax-λ-1(1-x)-λ-1 (ax->+(1-x)-1)2</td></tr><tr><td>X ~ Discrete(α) X ∈{0,1}n Ω=1 Xk =1 a∈ (0,∞0)n</td><td>if log αk +Gk > logαi +Gi for i≠k Xk 1 10 otherwise</td><td>Qk ifxk=1 In ∑i=1 ai</td></tr><tr><td>X ~ Concrete(α, λ) X∈△n-1 α ∈ (0,∞0)n 入∈(0,00)</td><td>exp(log ak + Gk)/λ) x ∑i=1 exp((log ak + Gi)/)) n</td><td>(n - 1)! n akxk -入-1 1-(n-1) ∑i=1aixi n 入 k=1</td></tr><tr><td>X ~ ExpConcrete(α,λ) X∈log△n-1 α ∈ (0,∞)𝑛 入∈(0,00)</td><td>{ log ai + Gi} Xk logak+Gk n LE 入 i=1 入</td><td>(n-1)! n ak exp(-入xk) 1 1-(n-1) ∑i=1 ai exp(-Xxi) n k=1</td></tr></table>
|
parse/train/S1jE5L5gl/S1jE5L5gl_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/S1jE5L5gl/S1jE5L5gl_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/S1jE5L5gl/S1jE5L5gl_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/SQxuiYf2TT/SQxuiYf2TT.md
ADDED
|
@@ -0,0 +1,296 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# History Aware Multimodal Transformer for Vision-and-Language Navigation
|
| 2 |
+
|
| 3 |
+
Shizhe Chen, Pierre-Louis Guhur, Cordelia Schmid, Ivan Laptev
|
| 4 |
+
|
| 5 |
+
Inria, École normale supérieure, CNRS, PSL Research University {shizhe.chen, pierre-louis.guhur, cordelia.schmid, ivan.laptev}@inria.fr
|
| 6 |
+
|
| 7 |
+
https://cshizhe.github.io/projects/vln_hamt.html
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
Vision-and-language navigation (VLN) aims to build autonomous visual agents that follow instructions and navigate in real scenes. To remember previously visited locations and actions taken, most approaches to VLN implement memory using recurrent states. Instead, we introduce a History Aware Multimodal Transformer (HAMT) to incorporate a long-horizon history into multimodal decision making. HAMT efficiently encodes all the past panoramic observations via a hierarchical vision transformer (ViT), which first encodes individual images with ViT, then models spatial relation between images in a panoramic observation and finally takes into account temporal relation between panoramas in the history. It, then, jointly combines text, history and current observation to predict the next action. We first train HAMT end-to-end using several proxy tasks including single step action prediction and spatial relation prediction, and then use reinforcement learning to further improve the navigation policy. HAMT achieves new state of the art on a broad range of VLN tasks, including VLN with fine-grained instructions (R2R, RxR), high-level instructions (R2R-Last, REVERIE), dialogs (CVDN) as well as long-horizon VLN (R4R, R2R-Back). We demonstrate HAMT to be particularly effective for navigation tasks with longer trajectories.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
Vision-and-language navigation (VLN) has recently received growing attention [1, 2, 3, 4, 5]. VLN requires an agent to understand natural language instructions, perceive the visual world, and perform navigation actions to arrive at a target location. A number of datasets have been proposed to support various VLN tasks such as indoor and outdoor navigation with fine-grained instructions [2, 6, 7], language-driven remote object finding [8] and navigation in dialogs [9].
|
| 16 |
+
|
| 17 |
+
VLN agents are faced with several challenges. First, as opposed to static vision-text grounding [10], the agent continuously receives new visual observations and should align them with instructions. Most of existing works adopt recurrent neural networks (RNNs) [6, 11, 12, 13, 14, 15, 16] to encode historical observations and actions within a fixed-size state vector to predict the next action. Such condensed states might be sub-optimal for capturing essential information in extended trajectories [17]. For instance, “bring the spoon to me” requires the agent to remember its start location after navigating to the “spoon”, while early memories are prone to fade in the recurrent state. Few endeavors [18, 19] construct external map-like memories for received observations. Nevertheless, these approaches still rely on RNNs to track the navigation state. As the history plays an important role in environment understanding and instruction grounding, we propose to explicitly encode the history as a sequence of previous actions and observations instead of using recurrent states.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: The architecture of History Aware Multimodal Tranformer (HAMT). HAMT jointly encodes textual instruction, full history of previous observations and actions, and current observation to predict the next action.
|
| 21 |
+
|
| 22 |
+
Another VLN challenge concerns the generalizations of agents to new environments that have not been observed during training [4]. One direction is to learn more generic text-image representations. The PRESS model [20] improves language representation with a pretrained BERT encoder [21], and PREVALENT [22] uses pairs of instruction and single-step observations to pretrain a multimodal transformer. Though achieved promising results, these works do not optimize visual representation for the target navigation task. Moreover, lack of history in training [22] makes it hard to learn cross-modal alignment and increases the risk of overfitting to training environments. Another direction towards better generalization is to overcome exposure bias [23] due to discrepancy between training and inference. Different methods have been adopted for VLN including DAgger [6, 24] and scheduled sampling [20, 25]. Reinforcement Learning (RL) [12, 26] is one of the most effective approach among them, but it is considered unstable to directly train large-scale transformers via RL [27].
|
| 23 |
+
|
| 24 |
+
To address the above challenges, we propose the History Aware Multimodal Transformer (HAMT), a fully transformer-based architecture for multimodal decision making in VLN tasks. As illustrated in Figure 1, HAMT consists of unimodal transformers for text, history and observation encoding, and a cross-modal transformer to capture long-range dependencies of the history sequence, current observation and instruction. Since our history contains a sequence of all previous observations, its encoding is computationally expensive. To resolve complexity issues, we propose a hierarchical vision transformer as shown in Figure 2, which progressively learns representations for a single view, spatial relationships among views within a panorama and, finally, the temporal dynamics across panoramas of the history. In order to learn better visual representations, we propose auxiliary proxy tasks for end-to-end training. Such tasks include single-step action prediction based on imitation learning, self-supervised spatial relationship reasoning, masked language and image predictions and instructiontrajectory matching. We empirically show that our training facilitates the subsequent fine-tuning of our model with RL [28]. We carry out extensive experiments on various VLN tasks, including VLN with fine-grained instructions (R2R [6] and RxR [7]), high-level instructions (REVERIE [8] and our proposed R2R-Last), dialogs [9] as well as long-horizon VLN (R4R [3] and our proposed R2R-Back which requires the agent to return back after arriving at the target location). HAMT outperforms state of the art on both seen and unseen environments in all the tasks.
|
| 25 |
+
|
| 26 |
+
We summarize our contributions as follows: (1) We introduce HAMT to efficiently model longhorizon history of observed panoramas and actions via hierarchical vision transformer; (2) We train HAMT with auxiliary proxy tasks in an end-to-end fashion and use RL to improve the navigation policy; (3) We validate our method and outperform state of the art in a diverse range of VLN tasks, while demonstrating larger gains for long-horizon navigation.
|
| 27 |
+
|
| 28 |
+
# 2 Related work
|
| 29 |
+
|
| 30 |
+
Vision-and-language navigation. Training instruction-following navigation agents has attracted increasing research attention [1, 2, 6, 7, 8, 29]. Anderson et al. [6] propose a sequence-to-sequence
|
| 31 |
+
|
| 32 |
+

|
| 33 |
+
(a) Hierarchical vision transformer for history encoding.(a) Hierarchical history encoding. It first encodes individual view imagesViT, then models the spatial relation between images in each panorama, and finally capture the temporal relation between panoramas in the history. ViT, then models the spatial relation between images in each panorama, and finally capture the (c) with ViT, then models the spatial relation between images in each panorama,temporal relation between panoramas in the history. co and finally captures the temporal relation between panoramas in the history. po
|
| 34 |
+
(c) Temporal-only history encoonly considers temporal relation of only considers temporal relation of Temporal-only history enagent’s oriented images in the history.ding. It only considers temral relation of oriented views.
|
| 35 |
+
|
| 36 |
+
Figure 2: A comparison of history encoding methods. Circle nodes in different colors denote view images of panorama at different steps. Darker circle nodes are the oriented view of the agent.
|
| 37 |
+
|
| 38 |
+
LSTM baseline for the VLN task. Fried et al. [11] extend it with panoramic action space and synthesized instructions. To improve cross-modal alignment, the self-monitoring agent [13] proposes co-grounding and progress estimation, and RelGraph [15] uses graphs to model relationships across scene, objects and directions. Reinforcement learning (RL) is typically used to improve navigation policy. The EnvDrop model [12] mixes imitation learning and A3C [28]. The RCM [14] utilizes intrinsic reward of cross-modal matching in REINFORCE algorithm. Wang et al. [30] propose to learn rewards via soft expert distillation. Due to the success of transformer [31], recent works explore transformer architectures in VLN. PRESS [20] replaces LSTM instruction encoder with pretrained BERT [21]. SIA [16] uses transformer for single-step multimodal fusion and LSTM for sequential action prediction. PTA [32] is a transformer VLN model using CNNs to extract visual features [33]. Here we propose the first full transformer architecture for VLN and train it end-to-end.
|
| 39 |
+
|
| 40 |
+
Memory-based policy for navigation. LSTMs [34] have been the dominant approach to encode memories for navigation [6, 11, 12, 14]. Condensing all history into one feature vector, however, is prone to the loss of information. Alternative approaches include topological map memory structures [35, 36]. Deng et al. [18] use graphs to capture environment layout and enable long-term planing. A similar graph is adopted in [19] with frontier-exploration based decision making. But these works still utilize LSTMs for state tracking. To exploit long-term spatio-temporal dependencies, Fang et al. [17] store histories in a sequence encoded with transformer. Recurrent VLN-BERT [5] injects a recurrent unit to encode histories in transformer for VLN. The most similar work to ours is Episodic Transformer (E.T.) [37]. Differently from [37], we propose a hierarchical encoding of the panoramic observation history and optimize the whole model in end-to-end training.
|
| 41 |
+
|
| 42 |
+
Multimodal pretraining with transformers. Recent works show significant progress in vision and language tasks using multimodal pretraining. In particular, transformer architectures such as one-stream [38, 39] and dual-stream [40, 41] achieve state of the art for a number of downstream tasks including visual question answering, image-text retrieval and image captioning. While most previous methods rely on CNN to extract image representations, ViLT [42] adopts Vision Transformer (ViT) [43] and trains it with associated texts in an end-to-end manner thanks to the efficiency of ViT. A few endeavors [22, 44] explore multimodal pretraining for VLN. PREVALENT [22] pretrains a transformer using instructions and single-step observations without referring to trajectory history. VLN-BERT [44] measures the compatibility between an instruction and images in a path but does not support action prediction. Our work presents the first end-to-end trainable VLN transformer that jointly encodes text, history and observation, and is able to sequentially predict actions.
|
| 43 |
+
|
| 44 |
+
# 3 Method
|
| 45 |
+
|
| 46 |
+
Problem definition The VLN problem [6] is formulated as a partially observable Markov decision process, where future observations are independent of the past conditioning on current state $s _ { t }$ . Given an instruction $\mathcal { W }$ containing a sequence of $L$ words $( w _ { 1 } , w _ { 2 } , \cdot \cdot \cdot , w _ { L } )$ , an agent should follow the instruction to move in a connectivity graph to reach the goal location. At each step $t$ , the agent receives an observation ${ \mathcal { O } } _ { t }$ , a panorama of its surrounding environment. The ${ \mathcal { O } } _ { t }$ consists of $K$ single view images split from the panorama $\mathcal { O } _ { t } \triangleq \left( [ v _ { 1 } ^ { o } ; a _ { 1 } ^ { o } ] , \cdot \cdot \cdot , [ v _ { K } ^ { o } ; a _ { K } ^ { o } ] \right)$ , where $v _ { i } ^ { o }$ is the visual feature of the $i$ -th view and $a _ { i } ^ { o }$ denotes the relative angle to face the view (subscript $t$ is omitted for simplicity). There are $n$ navigable viewpoints among all the $K$ views1, denoted as $\mathcal { O } _ { t } ^ { c } \triangleq \left( [ v _ { 1 } ^ { c } ; a _ { 1 } ^ { c } ] , \cdot \cdot \cdot , [ v _ { n } ^ { c } ; a _ { n } ^ { c } ] \right)$ We follow the setup in [11] and use ${ \mathcal { O } } _ { t } ^ { c }$ as the decision space, so the agent only needs to select a candidate in ${ \mathcal { O } } _ { t } ^ { c }$ at each step. All observations $\mathcal { O } _ { i }$ and performed actions $a _ { i } ^ { h }$ before step $t$ form the history $\mathcal { H } _ { t } \triangleq \left( [ \mathscr { O } _ { 1 } ; a _ { 1 } ^ { h } ] , \cdots , [ \mathscr { O } _ { t - 1 } ; a _ { t - 1 } ^ { h } ] \right)$ , where $a _ { i } ^ { h }$ denotes the turned angles at step $i$ . The goal is to learn a policy $\pi$ parametrized by $\Theta$ to predict the next action based on the instruction, history and the current observation, which is $\bar { \pi } ( a _ { t } | \mathcal { W } , \mathcal { H } _ { t } , \mathcal { O } _ { t } , \mathcal { O } _ { t } ^ { c } ; \Theta )$ .
|
| 47 |
+
|
| 48 |
+
Unlike dominant recurrent approaches to condense $\mathcal { H } _ { t }$ into a fixed-size vector, in this section, we present the History Aware Multimodal Transformer (HAMT) that jointly encodes text, long-horizon history, and observation for sequential action prediction. The model architecture is described in Section 3.1. We propose end-to-end training for HAMT in Section 3.2 to learn unimodal and multimodal representations, and then use RL to fine-tune the navigation policy in Section 3.3.
|
| 49 |
+
|
| 50 |
+
# 3.1 HAMT: History Aware Multimodal Transformer
|
| 51 |
+
|
| 52 |
+
Figure 1 illustrates the model architecture of HAMT. The inputs text $\mathcal { W }$ , history $\mathcal { H } _ { t }$ and observation ${ \mathcal { O } } _ { t }$ are first encoded via the corresponding unimodal transformers respectively, and then fed into the cross-modal transformer encoder to capture multimodal relationships.
|
| 53 |
+
|
| 54 |
+
Text Encoding. For each token $i$ in the instruction $\mathcal { W }$ , we embed it as the summation of its word embedding $w _ { i }$ , position embedding $E _ { i } ^ { P }$ and type embedding of text $E _ { 0 } ^ { T }$ . Then we employ a transformer with $N _ { L }$ layers to obtain contextual representation $x _ { i }$ following the standard BERT [21].
|
| 55 |
+
|
| 56 |
+
Observation Encoding. For each view $[ v _ { i } ^ { o } ; a _ { i } ^ { o } ]$ in the panoramic observation ${ \mathcal { O } } _ { t }$ , we first represent the relative angle $a _ { i } ^ { o }$ as $E _ { a _ { i } ^ { o } } ^ { A } = ( \sin \theta _ { i } , \cos \theta _ { i } , \sin \phi _ { i } , \cos \phi _ { i } )$ where $\theta _ { i }$ and $\phi _ { i }$ are the relative heading and elevation angle to the agent’s orientation. Then the observation embedding $o _ { i }$ is as follows:
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
o _ { i } = \mathrm { L N } ( W _ { v } ^ { o } v _ { i } ^ { o } ) + \mathrm { L N } ( W _ { a } ^ { o } E _ { a _ { i } ^ { o } } ^ { A } ) + E _ { o _ { i } } ^ { N } + E _ { 1 } ^ { T }
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
where $W _ { v } ^ { o } , W _ { a } ^ { o }$ are learnable weights. The $E _ { o _ { i } } ^ { N }$ denotes the navigable embedding to differentiate types of views, with $E _ { 0 } ^ { N }$ for non-navigable view, $E _ { 1 } ^ { N }$ for navigable view and $E _ { 2 } ^ { N }$ for stop view (we append a stop token in observation to support stop action). The $E _ { 1 } ^ { T }$ is the type embedding of observation. We omit bias terms for simplicity. The LN denotes layer normalization [45]. Because $a _ { i } ^ { o }$ has much lower feature dimensions than $v _ { i } ^ { o }$ , we apply LN to balance the encoded $a _ { i } ^ { o }$ and $v _ { i } ^ { o }$ .
|
| 63 |
+
|
| 64 |
+
Hierarchical History Encoding. As $\mathcal { H } _ { t }$ consists of all the past panoramic observations $\mathcal { O } _ { i }$ and performed actions $a _ { i } ^ { h }$ before step $t .$ , it is important to encode $\mathcal { H } _ { t }$ efficiently as context. Figures 2b-2c depict the flattened and temporal-only history encoding approaches used in VLN-BERT [44] and E.T. [37] respectively. The flattened approach treats each view image in $\mathcal { O } _ { i }$ as a token, so the history sequence contains $t K$ tokens. Though it enables to learn relationships among all image views, the computation cost quadratically increases with the sequence length, making it inefficient for long-horizon tasks. In the temporal-only approach, only the oriented view of the agent in each $\mathcal { O } _ { i }$ is taken as inputs instead of the whole panorama, so only $t$ temporal tokens are encoded. However, this approach can lose critical information in past observations. For example, in the instruction “with the windows on your left, walk through the large room past the sitting areas”, the object “window” does not appear in the oriented view of the agent. Therefore, the encoded history is insufficient to tell whether the agent passed the window or not, making the model confused to take the next action.
|
| 65 |
+
|
| 66 |
+
In order to balance computational efficiency and information integrity, we propose a hierarchical history encoding approach as illustrated in Figure 2a. It hierarchically encodes view images within each panorama and then temporal relationships across panoramas, similar to the factorized spatialtemporal video transformer [46]. For each $\mathcal { O } _ { i }$ , its constituent view images are first embeded via ViT and Eq (1), and then encoded via a panoramic transformer with $N _ { h }$ layers to learn spatial relationships within the panorama. We apply average pooling to obtain panorama embedding, and add it with the oriented view image feature in residual connection. The parameters in ViT and panoramic transformer are shared for different steps. In this way, each historical observation $\mathcal { O } _ { i }$ is represented as $v _ { i } ^ { h }$ , and the final temporal token $h _ { i }$ is computed as:
|
| 67 |
+
|
| 68 |
+
Table 1: Comparison of HAMT and previous VLN transformers.
|
| 69 |
+
|
| 70 |
+
<table><tr><td rowspan="2">Models</td><td colspan="4">Inputs</td><td colspan="4">Proxy Tasks</td></tr><tr><td>Text</td><td>History</td><td>Observation</td><td>MLM</td><td>MRM</td><td>ITM</td><td>SAP/SAR</td><td>SPREL</td></tr><tr><td>PREVALENT [22]</td><td>√</td><td></td><td>√</td><td>√</td><td></td><td></td><td>√</td><td></td></tr><tr><td>VLN-BERT [44]</td><td>√</td><td></td><td></td><td>√</td><td>√</td><td>√</td><td></td><td></td></tr><tr><td>HAMT (Ours)</td><td>√</td><td>√</td><td>√</td><td>√</td><td>√</td><td></td><td>√</td><td>√</td></tr></table>
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
h _ { i } = \mathrm { L N } ( W _ { v } ^ { h } v _ { i } ^ { h } ) + \mathrm { L N } ( W _ { a } ^ { h } E _ { a _ { i } ^ { h } } ^ { A } ) + E _ { i } ^ { S } + E _ { 2 } ^ { T }
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where $E _ { i } ^ { S }$ denotes the $i$ -th step embedding, $E _ { 2 } ^ { T }$ is the type embedding of history. The computational cost is $\dot { O ( t K ^ { 2 } + t ^ { 2 } ) }$ , which significantly reduces from $\bar { O ( } t ^ { 2 } K ^ { 2 } )$ in the flattened approach. To be noted, we add a special token $\boldsymbol { \left[ c \mathbf { 1 s } \right] }$ to the start of the history sequence to obtain a global representation. The embedding of [cls] is a parameter to learn, which is initialized from a zero vector.
|
| 77 |
+
|
| 78 |
+
Cross-modal Encoding. We concatenate history and observation as the vision modality, and use cross-modal transformer with $N _ { x }$ layers to fuse features from text, history and observation as shown in the right of Figure 1. The reason of using such dual-stream architecture rather than onestream is that the length of different modalities can be highly imbalanced, and the dual-stream architecture can balance the importance of intra- and inter-modal relationships by model design [47]. In each cross-modal layer, a vision-text cross-attention is firstly performed for vision modality to attend relevant text information and vice versa for text modality. Then each modality uses selfattention to learn intra-modal relationship such as interaction between observation and history, followed by a fully-connected neural network. Finally, the HAMT model outputs embeddings $X ^ { ' } = ( x _ { \mathrm { c l s } } ^ { \prime } , x _ { 1 } ^ { \prime } , \cdots , x _ { L } ^ { \prime } ) , H _ { t } ^ { ' } = ( h _ { \mathrm { c l s } } ^ { \prime } , h _ { 1 } ^ { \prime } , \cdots , h _ { t - 1 } ^ { \prime } ) , \dot { O _ { t } } = ( o _ { 1 } ^ { \prime } , \cdots , o _ { K } ^ { \prime } , o _ { \mathrm { s t o p } } ^ { \prime } )$ for tokens in text, history and observation respectively.
|
| 79 |
+
|
| 80 |
+
# 3.2 End-to-end training with proxy tasks
|
| 81 |
+
|
| 82 |
+
As it is difficult to train large-scale transformers with RL due to sparse supervision [27], we propose to first end-to-end train HAMT via several proxy tasks to learn unimodal and multimodal representation.
|
| 83 |
+
|
| 84 |
+
Table 1 compares our HAMT with previous VLN transformers PREVALENT [22] and VLNBERT [44] in inputs and proxy tasks. As neither PREVALENT nor VLN-BERT jointly encodes text, history and observation, a limited choice of proxy tasks can be applied in training. Our model instead can take advantage of various proxy tasks to learn cross-modal alignment, spatial and temporal reasoning, and history-aware action prediction. Given the input pair $( \mathcal { W } , \mathcal { H } _ { T } )$ where $T$ is the length of full trajectory, we can apply common proxy tasks as in vision-and-language pretraining [40, 44], including Masked Language Modeling (MLM), Masked Region Modeling (MRM) and Instruction Trajectory Matching (ITM). Details of the three proxy tasks are presented in the supplementary material. In the following, we introduce new proxy tasks given the triplet input $( \mathcal { W } , \mathcal { H } _ { t } , \mathcal { O } _ { t } )$ specifically for VLN tasks.
|
| 85 |
+
|
| 86 |
+
Single-step Action Prediction/Regression (SAP/SAR). The task deploys imitation learning to predict the next action based on instruction, history from expert demonstration and the current observation. We formulate it as a classification and a regression task respectively. In the SAP classification task, we predict action probability for each navigable view in $\mathcal { O } _ { t } ^ { c }$ which is $\begin{array} { r } { p _ { t } ( o _ { i } ^ { \prime } ) = \frac { \exp ( f _ { \mathrm { S A P } } ( o _ { i } ^ { \prime } \odot x _ { \mathrm { c l s } } ^ { \prime } ) ) } { \sum _ { j } \exp ( f _ { \mathrm { S A P } } ( o _ { j } ^ { \prime } \odot x _ { \mathrm { c l s } } ^ { \prime } ) ) } } \end{array}$ , where $f _ { \mathrm { S A P } }$ is a two-layer fully-connected network, $\odot$ is element-wise multiplication and $x _ { \mathrm { c l s } } ^ { \prime }$ is output embedding of special text token [cls]. The objective is to minimize negative log probability of the target view action $o _ { * } ^ { \prime }$ : $L _ { \mathrm { S A P } } = - { \log { p _ { t } ( o _ { * } ^ { \prime } ) } }$ . In SAR regression task, we directly predict the action heading and elevation angles based on the text token $\boldsymbol { \left[ \mathsf { c } \mathrm { 1 s } \right] }$ which is $\hat { \theta _ { t } } , \hat { \phi _ { t } } = f _ { \mathrm { S A R } } ( x _ { \mathrm { c l s } } ^ { \prime } )$ . The loss function is $L _ { \mathrm { S A R } } = ( \hat { \theta _ { t } } - \theta _ { t } ) ^ { 2 } + ( \hat { \phi _ { t } } - \phi _ { t } ) ^ { 2 }$ . The two proxy tasks enable the model to learn how to make action decision conditioning on instruction and contextual history.
|
| 87 |
+
|
| 88 |
+
Spatial Relationship Prediction (SPREL). Expressions of egocentric and allocentric spatial relations are frequent in navigational instructions, such as “walk into the room on your left” and “enter the bedroom next to the stairs”. In order to learn spatial relation aware representations, we propose the SPREL self-supervised task to predict relative spatial position of two views in a panorama based on only visual feature, angle feature or both. Assume $[ v _ { i } ^ { o } ; a _ { i } ^ { o } ]$ and $[ v _ { j } ^ { o } ; a _ { j } ^ { o } ]$ are two views in ${ \mathcal { O } } _ { t }$ , we randomly zero out $v _ { * } ^ { o }$ or $a _ { * } ^ { o }$ with probability of 0.3. Their encoded representations are $o _ { i } ^ { \prime }$ and $o _ { j } ^ { \prime }$ , and their relative heading and elevation angles are $\theta _ { i j } , \phi _ { i j }$ . We then predict $\begin{array} { r } { \hat { \theta } _ { i j } , \hat { \phi } _ { i j } = f _ { \mathrm { S P R E L } } ( [ \hat { o _ { i } ^ { \prime } } ; o _ { j } ^ { \prime } ] ) } \end{array}$ where $[ ; ]$ denotes vector concatenation and optimize $L _ { \mathrm { S P R E L } } = ( \hat { \theta } _ { i j } - \theta _ { i j } ) ^ { 2 } + ( \hat { \phi } _ { i j } - \phi _ { i j } ) ^ { 2 }$ . The task helps for spatial relationship reasoning in the observation.
|
| 89 |
+
|
| 90 |
+
Training Strategy. Instead of directly training the whole HAMT model at once, we propose to progressively train HAMT in two stages. In the first stage, we freeze ViT pretrained on ImageNet [48] and train the rest of the modules which are randomly initialized. This aims to avoid catastrophic forgetting of the pretrained weights in ViT. Then we unfreeze ViT and train the whole model end-toend. The learning rate for ViT is set to be higher than for others modules to avoid vanishing gradients and to speedup convergence. We empirically show that the proposed two-stage training outperforms one-stage training in the supplementary material.
|
| 91 |
+
|
| 92 |
+
# 3.3 Fine-tuning for sequential action prediction
|
| 93 |
+
|
| 94 |
+
Structure Variants. We present two variants of HAMT for action prediction in the following. 1) MLP action head: we directly reuse the action prediction network $f _ { \mathrm { S A P } }$ in the SAP task to predict navigable views. We use it as default for VLN tasks. 2) MLP action head based on encoder-decoder structure: the original HAMT model applies cross-modal attention for both vision-to-text and text-tovision, which is computationally expensive when instructions are long. Therefore, we remove the cross-modal attention from text to vision. In this way, we separate the cross-modal transformer into an encoder which only takes instruction as input, and a decoder that inputs history and observation as query and attends over encoded text tokens. Please see supplementary material for details.
|
| 95 |
+
|
| 96 |
+
$\mathbf { R L + I L }$ Objective. We combine Reinforcement Learning (RL) and Imitation Learning (IL) to finetune HAMT for sequential action prediction. The IL relies on the SAP loss defined in Section 3.2 and follows the expert action at each step while RL samples actions according to the policy $\pi$ . Specifically, we use the Asynchronous Advantage Actor-Critic (A3C) RL algorithm [28]. At each step $t$ , the agent samples an action based on policy $\pi \colon \hat { a } _ { t } ^ { h } \sim \pi ( a _ { t } | \mathcal { W } , \mathcal { H } _ { t } , \mathcal { O } _ { t } , \bar { \mathcal { O } } _ { t } ^ { c } )$ and receives an immediate reward $r _ { t }$ . For non-stop actions, we set $r _ { t }$ as the reduced distance of taking the action to the target and the increased alignment score [3] compared to expert demonstration as defined in [5]; for the stop action, to estiimplem $r _ { t } = 2$ arrives which is . As the $^ { - 2 }$ ritic network is trainedis discount factor. Weistance, we empirically $s _ { t }$ $\begin{array} { r } { R _ { t } = \dot { \sum _ { k = 0 } ^ { T - t } } \gamma ^ { k } r _ { t + k } } \end{array}$ $\gamma$
|
| 97 |
+
$V _ { t } = f _ { \mathrm { c r i t i c } } ( x _ { \mathrm { c l s } } ^ { \prime } \odot h _ { \mathrm { c l s } } ^ { \prime } )$
|
| 98 |
+
find it benefits to combine A3C RL with $\mathrm { I L }$ weighted by $\lambda$ , which is:
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\Theta \gets \Theta + \underbrace { \mu \frac { 1 } { T } \sum _ { t = 1 } ^ { T } \nabla \mathrm { e l o g } \pi ( \hat { a } _ { t } ^ { h } ; \Theta ) ( R _ { t } - V _ { t } ) } _ { \mathrm { ~ } } + \underbrace { \lambda \mu \frac { 1 } { T ^ { * } } \sum _ { t = 1 } ^ { T ^ { * } } \nabla \mathrm { e l o g } \pi ( a _ { t } ^ { * } ; \Theta ) } _ { T ^ { * } }
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
where $\mu$ is the learning rate, $a _ { t } ^ { * }$ is the expert action at step $t$ of the expert trajectory of length $T ^ { * }$ .
|
| 105 |
+
|
| 106 |
+
# 4 Experiments
|
| 107 |
+
|
| 108 |
+
# 4.1 Experimental setup
|
| 109 |
+
|
| 110 |
+
Datasets. We evaluate our method on four VLN tasks (seven datasets): VLN with fine-grained instructions (R2R [6], RxR [7]); VLN with high-level instructions (REVERIE [8], R2R-Last); visionand-dialogue navigation (CVDN [9]); and long-horizon VLN (R4R [3], R2R-Back).
|
| 111 |
+
|
| 112 |
+
• R2R [1] builds upon Matterport3D [49] and includes 90 photo-realistic houses with 10,567 panoramas. It contains 7,189 shortest-path trajectories, each associated with 3 instructions. The dataset is split into train, val seen, val unseen and test unseen sets with 61, 56, 11 and 18 houses respectively. Houses in val seen split are the same as training, while houses in val unseen and test splits are different from training.
|
| 113 |
+
|
| 114 |
+
• RxR [7] is a large multilingual VLN dataset based on Matterport 3D. The instructions are in three different languages (English, Hindi and Telugu). The dataset emphasizes the role of language in VLN by addressing biases in paths and describing more visible entities than R2R.
|
| 115 |
+
R4R [3] extends R2R dataset by concatenating two adjacent tail-to-head trajectories in R2R. Therefore, it has longer instructions and trajectories. The trajectories are also less biased as they are not necessarily the shortest-path from start to end location.
|
| 116 |
+
• R2R-Back is a new VLN setup proposed in this work. The agent is required to return to its start location after arriving at the destination. The agent needs to remember its navigation histories to solve the task. We add a return command at the end of each instruction in R2R and a reverse path from the end to start locations as expert demonstration. CVDN [9] defines a navigation from dialog history task, which requires an agent to arrive at goal regions based on multi-turn question-answering dialogs. Such types of instructions are often ambiguous and under-specified. The lengths of instructions and paths are also long.
|
| 117 |
+
REVERIE [8] replaces step-by-step instructions in R2R with high-level instructions, which mainly describe the target location and object. The agent, hence, is required to navigate to the goal without detailed guidance and depends on its past experiences.
|
| 118 |
+
• R2R-Last is our proposed VLN setup similar to REVERIE. It only uses the last sentence from the original R2R instructions describing the final destination.
|
| 119 |
+
|
| 120 |
+
Evaluation metrics. We adopt standard metrics [1], including (1) Trajectory Length (TL): the agent’s navigated path in meters; (2) Navigation Error (NE): the average distance in meters between the agent’s final position and the target; (3) Success Rate (SR): the ratio of trajectories reaching the destination with a maximum error of 3 meters to the target; and (4) Success Rate normalized by the ratio between the length of the shortest path and the predicted path (SPL). SPL is more relevant than SR as it balances the navigation accuracy and efficiency. For long-horizon VLN task (R4R and R2R-Back), we further employ three metrics to measure the path fidelity between the predicted path and target path, including (5) Coverage weighted by Length Score (CLS) [3]; (6) the normalized Dynamic Time Warping (nDTW) [50]; and (7) the Success weighted by nDTW (SDTW).
|
| 121 |
+
|
| 122 |
+
Implementation details. For the HAMT model, we set $N _ { L } = 9$ for language transformer, $N _ { h } = 2$ for panoramic transformer in hierarchical history encoding, and $N _ { x } = 4$ for cross-modal transformer. There are $K = 3 6$ view images in each panoramic observation. We use ViT-B/16 [43] for image encoding if not otherwise specified. In training with proxy tasks, we randomly select proxy tasks for each mini-batch with predefined ratio. We train HAMT for $2 0 0 \mathrm { k }$ iterations with fixed ViT using learning rate of 5e-5 and batch size of 64 on 4 NVIDIA Tesla P100 GPUs ( $_ { \sim 1 }$ day). The whole HAMT model is trained end-to-end for $2 0 \mathrm { k }$ iterations on 20 NVIDIA V100 GPUs with learning rate of 5e-5 for ViT and 1e-5 for the others ${ \sim } 2 0$ hours). We use R2R training set and augmented pairs from [22] for training unless otherwise noted. In fine-tuning with $\mathrm { R L + I L }$ , we set $\lambda = 0 . 2$ in Eq (3) and $\gamma = 0 . 9$ . The model is fine-tuned for $1 0 0 \mathrm { k }$ iterations with learning rate of 1e-5 and batch size of 8 on a single GPU. Unimodal encoders are fixed by default. The best model is selected according to performance on val unseen split. We use the same augmented data as [5] for R2R for fair comparison, while no augmented data is used for other datasets. Greedy search is applied in inference following the single-run setting. Please see supplementary material for more details.
|
| 123 |
+
|
| 124 |
+
# 4.2 Ablation studies
|
| 125 |
+
|
| 126 |
+
In this section, we evaluate each component in the HAMT model, including: hierarchical history encoding, end-to-end training with proxy tasks, and fine-tuning objectives.
|
| 127 |
+
|
| 128 |
+
How important is the history encoding for VLN? For fair comparison with the state-of-the-art recurrent architecture RecBERT [5], we use the same Resnet152 visual features and train all the models from scratch with $\mathrm { R L + I L }$ objectives to avoid the influence of different weight initialization. The models are optimized for $3 0 0 \mathrm { k }$ iterations end-to-end except for the visual feature. Table 2 compares different history encoding approaches on
|
| 129 |
+
|
| 130 |
+
Table 2: R2R navigation results for alternative methods of history encoding. All methods use Resnet152 visual features and are trained from scratch on R2R dataset.
|
| 131 |
+
|
| 132 |
+
<table><tr><td rowspan="2">History Encoding</td><td colspan="2">Val Seen</td><td colspan="2">Val Unseen</td></tr><tr><td>SR↑</td><td>SPL↑</td><td>SR↑</td><td>SPL↑</td></tr><tr><td>RecBERT[5]</td><td>62</td><td>59</td><td>50</td><td>46</td></tr><tr><td>Recurrent</td><td>60.9±1.0</td><td>56.6±1.1</td><td>52.2±0.7</td><td>47.0±0.5</td></tr><tr><td>Temporal-only</td><td>61.5±0.8</td><td>57.7±0.7</td><td>53.2±0.1</td><td>48.0±0.4</td></tr><tr><td>Hierarchical</td><td>65.5±1.2</td><td>61.3±1.4</td><td>54.4±0.4</td><td>48.7±0.4</td></tr></table>
|
| 133 |
+
|
| 134 |
+
R2R dataset. Our recurrent model slightly differs from RecBERT (no init. OSCAR) [5] in trans
|
| 135 |
+
|
| 136 |
+
Table 3: Ablations for end-to-end HAMT training on R2R dataset using proposed proxy tasks.
|
| 137 |
+
(a) Comparison of visual features and end-to-end training. The “PT” stands for proxy tasks in training; “e2e” for optimizing the visual representation.
|
| 138 |
+
|
| 139 |
+
<table><tr><td>feature PT e2e</td><td>SR↑</td><td>Val Seen SPL↑</td><td>Val Unseen SR↑ SPL↑</td></tr><tr><td>Resnet ×</td><td>×</td><td>65.5±1.2 61.3±1.4</td><td>54.4±0.4 48.7±0.4</td></tr><tr><td>152</td><td>√×</td><td>69.3±1.0 64.8±1.2</td><td>63.5±0.557.5±0.5</td></tr><tr><td rowspan="2">ViT</td><td>√ ×</td><td>75.7±1.0</td><td>72.5±1.0 64.4±0.3 58.8±0.0</td></tr><tr><td>√ √</td><td>75.0±0.9 71.7±0.7</td><td>65.7±0.7 60.9±0.7</td></tr></table>
|
| 140 |
+
|
| 141 |
+
(b) Comparison of different proxy tasks. The “SAP(R)” denotes the single step action prediction and regression task, and “SPREL” is the spatial relationship prediction task.
|
| 142 |
+
|
| 143 |
+
<table><tr><td>SAP SP (R) REL</td><td>Val Seen SR↑ SPL↑</td><td>Val Unseen SR↑ SPL↑</td></tr><tr><td>×</td><td>× 71.2±2.3</td><td>67.2±2.0 62.8±1.3 57.7±1.0</td></tr><tr><td>√</td><td>×</td><td>74.7±0.6 71.1±0.9 63.6±0.1 58.1±0.4</td></tr><tr><td>√</td><td>√</td><td>75.7±1.0 72.5±1.0 64.4±0.3 58.8±0.0</td></tr></table>
|
| 144 |
+
|
| 145 |
+
former architecture as shown in Figure 1. It achieves slightly better performance on val unseen split. The temporal-only model uses transformer to encode agent’s oriented visual observations in history sequence, and outperforms the recurrent method by relative gains of $1 . 9 \%$ on SR and $2 . 1 \%$ on SPL for val unseen split. Adding panoramic observations in a hierarchical way results in $4 . 2 \%$ (SR) and $3 . 6 \%$ (SLP) relative improvements on the val unseen split compared to the recurrent method. Even larger improvements are achieved on val seen split as the hierarchical model has a larger capacity to fit the seen environments. This evaluation demonstrates the advantage of our hierarchical history representation compared to the recurrent and temporal-only history representation.
|
| 146 |
+
|
| 147 |
+
How much does training with proxy tasks help? We next evaluate the advantage of training HAMT end-to-end with proxy tasks. In Table 3a, the first row uses $\mathrm { R L + I L }$ objectives to train HAMT from scratch, while the second row uses proxy tasks for training prior to $\mathrm { R L + I L }$ fine-tuning. We can see that it significantly boosts the performance to first train with proxy tasks. It improves on val unseen split with $1 6 . 7 \%$ and $1 8 . 0 \%$ relative gains on SR and SPL respectively, indicating that training with auxiliary proxy tasks enables better generalization. In the third row, we replace the visual feature from Resnet152 to ViT. The ViT feature improves the performance on both val seen and val unseen splits, showing that more powerful visual representations matter. Finally, training ViT end-to-end obtains $2 . 1 \%$ gains on SPL on val unseen split. This is the first time to show that optimizing visual representations end-to-end is beneficial for VLN tasks. In Table 3b, we evaluate the benefit of the two new proxy tasks for frozen ViT features using the other proxy tasks by default. The SAP(R) uses imitation learning to predict actions, which directly influences the navigation policy and improves the performance by a large margin. The SPREL is a self-supervised proxy task that forces the model to learn spatial relationships in panorama and helps generalization in unseen environments. More experiments to ablate contributions from history encoding and proxy tasks, contributions of proxy tasks in end-to-end training etc. are presented in supplementary material.
|
| 148 |
+
|
| 149 |
+
What is the impact of the fine-tuning objectives? Table 4 presents results using different objectives in fine-tuning. The first row directly applies HAMT trained by proxy tasks, which achieves lower performance than that after IL finetuning, because we mainly use augmented data in proxy task training to increase visual diversity, but such noisy data deteriorates action prediction performance. Previous work [12] has shown that RL alone performs poorly. However, training with
|
| 150 |
+
|
| 151 |
+
Table 4: Ablations for fine-tuning objectives of sequential action prediction on R2R dataset.
|
| 152 |
+
|
| 153 |
+
<table><tr><td rowspan="2">IL RL</td><td rowspan="2"></td><td colspan="2">Val Seen</td><td colspan="2">Val Unseen</td></tr><tr><td>SR↑</td><td>SPL↑</td><td>SR↑</td><td>SPL个</td></tr><tr><td>×</td><td>×</td><td>57.9</td><td>54.8</td><td>51.8</td><td>48.9</td></tr><tr><td>√</td><td>×</td><td>63.7±2.1</td><td>61.7±2.2</td><td>57.2±0.1</td><td>54.7±0.3</td></tr><tr><td>×</td><td>√</td><td>70.5±2.9</td><td>65.6±2.8</td><td>63.5±1.4</td><td>57.5±1.1</td></tr><tr><td>√</td><td>√</td><td>75.0±0.9</td><td>71.7±0.7</td><td>65.7±0.7</td><td>60.9±0.7</td></tr></table>
|
| 154 |
+
|
| 155 |
+
proxy tasks stabilizes the followup RL fine-tuning. HAMT optimized by RL achieves much better performance than that when fine-tuning with IL on the SR metric. It indicates that RL is able to learn better exploration strategy on unseen environments. However, as the reward for RL focuses more on shortest paths rather than path fidelity with instructions, the improvement on SPL metric is relatively small compared to SR metric. Moreover, the fluctuation of the pure RL objective is larger than IL. Therefore, mixing the RL and IL achieves the best performance.
|
| 156 |
+
|
| 157 |
+
# 4.3 Comparison to state of the art
|
| 158 |
+
|
| 159 |
+
VLN with fine-grained instructions: R2R and RxR. Table 5 compares HAMT with previous VLN methods on the R2R benchmark. Our model outperforms state-of-the-art results of RecBERT [5] by relative $5 . 9 \%$ and $7 . 0 \%$ improvements in SPL on val seen and unseen splits respectively. We achieve state-of-the-art performance under the single-run setting on the unseen testing split of the leaderboard2. It demonstrates the effectiveness and generalization of our model. We further provide computation time in inference for HAMT and RecBERT in the supplementary material to show the efficiency of our HAMT model. We also achieve large improvements on $\mathbf { R x R }$ dataset. The full results are presented in supplementary material.
|
| 160 |
+
|
| 161 |
+
Table 5: Comparison with state-of-the-art methods on R2R dataset.
|
| 162 |
+
|
| 163 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="4">Validation Seen</td><td colspan="4">Validation Unseen</td><td colspan="4">Test Unseen</td></tr><tr><td>TL</td><td>NE↓</td><td>SR↑</td><td>SPL↑</td><td>TL</td><td>NE↓</td><td>SR↑</td><td>SPL个</td><td>TL</td><td>NE↓</td><td>SR↑</td><td>SPL↑</td></tr><tr><td>Seq2Seq [6]</td><td>11.33</td><td>6.01</td><td>39</td><td>1</td><td>8.39</td><td>7.81</td><td>22</td><td></td><td>8.13</td><td>7.85</td><td>20</td><td>18</td></tr><tr><td>SF[11]</td><td>-</td><td>3.36</td><td>66</td><td>1</td><td>1</td><td>6.62</td><td>35</td><td>1</td><td>14.82</td><td>6.62</td><td>35</td><td>28</td></tr><tr><td>PRESS [20]</td><td>10.57</td><td>4.39</td><td>58</td><td>55</td><td>10.36</td><td>5.28</td><td>49</td><td>45</td><td>10.77</td><td>5.49</td><td>49</td><td>45</td></tr><tr><td>EnvDrop[12]</td><td>11.00</td><td>3.99</td><td>62</td><td>59</td><td>10.70</td><td>5.22</td><td>52</td><td>48</td><td>11.66</td><td>5.23</td><td>51</td><td>47</td></tr><tr><td>AuxRN[51]</td><td>-</td><td>3.33</td><td>70</td><td>67</td><td>-</td><td>5.28</td><td>55</td><td>50</td><td>1</td><td>5.15</td><td>55</td><td>51</td></tr><tr><td>PREVALENT [22]</td><td>10.32</td><td>3.67</td><td>69</td><td>65</td><td>10.19</td><td>4.71</td><td>58</td><td>53</td><td>10.51</td><td>5.30</td><td>54</td><td>51</td></tr><tr><td>RelGraph [15]</td><td>10.13</td><td>3.47</td><td>67</td><td>65</td><td>9.99</td><td>4.73</td><td>57</td><td>53</td><td>10.29</td><td>4.75</td><td>55</td><td>52</td></tr><tr><td>RecBERT[5]</td><td>11.13</td><td>2.90</td><td>72</td><td>68</td><td>12.01</td><td>3.93</td><td>63</td><td>57</td><td>12.35</td><td>4.09</td><td>63</td><td>57</td></tr><tr><td>HAMT (Ours)</td><td>11.15</td><td>2.51</td><td>76</td><td>72</td><td>11.46</td><td>2.29</td><td>66</td><td>61</td><td>12.27</td><td>3.93</td><td>65</td><td>60</td></tr></table>
|
| 164 |
+
|
| 165 |
+
Long-horizon VLN: R4R and R2R-Back. Table 6 shows navigation results on R4R dataset. As R4R contains longer instructions and trajectories compared to R2R, we use the encoder-decoder variant of HAMT for better efficiency. Our method outperforms previous approaches in all metrics and shows particularly large improvements for the path fidelity related metrics. Compared to RecBERT, HAMT achives $8 . 2 \%$ and $9 . 5 \%$ relative improvement in CLS and nDTW respectively. The large improvements on these path fidelity related metrics indicate that HAMT is better to follow the designated path of the fine-grained instruction. Figure 3 evaluates the performance of HAMT and RecBERT with respect to instruction length measured by words. Though the nDTW decreases for longer instructions, the relative improvement of HAMT increases with the instruction length.
|
| 166 |
+
|
| 167 |
+
Table 6: Comparison on R4R val unseen split.
|
| 168 |
+
|
| 169 |
+
<table><tr><td>Methods</td><td>NE↓</td><td>SR↑</td><td>CLS↑</td><td>nDTW↑</td><td>SDTW↑</td></tr><tr><td>SF[11]</td><td>8.47</td><td>24</td><td>30</td><td>-</td><td>1</td></tr><tr><td>RCM[14]</td><td>1</td><td>29</td><td>35</td><td>30</td><td>13</td></tr><tr><td>PTA [32]</td><td>8.25</td><td>24</td><td>37</td><td>32</td><td>10</td></tr><tr><td>EGP[18]</td><td>8.0</td><td>30.2</td><td>44.4</td><td>37.4</td><td>17.5</td></tr><tr><td>RelGraph [15]</td><td>7.43</td><td>36</td><td>41</td><td>47</td><td>34</td></tr><tr><td>RecBERT† [5]</td><td>6.67</td><td>43.6</td><td>51.4</td><td>45.1</td><td>29.9</td></tr><tr><td>HAMT (Ours)</td><td>6.09</td><td>44.6</td><td>57.7</td><td>50.3</td><td>31.8</td></tr></table>
|
| 170 |
+
|
| 171 |
+

|
| 172 |
+
Figure 3: nDTW with respect to instruction length on R4R val unseen split.
|
| 173 |
+
|
| 174 |
+
The navigation performance on R2R-Back dataset is presented in Table 7. We compare with two state-of-the-art recurrent models EnvDrop [12] and RecBERT [5] based on LSTM and transformer respectively (both models are trained on R2R-Back for fair comparison). The improvements are more significant on this task as it requires the agent to remember the way it came to the target to successfully return back. The recurrent state is insufficient to capture such history and leads to inferior performance compared to the HAMT model.
|
| 175 |
+
|
| 176 |
+
Table 7: Comparison of methods on the R2R-Back dataset.
|
| 177 |
+
|
| 178 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="6">Val Seen</td><td colspan="4">Val Unseen</td></tr><tr><td>TL</td><td>SR↑</td><td>SPL↑</td><td>nDTW↑</td><td>SDTW↑</td><td>TL</td><td>SR↑</td><td>SPL↑</td><td>nDTW↑</td><td>SDTW↑</td></tr><tr><td>EnvDropt[12]</td><td>23.83</td><td>44.1</td><td>42.0</td><td>61.3</td><td>39.4</td><td>24.57</td><td>32.4</td><td>30.2</td><td>51.1</td><td>28.0</td></tr><tr><td>RecBERTt [5]</td><td>22.33</td><td>51.4</td><td>48.4</td><td>67.3</td><td>45.7</td><td>23.35</td><td>41.1</td><td>37.7</td><td>58.2</td><td>35.6</td></tr><tr><td>HAMT (Ours)</td><td>22.76</td><td>64.8</td><td>61.8</td><td>73.7</td><td>58.9</td><td>23.78</td><td>57.2</td><td>53.1</td><td>65.1</td><td>49.5</td></tr></table>
|
| 179 |
+
|
| 180 |
+
Table 8: Navigation performance on CVDN dataset.
|
| 181 |
+
|
| 182 |
+
<table><tr><td>Val Seen</td><td>Val Unseen</td><td>Test Unseen</td></tr><tr><td>PREVALENT [22]</td><td>3.15</td><td>2.44</td></tr><tr><td>VISITRON [52]</td><td>3.25</td><td>3.11</td></tr><tr><td>MT-RCM+EnvAg[53]</td><td>4.65</td><td>3.91</td></tr><tr><td>HAMT (Ours)</td><td>5.13</td><td>5.58</td></tr></table>
|
| 183 |
+
|
| 184 |
+
Vision-and-Dialog Navigation: CVDN. The CVDN dataset contains dialogs as instructions and use Goal Progress (GP) in meters as the primary evaluation metric. GP measures the difference between completed distance and left distance to the goal, so the higher the better. There are two types of demonstrations in the dataset. One is shortest-path trajectory and the other is
|
| 185 |
+
|
| 186 |
+
player’s navigation trajectory. We mix the two types of demonstrations as supervision in training which has shown to be the most effective in previous works [22, 52, 53]. As navigation paths in CVDN dataset are much longer than R2R dataset, we adopt the encoder-decoder variant of HAMT. As shown in Table 8, HAMT outperforms existing recurrent approaches on both seen and unseen environments, and achieves the top position in the leaderboard3. It demonstrates that our HAMT model is generalizable to different types of instructions in new VLN tasks.
|
| 187 |
+
|
| 188 |
+
VLN with high-level instructions: R2R-Last and REVERIE. Table 9 shows results on the R2R-Last dataset that specifies the goal location and contains no step-by-step instructions. The HAMT model with the hierarchical history encoding is able to better accumulate the knowledge of the environment and achieves $9 . 8 \%$ and $1 0 . 5 \%$ relative gains on SPL metric on seen and unseen splits respectively compared to RecBERT [5]. The REVERIE dataset also
|
| 189 |
+
|
| 190 |
+
Table 9: Comparison on the R2R-Last dataset.
|
| 191 |
+
|
| 192 |
+
<table><tr><td>Methods</td><td>Val Seen SR↑</td><td>SPL↑</td><td>Val Unseen SR↑ SPL↑</td></tr><tr><td>EnvDrop+ [12]</td><td>42.8</td><td>38.4</td><td>34.3 28.3</td></tr><tr><td>RecBERT† [5]</td><td>50.2</td><td>45.8 41.6</td><td>37.3</td></tr><tr><td>HAMT (Ours)</td><td>53.3</td><td>50.3</td><td>45.2 41.2</td></tr></table>
|
| 193 |
+
|
| 194 |
+
contains high-level instructions but requires object grounding at the target location besides navigation. We provide results on REVERIE dataset in supplementary material. Our HAMT achieves SPL 30.20 and 26.67 on val unseen and test splits respectively, outperforming the state of the art navigation performance [5] by $5 . 3 \%$ and $2 . 7 \%$ .
|
| 195 |
+
|
| 196 |
+
# 5 Conclusion
|
| 197 |
+
|
| 198 |
+
This paper presents the first end-to-end transformer for vision-and-language navigation, denoted as History Aware Multimodal Transformer (HAMT). Our method efficiently encodes long-horizon history and combines it with instructions and observations to derive multimodal action prediction. The HAMT is first trained with proxy tasks in an end-to-end manner, and is then fine-tuned with RL to improve the navigation policy. We achieve state-of-the-art navigation performance on a diverse range of challenging VLN tasks, demonstrating improved accuracy and generalization of our approach compared to the dominant recurrent methods. Future work could extend our history-aware transformer to VLN with continuous actions [54] and could benefit from pretraining on larger navigation datasets. This paper has minimal ethical, privacy and safety concerns.
|
| 199 |
+
|
| 200 |
+
# Acknowledgments and Disclosure of Funding
|
| 201 |
+
|
| 202 |
+
This work was granted access to the HPC resources of IDRIS under the allocation 101002 made by GENCI. It was funded in part by the French government under management of Agence Nationale de la Recherche as part of the “Investissements d’avenir” program, reference ANR19-P3IA-0001 (PRAIRIE 3IA Institute) and by Louis Vuitton ENS Chair on Artificial Intelligence.
|
| 203 |
+
|
| 204 |
+
# References
|
| 205 |
+
|
| 206 |
+
[1] Peter Anderson, Angel Chang, Devendra Singh Chaplot, Alexey Dosovitskiy, Saurabh Gupta, Vladlen Koltun, Jana Kosecka, Jitendra Malik, Roozbeh Mottaghi, Manolis Savva, et al. On evaluation of embodied navigation agents. arXiv preprint arXiv:1807.06757, 2018. 1, 2, 6, 7
|
| 207 |
+
[2] Howard Chen, Alane Suhr, Dipendra Misra, Noah Snavely, and Yoav Artzi. Touchdown: Natural language navigation and spatial reasoning in visual street environments. In Proceedings of the
|
| 208 |
+
|
| 209 |
+
[3] Vihan Jain, Gabriel Magalhaes, Alexander Ku, Ashish Vaswani, Eugene Ie, and Jason Baldridge. Stay on the path: Instruction fidelity in vision-and-language navigation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1862–1872, 2019. 1, 2, 6, 7
|
| 210 |
+
|
| 211 |
+
[4] Yubo Zhang, Hao Tan, and Mohit Bansal. Diagnosing the environment bias in vision-andlanguage navigation. International Joint Conferences on Artificial Intelligence, 2020. 1, 2
|
| 212 |
+
|
| 213 |
+
[5] Yicong Hong, Qi Wu, Yuankai Qi, Cristian Rodriguez-Opazo, and Stephen Gould. Vln bert: A recurrent vision-and-language bert for navigation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1643–1653, 2021. 1, 3, 4, 6, 7, 8, 9, 10 [6] Peter Anderson, Qi Wu, Damien Teney, Jake Bruce, Mark Johnson, Niko Sünderhauf, Ian Reid, Stephen Gould, and Anton Van Den Hengel. Vision-and-language navigation: Interpreting visually-grounded navigation instructions in real environments. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3674–3683, 2018. 1, 2, 3, 6, 9 [7] Alexander Ku, Peter Anderson, Roma Patel, Eugene Ie, and Jason Baldridge. Room-acrossroom: Multilingual vision-and-language navigation with dense spatiotemporal grounding. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4392–4412, 2020. 1, 2, 6, 7
|
| 214 |
+
|
| 215 |
+
[8] Yuankai Qi, Qi Wu, Peter Anderson, Xin Wang, William Yang Wang, Chunhua Shen, and Anton van den Hengel. Reverie: Remote embodied visual referring expression in real indoor environments. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9982–9991, 2020. 1, 2, 6, 7
|
| 216 |
+
|
| 217 |
+
[9] Jesse Thomason, Michael Murray, Maya Cakmak, and Luke Zettlemoyer. Vision-and-dialog navigation. In Conference on Robot Learning, pages 394–406. PMLR, 2020. 1, 2, 6, 7
|
| 218 |
+
|
| 219 |
+
[10] Licheng Yu, Zhe Lin, Xiaohui Shen, Jimei Yang, Xin Lu, Mohit Bansal, and Tamara L Berg. Mattnet: Modular attention network for referring expression comprehension. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1307–1315, 2018. 1 [11] Daniel Fried, Ronghang Hu, Volkan Cirik, Anna Rohrbach, Jacob Andreas, Louis-Philippe Morency, Taylor Berg-Kirkpatrick, Kate Saenko, Dan Klein, and Trevor Darrell. Speakerfollower models for vision-and-language navigation. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, pages 3318–3329, 2018. 1, 3, 4, 9
|
| 220 |
+
|
| 221 |
+
[12] Hao Tan, Licheng Yu, and Mohit Bansal. Learning to navigate unseen environments: Back translation with environmental dropout. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 2610–2621, 2019. 1, 2, 3, 4, 8, 9, 10
|
| 222 |
+
|
| 223 |
+
[13] Chih-Yao Ma, Jiasen Lu, Zuxuan Wu, Ghassan AlRegib, Zsolt Kira, Richard Socher, and Caiming Xiong. Self-monitoring navigation agent via auxiliary progress estimation. In Proceedings of the International Conference on Learning Representations, 2019. 1, 3
|
| 224 |
+
|
| 225 |
+
[14] Xin Wang, Qiuyuan Huang, Asli Celikyilmaz, Jianfeng Gao, Dinghan Shen, Yuan-Fang Wang, William Yang Wang, and Lei Zhang. Reinforced cross-modal matching and self-supervised imitation learning for vision-language navigation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6629–6638, 2019. 1, 3, 9
|
| 226 |
+
|
| 227 |
+
[15] Yicong Hong, Cristian Rodriguez, Yuankai Qi, Qi Wu, and Stephen Gould. Language and visual entity relationship graph for agent navigation. Advances in Neural Information Processing Systems, 33:7685–7696, 2020. 1, 3, 9
|
| 228 |
+
|
| 229 |
+
[16] Xiangru Lin, Guanbin Li, and Yizhou Yu. Scene-intuitive agent for remote embodied visual grounding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7036–7045, 2021. 1, 3
|
| 230 |
+
|
| 231 |
+
[17] Kuan Fang, Alexander Toshev, Li Fei-Fei, and Silvio Savarese. Scene memory transformer for embodied agents in long-horizon tasks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 538–547, 2019. 1, 3
|
| 232 |
+
|
| 233 |
+
[18] Zhiwei Deng, Karthik Narasimhan, and Olga Russakovsky. Evolving graphical planner: Contextual global planning for vision-and-language navigation. In Advances in Neural Information Processing Systems, volume 33, 2020. 1, 3, 9
|
| 234 |
+
|
| 235 |
+
[19] Hanqing Wang, Wenguan Wang, Wei Liang, Caiming Xiong, and Jianbing Shen. Structured scene memory for vision-language navigation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8455–8464, 2021. 1, 3
|
| 236 |
+
|
| 237 |
+
[20] Xiujun Li, Chunyuan Li, Qiaolin Xia, Yonatan Bisk, Asli Celikyilmaz, Jianfeng Gao, Noah A Smith, and Yejin Choi. Robust navigation with language pretraining and stochastic sampling. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 1494–1499, 2019. 2, 3, 9
|
| 238 |
+
|
| 239 |
+
[21] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171–4186, 2019. 2, 3, 4 [22] Weituo Hao, Chunyuan Li, Xiujun Li, Lawrence Carin, and Jianfeng Gao. Towards learning a generic agent for vision-and-language navigation via pre-training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13137–13146, 2020. 2, 3, 5, 7, 9, 10
|
| 240 |
+
|
| 241 |
+
[23] Marc’Aurelio Ranzato, Sumit Chopra, Michael Auli, and Wojciech Zaremba. Sequence level training with recurrent neural networks. International Conference on Learning Representations, 2016. 2
|
| 242 |
+
|
| 243 |
+
[24] Stéphane Ross, Geoffrey Gordon, and Drew Bagnell. A reduction of imitation learning and structured prediction to no-regret online learning. In Proceedings of the fourteenth international conference on artificial intelligence and statistics, pages 627–635. JMLR Workshop and Conference Proceedings, 2011. 2
|
| 244 |
+
|
| 245 |
+
[25] Samy Bengio, Oriol Vinyals, Navdeep Jaitly, and Noam Shazeer. Scheduled sampling for sequence prediction with recurrent neural networks. In Advances in Neural Information Processing Systems, volume 28, 2015. 2
|
| 246 |
+
|
| 247 |
+
[26] Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018. 2
|
| 248 |
+
|
| 249 |
+
[27] Emilio Parisotto, Francis Song, Jack Rae, Razvan Pascanu, Caglar Gulcehre, Siddhant Jayakumar, Max Jaderberg, Raphael Lopez Kaufman, Aidan Clark, Seb Noury, et al. Stabilizing transformers for reinforcement learning. In International Conference on Machine Learning, pages 7487–7498. PMLR, 2020. 2, 5
|
| 250 |
+
|
| 251 |
+
[28] 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. 2, 3, 6
|
| 252 |
+
|
| 253 |
+
[29] Mohit Shridhar, Jesse Thomason, Daniel Gordon, Yonatan Bisk, Winson Han, Roozbeh Mottaghi, Luke Zettlemoyer, and Dieter Fox. Alfred: A benchmark for interpreting grounded instructions for everyday tasks. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 10740–10749, 2020. 2
|
| 254 |
+
|
| 255 |
+
[30] Hu Wang, Qi Wu, and Chunhua Shen. Soft expert reward learning for vision-and-language navigation. In Computer Vision–ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part IX 16, pages 126–141. Springer, 2020. 3
|
| 256 |
+
|
| 257 |
+
[31] 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, pages 5998–6008, 2017. 3
|
| 258 |
+
|
| 259 |
+
[32] Federico Landi, Lorenzo Baraldi, Marcella Cornia, Massimiliano Corsini, and Rita Cucchiara. Perceive, transform, and act: Multi-modal attention networks for vision-and-language navigation. arXiv preprint arXiv:1911.12377, 2019. 3, 9
|
| 260 |
+
|
| 261 |
+
[33] 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. 3
|
| 262 |
+
|
| 263 |
+
[34] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. 3
|
| 264 |
+
|
| 265 |
+
[35] Saurabh Gupta, James Davidson, Sergey Levine, Rahul Sukthankar, and Jitendra Malik. Cognitive mapping and planning for visual navigation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2616–2625, 2017. 3
|
| 266 |
+
|
| 267 |
+
[36] Nikolay Savinov, Alexey Dosovitskiy, and Vladlen Koltun. Semi-parametric topological memory for navigation. International Conference on Learning Representations, 2018. 3
|
| 268 |
+
|
| 269 |
+
[37] Alexander Pashevich, Cordelia Schmid, and Chen Sun. Episodic transformer for vision-andlanguage navigation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 15942–15952, 2021. 3, 4
|
| 270 |
+
|
| 271 |
+
[38] Yen-Chun Chen, Linjie Li, Licheng Yu, Ahmed El Kholy, Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu. Uniter: Universal image-text representation learning. In European Conference on Computer Vision, pages 104–120. Springer, 2020. 3
|
| 272 |
+
|
| 273 |
+
[39] Xiujun Li, Xi Yin, Chunyuan Li, Pengchuan Zhang, Xiaowei Hu, Lei Zhang, Lijuan Wang, Houdong Hu, Li Dong, Furu Wei, et al. Oscar: Object-semantics aligned pre-training for vision-language tasks. In European Conference on Computer Vision, pages 121–137. Springer, 2020. 3
|
| 274 |
+
|
| 275 |
+
[40] Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. ViLBERT: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. In Advances in Neural Information Processing Systems, volume 32, 2019. 3, 5
|
| 276 |
+
|
| 277 |
+
[41] Hao Tan and Mohit Bansal. LXMERT: Learning cross-modality encoder representations from transformers. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 5103–5114, 2019. 3
|
| 278 |
+
|
| 279 |
+
[42] Wonjae Kim, Bokyung Son, and Ildoo Kim. Vilt: Vision-and-language transformer without convolution or region supervision. In Proceedings of the 38th International Conference on Machine Learning, pages 5583–5594, 2021. 3
|
| 280 |
+
|
| 281 |
+
[43] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth $1 6 \times 1 6$ words: Transformers for image recognition at scale. International Conference on Learning Representations, 2020. 3, 7
|
| 282 |
+
|
| 283 |
+
[44] Arjun Majumdar, Ayush Shrivastava, Stefan Lee, Peter Anderson, Devi Parikh, and Dhruv Batra. Improving vision-and-language navigation with image-text pairs from the web. In European Conference on Computer Vision, pages 259–274. Springer, 2020. 3, 4, 5
|
| 284 |
+
|
| 285 |
+
[45] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. 4
|
| 286 |
+
|
| 287 |
+
[46] Anurag Arnab, Mostafa Dehghani, Georg Heigold, Chen Sun, Mario Luciˇ c, and Cordelia ´ Schmid. Vivit: A video vision transformer. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6836–6846, 2021. 4
|
| 288 |
+
|
| 289 |
+
[47] Jize Cao, Zhe Gan, Yu Cheng, Licheng Yu, Yen-Chun Chen, and Jingjing Liu. Behind the scene: Revealing the secrets of pre-trained vision-and-language models. In European Conference on Computer Vision, pages 565–580. Springer, 2020. 5
|
| 290 |
+
[48] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. ImageNet: A largescale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248–255. IEEE, 2009. 6
|
| 291 |
+
[49] Angel Chang, Angela Dai, Thomas Funkhouser, Maciej Halber, Matthias Niebner, Manolis Savva, Shuran Song, Andy Zeng, and Yinda Zhang. Matterport3d: Learning from rgb-d data in indoor environments. In 2017 International Conference on 3D Vision (3DV), pages 667–676. IEEE, 2017. 6
|
| 292 |
+
[50] Gabriel Ilharco, Vihan Jain, Alexander Ku, Eugene Ie, and Jason Baldridge. General evaluation for instruction conditioned navigation using dynamic time warping. In Visually Grounded Interaction and Language (ViGIL), NeurIPS 2019 Workshop, 2019. 7
|
| 293 |
+
[51] Fengda Zhu, Yi Zhu, Xiaojun Chang, and Xiaodan Liang. Vision-language navigation with self-supervised auxiliary reasoning tasks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10012–10022, 2020. 9
|
| 294 |
+
[52] Ayush Shrivastava, Karthik Gopalakrishnan, Yang Liu, Robinson Piramuthu, Gokhan Tür, Devi Parikh, and Dilek Hakkani-Tür. Visitron: Visual semantics-aligned interactively trained object-navigator. arXiv preprint arXiv:2105.11589, 2021. 10
|
| 295 |
+
[53] Xin Eric Wang, Vihan Jain, Eugene Ie, William Yang Wang, Zornitsa Kozareva, and Sujith Ravi. Environment-agnostic multitask learning for natural language grounded navigation. In Computer Vision–ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part XXIV 16, pages 413–430. Springer, 2020. 10
|
| 296 |
+
[54] Jacob Krantz, Erik Wijmans, Arjun Majumdar, Dhruv Batra, and Stefan Lee. Beyond the navgraph: Vision-and-language navigation in continuous environments. In European Conference on Computer Vision, pages 104–120. Springer, 2020. 10
|
parse/train/SQxuiYf2TT/SQxuiYf2TT_content_list.json
ADDED
|
@@ -0,0 +1,1552 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "History Aware Multimodal Transformer for Vision-and-Language Navigation ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
235,
|
| 8 |
+
122,
|
| 9 |
+
764,
|
| 10 |
+
174
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Shizhe Chen, Pierre-Louis Guhur, Cordelia Schmid, Ivan Laptev ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
269,
|
| 19 |
+
224,
|
| 20 |
+
725,
|
| 21 |
+
241
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Inria, École normale supérieure, CNRS, PSL Research University {shizhe.chen, pierre-louis.guhur, cordelia.schmid, ivan.laptev}@inria.fr ",
|
| 28 |
+
"bbox": [
|
| 29 |
+
214,
|
| 30 |
+
244,
|
| 31 |
+
769,
|
| 32 |
+
277
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "https://cshizhe.github.io/projects/vln_hamt.html ",
|
| 39 |
+
"bbox": [
|
| 40 |
+
310,
|
| 41 |
+
281,
|
| 42 |
+
684,
|
| 43 |
+
295
|
| 44 |
+
],
|
| 45 |
+
"page_idx": 0
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "text",
|
| 49 |
+
"text": "Abstract ",
|
| 50 |
+
"text_level": 1,
|
| 51 |
+
"bbox": [
|
| 52 |
+
462,
|
| 53 |
+
330,
|
| 54 |
+
535,
|
| 55 |
+
347
|
| 56 |
+
],
|
| 57 |
+
"page_idx": 0
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "Vision-and-language navigation (VLN) aims to build autonomous visual agents that follow instructions and navigate in real scenes. To remember previously visited locations and actions taken, most approaches to VLN implement memory using recurrent states. Instead, we introduce a History Aware Multimodal Transformer (HAMT) to incorporate a long-horizon history into multimodal decision making. HAMT efficiently encodes all the past panoramic observations via a hierarchical vision transformer (ViT), which first encodes individual images with ViT, then models spatial relation between images in a panoramic observation and finally takes into account temporal relation between panoramas in the history. It, then, jointly combines text, history and current observation to predict the next action. We first train HAMT end-to-end using several proxy tasks including single step action prediction and spatial relation prediction, and then use reinforcement learning to further improve the navigation policy. HAMT achieves new state of the art on a broad range of VLN tasks, including VLN with fine-grained instructions (R2R, RxR), high-level instructions (R2R-Last, REVERIE), dialogs (CVDN) as well as long-horizon VLN (R4R, R2R-Back). We demonstrate HAMT to be particularly effective for navigation tasks with longer trajectories. ",
|
| 62 |
+
"bbox": [
|
| 63 |
+
233,
|
| 64 |
+
364,
|
| 65 |
+
766,
|
| 66 |
+
601
|
| 67 |
+
],
|
| 68 |
+
"page_idx": 0
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"type": "text",
|
| 72 |
+
"text": "1 Introduction ",
|
| 73 |
+
"text_level": 1,
|
| 74 |
+
"bbox": [
|
| 75 |
+
176,
|
| 76 |
+
633,
|
| 77 |
+
310,
|
| 78 |
+
651
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "Vision-and-language navigation (VLN) has recently received growing attention [1, 2, 3, 4, 5]. VLN requires an agent to understand natural language instructions, perceive the visual world, and perform navigation actions to arrive at a target location. A number of datasets have been proposed to support various VLN tasks such as indoor and outdoor navigation with fine-grained instructions [2, 6, 7], language-driven remote object finding [8] and navigation in dialogs [9]. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
667,
|
| 88 |
+
825,
|
| 89 |
+
738
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "VLN agents are faced with several challenges. First, as opposed to static vision-text grounding [10], the agent continuously receives new visual observations and should align them with instructions. Most of existing works adopt recurrent neural networks (RNNs) [6, 11, 12, 13, 14, 15, 16] to encode historical observations and actions within a fixed-size state vector to predict the next action. Such condensed states might be sub-optimal for capturing essential information in extended trajectories [17]. For instance, “bring the spoon to me” requires the agent to remember its start location after navigating to the “spoon”, while early memories are prone to fade in the recurrent state. Few endeavors [18, 19] construct external map-like memories for received observations. Nevertheless, these approaches still rely on RNNs to track the navigation state. As the history plays an important role in environment understanding and instruction grounding, we propose to explicitly encode the history as a sequence of previous actions and observations instead of using recurrent states. ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
744,
|
| 99 |
+
825,
|
| 100 |
+
896
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "image",
|
| 106 |
+
"img_path": "images/8088d9ea522a9643536813b424f02cbf27fbdd26bde429fa0535d632ce8acea5.jpg",
|
| 107 |
+
"image_caption": [
|
| 108 |
+
"Figure 1: The architecture of History Aware Multimodal Tranformer (HAMT). HAMT jointly encodes textual instruction, full history of previous observations and actions, and current observation to predict the next action. "
|
| 109 |
+
],
|
| 110 |
+
"image_footnote": [],
|
| 111 |
+
"bbox": [
|
| 112 |
+
179,
|
| 113 |
+
88,
|
| 114 |
+
821,
|
| 115 |
+
303
|
| 116 |
+
],
|
| 117 |
+
"page_idx": 1
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "text",
|
| 121 |
+
"text": "Another VLN challenge concerns the generalizations of agents to new environments that have not been observed during training [4]. One direction is to learn more generic text-image representations. The PRESS model [20] improves language representation with a pretrained BERT encoder [21], and PREVALENT [22] uses pairs of instruction and single-step observations to pretrain a multimodal transformer. Though achieved promising results, these works do not optimize visual representation for the target navigation task. Moreover, lack of history in training [22] makes it hard to learn cross-modal alignment and increases the risk of overfitting to training environments. Another direction towards better generalization is to overcome exposure bias [23] due to discrepancy between training and inference. Different methods have been adopted for VLN including DAgger [6, 24] and scheduled sampling [20, 25]. Reinforcement Learning (RL) [12, 26] is one of the most effective approach among them, but it is considered unstable to directly train large-scale transformers via RL [27]. ",
|
| 122 |
+
"bbox": [
|
| 123 |
+
174,
|
| 124 |
+
363,
|
| 125 |
+
825,
|
| 126 |
+
516
|
| 127 |
+
],
|
| 128 |
+
"page_idx": 1
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "text",
|
| 132 |
+
"text": "To address the above challenges, we propose the History Aware Multimodal Transformer (HAMT), a fully transformer-based architecture for multimodal decision making in VLN tasks. As illustrated in Figure 1, HAMT consists of unimodal transformers for text, history and observation encoding, and a cross-modal transformer to capture long-range dependencies of the history sequence, current observation and instruction. Since our history contains a sequence of all previous observations, its encoding is computationally expensive. To resolve complexity issues, we propose a hierarchical vision transformer as shown in Figure 2, which progressively learns representations for a single view, spatial relationships among views within a panorama and, finally, the temporal dynamics across panoramas of the history. In order to learn better visual representations, we propose auxiliary proxy tasks for end-to-end training. Such tasks include single-step action prediction based on imitation learning, self-supervised spatial relationship reasoning, masked language and image predictions and instructiontrajectory matching. We empirically show that our training facilitates the subsequent fine-tuning of our model with RL [28]. We carry out extensive experiments on various VLN tasks, including VLN with fine-grained instructions (R2R [6] and RxR [7]), high-level instructions (REVERIE [8] and our proposed R2R-Last), dialogs [9] as well as long-horizon VLN (R4R [3] and our proposed R2R-Back which requires the agent to return back after arriving at the target location). HAMT outperforms state of the art on both seen and unseen environments in all the tasks. ",
|
| 133 |
+
"bbox": [
|
| 134 |
+
174,
|
| 135 |
+
522,
|
| 136 |
+
825,
|
| 137 |
+
757
|
| 138 |
+
],
|
| 139 |
+
"page_idx": 1
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"type": "text",
|
| 143 |
+
"text": "We summarize our contributions as follows: (1) We introduce HAMT to efficiently model longhorizon history of observed panoramas and actions via hierarchical vision transformer; (2) We train HAMT with auxiliary proxy tasks in an end-to-end fashion and use RL to improve the navigation policy; (3) We validate our method and outperform state of the art in a diverse range of VLN tasks, while demonstrating larger gains for long-horizon navigation. ",
|
| 144 |
+
"bbox": [
|
| 145 |
+
174,
|
| 146 |
+
763,
|
| 147 |
+
825,
|
| 148 |
+
833
|
| 149 |
+
],
|
| 150 |
+
"page_idx": 1
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"type": "text",
|
| 154 |
+
"text": "2 Related work ",
|
| 155 |
+
"text_level": 1,
|
| 156 |
+
"bbox": [
|
| 157 |
+
174,
|
| 158 |
+
852,
|
| 159 |
+
316,
|
| 160 |
+
868
|
| 161 |
+
],
|
| 162 |
+
"page_idx": 1
|
| 163 |
+
},
|
| 164 |
+
{
|
| 165 |
+
"type": "text",
|
| 166 |
+
"text": "Vision-and-language navigation. Training instruction-following navigation agents has attracted increasing research attention [1, 2, 6, 7, 8, 29]. Anderson et al. [6] propose a sequence-to-sequence ",
|
| 167 |
+
"bbox": [
|
| 168 |
+
174,
|
| 169 |
+
883,
|
| 170 |
+
821,
|
| 171 |
+
911
|
| 172 |
+
],
|
| 173 |
+
"page_idx": 1
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"type": "image",
|
| 177 |
+
"img_path": "images/f95db40e379879098370573be460223b66f2812aab26a8183d127dd8e2fbcf97.jpg",
|
| 178 |
+
"image_caption": [
|
| 179 |
+
"(a) Hierarchical vision transformer for history encoding.(a) Hierarchical history encoding. It first encodes individual view imagesViT, then models the spatial relation between images in each panorama, and finally capture the temporal relation between panoramas in the history. ViT, then models the spatial relation between images in each panorama, and finally capture the (c) with ViT, then models the spatial relation between images in each panorama,temporal relation between panoramas in the history. co and finally captures the temporal relation between panoramas in the history. po ",
|
| 180 |
+
"(c) Temporal-only history encoonly considers temporal relation of only considers temporal relation of Temporal-only history enagent’s oriented images in the history.ding. It only considers temral relation of oriented views. "
|
| 181 |
+
],
|
| 182 |
+
"image_footnote": [],
|
| 183 |
+
"bbox": [
|
| 184 |
+
171,
|
| 185 |
+
90,
|
| 186 |
+
825,
|
| 187 |
+
263
|
| 188 |
+
],
|
| 189 |
+
"page_idx": 2
|
| 190 |
+
},
|
| 191 |
+
{
|
| 192 |
+
"type": "text",
|
| 193 |
+
"text": "Figure 2: A comparison of history encoding methods. Circle nodes in different colors denote view images of panorama at different steps. Darker circle nodes are the oriented view of the agent. ",
|
| 194 |
+
"bbox": [
|
| 195 |
+
173,
|
| 196 |
+
315,
|
| 197 |
+
823,
|
| 198 |
+
343
|
| 199 |
+
],
|
| 200 |
+
"page_idx": 2
|
| 201 |
+
},
|
| 202 |
+
{
|
| 203 |
+
"type": "text",
|
| 204 |
+
"text": "LSTM baseline for the VLN task. Fried et al. [11] extend it with panoramic action space and synthesized instructions. To improve cross-modal alignment, the self-monitoring agent [13] proposes co-grounding and progress estimation, and RelGraph [15] uses graphs to model relationships across scene, objects and directions. Reinforcement learning (RL) is typically used to improve navigation policy. The EnvDrop model [12] mixes imitation learning and A3C [28]. The RCM [14] utilizes intrinsic reward of cross-modal matching in REINFORCE algorithm. Wang et al. [30] propose to learn rewards via soft expert distillation. Due to the success of transformer [31], recent works explore transformer architectures in VLN. PRESS [20] replaces LSTM instruction encoder with pretrained BERT [21]. SIA [16] uses transformer for single-step multimodal fusion and LSTM for sequential action prediction. PTA [32] is a transformer VLN model using CNNs to extract visual features [33]. Here we propose the first full transformer architecture for VLN and train it end-to-end. ",
|
| 205 |
+
"bbox": [
|
| 206 |
+
174,
|
| 207 |
+
372,
|
| 208 |
+
825,
|
| 209 |
+
525
|
| 210 |
+
],
|
| 211 |
+
"page_idx": 2
|
| 212 |
+
},
|
| 213 |
+
{
|
| 214 |
+
"type": "text",
|
| 215 |
+
"text": "Memory-based policy for navigation. LSTMs [34] have been the dominant approach to encode memories for navigation [6, 11, 12, 14]. Condensing all history into one feature vector, however, is prone to the loss of information. Alternative approaches include topological map memory structures [35, 36]. Deng et al. [18] use graphs to capture environment layout and enable long-term planing. A similar graph is adopted in [19] with frontier-exploration based decision making. But these works still utilize LSTMs for state tracking. To exploit long-term spatio-temporal dependencies, Fang et al. [17] store histories in a sequence encoded with transformer. Recurrent VLN-BERT [5] injects a recurrent unit to encode histories in transformer for VLN. The most similar work to ours is Episodic Transformer (E.T.) [37]. Differently from [37], we propose a hierarchical encoding of the panoramic observation history and optimize the whole model in end-to-end training. ",
|
| 216 |
+
"bbox": [
|
| 217 |
+
174,
|
| 218 |
+
531,
|
| 219 |
+
825,
|
| 220 |
+
670
|
| 221 |
+
],
|
| 222 |
+
"page_idx": 2
|
| 223 |
+
},
|
| 224 |
+
{
|
| 225 |
+
"type": "text",
|
| 226 |
+
"text": "Multimodal pretraining with transformers. Recent works show significant progress in vision and language tasks using multimodal pretraining. In particular, transformer architectures such as one-stream [38, 39] and dual-stream [40, 41] achieve state of the art for a number of downstream tasks including visual question answering, image-text retrieval and image captioning. While most previous methods rely on CNN to extract image representations, ViLT [42] adopts Vision Transformer (ViT) [43] and trains it with associated texts in an end-to-end manner thanks to the efficiency of ViT. A few endeavors [22, 44] explore multimodal pretraining for VLN. PREVALENT [22] pretrains a transformer using instructions and single-step observations without referring to trajectory history. VLN-BERT [44] measures the compatibility between an instruction and images in a path but does not support action prediction. Our work presents the first end-to-end trainable VLN transformer that jointly encodes text, history and observation, and is able to sequentially predict actions. ",
|
| 227 |
+
"bbox": [
|
| 228 |
+
173,
|
| 229 |
+
676,
|
| 230 |
+
825,
|
| 231 |
+
829
|
| 232 |
+
],
|
| 233 |
+
"page_idx": 2
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"type": "text",
|
| 237 |
+
"text": "3 Method ",
|
| 238 |
+
"text_level": 1,
|
| 239 |
+
"bbox": [
|
| 240 |
+
174,
|
| 241 |
+
849,
|
| 242 |
+
269,
|
| 243 |
+
867
|
| 244 |
+
],
|
| 245 |
+
"page_idx": 2
|
| 246 |
+
},
|
| 247 |
+
{
|
| 248 |
+
"type": "text",
|
| 249 |
+
"text": "Problem definition The VLN problem [6] is formulated as a partially observable Markov decision process, where future observations are independent of the past conditioning on current state $s _ { t }$ . Given an instruction $\\mathcal { W }$ containing a sequence of $L$ words $( w _ { 1 } , w _ { 2 } , \\cdot \\cdot \\cdot , w _ { L } )$ , an agent should follow the instruction to move in a connectivity graph to reach the goal location. At each step $t$ , the agent receives an observation ${ \\mathcal { O } } _ { t }$ , a panorama of its surrounding environment. The ${ \\mathcal { O } } _ { t }$ consists of $K$ single view images split from the panorama $\\mathcal { O } _ { t } \\triangleq \\left( [ v _ { 1 } ^ { o } ; a _ { 1 } ^ { o } ] , \\cdot \\cdot \\cdot , [ v _ { K } ^ { o } ; a _ { K } ^ { o } ] \\right)$ , where $v _ { i } ^ { o }$ is the visual feature of the $i$ -th view and $a _ { i } ^ { o }$ denotes the relative angle to face the view (subscript $t$ is omitted for simplicity). There are $n$ navigable viewpoints among all the $K$ views1, denoted as $\\mathcal { O } _ { t } ^ { c } \\triangleq \\left( [ v _ { 1 } ^ { c } ; a _ { 1 } ^ { c } ] , \\cdot \\cdot \\cdot , [ v _ { n } ^ { c } ; a _ { n } ^ { c } ] \\right)$ We follow the setup in [11] and use ${ \\mathcal { O } } _ { t } ^ { c }$ as the decision space, so the agent only needs to select a candidate in ${ \\mathcal { O } } _ { t } ^ { c }$ at each step. All observations $\\mathcal { O } _ { i }$ and performed actions $a _ { i } ^ { h }$ before step $t$ form the history $\\mathcal { H } _ { t } \\triangleq \\left( [ \\mathscr { O } _ { 1 } ; a _ { 1 } ^ { h } ] , \\cdots , [ \\mathscr { O } _ { t - 1 } ; a _ { t - 1 } ^ { h } ] \\right)$ , where $a _ { i } ^ { h }$ denotes the turned angles at step $i$ . The goal is to learn a policy $\\pi$ parametrized by $\\Theta$ to predict the next action based on the instruction, history and the current observation, which is $\\bar { \\pi } ( a _ { t } | \\mathcal { W } , \\mathcal { H } _ { t } , \\mathcal { O } _ { t } , \\mathcal { O } _ { t } ^ { c } ; \\Theta )$ . ",
|
| 250 |
+
"bbox": [
|
| 251 |
+
174,
|
| 252 |
+
883,
|
| 253 |
+
821,
|
| 254 |
+
911
|
| 255 |
+
],
|
| 256 |
+
"page_idx": 2
|
| 257 |
+
},
|
| 258 |
+
{
|
| 259 |
+
"type": "text",
|
| 260 |
+
"text": "",
|
| 261 |
+
"bbox": [
|
| 262 |
+
174,
|
| 263 |
+
90,
|
| 264 |
+
825,
|
| 265 |
+
252
|
| 266 |
+
],
|
| 267 |
+
"page_idx": 3
|
| 268 |
+
},
|
| 269 |
+
{
|
| 270 |
+
"type": "text",
|
| 271 |
+
"text": "Unlike dominant recurrent approaches to condense $\\mathcal { H } _ { t }$ into a fixed-size vector, in this section, we present the History Aware Multimodal Transformer (HAMT) that jointly encodes text, long-horizon history, and observation for sequential action prediction. The model architecture is described in Section 3.1. We propose end-to-end training for HAMT in Section 3.2 to learn unimodal and multimodal representations, and then use RL to fine-tune the navigation policy in Section 3.3. ",
|
| 272 |
+
"bbox": [
|
| 273 |
+
174,
|
| 274 |
+
257,
|
| 275 |
+
825,
|
| 276 |
+
327
|
| 277 |
+
],
|
| 278 |
+
"page_idx": 3
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"type": "text",
|
| 282 |
+
"text": "3.1 HAMT: History Aware Multimodal Transformer ",
|
| 283 |
+
"text_level": 1,
|
| 284 |
+
"bbox": [
|
| 285 |
+
173,
|
| 286 |
+
342,
|
| 287 |
+
552,
|
| 288 |
+
358
|
| 289 |
+
],
|
| 290 |
+
"page_idx": 3
|
| 291 |
+
},
|
| 292 |
+
{
|
| 293 |
+
"type": "text",
|
| 294 |
+
"text": "Figure 1 illustrates the model architecture of HAMT. The inputs text $\\mathcal { W }$ , history $\\mathcal { H } _ { t }$ and observation ${ \\mathcal { O } } _ { t }$ are first encoded via the corresponding unimodal transformers respectively, and then fed into the cross-modal transformer encoder to capture multimodal relationships. ",
|
| 295 |
+
"bbox": [
|
| 296 |
+
174,
|
| 297 |
+
367,
|
| 298 |
+
823,
|
| 299 |
+
410
|
| 300 |
+
],
|
| 301 |
+
"page_idx": 3
|
| 302 |
+
},
|
| 303 |
+
{
|
| 304 |
+
"type": "text",
|
| 305 |
+
"text": "Text Encoding. For each token $i$ in the instruction $\\mathcal { W }$ , we embed it as the summation of its word embedding $w _ { i }$ , position embedding $E _ { i } ^ { P }$ and type embedding of text $E _ { 0 } ^ { T }$ . Then we employ a transformer with $N _ { L }$ layers to obtain contextual representation $x _ { i }$ following the standard BERT [21]. ",
|
| 306 |
+
"bbox": [
|
| 307 |
+
173,
|
| 308 |
+
416,
|
| 309 |
+
823,
|
| 310 |
+
458
|
| 311 |
+
],
|
| 312 |
+
"page_idx": 3
|
| 313 |
+
},
|
| 314 |
+
{
|
| 315 |
+
"type": "text",
|
| 316 |
+
"text": "Observation Encoding. For each view $[ v _ { i } ^ { o } ; a _ { i } ^ { o } ]$ in the panoramic observation ${ \\mathcal { O } } _ { t }$ , we first represent the relative angle $a _ { i } ^ { o }$ as $E _ { a _ { i } ^ { o } } ^ { A } = ( \\sin \\theta _ { i } , \\cos \\theta _ { i } , \\sin \\phi _ { i } , \\cos \\phi _ { i } )$ where $\\theta _ { i }$ and $\\phi _ { i }$ are the relative heading and elevation angle to the agent’s orientation. Then the observation embedding $o _ { i }$ is as follows: ",
|
| 317 |
+
"bbox": [
|
| 318 |
+
174,
|
| 319 |
+
463,
|
| 320 |
+
825,
|
| 321 |
+
510
|
| 322 |
+
],
|
| 323 |
+
"page_idx": 3
|
| 324 |
+
},
|
| 325 |
+
{
|
| 326 |
+
"type": "equation",
|
| 327 |
+
"img_path": "images/c7e8523f63f968da00cd477c29cf0e5315cb13a3c3b842369ba3f3bf77476e10.jpg",
|
| 328 |
+
"text": "$$\no _ { i } = \\mathrm { L N } ( W _ { v } ^ { o } v _ { i } ^ { o } ) + \\mathrm { L N } ( W _ { a } ^ { o } E _ { a _ { i } ^ { o } } ^ { A } ) + E _ { o _ { i } } ^ { N } + E _ { 1 } ^ { T }\n$$",
|
| 329 |
+
"text_format": "latex",
|
| 330 |
+
"bbox": [
|
| 331 |
+
344,
|
| 332 |
+
515,
|
| 333 |
+
653,
|
| 334 |
+
535
|
| 335 |
+
],
|
| 336 |
+
"page_idx": 3
|
| 337 |
+
},
|
| 338 |
+
{
|
| 339 |
+
"type": "text",
|
| 340 |
+
"text": "where $W _ { v } ^ { o } , W _ { a } ^ { o }$ are learnable weights. The $E _ { o _ { i } } ^ { N }$ denotes the navigable embedding to differentiate types of views, with $E _ { 0 } ^ { N }$ for non-navigable view, $E _ { 1 } ^ { N }$ for navigable view and $E _ { 2 } ^ { N }$ for stop view (we append a stop token in observation to support stop action). The $E _ { 1 } ^ { T }$ is the type embedding of observation. We omit bias terms for simplicity. The LN denotes layer normalization [45]. Because $a _ { i } ^ { o }$ has much lower feature dimensions than $v _ { i } ^ { o }$ , we apply LN to balance the encoded $a _ { i } ^ { o }$ and $v _ { i } ^ { o }$ . ",
|
| 341 |
+
"bbox": [
|
| 342 |
+
174,
|
| 343 |
+
540,
|
| 344 |
+
825,
|
| 345 |
+
614
|
| 346 |
+
],
|
| 347 |
+
"page_idx": 3
|
| 348 |
+
},
|
| 349 |
+
{
|
| 350 |
+
"type": "text",
|
| 351 |
+
"text": "Hierarchical History Encoding. As $\\mathcal { H } _ { t }$ consists of all the past panoramic observations $\\mathcal { O } _ { i }$ and performed actions $a _ { i } ^ { h }$ before step $t .$ , it is important to encode $\\mathcal { H } _ { t }$ efficiently as context. Figures 2b-2c depict the flattened and temporal-only history encoding approaches used in VLN-BERT [44] and E.T. [37] respectively. The flattened approach treats each view image in $\\mathcal { O } _ { i }$ as a token, so the history sequence contains $t K$ tokens. Though it enables to learn relationships among all image views, the computation cost quadratically increases with the sequence length, making it inefficient for long-horizon tasks. In the temporal-only approach, only the oriented view of the agent in each $\\mathcal { O } _ { i }$ is taken as inputs instead of the whole panorama, so only $t$ temporal tokens are encoded. However, this approach can lose critical information in past observations. For example, in the instruction “with the windows on your left, walk through the large room past the sitting areas”, the object “window” does not appear in the oriented view of the agent. Therefore, the encoded history is insufficient to tell whether the agent passed the window or not, making the model confused to take the next action. ",
|
| 352 |
+
"bbox": [
|
| 353 |
+
173,
|
| 354 |
+
619,
|
| 355 |
+
825,
|
| 356 |
+
786
|
| 357 |
+
],
|
| 358 |
+
"page_idx": 3
|
| 359 |
+
},
|
| 360 |
+
{
|
| 361 |
+
"type": "text",
|
| 362 |
+
"text": "In order to balance computational efficiency and information integrity, we propose a hierarchical history encoding approach as illustrated in Figure 2a. It hierarchically encodes view images within each panorama and then temporal relationships across panoramas, similar to the factorized spatialtemporal video transformer [46]. For each $\\mathcal { O } _ { i }$ , its constituent view images are first embeded via ViT and Eq (1), and then encoded via a panoramic transformer with $N _ { h }$ layers to learn spatial relationships within the panorama. We apply average pooling to obtain panorama embedding, and add it with the oriented view image feature in residual connection. The parameters in ViT and panoramic transformer are shared for different steps. In this way, each historical observation $\\mathcal { O } _ { i }$ is represented as $v _ { i } ^ { h }$ , and the final temporal token $h _ { i }$ is computed as: ",
|
| 363 |
+
"bbox": [
|
| 364 |
+
173,
|
| 365 |
+
792,
|
| 366 |
+
825,
|
| 367 |
+
876
|
| 368 |
+
],
|
| 369 |
+
"page_idx": 3
|
| 370 |
+
},
|
| 371 |
+
{
|
| 372 |
+
"type": "table",
|
| 373 |
+
"img_path": "images/29292010d952a0d9ce5d572fec3b4a340fdce016aaa1facc8c8ba9c309546448.jpg",
|
| 374 |
+
"table_caption": [
|
| 375 |
+
"Table 1: Comparison of HAMT and previous VLN transformers. "
|
| 376 |
+
],
|
| 377 |
+
"table_footnote": [],
|
| 378 |
+
"table_body": "<table><tr><td rowspan=\"2\">Models</td><td colspan=\"4\">Inputs</td><td colspan=\"4\">Proxy Tasks</td></tr><tr><td>Text</td><td>History</td><td>Observation</td><td>MLM</td><td>MRM</td><td>ITM</td><td>SAP/SAR</td><td>SPREL</td></tr><tr><td>PREVALENT [22]</td><td>√</td><td></td><td>√</td><td>√</td><td></td><td></td><td>√</td><td></td></tr><tr><td>VLN-BERT [44]</td><td>√</td><td></td><td></td><td>√</td><td>√</td><td>√</td><td></td><td></td></tr><tr><td>HAMT (Ours)</td><td>√</td><td>√</td><td>√</td><td>√</td><td>√</td><td></td><td>√</td><td>√</td></tr></table>",
|
| 379 |
+
"bbox": [
|
| 380 |
+
183,
|
| 381 |
+
112,
|
| 382 |
+
815,
|
| 383 |
+
190
|
| 384 |
+
],
|
| 385 |
+
"page_idx": 4
|
| 386 |
+
},
|
| 387 |
+
{
|
| 388 |
+
"type": "text",
|
| 389 |
+
"text": "",
|
| 390 |
+
"bbox": [
|
| 391 |
+
176,
|
| 392 |
+
213,
|
| 393 |
+
823,
|
| 394 |
+
256
|
| 395 |
+
],
|
| 396 |
+
"page_idx": 4
|
| 397 |
+
},
|
| 398 |
+
{
|
| 399 |
+
"type": "equation",
|
| 400 |
+
"img_path": "images/758cec4b1dd4b2c903ed7910ed853bcd9d9bcbb200f184ba5ea891652bbfacf6.jpg",
|
| 401 |
+
"text": "$$\nh _ { i } = \\mathrm { L N } ( W _ { v } ^ { h } v _ { i } ^ { h } ) + \\mathrm { L N } ( W _ { a } ^ { h } E _ { a _ { i } ^ { h } } ^ { A } ) + E _ { i } ^ { S } + E _ { 2 } ^ { T }\n$$",
|
| 402 |
+
"text_format": "latex",
|
| 403 |
+
"bbox": [
|
| 404 |
+
341,
|
| 405 |
+
260,
|
| 406 |
+
655,
|
| 407 |
+
281
|
| 408 |
+
],
|
| 409 |
+
"page_idx": 4
|
| 410 |
+
},
|
| 411 |
+
{
|
| 412 |
+
"type": "text",
|
| 413 |
+
"text": "where $E _ { i } ^ { S }$ denotes the $i$ -th step embedding, $E _ { 2 } ^ { T }$ is the type embedding of history. The computational cost is $\\dot { O ( t K ^ { 2 } + t ^ { 2 } ) }$ , which significantly reduces from $\\bar { O ( } t ^ { 2 } K ^ { 2 } )$ in the flattened approach. To be noted, we add a special token $\\boldsymbol { \\left[ c \\mathbf { 1 s } \\right] }$ to the start of the history sequence to obtain a global representation. The embedding of [cls] is a parameter to learn, which is initialized from a zero vector. ",
|
| 414 |
+
"bbox": [
|
| 415 |
+
174,
|
| 416 |
+
286,
|
| 417 |
+
825,
|
| 418 |
+
343
|
| 419 |
+
],
|
| 420 |
+
"page_idx": 4
|
| 421 |
+
},
|
| 422 |
+
{
|
| 423 |
+
"type": "text",
|
| 424 |
+
"text": "Cross-modal Encoding. We concatenate history and observation as the vision modality, and use cross-modal transformer with $N _ { x }$ layers to fuse features from text, history and observation as shown in the right of Figure 1. The reason of using such dual-stream architecture rather than onestream is that the length of different modalities can be highly imbalanced, and the dual-stream architecture can balance the importance of intra- and inter-modal relationships by model design [47]. In each cross-modal layer, a vision-text cross-attention is firstly performed for vision modality to attend relevant text information and vice versa for text modality. Then each modality uses selfattention to learn intra-modal relationship such as interaction between observation and history, followed by a fully-connected neural network. Finally, the HAMT model outputs embeddings $X ^ { ' } = ( x _ { \\mathrm { c l s } } ^ { \\prime } , x _ { 1 } ^ { \\prime } , \\cdots , x _ { L } ^ { \\prime } ) , H _ { t } ^ { ' } = ( h _ { \\mathrm { c l s } } ^ { \\prime } , h _ { 1 } ^ { \\prime } , \\cdots , h _ { t - 1 } ^ { \\prime } ) , \\dot { O _ { t } } = ( o _ { 1 } ^ { \\prime } , \\cdots , o _ { K } ^ { \\prime } , o _ { \\mathrm { s t o p } } ^ { \\prime } )$ for tokens in text, history and observation respectively. ",
|
| 425 |
+
"bbox": [
|
| 426 |
+
173,
|
| 427 |
+
348,
|
| 428 |
+
826,
|
| 429 |
+
503
|
| 430 |
+
],
|
| 431 |
+
"page_idx": 4
|
| 432 |
+
},
|
| 433 |
+
{
|
| 434 |
+
"type": "text",
|
| 435 |
+
"text": "3.2 End-to-end training with proxy tasks ",
|
| 436 |
+
"text_level": 1,
|
| 437 |
+
"bbox": [
|
| 438 |
+
176,
|
| 439 |
+
518,
|
| 440 |
+
470,
|
| 441 |
+
534
|
| 442 |
+
],
|
| 443 |
+
"page_idx": 4
|
| 444 |
+
},
|
| 445 |
+
{
|
| 446 |
+
"type": "text",
|
| 447 |
+
"text": "As it is difficult to train large-scale transformers with RL due to sparse supervision [27], we propose to first end-to-end train HAMT via several proxy tasks to learn unimodal and multimodal representation. ",
|
| 448 |
+
"bbox": [
|
| 449 |
+
176,
|
| 450 |
+
544,
|
| 451 |
+
823,
|
| 452 |
+
573
|
| 453 |
+
],
|
| 454 |
+
"page_idx": 4
|
| 455 |
+
},
|
| 456 |
+
{
|
| 457 |
+
"type": "text",
|
| 458 |
+
"text": "Table 1 compares our HAMT with previous VLN transformers PREVALENT [22] and VLNBERT [44] in inputs and proxy tasks. As neither PREVALENT nor VLN-BERT jointly encodes text, history and observation, a limited choice of proxy tasks can be applied in training. Our model instead can take advantage of various proxy tasks to learn cross-modal alignment, spatial and temporal reasoning, and history-aware action prediction. Given the input pair $( \\mathcal { W } , \\mathcal { H } _ { T } )$ where $T$ is the length of full trajectory, we can apply common proxy tasks as in vision-and-language pretraining [40, 44], including Masked Language Modeling (MLM), Masked Region Modeling (MRM) and Instruction Trajectory Matching (ITM). Details of the three proxy tasks are presented in the supplementary material. In the following, we introduce new proxy tasks given the triplet input $( \\mathcal { W } , \\mathcal { H } _ { t } , \\mathcal { O } _ { t } )$ specifically for VLN tasks. ",
|
| 459 |
+
"bbox": [
|
| 460 |
+
173,
|
| 461 |
+
578,
|
| 462 |
+
826,
|
| 463 |
+
717
|
| 464 |
+
],
|
| 465 |
+
"page_idx": 4
|
| 466 |
+
},
|
| 467 |
+
{
|
| 468 |
+
"type": "text",
|
| 469 |
+
"text": "Single-step Action Prediction/Regression (SAP/SAR). The task deploys imitation learning to predict the next action based on instruction, history from expert demonstration and the current observation. We formulate it as a classification and a regression task respectively. In the SAP classification task, we predict action probability for each navigable view in $\\mathcal { O } _ { t } ^ { c }$ which is $\\begin{array} { r } { p _ { t } ( o _ { i } ^ { \\prime } ) = \\frac { \\exp ( f _ { \\mathrm { S A P } } ( o _ { i } ^ { \\prime } \\odot x _ { \\mathrm { c l s } } ^ { \\prime } ) ) } { \\sum _ { j } \\exp ( f _ { \\mathrm { S A P } } ( o _ { j } ^ { \\prime } \\odot x _ { \\mathrm { c l s } } ^ { \\prime } ) ) } } \\end{array}$ , where $f _ { \\mathrm { S A P } }$ is a two-layer fully-connected network, $\\odot$ is element-wise multiplication and $x _ { \\mathrm { c l s } } ^ { \\prime }$ is output embedding of special text token [cls]. The objective is to minimize negative log probability of the target view action $o _ { * } ^ { \\prime }$ : $L _ { \\mathrm { S A P } } = - { \\log { p _ { t } ( o _ { * } ^ { \\prime } ) } }$ . In SAR regression task, we directly predict the action heading and elevation angles based on the text token $\\boldsymbol { \\left[ \\mathsf { c } \\mathrm { 1 s } \\right] }$ which is $\\hat { \\theta _ { t } } , \\hat { \\phi _ { t } } = f _ { \\mathrm { S A R } } ( x _ { \\mathrm { c l s } } ^ { \\prime } )$ . The loss function is $L _ { \\mathrm { S A R } } = ( \\hat { \\theta _ { t } } - \\theta _ { t } ) ^ { 2 } + ( \\hat { \\phi _ { t } } - \\phi _ { t } ) ^ { 2 }$ . The two proxy tasks enable the model to learn how to make action decision conditioning on instruction and contextual history. ",
|
| 470 |
+
"bbox": [
|
| 471 |
+
173,
|
| 472 |
+
722,
|
| 473 |
+
826,
|
| 474 |
+
877
|
| 475 |
+
],
|
| 476 |
+
"page_idx": 4
|
| 477 |
+
},
|
| 478 |
+
{
|
| 479 |
+
"type": "text",
|
| 480 |
+
"text": "Spatial Relationship Prediction (SPREL). Expressions of egocentric and allocentric spatial relations are frequent in navigational instructions, such as “walk into the room on your left” and “enter the bedroom next to the stairs”. In order to learn spatial relation aware representations, we propose the SPREL self-supervised task to predict relative spatial position of two views in a panorama based on only visual feature, angle feature or both. Assume $[ v _ { i } ^ { o } ; a _ { i } ^ { o } ]$ and $[ v _ { j } ^ { o } ; a _ { j } ^ { o } ]$ are two views in ${ \\mathcal { O } } _ { t }$ , we randomly zero out $v _ { * } ^ { o }$ or $a _ { * } ^ { o }$ with probability of 0.3. Their encoded representations are $o _ { i } ^ { \\prime }$ and $o _ { j } ^ { \\prime }$ , and their relative heading and elevation angles are $\\theta _ { i j } , \\phi _ { i j }$ . We then predict $\\begin{array} { r } { \\hat { \\theta } _ { i j } , \\hat { \\phi } _ { i j } = f _ { \\mathrm { S P R E L } } ( [ \\hat { o _ { i } ^ { \\prime } } ; o _ { j } ^ { \\prime } ] ) } \\end{array}$ where $[ ; ]$ denotes vector concatenation and optimize $L _ { \\mathrm { S P R E L } } = ( \\hat { \\theta } _ { i j } - \\theta _ { i j } ) ^ { 2 } + ( \\hat { \\phi } _ { i j } - \\phi _ { i j } ) ^ { 2 }$ . The task helps for spatial relationship reasoning in the observation. ",
|
| 481 |
+
"bbox": [
|
| 482 |
+
173,
|
| 483 |
+
882,
|
| 484 |
+
821,
|
| 485 |
+
911
|
| 486 |
+
],
|
| 487 |
+
"page_idx": 4
|
| 488 |
+
},
|
| 489 |
+
{
|
| 490 |
+
"type": "text",
|
| 491 |
+
"text": "",
|
| 492 |
+
"bbox": [
|
| 493 |
+
173,
|
| 494 |
+
90,
|
| 495 |
+
825,
|
| 496 |
+
200
|
| 497 |
+
],
|
| 498 |
+
"page_idx": 5
|
| 499 |
+
},
|
| 500 |
+
{
|
| 501 |
+
"type": "text",
|
| 502 |
+
"text": "Training Strategy. Instead of directly training the whole HAMT model at once, we propose to progressively train HAMT in two stages. In the first stage, we freeze ViT pretrained on ImageNet [48] and train the rest of the modules which are randomly initialized. This aims to avoid catastrophic forgetting of the pretrained weights in ViT. Then we unfreeze ViT and train the whole model end-toend. The learning rate for ViT is set to be higher than for others modules to avoid vanishing gradients and to speedup convergence. We empirically show that the proposed two-stage training outperforms one-stage training in the supplementary material. ",
|
| 503 |
+
"bbox": [
|
| 504 |
+
173,
|
| 505 |
+
205,
|
| 506 |
+
825,
|
| 507 |
+
303
|
| 508 |
+
],
|
| 509 |
+
"page_idx": 5
|
| 510 |
+
},
|
| 511 |
+
{
|
| 512 |
+
"type": "text",
|
| 513 |
+
"text": "3.3 Fine-tuning for sequential action prediction ",
|
| 514 |
+
"text_level": 1,
|
| 515 |
+
"bbox": [
|
| 516 |
+
174,
|
| 517 |
+
321,
|
| 518 |
+
516,
|
| 519 |
+
337
|
| 520 |
+
],
|
| 521 |
+
"page_idx": 5
|
| 522 |
+
},
|
| 523 |
+
{
|
| 524 |
+
"type": "text",
|
| 525 |
+
"text": "Structure Variants. We present two variants of HAMT for action prediction in the following. 1) MLP action head: we directly reuse the action prediction network $f _ { \\mathrm { S A P } }$ in the SAP task to predict navigable views. We use it as default for VLN tasks. 2) MLP action head based on encoder-decoder structure: the original HAMT model applies cross-modal attention for both vision-to-text and text-tovision, which is computationally expensive when instructions are long. Therefore, we remove the cross-modal attention from text to vision. In this way, we separate the cross-modal transformer into an encoder which only takes instruction as input, and a decoder that inputs history and observation as query and attends over encoded text tokens. Please see supplementary material for details. ",
|
| 526 |
+
"bbox": [
|
| 527 |
+
173,
|
| 528 |
+
348,
|
| 529 |
+
825,
|
| 530 |
+
459
|
| 531 |
+
],
|
| 532 |
+
"page_idx": 5
|
| 533 |
+
},
|
| 534 |
+
{
|
| 535 |
+
"type": "text",
|
| 536 |
+
"text": "$\\mathbf { R L + I L }$ Objective. We combine Reinforcement Learning (RL) and Imitation Learning (IL) to finetune HAMT for sequential action prediction. The IL relies on the SAP loss defined in Section 3.2 and follows the expert action at each step while RL samples actions according to the policy $\\pi$ . Specifically, we use the Asynchronous Advantage Actor-Critic (A3C) RL algorithm [28]. At each step $t$ , the agent samples an action based on policy $\\pi \\colon \\hat { a } _ { t } ^ { h } \\sim \\pi ( a _ { t } | \\mathcal { W } , \\mathcal { H } _ { t } , \\mathcal { O } _ { t } , \\bar { \\mathcal { O } } _ { t } ^ { c } )$ and receives an immediate reward $r _ { t }$ . For non-stop actions, we set $r _ { t }$ as the reduced distance of taking the action to the target and the increased alignment score [3] compared to expert demonstration as defined in [5]; for the stop action, to estiimplem $r _ { t } = 2$ arrives which is . As the $^ { - 2 }$ ritic network is trainedis discount factor. Weistance, we empirically $s _ { t }$ $\\begin{array} { r } { R _ { t } = \\dot { \\sum _ { k = 0 } ^ { T - t } } \\gamma ^ { k } r _ { t + k } } \\end{array}$ $\\gamma$ \n$V _ { t } = f _ { \\mathrm { c r i t i c } } ( x _ { \\mathrm { c l s } } ^ { \\prime } \\odot h _ { \\mathrm { c l s } } ^ { \\prime } )$ \nfind it benefits to combine A3C RL with $\\mathrm { I L }$ weighted by $\\lambda$ , which is: ",
|
| 537 |
+
"bbox": [
|
| 538 |
+
173,
|
| 539 |
+
465,
|
| 540 |
+
825,
|
| 541 |
+
621
|
| 542 |
+
],
|
| 543 |
+
"page_idx": 5
|
| 544 |
+
},
|
| 545 |
+
{
|
| 546 |
+
"type": "equation",
|
| 547 |
+
"img_path": "images/69340e6c9029f82fd6bd044485691378764e71035e30b6042fe3126e97d394d7.jpg",
|
| 548 |
+
"text": "$$\n\\Theta \\gets \\Theta + \\underbrace { \\mu \\frac { 1 } { T } \\sum _ { t = 1 } ^ { T } \\nabla \\mathrm { e l o g } \\pi ( \\hat { a } _ { t } ^ { h } ; \\Theta ) ( R _ { t } - V _ { t } ) } _ { \\mathrm { ~ } } + \\underbrace { \\lambda \\mu \\frac { 1 } { T ^ { * } } \\sum _ { t = 1 } ^ { T ^ { * } } \\nabla \\mathrm { e l o g } \\pi ( a _ { t } ^ { * } ; \\Theta ) } _ { T ^ { * } }\n$$",
|
| 549 |
+
"text_format": "latex",
|
| 550 |
+
"bbox": [
|
| 551 |
+
246,
|
| 552 |
+
630,
|
| 553 |
+
751,
|
| 554 |
+
678
|
| 555 |
+
],
|
| 556 |
+
"page_idx": 5
|
| 557 |
+
},
|
| 558 |
+
{
|
| 559 |
+
"type": "text",
|
| 560 |
+
"text": "where $\\mu$ is the learning rate, $a _ { t } ^ { * }$ is the expert action at step $t$ of the expert trajectory of length $T ^ { * }$ . ",
|
| 561 |
+
"bbox": [
|
| 562 |
+
169,
|
| 563 |
+
702,
|
| 564 |
+
805,
|
| 565 |
+
718
|
| 566 |
+
],
|
| 567 |
+
"page_idx": 5
|
| 568 |
+
},
|
| 569 |
+
{
|
| 570 |
+
"type": "text",
|
| 571 |
+
"text": "4 Experiments ",
|
| 572 |
+
"text_level": 1,
|
| 573 |
+
"bbox": [
|
| 574 |
+
174,
|
| 575 |
+
739,
|
| 576 |
+
312,
|
| 577 |
+
757
|
| 578 |
+
],
|
| 579 |
+
"page_idx": 5
|
| 580 |
+
},
|
| 581 |
+
{
|
| 582 |
+
"type": "text",
|
| 583 |
+
"text": "4.1 Experimental setup ",
|
| 584 |
+
"text_level": 1,
|
| 585 |
+
"bbox": [
|
| 586 |
+
174,
|
| 587 |
+
772,
|
| 588 |
+
349,
|
| 589 |
+
787
|
| 590 |
+
],
|
| 591 |
+
"page_idx": 5
|
| 592 |
+
},
|
| 593 |
+
{
|
| 594 |
+
"type": "text",
|
| 595 |
+
"text": "Datasets. We evaluate our method on four VLN tasks (seven datasets): VLN with fine-grained instructions (R2R [6], RxR [7]); VLN with high-level instructions (REVERIE [8], R2R-Last); visionand-dialogue navigation (CVDN [9]); and long-horizon VLN (R4R [3], R2R-Back). ",
|
| 596 |
+
"bbox": [
|
| 597 |
+
176,
|
| 598 |
+
799,
|
| 599 |
+
825,
|
| 600 |
+
842
|
| 601 |
+
],
|
| 602 |
+
"page_idx": 5
|
| 603 |
+
},
|
| 604 |
+
{
|
| 605 |
+
"type": "text",
|
| 606 |
+
"text": "• R2R [1] builds upon Matterport3D [49] and includes 90 photo-realistic houses with 10,567 panoramas. It contains 7,189 shortest-path trajectories, each associated with 3 instructions. The dataset is split into train, val seen, val unseen and test unseen sets with 61, 56, 11 and 18 houses respectively. Houses in val seen split are the same as training, while houses in val unseen and test splits are different from training. ",
|
| 607 |
+
"bbox": [
|
| 608 |
+
192,
|
| 609 |
+
842,
|
| 610 |
+
825,
|
| 611 |
+
911
|
| 612 |
+
],
|
| 613 |
+
"page_idx": 5
|
| 614 |
+
},
|
| 615 |
+
{
|
| 616 |
+
"type": "text",
|
| 617 |
+
"text": "• RxR [7] is a large multilingual VLN dataset based on Matterport 3D. The instructions are in three different languages (English, Hindi and Telugu). The dataset emphasizes the role of language in VLN by addressing biases in paths and describing more visible entities than R2R. \nR4R [3] extends R2R dataset by concatenating two adjacent tail-to-head trajectories in R2R. Therefore, it has longer instructions and trajectories. The trajectories are also less biased as they are not necessarily the shortest-path from start to end location. \n• R2R-Back is a new VLN setup proposed in this work. The agent is required to return to its start location after arriving at the destination. The agent needs to remember its navigation histories to solve the task. We add a return command at the end of each instruction in R2R and a reverse path from the end to start locations as expert demonstration. CVDN [9] defines a navigation from dialog history task, which requires an agent to arrive at goal regions based on multi-turn question-answering dialogs. Such types of instructions are often ambiguous and under-specified. The lengths of instructions and paths are also long. \nREVERIE [8] replaces step-by-step instructions in R2R with high-level instructions, which mainly describe the target location and object. The agent, hence, is required to navigate to the goal without detailed guidance and depends on its past experiences. \n• R2R-Last is our proposed VLN setup similar to REVERIE. It only uses the last sentence from the original R2R instructions describing the final destination. ",
|
| 618 |
+
"bbox": [
|
| 619 |
+
191,
|
| 620 |
+
90,
|
| 621 |
+
826,
|
| 622 |
+
347
|
| 623 |
+
],
|
| 624 |
+
"page_idx": 6
|
| 625 |
+
},
|
| 626 |
+
{
|
| 627 |
+
"type": "text",
|
| 628 |
+
"text": "Evaluation metrics. We adopt standard metrics [1], including (1) Trajectory Length (TL): the agent’s navigated path in meters; (2) Navigation Error (NE): the average distance in meters between the agent’s final position and the target; (3) Success Rate (SR): the ratio of trajectories reaching the destination with a maximum error of 3 meters to the target; and (4) Success Rate normalized by the ratio between the length of the shortest path and the predicted path (SPL). SPL is more relevant than SR as it balances the navigation accuracy and efficiency. For long-horizon VLN task (R4R and R2R-Back), we further employ three metrics to measure the path fidelity between the predicted path and target path, including (5) Coverage weighted by Length Score (CLS) [3]; (6) the normalized Dynamic Time Warping (nDTW) [50]; and (7) the Success weighted by nDTW (SDTW). ",
|
| 629 |
+
"bbox": [
|
| 630 |
+
173,
|
| 631 |
+
347,
|
| 632 |
+
825,
|
| 633 |
+
472
|
| 634 |
+
],
|
| 635 |
+
"page_idx": 6
|
| 636 |
+
},
|
| 637 |
+
{
|
| 638 |
+
"type": "text",
|
| 639 |
+
"text": "Implementation details. For the HAMT model, we set $N _ { L } = 9$ for language transformer, $N _ { h } = 2$ for panoramic transformer in hierarchical history encoding, and $N _ { x } = 4$ for cross-modal transformer. There are $K = 3 6$ view images in each panoramic observation. We use ViT-B/16 [43] for image encoding if not otherwise specified. In training with proxy tasks, we randomly select proxy tasks for each mini-batch with predefined ratio. We train HAMT for $2 0 0 \\mathrm { k }$ iterations with fixed ViT using learning rate of 5e-5 and batch size of 64 on 4 NVIDIA Tesla P100 GPUs ( $_ { \\sim 1 }$ day). The whole HAMT model is trained end-to-end for $2 0 \\mathrm { k }$ iterations on 20 NVIDIA V100 GPUs with learning rate of 5e-5 for ViT and 1e-5 for the others ${ \\sim } 2 0$ hours). We use R2R training set and augmented pairs from [22] for training unless otherwise noted. In fine-tuning with $\\mathrm { R L + I L }$ , we set $\\lambda = 0 . 2$ in Eq (3) and $\\gamma = 0 . 9$ . The model is fine-tuned for $1 0 0 \\mathrm { k }$ iterations with learning rate of 1e-5 and batch size of 8 on a single GPU. Unimodal encoders are fixed by default. The best model is selected according to performance on val unseen split. We use the same augmented data as [5] for R2R for fair comparison, while no augmented data is used for other datasets. Greedy search is applied in inference following the single-run setting. Please see supplementary material for more details. ",
|
| 640 |
+
"bbox": [
|
| 641 |
+
173,
|
| 642 |
+
472,
|
| 643 |
+
826,
|
| 644 |
+
665
|
| 645 |
+
],
|
| 646 |
+
"page_idx": 6
|
| 647 |
+
},
|
| 648 |
+
{
|
| 649 |
+
"type": "text",
|
| 650 |
+
"text": "4.2 Ablation studies ",
|
| 651 |
+
"text_level": 1,
|
| 652 |
+
"bbox": [
|
| 653 |
+
174,
|
| 654 |
+
675,
|
| 655 |
+
326,
|
| 656 |
+
689
|
| 657 |
+
],
|
| 658 |
+
"page_idx": 6
|
| 659 |
+
},
|
| 660 |
+
{
|
| 661 |
+
"type": "text",
|
| 662 |
+
"text": "In this section, we evaluate each component in the HAMT model, including: hierarchical history encoding, end-to-end training with proxy tasks, and fine-tuning objectives. ",
|
| 663 |
+
"bbox": [
|
| 664 |
+
176,
|
| 665 |
+
695,
|
| 666 |
+
821,
|
| 667 |
+
723
|
| 668 |
+
],
|
| 669 |
+
"page_idx": 6
|
| 670 |
+
},
|
| 671 |
+
{
|
| 672 |
+
"type": "text",
|
| 673 |
+
"text": "How important is the history encoding for VLN? For fair comparison with the state-of-the-art recurrent architecture RecBERT [5], we use the same Resnet152 visual features and train all the models from scratch with $\\mathrm { R L + I L }$ objectives to avoid the influence of different weight initialization. The models are optimized for $3 0 0 \\mathrm { k }$ iterations end-to-end except for the visual feature. Table 2 compares different history encoding approaches on ",
|
| 674 |
+
"bbox": [
|
| 675 |
+
174,
|
| 676 |
+
732,
|
| 677 |
+
421,
|
| 678 |
+
897
|
| 679 |
+
],
|
| 680 |
+
"page_idx": 6
|
| 681 |
+
},
|
| 682 |
+
{
|
| 683 |
+
"type": "table",
|
| 684 |
+
"img_path": "images/d52d357cc2c99186d090601028b5096c2215f0c1b3b38d7d78eb0f216c410a5d.jpg",
|
| 685 |
+
"table_caption": [
|
| 686 |
+
"Table 2: R2R navigation results for alternative methods of history encoding. All methods use Resnet152 visual features and are trained from scratch on R2R dataset. "
|
| 687 |
+
],
|
| 688 |
+
"table_footnote": [
|
| 689 |
+
"R2R dataset. Our recurrent model slightly differs from RecBERT (no init. OSCAR) [5] in trans"
|
| 690 |
+
],
|
| 691 |
+
"table_body": "<table><tr><td rowspan=\"2\">History Encoding</td><td colspan=\"2\">Val Seen</td><td colspan=\"2\">Val Unseen</td></tr><tr><td>SR↑</td><td>SPL↑</td><td>SR↑</td><td>SPL↑</td></tr><tr><td>RecBERT[5]</td><td>62</td><td>59</td><td>50</td><td>46</td></tr><tr><td>Recurrent</td><td>60.9±1.0</td><td>56.6±1.1</td><td>52.2±0.7</td><td>47.0±0.5</td></tr><tr><td>Temporal-only</td><td>61.5±0.8</td><td>57.7±0.7</td><td>53.2±0.1</td><td>48.0±0.4</td></tr><tr><td>Hierarchical</td><td>65.5±1.2</td><td>61.3±1.4</td><td>54.4±0.4</td><td>48.7±0.4</td></tr></table>",
|
| 692 |
+
"bbox": [
|
| 693 |
+
431,
|
| 694 |
+
786,
|
| 695 |
+
826,
|
| 696 |
+
886
|
| 697 |
+
],
|
| 698 |
+
"page_idx": 6
|
| 699 |
+
},
|
| 700 |
+
{
|
| 701 |
+
"type": "table",
|
| 702 |
+
"img_path": "images/004c5ffd573cd6b44fc0c610dffe0087f33d7c04728e3bac69b490c95f371a14.jpg",
|
| 703 |
+
"table_caption": [
|
| 704 |
+
"Table 3: Ablations for end-to-end HAMT training on R2R dataset using proposed proxy tasks. ",
|
| 705 |
+
"(a) Comparison of visual features and end-to-end training. The “PT” stands for proxy tasks in training; “e2e” for optimizing the visual representation. "
|
| 706 |
+
],
|
| 707 |
+
"table_footnote": [],
|
| 708 |
+
"table_body": "<table><tr><td>feature PT e2e</td><td>SR↑</td><td>Val Seen SPL↑</td><td>Val Unseen SR↑ SPL↑</td></tr><tr><td>Resnet ×</td><td>×</td><td>65.5±1.2 61.3±1.4</td><td>54.4±0.4 48.7±0.4</td></tr><tr><td>152</td><td>√×</td><td>69.3±1.0 64.8±1.2</td><td>63.5±0.557.5±0.5</td></tr><tr><td rowspan=\"2\">ViT</td><td>√ ×</td><td>75.7±1.0</td><td>72.5±1.0 64.4±0.3 58.8±0.0</td></tr><tr><td>√ √</td><td>75.0±0.9 71.7±0.7</td><td>65.7±0.7 60.9±0.7</td></tr></table>",
|
| 709 |
+
"bbox": [
|
| 710 |
+
173,
|
| 711 |
+
165,
|
| 712 |
+
501,
|
| 713 |
+
263
|
| 714 |
+
],
|
| 715 |
+
"page_idx": 7
|
| 716 |
+
},
|
| 717 |
+
{
|
| 718 |
+
"type": "table",
|
| 719 |
+
"img_path": "images/d30fa34b2025f1f176aba898ccdc573b786372a3a7f96125106246bed60d64f7.jpg",
|
| 720 |
+
"table_caption": [
|
| 721 |
+
"(b) Comparison of different proxy tasks. The “SAP(R)” denotes the single step action prediction and regression task, and “SPREL” is the spatial relationship prediction task. "
|
| 722 |
+
],
|
| 723 |
+
"table_footnote": [],
|
| 724 |
+
"table_body": "<table><tr><td>SAP SP (R) REL</td><td>Val Seen SR↑ SPL↑</td><td>Val Unseen SR↑ SPL↑</td></tr><tr><td>×</td><td>× 71.2±2.3</td><td>67.2±2.0 62.8±1.3 57.7±1.0</td></tr><tr><td>√</td><td>×</td><td>74.7±0.6 71.1±0.9 63.6±0.1 58.1±0.4</td></tr><tr><td>√</td><td>√</td><td>75.7±1.0 72.5±1.0 64.4±0.3 58.8±0.0</td></tr></table>",
|
| 725 |
+
"bbox": [
|
| 726 |
+
524,
|
| 727 |
+
178,
|
| 728 |
+
823,
|
| 729 |
+
263
|
| 730 |
+
],
|
| 731 |
+
"page_idx": 7
|
| 732 |
+
},
|
| 733 |
+
{
|
| 734 |
+
"type": "text",
|
| 735 |
+
"text": "former architecture as shown in Figure 1. It achieves slightly better performance on val unseen split. The temporal-only model uses transformer to encode agent’s oriented visual observations in history sequence, and outperforms the recurrent method by relative gains of $1 . 9 \\%$ on SR and $2 . 1 \\%$ on SPL for val unseen split. Adding panoramic observations in a hierarchical way results in $4 . 2 \\%$ (SR) and $3 . 6 \\%$ (SLP) relative improvements on the val unseen split compared to the recurrent method. Even larger improvements are achieved on val seen split as the hierarchical model has a larger capacity to fit the seen environments. This evaluation demonstrates the advantage of our hierarchical history representation compared to the recurrent and temporal-only history representation. ",
|
| 736 |
+
"bbox": [
|
| 737 |
+
173,
|
| 738 |
+
277,
|
| 739 |
+
825,
|
| 740 |
+
388
|
| 741 |
+
],
|
| 742 |
+
"page_idx": 7
|
| 743 |
+
},
|
| 744 |
+
{
|
| 745 |
+
"type": "text",
|
| 746 |
+
"text": "How much does training with proxy tasks help? We next evaluate the advantage of training HAMT end-to-end with proxy tasks. In Table 3a, the first row uses $\\mathrm { R L + I L }$ objectives to train HAMT from scratch, while the second row uses proxy tasks for training prior to $\\mathrm { R L + I L }$ fine-tuning. We can see that it significantly boosts the performance to first train with proxy tasks. It improves on val unseen split with $1 6 . 7 \\%$ and $1 8 . 0 \\%$ relative gains on SR and SPL respectively, indicating that training with auxiliary proxy tasks enables better generalization. In the third row, we replace the visual feature from Resnet152 to ViT. The ViT feature improves the performance on both val seen and val unseen splits, showing that more powerful visual representations matter. Finally, training ViT end-to-end obtains $2 . 1 \\%$ gains on SPL on val unseen split. This is the first time to show that optimizing visual representations end-to-end is beneficial for VLN tasks. In Table 3b, we evaluate the benefit of the two new proxy tasks for frozen ViT features using the other proxy tasks by default. The SAP(R) uses imitation learning to predict actions, which directly influences the navigation policy and improves the performance by a large margin. The SPREL is a self-supervised proxy task that forces the model to learn spatial relationships in panorama and helps generalization in unseen environments. More experiments to ablate contributions from history encoding and proxy tasks, contributions of proxy tasks in end-to-end training etc. are presented in supplementary material. ",
|
| 747 |
+
"bbox": [
|
| 748 |
+
173,
|
| 749 |
+
398,
|
| 750 |
+
825,
|
| 751 |
+
619
|
| 752 |
+
],
|
| 753 |
+
"page_idx": 7
|
| 754 |
+
},
|
| 755 |
+
{
|
| 756 |
+
"type": "text",
|
| 757 |
+
"text": "What is the impact of the fine-tuning objectives? Table 4 presents results using different objectives in fine-tuning. The first row directly applies HAMT trained by proxy tasks, which achieves lower performance than that after IL finetuning, because we mainly use augmented data in proxy task training to increase visual diversity, but such noisy data deteriorates action prediction performance. Previous work [12] has shown that RL alone performs poorly. However, training with ",
|
| 758 |
+
"bbox": [
|
| 759 |
+
174,
|
| 760 |
+
631,
|
| 761 |
+
498,
|
| 762 |
+
768
|
| 763 |
+
],
|
| 764 |
+
"page_idx": 7
|
| 765 |
+
},
|
| 766 |
+
{
|
| 767 |
+
"type": "table",
|
| 768 |
+
"img_path": "images/1795423ba924c915d6c2dc0f4fdd67f17b66fad23233d03d0397eb333ad4b34c.jpg",
|
| 769 |
+
"table_caption": [
|
| 770 |
+
"Table 4: Ablations for fine-tuning objectives of sequential action prediction on R2R dataset. "
|
| 771 |
+
],
|
| 772 |
+
"table_footnote": [],
|
| 773 |
+
"table_body": "<table><tr><td rowspan=\"2\">IL RL</td><td rowspan=\"2\"></td><td colspan=\"2\">Val Seen</td><td colspan=\"2\">Val Unseen</td></tr><tr><td>SR↑</td><td>SPL↑</td><td>SR↑</td><td>SPL个</td></tr><tr><td>×</td><td>×</td><td>57.9</td><td>54.8</td><td>51.8</td><td>48.9</td></tr><tr><td>√</td><td>×</td><td>63.7±2.1</td><td>61.7±2.2</td><td>57.2±0.1</td><td>54.7±0.3</td></tr><tr><td>×</td><td>√</td><td>70.5±2.9</td><td>65.6±2.8</td><td>63.5±1.4</td><td>57.5±1.1</td></tr><tr><td>√</td><td>√</td><td>75.0±0.9</td><td>71.7±0.7</td><td>65.7±0.7</td><td>60.9±0.7</td></tr></table>",
|
| 774 |
+
"bbox": [
|
| 775 |
+
514,
|
| 776 |
+
671,
|
| 777 |
+
816,
|
| 778 |
+
765
|
| 779 |
+
],
|
| 780 |
+
"page_idx": 7
|
| 781 |
+
},
|
| 782 |
+
{
|
| 783 |
+
"type": "text",
|
| 784 |
+
"text": "proxy tasks stabilizes the followup RL fine-tuning. HAMT optimized by RL achieves much better performance than that when fine-tuning with IL on the SR metric. It indicates that RL is able to learn better exploration strategy on unseen environments. However, as the reward for RL focuses more on shortest paths rather than path fidelity with instructions, the improvement on SPL metric is relatively small compared to SR metric. Moreover, the fluctuation of the pure RL objective is larger than IL. Therefore, mixing the RL and IL achieves the best performance. ",
|
| 785 |
+
"bbox": [
|
| 786 |
+
174,
|
| 787 |
+
768,
|
| 788 |
+
825,
|
| 789 |
+
852
|
| 790 |
+
],
|
| 791 |
+
"page_idx": 7
|
| 792 |
+
},
|
| 793 |
+
{
|
| 794 |
+
"type": "text",
|
| 795 |
+
"text": "4.3 Comparison to state of the art ",
|
| 796 |
+
"text_level": 1,
|
| 797 |
+
"bbox": [
|
| 798 |
+
176,
|
| 799 |
+
863,
|
| 800 |
+
421,
|
| 801 |
+
877
|
| 802 |
+
],
|
| 803 |
+
"page_idx": 7
|
| 804 |
+
},
|
| 805 |
+
{
|
| 806 |
+
"type": "text",
|
| 807 |
+
"text": "VLN with fine-grained instructions: R2R and RxR. Table 5 compares HAMT with previous VLN methods on the R2R benchmark. Our model outperforms state-of-the-art results of RecBERT [5] by relative $5 . 9 \\%$ and $7 . 0 \\%$ improvements in SPL on val seen and unseen splits respectively. We achieve state-of-the-art performance under the single-run setting on the unseen testing split of the leaderboard2. It demonstrates the effectiveness and generalization of our model. We further provide computation time in inference for HAMT and RecBERT in the supplementary material to show the efficiency of our HAMT model. We also achieve large improvements on $\\mathbf { R x R }$ dataset. The full results are presented in supplementary material. ",
|
| 808 |
+
"bbox": [
|
| 809 |
+
174,
|
| 810 |
+
883,
|
| 811 |
+
820,
|
| 812 |
+
911
|
| 813 |
+
],
|
| 814 |
+
"page_idx": 7
|
| 815 |
+
},
|
| 816 |
+
{
|
| 817 |
+
"type": "table",
|
| 818 |
+
"img_path": "images/09daa229d47921614a3dca6658c55595a43e02c6dbcff1aa58d04f52b2aa565d.jpg",
|
| 819 |
+
"table_caption": [
|
| 820 |
+
"Table 5: Comparison with state-of-the-art methods on R2R dataset. "
|
| 821 |
+
],
|
| 822 |
+
"table_footnote": [],
|
| 823 |
+
"table_body": "<table><tr><td rowspan=\"2\">Methods</td><td colspan=\"4\">Validation Seen</td><td colspan=\"4\">Validation Unseen</td><td colspan=\"4\">Test Unseen</td></tr><tr><td>TL</td><td>NE↓</td><td>SR↑</td><td>SPL↑</td><td>TL</td><td>NE↓</td><td>SR↑</td><td>SPL个</td><td>TL</td><td>NE↓</td><td>SR↑</td><td>SPL↑</td></tr><tr><td>Seq2Seq [6]</td><td>11.33</td><td>6.01</td><td>39</td><td>1</td><td>8.39</td><td>7.81</td><td>22</td><td></td><td>8.13</td><td>7.85</td><td>20</td><td>18</td></tr><tr><td>SF[11]</td><td>-</td><td>3.36</td><td>66</td><td>1</td><td>1</td><td>6.62</td><td>35</td><td>1</td><td>14.82</td><td>6.62</td><td>35</td><td>28</td></tr><tr><td>PRESS [20]</td><td>10.57</td><td>4.39</td><td>58</td><td>55</td><td>10.36</td><td>5.28</td><td>49</td><td>45</td><td>10.77</td><td>5.49</td><td>49</td><td>45</td></tr><tr><td>EnvDrop[12]</td><td>11.00</td><td>3.99</td><td>62</td><td>59</td><td>10.70</td><td>5.22</td><td>52</td><td>48</td><td>11.66</td><td>5.23</td><td>51</td><td>47</td></tr><tr><td>AuxRN[51]</td><td>-</td><td>3.33</td><td>70</td><td>67</td><td>-</td><td>5.28</td><td>55</td><td>50</td><td>1</td><td>5.15</td><td>55</td><td>51</td></tr><tr><td>PREVALENT [22]</td><td>10.32</td><td>3.67</td><td>69</td><td>65</td><td>10.19</td><td>4.71</td><td>58</td><td>53</td><td>10.51</td><td>5.30</td><td>54</td><td>51</td></tr><tr><td>RelGraph [15]</td><td>10.13</td><td>3.47</td><td>67</td><td>65</td><td>9.99</td><td>4.73</td><td>57</td><td>53</td><td>10.29</td><td>4.75</td><td>55</td><td>52</td></tr><tr><td>RecBERT[5]</td><td>11.13</td><td>2.90</td><td>72</td><td>68</td><td>12.01</td><td>3.93</td><td>63</td><td>57</td><td>12.35</td><td>4.09</td><td>63</td><td>57</td></tr><tr><td>HAMT (Ours)</td><td>11.15</td><td>2.51</td><td>76</td><td>72</td><td>11.46</td><td>2.29</td><td>66</td><td>61</td><td>12.27</td><td>3.93</td><td>65</td><td>60</td></tr></table>",
|
| 824 |
+
"bbox": [
|
| 825 |
+
173,
|
| 826 |
+
112,
|
| 827 |
+
825,
|
| 828 |
+
272
|
| 829 |
+
],
|
| 830 |
+
"page_idx": 8
|
| 831 |
+
},
|
| 832 |
+
{
|
| 833 |
+
"type": "text",
|
| 834 |
+
"text": "",
|
| 835 |
+
"bbox": [
|
| 836 |
+
173,
|
| 837 |
+
286,
|
| 838 |
+
825,
|
| 839 |
+
371
|
| 840 |
+
],
|
| 841 |
+
"page_idx": 8
|
| 842 |
+
},
|
| 843 |
+
{
|
| 844 |
+
"type": "text",
|
| 845 |
+
"text": "Long-horizon VLN: R4R and R2R-Back. Table 6 shows navigation results on R4R dataset. As R4R contains longer instructions and trajectories compared to R2R, we use the encoder-decoder variant of HAMT for better efficiency. Our method outperforms previous approaches in all metrics and shows particularly large improvements for the path fidelity related metrics. Compared to RecBERT, HAMT achives $8 . 2 \\%$ and $9 . 5 \\%$ relative improvement in CLS and nDTW respectively. The large improvements on these path fidelity related metrics indicate that HAMT is better to follow the designated path of the fine-grained instruction. Figure 3 evaluates the performance of HAMT and RecBERT with respect to instruction length measured by words. Though the nDTW decreases for longer instructions, the relative improvement of HAMT increases with the instruction length. ",
|
| 846 |
+
"bbox": [
|
| 847 |
+
173,
|
| 848 |
+
378,
|
| 849 |
+
826,
|
| 850 |
+
503
|
| 851 |
+
],
|
| 852 |
+
"page_idx": 8
|
| 853 |
+
},
|
| 854 |
+
{
|
| 855 |
+
"type": "table",
|
| 856 |
+
"img_path": "images/ae651887592a883147e1667696b1454a930a3ed06b205db192aed339d29ea009.jpg",
|
| 857 |
+
"table_caption": [
|
| 858 |
+
"Table 6: Comparison on R4R val unseen split. "
|
| 859 |
+
],
|
| 860 |
+
"table_footnote": [],
|
| 861 |
+
"table_body": "<table><tr><td>Methods</td><td>NE↓</td><td>SR↑</td><td>CLS↑</td><td>nDTW↑</td><td>SDTW↑</td></tr><tr><td>SF[11]</td><td>8.47</td><td>24</td><td>30</td><td>-</td><td>1</td></tr><tr><td>RCM[14]</td><td>1</td><td>29</td><td>35</td><td>30</td><td>13</td></tr><tr><td>PTA [32]</td><td>8.25</td><td>24</td><td>37</td><td>32</td><td>10</td></tr><tr><td>EGP[18]</td><td>8.0</td><td>30.2</td><td>44.4</td><td>37.4</td><td>17.5</td></tr><tr><td>RelGraph [15]</td><td>7.43</td><td>36</td><td>41</td><td>47</td><td>34</td></tr><tr><td>RecBERT† [5]</td><td>6.67</td><td>43.6</td><td>51.4</td><td>45.1</td><td>29.9</td></tr><tr><td>HAMT (Ours)</td><td>6.09</td><td>44.6</td><td>57.7</td><td>50.3</td><td>31.8</td></tr></table>",
|
| 862 |
+
"bbox": [
|
| 863 |
+
173,
|
| 864 |
+
535,
|
| 865 |
+
521,
|
| 866 |
+
661
|
| 867 |
+
],
|
| 868 |
+
"page_idx": 8
|
| 869 |
+
},
|
| 870 |
+
{
|
| 871 |
+
"type": "image",
|
| 872 |
+
"img_path": "images/33f7f6d55caf9dd91f8c22b2c39ce2783e2a026750e963b0e2eefce673399a39.jpg",
|
| 873 |
+
"image_caption": [
|
| 874 |
+
"Figure 3: nDTW with respect to instruction length on R4R val unseen split. "
|
| 875 |
+
],
|
| 876 |
+
"image_footnote": [],
|
| 877 |
+
"bbox": [
|
| 878 |
+
552,
|
| 879 |
+
515,
|
| 880 |
+
774,
|
| 881 |
+
630
|
| 882 |
+
],
|
| 883 |
+
"page_idx": 8
|
| 884 |
+
},
|
| 885 |
+
{
|
| 886 |
+
"type": "text",
|
| 887 |
+
"text": "The navigation performance on R2R-Back dataset is presented in Table 7. We compare with two state-of-the-art recurrent models EnvDrop [12] and RecBERT [5] based on LSTM and transformer respectively (both models are trained on R2R-Back for fair comparison). The improvements are more significant on this task as it requires the agent to remember the way it came to the target to successfully return back. The recurrent state is insufficient to capture such history and leads to inferior performance compared to the HAMT model. ",
|
| 888 |
+
"bbox": [
|
| 889 |
+
173,
|
| 890 |
+
671,
|
| 891 |
+
826,
|
| 892 |
+
753
|
| 893 |
+
],
|
| 894 |
+
"page_idx": 8
|
| 895 |
+
},
|
| 896 |
+
{
|
| 897 |
+
"type": "table",
|
| 898 |
+
"img_path": "images/5c4580a77e4c1d897c827b791ece16e2520d86cbc6bc110226604ceb7ca72263.jpg",
|
| 899 |
+
"table_caption": [
|
| 900 |
+
"Table 7: Comparison of methods on the R2R-Back dataset. "
|
| 901 |
+
],
|
| 902 |
+
"table_footnote": [],
|
| 903 |
+
"table_body": "<table><tr><td rowspan=\"2\">Methods</td><td colspan=\"6\">Val Seen</td><td colspan=\"4\">Val Unseen</td></tr><tr><td>TL</td><td>SR↑</td><td>SPL↑</td><td>nDTW↑</td><td>SDTW↑</td><td>TL</td><td>SR↑</td><td>SPL↑</td><td>nDTW↑</td><td>SDTW↑</td></tr><tr><td>EnvDropt[12]</td><td>23.83</td><td>44.1</td><td>42.0</td><td>61.3</td><td>39.4</td><td>24.57</td><td>32.4</td><td>30.2</td><td>51.1</td><td>28.0</td></tr><tr><td>RecBERTt [5]</td><td>22.33</td><td>51.4</td><td>48.4</td><td>67.3</td><td>45.7</td><td>23.35</td><td>41.1</td><td>37.7</td><td>58.2</td><td>35.6</td></tr><tr><td>HAMT (Ours)</td><td>22.76</td><td>64.8</td><td>61.8</td><td>73.7</td><td>58.9</td><td>23.78</td><td>57.2</td><td>53.1</td><td>65.1</td><td>49.5</td></tr></table>",
|
| 904 |
+
"bbox": [
|
| 905 |
+
173,
|
| 906 |
+
776,
|
| 907 |
+
825,
|
| 908 |
+
864
|
| 909 |
+
],
|
| 910 |
+
"page_idx": 8
|
| 911 |
+
},
|
| 912 |
+
{
|
| 913 |
+
"type": "table",
|
| 914 |
+
"img_path": "images/ac5b7d21badc07a89ec570fbbaea0688cbe0551a649695337d724b247ae513a3.jpg",
|
| 915 |
+
"table_caption": [
|
| 916 |
+
"Table 8: Navigation performance on CVDN dataset. "
|
| 917 |
+
],
|
| 918 |
+
"table_footnote": [],
|
| 919 |
+
"table_body": "<table><tr><td>Val Seen</td><td>Val Unseen</td><td>Test Unseen</td></tr><tr><td>PREVALENT [22]</td><td>3.15</td><td>2.44</td></tr><tr><td>VISITRON [52]</td><td>3.25</td><td>3.11</td></tr><tr><td>MT-RCM+EnvAg[53]</td><td>4.65</td><td>3.91</td></tr><tr><td>HAMT (Ours)</td><td>5.13</td><td>5.58</td></tr></table>",
|
| 920 |
+
"bbox": [
|
| 921 |
+
173,
|
| 922 |
+
114,
|
| 923 |
+
532,
|
| 924 |
+
202
|
| 925 |
+
],
|
| 926 |
+
"page_idx": 9
|
| 927 |
+
},
|
| 928 |
+
{
|
| 929 |
+
"type": "text",
|
| 930 |
+
"text": "Vision-and-Dialog Navigation: CVDN. The CVDN dataset contains dialogs as instructions and use Goal Progress (GP) in meters as the primary evaluation metric. GP measures the difference between completed distance and left distance to the goal, so the higher the better. There are two types of demonstrations in the dataset. One is shortest-path trajectory and the other is ",
|
| 931 |
+
"bbox": [
|
| 932 |
+
545,
|
| 933 |
+
92,
|
| 934 |
+
825,
|
| 935 |
+
215
|
| 936 |
+
],
|
| 937 |
+
"page_idx": 9
|
| 938 |
+
},
|
| 939 |
+
{
|
| 940 |
+
"type": "text",
|
| 941 |
+
"text": "player’s navigation trajectory. We mix the two types of demonstrations as supervision in training which has shown to be the most effective in previous works [22, 52, 53]. As navigation paths in CVDN dataset are much longer than R2R dataset, we adopt the encoder-decoder variant of HAMT. As shown in Table 8, HAMT outperforms existing recurrent approaches on both seen and unseen environments, and achieves the top position in the leaderboard3. It demonstrates that our HAMT model is generalizable to different types of instructions in new VLN tasks. ",
|
| 942 |
+
"bbox": [
|
| 943 |
+
173,
|
| 944 |
+
215,
|
| 945 |
+
825,
|
| 946 |
+
299
|
| 947 |
+
],
|
| 948 |
+
"page_idx": 9
|
| 949 |
+
},
|
| 950 |
+
{
|
| 951 |
+
"type": "text",
|
| 952 |
+
"text": "VLN with high-level instructions: R2R-Last and REVERIE. Table 9 shows results on the R2R-Last dataset that specifies the goal location and contains no step-by-step instructions. The HAMT model with the hierarchical history encoding is able to better accumulate the knowledge of the environment and achieves $9 . 8 \\%$ and $1 0 . 5 \\%$ relative gains on SPL metric on seen and unseen splits respectively compared to RecBERT [5]. The REVERIE dataset also ",
|
| 953 |
+
"bbox": [
|
| 954 |
+
174,
|
| 955 |
+
308,
|
| 956 |
+
485,
|
| 957 |
+
445
|
| 958 |
+
],
|
| 959 |
+
"page_idx": 9
|
| 960 |
+
},
|
| 961 |
+
{
|
| 962 |
+
"type": "table",
|
| 963 |
+
"img_path": "images/e96d17cacc8d10f6a641486558a95ed29a8ddec1ed33d8ef07c015e3960bd017.jpg",
|
| 964 |
+
"table_caption": [
|
| 965 |
+
"Table 9: Comparison on the R2R-Last dataset. "
|
| 966 |
+
],
|
| 967 |
+
"table_footnote": [],
|
| 968 |
+
"table_body": "<table><tr><td>Methods</td><td>Val Seen SR↑</td><td>SPL↑</td><td>Val Unseen SR↑ SPL↑</td></tr><tr><td>EnvDrop+ [12]</td><td>42.8</td><td>38.4</td><td>34.3 28.3</td></tr><tr><td>RecBERT† [5]</td><td>50.2</td><td>45.8 41.6</td><td>37.3</td></tr><tr><td>HAMT (Ours)</td><td>53.3</td><td>50.3</td><td>45.2 41.2</td></tr></table>",
|
| 969 |
+
"bbox": [
|
| 970 |
+
506,
|
| 971 |
+
335,
|
| 972 |
+
813,
|
| 973 |
+
424
|
| 974 |
+
],
|
| 975 |
+
"page_idx": 9
|
| 976 |
+
},
|
| 977 |
+
{
|
| 978 |
+
"type": "text",
|
| 979 |
+
"text": "contains high-level instructions but requires object grounding at the target location besides navigation. We provide results on REVERIE dataset in supplementary material. Our HAMT achieves SPL 30.20 and 26.67 on val unseen and test splits respectively, outperforming the state of the art navigation performance [5] by $5 . 3 \\%$ and $2 . 7 \\%$ . ",
|
| 980 |
+
"bbox": [
|
| 981 |
+
174,
|
| 982 |
+
445,
|
| 983 |
+
826,
|
| 984 |
+
501
|
| 985 |
+
],
|
| 986 |
+
"page_idx": 9
|
| 987 |
+
},
|
| 988 |
+
{
|
| 989 |
+
"type": "text",
|
| 990 |
+
"text": "5 Conclusion ",
|
| 991 |
+
"text_level": 1,
|
| 992 |
+
"bbox": [
|
| 993 |
+
174,
|
| 994 |
+
513,
|
| 995 |
+
299,
|
| 996 |
+
530
|
| 997 |
+
],
|
| 998 |
+
"page_idx": 9
|
| 999 |
+
},
|
| 1000 |
+
{
|
| 1001 |
+
"type": "text",
|
| 1002 |
+
"text": "This paper presents the first end-to-end transformer for vision-and-language navigation, denoted as History Aware Multimodal Transformer (HAMT). Our method efficiently encodes long-horizon history and combines it with instructions and observations to derive multimodal action prediction. The HAMT is first trained with proxy tasks in an end-to-end manner, and is then fine-tuned with RL to improve the navigation policy. We achieve state-of-the-art navigation performance on a diverse range of challenging VLN tasks, demonstrating improved accuracy and generalization of our approach compared to the dominant recurrent methods. Future work could extend our history-aware transformer to VLN with continuous actions [54] and could benefit from pretraining on larger navigation datasets. This paper has minimal ethical, privacy and safety concerns. ",
|
| 1003 |
+
"bbox": [
|
| 1004 |
+
173,
|
| 1005 |
+
539,
|
| 1006 |
+
826,
|
| 1007 |
+
664
|
| 1008 |
+
],
|
| 1009 |
+
"page_idx": 9
|
| 1010 |
+
},
|
| 1011 |
+
{
|
| 1012 |
+
"type": "text",
|
| 1013 |
+
"text": "Acknowledgments and Disclosure of Funding ",
|
| 1014 |
+
"text_level": 1,
|
| 1015 |
+
"bbox": [
|
| 1016 |
+
174,
|
| 1017 |
+
676,
|
| 1018 |
+
555,
|
| 1019 |
+
694
|
| 1020 |
+
],
|
| 1021 |
+
"page_idx": 9
|
| 1022 |
+
},
|
| 1023 |
+
{
|
| 1024 |
+
"type": "text",
|
| 1025 |
+
"text": "This work was granted access to the HPC resources of IDRIS under the allocation 101002 made by GENCI. It was funded in part by the French government under management of Agence Nationale de la Recherche as part of the “Investissements d’avenir” program, reference ANR19-P3IA-0001 (PRAIRIE 3IA Institute) and by Louis Vuitton ENS Chair on Artificial Intelligence. ",
|
| 1026 |
+
"bbox": [
|
| 1027 |
+
174,
|
| 1028 |
+
702,
|
| 1029 |
+
825,
|
| 1030 |
+
758
|
| 1031 |
+
],
|
| 1032 |
+
"page_idx": 9
|
| 1033 |
+
},
|
| 1034 |
+
{
|
| 1035 |
+
"type": "text",
|
| 1036 |
+
"text": "References ",
|
| 1037 |
+
"text_level": 1,
|
| 1038 |
+
"bbox": [
|
| 1039 |
+
174,
|
| 1040 |
+
772,
|
| 1041 |
+
266,
|
| 1042 |
+
787
|
| 1043 |
+
],
|
| 1044 |
+
"page_idx": 9
|
| 1045 |
+
},
|
| 1046 |
+
{
|
| 1047 |
+
"type": "text",
|
| 1048 |
+
"text": "[1] Peter Anderson, Angel Chang, Devendra Singh Chaplot, Alexey Dosovitskiy, Saurabh Gupta, Vladlen Koltun, Jana Kosecka, Jitendra Malik, Roozbeh Mottaghi, Manolis Savva, et al. On evaluation of embodied navigation agents. arXiv preprint arXiv:1807.06757, 2018. 1, 2, 6, 7 \n[2] Howard Chen, Alane Suhr, Dipendra Misra, Noah Snavely, and Yoav Artzi. Touchdown: Natural language navigation and spatial reasoning in visual street environments. In Proceedings of the ",
|
| 1049 |
+
"bbox": [
|
| 1050 |
+
181,
|
| 1051 |
+
795,
|
| 1052 |
+
826,
|
| 1053 |
+
875
|
| 1054 |
+
],
|
| 1055 |
+
"page_idx": 9
|
| 1056 |
+
},
|
| 1057 |
+
{
|
| 1058 |
+
"type": "text",
|
| 1059 |
+
"text": "[3] Vihan Jain, Gabriel Magalhaes, Alexander Ku, Ashish Vaswani, Eugene Ie, and Jason Baldridge. Stay on the path: Instruction fidelity in vision-and-language navigation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1862–1872, 2019. 1, 2, 6, 7 ",
|
| 1060 |
+
"bbox": [
|
| 1061 |
+
183,
|
| 1062 |
+
128,
|
| 1063 |
+
826,
|
| 1064 |
+
184
|
| 1065 |
+
],
|
| 1066 |
+
"page_idx": 10
|
| 1067 |
+
},
|
| 1068 |
+
{
|
| 1069 |
+
"type": "text",
|
| 1070 |
+
"text": "[4] Yubo Zhang, Hao Tan, and Mohit Bansal. Diagnosing the environment bias in vision-andlanguage navigation. International Joint Conferences on Artificial Intelligence, 2020. 1, 2 ",
|
| 1071 |
+
"bbox": [
|
| 1072 |
+
179,
|
| 1073 |
+
194,
|
| 1074 |
+
826,
|
| 1075 |
+
223
|
| 1076 |
+
],
|
| 1077 |
+
"page_idx": 10
|
| 1078 |
+
},
|
| 1079 |
+
{
|
| 1080 |
+
"type": "text",
|
| 1081 |
+
"text": "[5] Yicong Hong, Qi Wu, Yuankai Qi, Cristian Rodriguez-Opazo, and Stephen Gould. Vln bert: A recurrent vision-and-language bert for navigation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1643–1653, 2021. 1, 3, 4, 6, 7, 8, 9, 10 [6] Peter Anderson, Qi Wu, Damien Teney, Jake Bruce, Mark Johnson, Niko Sünderhauf, Ian Reid, Stephen Gould, and Anton Van Den Hengel. Vision-and-language navigation: Interpreting visually-grounded navigation instructions in real environments. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3674–3683, 2018. 1, 2, 3, 6, 9 [7] Alexander Ku, Peter Anderson, Roma Patel, Eugene Ie, and Jason Baldridge. Room-acrossroom: Multilingual vision-and-language navigation with dense spatiotemporal grounding. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4392–4412, 2020. 1, 2, 6, 7 ",
|
| 1082 |
+
"bbox": [
|
| 1083 |
+
183,
|
| 1084 |
+
231,
|
| 1085 |
+
826,
|
| 1086 |
+
275
|
| 1087 |
+
],
|
| 1088 |
+
"page_idx": 10
|
| 1089 |
+
},
|
| 1090 |
+
{
|
| 1091 |
+
"type": "text",
|
| 1092 |
+
"text": "",
|
| 1093 |
+
"bbox": [
|
| 1094 |
+
183,
|
| 1095 |
+
284,
|
| 1096 |
+
825,
|
| 1097 |
+
340
|
| 1098 |
+
],
|
| 1099 |
+
"page_idx": 10
|
| 1100 |
+
},
|
| 1101 |
+
{
|
| 1102 |
+
"type": "text",
|
| 1103 |
+
"text": "",
|
| 1104 |
+
"bbox": [
|
| 1105 |
+
183,
|
| 1106 |
+
348,
|
| 1107 |
+
825,
|
| 1108 |
+
406
|
| 1109 |
+
],
|
| 1110 |
+
"page_idx": 10
|
| 1111 |
+
},
|
| 1112 |
+
{
|
| 1113 |
+
"type": "text",
|
| 1114 |
+
"text": "[8] Yuankai Qi, Qi Wu, Peter Anderson, Xin Wang, William Yang Wang, Chunhua Shen, and Anton van den Hengel. Reverie: Remote embodied visual referring expression in real indoor environments. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9982–9991, 2020. 1, 2, 6, 7 ",
|
| 1115 |
+
"bbox": [
|
| 1116 |
+
181,
|
| 1117 |
+
415,
|
| 1118 |
+
825,
|
| 1119 |
+
470
|
| 1120 |
+
],
|
| 1121 |
+
"page_idx": 10
|
| 1122 |
+
},
|
| 1123 |
+
{
|
| 1124 |
+
"type": "text",
|
| 1125 |
+
"text": "[9] Jesse Thomason, Michael Murray, Maya Cakmak, and Luke Zettlemoyer. Vision-and-dialog navigation. In Conference on Robot Learning, pages 394–406. PMLR, 2020. 1, 2, 6, 7 ",
|
| 1126 |
+
"bbox": [
|
| 1127 |
+
176,
|
| 1128 |
+
479,
|
| 1129 |
+
823,
|
| 1130 |
+
508
|
| 1131 |
+
],
|
| 1132 |
+
"page_idx": 10
|
| 1133 |
+
},
|
| 1134 |
+
{
|
| 1135 |
+
"type": "text",
|
| 1136 |
+
"text": "[10] Licheng Yu, Zhe Lin, Xiaohui Shen, Jimei Yang, Xin Lu, Mohit Bansal, and Tamara L Berg. Mattnet: Modular attention network for referring expression comprehension. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1307–1315, 2018. 1 [11] Daniel Fried, Ronghang Hu, Volkan Cirik, Anna Rohrbach, Jacob Andreas, Louis-Philippe Morency, Taylor Berg-Kirkpatrick, Kate Saenko, Dan Klein, and Trevor Darrell. Speakerfollower models for vision-and-language navigation. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, pages 3318–3329, 2018. 1, 3, 4, 9 ",
|
| 1137 |
+
"bbox": [
|
| 1138 |
+
174,
|
| 1139 |
+
517,
|
| 1140 |
+
825,
|
| 1141 |
+
560
|
| 1142 |
+
],
|
| 1143 |
+
"page_idx": 10
|
| 1144 |
+
},
|
| 1145 |
+
{
|
| 1146 |
+
"type": "text",
|
| 1147 |
+
"text": "",
|
| 1148 |
+
"bbox": [
|
| 1149 |
+
174,
|
| 1150 |
+
569,
|
| 1151 |
+
826,
|
| 1152 |
+
626
|
| 1153 |
+
],
|
| 1154 |
+
"page_idx": 10
|
| 1155 |
+
},
|
| 1156 |
+
{
|
| 1157 |
+
"type": "text",
|
| 1158 |
+
"text": "[12] Hao Tan, Licheng Yu, and Mohit Bansal. Learning to navigate unseen environments: Back translation with environmental dropout. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 2610–2621, 2019. 1, 2, 3, 4, 8, 9, 10 ",
|
| 1159 |
+
"bbox": [
|
| 1160 |
+
174,
|
| 1161 |
+
633,
|
| 1162 |
+
826,
|
| 1163 |
+
691
|
| 1164 |
+
],
|
| 1165 |
+
"page_idx": 10
|
| 1166 |
+
},
|
| 1167 |
+
{
|
| 1168 |
+
"type": "text",
|
| 1169 |
+
"text": "[13] Chih-Yao Ma, Jiasen Lu, Zuxuan Wu, Ghassan AlRegib, Zsolt Kira, Richard Socher, and Caiming Xiong. Self-monitoring navigation agent via auxiliary progress estimation. In Proceedings of the International Conference on Learning Representations, 2019. 1, 3 ",
|
| 1170 |
+
"bbox": [
|
| 1171 |
+
173,
|
| 1172 |
+
699,
|
| 1173 |
+
825,
|
| 1174 |
+
743
|
| 1175 |
+
],
|
| 1176 |
+
"page_idx": 10
|
| 1177 |
+
},
|
| 1178 |
+
{
|
| 1179 |
+
"type": "text",
|
| 1180 |
+
"text": "[14] Xin Wang, Qiuyuan Huang, Asli Celikyilmaz, Jianfeng Gao, Dinghan Shen, Yuan-Fang Wang, William Yang Wang, and Lei Zhang. Reinforced cross-modal matching and self-supervised imitation learning for vision-language navigation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6629–6638, 2019. 1, 3, 9 ",
|
| 1181 |
+
"bbox": [
|
| 1182 |
+
173,
|
| 1183 |
+
752,
|
| 1184 |
+
825,
|
| 1185 |
+
809
|
| 1186 |
+
],
|
| 1187 |
+
"page_idx": 10
|
| 1188 |
+
},
|
| 1189 |
+
{
|
| 1190 |
+
"type": "text",
|
| 1191 |
+
"text": "[15] Yicong Hong, Cristian Rodriguez, Yuankai Qi, Qi Wu, and Stephen Gould. Language and visual entity relationship graph for agent navigation. Advances in Neural Information Processing Systems, 33:7685–7696, 2020. 1, 3, 9 ",
|
| 1192 |
+
"bbox": [
|
| 1193 |
+
173,
|
| 1194 |
+
816,
|
| 1195 |
+
823,
|
| 1196 |
+
859
|
| 1197 |
+
],
|
| 1198 |
+
"page_idx": 10
|
| 1199 |
+
},
|
| 1200 |
+
{
|
| 1201 |
+
"type": "text",
|
| 1202 |
+
"text": "[16] Xiangru Lin, Guanbin Li, and Yizhou Yu. Scene-intuitive agent for remote embodied visual grounding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7036–7045, 2021. 1, 3 ",
|
| 1203 |
+
"bbox": [
|
| 1204 |
+
174,
|
| 1205 |
+
869,
|
| 1206 |
+
825,
|
| 1207 |
+
911
|
| 1208 |
+
],
|
| 1209 |
+
"page_idx": 10
|
| 1210 |
+
},
|
| 1211 |
+
{
|
| 1212 |
+
"type": "text",
|
| 1213 |
+
"text": "[17] Kuan Fang, Alexander Toshev, Li Fei-Fei, and Silvio Savarese. Scene memory transformer for embodied agents in long-horizon tasks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 538–547, 2019. 1, 3 ",
|
| 1214 |
+
"bbox": [
|
| 1215 |
+
171,
|
| 1216 |
+
90,
|
| 1217 |
+
823,
|
| 1218 |
+
133
|
| 1219 |
+
],
|
| 1220 |
+
"page_idx": 11
|
| 1221 |
+
},
|
| 1222 |
+
{
|
| 1223 |
+
"type": "text",
|
| 1224 |
+
"text": "[18] Zhiwei Deng, Karthik Narasimhan, and Olga Russakovsky. Evolving graphical planner: Contextual global planning for vision-and-language navigation. In Advances in Neural Information Processing Systems, volume 33, 2020. 1, 3, 9 ",
|
| 1225 |
+
"bbox": [
|
| 1226 |
+
171,
|
| 1227 |
+
142,
|
| 1228 |
+
823,
|
| 1229 |
+
186
|
| 1230 |
+
],
|
| 1231 |
+
"page_idx": 11
|
| 1232 |
+
},
|
| 1233 |
+
{
|
| 1234 |
+
"type": "text",
|
| 1235 |
+
"text": "[19] Hanqing Wang, Wenguan Wang, Wei Liang, Caiming Xiong, and Jianbing Shen. Structured scene memory for vision-language navigation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8455–8464, 2021. 1, 3 ",
|
| 1236 |
+
"bbox": [
|
| 1237 |
+
173,
|
| 1238 |
+
195,
|
| 1239 |
+
826,
|
| 1240 |
+
238
|
| 1241 |
+
],
|
| 1242 |
+
"page_idx": 11
|
| 1243 |
+
},
|
| 1244 |
+
{
|
| 1245 |
+
"type": "text",
|
| 1246 |
+
"text": "[20] Xiujun Li, Chunyuan Li, Qiaolin Xia, Yonatan Bisk, Asli Celikyilmaz, Jianfeng Gao, Noah A Smith, and Yejin Choi. Robust navigation with language pretraining and stochastic sampling. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 1494–1499, 2019. 2, 3, 9 ",
|
| 1247 |
+
"bbox": [
|
| 1248 |
+
173,
|
| 1249 |
+
248,
|
| 1250 |
+
826,
|
| 1251 |
+
318
|
| 1252 |
+
],
|
| 1253 |
+
"page_idx": 11
|
| 1254 |
+
},
|
| 1255 |
+
{
|
| 1256 |
+
"type": "text",
|
| 1257 |
+
"text": "[21] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171–4186, 2019. 2, 3, 4 [22] Weituo Hao, Chunyuan Li, Xiujun Li, Lawrence Carin, and Jianfeng Gao. Towards learning a generic agent for vision-and-language navigation via pre-training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13137–13146, 2020. 2, 3, 5, 7, 9, 10 ",
|
| 1258 |
+
"bbox": [
|
| 1259 |
+
174,
|
| 1260 |
+
328,
|
| 1261 |
+
826,
|
| 1262 |
+
385
|
| 1263 |
+
],
|
| 1264 |
+
"page_idx": 11
|
| 1265 |
+
},
|
| 1266 |
+
{
|
| 1267 |
+
"type": "text",
|
| 1268 |
+
"text": "",
|
| 1269 |
+
"bbox": [
|
| 1270 |
+
174,
|
| 1271 |
+
393,
|
| 1272 |
+
826,
|
| 1273 |
+
450
|
| 1274 |
+
],
|
| 1275 |
+
"page_idx": 11
|
| 1276 |
+
},
|
| 1277 |
+
{
|
| 1278 |
+
"type": "text",
|
| 1279 |
+
"text": "[23] Marc’Aurelio Ranzato, Sumit Chopra, Michael Auli, and Wojciech Zaremba. Sequence level training with recurrent neural networks. International Conference on Learning Representations, 2016. 2 ",
|
| 1280 |
+
"bbox": [
|
| 1281 |
+
174,
|
| 1282 |
+
460,
|
| 1283 |
+
826,
|
| 1284 |
+
502
|
| 1285 |
+
],
|
| 1286 |
+
"page_idx": 11
|
| 1287 |
+
},
|
| 1288 |
+
{
|
| 1289 |
+
"type": "text",
|
| 1290 |
+
"text": "[24] Stéphane Ross, Geoffrey Gordon, and Drew Bagnell. A reduction of imitation learning and structured prediction to no-regret online learning. In Proceedings of the fourteenth international conference on artificial intelligence and statistics, pages 627–635. JMLR Workshop and Conference Proceedings, 2011. 2 ",
|
| 1291 |
+
"bbox": [
|
| 1292 |
+
174,
|
| 1293 |
+
512,
|
| 1294 |
+
826,
|
| 1295 |
+
569
|
| 1296 |
+
],
|
| 1297 |
+
"page_idx": 11
|
| 1298 |
+
},
|
| 1299 |
+
{
|
| 1300 |
+
"type": "text",
|
| 1301 |
+
"text": "[25] Samy Bengio, Oriol Vinyals, Navdeep Jaitly, and Noam Shazeer. Scheduled sampling for sequence prediction with recurrent neural networks. In Advances in Neural Information Processing Systems, volume 28, 2015. 2 ",
|
| 1302 |
+
"bbox": [
|
| 1303 |
+
173,
|
| 1304 |
+
579,
|
| 1305 |
+
823,
|
| 1306 |
+
622
|
| 1307 |
+
],
|
| 1308 |
+
"page_idx": 11
|
| 1309 |
+
},
|
| 1310 |
+
{
|
| 1311 |
+
"type": "text",
|
| 1312 |
+
"text": "[26] Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018. 2 ",
|
| 1313 |
+
"bbox": [
|
| 1314 |
+
173,
|
| 1315 |
+
631,
|
| 1316 |
+
823,
|
| 1317 |
+
660
|
| 1318 |
+
],
|
| 1319 |
+
"page_idx": 11
|
| 1320 |
+
},
|
| 1321 |
+
{
|
| 1322 |
+
"type": "text",
|
| 1323 |
+
"text": "[27] Emilio Parisotto, Francis Song, Jack Rae, Razvan Pascanu, Caglar Gulcehre, Siddhant Jayakumar, Max Jaderberg, Raphael Lopez Kaufman, Aidan Clark, Seb Noury, et al. Stabilizing transformers for reinforcement learning. In International Conference on Machine Learning, pages 7487–7498. PMLR, 2020. 2, 5 ",
|
| 1324 |
+
"bbox": [
|
| 1325 |
+
174,
|
| 1326 |
+
670,
|
| 1327 |
+
826,
|
| 1328 |
+
727
|
| 1329 |
+
],
|
| 1330 |
+
"page_idx": 11
|
| 1331 |
+
},
|
| 1332 |
+
{
|
| 1333 |
+
"type": "text",
|
| 1334 |
+
"text": "[28] 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. 2, 3, 6 ",
|
| 1335 |
+
"bbox": [
|
| 1336 |
+
174,
|
| 1337 |
+
736,
|
| 1338 |
+
826,
|
| 1339 |
+
792
|
| 1340 |
+
],
|
| 1341 |
+
"page_idx": 11
|
| 1342 |
+
},
|
| 1343 |
+
{
|
| 1344 |
+
"type": "text",
|
| 1345 |
+
"text": "[29] Mohit Shridhar, Jesse Thomason, Daniel Gordon, Yonatan Bisk, Winson Han, Roozbeh Mottaghi, Luke Zettlemoyer, and Dieter Fox. Alfred: A benchmark for interpreting grounded instructions for everyday tasks. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 10740–10749, 2020. 2 ",
|
| 1346 |
+
"bbox": [
|
| 1347 |
+
174,
|
| 1348 |
+
803,
|
| 1349 |
+
826,
|
| 1350 |
+
859
|
| 1351 |
+
],
|
| 1352 |
+
"page_idx": 11
|
| 1353 |
+
},
|
| 1354 |
+
{
|
| 1355 |
+
"type": "text",
|
| 1356 |
+
"text": "[30] Hu Wang, Qi Wu, and Chunhua Shen. Soft expert reward learning for vision-and-language navigation. In Computer Vision–ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part IX 16, pages 126–141. Springer, 2020. 3 ",
|
| 1357 |
+
"bbox": [
|
| 1358 |
+
174,
|
| 1359 |
+
869,
|
| 1360 |
+
826,
|
| 1361 |
+
912
|
| 1362 |
+
],
|
| 1363 |
+
"page_idx": 11
|
| 1364 |
+
},
|
| 1365 |
+
{
|
| 1366 |
+
"type": "text",
|
| 1367 |
+
"text": "[31] 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, pages 5998–6008, 2017. 3 ",
|
| 1368 |
+
"bbox": [
|
| 1369 |
+
171,
|
| 1370 |
+
90,
|
| 1371 |
+
825,
|
| 1372 |
+
133
|
| 1373 |
+
],
|
| 1374 |
+
"page_idx": 12
|
| 1375 |
+
},
|
| 1376 |
+
{
|
| 1377 |
+
"type": "text",
|
| 1378 |
+
"text": "[32] Federico Landi, Lorenzo Baraldi, Marcella Cornia, Massimiliano Corsini, and Rita Cucchiara. Perceive, transform, and act: Multi-modal attention networks for vision-and-language navigation. arXiv preprint arXiv:1911.12377, 2019. 3, 9 ",
|
| 1379 |
+
"bbox": [
|
| 1380 |
+
173,
|
| 1381 |
+
142,
|
| 1382 |
+
823,
|
| 1383 |
+
185
|
| 1384 |
+
],
|
| 1385 |
+
"page_idx": 12
|
| 1386 |
+
},
|
| 1387 |
+
{
|
| 1388 |
+
"type": "text",
|
| 1389 |
+
"text": "[33] 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. 3 ",
|
| 1390 |
+
"bbox": [
|
| 1391 |
+
173,
|
| 1392 |
+
194,
|
| 1393 |
+
823,
|
| 1394 |
+
237
|
| 1395 |
+
],
|
| 1396 |
+
"page_idx": 12
|
| 1397 |
+
},
|
| 1398 |
+
{
|
| 1399 |
+
"type": "text",
|
| 1400 |
+
"text": "[34] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. 3 ",
|
| 1401 |
+
"bbox": [
|
| 1402 |
+
173,
|
| 1403 |
+
246,
|
| 1404 |
+
823,
|
| 1405 |
+
275
|
| 1406 |
+
],
|
| 1407 |
+
"page_idx": 12
|
| 1408 |
+
},
|
| 1409 |
+
{
|
| 1410 |
+
"type": "text",
|
| 1411 |
+
"text": "[35] Saurabh Gupta, James Davidson, Sergey Levine, Rahul Sukthankar, and Jitendra Malik. Cognitive mapping and planning for visual navigation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2616–2625, 2017. 3 ",
|
| 1412 |
+
"bbox": [
|
| 1413 |
+
173,
|
| 1414 |
+
285,
|
| 1415 |
+
823,
|
| 1416 |
+
327
|
| 1417 |
+
],
|
| 1418 |
+
"page_idx": 12
|
| 1419 |
+
},
|
| 1420 |
+
{
|
| 1421 |
+
"type": "text",
|
| 1422 |
+
"text": "[36] Nikolay Savinov, Alexey Dosovitskiy, and Vladlen Koltun. Semi-parametric topological memory for navigation. International Conference on Learning Representations, 2018. 3 ",
|
| 1423 |
+
"bbox": [
|
| 1424 |
+
173,
|
| 1425 |
+
335,
|
| 1426 |
+
825,
|
| 1427 |
+
366
|
| 1428 |
+
],
|
| 1429 |
+
"page_idx": 12
|
| 1430 |
+
},
|
| 1431 |
+
{
|
| 1432 |
+
"type": "text",
|
| 1433 |
+
"text": "[37] Alexander Pashevich, Cordelia Schmid, and Chen Sun. Episodic transformer for vision-andlanguage navigation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 15942–15952, 2021. 3, 4 ",
|
| 1434 |
+
"bbox": [
|
| 1435 |
+
173,
|
| 1436 |
+
375,
|
| 1437 |
+
823,
|
| 1438 |
+
416
|
| 1439 |
+
],
|
| 1440 |
+
"page_idx": 12
|
| 1441 |
+
},
|
| 1442 |
+
{
|
| 1443 |
+
"type": "text",
|
| 1444 |
+
"text": "[38] Yen-Chun Chen, Linjie Li, Licheng Yu, Ahmed El Kholy, Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu. Uniter: Universal image-text representation learning. In European Conference on Computer Vision, pages 104–120. Springer, 2020. 3 ",
|
| 1445 |
+
"bbox": [
|
| 1446 |
+
173,
|
| 1447 |
+
426,
|
| 1448 |
+
823,
|
| 1449 |
+
469
|
| 1450 |
+
],
|
| 1451 |
+
"page_idx": 12
|
| 1452 |
+
},
|
| 1453 |
+
{
|
| 1454 |
+
"type": "text",
|
| 1455 |
+
"text": "[39] Xiujun Li, Xi Yin, Chunyuan Li, Pengchuan Zhang, Xiaowei Hu, Lei Zhang, Lijuan Wang, Houdong Hu, Li Dong, Furu Wei, et al. Oscar: Object-semantics aligned pre-training for vision-language tasks. In European Conference on Computer Vision, pages 121–137. Springer, 2020. 3 ",
|
| 1456 |
+
"bbox": [
|
| 1457 |
+
173,
|
| 1458 |
+
478,
|
| 1459 |
+
825,
|
| 1460 |
+
535
|
| 1461 |
+
],
|
| 1462 |
+
"page_idx": 12
|
| 1463 |
+
},
|
| 1464 |
+
{
|
| 1465 |
+
"type": "text",
|
| 1466 |
+
"text": "[40] Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. ViLBERT: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. In Advances in Neural Information Processing Systems, volume 32, 2019. 3, 5 ",
|
| 1467 |
+
"bbox": [
|
| 1468 |
+
171,
|
| 1469 |
+
542,
|
| 1470 |
+
823,
|
| 1471 |
+
587
|
| 1472 |
+
],
|
| 1473 |
+
"page_idx": 12
|
| 1474 |
+
},
|
| 1475 |
+
{
|
| 1476 |
+
"type": "text",
|
| 1477 |
+
"text": "[41] Hao Tan and Mohit Bansal. LXMERT: Learning cross-modality encoder representations from transformers. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 5103–5114, 2019. 3 ",
|
| 1478 |
+
"bbox": [
|
| 1479 |
+
173,
|
| 1480 |
+
595,
|
| 1481 |
+
825,
|
| 1482 |
+
652
|
| 1483 |
+
],
|
| 1484 |
+
"page_idx": 12
|
| 1485 |
+
},
|
| 1486 |
+
{
|
| 1487 |
+
"type": "text",
|
| 1488 |
+
"text": "[42] Wonjae Kim, Bokyung Son, and Ildoo Kim. Vilt: Vision-and-language transformer without convolution or region supervision. In Proceedings of the 38th International Conference on Machine Learning, pages 5583–5594, 2021. 3 ",
|
| 1489 |
+
"bbox": [
|
| 1490 |
+
173,
|
| 1491 |
+
661,
|
| 1492 |
+
823,
|
| 1493 |
+
704
|
| 1494 |
+
],
|
| 1495 |
+
"page_idx": 12
|
| 1496 |
+
},
|
| 1497 |
+
{
|
| 1498 |
+
"type": "text",
|
| 1499 |
+
"text": "[43] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth $1 6 \\times 1 6$ words: Transformers for image recognition at scale. International Conference on Learning Representations, 2020. 3, 7 ",
|
| 1500 |
+
"bbox": [
|
| 1501 |
+
173,
|
| 1502 |
+
713,
|
| 1503 |
+
826,
|
| 1504 |
+
770
|
| 1505 |
+
],
|
| 1506 |
+
"page_idx": 12
|
| 1507 |
+
},
|
| 1508 |
+
{
|
| 1509 |
+
"type": "text",
|
| 1510 |
+
"text": "[44] Arjun Majumdar, Ayush Shrivastava, Stefan Lee, Peter Anderson, Devi Parikh, and Dhruv Batra. Improving vision-and-language navigation with image-text pairs from the web. In European Conference on Computer Vision, pages 259–274. Springer, 2020. 3, 4, 5 ",
|
| 1511 |
+
"bbox": [
|
| 1512 |
+
171,
|
| 1513 |
+
779,
|
| 1514 |
+
825,
|
| 1515 |
+
821
|
| 1516 |
+
],
|
| 1517 |
+
"page_idx": 12
|
| 1518 |
+
},
|
| 1519 |
+
{
|
| 1520 |
+
"type": "text",
|
| 1521 |
+
"text": "[45] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. 4 ",
|
| 1522 |
+
"bbox": [
|
| 1523 |
+
171,
|
| 1524 |
+
830,
|
| 1525 |
+
825,
|
| 1526 |
+
859
|
| 1527 |
+
],
|
| 1528 |
+
"page_idx": 12
|
| 1529 |
+
},
|
| 1530 |
+
{
|
| 1531 |
+
"type": "text",
|
| 1532 |
+
"text": "[46] Anurag Arnab, Mostafa Dehghani, Georg Heigold, Chen Sun, Mario Luciˇ c, and Cordelia ´ Schmid. Vivit: A video vision transformer. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6836–6846, 2021. 4 ",
|
| 1533 |
+
"bbox": [
|
| 1534 |
+
174,
|
| 1535 |
+
869,
|
| 1536 |
+
826,
|
| 1537 |
+
911
|
| 1538 |
+
],
|
| 1539 |
+
"page_idx": 12
|
| 1540 |
+
},
|
| 1541 |
+
{
|
| 1542 |
+
"type": "text",
|
| 1543 |
+
"text": "[47] Jize Cao, Zhe Gan, Yu Cheng, Licheng Yu, Yen-Chun Chen, and Jingjing Liu. Behind the scene: Revealing the secrets of pre-trained vision-and-language models. In European Conference on Computer Vision, pages 565–580. Springer, 2020. 5 \n[48] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. ImageNet: A largescale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248–255. IEEE, 2009. 6 \n[49] Angel Chang, Angela Dai, Thomas Funkhouser, Maciej Halber, Matthias Niebner, Manolis Savva, Shuran Song, Andy Zeng, and Yinda Zhang. Matterport3d: Learning from rgb-d data in indoor environments. In 2017 International Conference on 3D Vision (3DV), pages 667–676. IEEE, 2017. 6 \n[50] Gabriel Ilharco, Vihan Jain, Alexander Ku, Eugene Ie, and Jason Baldridge. General evaluation for instruction conditioned navigation using dynamic time warping. In Visually Grounded Interaction and Language (ViGIL), NeurIPS 2019 Workshop, 2019. 7 \n[51] Fengda Zhu, Yi Zhu, Xiaojun Chang, and Xiaodan Liang. Vision-language navigation with self-supervised auxiliary reasoning tasks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10012–10022, 2020. 9 \n[52] Ayush Shrivastava, Karthik Gopalakrishnan, Yang Liu, Robinson Piramuthu, Gokhan Tür, Devi Parikh, and Dilek Hakkani-Tür. Visitron: Visual semantics-aligned interactively trained object-navigator. arXiv preprint arXiv:2105.11589, 2021. 10 \n[53] Xin Eric Wang, Vihan Jain, Eugene Ie, William Yang Wang, Zornitsa Kozareva, and Sujith Ravi. Environment-agnostic multitask learning for natural language grounded navigation. In Computer Vision–ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part XXIV 16, pages 413–430. Springer, 2020. 10 \n[54] Jacob Krantz, Erik Wijmans, Arjun Majumdar, Dhruv Batra, and Stefan Lee. Beyond the navgraph: Vision-and-language navigation in continuous environments. In European Conference on Computer Vision, pages 104–120. Springer, 2020. 10 ",
|
| 1544 |
+
"bbox": [
|
| 1545 |
+
171,
|
| 1546 |
+
89,
|
| 1547 |
+
826,
|
| 1548 |
+
530
|
| 1549 |
+
],
|
| 1550 |
+
"page_idx": 13
|
| 1551 |
+
}
|
| 1552 |
+
]
|
parse/train/SQxuiYf2TT/SQxuiYf2TT_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/SQxuiYf2TT/SQxuiYf2TT_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/r1te3Fqel/r1te3Fqel.md
ADDED
|
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# END-TO-END ANSWER CHUNK EXTRACTION AND RANKING FOR READING COMPREHENSION
|
| 2 |
+
|
| 3 |
+
Yang Yu∗, Wei Zhang∗, Bowen Zhou, Kazi Hasan, Mo Yu, Bing Xiang {yu, zhangwei, zhou, kshasan, yum, bingxia} $@$ us.ibm.com IBM Watson, Yorktown Heights, NY, USA
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
This paper proposes dynamic chunk reader (DCR), an end-to-end neural reading comprehension (RC) model that is able to extract and rank a set of answer candidates from a given document to answer questions. DCR is able to predict answers of variable lengths, whereas previous neural RC models primarily focused on predicting single tokens or entities. DCR encodes a document and an input question with recurrent neural networks, and then applies a word-by-word attention mechanism to acquire question-aware representations for the document, followed by the generation of chunk representations and a ranking module to propose the topranked chunk as the answer. Experimental results show that DCR could achieve a $6 6 . 3 \%$ Exact match and $7 4 . 7 \%$ F1 score on the Stanford Question Answering Dataset (Rajpurkar et al., 2016).
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Reading comprehension-based question answering (RCQA) is the task of answering a question with a chunk of text taken from related document(s). A variety of neural models have been proposed recently either for extracting a single entity or a single token as an answer from a given text (Hermann et al., 2015; Kadlec et al., 2016; Trischler et al., 2016b; Dhingra et al., 2016; Chen et al., 2016; Sordoni et al., 2016; Cui et al., 2016a); or for selecting the correct answer by ranking a small set of human-provided candidates (Yin et al., 2016; Trischler et al., 2016a). In both cases, an answer boundary is either easy to determine or already given.
|
| 12 |
+
|
| 13 |
+
Different from the above two assumptions for RCQA, in the real-world QA scenario, people may ask questions about both entities (factoid) and non-entities such as explanations and reasons (nonfactoid) (see Table 1 for examples).
|
| 14 |
+
|
| 15 |
+
In this regard, RCQA has the potential to complement other QA approaches that leverage structured data (e.g., knowledge bases) for both the above question types. This is because RCQA can exploit the textual evidences to ensure increased answer coverage, which is particularly helpful for nonfactoid answers. However, it is also challenging for RCQA to identify answer in arbitrary position in the passage with arbitrary length, especially for non-factoid answers which might be clauses or sentences.
|
| 16 |
+
|
| 17 |
+
As a result, apart from a few exceptions (Rajpurkar et al., 2016; Wang & Jiang, 2016), this research direction has not been fully explored yet.
|
| 18 |
+
|
| 19 |
+
Compared to the relatively easier RC task of predicting single tokens/entities1, predicting answers of arbitrary lengths and positions significantly increase the search space complexity:
|
| 20 |
+
|
| 21 |
+
the number of possible candidates to consider is in the order of $O ( n ^ { 2 } )$ , where $n$ is the number of passage words. In contrast, for previous works in which answers are single tokens/entities or from candidate lists, the complexity is in $O ( n )$ or the size of candidate lists $l$ (usually $l \leq 5 ,$ ), respectively. To address the above complexity, Rajpurkar et al. (Rajpurkar et al., 2016) used a two-step chunkand-rank approach that employs a rule-based algorithm to extract answer candidates from a passage, followed by a ranking approach with hand-crafted features to select the best answer. The rule-based chunking approach suffered from low coverage $\approx 7 0 \%$ recall of answer chunks) that cannot be improved during training; and candidate ranking performance depends greatly on the quality of the hand-crafted features. More recently, Wang and Jiang (Wang & Jiang, 2016) proposed two end-toend neural network models, one of which chunks a candidate answer by predicting the answer’s two boundary indices and the other classifies each passage word into answer/not-answer. Both models improved significantly over the method proposed by Rajpurkar et al. (Rajpurkar et al., 2016).
|
| 22 |
+
|
| 23 |
+
Table 1: Example of questions (with answers) which can be potentially answered with RC on a Wikipedia passage. The first question is factoid, asking for an entity. The second and third are non-factoid.
|
| 24 |
+
|
| 25 |
+
<table><tr><td>The United Kingdom (UK) intends to withdraw from the European Union (EU), a process commonly known as Brexit,as a result of a June 2O16 referendum in which 51.9% voted to leave the EU.The separation process is complex,causing political and economic changes for the UK and other countries.As of September 2016,neither the timetable nor the terms for withdrawal have been established: in the meantime,the UK remains a full member of the European Union.The term "Brexit”is a portmanteau of the words "British”and "exit".</td></tr><tr><td>Q1.Which country withdrew from EU in 2016? A1.UnitedKingdom</td></tr><tr><td>Q2.How did UK decide to leave the European Union? A2.as a result of a June 2O16 referendum in which 51.9% voted to leave the EU</td></tr><tr><td>Q3.What has not been finalized for Brexit as of September 2016? A3.neither the timetable nor the terms forwithdrawal</td></tr></table>
|
| 26 |
+
|
| 27 |
+
Our proposed model, called dynamic chunk reader $( D C R )$ , not only significantly differs from both the above systems in the way that answer candidates are generated and ranked, but also shares merits with both works. First, our model uses deep networks to learn better representations for candidate answer chunks, instead of using fixed feature representations as in (Rajpurkar et al., 2016). Second, it represents answer candidates as chunks, as in (Rajpurkar et al., 2016), instead of wordlevel representations (Wang & Jiang, 2016), to make the model aware of the subtle differences among candidates (importantly, overlapping candidates).
|
| 28 |
+
|
| 29 |
+
The contributions of this paper are three-fold. (1) We propose a novel neural network model for joint candidate answer chunking and ranking, where the candidate answer chunks are dynamically constructed and ranked in an end-to-end manner. (2) we propose a new question-attention mechanism to enhance passage word representation, which is subsequently used to construct chunk representations. (3) We also propose several simple but effective features to strengthen the attention mechanism, which fundamentally improves candidate ranking, with the by-product of higher exact boundary match accuracy.
|
| 30 |
+
|
| 31 |
+
The experiments on the Stanford Question Answering Dataset (SQuAD) (Rajpurkar et al., 2016), which contains a variety of human-generated factoid and non-factoid questions, have shown the effectiveness of above three contributions.
|
| 32 |
+
|
| 33 |
+
Our paper is organized as follows. We formally define the RCQA problem first. Next, we describe our baseline with a neural network component. We present the end-to-end dynamic chunk reader model next. Finally, we analyze our experimental results and discuss the related work. In appendix, we show formal equations and details of the model.
|
| 34 |
+
|
| 35 |
+
# 2 PROBLEM DEFINITION
|
| 36 |
+
|
| 37 |
+
Table 1 shows an example of our RC setting where the goal is to answer a question $Q _ { i }$ , factoid (Q1) or non-factoid (Q2 and Q3), based on a supporting passage $P _ { i }$ , by selecting a continuous sequence of text $A _ { i } \subseteq P _ { i }$ as answer. $Q _ { i } , P _ { i }$ , and $A _ { i }$ are all word sequences, where each word is drawn from a vocabulary, $V$ . The $i$ -th instance in the training set is a triple in the form of $( P _ { i } , Q _ { i } , A _ { i } )$ , where $P _ { i } = ( p _ { i 1 } , \dots , p _ { i | P _ { i } | } )$ , $Q _ { i } = ( q _ { i 1 } , \dots , q _ { i | Q _ { i } | } )$ , and $A _ { i } = \left( a _ { i 1 } , \ldots , a _ { i | A _ { i } | } \right) ( p _ { i \cdot } , q _ { i \cdot } , a _ { i \cdot } \in V )$ . Owing to the disagreement among annotators, there could be more than one correct answer for the samequestion; and the k-th answer to Qi is denoted by Aki = {aki1, . . . , aki|Aki |}. An answer candidate for the -th training example is defined as $c _ { i } ^ { m , n }$ , a sub-sequence in $P _ { i }$ , that spans from position $m$ to $n$ $( 1 \leq m \leq n \leq | P _ { i } | )$ . The ground truth answer $A _ { i }$ could be included in the set of all candidates
|
| 38 |
+
|
| 39 |
+
$C _ { i } = \{ c _ { i } ^ { m , n } ~ | \forall m , n \in N ^ { + } , s u b j ( m , n , P _ { i } )$ and $1 \leq m \leq n \leq | P _ { i } | \}$ , where $s u b j ( m , n , P _ { i } )$ is i the constraint put on the candidate chunk for $P _ { i }$ , such as, $^ { \cdot \mathfrak { e } _ { c _ { i } } m , n }$ can have at most 10 tokens”, or $c _ { i } ^ { m , n }$ must have a pre-defined POS pattern”. To evaluate a system’s performance, its top answer to a question is matched against the corresponding gold standard answer(s).
|
| 40 |
+
|
| 41 |
+
Remark: Categories of RC Tasks Other simpler variants of the aforementioned RC task were explored in the past. For example, quiz-style datasets (e.g., MCTest (Richardson et al., 2013), MovieQA (Tapaswi et al., 2015)) have multiple-choice questions with answer options. Cloze-style datesets(Hermann et al., 2015; Hill et al., 2015; Onishi et al., 2016), usually automatically generated, have factoid “question”s created by replacing the answer in a sentence from the text with blank. For the answer selection task this paper focuses on, several datasets exist, e.g. TREC-QA for factoid answer extraction from multiple given passages, bAbI (Weston et al., 2014) designed for inference purpose, and the SQuAD dataset (Rajpurkar et al., 2016) used in this paper. To the best of our knowledge, the SQuAD dataset is the only one for both factoid and non-factoid answer extraction with a question distribution more close to real-world applications.
|
| 42 |
+
|
| 43 |
+
# 3 BASELINE: CHUNK-AND-RANK PIPELINE WITH NEURAL RC
|
| 44 |
+
|
| 45 |
+
In this section we modified a state-of-the-art RC system for cloze-style tasks for our answer extraction purpose, to see how much gap we have for the two type of tasks, and to inspire our end-to-end system in the next section. In order to make the cloze-style RC system to make chunk-level decision, we use the RC model to generate features for chunks, which are further used in a feature-based ranker like in (Rajpurkar et al., 2016). As a result, this baseline can be viewed as a deep learning based counterpart of the system in (Rajpurkar et al., 2016). It has two main components: 1) a standalone answer chunker, which is trained to produce overlapping candidate chunks, and 2) a neural RC model, which is used to score each word in a given passage to be used thereafter for generating chunk scores.
|
| 46 |
+
|
| 47 |
+
Answer Chunking To reduce the errors generated by the rule-based chunker in (Rajpurkar et al., 2016), first, we capture the part-of-speech (POS) pattern of all answer sub-sequences in the training dataset to form a POS pattern trie tree, and then apply the answer POS patterns to passage $P _ { i }$ to acquire a collection of all subsequences (chunk candidates) $C _ { i }$ whose POS patterns can be matched to the POS pattern trie. This is equivalent to putting an constraint $s u b j ( m , n , P _ { i } )$ to candidate answer chunk generation process that only choose the chunk with a POS pattern seen for answers in the training data. Then the sub-sequences $C _ { i }$ are used as answer candidates for $P _ { i }$ . Note that overlapping chunks could be generated for a passage, and we rely on the ranker to choose the best candidate based on features from the cloze-style RC system. Experiments showed that for $> 9 0 \%$ of the questions on the development set, the ground truth answer is included in the candidate set constructed in such manner.
|
| 48 |
+
|
| 49 |
+
Feature Extraction and Ranking For chunk ranking, we (1) use neural RCQA model to annotate each $p _ { i j }$ in passage $P _ { i }$ to get score $s _ { i j }$ , then (2) for every chunk m,n $c _ { i } ^ { m , n }$ in passage $i$ , collect scores $( s _ { i m } , \ldots , s _ { i n } )$ for all the $( p _ { i m } , . . . , \bar { p _ { i n } ) }$ contained within $c _ { i } ^ { m , n }$ , and (3) extract features on the sequence of scores $( s _ { i m } , \ldots , s _ { i n } )$ to characterize its scale and distribution information, which serves as the feature representation of $c _ { i } ^ { m , n }$ . In step (1) to acquire $s _ { i j }$ we train and apply a word-level single-layer Gated Attention Reader 2 (Dhingra et al., 2016), which has state-of-the-art performance on CNN/DailyMail cloze-style RC task. In step (3) for chunk $c _ { i } ^ { m , n }$ , we designed 5 features, including 4 statistics on $( s _ { i m } , \ldots , s _ { i n } )$ : maximum, minimum, average and sum; as well as the count of matched POS pattern within the chunk, which serves as an answer prior. We use these 5 features in a state-of-the-art ranker (Ganjisaffar et al., 2011).
|
| 50 |
+
|
| 51 |
+
# 4 DYNAMIC CHUNK READER
|
| 52 |
+
|
| 53 |
+
The dynamic chunk reader (DCR) model is presented in Figure 1. Inspired by the baseline we built, DCR is deemed to be superior to the baseline for 3 reasons. First, each chunk has a representation constructed dynamically, instead of having a set of pre-defined feature values. Second, each passage word’s representation is enhanced by word-by-word attention that evaluates the relevance of the passage word to the question. Third, these components are all within a single, end-to-end model that can be trained in a joint manner.
|
| 54 |
+
|
| 55 |
+

|
| 56 |
+
Figure 1: The main components in dynamic chunk reader model (from bottom to top) are bi-GRU encoders for passage and question, a word-by-word attention bi-GRU for passage, dynamic chunk representations that are transformed from pooled dynamic chunks of hidden states, the question attention on every chunk representation and final answer chunk prediction.
|
| 57 |
+
|
| 58 |
+
DCR works in four steps. First, the encoder layer encodes passage and question separately, by using bidirectional recurrent neural networks (RNN).
|
| 59 |
+
|
| 60 |
+
Second, the attention layer calculates the relevance of each passage word to the question.
|
| 61 |
+
|
| 62 |
+
Third, the convolution layer generates unigram, bigram and trigram representation for each word. bigram and trigram of a word ends with the same word, and proper padding is applied on the first word to make sure the output is the same length as input to CNN layer.
|
| 63 |
+
|
| 64 |
+
Fourth, the chunk representation layer dynamically extracts the candidate chunks from the given passage, and create chunk representation that encodes the contextual information of each chunk.
|
| 65 |
+
|
| 66 |
+
Fifth, the ranker layer scores the relevance between the representations of a chunk and the given question, and ranks all candidate chunks using a softmax layer.
|
| 67 |
+
|
| 68 |
+
We describe each step below.
|
| 69 |
+
|
| 70 |
+
Encoder Layer We use bi-directional RNN encoder to encode $P _ { i }$ and $Q _ { i }$ of example $i$ , and get hidden state for each word position $p _ { i j }$ and $q _ { i k }$ .3 As RNN input, a word is represented by a row vector $x \in \mathbb { R } ^ { n }$ . $x$ can be the concatenation of word embedding and word features (see Fig. 1). The word vector for the $t$ -th word is $x _ { t }$ . A word sequence is processed using an RNN encoder with gated recurrent units (GRU) (Cho et al., 2014), which was proved to be effective in RC and neural machine translation tasks (Bahdanau et al., 2015; Kadlec et al., 2016; Dhingra et al., 2016). For each position $t$ , GRU computes $h _ { t }$ with input $x _ { t }$ and previous state $h _ { t - 1 }$ , as:
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
\begin{array} { l c l } { { r _ { t } } } & { { = } } & { { \sigma ( W _ { r } { x _ { t } } + U _ { r } { h _ { t - 1 } } ) } } \\ { { u _ { t } } } & { { = } } & { { \sigma ( W _ { u } { x _ { t } } + U _ { u } { h _ { t - 1 } } ) } } \\ { { \bar { h _ { t } } } } & { { = } } & { { t a n h ( W { x _ { t } } + U ( r _ { t } \odot { h _ { t - 1 } } ) ) } } \\ { { h _ { t } } } & { { = } } & { { ( 1 - u _ { t } ) \cdot h _ { t - 1 } + u _ { t } \cdot \bar { h _ { t } } } } \end{array}
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where $h _ { t } , r _ { t }$ , and $u _ { t } \in \mathbb { R } ^ { d }$ are ${ \mathrm { d } }$ -dimensional hidden state, reset gate, and update gate, respectively; $W _ { \{ r , u \} }$ , $W \in \mathbb { R } ^ { n \times d }$ and $U _ { \{ r , u \} }$ , $U \in \mathbb { R } ^ { d \times d }$ are the parameters of the GRU; $\sigma$ is the sigmoid function, and $\odot$ denotes element-wise production. For a word at $t$ , we use the hidden state $\vec { h _ { t } }$ from the forward RNN as a representation of the preceding context, and the $\smash { \overleftarrow { h } _ { t } }$ from a backward RNN that encodes text reversely, to incorporate the context after $t$ . Next, $h _ { t } = [ \overrightarrow { h _ { t } } ; \overleftarrow { h _ { t } } ]$ , the bi-directional contextual encoding of $x _ { t }$ , is formed. $[ \cdot ; \cdot ]$ is the concatenation operator. To distinguish hidden states from different sources, we denote the $h _ { j }$ of $j$ -th word in $P$ and the $h _ { k }$ of $k$ -th word in $Q$ as $h _ { j } ^ { p }$ and $h _ { k } ^ { q }$ respectively.
|
| 77 |
+
|
| 78 |
+
Attention Layer Attention mechanism in previous RC tasks (Kadlec et al., 2016; Hermann et al., 2015; Sordoni et al., 2016; Dhingra et al., 2016; Cui et al., 2016a;b) enables question-aware passage representations. We propose a novel attention mechanism inspired by word-by-word style attention methods (Rocktaschel et al., 2015; Wang & Jiang, 2015; Santos et al., 2016). For each ¨ $p _ { j }$ , a questionattended representation $v _ { j }$ is computed as follows (example index $i$ is omitted for simplicity):
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\begin{array} { r c l } { { \alpha _ { j k } } } & { { = } } & { { { h _ { j } ^ { p } \cdot h _ { k } ^ { q } , } } } \\ { { } } & { { } } & { { } } \\ { { \beta _ { j } } } & { { = } } & { { \displaystyle \sum _ { k = 1 } ^ { | Q | } \alpha _ { j k } h _ { k } ^ { q } } } \\ { { } } & { { } } & { { } } \\ { { v _ { j } } } & { { = } } & { { \displaystyle [ h _ { j } ^ { p } ; \beta _ { j } ] } } \end{array}
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
where $h _ { j } ^ { p }$ and $h _ { k } ^ { q }$ are hidden states from the bi-directional RNN encoders (see Figure 1). An inner product, $\alpha _ { j k }$ , is calculated between $h _ { j } ^ { p }$ and every question word $h _ { k } ^ { q }$ . It indicates how well the passage word $p _ { j }$ matches with every question word $q _ { k }$ . $\beta _ { j }$ is a weighted pooling of $| Q |$ question hidden states, which serves as a $p _ { j }$ -aware question representation. The concatenation of $h _ { j } ^ { p }$ and $\beta _ { j }$ leads to a passage-question joint representation, $v _ { j } \in \mathbb { R } ^ { 4 d }$ .4 Next, we apply a second bi-GRU layer taking the $v _ { j } \mathbf { s }$ as inputs, and obtain forward and backward representations $\overrightarrow { \gamma _ { j } ^ { \prime } }$ and $\{ \overline { { \gamma _ { j } } } \in \mathbb { R } ^ { d }$ , and in turn their concatenation, $\gamma _ { j } = [ \overrightarrow { \gamma _ { j } ^ { \ast } } ; \overleftarrow { \gamma _ { j } } ]$ .
|
| 85 |
+
|
| 86 |
+
Convolution Layer Every word is encoded with complete passage context through attention layer RNN. We would like to model more complex representation of the words, by introducing unigram, bigram and trigram representations. There are two benefits for this enhanced representation: 1) each word could be enhanced with local context information to help identify the boundary of the answer chunk. Using previous words has been a common feature used in POS tagging and Named entity recognition; and 2) The information brought in by the ngram into the word representation could enhance the semantic match between the answer chunk internal and the question. Imagine scenario of a three word candidate, where the last word representation includes the two previous words through the convolution layer. Matching to the last word could also lead to the match to the semantics of the internal of the chunk. Specifically, we create for every word position $j$ three representations, by using ngrams ending with the hidden state $j$ :
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\begin{array} { r c l } { \tilde { \gamma } _ { j 1 } } & { = } & { \gamma _ { j } \cdot W _ { c 1 } } \\ { \tilde { \gamma } _ { j 2 } } & { = } & { \left[ \gamma _ { j - 1 } ; \gamma _ { j } \right] \cdot W _ { c 2 } } \\ { \tilde { \gamma } _ { j 3 } } & { = } & { \left[ \gamma _ { j - 2 } ; \gamma _ { j - 1 } ; \gamma _ { j } \right] \cdot W _ { c 3 } } \end{array}
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
The details shown in equations above. We used three different convolution kernels for different n-grams.
|
| 93 |
+
|
| 94 |
+
Chunk Representation Layer A candidate answer chunk representation is dynamically created given convolution layer output. We first decide the text boundary for the candidate chunk, and then form a chunk representation using all or part of those $\gamma _ { j }$ outputs inside the chunk. To decide a candidate chunk (boundary): we tried two ways: (1) adopt the $P O S$ trie-based approach used in our baseline, and (2) enumerate all possible chunks up to a maximum number of tokens. For (2), we create up to $N$ (max chunk length) chunks starting from any position $j$ in $P _ { j }$ . Approach (1) can generate candidates with arbitrary lengths, but fails to recall candidates whose POS pattern is unseen in training set; whereas approach (2) considers all possible candidates within a window and is more flexible, but over-generates invalid candidates.
|
| 95 |
+
|
| 96 |
+
For a candidate answer chunk $c ^ { m , n }$ spanning from position $m$ to $n$ inclusively, we construct chunk representation $\overline { { \gamma } } _ { m , n } ^ { l } ~ \in ~ \mathbb { R } ^ { 2 d }$ using every $\tilde { \gamma } _ { j l }$ within range $[ m , n ]$ , with a function $g ( \cdot )$ , and $l \in$ $\{ 1 , 2 , 3 \}$ . Formally,
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\overline { { \gamma } } _ { m , n } ^ { l } = g ( \widetilde { \gamma } _ { m l } , \ldots , \widetilde { \gamma } _ { n l } )
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
Each $\tilde { \gamma } _ { j l }$ is a convolution output over concatenated forward and backward RNN hidden states from attention layer. So the first half in $\tilde { \gamma } _ { j l }$ encodes information in forward RNN hidden states and the second half encodes information in backward RNN hidden states. We experimented with several pooling functions (e.g., max, average) for $g ( \cdot )$ , and found out that, instead of pooling, the best $g ( \cdot )$ function is to concatenate the first half of convolution output of the chunk’s first word and the second half of convolution output of the chunk’s last word. Formally,
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
\overline { { \gamma } } _ { m , n } ^ { l } = g ( \widetilde { \gamma } _ { m l } , \dots , \widetilde { \gamma } _ { n l } ) = [ \overrightarrow { \widetilde { \gamma } _ { m l } } ; \overleftarrow { \widetilde { \gamma } _ { n l } } ]
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
where $\overrightarrow { \tilde { \gamma } _ { m l } }$ is half of the hidden state for $l$ -gram word representation corresponding to forward attention RNN output. We hypothesize that the hidden states at that two ends can better represent the chunk’s contexts, which is critical for this task, than the states within the chunk. This observation also agrees with (Kobayashi et al., 2016).
|
| 109 |
+
|
| 110 |
+
Ranker Layer A score $s _ { m , n } ^ { l }$ for each $l$ -gram chunk representation $\overline { { \gamma } } _ { m , n } ^ { l }$ denoting the probability of that chunk to be the true answer is calculated by dot product with question representation. The question representation is the concatenation of the last hidden state in forward RNN and the first hidden state in backward RNN. Formally for the chunk $c _ { i } ^ { m , n }$ we have
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
s ^ { l } ( c _ { i } ^ { m , n } | P _ { i } , Q _ { i } ) = \overline { { { \gamma } } } _ { m , n } ^ { l } \cdot [ \overrightarrow { h _ { | Q _ { i } ^ { d } | } ^ { Q _ { i } } } ; \overleftrightarrow { h _ { 1 } ^ { Q _ { i } } } ]
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
where $s ^ { l }$ denotes the score generated from $l$ -gram representatio n. −−→hQik or h Q ik is the $k$ -th hidden state output from question $Q _ { i }$ ’s forward and backward RNN encoder, respectively.
|
| 117 |
+
|
| 118 |
+
After that, the final score for cmi $c _ { i } ^ { m , n }$ is evaluated as the linear combination of three scores, followed by a softmax:
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
s ( c _ { i } ^ { m , n } | P _ { i } , Q _ { i } ) = s o f t m a x ( W \cdot [ s ^ { 1 } ; s ^ { 2 } ; s ^ { 3 } ] )
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
where $s ^ { l }$ is the shorthand notation for $s ^ { l } ( c _ { i } ^ { m , n } | P _ { i } , Q _ { i } )$ ; $W \in \mathbb { R } ^ { 3 }$ . In runtime, the chunk with the highest probability is taken as the answer. In training, the following negative log likelihood is minimized:
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
\mathbb { L } = - \sum _ { i = 1 } ^ { N } \log \mathbb { P } ( A _ { i } | P _ { i } , Q _ { i } )
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
Note that the $i$ -th training instance is only used when $A _ { i }$ is included in the corresponding candidate chunk set $C _ { i }$ , i.e. $\exists _ { m , n } \bar { A } _ { i } = c _ { i } ^ { m , n }$ . The softmax in the final layer serves as the list-wise ranking module similar in spirit to (Cao et al., 2007).
|
| 131 |
+
|
| 132 |
+
# 5 EXPERIMENTS
|
| 133 |
+
|
| 134 |
+
Dataset We used the Stanford Question Answering Dataset (SQuAD) (Rajpurkar et al., 2016) for the experiment. SQuAD came into our sight because it is a mix of factoid and non-factoid questions, a real-world data (crowd-sourced), and of large scale (over 100K question-answer pairs collected from 536 Wikipedia articles). Answers range from single words to long, variable-length phrase/clauses. It is a relaxation of assumptions by the cloze-style and quiz-style RC datasets in the Problem Definition section.
|
| 135 |
+
|
| 136 |
+
Table 2: Results on the SQuAD dataset.
|
| 137 |
+
|
| 138 |
+
<table><tr><td rowspan="2"></td><td colspan="2">Dev</td><td colspan="2">Test</td></tr><tr><td>EM</td><td>F1</td><td>EM</td><td>F1</td></tr><tr><td>Models Rajpurkar 2016</td><td>39.8%</td><td>51.0%</td><td>40.4%</td><td>51.0%</td></tr><tr><td>Wang 2016</td><td>59.1%</td><td>70.0%</td><td>59.5%</td><td>70.3%</td></tr><tr><td>DCR w/o Conv.</td><td>62.5%</td><td>71.2%</td><td>62.5%</td><td>71.0%</td></tr><tr><td>DCR</td><td>63.4%</td><td>72.3%</td><td></td><td>-</td></tr><tr><td>DCR Ensemble</td><td>66.3%</td><td>74.7%</td><td>-</td><td>1</td></tr></table>
|
| 139 |
+
|
| 140 |
+
Features The input vector representation of each word $w$ to encoder RNNs has six parts including a pre-trained 300-dimensional GloVe embedding (Pennington et al., 2014) and five features (see Figure 1): (1) a one-hot encoding (46 dimensions) for the part-of-speech (POS) tag of $w$ ; (2) a one-hot encoding (14 dimensions) for named entity (NE) tag of $w$ ; (3) a binary value indicating whether $w$ ’s surface form is the same to any word in the quesiton; (4) if the lemma form of $w$ is the same to any word in the question; and (5) if $w$ is caplitalized. Feature (3) and (4) are designed to help the model align the passage text with question. Note that some types of questions (e.g., “who”, “when” questions) have answers that have a specific POS/NE tag pattern. For instance, “who” questions mostly have proper nouns/persons as answers and “when” questions may frequently have numbers/dates (e.g., a year) as answers. Thus, we believe that the model could exploit the co-relation between question types and answer POS/NE patterns easier with POS and NE tag features. Implementation Details We pre-processed the SQuAD dataset using Stanford CoreNLP tool5 (Manning et al., 2014) with its default setting to tokenize the text and obtain the POS and NE annotations. To train our model, we used stochastic gradient descent with the ADAM optimizer (Kingma & Ba, 2014), with an initial learning rate of 0.001. All GRU weights were initialized from a uniform distribution between (-0.01, 0.01). The hidden state size, $d$ , was set to 300 for all GRUs. The question bi-GRU shared parameters with the passage bi-GRU, while the attention-based passage bi-GRU had its own parameters. We shuffled all training examples at the beginning of each epoch and adopted a curriculum learning approach (Bengio et al., 2009), by sorting training instances by length in every 10 batches, to enable the model start learning from relatively easier instances and to harder ones. We also applied dropout of rate 0.2 to the embedding layer of input bi-GRU encoder, and gradient clipping when the norm of gradients exceeded 10. We trained in mini-batch style (mini-batch size is 180) and applied zero-padding to the passage and question inputs in each batch. We also set the maximum passage length to be 300 tokens, and pruned all the tokens after the 300-th token in the training set to save memory and speed up the training process. This step reduced the training set size by about $1 . 6 \%$ . During test, we test on the full length of passage, so that we don’t prune out the potential candidates. We trained the model for at most 30 epochs, and in case the accuracy did not improve for 10 epochs, we stopped training.
|
| 141 |
+
|
| 142 |
+
For the feature ranking-based system, we used jforest ranker (Ganjisaffar et al., 2011) with LambdaMART-RegressionTree algorithm and the ranking metric was ${ \mathrm { N D C G } } \ @ 1 0$ . For the Gated Attention Reader in baseline system, we replicated the method and use the same configurations as in (Dhingra et al., 2016).
|
| 143 |
+
|
| 144 |
+
# Results
|
| 145 |
+
|
| 146 |
+
Table 2 shows our main results on the SQuAD dataset. Compared to the scores reported in (Wang & Jiang, 2016), our exact match (EM) and F1 on the development set and EM score on the test set are better, and F1 on the test set is comparable. We also studied how each component in our model contributes to the overall performance. Table 3 shows the details as well as the results of the baseline ranker. As the first row of Table 3 shows, our baseline system improves $10 \%$ (EM) over Rajpurkar et al. (Rajpurkar et al., 2016) (Table 2, row 1), the feature-based ranking system. However when compared to our DCR model (Table 3, row 2), the baseline (row 1) is more than $12 \%$ (EM) behind
|
| 147 |
+
|
| 148 |
+
Table 3: Detailed system experiments on the SQuAD development set.
|
| 149 |
+
|
| 150 |
+
<table><tr><td>Models</td><td>EM</td><td>F1</td></tr><tr><td>Chunk-and-RankPipelineBaseline</td><td>49.7%</td><td>64.9%</td></tr><tr><td>DCRw/o Convolution</td><td>62.5%</td><td>71.2%</td></tr><tr><td>DCR w/o Word-by-Word Attention</td><td>57.6%</td><td>68.7%</td></tr><tr><td>DCR w/o POS feature (1)</td><td>59.2%</td><td>68.8%</td></tr><tr><td>DCR w/o NE feature (2)</td><td>60.4%</td><td>70.2%</td></tr><tr><td>DCR w/o Question-word feature (3)</td><td>59.5%</td><td>69.0%</td></tr><tr><td>DCR w/o Question-lemma feature (4)</td><td>61.2%</td><td>69.9%</td></tr><tr><td>DCR w/o Capitalized feature (5)</td><td>61.5%</td><td>70.6%</td></tr><tr><td>DCRw/o Conv.wPOS-trie</td><td>62.1%</td><td>70.8%</td></tr></table>
|
| 151 |
+
|
| 152 |
+

|
| 153 |
+
Figure 2: (a) Variations of DCR performance on ground truth answer length (up to 10) in the development set. The curve with diamond knots also shows the percentage of answers for each length in the development set. (b) Performance comparisons for different question head word. even though it is based on the state-of-the-art model for cloze-style RC tasks. This can be attributed to the advanced model structure and end-to-end manner of DCR.
|
| 154 |
+
|
| 155 |
+
We also did ablation tests on our DCR model. First, replacing the word-by-word attention with Attentive Reader style attention (Hermann et al., 2015) decreases the EM score by about $4 . 5 \%$ , showing the strength of our proposed attention mechanism.
|
| 156 |
+
|
| 157 |
+
Second, we remove the features in input to see the contribution of each feature. The result shows that POS feature (1) and question-word feature (3) are the two most important features.
|
| 158 |
+
|
| 159 |
+
Finally, combining the DCR model with the proposed POS-trie constraints yields a score similar to the one obtained using the DCR model with all possible $n$ -gram chunks. The result shows that (1) our chunk representations are powerful enough to differentiate even a huge amount of chunks when no constraints are applied; and (2) the proposed POS-trie reduces the search space at the cost of a small drop in performance.
|
| 160 |
+
|
| 161 |
+
Analysis To better understand our system, we calculated the accuracy of the attention mechanism of the gated attention reader used in our deep learning-based baseline. We found that it is $72 \%$ accurate i.e., $72 \%$ of the times a word with the highest attention score is inside the correct answer span. This means that, if we could accurately detect the boundary around the word with the highest attention score to form the answer span, we could achieve an accuracy close to $72 \%$ . In addition, we checked the answer recall of our candidate chunking approach. When we use a window size of 10, $92 \%$ of the time, the ground truth answer will be included in the extracted Candidate chunk set. Thus the upper bound of the exact match score of our baseline system is around $66 \%$ $9 2 \%$ (the answer recall) $\times 7 2 \%$ ). From the results, we see our DCR system’s exact match score is at $62 \%$ . This shows that DCR is proficient at differentiating answer spans dynamically.
|
| 162 |
+
|
| 163 |
+
To further analyze the system’s performance while predicting answers of different lengths, we show the exact match (EM) and F1 scores for answers with lengths up to 10 tokens in Figure 2(a). From the graph, we can see that, with the increase of answer length, both EM and F1 drops, but in different speed. The gap between F1 and exact match also widens as answer length increases. However, the model still yields a decent accuracy when the answer is longer than a single word. Additionally, Figure 2(b) shows that the system is better at “when” and “who” questions, but performs poorly on “why” questions. The large gap between exact match and F1 on “why” questions means that perfectly identifying the span is harder than locating the core of the answer span.
|
| 164 |
+
|
| 165 |
+

|
| 166 |
+
Figure 3: Development set performance comparisons for different types of “what” questions (considering the types with more than 20 examples in the development set).
|
| 167 |
+
|
| 168 |
+
Since “what”, “which”, and “how” questions contain a broad range of question types, we split them further based on the bigram a question starts with, and Figure 3 shows the breakdown for “what” questions. We can see that “what” questions asking for explanations such as “what happens” and “what happened” have lower EM and F1 scores. In contrast, “what” questions asking for year and numbers have much higher scores and, for these questions, exact match scores are close to F1 scores, which means chunking for these questions are easier for DCR.
|
| 169 |
+
|
| 170 |
+
# 6 RELATED WORK
|
| 171 |
+
|
| 172 |
+
Attentive Reader was the first neural model for factoid RCQA (Hermann et al., 2015). It uses Bidirectional RNN (Cho et al., 2014; Chung et al.,2014) to encode document and query respectively, and use query representation to match with every token from the document. Attention Sum Reader (Kadlec et al., 2016) simplifies the model to just predicting positions of correct answer in the document and the training speed and test accuracy are both greatly improved on the CNN/Daily Mail dataset. (Chen et al., 2016) also simplified Attentive Reader and reported higher accuracy. Windowbased Memory Networks (MemN2N) is introduced along with the CBT dataset (Hill et al., 2015), which does not use RNN encoders, but embeds contexts as memory and matches questions with embedded contexts. Those models’ mechanism is to learn the match between answer context with question/query representation. In contrast, memory enhanced neural networks like Neural Turing Machines (Graves et al., 2014) and its variants (Zhang et al., 2015; Gulcehre et al., 2016; Zaremba & Sutskever, 2015; Chandar et al., 2016; Grefenstette et al., 2015) were also potential candidates for the task, and Gulcehre et al. (Gulcehre et al., 2016) reported results on the bAbI task, which is worse than memory networks. Similarly, sequence-to-sequence models were also used (Yu et al., 2015; Hermann et al., 2015), but they did not yield better results either.
|
| 173 |
+
|
| 174 |
+
Recently, several models have been proposed to enable more complex inference for RC task. For instance, gated attention model (Dhingra et al., 2016) employs a multi-layer architecture, where each layer encodes the same document, but the attention is updated from layer to layer. EpiReader (Trischler et al., 2016b) adopted a joint training model for answer extractor and reasoner, where the extractor proposes top candidates, and the reasoner weighs each candidate by examining entailment relationship between question-answer representation and the document. An iterative alternating attention mechanism and gating strategies were proposed in (Sordoni et al., 2016) to optimize the attention through several hops. In contrast, Cui et al. (Cui et al., 2016a;b) introduced fine-grained document attention from each question word and then aggregated those attentions from each question token by summation with or without weights. This system achieved the state-of-the-art score on the CNN dataset. Those different variations all result in roughly $3- 5 \%$ improvement over attention sum reader, but none of those could achieve higher than that. Other methods include using dynamic entity representation with max-pooling (Kobayashi et al., 2016) that aims to change entity representation with context, and Weissenborn’s (Weissenborn, 2016) system, which tries to separate entity from the context and then matches the question to context, scoring an accuracy around $70 \%$ on the CNN dataset.
|
| 175 |
+
|
| 176 |
+
However, all of those models assume that the answers are single tokens. This limits the type of questions the models can answer. Wang and Jiang (Wang & Jiang, 2016) proposed a match-lstm and achieved good results on SQuAD. However, this approach predicts a chunk boundary or whether a word is part of a chunk or not. In contrast, our approach explicitly constructs the chunk representations and similar chunks are compared directly to determine correct answer boundaries.
|
| 177 |
+
|
| 178 |
+
# 7 CONCLUSION
|
| 179 |
+
|
| 180 |
+
In this paper we proposed a novel neural reading comprehension model for question answering. Different from the previously proposed models for factoid RCQA, the proposed model, dynamic chunk reader, is not restricted to predicting a single named entity as an answer or selecting an answer from a small, pre-defined candidate list. Instead, it is capable of answering both factoid and nonfactoid questions as it learns to select answer chunks that are suitable for an input question. DCR achieves this goal with a joint deep learning model enhanced with a novel attention mechanism and five simple yet effective features. Error analysis shows that the DCR model achieves good performance, but still needs to improve on predicting longer answers, which are usually non-factoid in nature.
|
| 181 |
+
|
| 182 |
+
# REFERENCES
|
| 183 |
+
|
| 184 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. ICLR, 2015.
|
| 185 |
+
|
| 186 |
+
Yoshua Bengio, Jer´ ome Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In ˆ Proceedings of the 26th annual international conference on machine learning, pp. 41–48. ACM, 2009.
|
| 187 |
+
|
| 188 |
+
Zhe Cao, Tao Qin, Tie-Yan Liu, Ming-Feng Tsai, and Hang Li. Learning to rank: from pairwise approach to listwise approach. In Proceedings of the 24th international conference on Machine learning, pp. 129–136. ACM, 2007.
|
| 189 |
+
|
| 190 |
+
Sarath Chandar, Sungjin Ahn, Hugo Larochelle, Pascal Vincent, Gerald Tesauro, and Yoshua Bengio. Hierarchical memory networks. arXiv preprint arXiv:1605.07427, 2016.
|
| 191 |
+
|
| 192 |
+
Danqi Chen, Jason Bolton, and Christopher D Manning. A thorough examination of the cnn/daily mail reading comprehension task. ACL, 2016.
|
| 193 |
+
|
| 194 |
+
Kyunghyun Cho, Bart Van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Hol- ¨ ger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014.
|
| 195 |
+
|
| 196 |
+
Yiming Cui, Zhipeng Chen, Si Wei, Shijin Wang, Ting Liu, and Guoping Hu. Attention-overattention neural networks for reading comprehension. arXiv preprint arXiv:1607.04423, 2016a.
|
| 197 |
+
|
| 198 |
+
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.
|
| 199 |
+
|
| 200 |
+
Bhuwan Dhingra, Hanxiao Liu, William W Cohen, and Ruslan Salakhutdinov. Gated-attention readers for text comprehension. arXiv preprint arXiv:1606.01549, 2016.
|
| 201 |
+
|
| 202 |
+
Yasser Ganjisaffar, Rich Caruana, and Cristina Lopes. Bagging gradient-boosted trees for high precision, low variance ranking models. pp. 85–94, 2011. doi: http://doi.acm.org/10.1145/2009916. 2009932.
|
| 203 |
+
|
| 204 |
+
Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014.
|
| 205 |
+
|
| 206 |
+
Edward Grefenstette, Karl Moritz Hermann, Mustafa Suleyman, and Phil Blunsom. Learning to transduce with unbounded memory. In Advances in Neural Information Processing Systems, pp. 1828–1836, 2015.
|
| 207 |
+
|
| 208 |
+
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.
|
| 209 |
+
Karl Moritz Hermann, Tomas Kocisky, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In Advances in Neural Information Processing Systems, pp. 1693–1701, 2015.
|
| 210 |
+
Felix Hill, Antoine Bordes, Sumit Chopra, and Jason Weston. The goldilocks principle: Reading children’s books with explicit memory representations. arXiv preprint arXiv:1511.02301, 2015.
|
| 211 |
+
Rudolf Kadlec, Martin Schmid, Ondrej Bajgar, and Jan Kleindienst. Text understanding with the attention sum reader network. ACL, 2016.
|
| 212 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 213 |
+
Sosuke Kobayashi, Ran Tian, Naoaki Okazaki, and Kentaro Inui. Dynamic entity representations with max-pooling improves machine reading. NAACL-HLT, 2016.
|
| 214 |
+
Christopher D. Manning, Mihai Surdeanu, John Bauer, Jenny Finkel, Steven J. Bethard, and David McClosky. The Stanford CoreNLP natural language processing toolkit. In Association for Computational Linguistics (ACL) System Demonstrations, pp. 55–60, 2014. URL http://www.aclweb.org/anthology/P/P14/P14-5010.
|
| 215 |
+
T. Onishi, H. Wang, M. Bansal, K. Gimpel, and D. McAllester. Who did What: A large-scale person-centered cloze dataset. In Proc. of EMNLP, 2016.
|
| 216 |
+
Jeffrey Pennington, Richard Socher, and Christopher D Manning. Glove: Global vectors for word representation. In EMNLP, volume 14, pp. 1532–43, 2014.
|
| 217 |
+
Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: $1 0 0 { , } 0 0 0 { + }$ questions for machine comprehension of text. arXiv preprint arXiv:1606.05250, 2016.
|
| 218 |
+
Matthew Richardson, Christopher JC Burges, and Erin Renshaw. Mctest: A challenge dataset for the open-domain machine comprehension of text. In EMNLP, volume 3, pp. 4, 2013.
|
| 219 |
+
Tim Rocktaschel, Edward Grefenstette, Karl Moritz Hermann, Tom ¨ a´s Ko ˇ cisk ˇ y, and Phil Blunsom. \` Reasoning about entailment with neural attention. arXiv preprint arXiv:1509.06664, 2015.
|
| 220 |
+
Cicero dos Santos, Ming Tan, Bing Xiang, and Bowen Zhou. Attentive pooling networks. arXiv preprint arXiv:1602.03609, 2016.
|
| 221 |
+
Alessandro Sordoni, Phillip Bachman, and Yoshua Bengio. Iterative alternating neural attention for machine reading. arXiv preprint arXiv:1606.02245, 2016.
|
| 222 |
+
Makarand Tapaswi, Yukun Zhu, Rainer Stiefelhagen, Antonio Torralba, Raquel Urtasun, and Sanja Fidler. Movieqa: Understanding stories in movies through question-answering. arXiv preprint arXiv:1512.02902, 2015.
|
| 223 |
+
Adam Trischler, Zheng Ye, Xingdi Yuan, Jing He, Phillip Bachman, and Kaheer Suleman. A parallel-hierarchical model for machine comprehension on sparse data. arXiv preprint arXiv:1603.08884, 2016a.
|
| 224 |
+
Adam Trischler, Zheng Ye, Xingdi Yuan, and Kaheer Suleman. Natural language comprehension with the epireader. arXiv preprint arXiv:1606.02270, 2016b.
|
| 225 |
+
Shuohang Wang and Jing Jiang. Learning natural language inference with lstm. arXiv preprint arXiv:1512.08849, 2015.
|
| 226 |
+
Shuohang Wang and Jing Jiang. Machine comprehension using match-lstm and answer pointer. arXiv preprint arXiv:1608.07905, 2016.
|
| 227 |
+
Dirk Weissenborn. Separating answers from queries for neural reading comprehension. arXiv
|
| 228 |
+
preprint arXiv:1607.03316, 2016.
|
| 229 |
+
|
| 230 |
+
Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. CoRR, abs/1410.3916, 2014. URL http://arxiv.org/abs/1410.3916.
|
| 231 |
+
|
| 232 |
+
Wenpeng Yin, Sebastian Ebert, and Hinrich Schutze. Attention-based convolutional neural network ¨ for machine comprehension. arXiv preprint arXiv:1602.04341, 2016.
|
| 233 |
+
|
| 234 |
+
Yang Yu, Wei Zhang, Chung-Wei Hang, and Bowen Zhou. Empirical study on deep learning models for question answering. arXiv preprint arXiv:1510.07526, 2015.
|
| 235 |
+
|
| 236 |
+
Wojciech Zaremba and Ilya Sutskever. Reinforcement learning neural turing machines. arXiv preprint arXiv:1505.00521, 362, 2015.
|
| 237 |
+
|
| 238 |
+
Wei Zhang, Yang Yu, and Bowen Zhou. Structured memory for neural turing machines. arXiv preprint arXiv:1510.03931, 2015.
|
parse/train/r1te3Fqel/r1te3Fqel_content_list.json
ADDED
|
@@ -0,0 +1,1167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "END-TO-END ANSWER CHUNK EXTRACTION AND RANKING FOR READING COMPREHENSION ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
98,
|
| 9 |
+
820,
|
| 10 |
+
146
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Yang Yu∗, Wei Zhang∗, Bowen Zhou, Kazi Hasan, Mo Yu, Bing Xiang {yu, zhangwei, zhou, kshasan, yum, bingxia} $@$ us.ibm.com IBM Watson, Yorktown Heights, NY, USA ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
183,
|
| 19 |
+
170,
|
| 20 |
+
661,
|
| 21 |
+
212
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "ABSTRACT ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
452,
|
| 31 |
+
250,
|
| 32 |
+
544,
|
| 33 |
+
263
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "This paper proposes dynamic chunk reader (DCR), an end-to-end neural reading comprehension (RC) model that is able to extract and rank a set of answer candidates from a given document to answer questions. DCR is able to predict answers of variable lengths, whereas previous neural RC models primarily focused on predicting single tokens or entities. DCR encodes a document and an input question with recurrent neural networks, and then applies a word-by-word attention mechanism to acquire question-aware representations for the document, followed by the generation of chunk representations and a ranking module to propose the topranked chunk as the answer. Experimental results show that DCR could achieve a $6 6 . 3 \\%$ Exact match and $7 4 . 7 \\%$ F1 score on the Stanford Question Answering Dataset (Rajpurkar et al., 2016). ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
280,
|
| 43 |
+
764,
|
| 44 |
+
433
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 INTRODUCTION ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
176,
|
| 54 |
+
459,
|
| 55 |
+
336,
|
| 56 |
+
474
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Reading comprehension-based question answering (RCQA) is the task of answering a question with a chunk of text taken from related document(s). A variety of neural models have been proposed recently either for extracting a single entity or a single token as an answer from a given text (Hermann et al., 2015; Kadlec et al., 2016; Trischler et al., 2016b; Dhingra et al., 2016; Chen et al., 2016; Sordoni et al., 2016; Cui et al., 2016a); or for selecting the correct answer by ranking a small set of human-provided candidates (Yin et al., 2016; Trischler et al., 2016a). In both cases, an answer boundary is either easy to determine or already given. ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
491,
|
| 66 |
+
823,
|
| 67 |
+
588
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "Different from the above two assumptions for RCQA, in the real-world QA scenario, people may ask questions about both entities (factoid) and non-entities such as explanations and reasons (nonfactoid) (see Table 1 for examples). ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
595,
|
| 77 |
+
823,
|
| 78 |
+
637
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "In this regard, RCQA has the potential to complement other QA approaches that leverage structured data (e.g., knowledge bases) for both the above question types. This is because RCQA can exploit the textual evidences to ensure increased answer coverage, which is particularly helpful for nonfactoid answers. However, it is also challenging for RCQA to identify answer in arbitrary position in the passage with arbitrary length, especially for non-factoid answers which might be clauses or sentences. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
645,
|
| 88 |
+
825,
|
| 89 |
+
727
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "As a result, apart from a few exceptions (Rajpurkar et al., 2016; Wang & Jiang, 2016), this research direction has not been fully explored yet. ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
734,
|
| 99 |
+
821,
|
| 100 |
+
763
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "Compared to the relatively easier RC task of predicting single tokens/entities1, predicting answers of arbitrary lengths and positions significantly increase the search space complexity: ",
|
| 107 |
+
"bbox": [
|
| 108 |
+
176,
|
| 109 |
+
770,
|
| 110 |
+
820,
|
| 111 |
+
799
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 0
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "the number of possible candidates to consider is in the order of $O ( n ^ { 2 } )$ , where $n$ is the number of passage words. In contrast, for previous works in which answers are single tokens/entities or from candidate lists, the complexity is in $O ( n )$ or the size of candidate lists $l$ (usually $l \\leq 5 ,$ ), respectively. To address the above complexity, Rajpurkar et al. (Rajpurkar et al., 2016) used a two-step chunkand-rank approach that employs a rule-based algorithm to extract answer candidates from a passage, followed by a ranking approach with hand-crafted features to select the best answer. The rule-based chunking approach suffered from low coverage $\\approx 7 0 \\%$ recall of answer chunks) that cannot be improved during training; and candidate ranking performance depends greatly on the quality of the hand-crafted features. More recently, Wang and Jiang (Wang & Jiang, 2016) proposed two end-toend neural network models, one of which chunks a candidate answer by predicting the answer’s two boundary indices and the other classifies each passage word into answer/not-answer. Both models improved significantly over the method proposed by Rajpurkar et al. (Rajpurkar et al., 2016). ",
|
| 118 |
+
"bbox": [
|
| 119 |
+
174,
|
| 120 |
+
805,
|
| 121 |
+
825,
|
| 122 |
+
876
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 0
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "table",
|
| 128 |
+
"img_path": "images/bab94fbbf274c189cab4fe7a9a6a5e95c26e71df357c58833c39b5f01a757520.jpg",
|
| 129 |
+
"table_caption": [
|
| 130 |
+
"Table 1: Example of questions (with answers) which can be potentially answered with RC on a Wikipedia passage. The first question is factoid, asking for an entity. The second and third are non-factoid. "
|
| 131 |
+
],
|
| 132 |
+
"table_footnote": [],
|
| 133 |
+
"table_body": "<table><tr><td>The United Kingdom (UK) intends to withdraw from the European Union (EU), a process commonly known as Brexit,as a result of a June 2O16 referendum in which 51.9% voted to leave the EU.The separation process is complex,causing political and economic changes for the UK and other countries.As of September 2016,neither the timetable nor the terms for withdrawal have been established: in the meantime,the UK remains a full member of the European Union.The term "Brexit”is a portmanteau of the words "British”and "exit".</td></tr><tr><td>Q1.Which country withdrew from EU in 2016? A1.UnitedKingdom</td></tr><tr><td>Q2.How did UK decide to leave the European Union? A2.as a result of a June 2O16 referendum in which 51.9% voted to leave the EU</td></tr><tr><td>Q3.What has not been finalized for Brexit as of September 2016? A3.neither the timetable nor the terms forwithdrawal</td></tr></table>",
|
| 134 |
+
"bbox": [
|
| 135 |
+
302,
|
| 136 |
+
155,
|
| 137 |
+
694,
|
| 138 |
+
290
|
| 139 |
+
],
|
| 140 |
+
"page_idx": 1
|
| 141 |
+
},
|
| 142 |
+
{
|
| 143 |
+
"type": "text",
|
| 144 |
+
"text": "",
|
| 145 |
+
"bbox": [
|
| 146 |
+
174,
|
| 147 |
+
318,
|
| 148 |
+
825,
|
| 149 |
+
416
|
| 150 |
+
],
|
| 151 |
+
"page_idx": 1
|
| 152 |
+
},
|
| 153 |
+
{
|
| 154 |
+
"type": "text",
|
| 155 |
+
"text": "Our proposed model, called dynamic chunk reader $( D C R )$ , not only significantly differs from both the above systems in the way that answer candidates are generated and ranked, but also shares merits with both works. First, our model uses deep networks to learn better representations for candidate answer chunks, instead of using fixed feature representations as in (Rajpurkar et al., 2016). Second, it represents answer candidates as chunks, as in (Rajpurkar et al., 2016), instead of wordlevel representations (Wang & Jiang, 2016), to make the model aware of the subtle differences among candidates (importantly, overlapping candidates). ",
|
| 156 |
+
"bbox": [
|
| 157 |
+
173,
|
| 158 |
+
422,
|
| 159 |
+
825,
|
| 160 |
+
521
|
| 161 |
+
],
|
| 162 |
+
"page_idx": 1
|
| 163 |
+
},
|
| 164 |
+
{
|
| 165 |
+
"type": "text",
|
| 166 |
+
"text": "The contributions of this paper are three-fold. (1) We propose a novel neural network model for joint candidate answer chunking and ranking, where the candidate answer chunks are dynamically constructed and ranked in an end-to-end manner. (2) we propose a new question-attention mechanism to enhance passage word representation, which is subsequently used to construct chunk representations. (3) We also propose several simple but effective features to strengthen the attention mechanism, which fundamentally improves candidate ranking, with the by-product of higher exact boundary match accuracy. ",
|
| 167 |
+
"bbox": [
|
| 168 |
+
173,
|
| 169 |
+
527,
|
| 170 |
+
825,
|
| 171 |
+
626
|
| 172 |
+
],
|
| 173 |
+
"page_idx": 1
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"type": "text",
|
| 177 |
+
"text": "The experiments on the Stanford Question Answering Dataset (SQuAD) (Rajpurkar et al., 2016), which contains a variety of human-generated factoid and non-factoid questions, have shown the effectiveness of above three contributions. ",
|
| 178 |
+
"bbox": [
|
| 179 |
+
176,
|
| 180 |
+
631,
|
| 181 |
+
825,
|
| 182 |
+
674
|
| 183 |
+
],
|
| 184 |
+
"page_idx": 1
|
| 185 |
+
},
|
| 186 |
+
{
|
| 187 |
+
"type": "text",
|
| 188 |
+
"text": "Our paper is organized as follows. We formally define the RCQA problem first. Next, we describe our baseline with a neural network component. We present the end-to-end dynamic chunk reader model next. Finally, we analyze our experimental results and discuss the related work. In appendix, we show formal equations and details of the model. ",
|
| 189 |
+
"bbox": [
|
| 190 |
+
174,
|
| 191 |
+
680,
|
| 192 |
+
825,
|
| 193 |
+
737
|
| 194 |
+
],
|
| 195 |
+
"page_idx": 1
|
| 196 |
+
},
|
| 197 |
+
{
|
| 198 |
+
"type": "text",
|
| 199 |
+
"text": "2 PROBLEM DEFINITION ",
|
| 200 |
+
"text_level": 1,
|
| 201 |
+
"bbox": [
|
| 202 |
+
176,
|
| 203 |
+
760,
|
| 204 |
+
393,
|
| 205 |
+
776
|
| 206 |
+
],
|
| 207 |
+
"page_idx": 1
|
| 208 |
+
},
|
| 209 |
+
{
|
| 210 |
+
"type": "text",
|
| 211 |
+
"text": "Table 1 shows an example of our RC setting where the goal is to answer a question $Q _ { i }$ , factoid (Q1) or non-factoid (Q2 and Q3), based on a supporting passage $P _ { i }$ , by selecting a continuous sequence of text $A _ { i } \\subseteq P _ { i }$ as answer. $Q _ { i } , P _ { i }$ , and $A _ { i }$ are all word sequences, where each word is drawn from a vocabulary, $V$ . The $i$ -th instance in the training set is a triple in the form of $( P _ { i } , Q _ { i } , A _ { i } )$ , where $P _ { i } = ( p _ { i 1 } , \\dots , p _ { i | P _ { i } | } )$ , $Q _ { i } = ( q _ { i 1 } , \\dots , q _ { i | Q _ { i } | } )$ , and $A _ { i } = \\left( a _ { i 1 } , \\ldots , a _ { i | A _ { i } | } \\right) ( p _ { i \\cdot } , q _ { i \\cdot } , a _ { i \\cdot } \\in V )$ . Owing to the disagreement among annotators, there could be more than one correct answer for the samequestion; and the k-th answer to Qi is denoted by Aki = {aki1, . . . , aki|Aki |}. An answer candidate for the -th training example is defined as $c _ { i } ^ { m , n }$ , a sub-sequence in $P _ { i }$ , that spans from position $m$ to $n$ $( 1 \\leq m \\leq n \\leq | P _ { i } | )$ . The ground truth answer $A _ { i }$ could be included in the set of all candidates ",
|
| 212 |
+
"bbox": [
|
| 213 |
+
173,
|
| 214 |
+
792,
|
| 215 |
+
825,
|
| 216 |
+
924
|
| 217 |
+
],
|
| 218 |
+
"page_idx": 1
|
| 219 |
+
},
|
| 220 |
+
{
|
| 221 |
+
"type": "text",
|
| 222 |
+
"text": "$C _ { i } = \\{ c _ { i } ^ { m , n } ~ | \\forall m , n \\in N ^ { + } , s u b j ( m , n , P _ { i } )$ and $1 \\leq m \\leq n \\leq | P _ { i } | \\}$ , where $s u b j ( m , n , P _ { i } )$ is i the constraint put on the candidate chunk for $P _ { i }$ , such as, $^ { \\cdot \\mathfrak { e } _ { c _ { i } } m , n }$ can have at most 10 tokens”, or $c _ { i } ^ { m , n }$ must have a pre-defined POS pattern”. To evaluate a system’s performance, its top answer to a question is matched against the corresponding gold standard answer(s). ",
|
| 223 |
+
"bbox": [
|
| 224 |
+
174,
|
| 225 |
+
102,
|
| 226 |
+
825,
|
| 227 |
+
159
|
| 228 |
+
],
|
| 229 |
+
"page_idx": 2
|
| 230 |
+
},
|
| 231 |
+
{
|
| 232 |
+
"type": "text",
|
| 233 |
+
"text": "Remark: Categories of RC Tasks Other simpler variants of the aforementioned RC task were explored in the past. For example, quiz-style datasets (e.g., MCTest (Richardson et al., 2013), MovieQA (Tapaswi et al., 2015)) have multiple-choice questions with answer options. Cloze-style datesets(Hermann et al., 2015; Hill et al., 2015; Onishi et al., 2016), usually automatically generated, have factoid “question”s created by replacing the answer in a sentence from the text with blank. For the answer selection task this paper focuses on, several datasets exist, e.g. TREC-QA for factoid answer extraction from multiple given passages, bAbI (Weston et al., 2014) designed for inference purpose, and the SQuAD dataset (Rajpurkar et al., 2016) used in this paper. To the best of our knowledge, the SQuAD dataset is the only one for both factoid and non-factoid answer extraction with a question distribution more close to real-world applications. ",
|
| 234 |
+
"bbox": [
|
| 235 |
+
174,
|
| 236 |
+
176,
|
| 237 |
+
825,
|
| 238 |
+
315
|
| 239 |
+
],
|
| 240 |
+
"page_idx": 2
|
| 241 |
+
},
|
| 242 |
+
{
|
| 243 |
+
"type": "text",
|
| 244 |
+
"text": "3 BASELINE: CHUNK-AND-RANK PIPELINE WITH NEURAL RC",
|
| 245 |
+
"text_level": 1,
|
| 246 |
+
"bbox": [
|
| 247 |
+
174,
|
| 248 |
+
337,
|
| 249 |
+
709,
|
| 250 |
+
353
|
| 251 |
+
],
|
| 252 |
+
"page_idx": 2
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
"type": "text",
|
| 256 |
+
"text": "In this section we modified a state-of-the-art RC system for cloze-style tasks for our answer extraction purpose, to see how much gap we have for the two type of tasks, and to inspire our end-to-end system in the next section. In order to make the cloze-style RC system to make chunk-level decision, we use the RC model to generate features for chunks, which are further used in a feature-based ranker like in (Rajpurkar et al., 2016). As a result, this baseline can be viewed as a deep learning based counterpart of the system in (Rajpurkar et al., 2016). It has two main components: 1) a standalone answer chunker, which is trained to produce overlapping candidate chunks, and 2) a neural RC model, which is used to score each word in a given passage to be used thereafter for generating chunk scores. ",
|
| 257 |
+
"bbox": [
|
| 258 |
+
173,
|
| 259 |
+
368,
|
| 260 |
+
825,
|
| 261 |
+
494
|
| 262 |
+
],
|
| 263 |
+
"page_idx": 2
|
| 264 |
+
},
|
| 265 |
+
{
|
| 266 |
+
"type": "text",
|
| 267 |
+
"text": "Answer Chunking To reduce the errors generated by the rule-based chunker in (Rajpurkar et al., 2016), first, we capture the part-of-speech (POS) pattern of all answer sub-sequences in the training dataset to form a POS pattern trie tree, and then apply the answer POS patterns to passage $P _ { i }$ to acquire a collection of all subsequences (chunk candidates) $C _ { i }$ whose POS patterns can be matched to the POS pattern trie. This is equivalent to putting an constraint $s u b j ( m , n , P _ { i } )$ to candidate answer chunk generation process that only choose the chunk with a POS pattern seen for answers in the training data. Then the sub-sequences $C _ { i }$ are used as answer candidates for $P _ { i }$ . Note that overlapping chunks could be generated for a passage, and we rely on the ranker to choose the best candidate based on features from the cloze-style RC system. Experiments showed that for $> 9 0 \\%$ of the questions on the development set, the ground truth answer is included in the candidate set constructed in such manner. ",
|
| 268 |
+
"bbox": [
|
| 269 |
+
173,
|
| 270 |
+
501,
|
| 271 |
+
825,
|
| 272 |
+
654
|
| 273 |
+
],
|
| 274 |
+
"page_idx": 2
|
| 275 |
+
},
|
| 276 |
+
{
|
| 277 |
+
"type": "text",
|
| 278 |
+
"text": "Feature Extraction and Ranking For chunk ranking, we (1) use neural RCQA model to annotate each $p _ { i j }$ in passage $P _ { i }$ to get score $s _ { i j }$ , then (2) for every chunk m,n $c _ { i } ^ { m , n }$ in passage $i$ , collect scores $( s _ { i m } , \\ldots , s _ { i n } )$ for all the $( p _ { i m } , . . . , \\bar { p _ { i n } ) }$ contained within $c _ { i } ^ { m , n }$ , and (3) extract features on the sequence of scores $( s _ { i m } , \\ldots , s _ { i n } )$ to characterize its scale and distribution information, which serves as the feature representation of $c _ { i } ^ { m , n }$ . In step (1) to acquire $s _ { i j }$ we train and apply a word-level single-layer Gated Attention Reader 2 (Dhingra et al., 2016), which has state-of-the-art performance on CNN/DailyMail cloze-style RC task. In step (3) for chunk $c _ { i } ^ { m , n }$ , we designed 5 features, including 4 statistics on $( s _ { i m } , \\ldots , s _ { i n } )$ : maximum, minimum, average and sum; as well as the count of matched POS pattern within the chunk, which serves as an answer prior. We use these 5 features in a state-of-the-art ranker (Ganjisaffar et al., 2011). ",
|
| 279 |
+
"bbox": [
|
| 280 |
+
173,
|
| 281 |
+
660,
|
| 282 |
+
825,
|
| 283 |
+
801
|
| 284 |
+
],
|
| 285 |
+
"page_idx": 2
|
| 286 |
+
},
|
| 287 |
+
{
|
| 288 |
+
"type": "text",
|
| 289 |
+
"text": "4 DYNAMIC CHUNK READER ",
|
| 290 |
+
"text_level": 1,
|
| 291 |
+
"bbox": [
|
| 292 |
+
176,
|
| 293 |
+
823,
|
| 294 |
+
431,
|
| 295 |
+
839
|
| 296 |
+
],
|
| 297 |
+
"page_idx": 2
|
| 298 |
+
},
|
| 299 |
+
{
|
| 300 |
+
"type": "text",
|
| 301 |
+
"text": "The dynamic chunk reader (DCR) model is presented in Figure 1. Inspired by the baseline we built, DCR is deemed to be superior to the baseline for 3 reasons. First, each chunk has a representation constructed dynamically, instead of having a set of pre-defined feature values. Second, each passage word’s representation is enhanced by word-by-word attention that evaluates the relevance of the passage word to the question. Third, these components are all within a single, end-to-end model that can be trained in a joint manner. ",
|
| 302 |
+
"bbox": [
|
| 303 |
+
176,
|
| 304 |
+
856,
|
| 305 |
+
825,
|
| 306 |
+
897
|
| 307 |
+
],
|
| 308 |
+
"page_idx": 2
|
| 309 |
+
},
|
| 310 |
+
{
|
| 311 |
+
"type": "image",
|
| 312 |
+
"img_path": "images/2d7fa2bcffe1e1ec3ed7e08c232619bb6ed78a3061b638c77100ea15400df95b.jpg",
|
| 313 |
+
"image_caption": [
|
| 314 |
+
"Figure 1: The main components in dynamic chunk reader model (from bottom to top) are bi-GRU encoders for passage and question, a word-by-word attention bi-GRU for passage, dynamic chunk representations that are transformed from pooled dynamic chunks of hidden states, the question attention on every chunk representation and final answer chunk prediction. "
|
| 315 |
+
],
|
| 316 |
+
"image_footnote": [],
|
| 317 |
+
"bbox": [
|
| 318 |
+
218,
|
| 319 |
+
101,
|
| 320 |
+
777,
|
| 321 |
+
434
|
| 322 |
+
],
|
| 323 |
+
"page_idx": 3
|
| 324 |
+
},
|
| 325 |
+
{
|
| 326 |
+
"type": "text",
|
| 327 |
+
"text": "",
|
| 328 |
+
"bbox": [
|
| 329 |
+
176,
|
| 330 |
+
526,
|
| 331 |
+
820,
|
| 332 |
+
569
|
| 333 |
+
],
|
| 334 |
+
"page_idx": 3
|
| 335 |
+
},
|
| 336 |
+
{
|
| 337 |
+
"type": "text",
|
| 338 |
+
"text": "DCR works in four steps. First, the encoder layer encodes passage and question separately, by using bidirectional recurrent neural networks (RNN). ",
|
| 339 |
+
"bbox": [
|
| 340 |
+
171,
|
| 341 |
+
575,
|
| 342 |
+
823,
|
| 343 |
+
603
|
| 344 |
+
],
|
| 345 |
+
"page_idx": 3
|
| 346 |
+
},
|
| 347 |
+
{
|
| 348 |
+
"type": "text",
|
| 349 |
+
"text": "Second, the attention layer calculates the relevance of each passage word to the question. ",
|
| 350 |
+
"bbox": [
|
| 351 |
+
171,
|
| 352 |
+
611,
|
| 353 |
+
759,
|
| 354 |
+
626
|
| 355 |
+
],
|
| 356 |
+
"page_idx": 3
|
| 357 |
+
},
|
| 358 |
+
{
|
| 359 |
+
"type": "text",
|
| 360 |
+
"text": "Third, the convolution layer generates unigram, bigram and trigram representation for each word. bigram and trigram of a word ends with the same word, and proper padding is applied on the first word to make sure the output is the same length as input to CNN layer. ",
|
| 361 |
+
"bbox": [
|
| 362 |
+
174,
|
| 363 |
+
632,
|
| 364 |
+
825,
|
| 365 |
+
674
|
| 366 |
+
],
|
| 367 |
+
"page_idx": 3
|
| 368 |
+
},
|
| 369 |
+
{
|
| 370 |
+
"type": "text",
|
| 371 |
+
"text": "Fourth, the chunk representation layer dynamically extracts the candidate chunks from the given passage, and create chunk representation that encodes the contextual information of each chunk. ",
|
| 372 |
+
"bbox": [
|
| 373 |
+
173,
|
| 374 |
+
681,
|
| 375 |
+
823,
|
| 376 |
+
709
|
| 377 |
+
],
|
| 378 |
+
"page_idx": 3
|
| 379 |
+
},
|
| 380 |
+
{
|
| 381 |
+
"type": "text",
|
| 382 |
+
"text": "Fifth, the ranker layer scores the relevance between the representations of a chunk and the given question, and ranks all candidate chunks using a softmax layer. ",
|
| 383 |
+
"bbox": [
|
| 384 |
+
173,
|
| 385 |
+
717,
|
| 386 |
+
821,
|
| 387 |
+
744
|
| 388 |
+
],
|
| 389 |
+
"page_idx": 3
|
| 390 |
+
},
|
| 391 |
+
{
|
| 392 |
+
"type": "text",
|
| 393 |
+
"text": "We describe each step below. ",
|
| 394 |
+
"bbox": [
|
| 395 |
+
176,
|
| 396 |
+
752,
|
| 397 |
+
364,
|
| 398 |
+
766
|
| 399 |
+
],
|
| 400 |
+
"page_idx": 3
|
| 401 |
+
},
|
| 402 |
+
{
|
| 403 |
+
"type": "text",
|
| 404 |
+
"text": "Encoder Layer We use bi-directional RNN encoder to encode $P _ { i }$ and $Q _ { i }$ of example $i$ , and get hidden state for each word position $p _ { i j }$ and $q _ { i k }$ .3 As RNN input, a word is represented by a row vector $x \\in \\mathbb { R } ^ { n }$ . $x$ can be the concatenation of word embedding and word features (see Fig. 1). The word vector for the $t$ -th word is $x _ { t }$ . A word sequence is processed using an RNN encoder with gated recurrent units (GRU) (Cho et al., 2014), which was proved to be effective in RC and neural machine translation tasks (Bahdanau et al., 2015; Kadlec et al., 2016; Dhingra et al., 2016). For each position $t$ , GRU computes $h _ { t }$ with input $x _ { t }$ and previous state $h _ { t - 1 }$ , as: ",
|
| 405 |
+
"bbox": [
|
| 406 |
+
174,
|
| 407 |
+
772,
|
| 408 |
+
825,
|
| 409 |
+
871
|
| 410 |
+
],
|
| 411 |
+
"page_idx": 3
|
| 412 |
+
},
|
| 413 |
+
{
|
| 414 |
+
"type": "equation",
|
| 415 |
+
"img_path": "images/638987699f826ef902bf7a84fe8f608079d5028f0067c9feeb3c56e678cbc009.jpg",
|
| 416 |
+
"text": "$$\n\\begin{array} { l c l } { { r _ { t } } } & { { = } } & { { \\sigma ( W _ { r } { x _ { t } } + U _ { r } { h _ { t - 1 } } ) } } \\\\ { { u _ { t } } } & { { = } } & { { \\sigma ( W _ { u } { x _ { t } } + U _ { u } { h _ { t - 1 } } ) } } \\\\ { { \\bar { h _ { t } } } } & { { = } } & { { t a n h ( W { x _ { t } } + U ( r _ { t } \\odot { h _ { t - 1 } } ) ) } } \\\\ { { h _ { t } } } & { { = } } & { { ( 1 - u _ { t } ) \\cdot h _ { t - 1 } + u _ { t } \\cdot \\bar { h _ { t } } } } \\end{array}\n$$",
|
| 417 |
+
"text_format": "latex",
|
| 418 |
+
"bbox": [
|
| 419 |
+
370,
|
| 420 |
+
122,
|
| 421 |
+
625,
|
| 422 |
+
194
|
| 423 |
+
],
|
| 424 |
+
"page_idx": 4
|
| 425 |
+
},
|
| 426 |
+
{
|
| 427 |
+
"type": "text",
|
| 428 |
+
"text": "where $h _ { t } , r _ { t }$ , and $u _ { t } \\in \\mathbb { R } ^ { d }$ are ${ \\mathrm { d } }$ -dimensional hidden state, reset gate, and update gate, respectively; $W _ { \\{ r , u \\} }$ , $W \\in \\mathbb { R } ^ { n \\times d }$ and $U _ { \\{ r , u \\} }$ , $U \\in \\mathbb { R } ^ { d \\times d }$ are the parameters of the GRU; $\\sigma$ is the sigmoid function, and $\\odot$ denotes element-wise production. For a word at $t$ , we use the hidden state $\\vec { h _ { t } }$ from the forward RNN as a representation of the preceding context, and the $\\smash { \\overleftarrow { h } _ { t } }$ from a backward RNN that encodes text reversely, to incorporate the context after $t$ . Next, $h _ { t } = [ \\overrightarrow { h _ { t } } ; \\overleftarrow { h _ { t } } ]$ , the bi-directional contextual encoding of $x _ { t }$ , is formed. $[ \\cdot ; \\cdot ]$ is the concatenation operator. To distinguish hidden states from different sources, we denote the $h _ { j }$ of $j$ -th word in $P$ and the $h _ { k }$ of $k$ -th word in $Q$ as $h _ { j } ^ { p }$ and $h _ { k } ^ { q }$ respectively. ",
|
| 429 |
+
"bbox": [
|
| 430 |
+
173,
|
| 431 |
+
195,
|
| 432 |
+
825,
|
| 433 |
+
319
|
| 434 |
+
],
|
| 435 |
+
"page_idx": 4
|
| 436 |
+
},
|
| 437 |
+
{
|
| 438 |
+
"type": "text",
|
| 439 |
+
"text": "Attention Layer Attention mechanism in previous RC tasks (Kadlec et al., 2016; Hermann et al., 2015; Sordoni et al., 2016; Dhingra et al., 2016; Cui et al., 2016a;b) enables question-aware passage representations. We propose a novel attention mechanism inspired by word-by-word style attention methods (Rocktaschel et al., 2015; Wang & Jiang, 2015; Santos et al., 2016). For each ¨ $p _ { j }$ , a questionattended representation $v _ { j }$ is computed as follows (example index $i$ is omitted for simplicity): ",
|
| 440 |
+
"bbox": [
|
| 441 |
+
173,
|
| 442 |
+
325,
|
| 443 |
+
825,
|
| 444 |
+
396
|
| 445 |
+
],
|
| 446 |
+
"page_idx": 4
|
| 447 |
+
},
|
| 448 |
+
{
|
| 449 |
+
"type": "equation",
|
| 450 |
+
"img_path": "images/b4152f631ba5da458124392ee2603835df646a391293e8ed2b7e4abd58e68ef1.jpg",
|
| 451 |
+
"text": "$$\n\\begin{array} { r c l } { { \\alpha _ { j k } } } & { { = } } & { { { h _ { j } ^ { p } \\cdot h _ { k } ^ { q } , } } } \\\\ { { } } & { { } } & { { } } \\\\ { { \\beta _ { j } } } & { { = } } & { { \\displaystyle \\sum _ { k = 1 } ^ { | Q | } \\alpha _ { j k } h _ { k } ^ { q } } } \\\\ { { } } & { { } } & { { } } \\\\ { { v _ { j } } } & { { = } } & { { \\displaystyle [ h _ { j } ^ { p } ; \\beta _ { j } ] } } \\end{array}\n$$",
|
| 452 |
+
"text_format": "latex",
|
| 453 |
+
"bbox": [
|
| 454 |
+
428,
|
| 455 |
+
419,
|
| 456 |
+
568,
|
| 457 |
+
508
|
| 458 |
+
],
|
| 459 |
+
"page_idx": 4
|
| 460 |
+
},
|
| 461 |
+
{
|
| 462 |
+
"type": "text",
|
| 463 |
+
"text": "where $h _ { j } ^ { p }$ and $h _ { k } ^ { q }$ are hidden states from the bi-directional RNN encoders (see Figure 1). An inner product, $\\alpha _ { j k }$ , is calculated between $h _ { j } ^ { p }$ and every question word $h _ { k } ^ { q }$ . It indicates how well the passage word $p _ { j }$ matches with every question word $q _ { k }$ . $\\beta _ { j }$ is a weighted pooling of $| Q |$ question hidden states, which serves as a $p _ { j }$ -aware question representation. The concatenation of $h _ { j } ^ { p }$ and $\\beta _ { j }$ leads to a passage-question joint representation, $v _ { j } \\in \\mathbb { R } ^ { 4 d }$ .4 Next, we apply a second bi-GRU layer taking the $v _ { j } \\mathbf { s }$ as inputs, and obtain forward and backward representations $\\overrightarrow { \\gamma _ { j } ^ { \\prime } }$ and $\\{ \\overline { { \\gamma _ { j } } } \\in \\mathbb { R } ^ { d }$ , and in turn their concatenation, $\\gamma _ { j } = [ \\overrightarrow { \\gamma _ { j } ^ { \\ast } } ; \\overleftarrow { \\gamma _ { j } } ]$ . ",
|
| 464 |
+
"bbox": [
|
| 465 |
+
173,
|
| 466 |
+
517,
|
| 467 |
+
825,
|
| 468 |
+
628
|
| 469 |
+
],
|
| 470 |
+
"page_idx": 4
|
| 471 |
+
},
|
| 472 |
+
{
|
| 473 |
+
"type": "text",
|
| 474 |
+
"text": "Convolution Layer Every word is encoded with complete passage context through attention layer RNN. We would like to model more complex representation of the words, by introducing unigram, bigram and trigram representations. There are two benefits for this enhanced representation: 1) each word could be enhanced with local context information to help identify the boundary of the answer chunk. Using previous words has been a common feature used in POS tagging and Named entity recognition; and 2) The information brought in by the ngram into the word representation could enhance the semantic match between the answer chunk internal and the question. Imagine scenario of a three word candidate, where the last word representation includes the two previous words through the convolution layer. Matching to the last word could also lead to the match to the semantics of the internal of the chunk. Specifically, we create for every word position $j$ three representations, by using ngrams ending with the hidden state $j$ : ",
|
| 475 |
+
"bbox": [
|
| 476 |
+
173,
|
| 477 |
+
632,
|
| 478 |
+
825,
|
| 479 |
+
786
|
| 480 |
+
],
|
| 481 |
+
"page_idx": 4
|
| 482 |
+
},
|
| 483 |
+
{
|
| 484 |
+
"type": "equation",
|
| 485 |
+
"img_path": "images/16f5b7ccdc348cf1ac78399c6dc27bcc6ef9b6f5a637c6fb5e10fcf9b235c597.jpg",
|
| 486 |
+
"text": "$$\n\\begin{array} { r c l } { \\tilde { \\gamma } _ { j 1 } } & { = } & { \\gamma _ { j } \\cdot W _ { c 1 } } \\\\ { \\tilde { \\gamma } _ { j 2 } } & { = } & { \\left[ \\gamma _ { j - 1 } ; \\gamma _ { j } \\right] \\cdot W _ { c 2 } } \\\\ { \\tilde { \\gamma } _ { j 3 } } & { = } & { \\left[ \\gamma _ { j - 2 } ; \\gamma _ { j - 1 } ; \\gamma _ { j } \\right] \\cdot W _ { c 3 } } \\end{array}\n$$",
|
| 487 |
+
"text_format": "latex",
|
| 488 |
+
"bbox": [
|
| 489 |
+
390,
|
| 490 |
+
810,
|
| 491 |
+
606,
|
| 492 |
+
867
|
| 493 |
+
],
|
| 494 |
+
"page_idx": 4
|
| 495 |
+
},
|
| 496 |
+
{
|
| 497 |
+
"type": "text",
|
| 498 |
+
"text": "The details shown in equations above. We used three different convolution kernels for different n-grams. ",
|
| 499 |
+
"bbox": [
|
| 500 |
+
173,
|
| 501 |
+
103,
|
| 502 |
+
823,
|
| 503 |
+
132
|
| 504 |
+
],
|
| 505 |
+
"page_idx": 5
|
| 506 |
+
},
|
| 507 |
+
{
|
| 508 |
+
"type": "text",
|
| 509 |
+
"text": "Chunk Representation Layer A candidate answer chunk representation is dynamically created given convolution layer output. We first decide the text boundary for the candidate chunk, and then form a chunk representation using all or part of those $\\gamma _ { j }$ outputs inside the chunk. To decide a candidate chunk (boundary): we tried two ways: (1) adopt the $P O S$ trie-based approach used in our baseline, and (2) enumerate all possible chunks up to a maximum number of tokens. For (2), we create up to $N$ (max chunk length) chunks starting from any position $j$ in $P _ { j }$ . Approach (1) can generate candidates with arbitrary lengths, but fails to recall candidates whose POS pattern is unseen in training set; whereas approach (2) considers all possible candidates within a window and is more flexible, but over-generates invalid candidates. ",
|
| 510 |
+
"bbox": [
|
| 511 |
+
174,
|
| 512 |
+
138,
|
| 513 |
+
825,
|
| 514 |
+
265
|
| 515 |
+
],
|
| 516 |
+
"page_idx": 5
|
| 517 |
+
},
|
| 518 |
+
{
|
| 519 |
+
"type": "text",
|
| 520 |
+
"text": "For a candidate answer chunk $c ^ { m , n }$ spanning from position $m$ to $n$ inclusively, we construct chunk representation $\\overline { { \\gamma } } _ { m , n } ^ { l } ~ \\in ~ \\mathbb { R } ^ { 2 d }$ using every $\\tilde { \\gamma } _ { j l }$ within range $[ m , n ]$ , with a function $g ( \\cdot )$ , and $l \\in$ $\\{ 1 , 2 , 3 \\}$ . Formally, ",
|
| 521 |
+
"bbox": [
|
| 522 |
+
174,
|
| 523 |
+
270,
|
| 524 |
+
825,
|
| 525 |
+
315
|
| 526 |
+
],
|
| 527 |
+
"page_idx": 5
|
| 528 |
+
},
|
| 529 |
+
{
|
| 530 |
+
"type": "equation",
|
| 531 |
+
"img_path": "images/81ba099f64f42cbfad98c4883708576483e644b878c6088d51a288253799c180.jpg",
|
| 532 |
+
"text": "$$\n\\overline { { \\gamma } } _ { m , n } ^ { l } = g ( \\widetilde { \\gamma } _ { m l } , \\ldots , \\widetilde { \\gamma } _ { n l } )\n$$",
|
| 533 |
+
"text_format": "latex",
|
| 534 |
+
"bbox": [
|
| 535 |
+
400,
|
| 536 |
+
319,
|
| 537 |
+
563,
|
| 538 |
+
340
|
| 539 |
+
],
|
| 540 |
+
"page_idx": 5
|
| 541 |
+
},
|
| 542 |
+
{
|
| 543 |
+
"type": "text",
|
| 544 |
+
"text": "Each $\\tilde { \\gamma } _ { j l }$ is a convolution output over concatenated forward and backward RNN hidden states from attention layer. So the first half in $\\tilde { \\gamma } _ { j l }$ encodes information in forward RNN hidden states and the second half encodes information in backward RNN hidden states. We experimented with several pooling functions (e.g., max, average) for $g ( \\cdot )$ , and found out that, instead of pooling, the best $g ( \\cdot )$ function is to concatenate the first half of convolution output of the chunk’s first word and the second half of convolution output of the chunk’s last word. Formally, ",
|
| 545 |
+
"bbox": [
|
| 546 |
+
173,
|
| 547 |
+
343,
|
| 548 |
+
825,
|
| 549 |
+
426
|
| 550 |
+
],
|
| 551 |
+
"page_idx": 5
|
| 552 |
+
},
|
| 553 |
+
{
|
| 554 |
+
"type": "equation",
|
| 555 |
+
"img_path": "images/c5c0585487269fe59dac4dfc27ca990fde21fad7b4ddcc2b415896aee5a3c90e.jpg",
|
| 556 |
+
"text": "$$\n\\overline { { \\gamma } } _ { m , n } ^ { l } = g ( \\widetilde { \\gamma } _ { m l } , \\dots , \\widetilde { \\gamma } _ { n l } ) = [ \\overrightarrow { \\widetilde { \\gamma } _ { m l } } ; \\overleftarrow { \\widetilde { \\gamma } _ { n l } } ]\n$$",
|
| 557 |
+
"text_format": "latex",
|
| 558 |
+
"bbox": [
|
| 559 |
+
357,
|
| 560 |
+
430,
|
| 561 |
+
607,
|
| 562 |
+
452
|
| 563 |
+
],
|
| 564 |
+
"page_idx": 5
|
| 565 |
+
},
|
| 566 |
+
{
|
| 567 |
+
"type": "text",
|
| 568 |
+
"text": "where $\\overrightarrow { \\tilde { \\gamma } _ { m l } }$ is half of the hidden state for $l$ -gram word representation corresponding to forward attention RNN output. We hypothesize that the hidden states at that two ends can better represent the chunk’s contexts, which is critical for this task, than the states within the chunk. This observation also agrees with (Kobayashi et al., 2016). ",
|
| 569 |
+
"bbox": [
|
| 570 |
+
174,
|
| 571 |
+
457,
|
| 572 |
+
825,
|
| 573 |
+
515
|
| 574 |
+
],
|
| 575 |
+
"page_idx": 5
|
| 576 |
+
},
|
| 577 |
+
{
|
| 578 |
+
"type": "text",
|
| 579 |
+
"text": "Ranker Layer A score $s _ { m , n } ^ { l }$ for each $l$ -gram chunk representation $\\overline { { \\gamma } } _ { m , n } ^ { l }$ denoting the probability of that chunk to be the true answer is calculated by dot product with question representation. The question representation is the concatenation of the last hidden state in forward RNN and the first hidden state in backward RNN. Formally for the chunk $c _ { i } ^ { m , n }$ we have ",
|
| 580 |
+
"bbox": [
|
| 581 |
+
173,
|
| 582 |
+
521,
|
| 583 |
+
825,
|
| 584 |
+
578
|
| 585 |
+
],
|
| 586 |
+
"page_idx": 5
|
| 587 |
+
},
|
| 588 |
+
{
|
| 589 |
+
"type": "equation",
|
| 590 |
+
"img_path": "images/76088968637e7edca27b1fbdc01f94cfdf3af549f988ee5ecaad24bb6c9d56f4.jpg",
|
| 591 |
+
"text": "$$\ns ^ { l } ( c _ { i } ^ { m , n } | P _ { i } , Q _ { i } ) = \\overline { { { \\gamma } } } _ { m , n } ^ { l } \\cdot [ \\overrightarrow { h _ { | Q _ { i } ^ { d } | } ^ { Q _ { i } } } ; \\overleftrightarrow { h _ { 1 } ^ { Q _ { i } } } ]\n$$",
|
| 592 |
+
"text_format": "latex",
|
| 593 |
+
"bbox": [
|
| 594 |
+
357,
|
| 595 |
+
582,
|
| 596 |
+
607,
|
| 597 |
+
608
|
| 598 |
+
],
|
| 599 |
+
"page_idx": 5
|
| 600 |
+
},
|
| 601 |
+
{
|
| 602 |
+
"type": "text",
|
| 603 |
+
"text": "where $s ^ { l }$ denotes the score generated from $l$ -gram representatio n. −−→hQik or h Q ik is the $k$ -th hidden state output from question $Q _ { i }$ ’s forward and backward RNN encoder, respectively. ",
|
| 604 |
+
"bbox": [
|
| 605 |
+
174,
|
| 606 |
+
613,
|
| 607 |
+
825,
|
| 608 |
+
648
|
| 609 |
+
],
|
| 610 |
+
"page_idx": 5
|
| 611 |
+
},
|
| 612 |
+
{
|
| 613 |
+
"type": "text",
|
| 614 |
+
"text": "After that, the final score for cmi $c _ { i } ^ { m , n }$ is evaluated as the linear combination of three scores, followed by a softmax: ",
|
| 615 |
+
"bbox": [
|
| 616 |
+
169,
|
| 617 |
+
654,
|
| 618 |
+
823,
|
| 619 |
+
683
|
| 620 |
+
],
|
| 621 |
+
"page_idx": 5
|
| 622 |
+
},
|
| 623 |
+
{
|
| 624 |
+
"type": "equation",
|
| 625 |
+
"img_path": "images/47d188ceb49658754338c83f44f6cd976ac198032700bf6f9794bf83cc7193fe.jpg",
|
| 626 |
+
"text": "$$\ns ( c _ { i } ^ { m , n } | P _ { i } , Q _ { i } ) = s o f t m a x ( W \\cdot [ s ^ { 1 } ; s ^ { 2 } ; s ^ { 3 } ] )\n$$",
|
| 627 |
+
"text_format": "latex",
|
| 628 |
+
"bbox": [
|
| 629 |
+
333,
|
| 630 |
+
686,
|
| 631 |
+
632,
|
| 632 |
+
705
|
| 633 |
+
],
|
| 634 |
+
"page_idx": 5
|
| 635 |
+
},
|
| 636 |
+
{
|
| 637 |
+
"type": "text",
|
| 638 |
+
"text": "where $s ^ { l }$ is the shorthand notation for $s ^ { l } ( c _ { i } ^ { m , n } | P _ { i } , Q _ { i } )$ ; $W \\in \\mathbb { R } ^ { 3 }$ . In runtime, the chunk with the highest probability is taken as the answer. In training, the following negative log likelihood is minimized: ",
|
| 639 |
+
"bbox": [
|
| 640 |
+
173,
|
| 641 |
+
709,
|
| 642 |
+
825,
|
| 643 |
+
753
|
| 644 |
+
],
|
| 645 |
+
"page_idx": 5
|
| 646 |
+
},
|
| 647 |
+
{
|
| 648 |
+
"type": "equation",
|
| 649 |
+
"img_path": "images/067be86e09d9a926e13041af5908481767e7f1c5c67d6b551b91298b9b5ec6a7.jpg",
|
| 650 |
+
"text": "$$\n\\mathbb { L } = - \\sum _ { i = 1 } ^ { N } \\log \\mathbb { P } ( A _ { i } | P _ { i } , Q _ { i } )\n$$",
|
| 651 |
+
"text_format": "latex",
|
| 652 |
+
"bbox": [
|
| 653 |
+
387,
|
| 654 |
+
755,
|
| 655 |
+
576,
|
| 656 |
+
799
|
| 657 |
+
],
|
| 658 |
+
"page_idx": 5
|
| 659 |
+
},
|
| 660 |
+
{
|
| 661 |
+
"type": "text",
|
| 662 |
+
"text": "Note that the $i$ -th training instance is only used when $A _ { i }$ is included in the corresponding candidate chunk set $C _ { i }$ , i.e. $\\exists _ { m , n } \\bar { A } _ { i } = c _ { i } ^ { m , n }$ . The softmax in the final layer serves as the list-wise ranking module similar in spirit to (Cao et al., 2007). ",
|
| 663 |
+
"bbox": [
|
| 664 |
+
176,
|
| 665 |
+
801,
|
| 666 |
+
825,
|
| 667 |
+
844
|
| 668 |
+
],
|
| 669 |
+
"page_idx": 5
|
| 670 |
+
},
|
| 671 |
+
{
|
| 672 |
+
"type": "text",
|
| 673 |
+
"text": "5 EXPERIMENTS ",
|
| 674 |
+
"text_level": 1,
|
| 675 |
+
"bbox": [
|
| 676 |
+
174,
|
| 677 |
+
864,
|
| 678 |
+
326,
|
| 679 |
+
880
|
| 680 |
+
],
|
| 681 |
+
"page_idx": 5
|
| 682 |
+
},
|
| 683 |
+
{
|
| 684 |
+
"type": "text",
|
| 685 |
+
"text": "Dataset We used the Stanford Question Answering Dataset (SQuAD) (Rajpurkar et al., 2016) for the experiment. SQuAD came into our sight because it is a mix of factoid and non-factoid questions, a real-world data (crowd-sourced), and of large scale (over 100K question-answer pairs collected from 536 Wikipedia articles). Answers range from single words to long, variable-length phrase/clauses. It is a relaxation of assumptions by the cloze-style and quiz-style RC datasets in the Problem Definition section. ",
|
| 686 |
+
"bbox": [
|
| 687 |
+
171,
|
| 688 |
+
895,
|
| 689 |
+
825,
|
| 690 |
+
924
|
| 691 |
+
],
|
| 692 |
+
"page_idx": 5
|
| 693 |
+
},
|
| 694 |
+
{
|
| 695 |
+
"type": "table",
|
| 696 |
+
"img_path": "images/5064b7b25e4abed74c406d4cc4a41a2b617cfd98e5c612a0ee6d6ad30b2f6955.jpg",
|
| 697 |
+
"table_caption": [
|
| 698 |
+
"Table 2: Results on the SQuAD dataset. "
|
| 699 |
+
],
|
| 700 |
+
"table_footnote": [],
|
| 701 |
+
"table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"2\">Dev</td><td colspan=\"2\">Test</td></tr><tr><td>EM</td><td>F1</td><td>EM</td><td>F1</td></tr><tr><td>Models Rajpurkar 2016</td><td>39.8%</td><td>51.0%</td><td>40.4%</td><td>51.0%</td></tr><tr><td>Wang 2016</td><td>59.1%</td><td>70.0%</td><td>59.5%</td><td>70.3%</td></tr><tr><td>DCR w/o Conv.</td><td>62.5%</td><td>71.2%</td><td>62.5%</td><td>71.0%</td></tr><tr><td>DCR</td><td>63.4%</td><td>72.3%</td><td></td><td>-</td></tr><tr><td>DCR Ensemble</td><td>66.3%</td><td>74.7%</td><td>-</td><td>1</td></tr></table>",
|
| 702 |
+
"bbox": [
|
| 703 |
+
312,
|
| 704 |
+
126,
|
| 705 |
+
684,
|
| 706 |
+
228
|
| 707 |
+
],
|
| 708 |
+
"page_idx": 6
|
| 709 |
+
},
|
| 710 |
+
{
|
| 711 |
+
"type": "text",
|
| 712 |
+
"text": "",
|
| 713 |
+
"bbox": [
|
| 714 |
+
176,
|
| 715 |
+
256,
|
| 716 |
+
825,
|
| 717 |
+
310
|
| 718 |
+
],
|
| 719 |
+
"page_idx": 6
|
| 720 |
+
},
|
| 721 |
+
{
|
| 722 |
+
"type": "text",
|
| 723 |
+
"text": "Features The input vector representation of each word $w$ to encoder RNNs has six parts including a pre-trained 300-dimensional GloVe embedding (Pennington et al., 2014) and five features (see Figure 1): (1) a one-hot encoding (46 dimensions) for the part-of-speech (POS) tag of $w$ ; (2) a one-hot encoding (14 dimensions) for named entity (NE) tag of $w$ ; (3) a binary value indicating whether $w$ ’s surface form is the same to any word in the quesiton; (4) if the lemma form of $w$ is the same to any word in the question; and (5) if $w$ is caplitalized. Feature (3) and (4) are designed to help the model align the passage text with question. Note that some types of questions (e.g., “who”, “when” questions) have answers that have a specific POS/NE tag pattern. For instance, “who” questions mostly have proper nouns/persons as answers and “when” questions may frequently have numbers/dates (e.g., a year) as answers. Thus, we believe that the model could exploit the co-relation between question types and answer POS/NE patterns easier with POS and NE tag features. Implementation Details We pre-processed the SQuAD dataset using Stanford CoreNLP tool5 (Manning et al., 2014) with its default setting to tokenize the text and obtain the POS and NE annotations. To train our model, we used stochastic gradient descent with the ADAM optimizer (Kingma & Ba, 2014), with an initial learning rate of 0.001. All GRU weights were initialized from a uniform distribution between (-0.01, 0.01). The hidden state size, $d$ , was set to 300 for all GRUs. The question bi-GRU shared parameters with the passage bi-GRU, while the attention-based passage bi-GRU had its own parameters. We shuffled all training examples at the beginning of each epoch and adopted a curriculum learning approach (Bengio et al., 2009), by sorting training instances by length in every 10 batches, to enable the model start learning from relatively easier instances and to harder ones. We also applied dropout of rate 0.2 to the embedding layer of input bi-GRU encoder, and gradient clipping when the norm of gradients exceeded 10. We trained in mini-batch style (mini-batch size is 180) and applied zero-padding to the passage and question inputs in each batch. We also set the maximum passage length to be 300 tokens, and pruned all the tokens after the 300-th token in the training set to save memory and speed up the training process. This step reduced the training set size by about $1 . 6 \\%$ . During test, we test on the full length of passage, so that we don’t prune out the potential candidates. We trained the model for at most 30 epochs, and in case the accuracy did not improve for 10 epochs, we stopped training. ",
|
| 724 |
+
"bbox": [
|
| 725 |
+
174,
|
| 726 |
+
320,
|
| 727 |
+
825,
|
| 728 |
+
707
|
| 729 |
+
],
|
| 730 |
+
"page_idx": 6
|
| 731 |
+
},
|
| 732 |
+
{
|
| 733 |
+
"type": "text",
|
| 734 |
+
"text": "For the feature ranking-based system, we used jforest ranker (Ganjisaffar et al., 2011) with LambdaMART-RegressionTree algorithm and the ranking metric was ${ \\mathrm { N D C G } } \\ @ 1 0$ . For the Gated Attention Reader in baseline system, we replicated the method and use the same configurations as in (Dhingra et al., 2016). ",
|
| 735 |
+
"bbox": [
|
| 736 |
+
174,
|
| 737 |
+
714,
|
| 738 |
+
825,
|
| 739 |
+
770
|
| 740 |
+
],
|
| 741 |
+
"page_idx": 6
|
| 742 |
+
},
|
| 743 |
+
{
|
| 744 |
+
"type": "text",
|
| 745 |
+
"text": "Results ",
|
| 746 |
+
"text_level": 1,
|
| 747 |
+
"bbox": [
|
| 748 |
+
174,
|
| 749 |
+
776,
|
| 750 |
+
227,
|
| 751 |
+
790
|
| 752 |
+
],
|
| 753 |
+
"page_idx": 6
|
| 754 |
+
},
|
| 755 |
+
{
|
| 756 |
+
"type": "text",
|
| 757 |
+
"text": "Table 2 shows our main results on the SQuAD dataset. Compared to the scores reported in (Wang & Jiang, 2016), our exact match (EM) and F1 on the development set and EM score on the test set are better, and F1 on the test set is comparable. We also studied how each component in our model contributes to the overall performance. Table 3 shows the details as well as the results of the baseline ranker. As the first row of Table 3 shows, our baseline system improves $10 \\%$ (EM) over Rajpurkar et al. (Rajpurkar et al., 2016) (Table 2, row 1), the feature-based ranking system. However when compared to our DCR model (Table 3, row 2), the baseline (row 1) is more than $12 \\%$ (EM) behind ",
|
| 758 |
+
"bbox": [
|
| 759 |
+
174,
|
| 760 |
+
797,
|
| 761 |
+
825,
|
| 762 |
+
895
|
| 763 |
+
],
|
| 764 |
+
"page_idx": 6
|
| 765 |
+
},
|
| 766 |
+
{
|
| 767 |
+
"type": "table",
|
| 768 |
+
"img_path": "images/ee83c85c7f6ccc859034e47da1e987897fcc23e03932366d33d54f2249eaf2d0.jpg",
|
| 769 |
+
"table_caption": [
|
| 770 |
+
"Table 3: Detailed system experiments on the SQuAD development set. "
|
| 771 |
+
],
|
| 772 |
+
"table_footnote": [],
|
| 773 |
+
"table_body": "<table><tr><td>Models</td><td>EM</td><td>F1</td></tr><tr><td>Chunk-and-RankPipelineBaseline</td><td>49.7%</td><td>64.9%</td></tr><tr><td>DCRw/o Convolution</td><td>62.5%</td><td>71.2%</td></tr><tr><td>DCR w/o Word-by-Word Attention</td><td>57.6%</td><td>68.7%</td></tr><tr><td>DCR w/o POS feature (1)</td><td>59.2%</td><td>68.8%</td></tr><tr><td>DCR w/o NE feature (2)</td><td>60.4%</td><td>70.2%</td></tr><tr><td>DCR w/o Question-word feature (3)</td><td>59.5%</td><td>69.0%</td></tr><tr><td>DCR w/o Question-lemma feature (4)</td><td>61.2%</td><td>69.9%</td></tr><tr><td>DCR w/o Capitalized feature (5)</td><td>61.5%</td><td>70.6%</td></tr><tr><td>DCRw/o Conv.wPOS-trie</td><td>62.1%</td><td>70.8%</td></tr></table>",
|
| 774 |
+
"bbox": [
|
| 775 |
+
302,
|
| 776 |
+
126,
|
| 777 |
+
696,
|
| 778 |
+
270
|
| 779 |
+
],
|
| 780 |
+
"page_idx": 7
|
| 781 |
+
},
|
| 782 |
+
{
|
| 783 |
+
"type": "image",
|
| 784 |
+
"img_path": "images/8f50a83cf8928f1dbb1c5d1c6195bb2839018b67f5feaf01529ea54b031890b9.jpg",
|
| 785 |
+
"image_caption": [
|
| 786 |
+
"Figure 2: (a) Variations of DCR performance on ground truth answer length (up to 10) in the development set. The curve with diamond knots also shows the percentage of answers for each length in the development set. (b) Performance comparisons for different question head word. even though it is based on the state-of-the-art model for cloze-style RC tasks. This can be attributed to the advanced model structure and end-to-end manner of DCR. "
|
| 787 |
+
],
|
| 788 |
+
"image_footnote": [],
|
| 789 |
+
"bbox": [
|
| 790 |
+
300,
|
| 791 |
+
306,
|
| 792 |
+
696,
|
| 793 |
+
444
|
| 794 |
+
],
|
| 795 |
+
"page_idx": 7
|
| 796 |
+
},
|
| 797 |
+
{
|
| 798 |
+
"type": "text",
|
| 799 |
+
"text": "We also did ablation tests on our DCR model. First, replacing the word-by-word attention with Attentive Reader style attention (Hermann et al., 2015) decreases the EM score by about $4 . 5 \\%$ , showing the strength of our proposed attention mechanism. ",
|
| 800 |
+
"bbox": [
|
| 801 |
+
174,
|
| 802 |
+
534,
|
| 803 |
+
825,
|
| 804 |
+
575
|
| 805 |
+
],
|
| 806 |
+
"page_idx": 7
|
| 807 |
+
},
|
| 808 |
+
{
|
| 809 |
+
"type": "text",
|
| 810 |
+
"text": "Second, we remove the features in input to see the contribution of each feature. The result shows that POS feature (1) and question-word feature (3) are the two most important features. ",
|
| 811 |
+
"bbox": [
|
| 812 |
+
174,
|
| 813 |
+
582,
|
| 814 |
+
821,
|
| 815 |
+
611
|
| 816 |
+
],
|
| 817 |
+
"page_idx": 7
|
| 818 |
+
},
|
| 819 |
+
{
|
| 820 |
+
"type": "text",
|
| 821 |
+
"text": "Finally, combining the DCR model with the proposed POS-trie constraints yields a score similar to the one obtained using the DCR model with all possible $n$ -gram chunks. The result shows that (1) our chunk representations are powerful enough to differentiate even a huge amount of chunks when no constraints are applied; and (2) the proposed POS-trie reduces the search space at the cost of a small drop in performance. ",
|
| 822 |
+
"bbox": [
|
| 823 |
+
174,
|
| 824 |
+
617,
|
| 825 |
+
825,
|
| 826 |
+
686
|
| 827 |
+
],
|
| 828 |
+
"page_idx": 7
|
| 829 |
+
},
|
| 830 |
+
{
|
| 831 |
+
"type": "text",
|
| 832 |
+
"text": "Analysis To better understand our system, we calculated the accuracy of the attention mechanism of the gated attention reader used in our deep learning-based baseline. We found that it is $72 \\%$ accurate i.e., $72 \\%$ of the times a word with the highest attention score is inside the correct answer span. This means that, if we could accurately detect the boundary around the word with the highest attention score to form the answer span, we could achieve an accuracy close to $72 \\%$ . In addition, we checked the answer recall of our candidate chunking approach. When we use a window size of 10, $92 \\%$ of the time, the ground truth answer will be included in the extracted Candidate chunk set. Thus the upper bound of the exact match score of our baseline system is around $66 \\%$ $9 2 \\%$ (the answer recall) $\\times 7 2 \\%$ ). From the results, we see our DCR system’s exact match score is at $62 \\%$ . This shows that DCR is proficient at differentiating answer spans dynamically. ",
|
| 833 |
+
"bbox": [
|
| 834 |
+
174,
|
| 835 |
+
694,
|
| 836 |
+
825,
|
| 837 |
+
833
|
| 838 |
+
],
|
| 839 |
+
"page_idx": 7
|
| 840 |
+
},
|
| 841 |
+
{
|
| 842 |
+
"type": "text",
|
| 843 |
+
"text": "To further analyze the system’s performance while predicting answers of different lengths, we show the exact match (EM) and F1 scores for answers with lengths up to 10 tokens in Figure 2(a). From the graph, we can see that, with the increase of answer length, both EM and F1 drops, but in different speed. The gap between F1 and exact match also widens as answer length increases. However, the model still yields a decent accuracy when the answer is longer than a single word. Additionally, Figure 2(b) shows that the system is better at “when” and “who” questions, but performs poorly on “why” questions. The large gap between exact match and F1 on “why” questions means that perfectly identifying the span is harder than locating the core of the answer span. ",
|
| 844 |
+
"bbox": [
|
| 845 |
+
174,
|
| 846 |
+
840,
|
| 847 |
+
825,
|
| 848 |
+
924
|
| 849 |
+
],
|
| 850 |
+
"page_idx": 7
|
| 851 |
+
},
|
| 852 |
+
{
|
| 853 |
+
"type": "image",
|
| 854 |
+
"img_path": "images/032fd0c8bda4dd6325f0318bf65ed69e86f071b55f9f0fd78140cddeb9d0bce0.jpg",
|
| 855 |
+
"image_caption": [
|
| 856 |
+
"Figure 3: Development set performance comparisons for different types of “what” questions (considering the types with more than 20 examples in the development set). "
|
| 857 |
+
],
|
| 858 |
+
"image_footnote": [],
|
| 859 |
+
"bbox": [
|
| 860 |
+
302,
|
| 861 |
+
99,
|
| 862 |
+
694,
|
| 863 |
+
242
|
| 864 |
+
],
|
| 865 |
+
"page_idx": 8
|
| 866 |
+
},
|
| 867 |
+
{
|
| 868 |
+
"type": "text",
|
| 869 |
+
"text": "",
|
| 870 |
+
"bbox": [
|
| 871 |
+
171,
|
| 872 |
+
315,
|
| 873 |
+
821,
|
| 874 |
+
343
|
| 875 |
+
],
|
| 876 |
+
"page_idx": 8
|
| 877 |
+
},
|
| 878 |
+
{
|
| 879 |
+
"type": "text",
|
| 880 |
+
"text": "Since “what”, “which”, and “how” questions contain a broad range of question types, we split them further based on the bigram a question starts with, and Figure 3 shows the breakdown for “what” questions. We can see that “what” questions asking for explanations such as “what happens” and “what happened” have lower EM and F1 scores. In contrast, “what” questions asking for year and numbers have much higher scores and, for these questions, exact match scores are close to F1 scores, which means chunking for these questions are easier for DCR. ",
|
| 881 |
+
"bbox": [
|
| 882 |
+
174,
|
| 883 |
+
351,
|
| 884 |
+
825,
|
| 885 |
+
434
|
| 886 |
+
],
|
| 887 |
+
"page_idx": 8
|
| 888 |
+
},
|
| 889 |
+
{
|
| 890 |
+
"type": "text",
|
| 891 |
+
"text": "6 RELATED WORK ",
|
| 892 |
+
"text_level": 1,
|
| 893 |
+
"bbox": [
|
| 894 |
+
176,
|
| 895 |
+
454,
|
| 896 |
+
344,
|
| 897 |
+
470
|
| 898 |
+
],
|
| 899 |
+
"page_idx": 8
|
| 900 |
+
},
|
| 901 |
+
{
|
| 902 |
+
"type": "text",
|
| 903 |
+
"text": "Attentive Reader was the first neural model for factoid RCQA (Hermann et al., 2015). It uses Bidirectional RNN (Cho et al., 2014; Chung et al.,2014) to encode document and query respectively, and use query representation to match with every token from the document. Attention Sum Reader (Kadlec et al., 2016) simplifies the model to just predicting positions of correct answer in the document and the training speed and test accuracy are both greatly improved on the CNN/Daily Mail dataset. (Chen et al., 2016) also simplified Attentive Reader and reported higher accuracy. Windowbased Memory Networks (MemN2N) is introduced along with the CBT dataset (Hill et al., 2015), which does not use RNN encoders, but embeds contexts as memory and matches questions with embedded contexts. Those models’ mechanism is to learn the match between answer context with question/query representation. In contrast, memory enhanced neural networks like Neural Turing Machines (Graves et al., 2014) and its variants (Zhang et al., 2015; Gulcehre et al., 2016; Zaremba & Sutskever, 2015; Chandar et al., 2016; Grefenstette et al., 2015) were also potential candidates for the task, and Gulcehre et al. (Gulcehre et al., 2016) reported results on the bAbI task, which is worse than memory networks. Similarly, sequence-to-sequence models were also used (Yu et al., 2015; Hermann et al., 2015), but they did not yield better results either. ",
|
| 904 |
+
"bbox": [
|
| 905 |
+
174,
|
| 906 |
+
487,
|
| 907 |
+
825,
|
| 908 |
+
694
|
| 909 |
+
],
|
| 910 |
+
"page_idx": 8
|
| 911 |
+
},
|
| 912 |
+
{
|
| 913 |
+
"type": "text",
|
| 914 |
+
"text": "Recently, several models have been proposed to enable more complex inference for RC task. For instance, gated attention model (Dhingra et al., 2016) employs a multi-layer architecture, where each layer encodes the same document, but the attention is updated from layer to layer. EpiReader (Trischler et al., 2016b) adopted a joint training model for answer extractor and reasoner, where the extractor proposes top candidates, and the reasoner weighs each candidate by examining entailment relationship between question-answer representation and the document. An iterative alternating attention mechanism and gating strategies were proposed in (Sordoni et al., 2016) to optimize the attention through several hops. In contrast, Cui et al. (Cui et al., 2016a;b) introduced fine-grained document attention from each question word and then aggregated those attentions from each question token by summation with or without weights. This system achieved the state-of-the-art score on the CNN dataset. Those different variations all result in roughly $3- 5 \\%$ improvement over attention sum reader, but none of those could achieve higher than that. Other methods include using dynamic entity representation with max-pooling (Kobayashi et al., 2016) that aims to change entity representation with context, and Weissenborn’s (Weissenborn, 2016) system, which tries to separate entity from the context and then matches the question to context, scoring an accuracy around $70 \\%$ on the CNN dataset. ",
|
| 915 |
+
"bbox": [
|
| 916 |
+
174,
|
| 917 |
+
702,
|
| 918 |
+
825,
|
| 919 |
+
922
|
| 920 |
+
],
|
| 921 |
+
"page_idx": 8
|
| 922 |
+
},
|
| 923 |
+
{
|
| 924 |
+
"type": "text",
|
| 925 |
+
"text": "However, all of those models assume that the answers are single tokens. This limits the type of questions the models can answer. Wang and Jiang (Wang & Jiang, 2016) proposed a match-lstm and achieved good results on SQuAD. However, this approach predicts a chunk boundary or whether a word is part of a chunk or not. In contrast, our approach explicitly constructs the chunk representations and similar chunks are compared directly to determine correct answer boundaries. ",
|
| 926 |
+
"bbox": [
|
| 927 |
+
174,
|
| 928 |
+
103,
|
| 929 |
+
825,
|
| 930 |
+
172
|
| 931 |
+
],
|
| 932 |
+
"page_idx": 9
|
| 933 |
+
},
|
| 934 |
+
{
|
| 935 |
+
"type": "text",
|
| 936 |
+
"text": "7 CONCLUSION ",
|
| 937 |
+
"text_level": 1,
|
| 938 |
+
"bbox": [
|
| 939 |
+
176,
|
| 940 |
+
194,
|
| 941 |
+
318,
|
| 942 |
+
210
|
| 943 |
+
],
|
| 944 |
+
"page_idx": 9
|
| 945 |
+
},
|
| 946 |
+
{
|
| 947 |
+
"type": "text",
|
| 948 |
+
"text": "In this paper we proposed a novel neural reading comprehension model for question answering. Different from the previously proposed models for factoid RCQA, the proposed model, dynamic chunk reader, is not restricted to predicting a single named entity as an answer or selecting an answer from a small, pre-defined candidate list. Instead, it is capable of answering both factoid and nonfactoid questions as it learns to select answer chunks that are suitable for an input question. DCR achieves this goal with a joint deep learning model enhanced with a novel attention mechanism and five simple yet effective features. Error analysis shows that the DCR model achieves good performance, but still needs to improve on predicting longer answers, which are usually non-factoid in nature. ",
|
| 949 |
+
"bbox": [
|
| 950 |
+
174,
|
| 951 |
+
227,
|
| 952 |
+
825,
|
| 953 |
+
352
|
| 954 |
+
],
|
| 955 |
+
"page_idx": 9
|
| 956 |
+
},
|
| 957 |
+
{
|
| 958 |
+
"type": "text",
|
| 959 |
+
"text": "REFERENCES ",
|
| 960 |
+
"text_level": 1,
|
| 961 |
+
"bbox": [
|
| 962 |
+
176,
|
| 963 |
+
373,
|
| 964 |
+
285,
|
| 965 |
+
388
|
| 966 |
+
],
|
| 967 |
+
"page_idx": 9
|
| 968 |
+
},
|
| 969 |
+
{
|
| 970 |
+
"type": "text",
|
| 971 |
+
"text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. ICLR, 2015. ",
|
| 972 |
+
"bbox": [
|
| 973 |
+
176,
|
| 974 |
+
397,
|
| 975 |
+
823,
|
| 976 |
+
425
|
| 977 |
+
],
|
| 978 |
+
"page_idx": 9
|
| 979 |
+
},
|
| 980 |
+
{
|
| 981 |
+
"type": "text",
|
| 982 |
+
"text": "Yoshua Bengio, Jer´ ome Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In ˆ Proceedings of the 26th annual international conference on machine learning, pp. 41–48. ACM, 2009. ",
|
| 983 |
+
"bbox": [
|
| 984 |
+
176,
|
| 985 |
+
435,
|
| 986 |
+
823,
|
| 987 |
+
477
|
| 988 |
+
],
|
| 989 |
+
"page_idx": 9
|
| 990 |
+
},
|
| 991 |
+
{
|
| 992 |
+
"type": "text",
|
| 993 |
+
"text": "Zhe Cao, Tao Qin, Tie-Yan Liu, Ming-Feng Tsai, and Hang Li. Learning to rank: from pairwise approach to listwise approach. In Proceedings of the 24th international conference on Machine learning, pp. 129–136. ACM, 2007. ",
|
| 994 |
+
"bbox": [
|
| 995 |
+
174,
|
| 996 |
+
488,
|
| 997 |
+
823,
|
| 998 |
+
531
|
| 999 |
+
],
|
| 1000 |
+
"page_idx": 9
|
| 1001 |
+
},
|
| 1002 |
+
{
|
| 1003 |
+
"type": "text",
|
| 1004 |
+
"text": "Sarath Chandar, Sungjin Ahn, Hugo Larochelle, Pascal Vincent, Gerald Tesauro, and Yoshua Bengio. Hierarchical memory networks. arXiv preprint arXiv:1605.07427, 2016. ",
|
| 1005 |
+
"bbox": [
|
| 1006 |
+
171,
|
| 1007 |
+
541,
|
| 1008 |
+
823,
|
| 1009 |
+
570
|
| 1010 |
+
],
|
| 1011 |
+
"page_idx": 9
|
| 1012 |
+
},
|
| 1013 |
+
{
|
| 1014 |
+
"type": "text",
|
| 1015 |
+
"text": "Danqi Chen, Jason Bolton, and Christopher D Manning. A thorough examination of the cnn/daily mail reading comprehension task. ACL, 2016. ",
|
| 1016 |
+
"bbox": [
|
| 1017 |
+
169,
|
| 1018 |
+
580,
|
| 1019 |
+
823,
|
| 1020 |
+
609
|
| 1021 |
+
],
|
| 1022 |
+
"page_idx": 9
|
| 1023 |
+
},
|
| 1024 |
+
{
|
| 1025 |
+
"type": "text",
|
| 1026 |
+
"text": "Kyunghyun Cho, Bart Van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Hol- ¨ ger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014. ",
|
| 1027 |
+
"bbox": [
|
| 1028 |
+
174,
|
| 1029 |
+
619,
|
| 1030 |
+
823,
|
| 1031 |
+
662
|
| 1032 |
+
],
|
| 1033 |
+
"page_idx": 9
|
| 1034 |
+
},
|
| 1035 |
+
{
|
| 1036 |
+
"type": "text",
|
| 1037 |
+
"text": "Yiming Cui, Zhipeng Chen, Si Wei, Shijin Wang, Ting Liu, and Guoping Hu. Attention-overattention neural networks for reading comprehension. arXiv preprint arXiv:1607.04423, 2016a. ",
|
| 1038 |
+
"bbox": [
|
| 1039 |
+
174,
|
| 1040 |
+
671,
|
| 1041 |
+
823,
|
| 1042 |
+
702
|
| 1043 |
+
],
|
| 1044 |
+
"page_idx": 9
|
| 1045 |
+
},
|
| 1046 |
+
{
|
| 1047 |
+
"type": "text",
|
| 1048 |
+
"text": "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. ",
|
| 1049 |
+
"bbox": [
|
| 1050 |
+
176,
|
| 1051 |
+
712,
|
| 1052 |
+
823,
|
| 1053 |
+
741
|
| 1054 |
+
],
|
| 1055 |
+
"page_idx": 9
|
| 1056 |
+
},
|
| 1057 |
+
{
|
| 1058 |
+
"type": "text",
|
| 1059 |
+
"text": "Bhuwan Dhingra, Hanxiao Liu, William W Cohen, and Ruslan Salakhutdinov. Gated-attention readers for text comprehension. arXiv preprint arXiv:1606.01549, 2016. ",
|
| 1060 |
+
"bbox": [
|
| 1061 |
+
174,
|
| 1062 |
+
751,
|
| 1063 |
+
825,
|
| 1064 |
+
779
|
| 1065 |
+
],
|
| 1066 |
+
"page_idx": 9
|
| 1067 |
+
},
|
| 1068 |
+
{
|
| 1069 |
+
"type": "text",
|
| 1070 |
+
"text": "Yasser Ganjisaffar, Rich Caruana, and Cristina Lopes. Bagging gradient-boosted trees for high precision, low variance ranking models. pp. 85–94, 2011. doi: http://doi.acm.org/10.1145/2009916. 2009932. ",
|
| 1071 |
+
"bbox": [
|
| 1072 |
+
174,
|
| 1073 |
+
789,
|
| 1074 |
+
823,
|
| 1075 |
+
832
|
| 1076 |
+
],
|
| 1077 |
+
"page_idx": 9
|
| 1078 |
+
},
|
| 1079 |
+
{
|
| 1080 |
+
"type": "text",
|
| 1081 |
+
"text": "Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014. ",
|
| 1082 |
+
"bbox": [
|
| 1083 |
+
173,
|
| 1084 |
+
842,
|
| 1085 |
+
825,
|
| 1086 |
+
871
|
| 1087 |
+
],
|
| 1088 |
+
"page_idx": 9
|
| 1089 |
+
},
|
| 1090 |
+
{
|
| 1091 |
+
"type": "text",
|
| 1092 |
+
"text": "Edward Grefenstette, Karl Moritz Hermann, Mustafa Suleyman, and Phil Blunsom. Learning to transduce with unbounded memory. In Advances in Neural Information Processing Systems, pp. 1828–1836, 2015. ",
|
| 1093 |
+
"bbox": [
|
| 1094 |
+
174,
|
| 1095 |
+
882,
|
| 1096 |
+
823,
|
| 1097 |
+
922
|
| 1098 |
+
],
|
| 1099 |
+
"page_idx": 9
|
| 1100 |
+
},
|
| 1101 |
+
{
|
| 1102 |
+
"type": "text",
|
| 1103 |
+
"text": "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. \nKarl Moritz Hermann, Tomas Kocisky, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In Advances in Neural Information Processing Systems, pp. 1693–1701, 2015. \nFelix Hill, Antoine Bordes, Sumit Chopra, and Jason Weston. The goldilocks principle: Reading children’s books with explicit memory representations. arXiv preprint arXiv:1511.02301, 2015. \nRudolf Kadlec, Martin Schmid, Ondrej Bajgar, and Jan Kleindienst. Text understanding with the attention sum reader network. ACL, 2016. \nDiederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. \nSosuke Kobayashi, Ran Tian, Naoaki Okazaki, and Kentaro Inui. Dynamic entity representations with max-pooling improves machine reading. NAACL-HLT, 2016. \nChristopher D. Manning, Mihai Surdeanu, John Bauer, Jenny Finkel, Steven J. Bethard, and David McClosky. The Stanford CoreNLP natural language processing toolkit. In Association for Computational Linguistics (ACL) System Demonstrations, pp. 55–60, 2014. URL http://www.aclweb.org/anthology/P/P14/P14-5010. \nT. Onishi, H. Wang, M. Bansal, K. Gimpel, and D. McAllester. Who did What: A large-scale person-centered cloze dataset. In Proc. of EMNLP, 2016. \nJeffrey Pennington, Richard Socher, and Christopher D Manning. Glove: Global vectors for word representation. In EMNLP, volume 14, pp. 1532–43, 2014. \nPranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: $1 0 0 { , } 0 0 0 { + }$ questions for machine comprehension of text. arXiv preprint arXiv:1606.05250, 2016. \nMatthew Richardson, Christopher JC Burges, and Erin Renshaw. Mctest: A challenge dataset for the open-domain machine comprehension of text. In EMNLP, volume 3, pp. 4, 2013. \nTim Rocktaschel, Edward Grefenstette, Karl Moritz Hermann, Tom ¨ a´s Ko ˇ cisk ˇ y, and Phil Blunsom. \\` Reasoning about entailment with neural attention. arXiv preprint arXiv:1509.06664, 2015. \nCicero dos Santos, Ming Tan, Bing Xiang, and Bowen Zhou. Attentive pooling networks. arXiv preprint arXiv:1602.03609, 2016. \nAlessandro Sordoni, Phillip Bachman, and Yoshua Bengio. Iterative alternating neural attention for machine reading. arXiv preprint arXiv:1606.02245, 2016. \nMakarand Tapaswi, Yukun Zhu, Rainer Stiefelhagen, Antonio Torralba, Raquel Urtasun, and Sanja Fidler. Movieqa: Understanding stories in movies through question-answering. arXiv preprint arXiv:1512.02902, 2015. \nAdam Trischler, Zheng Ye, Xingdi Yuan, Jing He, Phillip Bachman, and Kaheer Suleman. A parallel-hierarchical model for machine comprehension on sparse data. arXiv preprint arXiv:1603.08884, 2016a. \nAdam Trischler, Zheng Ye, Xingdi Yuan, and Kaheer Suleman. Natural language comprehension with the epireader. arXiv preprint arXiv:1606.02270, 2016b. \nShuohang Wang and Jing Jiang. Learning natural language inference with lstm. arXiv preprint arXiv:1512.08849, 2015. \nShuohang Wang and Jing Jiang. Machine comprehension using match-lstm and answer pointer. arXiv preprint arXiv:1608.07905, 2016. \nDirk Weissenborn. Separating answers from queries for neural reading comprehension. arXiv \npreprint arXiv:1607.03316, 2016. ",
|
| 1104 |
+
"bbox": [
|
| 1105 |
+
169,
|
| 1106 |
+
84,
|
| 1107 |
+
826,
|
| 1108 |
+
934
|
| 1109 |
+
],
|
| 1110 |
+
"page_idx": 10
|
| 1111 |
+
},
|
| 1112 |
+
{
|
| 1113 |
+
"type": "text",
|
| 1114 |
+
"text": "Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. CoRR, abs/1410.3916, 2014. URL http://arxiv.org/abs/1410.3916. ",
|
| 1115 |
+
"bbox": [
|
| 1116 |
+
171,
|
| 1117 |
+
103,
|
| 1118 |
+
821,
|
| 1119 |
+
132
|
| 1120 |
+
],
|
| 1121 |
+
"page_idx": 11
|
| 1122 |
+
},
|
| 1123 |
+
{
|
| 1124 |
+
"type": "text",
|
| 1125 |
+
"text": "Wenpeng Yin, Sebastian Ebert, and Hinrich Schutze. Attention-based convolutional neural network ¨ for machine comprehension. arXiv preprint arXiv:1602.04341, 2016. ",
|
| 1126 |
+
"bbox": [
|
| 1127 |
+
173,
|
| 1128 |
+
140,
|
| 1129 |
+
823,
|
| 1130 |
+
170
|
| 1131 |
+
],
|
| 1132 |
+
"page_idx": 11
|
| 1133 |
+
},
|
| 1134 |
+
{
|
| 1135 |
+
"type": "text",
|
| 1136 |
+
"text": "Yang Yu, Wei Zhang, Chung-Wei Hang, and Bowen Zhou. Empirical study on deep learning models for question answering. arXiv preprint arXiv:1510.07526, 2015. ",
|
| 1137 |
+
"bbox": [
|
| 1138 |
+
173,
|
| 1139 |
+
178,
|
| 1140 |
+
823,
|
| 1141 |
+
208
|
| 1142 |
+
],
|
| 1143 |
+
"page_idx": 11
|
| 1144 |
+
},
|
| 1145 |
+
{
|
| 1146 |
+
"type": "text",
|
| 1147 |
+
"text": "Wojciech Zaremba and Ilya Sutskever. Reinforcement learning neural turing machines. arXiv preprint arXiv:1505.00521, 362, 2015. ",
|
| 1148 |
+
"bbox": [
|
| 1149 |
+
173,
|
| 1150 |
+
215,
|
| 1151 |
+
823,
|
| 1152 |
+
246
|
| 1153 |
+
],
|
| 1154 |
+
"page_idx": 11
|
| 1155 |
+
},
|
| 1156 |
+
{
|
| 1157 |
+
"type": "text",
|
| 1158 |
+
"text": "Wei Zhang, Yang Yu, and Bowen Zhou. Structured memory for neural turing machines. arXiv preprint arXiv:1510.03931, 2015. ",
|
| 1159 |
+
"bbox": [
|
| 1160 |
+
169,
|
| 1161 |
+
253,
|
| 1162 |
+
823,
|
| 1163 |
+
284
|
| 1164 |
+
],
|
| 1165 |
+
"page_idx": 11
|
| 1166 |
+
}
|
| 1167 |
+
]
|
parse/train/r1te3Fqel/r1te3Fqel_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/r1te3Fqel/r1te3Fqel_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/rbdKZJxDWWx/rbdKZJxDWWx.md
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Alpha-IoU: A Family of Power Intersection over Union Losses for Bounding Box Regression
|
| 2 |
+
|
| 3 |
+
Jiabo $\mathbf { H e } ^ { 1 , 3 , * }$ , Sarah Erfani1, Xingjun $\mathbf { M } \mathbf { a } ^ { 2 , \dagger }$ , James Bailey1, Ying $\mathbf { C } \mathbf { h } \mathbf { i } ^ { 3 , \dagger }$ , Xian-Sheng $\mathbf { H } \mathbf { u } \mathbf { a } ^ { 3 }$
|
| 4 |
+
|
| 5 |
+
1School of Computing and Information Systems, The University of Melbourne 2School of Computer Science, Fudan University 3DAMO Academy, Alibaba Group {jiaboh@student., sarah.erfani@, baileyj@}unimelb.edu.au
|
| 6 |
+
danxjma@gmail.com, {xinyi.cy, xiansheng.hxs}@alibaba-inc.com
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
Bounding box (bbox) regression is a fundamental task in computer vision. So far, the most commonly used loss functions for bbox regression are the Intersection over Union (IoU) loss and its variants. In this paper, we generalize existing IoUbased losses to a new family of power IoU losses that have a power IoU term and an additional power regularization term with a single power parameter $\alpha$ We call this new family of losses the $\alpha$ -IoU losses and analyze properties such as order preservingness and loss/gradient reweighting. Experiments on multiple object detection benchmarks and models demonstrate that $\alpha$ -IoU losses, 1) can surpass existing IoU-based losses by a noticeable performance margin; 2) offer detectors more flexibility in achieving different levels of bbox regression accuracy by modulating $\alpha$ ; and 3) are more robust to small datasets and noisy bboxes.
|
| 11 |
+
|
| 12 |
+
# 1 Introduction
|
| 13 |
+
|
| 14 |
+
Bounding box (bbox) regression localizes an object in an image/video by predicting a bbox for the object, which is fundamental to object detection, localization, and tracking. For example, the most advanced object detectors often consist of a bbox regression branch and a classification branch with the bbox regression branch generating bboxes to localize objects for classification. In this work, we explore more effective loss functions for bbox regression in the context of object detection.
|
| 15 |
+
|
| 16 |
+
Whilst early works in object detection use $\ell _ { n }$ -norm losses [11] for bbox regression, recent works directly adopt the localization performance metric, i.e., Intersection over Union (IoU), as the localization loss [28, 39]. Compared with $\ell _ { n }$ -norm losses, the IoU loss is invariant to bbox scales, thus helping train better detectors. However, the IoU loss suffers from the gradient vanishing problem when the predicted bboxes are not overlapping with the ground truth, which tends to slow down convergence and result in inaccurate detectors. This has motivated the design of several improved IoU-based losses including Generalized IoU (GIoU), Distance-IoU (DIoU) and Complete IoU (CIoU). GIoU introduces a penalty term into the IoU loss to alleviate the gradient vanishing problem [32], while DIoU and CIoU consider the central point distance and aspect ratio between predicted bboxes and their ground truth in penalty terms [43].
|
| 17 |
+
|
| 18 |
+
In this paper, we present a new family of IoU losses obtained by applying power transformations to existing IoU-based losses. We first apply the Box-Cox transformation [2] to the IoU loss $\mathcal { L } _ { \mathrm { I o U } } =$ $1 - I o U$ and generalize it to a power IoU loss: $\mathcal { L } _ { \alpha \mathrm { - I o U } } = ( 1 - I o U ^ { \alpha } ) / \alpha , ~ \alpha > 0$ , denoted as $\alpha$ -IoU. We further simplify $\alpha$ -IoU to $\mathcal { L } _ { \alpha - \mathrm { I o U } } = 1 - I o U ^ { \alpha }$ for $\alpha \nrightarrow 0$ and extend it to a more general form with an additional power regularization term (see equation (3)). This allows us to generalize existing IoU-based losses, including GIoU, DIoU, and CIoU, to a new family of power IoU losses (see equation (4)) for more accurate bbox regression as well as object detection.
|
| 19 |
+
|
| 20 |
+
We show that, relative to ${ \mathcal { L } } _ { \mathrm { I o U } }$ , ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ with $\alpha > 1$ up-weights both the loss and gradient of high IoU objects, leading to improved bbox regression accuracy. When $0 < \alpha < 1$ , it down-weights high IoU objects which we find hurts regression accuracy. The power parameter $\alpha$ can serve as a knob to adapt $\alpha$ -IoU losses to meeting different levels of bbox regression accuracy (precision measured under different IoU thresholds), with $\alpha > 1$ for high regression accuracy (i.e., high IoU thresholds) by focusing more on those high IoU objects. We also empirically show that $\alpha$ is not overly sensitive to different models or datasets, with $\alpha = 3$ performing consistently well in most cases. The family of $\alpha$ -IoU losses can be easily applied for improving state-of-the-art detectors under both clean and noisy bbox settings without introducing additional parameters to these models (making any modifications to training algorithms), nor increasing their training/inference time.
|
| 21 |
+
|
| 22 |
+
In summary, our main contributions are as follows:
|
| 23 |
+
|
| 24 |
+
• We propose a new family of power IoU losses called $\alpha$ -IoU for accurate bbox regression and object detection. $\alpha$ -IoU presents a unified power generalization of existing IoU-based losses.
|
| 25 |
+
• We analyze a set of properties of $\alpha$ -IoU, including order preservingness and loss/gradient reweighting, to show that a proper choice of $\alpha$ (i.e., $\alpha > 1$ ) can help improve bbox regression accuracy by adaptively up-weighting the loss and gradient of high IoU objects.
|
| 26 |
+
• We empirically show, on multiple benchmark object detection datasets and models, that $\alpha$ -IoU losses can consistently outperform existing IoU-based losses and provide more robustness for small datasets and noisy bboxes.
|
| 27 |
+
|
| 28 |
+
# 2 Related Work
|
| 29 |
+
|
| 30 |
+
Object Detection Models. There exist two mainstream types of detection models: anchor-based and anchor-free detectors. Anchor-based detectors can be further divided into two-stage and onestage models. Two-stage anchor-based detectors (e.g., R-CNN series [11, 31, 14, 3], HTC [5], and TSD [33]) are firstly proposed in object detection tasks, which are composed of region proposal networks (RPNs) and classifiers. RPNs generate a large number of foreground and background region proposals, followed by networks to classify objects in the proposals. Towards real-time object detection, one-stage anchor-based detectors (e.g., YOLO series [29, 30, 1], RetinaNet [21], and SSD [24]) are developed to predict bboxes and categories at the same time, thus no longer need RPNs. Anchor boxes with prior scales and aspect ratios should be defined before training anchor-based detectors. Techniques have been proposed to mitigate the sensitivity of these models to hand-picked anchor boxes, for example, attention-based fusion networks [31] and clustering algorithms [30]. These techniques learn prior anchors from the training set for every sliding window or grid cell.
|
| 31 |
+
|
| 32 |
+
Recently, anchor-free detectors such as CornerNet [16], CenterNet1 [8], ExtremeNet [45], and CentripetalNet [7], have also been proposed to get rid of anchor priors. These models first predict locations of keypoints (corners, centroids, or extreme points), then group them into the same bboxes if they are geometrically aligned. There also exist other models that generate pixel-wise results. For example, CenterNet2 estimates pixel-level categories of objects along with their sizes and offsets [44]. FCOS generates pixel-wise classification, centerness, and bbox (top, down, left, right) results using multi-head CNNs [34], followed by the Adaptive Training Sample Selection (ATSS) [40] as an improvement on automatically selecting positive and negative samples. In addition, transformers (e.g., DETR series [4, 46]) have also been developed for object detection without anchor generation or non-maximum suppression (NMS), achieving the performance on par with the above CNN-based detectors. In this work, we propose a new family of generalized IoU losses to improve the performance of these detectors without any architectural modifications, which is orthogonal to the above research.
|
| 33 |
+
|
| 34 |
+
Bounding Box Regression Losses. Anchor-based detectors regress offsets between ground-truth bboxes and their closest anchors, while anchor-free detectors predict keypoints of objects with some frameworks also generating the sizes of the bboxes. The predicted offsets or keypoints (w/ or w/o bbox sizes) are then mapped back to the pixel space for generating the bboxes. Localization losses usually compare the generated bboxes with their ground truth. Early works adopt $\ell _ { n }$ -norm losses [11] for bbox regression, which have been found sensitive to varying bbox scales. Recent works replace them with the IoU loss and its variants such as BIoU, GIoU, DIoU and CIoU for bbox regression, as IoU is the metric for localization and it is scale-invariant [28, 39]. The Bounded IoU (BIoU) loss maximizes the IoU overlap between the region of interest (RoI) and the ground truth based on a set of IoU upper bounds [35]. GIoU is proposed to address the problem of gradient vanishing on non-overlapping examples, which are examples having non-overlapping predicted bboxes with the ground truth (IoU is zero) [32]. DIoU and CIoU [43] losses further consider the overlapping area, central point distance, and aspect ratio in IoU and the regularization terms. These regularization terms can help improve the convergence speed as well as the final detection performance. There are also losses designed to focus more on high IoU objects, for example, the Rectified IoU (RIoU) loss [36], and the Focal and Efficient IoU (Focal-EIoU) loss [41]. These loss functions increase gradients of those examples that are in high bbox regression accuracy. However, RIoU and Focal-EIoU are neither concise nor generalized compared with other IoU-based losses. In this paper, we apply a power transformation to generalize the above vanilla IoU loss and regularized IoU-based losses for both their IoU and regularization terms. The new family of generalized losses improve bbox regression accuracy by adaptively reweighting the loss and gradient of high and low IoU objects.
|
| 35 |
+
|
| 36 |
+
There are also works on AutoML-based loss function search for computer vision tasks [23, 18, 17]. Despite their advantage in saving human efforts, these methods are very expensive in searching qualified loss functions (e.g., days of searching time on multiple GPUs), and probably with limited performance improvement based on existing losses [23]. We will empirically compare with one of these losses in our experiments.
|
| 37 |
+
|
| 38 |
+
# 3 $\alpha$ -IoU Losses for Bounding Box Regression
|
| 39 |
+
|
| 40 |
+
# 3.1 Preliminaries
|
| 41 |
+
|
| 42 |
+
We study the problem of bbox regression in object detection. Let $\pmb { X } \in \mathbb { R } ^ { d _ { x } }$ be the input space and $\pmb { Y } \in \mathbb { R } ^ { \tilde { d } _ { y } }$ be the annotation space, with $d _ { x }$ and $d _ { y }$ denoting the input and annotation dimensions, respectively. Given a dataset $D = \{ ( { \bf x } _ { i } , { \bf y } _ { i } ) \} _ { i = 1 } ^ { n }$ of $n$ training examples with each $( { \pmb x } _ { i } , { \pmb y } _ { i } ) \in$ $( X \times Y )$ , the task is to learn a function $f$ (represented by a detector network) that maps the input space to the annotation space $f : X \to Y$ . In object detection, each $\pmb { y } _ { i } = ( c _ { i , k } , B _ { i , k } ) _ { k = 1 } ^ { m _ { i } }$ , where $m _ { i }$ is the total number of objects in $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ , $c _ { i , k }$ is the category of the $k ^ { t h }$ object in $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ and $B _ { i , k }$ is its bbox.
|
| 43 |
+
|
| 44 |
+
The bbox regression performance is measured by the Intersection over Union (IoU) metric between the predicted bbox $B$ and the ground truth $B ^ { g t }$ $\ d ^ { 3 } \ d ^ { g t } \colon \bar { I o U } = | B \cap B ^ { g t } | / | B \cup B ^ { g t } |$ . Positive examples (both true and false positives) are determined from the set of predictions according to an IoU threshold, based on which the Average Precision (AP) over all categories of objects can be calculated. E.g., $\mathrm { { A P } _ { 5 0 } }$ measures the AP of objects localized by bboxes with an IoU that is above the threshold 0.5. The final performance of a detector is commonly evaluated by the mean Average Precision (mAP) across multiple IoU thresholds. For instance, the popular metric $\mathrm { m A P _ { 5 0 : 9 5 } }$ measures the mAP of examples across the set of IoU thresholds ranging from 0.5 to 0.95 with a stride of 0.05.
|
| 45 |
+
|
| 46 |
+
# 3.2 $\alpha$ -IoU Losses
|
| 47 |
+
|
| 48 |
+
The vanilla IoU loss is defined as $\mathcal { L } _ { \mathrm { I o U } } = 1 - I o U .$ . We first apply the Box-Cox transformation3 [2] and generalize the IoU loss to an $\alpha$ -IoU loss:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\mathcal { L } _ { \alpha \cdot \mathrm { I o U } } = \frac { 1 - I o U ^ { \alpha } } { \alpha } , \alpha > 0 .
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
By modulating the parameter $\alpha$ in $\alpha$ -IoU, one can derive most of the IoU terms in existing losses, e.g., $\log ( I o U )$ , $I o U$ and $I o U ^ { 2 }$ . When $\alpha 0$ , we obtain $\begin{array} { r } { \operatorname* { l i m } _ { \alpha \to 0 } \mathcal { L } _ { \alpha \mathrm { { \cdot } I o U } } = - \mathrm { l o g } ( I o U ) = \mathcal { L } _ { \mathrm { l o g } ( \mathrm { I o U } ) } } \end{array}$ [39] (see the proof in Appendix A). We recover the IoU loss with $\alpha = 1$ : $\mathcal { L } _ { \mathrm { 1 - I o U } } = 1 - I o U = \mathcal { L } _ { \mathrm { I o U } }$ And $\mathcal { L } _ { \mathrm { 2 - I o U } } = \textstyle { \frac { 1 } { 2 } } ( 1 - I o \dot { U } ^ { 2 } ) = \textstyle { \frac { 1 } { 2 } } \mathcal { L } _ { \mathrm { I o U } ^ { 2 } }$ , when $\alpha = 2$ . We can also extend the above $\alpha$ -IoU formula to loss functions with multiple IoU terms (e.g. RIoU [36]) by using multiple $\alpha$ values.
|
| 55 |
+
|
| 56 |
+

|
| 57 |
+
Figure 1: Correlation between IoU and $\mathcal { L } _ { \alpha \mathrm { { - I o U } } } ~ = ~ 1 - ~ I o U ^ { \alpha }$ (left) and its absolute gradient $| \nabla _ { \mathrm { I o U } } \mathcal { L } _ { \alpha - \mathrm { I o U } } |$ (right) with different $\alpha ~ \in ~ [ 0 . 5 , 3 ]$ . According to both plots, ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ reweights all objects adaptively and distinctively for $0 < \alpha < 1$ vs. $\alpha > 1$ $\langle \alpha = 1$ marks the IoU loss).
|
| 58 |
+
|
| 59 |
+
We simplify the above $\alpha$ -IoU formula for $\alpha > 0$ and $\alpha \nrightarrow 0$ , as in this case, the denominator $\alpha$ in equation (1) is just a positive constant in the objective. This gives us two cases of the $\alpha$ -IoU loss for $\alpha 0$ and $\alpha \not 0$ , respectively:
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
\mathcal { L } _ { \alpha \mathrm { - I o U } } = \left\{ { { - \mathrm { l o g } ( I o U ) , ~ \alpha \to 0 } , } \atop { 1 - I o U ^ { \alpha } , ~ \alpha \to 0 . } \right.
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
Here, we are more interested in the case $\alpha \nrightarrow 0$ as most state-of-the-art IoU-based losses have an $\alpha \geq 1$ . We then extend the above $\alpha$ -IoU loss for $\alpha \not 0$ to a more general form by introducing a power penalty/regularization term into the formula:
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
{ \mathcal { L } } _ { \alpha - \mathrm { I o U } } = 1 - I o U ^ { \alpha _ { 1 } } + { \mathcal { P } } ^ { \alpha _ { 2 } } ( B , B ^ { g t } ) ,
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
where $\alpha _ { 1 } > 0$ , $\alpha _ { 2 } > 0$ , and $\mathcal { P } ^ { \alpha _ { 2 } } ( B , B ^ { g t } )$ denotes any penalty term computed based on $B$ and $B ^ { g t }$ . This simple extension allows a straightforward generalization of existing IoU-based losses to their $\alpha$ -IoU versions. In Appendix B.2.1, we empirically show that ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ is not sensitive to $\alpha _ { 2 }$ . We thus maintain the power consistency between the IoU term and the penalty term and take $\alpha _ { 1 } = \alpha _ { 2 }$ as a simple choice when training the detectors.
|
| 72 |
+
|
| 73 |
+
With the above $\alpha$ -IoU formula, we can now generalize the commonly used IoU-based losses including $\mathcal { L } _ { \mathrm { I o U } } , \mathcal { L } _ { \mathrm { G I o U } } , \mathcal { L } _ { \mathrm { D I o U } }$ , and ${ \mathcal { L } } _ { \mathrm { C I o U } }$ using the same power parameter $\alpha$ for the IoU and penalty terms:
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
\begin{array} { r l r } & { } & { \mathcal { L } _ { \mathrm { I o U } } = 1 - I o U \Longrightarrow \mathcal { L } _ { \alpha \mathrm { \cdot I o U } } = 1 - I o U ^ { \alpha } , } \\ & { } & { \mathcal { L } _ { \mathrm { G I o U } } = 1 - I o U + \frac { \left| C \setminus ( B \cup B ^ { g t } ) \right| } { \left| C \right| } \Longrightarrow \mathcal { L } _ { \alpha \mathrm { \cdot G I o U } } = 1 - I o U ^ { \alpha } + ( \frac { \left| C \setminus ( B \cup B ^ { g t } ) \right| } { \left| C \right| } ) ^ { \alpha } , } \\ & { } & { \mathcal { L } _ { \mathrm { D I o U } } = 1 - I o U + \frac { \rho ^ { 2 } ( b , b ^ { g t } ) } { c ^ { 2 } } \Longrightarrow \mathcal { L } _ { \alpha \mathrm { \cdot D I o U } } = 1 - I o U ^ { \alpha } + \frac { \rho ^ { 2 \alpha } ( b , b ^ { g t } ) } { c ^ { 2 \alpha } } , \ ~ } \\ & { } & { \mathcal { L } _ { \mathrm { C I o U } } = 1 - I o U + \frac { \rho ^ { 2 } ( b , b ^ { g t } ) } { c ^ { 2 } } + \beta v \Longrightarrow \mathcal { L } _ { \alpha \mathrm { \cdot C I o U } } = 1 - I o U ^ { \alpha } + \frac { \rho ^ { 2 \alpha } ( b , b ^ { g t } ) } { c ^ { 2 \alpha } } + ( \beta v ) ^ { \alpha } , } \end{array}
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
where $C$ in ${ \mathcal { L } } _ { \mathrm { G I o U } }$ denotes the smallest convex shape enclosing $B$ and $B ^ { g t }$ ; $^ { b }$ and $\mathbf { \delta } _ { b } \mathbf { \mathcal { I } ^ { t } }$ in ${ \mathcal { L } } _ { \mathrm { D I o U } }$ denote central points of $B$ and $B ^ { g t }$ with $\rho ( \cdot )$ being the Euclidean distance and $c$ being the diagonal length of the smallest enclosing box; and in ${ \mathcal { L } } _ { \mathrm { C I o U } }$ , $\begin{array} { r } { v = \frac { 4 } { \pi ^ { 2 } } ( a r c t a n \frac { w ^ { g t } } { h ^ { g t } } - a r c t a n \frac { w } { h } ) ^ { 2 } } \end{array}$ , $\begin{array} { r } { \beta = \frac { v } { ( 1 - I o U ) + v } } \end{array}$ . They give us the family of power IoU losses for bbox regression with their original versions recovered at $\alpha = 1$ . Note that the above $\alpha$ -IoU generalization can be easily extended to more complex loss functions that have multiple IoU or penalty terms (e.g., $\mathcal { L } _ { \alpha - \mathrm { C I o U } } )$ ). Next, we will analyze the properties of $\alpha$ -IoU losses when $\alpha$ takes different values.
|
| 80 |
+
|
| 81 |
+
# 3.3 Properties of $\alpha$ -IoU Losses
|
| 82 |
+
|
| 83 |
+
Here, we focus on the vanilla $\alpha$ -IoU formula $\mathcal { L } _ { \alpha - \mathrm { I o U } } = 1 - I o U ^ { \alpha }$ to analyze its properties, as the penalty terms may affect these properties differently. Figure 1 illustrates the correlation between IoU and ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ (left) and the magnitude of its gradient w.r.t. IoU, i.e., $| \nabla _ { \mathrm { I o U } } \mathcal { L } _ { \alpha - \mathrm { I o U } } |$ (right). One key observation is that the IoU loss (i.e., $\alpha = 1$ ) has a linear correlation with IoU and the gradient is a constant, while ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ reweights objects adaptively (according to their IoU values) following different reweighting schemes with $0 < \alpha < 1$ versus $\alpha > 1$ .
|
| 84 |
+
|
| 85 |
+
The power transformation in ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ preserves key properties of ${ \mathcal { L } } _ { \mathrm { I o U } }$ as a performance metric, including non-negativity, identity of indiscernibles, symmetry, and triangle inequality [32]. Furthermore, we analyze the following important properties of ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ with detailed derivations deferred to Appendix A. We first let $B _ { i }$ and $B _ { j }$ be two predicted bboxes by two different models $M _ { i }$ and $M _ { j }$ respectively, and $B _ { i }$ and $B _ { j }$ correspond to the same ground truth $B ^ { g t }$ with $I o U ( B _ { i } , B ^ { g t } ) < I o U ( \bar { B _ { j } } , B ^ { g t } )$ . Then we have the first property of ${ \mathcal { L } } _ { \alpha }$ -IoU:
|
| 86 |
+
|
| 87 |
+
Property 1 (Order Preservingness). ${ \mathcal { L } } _ { \alpha }$ -IoU preserves the orders of both IoU and $\mathcal { L } _ { I o U }$ : I ${ } ^ { \circ } o \bar { U } ( B _ { i } , B ^ { g t } ) \ < I o U ( B _ { j } , B ^ { g t } ) ^ { - } \iff \ \mathcal { L } _ { I o U } ( B _ { i } , B ^ { g t } ) > \ \mathcal { L } _ { I o U } ( B _ { j } , B ^ { g t } ) \iff \ \mathcal { L } _ { \alpha \cdot I o U } ( B _ { i } , B ^ { g t } ) >$ $\mathcal { L } _ { \alpha - I o U } ( B _ { j } , B ^ { g t } )$ .
|
| 88 |
+
|
| 89 |
+
The above property indicates that both ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ and ${ \mathcal { L } } _ { \mathrm { I o U } }$ are monotonically decreasing functions w.r.t. $I o U$ . As ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ preserves the order of ${ \mathcal { L } } _ { \mathrm { I o U } }$ strictly, it is guaranteed that arg $\mathrm { m i n } _ { B } \mathcal { L } _ { \alpha \mathrm { - I o U } } ( B , B ^ { g t } )$ is identical to arg $\operatorname* { m a x } _ { B } I o U ( B , B ^ { g t } )$ and arg $\mathrm { m i n } _ { B } \bar { \mathcal { L } } _ { \mathrm { I o U } } ( \bar { B , B ^ { g t } } )$ . In other words, the optimal solution arg $\operatorname* { m a x } _ { B } I o U ( B , \bar { B ^ { g t } } )$ can be obtained by minimizing either ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ or ${ \mathcal { L } } _ { \mathrm { I o U } }$ . Following this, the adaptive relative loss reweighting scheme of ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ can be characterized by the second property:
|
| 90 |
+
|
| 91 |
+
Property 2 (Relative Loss Reweighting). Compared with $\mathcal { L } _ { I o U }$ , $\mathcal { L } _ { \alpha - I o U }$ adaptively reweights the relative loss of all objects by $w _ { \mathcal { L } _ { r } } = \mathcal { L } _ { \alpha \cdot I o U } / \mathcal { L } _ { I o U } = 1 + ( I o U - I o U ^ { \alpha } ) / ( 1 - I o U )$ , with $w _ { \mathscr { L } _ { r } } ( I o U =$ $0 ) = 1$ , and $\begin{array} { r } { \operatorname* { l i m } _ { I o U \to 1 } w _ { \mathcal { L } _ { r } } = \alpha } \end{array}$ .
|
| 92 |
+
|
| 93 |
+
The second property indicates that ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ will adaptively down-weight and up-weight the relative loss of all objects according to their IoUs when $0 < \alpha < 1$ and $\alpha > 1$ , respectively. We further note that, when $\alpha > 1$ , the reweighting factor $w _ { \mathcal { L } _ { r } }$ increases monotonically with the increase of IoU $( w _ { \boldsymbol { L } _ { r } }$ grows from 1 to $\alpha$ ) while decreasing monotonically with the increase of IoU when $0 < \alpha < 1 ( w _ { \mathcal { L } _ { r } }$ decays from 1 to $\alpha$ ). We will empirically show that the up-weighting scheme of ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ with $\alpha > 1$ can help the model focus more on high IoU objects to improve both the localization (i.e., predict more high IoU objects) and detection (i.e., more accurate at high APs) performance4. Similarly, we can obtain the third property of adaptive relative gradient reweighting owned by ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ as follows:
|
| 94 |
+
|
| 95 |
+
Property 3 (Relative Gradient Reweighting). Compared with $\mathcal { L } _ { I o U ; }$ , $\mathcal { L } _ { \alpha - I o U }$ adaptively reweights the relative gradient of all objects by $\begin{array} { r } { w _ { \bar { \nabla } _ { r } } = \bar { | } \nabla _ { I o U } \mathcal { L } _ { \alpha - I o U } | / | \nabla _ { I o U } \mathcal { L } _ { I o U } | = \alpha I o U ^ { \bar { \alpha } - 1 } } \end{array}$ , with the turning point at $I o U = \alpha ^ { \frac { 1 } { 1 - \alpha } } \in ( 0 , \frac { 1 } { e } )$ when $0 < \alpha < 1$ and $I o U = \alpha ^ { \frac { 1 } { 1 - \alpha } } \in ( \textstyle { \frac { 1 } { e } } , 1 )$ when $\alpha > 1$ .
|
| 96 |
+
|
| 97 |
+
When $\alpha > 1$ , the above reweighting factor $w _ { \nabla _ { r } }$ increases monotonically with the increase of IoU, while decreasing monotonically with the increase of IoU when $0 \textless \alpha \textless 1$ . This relative gradient reweighting scheme is also adaptive to IoU, with the turning point from up-weighting to down-weighting at $\overline { { I o U } } = \alpha ^ { \frac { 1 } { 1 - \alpha } } \in ( 0 , \frac { 1 } { e } )$ when $0 \textless \alpha \textless 1$ , and from down-weighting to upweighting at $I o U = \alpha ^ { \frac { 1 } { 1 - \alpha } } \in ( \frac { 1 } { e } , 1 )$ when $\alpha > 1$ . The gradient reweighting scheme is bounded by $w _ { \nabla _ { r } } ( I o U = 1 ) = \alpha$ , i.e., $0 \leq w _ { \nabla _ { r } } \leq \alpha$ when $\alpha > 1$ , and $w _ { \nabla _ { r } } \geq \alpha$ when $0 < \alpha < 1$ . This relative gradient reweighting scheme allows the model to learn objects with adaptive speeds (i.e., different gradients) according to their IoUs. Theoretically, when $\alpha = 2$ , $| \nabla _ { \mathrm { I o U } } \mathcal { L } _ { \alpha - \mathrm { I o U } } | > | \overline { { \nabla } } _ { \mathrm { I o U } } \mathcal { L } _ { \mathrm { I o U } } |$ for $I o U \in ( 0 . 5 , 1 ]$ , which accelerates the learning of all positive IoU objects at $\mathrm { { A P } _ { 5 0 } }$ . However, we empirically show that $\alpha$ -IoU losses with $\alpha = 3$ perform more competitively than those with $\alpha = 2$ in most cases. It is probable that $\alpha \cdot$ -IoU losses with $\alpha = 3$ further up-weight the relative loss of objects with $I o U \in ( 0 . 5 , 1 ]$ , although $\alpha$ -IoU losses with $\alpha = 2$ also beat existing baselines (see Figure 6). This property is both data-agnostic and model-agnostic, so we recommend $\alpha = 3$ or $\alpha \in [ 2 , 3 ]$ in practical use for other datasets and models.
|
| 98 |
+
|
| 99 |
+
The above loss and gradient reweighting schemes can also be inferred from Figure 1, with detailed proofs in Appendix A. To summarize, ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ trains better detectors than ${ \mathcal { L } } _ { \mathrm { I o U } }$ for the following reasons. First, the same optimal IoU can be achieved by ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ as that by ${ \mathcal { L } } _ { \mathrm { I o U } }$ (Property 1). Second, ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ with $\alpha > 1$ focuses more on high IoU objects by up-weighting their relative loss (Property
|
| 100 |
+
|
| 101 |
+
2). Third, ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ with $\alpha > 1$ helps detectors learn faster on high IoU objects (here $I o U \in ( \alpha ^ { \frac { 1 } { 1 - \alpha } } , 1 ] )$ through up-weighting their relative gradient (Property 3). In Appendix A, we also provide an analysis of the absolute loss and gradient reweighting properties (Property 4 and 5), showing the additions of $\alpha$ -IoU to IoU. Specifically, when $\alpha > 1$ , ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ adds an absolute loss weight to ${ \mathcal { L } } _ { \mathrm { I o U } }$ (i.e., $w _ { \mathscr { L } _ { a } } = \mathscr { L } _ { \alpha \mathrm { - I o U } } - \mathscr { L } _ { \mathrm { I o U } } = I o U - I o U ^ { \alpha } > 0$ for $I o U \in ( 0 , 1 ) )$ , which creates more space for optimization on all levels of objects (Property 4). Likewise, ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ puts an absolute gradient weight for high IoU objects (i.e., $\bar { w } _ { \nabla _ { a } } = | \bar { \nabla } _ { \mathrm { I o U } } \mathcal { L } _ { \alpha \mathrm { - I o U } } | - | \nabla _ { \mathrm { I o U } } \mathcal { L } _ { \mathrm { I o U } } | = \alpha I o U ^ { \alpha - 1 } - 1 \bar { > } 0$ for $I o U \in ( \alpha ^ { \frac { 1 } { 1 - \alpha } } , 1 ] )$ such that the learning of high IoU objects is accelerated (Property 5). Both of the absolute and relative properties of ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ are adaptive to the IoU values of the objects. Such reweighting schemes will provide more flexibility in achieving different levels of bbox regression accuracies (AP measured under different IoU thresholds).
|
| 102 |
+
|
| 103 |
+
Learning Dynamics of ${ \mathcal { L } } _ { \alpha \mathbf { - } \mathbf { I 0 } \mathbf { U } }$ . Training with ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ is a dynamic process and should be interpreted based on both the absolute and relative properties. With $\alpha > 1$ , easy examples will be learned first with increasing speed towards $I o U = 1$ , while hard examples will be learned gradually and accelerated later on as their IoU improves. We will empirically show in Figure 3 that up-weighting the loss and gradient of high IoU objects can boost the training at the later stage. As a comparison, we will also show that $\alpha$ -IoU losses with $0 < \alpha < 1$ tend to degrade the final performance in Section 4.4. Reducing the loss and gradient of high IoU objects ends up with more poorly localized objects.
|
| 104 |
+
|
| 105 |
+
# 4 Experiments
|
| 106 |
+
|
| 107 |
+
# 4.1 Datasets and Training Setup
|
| 108 |
+
|
| 109 |
+
We conduct all experiments on two popular benchmarks, i.e., PASCAL VOC [9] and MS COCO [22]. On the PASCAL VOC benchmark, we train all models on the trainval set $2 0 0 7 + 2 0 1 2$ (containing 16, 551 images from 20 categories) and evaluate them on the test set 2007 (containing 4, 952 images) [9]. On the MS COCO benchmark, we train all models on the training set 2017 (containing 118K images from 80 categories) and evaluate them on the val set 2017 (containing 5K images) [22]. We train all state-of-the-art models with the original implementation released by the authors. Specifically, we follow the original implementation’s training protocol with default parameters and the number of training epochs with different losses [31, 32, 43, 4]. Implementation details of all models are given in Appendix B.1. All experiments are run with NVIDIA V100 GPUs. Code is available at https://github.com/Jacobi93/Alpha-IoU.
|
| 110 |
+
|
| 111 |
+
# 4.2 Results and Analysis
|
| 112 |
+
|
| 113 |
+
We first validate the effectiveness of $\alpha$ -IoU losses in training both anchor-based and anchor-free models on the two datasets. We choose YOLOv5s (i.e., YOLOv5 small) and YOLOv5x (i.e., YOLOv5 extra large) as one-stage anchor-based models, and DETR (ResNet-50) as an anchor-free model. Both $\alpha$ -IoU losses (i.e., ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ and $\mathcal { L } _ { \alpha - \mathrm { D I o U } } )$ are generalized from existing baselines following equation (4). From Table 1, we can observe that $\alpha$ -IoU losses surpass existing losses consistently across multiple models and datasets in terms of both mAP and $\mathrm { m A P _ { 7 5 : 9 5 } }$ , especially at the high bbox regression accuracy $\mathrm { m A P _ { 7 5 : 9 5 } }$ . The superiority of $\alpha$ -IoU losses is more pronounced at high accuracy levels, which might reach more than $6 0 \%$ relative improvement at $\mathsf { A P } _ { 9 5 }$ . Interestingly, $\alpha$ -IoU losses tend to help more of light models (e.g., YOLOv5s with 7.3M parameters and 17 GFLOPs) than heavy models (e.g., YOLOv5x with $8 7 . 7 \mathbf { M }$ parameters and 218.8 GFLOPs). This indicates that $\alpha$ -IoU losses hold more advantage while training light models in computing-resource-limited scenarios, such as mobile devices, autonomous vehicles, and robots.
|
| 114 |
+
|
| 115 |
+
The consistent improvements on both PASCAL VOC and MS COCO demonstrate the stability of $\alpha$ -IoU losses across different datasets. In addition, we also verify its robustness to extremely small training sets in Appendix B.2.2, where $\alpha$ -IoU losses beat existing losses at various scales, i.e., from 4K $2 5 \%$ trainval set of PASCAL VOC $2 0 0 7 { + } 2 0 1 2 ,$ ) to 118K (the entire training set of MS COCO 2017) samples. It is possible that $\alpha$ -IoU losses may not perform well if measured by a single low AP metric. For example, there may be less than $0 . 5 \%$ performance drop at $\mathrm { { A P } _ { 5 0 } }$ when $\alpha = 3$ , however, this is compensated by the significant boost at high APs. With some examples from the test set of PASCAL VOC 2007 (Figure 4) and the val set of MS COCO 2017 (Figure 5), we show that $\alpha$ -IoU losses are able to localize objects more accurately than the baselines with more true positives and fewer false positives.
|
| 116 |
+
|
| 117 |
+
Table 1: The performance of YOLOv5s, YOLOv5x and DETR models trained using different localization losses on PASCAL VOC and MS COCO benchmarks. Results are obtained on the test set of PASCAL VOC 2007 and the val set of MS COCO 2017. mAP denotes $\mathrm { m A P _ { 5 0 : 9 5 } }$ ; $\mathrm { m A P _ { 7 5 : 9 5 } }$ denotes the mean AP over $\mathsf { A P } _ { 7 5 }$ , $\mathbf { A P } _ { 8 0 } , \cdot \cdot \cdot , \mathbf { A P } _ { 9 5 }$ . "rela. improv." stands for the relative improvement. $\alpha = 3$ is used for all $\alpha$ -IoU losses in all experiments.
|
| 118 |
+
|
| 119 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Loss</td><td rowspan="2"></td><td colspan="5">PASCAL VOC</td><td colspan="2"></td><td colspan="5">MS COCO</td></tr><tr><td>AP50</td><td>AP75</td><td>AP85 AP95</td><td></td><td>mAP</td><td>mAP75:95l</td><td>AP50</td><td>AP75</td><td>AP85</td><td>AP95</td><td>mAP</td><td>mAP75:95</td></tr><tr><td rowspan="5">YOLOv5s</td><td rowspan="5">LIoU Lα-loU rela. improv.</td><td>78.81 78.62</td><td>58.04 58.78</td><td>35.07 38.16</td><td>2.34 3.64</td><td>52.74 53.61</td><td>32.45 34.46</td><td>55.51</td><td>38.59</td><td>23.58</td><td></td><td>2.07</td><td>36.29</td><td>21.82</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>55.25</td><td>39.69</td><td>25.85</td><td>3.35</td><td>37.01</td><td>23.66</td></tr><tr><td></td><td>-0.24%</td><td>1.27%</td><td>8.81%</td><td>55.56%</td><td>1.65%</td><td>6.21%</td><td>-0.47%</td><td>2.85%</td><td>9.63%</td><td>61.84%</td><td>1.98%</td><td>8.43%</td></tr><tr><td>LDIoU</td><td>78.19</td><td>57.77</td><td>34.89</td><td>2.36</td><td>52.30</td><td>32.17</td><td>55.67</td><td>39.01</td><td>23.56</td><td>2.03</td><td>36.36</td><td>21.95</td></tr><tr><td>Lα-DIoU rela. improv.</td><td>78.33 0.18%</td><td>59.24 38.46</td><td>3.50</td><td></td><td>53.76</td><td>34.66</td><td>55.84</td><td>39.49</td><td>25.49</td><td>3.30</td><td>36.74</td><td>23.34</td></tr><tr><td rowspan="6">YOLOv5x</td><td colspan="10">LIoU</td><td rowspan="6">8.19%</td><td colspan="10">62.56%</td></tr><tr><td></td><td>85.24</td><td>2.54%</td><td>10.23%</td><td>48.31%</td><td>2.79% 63.95</td><td>7.72%</td><td></td><td>0.31%</td><td>1.23%</td><td></td><td></td><td>1.05%</td><td>6.32%</td></tr><tr><td>Lα-IoU</td><td>84.83</td><td>70.08 70.20</td><td>53.08 53.75</td><td>10.88 13.74</td><td>64.25</td><td>46.78 48.06</td><td></td><td>67.36 67.72</td><td>52.15 52.61</td><td>38.22 38.62</td><td>9.31 9.76</td><td>48.42 48.67</td><td>34.42 34.72</td></tr><tr><td>rela. improv.</td><td>-0.48%</td><td>0.17%</td><td>1.26%</td><td>26.29%</td><td>0.47%</td><td></td><td>2.73%</td><td>0.53%</td><td>0.88%</td><td>1.05%</td><td>4.83%</td><td>0.52%</td><td>0.87%</td></tr><tr><td>LDIoU</td><td>85.04</td><td>71.05</td><td>53.71</td><td>11.11</td><td>64.21</td><td>47.30</td><td></td><td>67.54</td><td>52.03</td><td>38.02</td><td>8.58</td><td>48.38</td><td>34.16</td></tr><tr><td>La-DloU rela.improv.</td><td>84.90</td><td>71.34</td><td>54.23</td><td>13.85</td><td>64.49</td><td>48.40</td><td></td><td></td><td>52.65</td><td>39.28</td><td>10.29</td><td>48.81</td><td>35.42</td></tr><tr><td rowspan="8">DETR</td><td rowspan="8">LIoU</td><td>-0.16%</td><td>0.41%</td><td>0.97%</td><td></td><td>24.66%</td><td>0.44%</td><td>2.32%</td><td>67.42 -0.18%</td><td>1.19%</td><td>3.31%</td><td></td><td>19.93%</td><td>0.89%</td><td>3.68%</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>76.50</td><td>53.85</td><td>29.54</td><td>1.62</td><td>49.78</td><td>28.82</td><td>59.38</td><td>41.67</td><td>26.13</td><td></td><td>3.52</td><td>39.23</td><td>24.37</td></tr><tr><td>La-loU rela.improv.</td><td>76.22 -0.37%</td><td>55.03 2.19%</td><td>32.30 9.34%</td><td>2.28 40.74%</td><td>51.12 2.69%</td><td>31.08 7.84%</td><td>59.61 0.39%</td><td>42.65 2.35%</td><td>28.57 9.34%</td><td></td><td>5.09 44.60%</td><td>40.18 2.42%</td><td>26.44 8.49%</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>LDIoU</td><td>76.26 76.44</td><td>54.09</td><td>29.23</td><td>1.56</td><td>49.91</td><td>28.68</td><td></td><td>59.28</td><td>41.62</td><td>26.09</td><td>3.54</td><td>39.25</td><td>24.48</td></tr><tr><td>La-DloU rela. improv.</td><td>0.24%</td><td>54.89 1.48%</td><td>31.48 7.70%</td><td>2.44</td><td>50.96 2.10%</td><td>30.60 6.69%</td><td>59.38</td><td>42.34 1.73%</td><td></td><td>28.23</td><td>5.36</td><td>39.94 1.76%</td><td>26.05</td></tr><tr><td></td><td></td><td></td><td></td><td>56.41%</td><td></td><td></td><td>0.17%</td><td></td><td></td><td>8.20%</td><td>51.41%</td><td></td><td>6.41%</td></tr></table>
|
| 120 |
+
|
| 121 |
+

|
| 122 |
+
Figure 2: IoU distributions between predicted bboxes and their ground truth after NMS.
|
| 123 |
+
|
| 124 |
+

|
| 125 |
+
Figure 3: Validation mAPs $( \mathrm { m A P _ { 5 0 : 9 5 } } )$ across 300 training epochs.
|
| 126 |
+
|
| 127 |
+
We further analyze the bbox regression accuracy by showing the IoU distributions between the predicted bboxes and their ground truth for YOLOv5s trained using different losses on PASCAL VOC. After NMS with the IoU threshold being 0.5, we visualize the number of positively predicted bboxes under different IoU thresholds from 0.5 to 0.9 in Figure 2, showing that $\alpha$ -IoU losses detect more positive objects than baseline losses across all IoU thresholds. Particularly, $\alpha$ -IoU losses detect approximately $1 \%$ more positive objects than the baselines when $I o U \ge 0 . 5$ , and $1 1 \%$ more high IoU objects when $I o U \ge 0 . 9$ . This demonstrates that $\alpha$ -IoU boosts both the precisions and recalls of detectors. $\alpha$ -IoU is extremely advantageous in pushing low IoU objects to high IoU objects by up-weighting their loss, thus outperforming baseline losses significantly at the high accuracy level and contributing to the improvement of the final detection performance (Table 1).
|
| 128 |
+
|
| 129 |
+
Moreover, Figure 3 shows that $\alpha$ -IoU losses are able to boost the late training stage (e.g., after 200 epochs) through up-weighting the gradient of high IoU objects, while almost having no negative impact on the early training stage (e.g., the first 100 epochs). When $\alpha > 1$ , the relative gradient weight is $0 \leq w _ { \nabla _ { r } } < 1$ for $0 \leq I o U < \alpha ^ { \frac { 1 } { 1 - \alpha } }$ , while $1 \leq w _ { \nabla _ { r } } \leq \alpha$ for $\alpha ^ { \frac { 1 } { 1 - \alpha } } \leq \hat { I o U } \leq 1$ , as analyzed in Property 3 and illustrated in Figure 1 (right). This property helps tune down the gradients of low IoU objects at the early training stage, which has a smoothing effect (reduces the high variance in parameter update caused by hard examples) that helps stabilize the model training when gradients are large at the early stage. On the other hand, the gradient up-weighting is well-bounded by $w _ { \nabla _ { r } } \leq \alpha$ , which makes up-weighting relatively safe for high IoU objects, as the original loss and gradient are small for these examples, so is the learning rate.
|
| 130 |
+
|
| 131 |
+

|
| 132 |
+
Figure 4: Example results on the test set of PASCAL VOC 2007 using YOLOv5s trained by ${ \mathcal { L } } _ { \mathrm { I o U } }$ (top row) and ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ with $\alpha = 3$ (bottom row). ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ performs better than ${ \mathcal { L } } _ { \mathrm { I o U } }$ because it can localize objects more accurately (image 1 and 2), thus can detect more true positive objects (image 3 to 5) and fewer false positive objects (image 6 and 7).
|
| 133 |
+
|
| 134 |
+

|
| 135 |
+
Figure 5: Example results on the val set of MS COCO 2017 using YOLOv5s trained by ${ \mathcal { L } } _ { \mathrm { I o U } }$ (top row) and ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ with $\alpha = 3$ (bottom row). ${ \mathcal { L } } _ { \alpha }$ -IoU performs better than ${ \mathcal { L } } _ { \mathrm { I o U } }$ because it can localize objects more accurately (image 1), thus can detect more true positive objects (image 2 to 5) and fewer false positive objects (image 4 to 7). Note that ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ detects both more true positive and fewer false positive objects in image 4 and 5 than ${ \mathcal { L } } _ { \mathrm { I o U } }$ .
|
| 136 |
+
|
| 137 |
+
We also conduct an experiment to compare our $\alpha$ -IoU with a set of existing IoU-based losses in training a popular two-stage anchor-based model, Faster R-CNN (ResNet-50-FPN). In Table 2, results at the top are reproduced using the MMDetection toolbox [6] while those in the middle are reported results in the original papers [43, 41, 23]. Results at the bottom are obtained by replacing existing losses with their $\alpha$ -IoU versions (i.e., improve based on top results using MMDetection). The results on MS COCO demonstrate that $\alpha$ -IoU losses are quite competitive compared with existing baselines in terms of both mAP and $\mathrm { m A P _ { 7 5 : 9 5 } }$ . Note that the Autoloss searches both the classification loss and the localization loss, thus taking a huge amount of searching time [23]. In contrast, $\alpha$ -IoU losses only need an easy modification of the localization loss and win the Autoloss without causing any additional computational overhead.
|
| 138 |
+
|
| 139 |
+
# 4.3 Robustness to Noisy Bounding Boxes
|
| 140 |
+
|
| 141 |
+
It happens quite often that people annotate inaccurate bboxes in images/videos as the ground truth, even with computer-assisted annotation tools. However, there is little work on the robustness of localization losses to noisy bboxes, even though a number of methods have been proposed for robust learning with noisy labels, anchors, and bboxes [27, 26, 12, 10, 15, 37, 38, 25, 19, 20]. Here, we fill this gap by conducting a set of experiments to evaluate the robustness of different localization losses to noisy bboxes. We show that $\alpha$ -IoU is more robust to noisy bboxes as they focus less on the low IoU objects, creating a suppression effect on the learning of the noisy bbox examples. Considering that open datasets like PASCAL VOC and MS COCO are carefully annotated, we synthesize a set of common noisy bboxes by perturbing normalized bboxes in the entire training set. The perturbations follow a uniform noise distribution in $[ - \eta w , \eta w ]$ at horizontal coordinates $\scriptstyle { \dot { x } }$ and $w$ ) and $[ - \eta h , \eta h ]$ at vertical coordinates $y$ and $h$ ), where $\eta$ is the noise rate [20]. We then constrain all the noisy bboxes by the following boundary conditions:
|
| 142 |
+
|
| 143 |
+
$$
|
| 144 |
+
0 < w < 1 , ~ 0 < h < 1 , ~ \frac { 1 } { 2 } w \leq x \leq 1 - \frac { 1 } { 2 } w , ~ \frac { 1 } { 2 } h \leq y \leq 1 - \frac { 1 } { 2 } h .
|
| 145 |
+
$$
|
| 146 |
+
|
| 147 |
+
Table 2: The performance of Faster R-CNN (ResNet-50-FPN) with $1 \times$ schedule and single scale training on MS COCO using different localization losses. Results are obtained on the val set of MS COCO 2017. mAP denotes $\mathrm { m A P _ { 5 0 : 9 5 } }$ ; $\mathrm { m A P _ { 7 5 : 9 5 } }$ denotes the mean AP over $\mathsf { A P } _ { 7 5 }$ , $\mathbf { A P } _ { 8 0 } , \cdot \cdot \cdot , \mathbf { A P } _ { 9 5 }$ . $\mathsf { A P } _ { s }$ , $\mathsf { A P } _ { m }$ , and $\mathsf { A P } _ { l }$ denote the AP for small, medium, and large objects, respectively. † marks the reproduced results from the MMDetection toolbox [6], while ∗ marks the results in the original papers. "–" represents the missing results in papers. $\alpha = 3$ is used for all $\alpha$ -IoU losses in all experiments. The top two best results in every column are boldfaced.
|
| 148 |
+
|
| 149 |
+
<table><tr><td>Loss</td><td>AP50</td><td>AP75</td><td>AP80</td><td>AP85</td><td>AP90</td><td>AP95</td><td>mAP</td><td>mAP75:95|</td><td>APs</td><td>APm</td><td>APt</td></tr><tr><td>+e1</td><td>58.13</td><td>40.45</td><td>33.56</td><td>23.39</td><td>11.09</td><td>1.24</td><td>37.37</td><td>21.95</td><td>21.20</td><td>40.96</td><td>48.13</td></tr><tr><td>LIoU</td><td>58.12</td><td>41.23</td><td>34.03</td><td>24.43</td><td>12.42</td><td>1.61</td><td>37.88</td><td>22.74</td><td>21.61</td><td>41.63</td><td>49.11</td></tr><tr><td>LGIoU</td><td>58.18</td><td>41.00</td><td>33.52</td><td>24.13</td><td>11.97</td><td>1.51</td><td>37.62</td><td>22.43</td><td>21.49</td><td>41.07</td><td>48.90</td></tr><tr><td>+LBIoU</td><td>58.05</td><td>40.57</td><td>33.54</td><td>23.85</td><td>11.10</td><td>1.19</td><td>37.43</td><td>22.05</td><td>21.57</td><td>41.00</td><td>48.17</td></tr><tr><td>*LIoU</td><td>/</td><td>40.79</td><td>/</td><td></td><td>1</td><td>1</td><td>37.93</td><td></td><td>21.58</td><td>40.82</td><td>50.14</td></tr><tr><td>*LGIoU</td><td>1</td><td>41.11</td><td></td><td></td><td>1</td><td></td><td>38.02</td><td></td><td>21.45</td><td>41.06</td><td>50.21</td></tr><tr><td>*LDIoU</td><td>1</td><td>41.11</td><td></td><td></td><td>1</td><td>1</td><td>38.09</td><td>1</td><td>21.66</td><td>41.18</td><td>50.32</td></tr><tr><td>*LCIoU</td><td>1</td><td>41.96</td><td></td><td></td><td></td><td></td><td>38.65</td><td></td><td>21.32</td><td>41.83</td><td>51.51</td></tr><tr><td>*LFocal-EIoU</td><td>59.10</td><td>42.40</td><td></td><td></td><td></td><td></td><td>38.90</td><td></td><td>21.20</td><td>41.10</td><td>50.20</td></tr><tr><td>*Autoloss</td><td>58.60</td><td>41.80</td><td>1</td><td>一</td><td>1</td><td>1</td><td>38.50</td><td>1</td><td>22.00</td><td>42.20</td><td>50.20</td></tr><tr><td>Lα-IoU</td><td>58.81</td><td>41.94</td><td>34.81</td><td>25.36</td><td>13.27</td><td>1.81</td><td>38.96</td><td>23.44</td><td>22.14</td><td>42.11</td><td>50.36</td></tr><tr><td>La-GloU</td><td>59.01</td><td>42.00</td><td>35.13</td><td>25.14</td><td>13.09</td><td>2.03</td><td>39.18</td><td>23.46</td><td>22.05</td><td>42.19</td><td>50.08</td></tr><tr><td>Lα-DIoU</td><td>59.27</td><td>42.18</td><td>35.25</td><td>25.47</td><td>13.32</td><td>1.95</td><td>39.43</td><td>23.65</td><td>22.10</td><td>42.10</td><td>50.43</td></tr><tr><td>La-CloU</td><td>59.09</td><td>41.92</td><td>35.01</td><td>25.08</td><td>13.04</td><td>1.98</td><td>39.25</td><td>23.41</td><td>21.94</td><td>41.88</td><td>50.01</td></tr></table>
|
| 150 |
+
|
| 151 |
+
Table 3: The performance of YOLOv5s trained using different localization losses on simulated noisy trainval sets of PASCAL VOC $2 0 0 7 { + } 2 0 1 2$ under noise rates $\eta = 0 . 1 , 0 . 2$ , and 0.3. Results are obtained on the clean test set of PASCAL VOC 2007. mAP denotes $\mathrm { m A P _ { 5 0 : 9 5 } }$ ; $\mathrm { m A P _ { 7 5 : 9 5 } }$ denotes the mean AP over $\mathsf { A P } _ { 7 5 }$ , $\mathbf { A P } _ { 8 0 } , \cdot \cdot \cdot , \mathbf { A P } _ { 9 5 }$ . "rela. improv." stands for the relative improvement. $\alpha = 3$ is used for all $\alpha$ -IoU losses in all experiments.
|
| 152 |
+
|
| 153 |
+
<table><tr><td>Noise</td><td>Loss</td><td>AP50</td><td>AP55</td><td>AP60</td><td>AP65</td><td>AP70</td><td>AP75</td><td>AP80</td><td>AP85</td><td>AP90</td><td>AP95</td><td>mAP</td><td>mAP75:95</td></tr><tr><td rowspan="6">0.1</td><td>LIoU La-IoU</td><td>74.48 74.67</td><td>71.57 71.94</td><td>68.08 68.73</td><td>63.29 64.27</td><td>56.55 57.75</td><td>47.12 48.50</td><td>33.06 36.88</td><td>17.53 21.25</td><td>4.16 6.30</td><td>0.26 0.28</td><td>43.61 45.06</td><td>20.43</td></tr><tr><td>rela. improv.</td><td>0.26%</td><td>0.52%</td><td>0.95%</td><td>1.55%</td><td>2.12%</td><td>2.93%</td><td>11.55%</td><td>21.22%</td><td>51.44%</td><td>7.69%</td><td>3.32%</td><td>22.64 10.85%</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>LDIoU</td><td>74.09</td><td>71.46</td><td>67.88</td><td>63.09</td><td>56.18</td><td>46.71</td><td>32.67</td><td>17.50</td><td>4.43</td><td>0.23</td><td>43.42</td><td>20.31</td></tr><tr><td>La-DloU</td><td>74.38</td><td>71.95</td><td>68.10</td><td>63.52</td><td>57.18</td><td>48.47</td><td>35.90</td><td>20.89</td><td>6.37</td><td>0.33</td><td>44.71</td><td>22.39</td></tr><tr><td>rela. improv.</td><td>0.39%</td><td>0.69%</td><td>0.32%</td><td>0.68%</td><td>1.78%</td><td>3.77%</td><td>9.89%</td><td>19.37%</td><td>43.79%</td><td>43.48%</td><td>2.97%</td><td>10.26%</td></tr><tr><td rowspan="6">0.2</td><td>LIoU La-loU</td><td>67.82</td><td>63.93</td><td>58.22</td><td>50.11</td><td>39.31</td><td>26.33</td><td>13.51</td><td>4.55</td><td>0.66</td><td>0.05</td><td>32.45</td><td>9.02</td></tr><tr><td></td><td>68.20</td><td>64.21</td><td>58.77</td><td>51.59</td><td>40.66</td><td>29.20</td><td>16.11</td><td>6.06</td><td>1.31</td><td>0.10</td><td>33.62</td><td>10.56</td></tr><tr><td>rela. improv.</td><td>0.56%</td><td>0.44%</td><td>0.94%</td><td>2.95%</td><td>3.43%</td><td>10.90%</td><td>19.25%</td><td>33.19%</td><td>98.48%</td><td>100%</td><td>3.61%</td><td>17.03%</td></tr><tr><td>LDIoU</td><td>67.39</td><td>62.94</td><td>57.29</td><td>49.25</td><td>39.40</td><td>27.13</td><td>13.78</td><td>4.52</td><td>0.68</td><td>0.02</td><td>32.24</td><td>9.23</td></tr><tr><td>La-DloU</td><td>68.26</td><td>64.49</td><td>59.59</td><td>51.99</td><td>41.19</td><td>29.12</td><td>15.77</td><td>5.84</td><td>1.25</td><td>0.21</td><td>33.77</td><td>10.44</td></tr><tr><td>rela.improv.</td><td>1.29%</td><td>2.46%</td><td>4.01%</td><td>5.56%</td><td>4.54%</td><td>7.34%</td><td>14.44%</td><td>29.20%</td><td>83.82%</td><td>950%</td><td>4.75%</td><td>13.14%</td></tr><tr><td rowspan="6">0.3</td><td>LIoU La-IoU</td><td>56.54</td><td>49.69</td><td>40.67</td><td>30.80</td><td>19.99</td><td>11.13</td><td>4.81</td><td>1.43</td><td>0.31</td><td>0.04</td><td>21.54</td><td>3.54</td></tr><tr><td></td><td>58.59</td><td>51.58</td><td>43.23</td><td>32.93</td><td>22.27</td><td>12.52</td><td>5.91</td><td>2.16</td><td>0.73</td><td>0.12</td><td>23.00</td><td>4.29</td></tr><tr><td>rela. improv.</td><td>3.63%</td><td>3.80%</td><td>6.29%</td><td>6.92%</td><td>11.41%</td><td>12.49%</td><td>22.87%</td><td>51.05%</td><td>135%</td><td>200%</td><td>6.78%</td><td>20.99%</td></tr><tr><td>LDIoU</td><td>56.84</td><td>49.82</td><td>41.50</td><td></td><td>20.80</td><td>11.22</td><td>4.84</td><td>1.51</td><td>0.46</td><td></td><td></td><td></td></tr><tr><td></td><td>58.45</td><td>51.94</td><td>43.9</td><td>32.06 33.78</td><td>22.57</td><td>12.89</td><td>6.34</td><td>2.42</td><td>0.65</td><td>0.07</td><td>21.91 23.31</td><td>3.62 4.49</td></tr><tr><td>La-DIoU rela. improv.</td><td>2.83%</td><td>4.26%</td><td>5.78%</td><td>5.36%</td><td>8.51%</td><td>14.88%</td><td>30.99%</td><td>60.26%</td><td>41.30%</td><td>0.16 129%</td><td>6.39%</td><td>24.09%</td></tr></table>
|
| 154 |
+
|
| 155 |
+
We test $\eta = 0 . 1 , 0 . 2 , 0 . 3$ in our experiments, with the average IoU between the noisy bboxes and their clean versions dropping to 0.833, 0.710, and 0.613, respectively. Examples of the synthesized noisy bboxes can be found in Appendix B.4. As shown in Table 3, $\alpha$ -IoU improves the baseline losses (i.e., ${ \mathcal { L } } _ { \mathrm { I o U } }$ and ${ \mathcal { L } } _ { \mathrm { { D I o U } } } ,$ ) considerably in these noisy scenarios. We gain increasing relative improvements from $\mathrm { { A P } _ { 5 0 } }$ to $\mathsf { A P } _ { 9 5 }$ , which accumulate to a more significant improvement in $\mathrm { m A P _ { 7 5 : 9 5 } }$ . Note that $\alpha$ -IoU losses also outperform the baselines at $\mathrm { { A P } _ { 5 0 } }$ across all noisy scenarios, which is not always the case when bboxes are clean (Table 1). Furthermore, $\alpha$ -IoU losses are noticeably more robust against more severe noises. For instance, the relative improvement of $\mathcal { L } _ { \alpha \mathrm { - D I o U } }$ over ${ \mathcal { L } } _ { \mathrm { D I o U } }$ increases from $2 . 9 7 \% / 1 0 . 2 6 \%$ to $6 . 3 9 \% / 2 4 . 0 9 \%$ according to $\mathrm { m A P / m A P _ { 7 5 : 9 5 } }$ when the noise rate $\eta$ rises from 0.1 to 0.3. These results confirm the advantage of $\alpha$ -IoU losses in noisy bbox scenarios.
|
| 156 |
+
|
| 157 |
+

|
| 158 |
+
Figure 6: The performance of YOLOv5 models trained using $\alpha$ -IoU with different $\alpha$ values and evaluated on the clean test set of PASCAL VOC 2007. Black dashed lines denote baselines (i.e., the family of $\alpha$ -IoU with $\alpha = 1$ ) while red dashed lines denote the family of $\alpha$ -IoU with $\alpha = 3$ .
|
| 159 |
+
|
| 160 |
+
# 4.4 Sensitivity to power parameter $\alpha$
|
| 161 |
+
|
| 162 |
+
Here, we evaluate the performance of $\alpha$ -IoU with varying $\alpha$ values $( \alpha \in [ 0 . 5 , 5 ] )$ ) via a set of experiments with ${ \mathcal { L } } _ { \alpha - { \mathrm { I o U } } }$ and $\mathcal { L } _ { \alpha - \mathrm { D I o U } }$ . The results are shown in Figure 6 for YOLOv5s on PASCAL VOC in both clean and various noisy bbox scenarios. It is evident that $\alpha$ -IoU losses with $\alpha \in [ 2 , 4 ]$ perform competitively well across all scenarios, with $\alpha = 3$ performing the best in most cases. When $\alpha > 3$ , $\alpha$ -IoU losses tend to perform worse on low APs than the baselines (i.e., $\alpha$ -IoU with $\alpha = 1 \AA$ ), although the performance at high APs gains more improvement. We also test an extreme case with $\alpha = 1 0$ , in which the performance drops by $5 . 6 1 \% / 1 \dot { 0 } . 9 2 \% / 2 3 . 8 8 \% / 3 1 . 8 2 \%$ on average compared with $\alpha = 3$ under noise rates $\eta = 0 / 0 . 1 / 0 . 2 / 0 . 3$ , respectively. More specifically, it becomes worse than the baselines according to either mAP or $\mathrm { m A P _ { 7 5 : 9 5 } }$ . This indicates that a proper choice of $\alpha$ is crucial for $\alpha$ -IoU losses. Our recommendation is to tune $\alpha \in [ 2 , 3 ]$ for most applications or directly use $\alpha = 3$ when tuning is too expensive. Note that $\alpha \in [ 3 , 4 ]$ may be a better choice when high levels of bbox regression accuracy is desired, e.g., $\mathrm { m A P _ { 7 5 : 9 5 } }$ is the preferred performance metric. It is possible that $\alpha < 1$ is a better choice for certain applications, although $\alpha$ -IoU losses with $\alpha < 1$ perform consistently worse than the baselines in our experiments.
|
| 163 |
+
|
| 164 |
+
# 5 Conclusions
|
| 165 |
+
|
| 166 |
+
In this paper, we proposed a unified formula $\alpha$ -IoU to generalize existing IoU-based losses to a new family of power IoU losses. By modulating the power parameter $\alpha$ , $\alpha$ -IoU offers the flexibility to achieve different levels of bbox regression accuracy when training an object detector. We analyzed the order preservingness and the loss/gradient reweighting properties of $\alpha$ -IoU, and showed that $\alpha$ -IoU can improve bbox regression accuracy through up-weighting the loss and gradient of high IoU objects. Experiments with multiple detection models and benchmark datasets demonstrated that $\alpha$ -IoU losses can consistently outperform existing IoU-based losses, especially at the high Average Precisions (APs). $\alpha$ -IoU has the potential to be widely applied in real-world object detection applications as 1) it improves existing IoU-based losses, 2) it benefits light models, 3) it is extremely advantageous on small datasets, and 4) it is more robust to noisy bboxes. For future work, we will explore new generalization formulas for other metric-derived loss functions [13], such as Dice, Hausdorff distance, and Chamfer distance losses.
|
| 167 |
+
|
| 168 |
+
# Societal Impacts
|
| 169 |
+
|
| 170 |
+
The proposed loss functions can help train high-performance object detectors for impactful applications such as self-driving, face recognition and video surveillance. While not our initial intention, these models could potentially be manipulated by adversaries or unauthorized users for malicious purposes. This could compromise the safety or privacy of certain individuals. We believe strict regulations should be established to prevent such illegitimate exploitations.
|
| 171 |
+
|
| 172 |
+
# References
|
| 173 |
+
|
| 174 |
+
[1] A. Bochkovskiy, C.-Y. Wang, and H.-Y. M. Liao. Yolov4: Optimal speed and accuracy of object detection. arXiv preprint arXiv:2004.10934, 2020.
|
| 175 |
+
[2] G. E. Box and D. R. Cox. An analysis of transformations. Journal of the Royal Statistical Society: Series B (Methodological), 26(2):211–243, 1964. [3] Z. Cai and N. Vasconcelos. Cascade r-cnn: Delving into high quality object detection. In CVPR, pages 6154–6162, 2018. [4] N. Carion, F. Massa, G. Synnaeve, N. Usunier, A. Kirillov, and S. Zagoruyko. End-to-end object detection with transformers. In ECCV, pages 213–229. Springer, 2020. [5] K. Chen, J. Pang, J. Wang, Y. Xiong, X. Li, S. Sun, W. Feng, Z. Liu, J. Shi, W. Ouyang, et al. Hybrid task cascade for instance segmentation. In CVPR, pages 4974–4983, 2019.
|
| 176 |
+
[6] K. Chen, J. Wang, J. Pang, Y. Cao, Y. Xiong, X. Li, S. Sun, W. Feng, Z. Liu, J. Xu, et al. Mmdetection: Open mmlab detection toolbox and benchmark. arXiv preprint arXiv:1906.07155, 2019.
|
| 177 |
+
[7] Z. Dong, G. Li, Y. Liao, F. Wang, P. Ren, and C. Qian. Centripetalnet: Pursuing high-quality keypoint pairs for object detection. In CVPR, pages 10519–10528, 2020. [8] K. Duan, S. Bai, L. Xie, H. Qi, Q. Huang, and Q. Tian. Centernet: Keypoint triplets for object detection. In ICCV, pages 6569–6578, 2019. [9] M. Everingham, L. Van Gool, C. K. Williams, J. Winn, and A. Zisserman. The pascal visual object classes (voc) challenge. IJCV, 88(2):303–338, 2010.
|
| 178 |
+
[10] J. Gao, J. Wang, S. Dai, L.-J. Li, and R. Nevatia. Note-rcnn: Noise tolerant ensemble rcnn for semi-supervised object detection. In ICCV, pages 9508–9517, 2019.
|
| 179 |
+
[11] R. Girshick. Fast r-cnn. In ICCV, pages 1440–1448, 2015.
|
| 180 |
+
[12] B. Han, Q. Yao, X. Yu, G. Niu, M. Xu, W. Hu, I. W. Tsang, and M. Sugiyama. Co-teaching: Robust training of deep neural networks with extremely noisy labels. In NeurIPS, 2018.
|
| 181 |
+
[13] J. He, S. Erfani, S. Wijewickrema, S. O’Leary, and K. Ramamohanarao. Learning non-unique segmentation with reward-penalty dice loss. In IJCNN, pages 1–8. IEEE, 2020.
|
| 182 |
+
[14] K. He, G. Gkioxari, P. Dollár, and R. Girshick. Mask r-cnn. In ICCV, pages 2961–2969, 2017.
|
| 183 |
+
[15] M. Khodabandeh, A. Vahdat, M. Ranjbar, and W. G. Macready. A robust learning approach to domain adaptive object detection. In ICCV, pages 480–490, 2019.
|
| 184 |
+
[16] H. Law and J. Deng. Cornernet: Detecting objects as paired keypoints. In ECCV, pages 734–750, 2018.
|
| 185 |
+
[17] H. Li, T. Fu, J. Dai, H. Li, G. Huang, and X. Zhu. Autoloss-zero: Searching loss functions from scratch for generic tasks. arXiv preprint arXiv:2103.14026, 2021.
|
| 186 |
+
[18] H. Li, C. Tao, X. Zhu, X. Wang, G. Huang, and J. Dai. Auto seg-loss: Searching metric surrogates for semantic segmentation. arXiv preprint arXiv:2010.07930, 2020.
|
| 187 |
+
[19] H. Li, Z. Wu, C. Zhu, C. Xiong, R. Socher, and L. S. Davis. Learning from noisy anchors for one-stage object detection. In CVPR, pages 10588–10597, 2020.
|
| 188 |
+
[20] J. Li, C. Xiong, R. Socher, and S. Hoi. Towards noise-resistant object detection with noisy annotations. arXiv preprint arXiv:2003.01285, 2020.
|
| 189 |
+
[21] T.-Y. Lin, P. Goyal, R. Girshick, K. He, and P. Dollár. Focal loss for dense object detection. In ICCV, pages 2980–2988, 2017.
|
| 190 |
+
[22] T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollár, and C. L. Zitnick. Microsoft coco: Common objects in context. In ECCV, pages 740–755. Springer, 2014.
|
| 191 |
+
[23] P. Liu, G. Zhang, B. Wang, H. Xu, X. Liang, Y. Jiang, and Z. Li. Loss function discovery for object detection via convergence-simulation driven search. arXiv preprint arXiv:2102.04700, 2021.
|
| 192 |
+
[24] W. Liu, D. Anguelov, D. Erhan, C. Szegedy, S. Reed, C.-Y. Fu, and A. C. Berg. Ssd: Single shot multibox detector. In ECCV, pages 21–37. Springer, 2016.
|
| 193 |
+
[25] X. Ma, H. Huang, Y. Wang, S. Romano, S. Erfani, and J. Bailey. Normalized loss functions for deep learning with noisy labels. In ICML, pages 6543–6553. PMLR, 2020.
|
| 194 |
+
[26] X. Ma, Y. Wang, M. E. Houle, S. Zhou, S. Erfani, S. Xia, S. Wijewickrema, and J. Bailey. Dimensionality-driven learning with noisy labels. In ICML, pages 3355–3364. PMLR, 2018.
|
| 195 |
+
[27] N. Natarajan, I. S. Dhillon, P. K. Ravikumar, and A. Tewari. Learning with noisy labels. NeurIPS, 26:1196–1204, 2013.
|
| 196 |
+
[28] M. A. Rahman and Y. Wang. Optimizing intersection-over-union in deep neural networks for image segmentation. In ISVC, pages 234–244. Springer, 2016.
|
| 197 |
+
[29] J. Redmon and A. Farhadi. Yolo9000: better, faster, stronger. In CVPR, pages 7263–7271, 2017.
|
| 198 |
+
[30] J. Redmon and A. Farhadi. Yolov3: An incremental improvement. arXiv preprint arXiv:1804.02767, 2018.
|
| 199 |
+
[31] S. Ren, K. He, R. Girshick, and J. Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. arXiv preprint arXiv:1506.01497, 2015.
|
| 200 |
+
[32] H. Rezatofighi, N. Tsoi, J. Gwak, A. Sadeghian, I. Reid, and S. Savarese. Generalized intersection over union: A metric and a loss for bounding box regression. In CVPR, pages 658–666, 2019.
|
| 201 |
+
[33] G. Song, Y. Liu, and X. Wang. Revisiting the sibling head in object detector. In CVPR, pages 11563–11572, 2020.
|
| 202 |
+
[34] Z. Tian, C. Shen, H. Chen, and T. He. Fcos: Fully convolutional one-stage object detection. In ICCV, pages 9627–9636, 2019.
|
| 203 |
+
[35] L. Tychsen-Smith and L. Petersson. Improving object localization with fitness nms and bounded iou loss. In CVPR, pages 6877–6885, 2018.
|
| 204 |
+
[36] K. Wang and L. Zhang. Single-shot two-pronged detector with rectified iou loss. In Proceedings of the 28th ACM International Conference on Multimedia, pages 1311–1319, 2020.
|
| 205 |
+
[37] Y. Wang, X. Ma, Z. Chen, Y. Luo, J. Yi, and J. Bailey. Symmetric cross entropy for robust learning with noisy labels. In ICCV, pages 322–330, 2019.
|
| 206 |
+
[38] Z. Wang, L. Liu, and D. Tao. Deep streaming label learning. In ICML, pages 9963–9972. PMLR, 2020.
|
| 207 |
+
[39] J. Yu, Y. Jiang, Z. Wang, Z. Cao, and T. Huang. Unitbox: An advanced object detection network. In Proceedings of the 24th ACM international conference on Multimedia, pages 516–520, 2016.
|
| 208 |
+
[40] S. Zhang, C. Chi, Y. Yao, Z. Lei, and S. Z. Li. Bridging the gap between anchor-based and anchor-free detection via adaptive training sample selection. In CVPR, pages 9759–9768, 2020.
|
| 209 |
+
[41] Y.-F. Zhang, W. Ren, Z. Zhang, Z. Jia, L. Wang, and T. Tan. Focal and efficient iou loss for accurate bounding box regression. arXiv preprint arXiv:2101.08158, 2021.
|
| 210 |
+
[42] Z. Zhang and M. R. Sabuncu. Generalized cross entropy loss for training deep neural networks with noisy labels. In NeurIPS, 2018.
|
| 211 |
+
[43] Z. Zheng, P. Wang, W. Liu, J. Li, R. Ye, and D. Ren. Distance-iou loss: Faster and better learning for bounding box regression. In AAAI, pages 12993–13000, 2020.
|
| 212 |
+
[44] X. Zhou, D. Wang, and P. Krähenbühl. Objects as points. arXiv preprint, arXiv:1904.07850, 2019.
|
| 213 |
+
[45] X. Zhou, J. Zhuo, and P. Krahenbuhl. Bottom-up object detection by grouping extreme and center points. In CVPR, pages 850–859, 2019.
|
| 214 |
+
[46] X. Zhu, W. Su, L. Lu, B. Li, X. Wang, and J. Dai. Deformable detr: Deformable transformers for end-to-end object detection. arXiv preprint arXiv:2010.04159, 2020.
|
parse/train/rbdKZJxDWWx/rbdKZJxDWWx_content_list.json
ADDED
|
@@ -0,0 +1,958 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "Alpha-IoU: A Family of Power Intersection over Union Losses for Bounding Box Regression ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
209,
|
| 8 |
+
122,
|
| 9 |
+
789,
|
| 10 |
+
172
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Jiabo $\\mathbf { H e } ^ { 1 , 3 , * }$ , Sarah Erfani1, Xingjun $\\mathbf { M } \\mathbf { a } ^ { 2 , \\dagger }$ , James Bailey1, Ying $\\mathbf { C } \\mathbf { h } \\mathbf { i } ^ { 3 , \\dagger }$ , Xian-Sheng $\\mathbf { H } \\mathbf { u } \\mathbf { a } ^ { 3 }$ ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
186,
|
| 19 |
+
224,
|
| 20 |
+
812,
|
| 21 |
+
241
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "1School of Computing and Information Systems, The University of Melbourne 2School of Computer Science, Fudan University 3DAMO Academy, Alibaba Group {jiaboh@student., sarah.erfani@, baileyj@}unimelb.edu.au \ndanxjma@gmail.com, {xinyi.cy, xiansheng.hxs}@alibaba-inc.com ",
|
| 28 |
+
"bbox": [
|
| 29 |
+
241,
|
| 30 |
+
242,
|
| 31 |
+
756,
|
| 32 |
+
313
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "Abstract ",
|
| 39 |
+
"text_level": 1,
|
| 40 |
+
"bbox": [
|
| 41 |
+
462,
|
| 42 |
+
348,
|
| 43 |
+
535,
|
| 44 |
+
364
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "Bounding box (bbox) regression is a fundamental task in computer vision. So far, the most commonly used loss functions for bbox regression are the Intersection over Union (IoU) loss and its variants. In this paper, we generalize existing IoUbased losses to a new family of power IoU losses that have a power IoU term and an additional power regularization term with a single power parameter $\\alpha$ We call this new family of losses the $\\alpha$ -IoU losses and analyze properties such as order preservingness and loss/gradient reweighting. Experiments on multiple object detection benchmarks and models demonstrate that $\\alpha$ -IoU losses, 1) can surpass existing IoU-based losses by a noticeable performance margin; 2) offer detectors more flexibility in achieving different levels of bbox regression accuracy by modulating $\\alpha$ ; and 3) are more robust to small datasets and noisy bboxes. ",
|
| 51 |
+
"bbox": [
|
| 52 |
+
233,
|
| 53 |
+
380,
|
| 54 |
+
766,
|
| 55 |
+
531
|
| 56 |
+
],
|
| 57 |
+
"page_idx": 0
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "1 Introduction ",
|
| 62 |
+
"text_level": 1,
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
556,
|
| 66 |
+
310,
|
| 67 |
+
574
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "Bounding box (bbox) regression localizes an object in an image/video by predicting a bbox for the object, which is fundamental to object detection, localization, and tracking. For example, the most advanced object detectors often consist of a bbox regression branch and a classification branch with the bbox regression branch generating bboxes to localize objects for classification. In this work, we explore more effective loss functions for bbox regression in the context of object detection. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
588,
|
| 77 |
+
825,
|
| 78 |
+
657
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "Whilst early works in object detection use $\\ell _ { n }$ -norm losses [11] for bbox regression, recent works directly adopt the localization performance metric, i.e., Intersection over Union (IoU), as the localization loss [28, 39]. Compared with $\\ell _ { n }$ -norm losses, the IoU loss is invariant to bbox scales, thus helping train better detectors. However, the IoU loss suffers from the gradient vanishing problem when the predicted bboxes are not overlapping with the ground truth, which tends to slow down convergence and result in inaccurate detectors. This has motivated the design of several improved IoU-based losses including Generalized IoU (GIoU), Distance-IoU (DIoU) and Complete IoU (CIoU). GIoU introduces a penalty term into the IoU loss to alleviate the gradient vanishing problem [32], while DIoU and CIoU consider the central point distance and aspect ratio between predicted bboxes and their ground truth in penalty terms [43]. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
664,
|
| 88 |
+
825,
|
| 89 |
+
803
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "In this paper, we present a new family of IoU losses obtained by applying power transformations to existing IoU-based losses. We first apply the Box-Cox transformation [2] to the IoU loss $\\mathcal { L } _ { \\mathrm { I o U } } =$ $1 - I o U$ and generalize it to a power IoU loss: $\\mathcal { L } _ { \\alpha \\mathrm { - I o U } } = ( 1 - I o U ^ { \\alpha } ) / \\alpha , ~ \\alpha > 0$ , denoted as $\\alpha$ -IoU. We further simplify $\\alpha$ -IoU to $\\mathcal { L } _ { \\alpha - \\mathrm { I o U } } = 1 - I o U ^ { \\alpha }$ for $\\alpha \\nrightarrow 0$ and extend it to a more general form with an additional power regularization term (see equation (3)). This allows us to generalize existing IoU-based losses, including GIoU, DIoU, and CIoU, to a new family of power IoU losses (see equation (4)) for more accurate bbox regression as well as object detection. ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
809,
|
| 99 |
+
825,
|
| 100 |
+
864
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "",
|
| 107 |
+
"bbox": [
|
| 108 |
+
174,
|
| 109 |
+
92,
|
| 110 |
+
823,
|
| 111 |
+
133
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 1
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "We show that, relative to ${ \\mathcal { L } } _ { \\mathrm { I o U } }$ , ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ with $\\alpha > 1$ up-weights both the loss and gradient of high IoU objects, leading to improved bbox regression accuracy. When $0 < \\alpha < 1$ , it down-weights high IoU objects which we find hurts regression accuracy. The power parameter $\\alpha$ can serve as a knob to adapt $\\alpha$ -IoU losses to meeting different levels of bbox regression accuracy (precision measured under different IoU thresholds), with $\\alpha > 1$ for high regression accuracy (i.e., high IoU thresholds) by focusing more on those high IoU objects. We also empirically show that $\\alpha$ is not overly sensitive to different models or datasets, with $\\alpha = 3$ performing consistently well in most cases. The family of $\\alpha$ -IoU losses can be easily applied for improving state-of-the-art detectors under both clean and noisy bbox settings without introducing additional parameters to these models (making any modifications to training algorithms), nor increasing their training/inference time. ",
|
| 118 |
+
"bbox": [
|
| 119 |
+
173,
|
| 120 |
+
140,
|
| 121 |
+
825,
|
| 122 |
+
279
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 1
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "In summary, our main contributions are as follows: ",
|
| 129 |
+
"bbox": [
|
| 130 |
+
173,
|
| 131 |
+
284,
|
| 132 |
+
508,
|
| 133 |
+
297
|
| 134 |
+
],
|
| 135 |
+
"page_idx": 1
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"type": "text",
|
| 139 |
+
"text": "• We propose a new family of power IoU losses called $\\alpha$ -IoU for accurate bbox regression and object detection. $\\alpha$ -IoU presents a unified power generalization of existing IoU-based losses. \n• We analyze a set of properties of $\\alpha$ -IoU, including order preservingness and loss/gradient reweighting, to show that a proper choice of $\\alpha$ (i.e., $\\alpha > 1$ ) can help improve bbox regression accuracy by adaptively up-weighting the loss and gradient of high IoU objects. \n• We empirically show, on multiple benchmark object detection datasets and models, that $\\alpha$ -IoU losses can consistently outperform existing IoU-based losses and provide more robustness for small datasets and noisy bboxes. ",
|
| 140 |
+
"bbox": [
|
| 141 |
+
173,
|
| 142 |
+
309,
|
| 143 |
+
826,
|
| 144 |
+
433
|
| 145 |
+
],
|
| 146 |
+
"page_idx": 1
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"type": "text",
|
| 150 |
+
"text": "2 Related Work ",
|
| 151 |
+
"text_level": 1,
|
| 152 |
+
"bbox": [
|
| 153 |
+
174,
|
| 154 |
+
452,
|
| 155 |
+
321,
|
| 156 |
+
468
|
| 157 |
+
],
|
| 158 |
+
"page_idx": 1
|
| 159 |
+
},
|
| 160 |
+
{
|
| 161 |
+
"type": "text",
|
| 162 |
+
"text": "Object Detection Models. There exist two mainstream types of detection models: anchor-based and anchor-free detectors. Anchor-based detectors can be further divided into two-stage and onestage models. Two-stage anchor-based detectors (e.g., R-CNN series [11, 31, 14, 3], HTC [5], and TSD [33]) are firstly proposed in object detection tasks, which are composed of region proposal networks (RPNs) and classifiers. RPNs generate a large number of foreground and background region proposals, followed by networks to classify objects in the proposals. Towards real-time object detection, one-stage anchor-based detectors (e.g., YOLO series [29, 30, 1], RetinaNet [21], and SSD [24]) are developed to predict bboxes and categories at the same time, thus no longer need RPNs. Anchor boxes with prior scales and aspect ratios should be defined before training anchor-based detectors. Techniques have been proposed to mitigate the sensitivity of these models to hand-picked anchor boxes, for example, attention-based fusion networks [31] and clustering algorithms [30]. These techniques learn prior anchors from the training set for every sliding window or grid cell. ",
|
| 163 |
+
"bbox": [
|
| 164 |
+
174,
|
| 165 |
+
483,
|
| 166 |
+
825,
|
| 167 |
+
650
|
| 168 |
+
],
|
| 169 |
+
"page_idx": 1
|
| 170 |
+
},
|
| 171 |
+
{
|
| 172 |
+
"type": "text",
|
| 173 |
+
"text": "Recently, anchor-free detectors such as CornerNet [16], CenterNet1 [8], ExtremeNet [45], and CentripetalNet [7], have also been proposed to get rid of anchor priors. These models first predict locations of keypoints (corners, centroids, or extreme points), then group them into the same bboxes if they are geometrically aligned. There also exist other models that generate pixel-wise results. For example, CenterNet2 estimates pixel-level categories of objects along with their sizes and offsets [44]. FCOS generates pixel-wise classification, centerness, and bbox (top, down, left, right) results using multi-head CNNs [34], followed by the Adaptive Training Sample Selection (ATSS) [40] as an improvement on automatically selecting positive and negative samples. In addition, transformers (e.g., DETR series [4, 46]) have also been developed for object detection without anchor generation or non-maximum suppression (NMS), achieving the performance on par with the above CNN-based detectors. In this work, we propose a new family of generalized IoU losses to improve the performance of these detectors without any architectural modifications, which is orthogonal to the above research. ",
|
| 174 |
+
"bbox": [
|
| 175 |
+
173,
|
| 176 |
+
656,
|
| 177 |
+
825,
|
| 178 |
+
821
|
| 179 |
+
],
|
| 180 |
+
"page_idx": 1
|
| 181 |
+
},
|
| 182 |
+
{
|
| 183 |
+
"type": "text",
|
| 184 |
+
"text": "Bounding Box Regression Losses. Anchor-based detectors regress offsets between ground-truth bboxes and their closest anchors, while anchor-free detectors predict keypoints of objects with some frameworks also generating the sizes of the bboxes. The predicted offsets or keypoints (w/ or w/o bbox sizes) are then mapped back to the pixel space for generating the bboxes. Localization losses usually compare the generated bboxes with their ground truth. Early works adopt $\\ell _ { n }$ -norm losses [11] for bbox regression, which have been found sensitive to varying bbox scales. Recent works replace them with the IoU loss and its variants such as BIoU, GIoU, DIoU and CIoU for bbox regression, as IoU is the metric for localization and it is scale-invariant [28, 39]. The Bounded IoU (BIoU) loss maximizes the IoU overlap between the region of interest (RoI) and the ground truth based on a set of IoU upper bounds [35]. GIoU is proposed to address the problem of gradient vanishing on non-overlapping examples, which are examples having non-overlapping predicted bboxes with the ground truth (IoU is zero) [32]. DIoU and CIoU [43] losses further consider the overlapping area, central point distance, and aspect ratio in IoU and the regularization terms. These regularization terms can help improve the convergence speed as well as the final detection performance. There are also losses designed to focus more on high IoU objects, for example, the Rectified IoU (RIoU) loss [36], and the Focal and Efficient IoU (Focal-EIoU) loss [41]. These loss functions increase gradients of those examples that are in high bbox regression accuracy. However, RIoU and Focal-EIoU are neither concise nor generalized compared with other IoU-based losses. In this paper, we apply a power transformation to generalize the above vanilla IoU loss and regularized IoU-based losses for both their IoU and regularization terms. The new family of generalized losses improve bbox regression accuracy by adaptively reweighting the loss and gradient of high and low IoU objects. ",
|
| 185 |
+
"bbox": [
|
| 186 |
+
174,
|
| 187 |
+
828,
|
| 188 |
+
823,
|
| 189 |
+
911
|
| 190 |
+
],
|
| 191 |
+
"page_idx": 1
|
| 192 |
+
},
|
| 193 |
+
{
|
| 194 |
+
"type": "text",
|
| 195 |
+
"text": "",
|
| 196 |
+
"bbox": [
|
| 197 |
+
174,
|
| 198 |
+
90,
|
| 199 |
+
825,
|
| 200 |
+
299
|
| 201 |
+
],
|
| 202 |
+
"page_idx": 2
|
| 203 |
+
},
|
| 204 |
+
{
|
| 205 |
+
"type": "text",
|
| 206 |
+
"text": "There are also works on AutoML-based loss function search for computer vision tasks [23, 18, 17]. Despite their advantage in saving human efforts, these methods are very expensive in searching qualified loss functions (e.g., days of searching time on multiple GPUs), and probably with limited performance improvement based on existing losses [23]. We will empirically compare with one of these losses in our experiments. ",
|
| 207 |
+
"bbox": [
|
| 208 |
+
174,
|
| 209 |
+
304,
|
| 210 |
+
825,
|
| 211 |
+
375
|
| 212 |
+
],
|
| 213 |
+
"page_idx": 2
|
| 214 |
+
},
|
| 215 |
+
{
|
| 216 |
+
"type": "text",
|
| 217 |
+
"text": "3 $\\alpha$ -IoU Losses for Bounding Box Regression ",
|
| 218 |
+
"text_level": 1,
|
| 219 |
+
"bbox": [
|
| 220 |
+
174,
|
| 221 |
+
393,
|
| 222 |
+
563,
|
| 223 |
+
411
|
| 224 |
+
],
|
| 225 |
+
"page_idx": 2
|
| 226 |
+
},
|
| 227 |
+
{
|
| 228 |
+
"type": "text",
|
| 229 |
+
"text": "3.1 Preliminaries ",
|
| 230 |
+
"text_level": 1,
|
| 231 |
+
"bbox": [
|
| 232 |
+
174,
|
| 233 |
+
424,
|
| 234 |
+
307,
|
| 235 |
+
439
|
| 236 |
+
],
|
| 237 |
+
"page_idx": 2
|
| 238 |
+
},
|
| 239 |
+
{
|
| 240 |
+
"type": "text",
|
| 241 |
+
"text": "We study the problem of bbox regression in object detection. Let $\\pmb { X } \\in \\mathbb { R } ^ { d _ { x } }$ be the input space and $\\pmb { Y } \\in \\mathbb { R } ^ { \\tilde { d } _ { y } }$ be the annotation space, with $d _ { x }$ and $d _ { y }$ denoting the input and annotation dimensions, respectively. Given a dataset $D = \\{ ( { \\bf x } _ { i } , { \\bf y } _ { i } ) \\} _ { i = 1 } ^ { n }$ of $n$ training examples with each $( { \\pmb x } _ { i } , { \\pmb y } _ { i } ) \\in$ $( X \\times Y )$ , the task is to learn a function $f$ (represented by a detector network) that maps the input space to the annotation space $f : X \\to Y$ . In object detection, each $\\pmb { y } _ { i } = ( c _ { i , k } , B _ { i , k } ) _ { k = 1 } ^ { m _ { i } }$ , where $m _ { i }$ is the total number of objects in $\\mathbf { \\Delta } _ { \\mathbf { \\mathcal { X } } _ { i } }$ , $c _ { i , k }$ is the category of the $k ^ { t h }$ object in $\\mathbf { \\Delta } _ { \\mathbf { \\mathcal { X } } _ { i } }$ and $B _ { i , k }$ is its bbox. ",
|
| 242 |
+
"bbox": [
|
| 243 |
+
173,
|
| 244 |
+
449,
|
| 245 |
+
825,
|
| 246 |
+
536
|
| 247 |
+
],
|
| 248 |
+
"page_idx": 2
|
| 249 |
+
},
|
| 250 |
+
{
|
| 251 |
+
"type": "text",
|
| 252 |
+
"text": "The bbox regression performance is measured by the Intersection over Union (IoU) metric between the predicted bbox $B$ and the ground truth $B ^ { g t }$ $\\ d ^ { 3 } \\ d ^ { g t } \\colon \\bar { I o U } = | B \\cap B ^ { g t } | / | B \\cup B ^ { g t } |$ . Positive examples (both true and false positives) are determined from the set of predictions according to an IoU threshold, based on which the Average Precision (AP) over all categories of objects can be calculated. E.g., $\\mathrm { { A P } _ { 5 0 } }$ measures the AP of objects localized by bboxes with an IoU that is above the threshold 0.5. The final performance of a detector is commonly evaluated by the mean Average Precision (mAP) across multiple IoU thresholds. For instance, the popular metric $\\mathrm { m A P _ { 5 0 : 9 5 } }$ measures the mAP of examples across the set of IoU thresholds ranging from 0.5 to 0.95 with a stride of 0.05. ",
|
| 253 |
+
"bbox": [
|
| 254 |
+
174,
|
| 255 |
+
541,
|
| 256 |
+
826,
|
| 257 |
+
654
|
| 258 |
+
],
|
| 259 |
+
"page_idx": 2
|
| 260 |
+
},
|
| 261 |
+
{
|
| 262 |
+
"type": "text",
|
| 263 |
+
"text": "3.2 $\\alpha$ -IoU Losses ",
|
| 264 |
+
"text_level": 1,
|
| 265 |
+
"bbox": [
|
| 266 |
+
174,
|
| 267 |
+
669,
|
| 268 |
+
303,
|
| 269 |
+
683
|
| 270 |
+
],
|
| 271 |
+
"page_idx": 2
|
| 272 |
+
},
|
| 273 |
+
{
|
| 274 |
+
"type": "text",
|
| 275 |
+
"text": "The vanilla IoU loss is defined as $\\mathcal { L } _ { \\mathrm { I o U } } = 1 - I o U .$ . We first apply the Box-Cox transformation3 [2] and generalize the IoU loss to an $\\alpha$ -IoU loss: ",
|
| 276 |
+
"bbox": [
|
| 277 |
+
174,
|
| 278 |
+
694,
|
| 279 |
+
823,
|
| 280 |
+
722
|
| 281 |
+
],
|
| 282 |
+
"page_idx": 2
|
| 283 |
+
},
|
| 284 |
+
{
|
| 285 |
+
"type": "equation",
|
| 286 |
+
"img_path": "images/bb2100a4e3dc259123e34d21464985042ab20c4183a69f63d74818b124890fe7.jpg",
|
| 287 |
+
"text": "$$\n\\mathcal { L } _ { \\alpha \\cdot \\mathrm { I o U } } = \\frac { 1 - I o U ^ { \\alpha } } { \\alpha } , \\alpha > 0 .\n$$",
|
| 288 |
+
"text_format": "latex",
|
| 289 |
+
"bbox": [
|
| 290 |
+
403,
|
| 291 |
+
728,
|
| 292 |
+
594,
|
| 293 |
+
760
|
| 294 |
+
],
|
| 295 |
+
"page_idx": 2
|
| 296 |
+
},
|
| 297 |
+
{
|
| 298 |
+
"type": "text",
|
| 299 |
+
"text": "By modulating the parameter $\\alpha$ in $\\alpha$ -IoU, one can derive most of the IoU terms in existing losses, e.g., $\\log ( I o U )$ , $I o U$ and $I o U ^ { 2 }$ . When $\\alpha 0$ , we obtain $\\begin{array} { r } { \\operatorname* { l i m } _ { \\alpha \\to 0 } \\mathcal { L } _ { \\alpha \\mathrm { { \\cdot } I o U } } = - \\mathrm { l o g } ( I o U ) = \\mathcal { L } _ { \\mathrm { l o g } ( \\mathrm { I o U } ) } } \\end{array}$ [39] (see the proof in Appendix A). We recover the IoU loss with $\\alpha = 1$ : $\\mathcal { L } _ { \\mathrm { 1 - I o U } } = 1 - I o U = \\mathcal { L } _ { \\mathrm { I o U } }$ And $\\mathcal { L } _ { \\mathrm { 2 - I o U } } = \\textstyle { \\frac { 1 } { 2 } } ( 1 - I o \\dot { U } ^ { 2 } ) = \\textstyle { \\frac { 1 } { 2 } } \\mathcal { L } _ { \\mathrm { I o U } ^ { 2 } }$ , when $\\alpha = 2$ . We can also extend the above $\\alpha$ -IoU formula to loss functions with multiple IoU terms (e.g. RIoU [36]) by using multiple $\\alpha$ values. ",
|
| 300 |
+
"bbox": [
|
| 301 |
+
173,
|
| 302 |
+
765,
|
| 303 |
+
825,
|
| 304 |
+
835
|
| 305 |
+
],
|
| 306 |
+
"page_idx": 2
|
| 307 |
+
},
|
| 308 |
+
{
|
| 309 |
+
"type": "image",
|
| 310 |
+
"img_path": "images/e71795a6c2180cb4eb2b0b684db28229bf5651428ec5d79c58d72a86aca1859d.jpg",
|
| 311 |
+
"image_caption": [
|
| 312 |
+
"Figure 1: Correlation between IoU and $\\mathcal { L } _ { \\alpha \\mathrm { { - I o U } } } ~ = ~ 1 - ~ I o U ^ { \\alpha }$ (left) and its absolute gradient $| \\nabla _ { \\mathrm { I o U } } \\mathcal { L } _ { \\alpha - \\mathrm { I o U } } |$ (right) with different $\\alpha ~ \\in ~ [ 0 . 5 , 3 ]$ . According to both plots, ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ reweights all objects adaptively and distinctively for $0 < \\alpha < 1$ vs. $\\alpha > 1$ $\\langle \\alpha = 1$ marks the IoU loss). "
|
| 313 |
+
],
|
| 314 |
+
"image_footnote": [],
|
| 315 |
+
"bbox": [
|
| 316 |
+
183,
|
| 317 |
+
87,
|
| 318 |
+
816,
|
| 319 |
+
227
|
| 320 |
+
],
|
| 321 |
+
"page_idx": 3
|
| 322 |
+
},
|
| 323 |
+
{
|
| 324 |
+
"type": "text",
|
| 325 |
+
"text": "We simplify the above $\\alpha$ -IoU formula for $\\alpha > 0$ and $\\alpha \\nrightarrow 0$ , as in this case, the denominator $\\alpha$ in equation (1) is just a positive constant in the objective. This gives us two cases of the $\\alpha$ -IoU loss for $\\alpha 0$ and $\\alpha \\not 0$ , respectively: ",
|
| 326 |
+
"bbox": [
|
| 327 |
+
173,
|
| 328 |
+
308,
|
| 329 |
+
825,
|
| 330 |
+
351
|
| 331 |
+
],
|
| 332 |
+
"page_idx": 3
|
| 333 |
+
},
|
| 334 |
+
{
|
| 335 |
+
"type": "equation",
|
| 336 |
+
"img_path": "images/49544a52675eb6c2c1d3253ac6cd47b62978b0a804d4d88efc4483d23de31b79.jpg",
|
| 337 |
+
"text": "$$\n\\mathcal { L } _ { \\alpha \\mathrm { - I o U } } = \\left\\{ { { - \\mathrm { l o g } ( I o U ) , ~ \\alpha \\to 0 } , } \\atop { 1 - I o U ^ { \\alpha } , ~ \\alpha \\to 0 . } \\right.\n$$",
|
| 338 |
+
"text_format": "latex",
|
| 339 |
+
"bbox": [
|
| 340 |
+
379,
|
| 341 |
+
358,
|
| 342 |
+
598,
|
| 343 |
+
393
|
| 344 |
+
],
|
| 345 |
+
"page_idx": 3
|
| 346 |
+
},
|
| 347 |
+
{
|
| 348 |
+
"type": "text",
|
| 349 |
+
"text": "Here, we are more interested in the case $\\alpha \\nrightarrow 0$ as most state-of-the-art IoU-based losses have an $\\alpha \\geq 1$ . We then extend the above $\\alpha$ -IoU loss for $\\alpha \\not 0$ to a more general form by introducing a power penalty/regularization term into the formula: ",
|
| 350 |
+
"bbox": [
|
| 351 |
+
173,
|
| 352 |
+
400,
|
| 353 |
+
825,
|
| 354 |
+
443
|
| 355 |
+
],
|
| 356 |
+
"page_idx": 3
|
| 357 |
+
},
|
| 358 |
+
{
|
| 359 |
+
"type": "equation",
|
| 360 |
+
"img_path": "images/ea85474b41154fc6fe32c2f6245cfe0cf05db9d273d22421f38a755626d76c25.jpg",
|
| 361 |
+
"text": "$$\n{ \\mathcal { L } } _ { \\alpha - \\mathrm { I o U } } = 1 - I o U ^ { \\alpha _ { 1 } } + { \\mathcal { P } } ^ { \\alpha _ { 2 } } ( B , B ^ { g t } ) ,\n$$",
|
| 362 |
+
"text_format": "latex",
|
| 363 |
+
"bbox": [
|
| 364 |
+
372,
|
| 365 |
+
449,
|
| 366 |
+
624,
|
| 367 |
+
467
|
| 368 |
+
],
|
| 369 |
+
"page_idx": 3
|
| 370 |
+
},
|
| 371 |
+
{
|
| 372 |
+
"type": "text",
|
| 373 |
+
"text": "where $\\alpha _ { 1 } > 0$ , $\\alpha _ { 2 } > 0$ , and $\\mathcal { P } ^ { \\alpha _ { 2 } } ( B , B ^ { g t } )$ denotes any penalty term computed based on $B$ and $B ^ { g t }$ . This simple extension allows a straightforward generalization of existing IoU-based losses to their $\\alpha$ -IoU versions. In Appendix B.2.1, we empirically show that ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ is not sensitive to $\\alpha _ { 2 }$ . We thus maintain the power consistency between the IoU term and the penalty term and take $\\alpha _ { 1 } = \\alpha _ { 2 }$ as a simple choice when training the detectors. ",
|
| 374 |
+
"bbox": [
|
| 375 |
+
173,
|
| 376 |
+
473,
|
| 377 |
+
826,
|
| 378 |
+
542
|
| 379 |
+
],
|
| 380 |
+
"page_idx": 3
|
| 381 |
+
},
|
| 382 |
+
{
|
| 383 |
+
"type": "text",
|
| 384 |
+
"text": "With the above $\\alpha$ -IoU formula, we can now generalize the commonly used IoU-based losses including $\\mathcal { L } _ { \\mathrm { I o U } } , \\mathcal { L } _ { \\mathrm { G I o U } } , \\mathcal { L } _ { \\mathrm { D I o U } }$ , and ${ \\mathcal { L } } _ { \\mathrm { C I o U } }$ using the same power parameter $\\alpha$ for the IoU and penalty terms: ",
|
| 385 |
+
"bbox": [
|
| 386 |
+
173,
|
| 387 |
+
549,
|
| 388 |
+
825,
|
| 389 |
+
578
|
| 390 |
+
],
|
| 391 |
+
"page_idx": 3
|
| 392 |
+
},
|
| 393 |
+
{
|
| 394 |
+
"type": "equation",
|
| 395 |
+
"img_path": "images/6c534ce80345acbe41bc8ba723ac18e0e0a4ac163f66e22fa7a501ca197c25ac.jpg",
|
| 396 |
+
"text": "$$\n\\begin{array} { r l r } & { } & { \\mathcal { L } _ { \\mathrm { I o U } } = 1 - I o U \\Longrightarrow \\mathcal { L } _ { \\alpha \\mathrm { \\cdot I o U } } = 1 - I o U ^ { \\alpha } , } \\\\ & { } & { \\mathcal { L } _ { \\mathrm { G I o U } } = 1 - I o U + \\frac { \\left| C \\setminus ( B \\cup B ^ { g t } ) \\right| } { \\left| C \\right| } \\Longrightarrow \\mathcal { L } _ { \\alpha \\mathrm { \\cdot G I o U } } = 1 - I o U ^ { \\alpha } + ( \\frac { \\left| C \\setminus ( B \\cup B ^ { g t } ) \\right| } { \\left| C \\right| } ) ^ { \\alpha } , } \\\\ & { } & { \\mathcal { L } _ { \\mathrm { D I o U } } = 1 - I o U + \\frac { \\rho ^ { 2 } ( b , b ^ { g t } ) } { c ^ { 2 } } \\Longrightarrow \\mathcal { L } _ { \\alpha \\mathrm { \\cdot D I o U } } = 1 - I o U ^ { \\alpha } + \\frac { \\rho ^ { 2 \\alpha } ( b , b ^ { g t } ) } { c ^ { 2 \\alpha } } , \\ ~ } \\\\ & { } & { \\mathcal { L } _ { \\mathrm { C I o U } } = 1 - I o U + \\frac { \\rho ^ { 2 } ( b , b ^ { g t } ) } { c ^ { 2 } } + \\beta v \\Longrightarrow \\mathcal { L } _ { \\alpha \\mathrm { \\cdot C I o U } } = 1 - I o U ^ { \\alpha } + \\frac { \\rho ^ { 2 \\alpha } ( b , b ^ { g t } ) } { c ^ { 2 \\alpha } } + ( \\beta v ) ^ { \\alpha } , } \\end{array}\n$$",
|
| 397 |
+
"text_format": "latex",
|
| 398 |
+
"bbox": [
|
| 399 |
+
194,
|
| 400 |
+
583,
|
| 401 |
+
781,
|
| 402 |
+
705
|
| 403 |
+
],
|
| 404 |
+
"page_idx": 3
|
| 405 |
+
},
|
| 406 |
+
{
|
| 407 |
+
"type": "text",
|
| 408 |
+
"text": "where $C$ in ${ \\mathcal { L } } _ { \\mathrm { G I o U } }$ denotes the smallest convex shape enclosing $B$ and $B ^ { g t }$ ; $^ { b }$ and $\\mathbf { \\delta } _ { b } \\mathbf { \\mathcal { I } ^ { t } }$ in ${ \\mathcal { L } } _ { \\mathrm { D I o U } }$ denote central points of $B$ and $B ^ { g t }$ with $\\rho ( \\cdot )$ being the Euclidean distance and $c$ being the diagonal length of the smallest enclosing box; and in ${ \\mathcal { L } } _ { \\mathrm { C I o U } }$ , $\\begin{array} { r } { v = \\frac { 4 } { \\pi ^ { 2 } } ( a r c t a n \\frac { w ^ { g t } } { h ^ { g t } } - a r c t a n \\frac { w } { h } ) ^ { 2 } } \\end{array}$ , $\\begin{array} { r } { \\beta = \\frac { v } { ( 1 - I o U ) + v } } \\end{array}$ . They give us the family of power IoU losses for bbox regression with their original versions recovered at $\\alpha = 1$ . Note that the above $\\alpha$ -IoU generalization can be easily extended to more complex loss functions that have multiple IoU or penalty terms (e.g., $\\mathcal { L } _ { \\alpha - \\mathrm { C I o U } } )$ ). Next, we will analyze the properties of $\\alpha$ -IoU losses when $\\alpha$ takes different values. ",
|
| 409 |
+
"bbox": [
|
| 410 |
+
173,
|
| 411 |
+
709,
|
| 412 |
+
826,
|
| 413 |
+
814
|
| 414 |
+
],
|
| 415 |
+
"page_idx": 3
|
| 416 |
+
},
|
| 417 |
+
{
|
| 418 |
+
"type": "text",
|
| 419 |
+
"text": "3.3 Properties of $\\alpha$ -IoU Losses ",
|
| 420 |
+
"text_level": 1,
|
| 421 |
+
"bbox": [
|
| 422 |
+
174,
|
| 423 |
+
829,
|
| 424 |
+
398,
|
| 425 |
+
844
|
| 426 |
+
],
|
| 427 |
+
"page_idx": 3
|
| 428 |
+
},
|
| 429 |
+
{
|
| 430 |
+
"type": "text",
|
| 431 |
+
"text": "Here, we focus on the vanilla $\\alpha$ -IoU formula $\\mathcal { L } _ { \\alpha - \\mathrm { I o U } } = 1 - I o U ^ { \\alpha }$ to analyze its properties, as the penalty terms may affect these properties differently. Figure 1 illustrates the correlation between IoU and ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ (left) and the magnitude of its gradient w.r.t. IoU, i.e., $| \\nabla _ { \\mathrm { I o U } } \\mathcal { L } _ { \\alpha - \\mathrm { I o U } } |$ (right). One key observation is that the IoU loss (i.e., $\\alpha = 1$ ) has a linear correlation with IoU and the gradient is a constant, while ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ reweights objects adaptively (according to their IoU values) following different reweighting schemes with $0 < \\alpha < 1$ versus $\\alpha > 1$ . ",
|
| 432 |
+
"bbox": [
|
| 433 |
+
174,
|
| 434 |
+
854,
|
| 435 |
+
825,
|
| 436 |
+
911
|
| 437 |
+
],
|
| 438 |
+
"page_idx": 3
|
| 439 |
+
},
|
| 440 |
+
{
|
| 441 |
+
"type": "text",
|
| 442 |
+
"text": "",
|
| 443 |
+
"bbox": [
|
| 444 |
+
171,
|
| 445 |
+
90,
|
| 446 |
+
823,
|
| 447 |
+
119
|
| 448 |
+
],
|
| 449 |
+
"page_idx": 4
|
| 450 |
+
},
|
| 451 |
+
{
|
| 452 |
+
"type": "text",
|
| 453 |
+
"text": "The power transformation in ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ preserves key properties of ${ \\mathcal { L } } _ { \\mathrm { I o U } }$ as a performance metric, including non-negativity, identity of indiscernibles, symmetry, and triangle inequality [32]. Furthermore, we analyze the following important properties of ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ with detailed derivations deferred to Appendix A. We first let $B _ { i }$ and $B _ { j }$ be two predicted bboxes by two different models $M _ { i }$ and $M _ { j }$ respectively, and $B _ { i }$ and $B _ { j }$ correspond to the same ground truth $B ^ { g t }$ with $I o U ( B _ { i } , B ^ { g t } ) < I o U ( \\bar { B _ { j } } , B ^ { g t } )$ . Then we have the first property of ${ \\mathcal { L } } _ { \\alpha }$ -IoU: ",
|
| 454 |
+
"bbox": [
|
| 455 |
+
173,
|
| 456 |
+
126,
|
| 457 |
+
825,
|
| 458 |
+
210
|
| 459 |
+
],
|
| 460 |
+
"page_idx": 4
|
| 461 |
+
},
|
| 462 |
+
{
|
| 463 |
+
"type": "text",
|
| 464 |
+
"text": "Property 1 (Order Preservingness). ${ \\mathcal { L } } _ { \\alpha }$ -IoU preserves the orders of both IoU and $\\mathcal { L } _ { I o U }$ : I ${ } ^ { \\circ } o \\bar { U } ( B _ { i } , B ^ { g t } ) \\ < I o U ( B _ { j } , B ^ { g t } ) ^ { - } \\iff \\ \\mathcal { L } _ { I o U } ( B _ { i } , B ^ { g t } ) > \\ \\mathcal { L } _ { I o U } ( B _ { j } , B ^ { g t } ) \\iff \\ \\mathcal { L } _ { \\alpha \\cdot I o U } ( B _ { i } , B ^ { g t } ) >$ $\\mathcal { L } _ { \\alpha - I o U } ( B _ { j } , B ^ { g t } )$ . ",
|
| 465 |
+
"bbox": [
|
| 466 |
+
174,
|
| 467 |
+
213,
|
| 468 |
+
825,
|
| 469 |
+
256
|
| 470 |
+
],
|
| 471 |
+
"page_idx": 4
|
| 472 |
+
},
|
| 473 |
+
{
|
| 474 |
+
"type": "text",
|
| 475 |
+
"text": "The above property indicates that both ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ and ${ \\mathcal { L } } _ { \\mathrm { I o U } }$ are monotonically decreasing functions w.r.t. $I o U$ . As ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ preserves the order of ${ \\mathcal { L } } _ { \\mathrm { I o U } }$ strictly, it is guaranteed that arg $\\mathrm { m i n } _ { B } \\mathcal { L } _ { \\alpha \\mathrm { - I o U } } ( B , B ^ { g t } )$ is identical to arg $\\operatorname* { m a x } _ { B } I o U ( B , B ^ { g t } )$ and arg $\\mathrm { m i n } _ { B } \\bar { \\mathcal { L } } _ { \\mathrm { I o U } } ( \\bar { B , B ^ { g t } } )$ . In other words, the optimal solution arg $\\operatorname* { m a x } _ { B } I o U ( B , \\bar { B ^ { g t } } )$ can be obtained by minimizing either ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ or ${ \\mathcal { L } } _ { \\mathrm { I o U } }$ . Following this, the adaptive relative loss reweighting scheme of ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ can be characterized by the second property: ",
|
| 476 |
+
"bbox": [
|
| 477 |
+
173,
|
| 478 |
+
265,
|
| 479 |
+
825,
|
| 480 |
+
335
|
| 481 |
+
],
|
| 482 |
+
"page_idx": 4
|
| 483 |
+
},
|
| 484 |
+
{
|
| 485 |
+
"type": "text",
|
| 486 |
+
"text": "Property 2 (Relative Loss Reweighting). Compared with $\\mathcal { L } _ { I o U }$ , $\\mathcal { L } _ { \\alpha - I o U }$ adaptively reweights the relative loss of all objects by $w _ { \\mathcal { L } _ { r } } = \\mathcal { L } _ { \\alpha \\cdot I o U } / \\mathcal { L } _ { I o U } = 1 + ( I o U - I o U ^ { \\alpha } ) / ( 1 - I o U )$ , with $w _ { \\mathscr { L } _ { r } } ( I o U =$ $0 ) = 1$ , and $\\begin{array} { r } { \\operatorname* { l i m } _ { I o U \\to 1 } w _ { \\mathcal { L } _ { r } } = \\alpha } \\end{array}$ . ",
|
| 487 |
+
"bbox": [
|
| 488 |
+
176,
|
| 489 |
+
338,
|
| 490 |
+
823,
|
| 491 |
+
381
|
| 492 |
+
],
|
| 493 |
+
"page_idx": 4
|
| 494 |
+
},
|
| 495 |
+
{
|
| 496 |
+
"type": "text",
|
| 497 |
+
"text": "The second property indicates that ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ will adaptively down-weight and up-weight the relative loss of all objects according to their IoUs when $0 < \\alpha < 1$ and $\\alpha > 1$ , respectively. We further note that, when $\\alpha > 1$ , the reweighting factor $w _ { \\mathcal { L } _ { r } }$ increases monotonically with the increase of IoU $( w _ { \\boldsymbol { L } _ { r } }$ grows from 1 to $\\alpha$ ) while decreasing monotonically with the increase of IoU when $0 < \\alpha < 1 ( w _ { \\mathcal { L } _ { r } }$ decays from 1 to $\\alpha$ ). We will empirically show that the up-weighting scheme of ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ with $\\alpha > 1$ can help the model focus more on high IoU objects to improve both the localization (i.e., predict more high IoU objects) and detection (i.e., more accurate at high APs) performance4. Similarly, we can obtain the third property of adaptive relative gradient reweighting owned by ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ as follows: ",
|
| 498 |
+
"bbox": [
|
| 499 |
+
173,
|
| 500 |
+
390,
|
| 501 |
+
825,
|
| 502 |
+
502
|
| 503 |
+
],
|
| 504 |
+
"page_idx": 4
|
| 505 |
+
},
|
| 506 |
+
{
|
| 507 |
+
"type": "text",
|
| 508 |
+
"text": "Property 3 (Relative Gradient Reweighting). Compared with $\\mathcal { L } _ { I o U ; }$ , $\\mathcal { L } _ { \\alpha - I o U }$ adaptively reweights the relative gradient of all objects by $\\begin{array} { r } { w _ { \\bar { \\nabla } _ { r } } = \\bar { | } \\nabla _ { I o U } \\mathcal { L } _ { \\alpha - I o U } | / | \\nabla _ { I o U } \\mathcal { L } _ { I o U } | = \\alpha I o U ^ { \\bar { \\alpha } - 1 } } \\end{array}$ , with the turning point at $I o U = \\alpha ^ { \\frac { 1 } { 1 - \\alpha } } \\in ( 0 , \\frac { 1 } { e } )$ when $0 < \\alpha < 1$ and $I o U = \\alpha ^ { \\frac { 1 } { 1 - \\alpha } } \\in ( \\textstyle { \\frac { 1 } { e } } , 1 )$ when $\\alpha > 1$ . ",
|
| 509 |
+
"bbox": [
|
| 510 |
+
174,
|
| 511 |
+
506,
|
| 512 |
+
825,
|
| 513 |
+
553
|
| 514 |
+
],
|
| 515 |
+
"page_idx": 4
|
| 516 |
+
},
|
| 517 |
+
{
|
| 518 |
+
"type": "text",
|
| 519 |
+
"text": "When $\\alpha > 1$ , the above reweighting factor $w _ { \\nabla _ { r } }$ increases monotonically with the increase of IoU, while decreasing monotonically with the increase of IoU when $0 \\textless \\alpha \\textless 1$ . This relative gradient reweighting scheme is also adaptive to IoU, with the turning point from up-weighting to down-weighting at $\\overline { { I o U } } = \\alpha ^ { \\frac { 1 } { 1 - \\alpha } } \\in ( 0 , \\frac { 1 } { e } )$ when $0 \\textless \\alpha \\textless 1$ , and from down-weighting to upweighting at $I o U = \\alpha ^ { \\frac { 1 } { 1 - \\alpha } } \\in ( \\frac { 1 } { e } , 1 )$ when $\\alpha > 1$ . The gradient reweighting scheme is bounded by $w _ { \\nabla _ { r } } ( I o U = 1 ) = \\alpha$ , i.e., $0 \\leq w _ { \\nabla _ { r } } \\leq \\alpha$ when $\\alpha > 1$ , and $w _ { \\nabla _ { r } } \\geq \\alpha$ when $0 < \\alpha < 1$ . This relative gradient reweighting scheme allows the model to learn objects with adaptive speeds (i.e., different gradients) according to their IoUs. Theoretically, when $\\alpha = 2$ , $| \\nabla _ { \\mathrm { I o U } } \\mathcal { L } _ { \\alpha - \\mathrm { I o U } } | > | \\overline { { \\nabla } } _ { \\mathrm { I o U } } \\mathcal { L } _ { \\mathrm { I o U } } |$ for $I o U \\in ( 0 . 5 , 1 ]$ , which accelerates the learning of all positive IoU objects at $\\mathrm { { A P } _ { 5 0 } }$ . However, we empirically show that $\\alpha$ -IoU losses with $\\alpha = 3$ perform more competitively than those with $\\alpha = 2$ in most cases. It is probable that $\\alpha \\cdot$ -IoU losses with $\\alpha = 3$ further up-weight the relative loss of objects with $I o U \\in ( 0 . 5 , 1 ]$ , although $\\alpha$ -IoU losses with $\\alpha = 2$ also beat existing baselines (see Figure 6). This property is both data-agnostic and model-agnostic, so we recommend $\\alpha = 3$ or $\\alpha \\in [ 2 , 3 ]$ in practical use for other datasets and models. ",
|
| 520 |
+
"bbox": [
|
| 521 |
+
173,
|
| 522 |
+
561,
|
| 523 |
+
826,
|
| 524 |
+
763
|
| 525 |
+
],
|
| 526 |
+
"page_idx": 4
|
| 527 |
+
},
|
| 528 |
+
{
|
| 529 |
+
"type": "text",
|
| 530 |
+
"text": "The above loss and gradient reweighting schemes can also be inferred from Figure 1, with detailed proofs in Appendix A. To summarize, ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ trains better detectors than ${ \\mathcal { L } } _ { \\mathrm { I o U } }$ for the following reasons. First, the same optimal IoU can be achieved by ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ as that by ${ \\mathcal { L } } _ { \\mathrm { I o U } }$ (Property 1). Second, ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ with $\\alpha > 1$ focuses more on high IoU objects by up-weighting their relative loss (Property ",
|
| 531 |
+
"bbox": [
|
| 532 |
+
174,
|
| 533 |
+
768,
|
| 534 |
+
825,
|
| 535 |
+
825
|
| 536 |
+
],
|
| 537 |
+
"page_idx": 4
|
| 538 |
+
},
|
| 539 |
+
{
|
| 540 |
+
"type": "text",
|
| 541 |
+
"text": "2). Third, ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ with $\\alpha > 1$ helps detectors learn faster on high IoU objects (here $I o U \\in ( \\alpha ^ { \\frac { 1 } { 1 - \\alpha } } , 1 ] )$ through up-weighting their relative gradient (Property 3). In Appendix A, we also provide an analysis of the absolute loss and gradient reweighting properties (Property 4 and 5), showing the additions of $\\alpha$ -IoU to IoU. Specifically, when $\\alpha > 1$ , ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ adds an absolute loss weight to ${ \\mathcal { L } } _ { \\mathrm { I o U } }$ (i.e., $w _ { \\mathscr { L } _ { a } } = \\mathscr { L } _ { \\alpha \\mathrm { - I o U } } - \\mathscr { L } _ { \\mathrm { I o U } } = I o U - I o U ^ { \\alpha } > 0$ for $I o U \\in ( 0 , 1 ) )$ , which creates more space for optimization on all levels of objects (Property 4). Likewise, ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ puts an absolute gradient weight for high IoU objects (i.e., $\\bar { w } _ { \\nabla _ { a } } = | \\bar { \\nabla } _ { \\mathrm { I o U } } \\mathcal { L } _ { \\alpha \\mathrm { - I o U } } | - | \\nabla _ { \\mathrm { I o U } } \\mathcal { L } _ { \\mathrm { I o U } } | = \\alpha I o U ^ { \\alpha - 1 } - 1 \\bar { > } 0$ for $I o U \\in ( \\alpha ^ { \\frac { 1 } { 1 - \\alpha } } , 1 ] )$ such that the learning of high IoU objects is accelerated (Property 5). Both of the absolute and relative properties of ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ are adaptive to the IoU values of the objects. Such reweighting schemes will provide more flexibility in achieving different levels of bbox regression accuracies (AP measured under different IoU thresholds). ",
|
| 542 |
+
"bbox": [
|
| 543 |
+
174,
|
| 544 |
+
90,
|
| 545 |
+
825,
|
| 546 |
+
247
|
| 547 |
+
],
|
| 548 |
+
"page_idx": 5
|
| 549 |
+
},
|
| 550 |
+
{
|
| 551 |
+
"type": "text",
|
| 552 |
+
"text": "Learning Dynamics of ${ \\mathcal { L } } _ { \\alpha \\mathbf { - } \\mathbf { I 0 } \\mathbf { U } }$ . Training with ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ is a dynamic process and should be interpreted based on both the absolute and relative properties. With $\\alpha > 1$ , easy examples will be learned first with increasing speed towards $I o U = 1$ , while hard examples will be learned gradually and accelerated later on as their IoU improves. We will empirically show in Figure 3 that up-weighting the loss and gradient of high IoU objects can boost the training at the later stage. As a comparison, we will also show that $\\alpha$ -IoU losses with $0 < \\alpha < 1$ tend to degrade the final performance in Section 4.4. Reducing the loss and gradient of high IoU objects ends up with more poorly localized objects. ",
|
| 553 |
+
"bbox": [
|
| 554 |
+
173,
|
| 555 |
+
253,
|
| 556 |
+
825,
|
| 557 |
+
351
|
| 558 |
+
],
|
| 559 |
+
"page_idx": 5
|
| 560 |
+
},
|
| 561 |
+
{
|
| 562 |
+
"type": "text",
|
| 563 |
+
"text": "4 Experiments ",
|
| 564 |
+
"text_level": 1,
|
| 565 |
+
"bbox": [
|
| 566 |
+
174,
|
| 567 |
+
376,
|
| 568 |
+
312,
|
| 569 |
+
393
|
| 570 |
+
],
|
| 571 |
+
"page_idx": 5
|
| 572 |
+
},
|
| 573 |
+
{
|
| 574 |
+
"type": "text",
|
| 575 |
+
"text": "4.1 Datasets and Training Setup ",
|
| 576 |
+
"text_level": 1,
|
| 577 |
+
"bbox": [
|
| 578 |
+
176,
|
| 579 |
+
411,
|
| 580 |
+
410,
|
| 581 |
+
426
|
| 582 |
+
],
|
| 583 |
+
"page_idx": 5
|
| 584 |
+
},
|
| 585 |
+
{
|
| 586 |
+
"type": "text",
|
| 587 |
+
"text": "We conduct all experiments on two popular benchmarks, i.e., PASCAL VOC [9] and MS COCO [22]. On the PASCAL VOC benchmark, we train all models on the trainval set $2 0 0 7 + 2 0 1 2$ (containing 16, 551 images from 20 categories) and evaluate them on the test set 2007 (containing 4, 952 images) [9]. On the MS COCO benchmark, we train all models on the training set 2017 (containing 118K images from 80 categories) and evaluate them on the val set 2017 (containing 5K images) [22]. We train all state-of-the-art models with the original implementation released by the authors. Specifically, we follow the original implementation’s training protocol with default parameters and the number of training epochs with different losses [31, 32, 43, 4]. Implementation details of all models are given in Appendix B.1. All experiments are run with NVIDIA V100 GPUs. Code is available at https://github.com/Jacobi93/Alpha-IoU. ",
|
| 588 |
+
"bbox": [
|
| 589 |
+
173,
|
| 590 |
+
439,
|
| 591 |
+
826,
|
| 592 |
+
578
|
| 593 |
+
],
|
| 594 |
+
"page_idx": 5
|
| 595 |
+
},
|
| 596 |
+
{
|
| 597 |
+
"type": "text",
|
| 598 |
+
"text": "4.2 Results and Analysis ",
|
| 599 |
+
"text_level": 1,
|
| 600 |
+
"bbox": [
|
| 601 |
+
174,
|
| 602 |
+
599,
|
| 603 |
+
356,
|
| 604 |
+
614
|
| 605 |
+
],
|
| 606 |
+
"page_idx": 5
|
| 607 |
+
},
|
| 608 |
+
{
|
| 609 |
+
"type": "text",
|
| 610 |
+
"text": "We first validate the effectiveness of $\\alpha$ -IoU losses in training both anchor-based and anchor-free models on the two datasets. We choose YOLOv5s (i.e., YOLOv5 small) and YOLOv5x (i.e., YOLOv5 extra large) as one-stage anchor-based models, and DETR (ResNet-50) as an anchor-free model. Both $\\alpha$ -IoU losses (i.e., ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ and $\\mathcal { L } _ { \\alpha - \\mathrm { D I o U } } )$ are generalized from existing baselines following equation (4). From Table 1, we can observe that $\\alpha$ -IoU losses surpass existing losses consistently across multiple models and datasets in terms of both mAP and $\\mathrm { m A P _ { 7 5 : 9 5 } }$ , especially at the high bbox regression accuracy $\\mathrm { m A P _ { 7 5 : 9 5 } }$ . The superiority of $\\alpha$ -IoU losses is more pronounced at high accuracy levels, which might reach more than $6 0 \\%$ relative improvement at $\\mathsf { A P } _ { 9 5 }$ . Interestingly, $\\alpha$ -IoU losses tend to help more of light models (e.g., YOLOv5s with 7.3M parameters and 17 GFLOPs) than heavy models (e.g., YOLOv5x with $8 7 . 7 \\mathbf { M }$ parameters and 218.8 GFLOPs). This indicates that $\\alpha$ -IoU losses hold more advantage while training light models in computing-resource-limited scenarios, such as mobile devices, autonomous vehicles, and robots. ",
|
| 611 |
+
"bbox": [
|
| 612 |
+
173,
|
| 613 |
+
628,
|
| 614 |
+
825,
|
| 615 |
+
794
|
| 616 |
+
],
|
| 617 |
+
"page_idx": 5
|
| 618 |
+
},
|
| 619 |
+
{
|
| 620 |
+
"type": "text",
|
| 621 |
+
"text": "The consistent improvements on both PASCAL VOC and MS COCO demonstrate the stability of $\\alpha$ -IoU losses across different datasets. In addition, we also verify its robustness to extremely small training sets in Appendix B.2.2, where $\\alpha$ -IoU losses beat existing losses at various scales, i.e., from 4K $2 5 \\%$ trainval set of PASCAL VOC $2 0 0 7 { + } 2 0 1 2 ,$ ) to 118K (the entire training set of MS COCO 2017) samples. It is possible that $\\alpha$ -IoU losses may not perform well if measured by a single low AP metric. For example, there may be less than $0 . 5 \\%$ performance drop at $\\mathrm { { A P } _ { 5 0 } }$ when $\\alpha = 3$ , however, this is compensated by the significant boost at high APs. With some examples from the test set of PASCAL VOC 2007 (Figure 4) and the val set of MS COCO 2017 (Figure 5), we show that $\\alpha$ -IoU losses are able to localize objects more accurately than the baselines with more true positives and fewer false positives. ",
|
| 622 |
+
"bbox": [
|
| 623 |
+
174,
|
| 624 |
+
800,
|
| 625 |
+
825,
|
| 626 |
+
911
|
| 627 |
+
],
|
| 628 |
+
"page_idx": 5
|
| 629 |
+
},
|
| 630 |
+
{
|
| 631 |
+
"type": "table",
|
| 632 |
+
"img_path": "images/06d80373016ee1182c1a8c249bbae3769b7436ed4a18cb4febe9ad78f7b8534e.jpg",
|
| 633 |
+
"table_caption": [
|
| 634 |
+
"Table 1: The performance of YOLOv5s, YOLOv5x and DETR models trained using different localization losses on PASCAL VOC and MS COCO benchmarks. Results are obtained on the test set of PASCAL VOC 2007 and the val set of MS COCO 2017. mAP denotes $\\mathrm { m A P _ { 5 0 : 9 5 } }$ ; $\\mathrm { m A P _ { 7 5 : 9 5 } }$ denotes the mean AP over $\\mathsf { A P } _ { 7 5 }$ , $\\mathbf { A P } _ { 8 0 } , \\cdot \\cdot \\cdot , \\mathbf { A P } _ { 9 5 }$ . \"rela. improv.\" stands for the relative improvement. $\\alpha = 3$ is used for all $\\alpha$ -IoU losses in all experiments. "
|
| 635 |
+
],
|
| 636 |
+
"table_footnote": [],
|
| 637 |
+
"table_body": "<table><tr><td rowspan=\"2\">Method</td><td rowspan=\"2\">Loss</td><td rowspan=\"2\"></td><td colspan=\"5\">PASCAL VOC</td><td colspan=\"2\"></td><td colspan=\"5\">MS COCO</td></tr><tr><td>AP50</td><td>AP75</td><td>AP85 AP95</td><td></td><td>mAP</td><td>mAP75:95l</td><td>AP50</td><td>AP75</td><td>AP85</td><td>AP95</td><td>mAP</td><td>mAP75:95</td></tr><tr><td rowspan=\"5\">YOLOv5s</td><td rowspan=\"5\">LIoU Lα-loU rela. improv.</td><td>78.81 78.62</td><td>58.04 58.78</td><td>35.07 38.16</td><td>2.34 3.64</td><td>52.74 53.61</td><td>32.45 34.46</td><td>55.51</td><td>38.59</td><td>23.58</td><td></td><td>2.07</td><td>36.29</td><td>21.82</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>55.25</td><td>39.69</td><td>25.85</td><td>3.35</td><td>37.01</td><td>23.66</td></tr><tr><td></td><td>-0.24%</td><td>1.27%</td><td>8.81%</td><td>55.56%</td><td>1.65%</td><td>6.21%</td><td>-0.47%</td><td>2.85%</td><td>9.63%</td><td>61.84%</td><td>1.98%</td><td>8.43%</td></tr><tr><td>LDIoU</td><td>78.19</td><td>57.77</td><td>34.89</td><td>2.36</td><td>52.30</td><td>32.17</td><td>55.67</td><td>39.01</td><td>23.56</td><td>2.03</td><td>36.36</td><td>21.95</td></tr><tr><td>Lα-DIoU rela. improv.</td><td>78.33 0.18%</td><td>59.24 38.46</td><td>3.50</td><td></td><td>53.76</td><td>34.66</td><td>55.84</td><td>39.49</td><td>25.49</td><td>3.30</td><td>36.74</td><td>23.34</td></tr><tr><td rowspan=\"6\">YOLOv5x</td><td colspan=\"10\">LIoU</td><td rowspan=\"6\">8.19%</td><td colspan=\"10\">62.56%</td></tr><tr><td></td><td>85.24</td><td>2.54%</td><td>10.23%</td><td>48.31%</td><td>2.79% 63.95</td><td>7.72%</td><td></td><td>0.31%</td><td>1.23%</td><td></td><td></td><td>1.05%</td><td>6.32%</td></tr><tr><td>Lα-IoU</td><td>84.83</td><td>70.08 70.20</td><td>53.08 53.75</td><td>10.88 13.74</td><td>64.25</td><td>46.78 48.06</td><td></td><td>67.36 67.72</td><td>52.15 52.61</td><td>38.22 38.62</td><td>9.31 9.76</td><td>48.42 48.67</td><td>34.42 34.72</td></tr><tr><td>rela. improv.</td><td>-0.48%</td><td>0.17%</td><td>1.26%</td><td>26.29%</td><td>0.47%</td><td></td><td>2.73%</td><td>0.53%</td><td>0.88%</td><td>1.05%</td><td>4.83%</td><td>0.52%</td><td>0.87%</td></tr><tr><td>LDIoU</td><td>85.04</td><td>71.05</td><td>53.71</td><td>11.11</td><td>64.21</td><td>47.30</td><td></td><td>67.54</td><td>52.03</td><td>38.02</td><td>8.58</td><td>48.38</td><td>34.16</td></tr><tr><td>La-DloU rela.improv.</td><td>84.90</td><td>71.34</td><td>54.23</td><td>13.85</td><td>64.49</td><td>48.40</td><td></td><td></td><td>52.65</td><td>39.28</td><td>10.29</td><td>48.81</td><td>35.42</td></tr><tr><td rowspan=\"8\">DETR</td><td rowspan=\"8\">LIoU</td><td>-0.16%</td><td>0.41%</td><td>0.97%</td><td></td><td>24.66%</td><td>0.44%</td><td>2.32%</td><td>67.42 -0.18%</td><td>1.19%</td><td>3.31%</td><td></td><td>19.93%</td><td>0.89%</td><td>3.68%</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>76.50</td><td>53.85</td><td>29.54</td><td>1.62</td><td>49.78</td><td>28.82</td><td>59.38</td><td>41.67</td><td>26.13</td><td></td><td>3.52</td><td>39.23</td><td>24.37</td></tr><tr><td>La-loU rela.improv.</td><td>76.22 -0.37%</td><td>55.03 2.19%</td><td>32.30 9.34%</td><td>2.28 40.74%</td><td>51.12 2.69%</td><td>31.08 7.84%</td><td>59.61 0.39%</td><td>42.65 2.35%</td><td>28.57 9.34%</td><td></td><td>5.09 44.60%</td><td>40.18 2.42%</td><td>26.44 8.49%</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>LDIoU</td><td>76.26 76.44</td><td>54.09</td><td>29.23</td><td>1.56</td><td>49.91</td><td>28.68</td><td></td><td>59.28</td><td>41.62</td><td>26.09</td><td>3.54</td><td>39.25</td><td>24.48</td></tr><tr><td>La-DloU rela. improv.</td><td>0.24%</td><td>54.89 1.48%</td><td>31.48 7.70%</td><td>2.44</td><td>50.96 2.10%</td><td>30.60 6.69%</td><td>59.38</td><td>42.34 1.73%</td><td></td><td>28.23</td><td>5.36</td><td>39.94 1.76%</td><td>26.05</td></tr><tr><td></td><td></td><td></td><td></td><td>56.41%</td><td></td><td></td><td>0.17%</td><td></td><td></td><td>8.20%</td><td>51.41%</td><td></td><td>6.41%</td></tr></table>",
|
| 638 |
+
"bbox": [
|
| 639 |
+
178,
|
| 640 |
+
165,
|
| 641 |
+
820,
|
| 642 |
+
395
|
| 643 |
+
],
|
| 644 |
+
"page_idx": 6
|
| 645 |
+
},
|
| 646 |
+
{
|
| 647 |
+
"type": "image",
|
| 648 |
+
"img_path": "images/9e232b3f52986798a126b03f7aa1830bc4b2925d519c0688edac959ee2c7ff2c.jpg",
|
| 649 |
+
"image_caption": [
|
| 650 |
+
"Figure 2: IoU distributions between predicted bboxes and their ground truth after NMS. "
|
| 651 |
+
],
|
| 652 |
+
"image_footnote": [],
|
| 653 |
+
"bbox": [
|
| 654 |
+
181,
|
| 655 |
+
419,
|
| 656 |
+
491,
|
| 657 |
+
511
|
| 658 |
+
],
|
| 659 |
+
"page_idx": 6
|
| 660 |
+
},
|
| 661 |
+
{
|
| 662 |
+
"type": "image",
|
| 663 |
+
"img_path": "images/211272dfd1a87e78c2e0c6823bc3482113527b7f0cc5bf076ea64dbbf92e3992.jpg",
|
| 664 |
+
"image_caption": [
|
| 665 |
+
"Figure 3: Validation mAPs $( \\mathrm { m A P _ { 5 0 : 9 5 } } )$ across 300 training epochs. "
|
| 666 |
+
],
|
| 667 |
+
"image_footnote": [],
|
| 668 |
+
"bbox": [
|
| 669 |
+
517,
|
| 670 |
+
419,
|
| 671 |
+
826,
|
| 672 |
+
511
|
| 673 |
+
],
|
| 674 |
+
"page_idx": 6
|
| 675 |
+
},
|
| 676 |
+
{
|
| 677 |
+
"type": "text",
|
| 678 |
+
"text": "",
|
| 679 |
+
"bbox": [
|
| 680 |
+
173,
|
| 681 |
+
590,
|
| 682 |
+
823,
|
| 683 |
+
619
|
| 684 |
+
],
|
| 685 |
+
"page_idx": 6
|
| 686 |
+
},
|
| 687 |
+
{
|
| 688 |
+
"type": "text",
|
| 689 |
+
"text": "We further analyze the bbox regression accuracy by showing the IoU distributions between the predicted bboxes and their ground truth for YOLOv5s trained using different losses on PASCAL VOC. After NMS with the IoU threshold being 0.5, we visualize the number of positively predicted bboxes under different IoU thresholds from 0.5 to 0.9 in Figure 2, showing that $\\alpha$ -IoU losses detect more positive objects than baseline losses across all IoU thresholds. Particularly, $\\alpha$ -IoU losses detect approximately $1 \\%$ more positive objects than the baselines when $I o U \\ge 0 . 5$ , and $1 1 \\%$ more high IoU objects when $I o U \\ge 0 . 9$ . This demonstrates that $\\alpha$ -IoU boosts both the precisions and recalls of detectors. $\\alpha$ -IoU is extremely advantageous in pushing low IoU objects to high IoU objects by up-weighting their loss, thus outperforming baseline losses significantly at the high accuracy level and contributing to the improvement of the final detection performance (Table 1). ",
|
| 690 |
+
"bbox": [
|
| 691 |
+
173,
|
| 692 |
+
625,
|
| 693 |
+
825,
|
| 694 |
+
763
|
| 695 |
+
],
|
| 696 |
+
"page_idx": 6
|
| 697 |
+
},
|
| 698 |
+
{
|
| 699 |
+
"type": "text",
|
| 700 |
+
"text": "Moreover, Figure 3 shows that $\\alpha$ -IoU losses are able to boost the late training stage (e.g., after 200 epochs) through up-weighting the gradient of high IoU objects, while almost having no negative impact on the early training stage (e.g., the first 100 epochs). When $\\alpha > 1$ , the relative gradient weight is $0 \\leq w _ { \\nabla _ { r } } < 1$ for $0 \\leq I o U < \\alpha ^ { \\frac { 1 } { 1 - \\alpha } }$ , while $1 \\leq w _ { \\nabla _ { r } } \\leq \\alpha$ for $\\alpha ^ { \\frac { 1 } { 1 - \\alpha } } \\leq \\hat { I o U } \\leq 1$ , as analyzed in Property 3 and illustrated in Figure 1 (right). This property helps tune down the gradients of low IoU objects at the early training stage, which has a smoothing effect (reduces the high variance in parameter update caused by hard examples) that helps stabilize the model training when gradients are large at the early stage. On the other hand, the gradient up-weighting is well-bounded by $w _ { \\nabla _ { r } } \\leq \\alpha$ , which makes up-weighting relatively safe for high IoU objects, as the original loss and gradient are small for these examples, so is the learning rate. ",
|
| 701 |
+
"bbox": [
|
| 702 |
+
173,
|
| 703 |
+
770,
|
| 704 |
+
825,
|
| 705 |
+
911
|
| 706 |
+
],
|
| 707 |
+
"page_idx": 6
|
| 708 |
+
},
|
| 709 |
+
{
|
| 710 |
+
"type": "image",
|
| 711 |
+
"img_path": "images/91e27db7607aaaed8f16e6393d7f0952e04e692ef4cca1b0c6d9043651c9ce60.jpg",
|
| 712 |
+
"image_caption": [
|
| 713 |
+
"Figure 4: Example results on the test set of PASCAL VOC 2007 using YOLOv5s trained by ${ \\mathcal { L } } _ { \\mathrm { I o U } }$ (top row) and ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ with $\\alpha = 3$ (bottom row). ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ performs better than ${ \\mathcal { L } } _ { \\mathrm { I o U } }$ because it can localize objects more accurately (image 1 and 2), thus can detect more true positive objects (image 3 to 5) and fewer false positive objects (image 6 and 7). "
|
| 714 |
+
],
|
| 715 |
+
"image_footnote": [],
|
| 716 |
+
"bbox": [
|
| 717 |
+
174,
|
| 718 |
+
88,
|
| 719 |
+
823,
|
| 720 |
+
193
|
| 721 |
+
],
|
| 722 |
+
"page_idx": 7
|
| 723 |
+
},
|
| 724 |
+
{
|
| 725 |
+
"type": "image",
|
| 726 |
+
"img_path": "images/065de5448f936f87c521abfbfc11fb0b69f7205e5a15da8a1d9dc3f4d65b7ed0.jpg",
|
| 727 |
+
"image_caption": [
|
| 728 |
+
"Figure 5: Example results on the val set of MS COCO 2017 using YOLOv5s trained by ${ \\mathcal { L } } _ { \\mathrm { I o U } }$ (top row) and ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ with $\\alpha = 3$ (bottom row). ${ \\mathcal { L } } _ { \\alpha }$ -IoU performs better than ${ \\mathcal { L } } _ { \\mathrm { I o U } }$ because it can localize objects more accurately (image 1), thus can detect more true positive objects (image 2 to 5) and fewer false positive objects (image 4 to 7). Note that ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ detects both more true positive and fewer false positive objects in image 4 and 5 than ${ \\mathcal { L } } _ { \\mathrm { I o U } }$ . "
|
| 729 |
+
],
|
| 730 |
+
"image_footnote": [],
|
| 731 |
+
"bbox": [
|
| 732 |
+
174,
|
| 733 |
+
290,
|
| 734 |
+
821,
|
| 735 |
+
401
|
| 736 |
+
],
|
| 737 |
+
"page_idx": 7
|
| 738 |
+
},
|
| 739 |
+
{
|
| 740 |
+
"type": "text",
|
| 741 |
+
"text": "We also conduct an experiment to compare our $\\alpha$ -IoU with a set of existing IoU-based losses in training a popular two-stage anchor-based model, Faster R-CNN (ResNet-50-FPN). In Table 2, results at the top are reproduced using the MMDetection toolbox [6] while those in the middle are reported results in the original papers [43, 41, 23]. Results at the bottom are obtained by replacing existing losses with their $\\alpha$ -IoU versions (i.e., improve based on top results using MMDetection). The results on MS COCO demonstrate that $\\alpha$ -IoU losses are quite competitive compared with existing baselines in terms of both mAP and $\\mathrm { m A P _ { 7 5 : 9 5 } }$ . Note that the Autoloss searches both the classification loss and the localization loss, thus taking a huge amount of searching time [23]. In contrast, $\\alpha$ -IoU losses only need an easy modification of the localization loss and win the Autoloss without causing any additional computational overhead. ",
|
| 742 |
+
"bbox": [
|
| 743 |
+
174,
|
| 744 |
+
525,
|
| 745 |
+
825,
|
| 746 |
+
664
|
| 747 |
+
],
|
| 748 |
+
"page_idx": 7
|
| 749 |
+
},
|
| 750 |
+
{
|
| 751 |
+
"type": "text",
|
| 752 |
+
"text": "4.3 Robustness to Noisy Bounding Boxes ",
|
| 753 |
+
"text_level": 1,
|
| 754 |
+
"bbox": [
|
| 755 |
+
176,
|
| 756 |
+
683,
|
| 757 |
+
468,
|
| 758 |
+
698
|
| 759 |
+
],
|
| 760 |
+
"page_idx": 7
|
| 761 |
+
},
|
| 762 |
+
{
|
| 763 |
+
"type": "text",
|
| 764 |
+
"text": "It happens quite often that people annotate inaccurate bboxes in images/videos as the ground truth, even with computer-assisted annotation tools. However, there is little work on the robustness of localization losses to noisy bboxes, even though a number of methods have been proposed for robust learning with noisy labels, anchors, and bboxes [27, 26, 12, 10, 15, 37, 38, 25, 19, 20]. Here, we fill this gap by conducting a set of experiments to evaluate the robustness of different localization losses to noisy bboxes. We show that $\\alpha$ -IoU is more robust to noisy bboxes as they focus less on the low IoU objects, creating a suppression effect on the learning of the noisy bbox examples. Considering that open datasets like PASCAL VOC and MS COCO are carefully annotated, we synthesize a set of common noisy bboxes by perturbing normalized bboxes in the entire training set. The perturbations follow a uniform noise distribution in $[ - \\eta w , \\eta w ]$ at horizontal coordinates $\\scriptstyle { \\dot { x } }$ and $w$ ) and $[ - \\eta h , \\eta h ]$ at vertical coordinates $y$ and $h$ ), where $\\eta$ is the noise rate [20]. We then constrain all the noisy bboxes by the following boundary conditions: ",
|
| 765 |
+
"bbox": [
|
| 766 |
+
173,
|
| 767 |
+
710,
|
| 768 |
+
825,
|
| 769 |
+
876
|
| 770 |
+
],
|
| 771 |
+
"page_idx": 7
|
| 772 |
+
},
|
| 773 |
+
{
|
| 774 |
+
"type": "equation",
|
| 775 |
+
"img_path": "images/38372e0dd32a23e97cc8cc6df1248c94cc1c9165830ec6abbf1d222093959c61.jpg",
|
| 776 |
+
"text": "$$\n0 < w < 1 , ~ 0 < h < 1 , ~ \\frac { 1 } { 2 } w \\leq x \\leq 1 - \\frac { 1 } { 2 } w , ~ \\frac { 1 } { 2 } h \\leq y \\leq 1 - \\frac { 1 } { 2 } h .\n$$",
|
| 777 |
+
"text_format": "latex",
|
| 778 |
+
"bbox": [
|
| 779 |
+
272,
|
| 780 |
+
886,
|
| 781 |
+
723,
|
| 782 |
+
916
|
| 783 |
+
],
|
| 784 |
+
"page_idx": 7
|
| 785 |
+
},
|
| 786 |
+
{
|
| 787 |
+
"type": "table",
|
| 788 |
+
"img_path": "images/1b83c2dd309edad2198dcca2a356da9513f7ed92323518e7d6673c7d80b02794.jpg",
|
| 789 |
+
"table_caption": [
|
| 790 |
+
"Table 2: The performance of Faster R-CNN (ResNet-50-FPN) with $1 \\times$ schedule and single scale training on MS COCO using different localization losses. Results are obtained on the val set of MS COCO 2017. mAP denotes $\\mathrm { m A P _ { 5 0 : 9 5 } }$ ; $\\mathrm { m A P _ { 7 5 : 9 5 } }$ denotes the mean AP over $\\mathsf { A P } _ { 7 5 }$ , $\\mathbf { A P } _ { 8 0 } , \\cdot \\cdot \\cdot , \\mathbf { A P } _ { 9 5 }$ . $\\mathsf { A P } _ { s }$ , $\\mathsf { A P } _ { m }$ , and $\\mathsf { A P } _ { l }$ denote the AP for small, medium, and large objects, respectively. † marks the reproduced results from the MMDetection toolbox [6], while ∗ marks the results in the original papers. \"–\" represents the missing results in papers. $\\alpha = 3$ is used for all $\\alpha$ -IoU losses in all experiments. The top two best results in every column are boldfaced. "
|
| 791 |
+
],
|
| 792 |
+
"table_footnote": [],
|
| 793 |
+
"table_body": "<table><tr><td>Loss</td><td>AP50</td><td>AP75</td><td>AP80</td><td>AP85</td><td>AP90</td><td>AP95</td><td>mAP</td><td>mAP75:95|</td><td>APs</td><td>APm</td><td>APt</td></tr><tr><td>+e1</td><td>58.13</td><td>40.45</td><td>33.56</td><td>23.39</td><td>11.09</td><td>1.24</td><td>37.37</td><td>21.95</td><td>21.20</td><td>40.96</td><td>48.13</td></tr><tr><td>LIoU</td><td>58.12</td><td>41.23</td><td>34.03</td><td>24.43</td><td>12.42</td><td>1.61</td><td>37.88</td><td>22.74</td><td>21.61</td><td>41.63</td><td>49.11</td></tr><tr><td>LGIoU</td><td>58.18</td><td>41.00</td><td>33.52</td><td>24.13</td><td>11.97</td><td>1.51</td><td>37.62</td><td>22.43</td><td>21.49</td><td>41.07</td><td>48.90</td></tr><tr><td>+LBIoU</td><td>58.05</td><td>40.57</td><td>33.54</td><td>23.85</td><td>11.10</td><td>1.19</td><td>37.43</td><td>22.05</td><td>21.57</td><td>41.00</td><td>48.17</td></tr><tr><td>*LIoU</td><td>/</td><td>40.79</td><td>/</td><td></td><td>1</td><td>1</td><td>37.93</td><td></td><td>21.58</td><td>40.82</td><td>50.14</td></tr><tr><td>*LGIoU</td><td>1</td><td>41.11</td><td></td><td></td><td>1</td><td></td><td>38.02</td><td></td><td>21.45</td><td>41.06</td><td>50.21</td></tr><tr><td>*LDIoU</td><td>1</td><td>41.11</td><td></td><td></td><td>1</td><td>1</td><td>38.09</td><td>1</td><td>21.66</td><td>41.18</td><td>50.32</td></tr><tr><td>*LCIoU</td><td>1</td><td>41.96</td><td></td><td></td><td></td><td></td><td>38.65</td><td></td><td>21.32</td><td>41.83</td><td>51.51</td></tr><tr><td>*LFocal-EIoU</td><td>59.10</td><td>42.40</td><td></td><td></td><td></td><td></td><td>38.90</td><td></td><td>21.20</td><td>41.10</td><td>50.20</td></tr><tr><td>*Autoloss</td><td>58.60</td><td>41.80</td><td>1</td><td>一</td><td>1</td><td>1</td><td>38.50</td><td>1</td><td>22.00</td><td>42.20</td><td>50.20</td></tr><tr><td>Lα-IoU</td><td>58.81</td><td>41.94</td><td>34.81</td><td>25.36</td><td>13.27</td><td>1.81</td><td>38.96</td><td>23.44</td><td>22.14</td><td>42.11</td><td>50.36</td></tr><tr><td>La-GloU</td><td>59.01</td><td>42.00</td><td>35.13</td><td>25.14</td><td>13.09</td><td>2.03</td><td>39.18</td><td>23.46</td><td>22.05</td><td>42.19</td><td>50.08</td></tr><tr><td>Lα-DIoU</td><td>59.27</td><td>42.18</td><td>35.25</td><td>25.47</td><td>13.32</td><td>1.95</td><td>39.43</td><td>23.65</td><td>22.10</td><td>42.10</td><td>50.43</td></tr><tr><td>La-CloU</td><td>59.09</td><td>41.92</td><td>35.01</td><td>25.08</td><td>13.04</td><td>1.98</td><td>39.25</td><td>23.41</td><td>21.94</td><td>41.88</td><td>50.01</td></tr></table>",
|
| 794 |
+
"bbox": [
|
| 795 |
+
191,
|
| 796 |
+
193,
|
| 797 |
+
807,
|
| 798 |
+
377
|
| 799 |
+
],
|
| 800 |
+
"page_idx": 8
|
| 801 |
+
},
|
| 802 |
+
{
|
| 803 |
+
"type": "table",
|
| 804 |
+
"img_path": "images/6af476926f58aa995da74b421b2a869d98584be82262cc71ff96ea73e389664e.jpg",
|
| 805 |
+
"table_caption": [
|
| 806 |
+
"Table 3: The performance of YOLOv5s trained using different localization losses on simulated noisy trainval sets of PASCAL VOC $2 0 0 7 { + } 2 0 1 2$ under noise rates $\\eta = 0 . 1 , 0 . 2$ , and 0.3. Results are obtained on the clean test set of PASCAL VOC 2007. mAP denotes $\\mathrm { m A P _ { 5 0 : 9 5 } }$ ; $\\mathrm { m A P _ { 7 5 : 9 5 } }$ denotes the mean AP over $\\mathsf { A P } _ { 7 5 }$ , $\\mathbf { A P } _ { 8 0 } , \\cdot \\cdot \\cdot , \\mathbf { A P } _ { 9 5 }$ . \"rela. improv.\" stands for the relative improvement. $\\alpha = 3$ is used for all $\\alpha$ -IoU losses in all experiments. "
|
| 807 |
+
],
|
| 808 |
+
"table_footnote": [],
|
| 809 |
+
"table_body": "<table><tr><td>Noise</td><td>Loss</td><td>AP50</td><td>AP55</td><td>AP60</td><td>AP65</td><td>AP70</td><td>AP75</td><td>AP80</td><td>AP85</td><td>AP90</td><td>AP95</td><td>mAP</td><td>mAP75:95</td></tr><tr><td rowspan=\"6\">0.1</td><td>LIoU La-IoU</td><td>74.48 74.67</td><td>71.57 71.94</td><td>68.08 68.73</td><td>63.29 64.27</td><td>56.55 57.75</td><td>47.12 48.50</td><td>33.06 36.88</td><td>17.53 21.25</td><td>4.16 6.30</td><td>0.26 0.28</td><td>43.61 45.06</td><td>20.43</td></tr><tr><td>rela. improv.</td><td>0.26%</td><td>0.52%</td><td>0.95%</td><td>1.55%</td><td>2.12%</td><td>2.93%</td><td>11.55%</td><td>21.22%</td><td>51.44%</td><td>7.69%</td><td>3.32%</td><td>22.64 10.85%</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>LDIoU</td><td>74.09</td><td>71.46</td><td>67.88</td><td>63.09</td><td>56.18</td><td>46.71</td><td>32.67</td><td>17.50</td><td>4.43</td><td>0.23</td><td>43.42</td><td>20.31</td></tr><tr><td>La-DloU</td><td>74.38</td><td>71.95</td><td>68.10</td><td>63.52</td><td>57.18</td><td>48.47</td><td>35.90</td><td>20.89</td><td>6.37</td><td>0.33</td><td>44.71</td><td>22.39</td></tr><tr><td>rela. improv.</td><td>0.39%</td><td>0.69%</td><td>0.32%</td><td>0.68%</td><td>1.78%</td><td>3.77%</td><td>9.89%</td><td>19.37%</td><td>43.79%</td><td>43.48%</td><td>2.97%</td><td>10.26%</td></tr><tr><td rowspan=\"6\">0.2</td><td>LIoU La-loU</td><td>67.82</td><td>63.93</td><td>58.22</td><td>50.11</td><td>39.31</td><td>26.33</td><td>13.51</td><td>4.55</td><td>0.66</td><td>0.05</td><td>32.45</td><td>9.02</td></tr><tr><td></td><td>68.20</td><td>64.21</td><td>58.77</td><td>51.59</td><td>40.66</td><td>29.20</td><td>16.11</td><td>6.06</td><td>1.31</td><td>0.10</td><td>33.62</td><td>10.56</td></tr><tr><td>rela. improv.</td><td>0.56%</td><td>0.44%</td><td>0.94%</td><td>2.95%</td><td>3.43%</td><td>10.90%</td><td>19.25%</td><td>33.19%</td><td>98.48%</td><td>100%</td><td>3.61%</td><td>17.03%</td></tr><tr><td>LDIoU</td><td>67.39</td><td>62.94</td><td>57.29</td><td>49.25</td><td>39.40</td><td>27.13</td><td>13.78</td><td>4.52</td><td>0.68</td><td>0.02</td><td>32.24</td><td>9.23</td></tr><tr><td>La-DloU</td><td>68.26</td><td>64.49</td><td>59.59</td><td>51.99</td><td>41.19</td><td>29.12</td><td>15.77</td><td>5.84</td><td>1.25</td><td>0.21</td><td>33.77</td><td>10.44</td></tr><tr><td>rela.improv.</td><td>1.29%</td><td>2.46%</td><td>4.01%</td><td>5.56%</td><td>4.54%</td><td>7.34%</td><td>14.44%</td><td>29.20%</td><td>83.82%</td><td>950%</td><td>4.75%</td><td>13.14%</td></tr><tr><td rowspan=\"6\">0.3</td><td>LIoU La-IoU</td><td>56.54</td><td>49.69</td><td>40.67</td><td>30.80</td><td>19.99</td><td>11.13</td><td>4.81</td><td>1.43</td><td>0.31</td><td>0.04</td><td>21.54</td><td>3.54</td></tr><tr><td></td><td>58.59</td><td>51.58</td><td>43.23</td><td>32.93</td><td>22.27</td><td>12.52</td><td>5.91</td><td>2.16</td><td>0.73</td><td>0.12</td><td>23.00</td><td>4.29</td></tr><tr><td>rela. improv.</td><td>3.63%</td><td>3.80%</td><td>6.29%</td><td>6.92%</td><td>11.41%</td><td>12.49%</td><td>22.87%</td><td>51.05%</td><td>135%</td><td>200%</td><td>6.78%</td><td>20.99%</td></tr><tr><td>LDIoU</td><td>56.84</td><td>49.82</td><td>41.50</td><td></td><td>20.80</td><td>11.22</td><td>4.84</td><td>1.51</td><td>0.46</td><td></td><td></td><td></td></tr><tr><td></td><td>58.45</td><td>51.94</td><td>43.9</td><td>32.06 33.78</td><td>22.57</td><td>12.89</td><td>6.34</td><td>2.42</td><td>0.65</td><td>0.07</td><td>21.91 23.31</td><td>3.62 4.49</td></tr><tr><td>La-DIoU rela. improv.</td><td>2.83%</td><td>4.26%</td><td>5.78%</td><td>5.36%</td><td>8.51%</td><td>14.88%</td><td>30.99%</td><td>60.26%</td><td>41.30%</td><td>0.16 129%</td><td>6.39%</td><td>24.09%</td></tr></table>",
|
| 810 |
+
"bbox": [
|
| 811 |
+
176,
|
| 812 |
+
500,
|
| 813 |
+
821,
|
| 814 |
+
715
|
| 815 |
+
],
|
| 816 |
+
"page_idx": 8
|
| 817 |
+
},
|
| 818 |
+
{
|
| 819 |
+
"type": "text",
|
| 820 |
+
"text": "We test $\\eta = 0 . 1 , 0 . 2 , 0 . 3$ in our experiments, with the average IoU between the noisy bboxes and their clean versions dropping to 0.833, 0.710, and 0.613, respectively. Examples of the synthesized noisy bboxes can be found in Appendix B.4. As shown in Table 3, $\\alpha$ -IoU improves the baseline losses (i.e., ${ \\mathcal { L } } _ { \\mathrm { I o U } }$ and ${ \\mathcal { L } } _ { \\mathrm { { D I o U } } } ,$ ) considerably in these noisy scenarios. We gain increasing relative improvements from $\\mathrm { { A P } _ { 5 0 } }$ to $\\mathsf { A P } _ { 9 5 }$ , which accumulate to a more significant improvement in $\\mathrm { m A P _ { 7 5 : 9 5 } }$ . Note that $\\alpha$ -IoU losses also outperform the baselines at $\\mathrm { { A P } _ { 5 0 } }$ across all noisy scenarios, which is not always the case when bboxes are clean (Table 1). Furthermore, $\\alpha$ -IoU losses are noticeably more robust against more severe noises. For instance, the relative improvement of $\\mathcal { L } _ { \\alpha \\mathrm { - D I o U } }$ over ${ \\mathcal { L } } _ { \\mathrm { D I o U } }$ increases from $2 . 9 7 \\% / 1 0 . 2 6 \\%$ to $6 . 3 9 \\% / 2 4 . 0 9 \\%$ according to $\\mathrm { m A P / m A P _ { 7 5 : 9 5 } }$ when the noise rate $\\eta$ rises from 0.1 to 0.3. These results confirm the advantage of $\\alpha$ -IoU losses in noisy bbox scenarios. ",
|
| 821 |
+
"bbox": [
|
| 822 |
+
173,
|
| 823 |
+
772,
|
| 824 |
+
825,
|
| 825 |
+
911
|
| 826 |
+
],
|
| 827 |
+
"page_idx": 8
|
| 828 |
+
},
|
| 829 |
+
{
|
| 830 |
+
"type": "image",
|
| 831 |
+
"img_path": "images/95f39c8fd7d84b4545fc2799b10b981d73b12cb7d0d2c2ee21cd6d516957a4f2.jpg",
|
| 832 |
+
"image_caption": [
|
| 833 |
+
"Figure 6: The performance of YOLOv5 models trained using $\\alpha$ -IoU with different $\\alpha$ values and evaluated on the clean test set of PASCAL VOC 2007. Black dashed lines denote baselines (i.e., the family of $\\alpha$ -IoU with $\\alpha = 1$ ) while red dashed lines denote the family of $\\alpha$ -IoU with $\\alpha = 3$ . "
|
| 834 |
+
],
|
| 835 |
+
"image_footnote": [],
|
| 836 |
+
"bbox": [
|
| 837 |
+
199,
|
| 838 |
+
85,
|
| 839 |
+
790,
|
| 840 |
+
262
|
| 841 |
+
],
|
| 842 |
+
"page_idx": 9
|
| 843 |
+
},
|
| 844 |
+
{
|
| 845 |
+
"type": "text",
|
| 846 |
+
"text": "4.4 Sensitivity to power parameter $\\alpha$ ",
|
| 847 |
+
"text_level": 1,
|
| 848 |
+
"bbox": [
|
| 849 |
+
176,
|
| 850 |
+
343,
|
| 851 |
+
441,
|
| 852 |
+
358
|
| 853 |
+
],
|
| 854 |
+
"page_idx": 9
|
| 855 |
+
},
|
| 856 |
+
{
|
| 857 |
+
"type": "text",
|
| 858 |
+
"text": "Here, we evaluate the performance of $\\alpha$ -IoU with varying $\\alpha$ values $( \\alpha \\in [ 0 . 5 , 5 ] )$ ) via a set of experiments with ${ \\mathcal { L } } _ { \\alpha - { \\mathrm { I o U } } }$ and $\\mathcal { L } _ { \\alpha - \\mathrm { D I o U } }$ . The results are shown in Figure 6 for YOLOv5s on PASCAL VOC in both clean and various noisy bbox scenarios. It is evident that $\\alpha$ -IoU losses with $\\alpha \\in [ 2 , 4 ]$ perform competitively well across all scenarios, with $\\alpha = 3$ performing the best in most cases. When $\\alpha > 3$ , $\\alpha$ -IoU losses tend to perform worse on low APs than the baselines (i.e., $\\alpha$ -IoU with $\\alpha = 1 \\AA$ ), although the performance at high APs gains more improvement. We also test an extreme case with $\\alpha = 1 0$ , in which the performance drops by $5 . 6 1 \\% / 1 \\dot { 0 } . 9 2 \\% / 2 3 . 8 8 \\% / 3 1 . 8 2 \\%$ on average compared with $\\alpha = 3$ under noise rates $\\eta = 0 / 0 . 1 / 0 . 2 / 0 . 3$ , respectively. More specifically, it becomes worse than the baselines according to either mAP or $\\mathrm { m A P _ { 7 5 : 9 5 } }$ . This indicates that a proper choice of $\\alpha$ is crucial for $\\alpha$ -IoU losses. Our recommendation is to tune $\\alpha \\in [ 2 , 3 ]$ for most applications or directly use $\\alpha = 3$ when tuning is too expensive. Note that $\\alpha \\in [ 3 , 4 ]$ may be a better choice when high levels of bbox regression accuracy is desired, e.g., $\\mathrm { m A P _ { 7 5 : 9 5 } }$ is the preferred performance metric. It is possible that $\\alpha < 1$ is a better choice for certain applications, although $\\alpha$ -IoU losses with $\\alpha < 1$ perform consistently worse than the baselines in our experiments. ",
|
| 859 |
+
"bbox": [
|
| 860 |
+
173,
|
| 861 |
+
369,
|
| 862 |
+
825,
|
| 863 |
+
563
|
| 864 |
+
],
|
| 865 |
+
"page_idx": 9
|
| 866 |
+
},
|
| 867 |
+
{
|
| 868 |
+
"type": "text",
|
| 869 |
+
"text": "5 Conclusions ",
|
| 870 |
+
"text_level": 1,
|
| 871 |
+
"bbox": [
|
| 872 |
+
174,
|
| 873 |
+
585,
|
| 874 |
+
305,
|
| 875 |
+
603
|
| 876 |
+
],
|
| 877 |
+
"page_idx": 9
|
| 878 |
+
},
|
| 879 |
+
{
|
| 880 |
+
"type": "text",
|
| 881 |
+
"text": "In this paper, we proposed a unified formula $\\alpha$ -IoU to generalize existing IoU-based losses to a new family of power IoU losses. By modulating the power parameter $\\alpha$ , $\\alpha$ -IoU offers the flexibility to achieve different levels of bbox regression accuracy when training an object detector. We analyzed the order preservingness and the loss/gradient reweighting properties of $\\alpha$ -IoU, and showed that $\\alpha$ -IoU can improve bbox regression accuracy through up-weighting the loss and gradient of high IoU objects. Experiments with multiple detection models and benchmark datasets demonstrated that $\\alpha$ -IoU losses can consistently outperform existing IoU-based losses, especially at the high Average Precisions (APs). $\\alpha$ -IoU has the potential to be widely applied in real-world object detection applications as 1) it improves existing IoU-based losses, 2) it benefits light models, 3) it is extremely advantageous on small datasets, and 4) it is more robust to noisy bboxes. For future work, we will explore new generalization formulas for other metric-derived loss functions [13], such as Dice, Hausdorff distance, and Chamfer distance losses. ",
|
| 882 |
+
"bbox": [
|
| 883 |
+
174,
|
| 884 |
+
619,
|
| 885 |
+
826,
|
| 886 |
+
785
|
| 887 |
+
],
|
| 888 |
+
"page_idx": 9
|
| 889 |
+
},
|
| 890 |
+
{
|
| 891 |
+
"type": "text",
|
| 892 |
+
"text": "Societal Impacts ",
|
| 893 |
+
"text_level": 1,
|
| 894 |
+
"bbox": [
|
| 895 |
+
174,
|
| 896 |
+
808,
|
| 897 |
+
313,
|
| 898 |
+
825
|
| 899 |
+
],
|
| 900 |
+
"page_idx": 9
|
| 901 |
+
},
|
| 902 |
+
{
|
| 903 |
+
"type": "text",
|
| 904 |
+
"text": "The proposed loss functions can help train high-performance object detectors for impactful applications such as self-driving, face recognition and video surveillance. While not our initial intention, these models could potentially be manipulated by adversaries or unauthorized users for malicious purposes. This could compromise the safety or privacy of certain individuals. We believe strict regulations should be established to prevent such illegitimate exploitations. ",
|
| 905 |
+
"bbox": [
|
| 906 |
+
176,
|
| 907 |
+
842,
|
| 908 |
+
825,
|
| 909 |
+
911
|
| 910 |
+
],
|
| 911 |
+
"page_idx": 9
|
| 912 |
+
},
|
| 913 |
+
{
|
| 914 |
+
"type": "text",
|
| 915 |
+
"text": "References ",
|
| 916 |
+
"text_level": 1,
|
| 917 |
+
"bbox": [
|
| 918 |
+
174,
|
| 919 |
+
90,
|
| 920 |
+
267,
|
| 921 |
+
106
|
| 922 |
+
],
|
| 923 |
+
"page_idx": 10
|
| 924 |
+
},
|
| 925 |
+
{
|
| 926 |
+
"type": "text",
|
| 927 |
+
"text": "[1] A. Bochkovskiy, C.-Y. Wang, and H.-Y. M. Liao. Yolov4: Optimal speed and accuracy of object detection. arXiv preprint arXiv:2004.10934, 2020. \n[2] G. E. Box and D. R. Cox. An analysis of transformations. Journal of the Royal Statistical Society: Series B (Methodological), 26(2):211–243, 1964. [3] Z. Cai and N. Vasconcelos. Cascade r-cnn: Delving into high quality object detection. In CVPR, pages 6154–6162, 2018. [4] N. Carion, F. Massa, G. Synnaeve, N. Usunier, A. Kirillov, and S. Zagoruyko. End-to-end object detection with transformers. In ECCV, pages 213–229. Springer, 2020. [5] K. Chen, J. Pang, J. Wang, Y. Xiong, X. Li, S. Sun, W. Feng, Z. Liu, J. Shi, W. Ouyang, et al. Hybrid task cascade for instance segmentation. In CVPR, pages 4974–4983, 2019. \n[6] K. Chen, J. Wang, J. Pang, Y. Cao, Y. Xiong, X. Li, S. Sun, W. Feng, Z. Liu, J. Xu, et al. Mmdetection: Open mmlab detection toolbox and benchmark. arXiv preprint arXiv:1906.07155, 2019. \n[7] Z. Dong, G. Li, Y. Liao, F. Wang, P. Ren, and C. Qian. Centripetalnet: Pursuing high-quality keypoint pairs for object detection. In CVPR, pages 10519–10528, 2020. [8] K. Duan, S. Bai, L. Xie, H. Qi, Q. Huang, and Q. Tian. Centernet: Keypoint triplets for object detection. In ICCV, pages 6569–6578, 2019. [9] M. Everingham, L. Van Gool, C. K. Williams, J. Winn, and A. Zisserman. The pascal visual object classes (voc) challenge. IJCV, 88(2):303–338, 2010. \n[10] J. Gao, J. Wang, S. Dai, L.-J. Li, and R. Nevatia. Note-rcnn: Noise tolerant ensemble rcnn for semi-supervised object detection. In ICCV, pages 9508–9517, 2019. \n[11] R. Girshick. Fast r-cnn. In ICCV, pages 1440–1448, 2015. \n[12] B. Han, Q. Yao, X. Yu, G. Niu, M. Xu, W. Hu, I. W. Tsang, and M. Sugiyama. Co-teaching: Robust training of deep neural networks with extremely noisy labels. In NeurIPS, 2018. \n[13] J. He, S. Erfani, S. Wijewickrema, S. O’Leary, and K. Ramamohanarao. Learning non-unique segmentation with reward-penalty dice loss. In IJCNN, pages 1–8. IEEE, 2020. \n[14] K. He, G. Gkioxari, P. Dollár, and R. Girshick. Mask r-cnn. In ICCV, pages 2961–2969, 2017. \n[15] M. Khodabandeh, A. Vahdat, M. Ranjbar, and W. G. Macready. A robust learning approach to domain adaptive object detection. In ICCV, pages 480–490, 2019. \n[16] H. Law and J. Deng. Cornernet: Detecting objects as paired keypoints. In ECCV, pages 734–750, 2018. \n[17] H. Li, T. Fu, J. Dai, H. Li, G. Huang, and X. Zhu. Autoloss-zero: Searching loss functions from scratch for generic tasks. arXiv preprint arXiv:2103.14026, 2021. \n[18] H. Li, C. Tao, X. Zhu, X. Wang, G. Huang, and J. Dai. Auto seg-loss: Searching metric surrogates for semantic segmentation. arXiv preprint arXiv:2010.07930, 2020. \n[19] H. Li, Z. Wu, C. Zhu, C. Xiong, R. Socher, and L. S. Davis. Learning from noisy anchors for one-stage object detection. In CVPR, pages 10588–10597, 2020. \n[20] J. Li, C. Xiong, R. Socher, and S. Hoi. Towards noise-resistant object detection with noisy annotations. arXiv preprint arXiv:2003.01285, 2020. \n[21] T.-Y. Lin, P. Goyal, R. Girshick, K. He, and P. Dollár. Focal loss for dense object detection. In ICCV, pages 2980–2988, 2017. \n[22] T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollár, and C. L. Zitnick. Microsoft coco: Common objects in context. In ECCV, pages 740–755. Springer, 2014. \n[23] P. Liu, G. Zhang, B. Wang, H. Xu, X. Liang, Y. Jiang, and Z. Li. Loss function discovery for object detection via convergence-simulation driven search. arXiv preprint arXiv:2102.04700, 2021. \n[24] W. Liu, D. Anguelov, D. Erhan, C. Szegedy, S. Reed, C.-Y. Fu, and A. C. Berg. Ssd: Single shot multibox detector. In ECCV, pages 21–37. Springer, 2016. \n[25] X. Ma, H. Huang, Y. Wang, S. Romano, S. Erfani, and J. Bailey. Normalized loss functions for deep learning with noisy labels. In ICML, pages 6543–6553. PMLR, 2020. \n[26] X. Ma, Y. Wang, M. E. Houle, S. Zhou, S. Erfani, S. Xia, S. Wijewickrema, and J. Bailey. Dimensionality-driven learning with noisy labels. In ICML, pages 3355–3364. PMLR, 2018. \n[27] N. Natarajan, I. S. Dhillon, P. K. Ravikumar, and A. Tewari. Learning with noisy labels. NeurIPS, 26:1196–1204, 2013. \n[28] M. A. Rahman and Y. Wang. Optimizing intersection-over-union in deep neural networks for image segmentation. In ISVC, pages 234–244. Springer, 2016. \n[29] J. Redmon and A. Farhadi. Yolo9000: better, faster, stronger. In CVPR, pages 7263–7271, 2017. \n[30] J. Redmon and A. Farhadi. Yolov3: An incremental improvement. arXiv preprint arXiv:1804.02767, 2018. \n[31] S. Ren, K. He, R. Girshick, and J. Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. arXiv preprint arXiv:1506.01497, 2015. \n[32] H. Rezatofighi, N. Tsoi, J. Gwak, A. Sadeghian, I. Reid, and S. Savarese. Generalized intersection over union: A metric and a loss for bounding box regression. In CVPR, pages 658–666, 2019. \n[33] G. Song, Y. Liu, and X. Wang. Revisiting the sibling head in object detector. In CVPR, pages 11563–11572, 2020. \n[34] Z. Tian, C. Shen, H. Chen, and T. He. Fcos: Fully convolutional one-stage object detection. In ICCV, pages 9627–9636, 2019. \n[35] L. Tychsen-Smith and L. Petersson. Improving object localization with fitness nms and bounded iou loss. In CVPR, pages 6877–6885, 2018. \n[36] K. Wang and L. Zhang. Single-shot two-pronged detector with rectified iou loss. In Proceedings of the 28th ACM International Conference on Multimedia, pages 1311–1319, 2020. \n[37] Y. Wang, X. Ma, Z. Chen, Y. Luo, J. Yi, and J. Bailey. Symmetric cross entropy for robust learning with noisy labels. In ICCV, pages 322–330, 2019. \n[38] Z. Wang, L. Liu, and D. Tao. Deep streaming label learning. In ICML, pages 9963–9972. PMLR, 2020. \n[39] J. Yu, Y. Jiang, Z. Wang, Z. Cao, and T. Huang. Unitbox: An advanced object detection network. In Proceedings of the 24th ACM international conference on Multimedia, pages 516–520, 2016. \n[40] S. Zhang, C. Chi, Y. Yao, Z. Lei, and S. Z. Li. Bridging the gap between anchor-based and anchor-free detection via adaptive training sample selection. In CVPR, pages 9759–9768, 2020. \n[41] Y.-F. Zhang, W. Ren, Z. Zhang, Z. Jia, L. Wang, and T. Tan. Focal and efficient iou loss for accurate bounding box regression. arXiv preprint arXiv:2101.08158, 2021. \n[42] Z. Zhang and M. R. Sabuncu. Generalized cross entropy loss for training deep neural networks with noisy labels. In NeurIPS, 2018. \n[43] Z. Zheng, P. Wang, W. Liu, J. Li, R. Ye, and D. Ren. Distance-iou loss: Faster and better learning for bounding box regression. In AAAI, pages 12993–13000, 2020. \n[44] X. Zhou, D. Wang, and P. Krähenbühl. Objects as points. arXiv preprint, arXiv:1904.07850, 2019. \n[45] X. Zhou, J. Zhuo, and P. Krahenbuhl. Bottom-up object detection by grouping extreme and center points. In CVPR, pages 850–859, 2019. \n[46] X. Zhu, W. Su, L. Lu, B. Li, X. Wang, and J. Dai. Deformable detr: Deformable transformers for end-to-end object detection. arXiv preprint arXiv:2010.04159, 2020. ",
|
| 928 |
+
"bbox": [
|
| 929 |
+
171,
|
| 930 |
+
111,
|
| 931 |
+
828,
|
| 932 |
+
911
|
| 933 |
+
],
|
| 934 |
+
"page_idx": 10
|
| 935 |
+
},
|
| 936 |
+
{
|
| 937 |
+
"type": "text",
|
| 938 |
+
"text": "",
|
| 939 |
+
"bbox": [
|
| 940 |
+
171,
|
| 941 |
+
66,
|
| 942 |
+
828,
|
| 943 |
+
915
|
| 944 |
+
],
|
| 945 |
+
"page_idx": 11
|
| 946 |
+
},
|
| 947 |
+
{
|
| 948 |
+
"type": "text",
|
| 949 |
+
"text": "",
|
| 950 |
+
"bbox": [
|
| 951 |
+
169,
|
| 952 |
+
90,
|
| 953 |
+
826,
|
| 954 |
+
195
|
| 955 |
+
],
|
| 956 |
+
"page_idx": 12
|
| 957 |
+
}
|
| 958 |
+
]
|
parse/train/rbdKZJxDWWx/rbdKZJxDWWx_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/rbdKZJxDWWx/rbdKZJxDWWx_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/ry-TW-WAb/ry-TW-WAb.md
ADDED
|
@@ -0,0 +1,413 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# VARIATIONAL NETWORK QUANTIZATION
|
| 2 |
+
|
| 3 |
+
Jan Achterhold1,2, Jan M. Kohler ¨ 1, Anke Schmeink2 & Tim Genewein1,\*
|
| 4 |
+
|
| 5 |
+
1Bosch Center for Artificial Intelligence
|
| 6 |
+
Robert Bosch GmbH
|
| 7 |
+
Renningen, Germany
|
| 8 |
+
2RWTH Aachen University
|
| 9 |
+
Institute for Theoretical Information Technology
|
| 10 |
+
Aachen, Germany
|
| 11 |
+
\*Corresponding author: tim.genewein@de.bosch.com
|
| 12 |
+
|
| 13 |
+
# ABSTRACT
|
| 14 |
+
|
| 15 |
+
In this paper, the preparation of a neural network for pruning and few-bit quantization is formulated as a variational inference problem. To this end, a quantizing prior that leads to a multi-modal, sparse posterior distribution over weights, is introduced and a differentiable Kullback-Leibler divergence approximation for this prior is derived. After training with Variational Network Quantization, weights can be replaced by deterministic quantization values with small to negligible loss of task accuracy (including pruning by setting weights to 0). The method does not require fine-tuning after quantization. Results are shown for ternary quantization on LeNet-5 (MNIST) and DenseNet (CIFAR-10).
|
| 16 |
+
|
| 17 |
+
# 1 INTRODUCTION
|
| 18 |
+
|
| 19 |
+
Parameters of a trained neural network commonly exhibit high degrees of redundancy (Denil et al., 2013) which implies an over-parametrization of the network. Network compression methods implicitly or explicitly aim at the systematic reduction of redundancy in neural network models while at the same time retaining a high level of task accuracy. Besides architectural approaches, such as SqueezeNet (Iandola et al., 2016) or MobileNets (Howard et al., 2017), many compression methods perform some form of pruning or quantization. Pruning is the removal of irrelevant units (weights, neurons or convolutional filters) (LeCun et al., 1990). Relevance of weights is often determined by the absolute value (“magnitude based pruning” (Han et al., 2016; 2017; Guo et al., 2016)), but more sophisticated methods have been known for decades, e.g., based on second-order derivatives (Optimal Brain Damage (LeCun et al., 1990) and Optimal Brain Surgeon (Hassibi & Stork, 1993)) or ARD (automatic relevance determination, a Bayesian framework for determining the relevance of weights, (MacKay, 1995; Neal, 1995; Karaletsos & Ratsch, 2015)). Quantization is the reduc- ¨ tion of the bit-precision of weights, activations or even gradients, which is particularly desirable from a hardware perspective (Sze et al., 2017). Methods range from fixed bit-width computation (e.g., 12-bit fixed point) to aggressive quantization such as binarization of weights and activations (Courbariaux et al., 2016; Rastegari et al., 2016; Zhou et al., 2016; Hubara et al., 2016). Few-bit quantization (2 to 6 bits) is often performed by k-means clustering of trained weights with subsequent fine-tuning of the cluster centers (Han et al., 2016). Pruning and quantization methods have been shown to work well in conjunction (Han et al., 2016). In so-called “ternary” networks, weights can have one out of three possible values (negative, zero or positive) which also allows for simultaneous pruning and few-bit quantization (Li et al., 2016; Zhu et al., 2016).
|
| 20 |
+
|
| 21 |
+
This work is closely related to some recent Bayesian methods for network compression (Ullrich et al., 2017; Molchanov et al., 2017; Louizos et al., 2017; Neklyudov et al., 2017) that learn a posterior distribution over network weights under a sparsity-inducing prior. The posterior distribution over network parameters allows identifying redundancies through three means: weights with (1) an expected value very close to zero and (2) weights with a large variance can be pruned as they do not contribute much to the overall computation. (3) the posterior variance over non-pruned parameters can be used to determine the required bit-precision (quantization noise can be made as large as implied by the posterior uncertainty). Additionally, Bayesian inference over modelparameters is known to automatically reduce parameter redundancy by penalizing overly complex models (MacKay, 2003).
|
| 22 |
+
|
| 23 |
+
In this paper we present Variational Network Quantization (VNQ), a Bayesian network compression method for simultaneous pruning and few-bit quantization of weights. We extend previous Bayesian pruning methods by introducing a multi-modal quantizing prior that penalizes weights of low variance unless they lie close to one of the target values for quantization. As a result, weights are either drawn to one of the quantization target values or they are assigned large variance values—see Fig. 1. After training, our method yields a Bayesian neural network with a multi-modal posterior over weights (typically with one mode fixed at 0), which is the basis for subsequent pruning and quantization. Additionally, posterior uncertainties can also be interesting for network introspection and analysis, as well as for obtaining uncertainty estimates over network predictions (Gal & Ghahramani, 2015; Gal, 2016; Depeweg et al., 2016; 2017). After pruning and hard quantization, and without the need for additional fine-tuning, our method yields a deterministic feed-forward neural network with heavily quantized weights. Our method is applicable to pre-trained networks but can also be used for training from scratch. Target values for quantization can either be manually fixed or they can be learned during training. We demonstrate our method for the case of ternary quantization on LeNet-5 (MNIST) and DenseNet (CIFAR-10).
|
| 24 |
+
|
| 25 |
+

|
| 26 |
+
|
| 27 |
+

|
| 28 |
+
(b) Soft-quantized network after VNQ training. Weights tightly cluster around the quantization target values.
|
| 29 |
+
|
| 30 |
+
(a) Pre-trained network. No obvious clusters are visible in the network trained without VNQ. No regularization was used during pre-training.
|
| 31 |
+
|
| 32 |
+
Figure 1: Distribution of weights (means $\theta$ and log-variance $\log \sigma ^ { 2 } ,$ ) before and after VNQ training of LeNet-5 on MNIST (validation accuracy before: $9 9 . 2 \%$ vs. after 195 epochs: $9 9 . 3 \%$ ). Top row: scatter plot of weights (blue dots) per layer. Means were initialized from pre-trained deterministic network, variances with $\log \sigma ^ { 2 } = - 8$ . Bottom row: corresponding density1. Red shaded areas show the funnel-shaped “basins of attraction” induced by the quantizing prior. Positive and negative target values for ternary quantization have been learned per layer. After training, weights with small expected absolute value or large variance $( \log \alpha _ { i j } \ge \log T _ { \alpha } = 2$ corresponding to the funnel marked by the red dotted line) are pruned and remaining weights are quantized without loss in accuracy.
|
| 33 |
+
|
| 34 |
+
# 2 PRELIMINARIES
|
| 35 |
+
|
| 36 |
+
Our method extends recent work that uses a (variational) Bayesian objective for neural network pruning (Molchanov et al., 2017). In this section, we first motivate such an approach by discussing that the objectives of compression (in the minimum-description-length sense) and Bayesian inference are well-aligned. We then briefly review the core ingredients that are combined in Sparse Variational Dropout (Molchanov et al., 2017). The final idea (and also the starting point of our method) is to learn dropout noise levels per weight and prune weights with large dropout noise. Learning dropout noise per weight can be done by interpreting dropout training as variational inference of an approximate weight-posterior under a sparsity inducing prior - this is known as Variational Dropout which is described in more detail below, after a brief introduction to modern approximate posterior inference in Bayesian neural networks by optimizing the evidence lower bound via stochastic gradient ascent and reparameterization tricks.
|
| 37 |
+
|
| 38 |
+
# 2.1 WHY BAYES FOR COMPRESSION?
|
| 39 |
+
|
| 40 |
+
Bayesian inference over model parameters automatically penalizes overly complex parametric models, leading to an automatic regularization effect (Grunwald, 2007; Graves, 2011) (see Molchanov ¨ et al. (2017), where the authors show that Sparse Variational Dropout (Sparse VD) successfully prevents a network from fitting unstructured data, that is a random labeling). The automatic regularization is based on the objective of maximizing model evidence, also know as marginal likelihood. A very complex model might have a particular parameter setting that achieves extremely good likelihood given the data, however, since the model evidence is obtained via marginalizing parameters, overly complex models are penalized for having many parameter settings with poor likelihood. This effect is also known as “Bayesian Occams Razor” in Bayesian model selection (MacKay, 2003; Genewein & Braun, 2014). The argument can be extended to variational Bayesian inference (with some caveats) via the equivalence of the variational Bayesian objective and the Minimum description length (MDL) principle (Rissanen, 1978; Grunwald, 2007; Graves, 2011; Louizos et al., 2017).¨ The evidence lower bound (ELBO), which is maximized in variational inference, is composed of two terms: $\mathcal { L } ^ { E }$ , the average message length required to transmit outputs (labels) to a receiver that knows the inputs and the posterior over model parameters and $\mathcal { L } ^ { C }$ , the average message length to transmit the posterior parameters to a receiver that knows the prior over parameters:
|
| 41 |
+
|
| 42 |
+
$$
|
| 43 |
+
\begin{array} { r l } { \mathcal { L } ^ { \mathrm { E L B O } } = \underbrace { \mathrm { n e g . r e c o n s t r . \ e r r o r } } _ { - \mathcal { L } ^ { E } } } & { + \underbrace { \mathrm { n e g . \ K L \ d i v e r g e n c e } } _ { - \mathcal { L } ^ { C } = \mathrm { e n t r o p y - c r o s s \ e n t r o p y } } } \end{array}
|
| 44 |
+
$$
|
| 45 |
+
|
| 46 |
+
Maximizing the ELBO minimizes the total message length: max $\mathcal { L } ^ { \mathrm { E L B O } } = \operatorname* { m i n } \mathcal { L } ^ { E } + \mathcal { L } ^ { C }$ , leading to an optimal trade-off between short description length of the data and the model (thus, minimizing the sum of error cost $\mathcal { L } ^ { E }$ and model complexity cost $\mathcal { L } ^ { C }$ ). Interestingly, MDL dictates the use of stochastic models since they are in general “more compressible” compared to deterministic models: high posterior uncertainty over parameters is rewarded by the entropy term in $\mathcal { L } ^ { C }$ —higher uncertainty allows the quantization noise to be higher, thus, requiring lower bit-precision for a parameter. Variational Bayesian inference can also be formally related to the information-theoretic framework for lossy compression, rate-distortion theory, (Cover & Thomas, 2006; Tishby et al., 2000; Genewein et al., 2015). The only difference is that rate-distortion requires the use of the optimal prior, which is the marginal over posteriors (Hoffman & Johnson, 2016; Tomczak & Welling, 2017; Hoffman et al., 2017) - providing an interesting connection to empirical Bayes where the prior is learned from the data.
|
| 47 |
+
|
| 48 |
+
# 2.2 VARIATIONAL BAYES AND REPARAMETERIZATION
|
| 49 |
+
|
| 50 |
+
Let $\mathcal { D }$ be a dataset of $N$ pairs $( x _ { n } , y _ { n } ) _ { n = 1 } ^ { N }$ and $p ( \boldsymbol { y } | \boldsymbol { x } , \boldsymbol { w } )$ be a parameterized model that predicts outputs $y$ given inputs $x$ and parameters $w$ . A Bayesian neural network models a (posterior) distribution over parameters $w$ instead of just a point-estimate. The posterior is given by Bayes’ rule: $p ( w | \mathcal { D } ) = p ( \bar { \mathcal { D } } | w ) p ( w ) / p ( \mathcal { D } )$ , where $p ( w )$ is the prior over parameters. Computation of the true posterior is in general intractable. Common approaches to approximate inference in neural networks are for instance: MCMC methods pioneered in (Neal, 1995) and later refined, e.g., via stochastic gradient Langevin dynamics (Welling & Teh, 2011), or variational approximations to the true posterior (Graves, 2011), Bayes by Backprop (Blundell et al., 2015), Expectation Backpropagation (Soudry et al., 2014), Probabilistic Backpropagation (Hernandez-Lobato & Adams, 2015). In the ´ latter methods the true posterior is approximated by a parameterized distribution $q _ { \phi } ( w )$ . Variational parameters $\phi$ are optimized by minimizing the Kullback-Leibler (KL) divergence from the true to the approximate posterior $D _ { \mathrm { K L } } ( q _ { \phi } ( w ) | | p ( w | \mathcal { D } ) )$ . Since computation of the true posterior is intractable, minimizing this KL divergence is approximately performed by maximizing the so-called “evidence lower bound” (ELBO) or “negative variational free energy” (Kingma & Welling, 2014):
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
\mathcal { L } ^ { \mathrm { E L B O } } ( \phi ) = \underbrace { \sum _ { n = 1 } ^ { N } \mathbb { E } _ { q _ { \phi } ( w ) } [ \log p ( y _ { n } | x _ { n } , w ) ] } _ { \mathrm { ~ } } - D _ { \mathrm { K L } } ( q _ { \phi } ( w ) | | p ( w ) ) ,
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
\simeq \mathcal { L } ^ { \mathrm { S G V B } } ( \phi ) = \frac { N } { M } \sum _ { m = 1 } ^ { M } \log p ( \tilde { y } _ { m } | \tilde { x } _ { m } , f ( \phi , \epsilon _ { m } ) ) - D _ { \mathrm { K L } } ( q _ { \phi } ( w ) | | p ( w ) ) ,
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
where we have used the Reparameterization $T r i c k ^ { 2 }$ (Kingma & Welling, 2014) in Eq. (2) to get an unbiased, differentiable, minibatch-based Monte Carlo estimator of the expected log likelihood $L _ { \mathcal { D } } ( \phi )$ . A mini-batch of data is denoted by $( \tilde { x } _ { m } , \tilde { y } _ { m } ) _ { m = 1 } ^ { M }$ . Additionally, and in line with similar work (Molchanov et al., 2017; Louizos et al., 2017; Neklyudov et al., 2017), we use the Local Reparameterization Trick (Kingma et al., 2015) to further reduce variance of the stochastic ELBO gradient estimator, which locally marginalizes weights at each layer and instead samples directly from the distribution over pre-activations (which can be computed analytically). See Appendix A.2 for more details on the Local reparameterization. Commonly, the prior $p ( w )$ and the parametric form of the posterior $q _ { \phi } ( w )$ are chosen such that the KL divergence term can be computed analytically (e.g. a fully factorized Gaussian prior and posterior, known as the mean-field approximation). Due to the particular choice of prior in our work, a closed-form expression for the KL divergence cannot be obtained but instead we use a differentiable approximation (see Sec. 3.3).
|
| 61 |
+
|
| 62 |
+
# 2.3 VARIATIONAL INFERENCE VIA DROPOUT TRAINING
|
| 63 |
+
|
| 64 |
+
Dropout (Srivastava et al., 2014) is a method originally introduced for regularization of neural networks, where activations are stochastically dropped (i.e., set to zero) with a certain probability $p$ during training. It was shown that dropout, i.e., multiplicative noise on inputs, is equivalent to having noisy weights and vice versa (Wang $\&$ Manning, 2013; Kingma et al., 2015). Multiplicative Gaussian noise $\begin{array} { r } { \xi _ { i j } \sim \mathcal { N } ( 1 , \alpha = \frac { p } { 1 - p } ) } \end{array}$ on a weight $w _ { i j }$ induces a Gaussian distribution
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
w _ { i j } = \theta _ { i j } \xi _ { i j } = \theta _ { i j } ( 1 + \sqrt { \alpha } \epsilon _ { i j } ) \sim \mathcal { N } ( \theta _ { i j } , \alpha \theta _ { i j } ^ { 2 } )
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
with $\epsilon _ { i j } \sim \mathcal { N } ( 0 , 1 )$ . In standard (Gaussian) dropout training, the dropout rates $\alpha$ (or $p$ to be precise) are fixed and the expected log likelihood $L _ { \mathcal { D } } ( \phi )$ (first term in Eq. (1)) is maximized with respect to the means $\theta$ . Kingma et al. (2015) show that Gaussian dropout training is mathematically equivalent to maximizing the ELBO (both terms in Eq. (1)), under a prior $p ( w )$ and fixed $\alpha$ where the KL term does not depend on $\theta$ :
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
\mathcal { L } ( \alpha , \theta ) = \mathbb { E } _ { q _ { \alpha } } [ L _ { \mathcal { D } } ( \theta ) ] - D _ { \mathrm { K L } } ( q _ { \alpha } ( w ) | | p ( w ) ) ,
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where the dependencies on $\alpha$ and $\theta$ of the terms in Eq. (1) have been made explicit. The only prior that meets this requirement is the scale invariant log-uniform prior:
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
p ( \log | w _ { i j } | ) = \mathrm { { \ c o n s t . } } \Leftrightarrow p ( | w _ { i j } | ) \propto \frac { 1 } { | w _ { i j } | } .
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
Using this interpretation, it becomes straightforward to learn individual dropout-rates $\alpha _ { i j }$ per weight, by including $\alpha _ { i j }$ into the set of variational parameters $\phi = ( \theta , \alpha )$ . This procedure was introduced in (Kingma et al., 2015) under the name “Variational Dropout”. With the choice of a log-uniform prior (Eq. (5)) and a factorized Gaussian approximate posterior $q _ { \phi } ( w _ { i j } ) = N ( \theta _ { i j } , \alpha _ { i j } \theta _ { i j } ^ { 2 } )$ (Eq. (3)) the KL term in Eq. (1) is not analytically tractable, but the authors of Kingma et al. (2015) present an approximation
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
- D _ { \mathrm { K L } } ( q _ { \phi } ( w _ { i j } ) | | p ( w _ { i j } ) ) \approx \mathrm { c o n s t . } + 0 . 5 \log \alpha _ { i j } + c _ { 1 } \alpha _ { i j } + c _ { 2 } \alpha _ { i j } ^ { 2 } + c _ { 3 } \alpha _ { i j } ^ { 3 } ,
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
see the original publication for numerical values of $c _ { 1 } , c _ { 2 } , c _ { 3 }$ . Note that due to the mean-field approximation, where the posterior over all weights factorizes into a product over individual weights $\bar { q } _ { \phi } ( w ) ~ = ~ \prod q _ { \phi } ( w _ { i j } )$ , the KL divergence factorizes into a sum of individual KL divergences $\begin{array} { r } { \tilde { D } _ { \mathrm { K L } } ( q _ { \phi } ( w ) | \bar { | } p ( w ) ) = \sum D _ { \mathrm { K L } } ( q _ { \phi } ( w _ { i j } ) | | p ( w _ { i j } ) ) } \end{array}$ .
|
| 89 |
+
|
| 90 |
+
# 2.4 PRUNING UNITS WITH LARGE DROPOUT RATES
|
| 91 |
+
|
| 92 |
+
Learning dropout rates is interesting for network compression since neurons or weights with very high dropout rates $p 1$ can very likely be pruned without loss in accuracy. However, as the authors of Sparse Variational Dropout (sparse VD) (Molchanov et al., 2017) report, the approximation in Eq. (6) is only accurate for $\alpha \leq 1$ (corresponding to $p \leq 0 . 5$ ). For this reason, the original variational dropout paper restricted $\alpha$ to values smaller or equal to 1, which are unsuitable for pruning. Molchanov et al. (2017) propose an improved approximation, which is very accurate on the full range of $\log \alpha$ :
|
| 93 |
+
|
| 94 |
+
$- D _ { \mathrm { K L } } ( q _ { \phi } ( w _ { i j } ) | | p ( w _ { i j } ) ) \approx \mathrm { c o n s t . } + k _ { 1 } S ( k _ { 2 } + k _ { 3 } \log \alpha _ { i j } ) - 0 . 5 \log ( 1 + \alpha _ { i j } ^ { - 1 } ) = F _ { \mathrm { K L , L U } } ( \theta _ { i j } , \sigma _ { i j } ) ,$ (7)
|
| 95 |
+
|
| 96 |
+
with $k _ { 1 } = 0 . 6 3 5 7 6$ , $k _ { 2 } = 1 . 8 7 3 2 0$ and $k _ { 3 } = 1 . 4 8 6 9 5$ and $S$ denoting the sigmoid function. Additionally, the authors propose to use an additive, instead of a multiplicative noise reparameterization, which significantly reduces variance in the gradient $\frac { \partial \mathcal { L } ^ { \mathrm { S G V B } } } { \partial \theta _ { i j } }$ for large $\alpha _ { i j }$ . To achieve this, the multiplicative noise term is replaced by an exactly equivalent additive noise term $\sigma _ { i j } \epsilon _ { i j }$ with $\sigma _ { i j } ^ { 2 } = \alpha _ { i j } \theta _ { i j } ^ { 2 }$ and the set of variational parameters becomes $\phi = ( \theta , \sigma )$ :
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
w _ { i j } = \theta _ { i j } \underbrace { ( 1 + \sqrt { \alpha } \epsilon _ { i j } ) } _ { \mathrm { m u l t . n o i s e } } = \theta _ { i j } \underbrace { + \sigma _ { i j } \epsilon _ { i j } } _ { \mathrm { a d d . n o i s e } } \sim \mathcal { N } ( \theta _ { i j } , \sigma _ { i j } ^ { 2 } ) , \epsilon _ { i j } \sim \mathcal { N } ( 0 , 1 ) .
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
After Sparse VD training, pruning is performed by thresholding $\begin{array} { r } { \alpha _ { i j } = \frac { \sigma _ { i j } ^ { 2 } } { \theta _ { i j } ^ { 2 } } } \end{array}$ . In Molchanov et al. (2017) a threshold of $\log \alpha = 3$ is used, which roughly corresponds to $p > 0 . 9 5$ . Pruning weights that lie above a threshold of $T _ { \alpha }$ leads to
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
\frac { \sigma _ { i j } ^ { 2 } } { \theta _ { i j } ^ { 2 } } \geq T _ { \alpha } \Leftrightarrow \sigma _ { i j } ^ { 2 } \geq T _ { \alpha } \theta _ { i j } ^ { 2 } ,
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
which means effectively that weights with large variance but also weights of lower variance and a mean $\theta _ { i j }$ close to zero are pruned. A visualization of the pruning threshold can be seen in Fig. 1 (the “central funnel”, i.e., the area marked by the red dotted lines for a threshold for $T _ { \alpha } = 2$ ). Sparse VD training can be performed from random initialization or with pre-trained networks by initializing the means $\theta _ { i j }$ accordingly. In Bayesian Compression (Louizos et al., 2017) and Structured Bayesian Pruning (Neklyudov et al., 2017), Sparse VD has been extended to include group-sparsity constraints, which allows for pruning of whole neurons or convolutional filters (via learning their corresponding dropout rates).
|
| 109 |
+
|
| 110 |
+
# 2.5 SPARSITY INDUCING PRIORS
|
| 111 |
+
|
| 112 |
+
For pruning weights based on their (learned) dropout rate, it is desirable to have high dropout rates for most weights. Perhaps surprisingly, Variational Dropout already implicitly introduces such a “high dropout rate constraint” via the implicit prior distribution over weights. The prior $p ( w )$ can be used to induce sparsity into the posterior by having high density at zero and heavy tails. There is a well known family of such distributions: scale-mixtures of normals (Andrews & Mallows, 1974; Louizos et al., 2017; Ingraham & Marks, 2017):
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
w \sim { \mathcal { N } } ( 0 , z ^ { 2 } ) ; \quad z \sim p ( z ) ,
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
where the scales of $w$ are random variables. A well-known example is the spike-and-slab prior (Mitchell & Beauchamp, 1988), which has a delta-spike at zero and a slab over the real line. Gal & Ghahramani (2015); Kingma et al. (2015) show how Dropout training implies a spike-and-slab prior over weights. The log uniform prior used in Sparse VD (Eq. (5)) can also be derived as a marginalized scale-mixture of normals
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
p ( w _ { i j } ) \propto \int \frac { 1 } { | z _ { i j } | } { \cal N } ( w _ { i j } | 0 , z _ { i j } ^ { 2 } ) \mathrm { d } z _ { i j } = \frac { 1 } { | w _ { i j } | } ; \quad p ( z _ { i j } ) \propto \frac { 1 } { | z _ { i j } | } ,
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
also known as the normal-Jeffreys prior (Figueiredo, 2002). Louizos et al. (2017) discuss how the log-uniform prior can be seen as a continuous relaxation of the spike-and-slab prior and how the alternative formulation through the normal-Jeffreys distribution can be used to couple the scales of weights that belong together and thus, learn dropout rates for whole neurons or convolutional filters, which is the basis for Bayesian Compression (Louizos et al., 2017) and Structured Bayesian Pruning (Neklyudov et al., 2017).
|
| 125 |
+
|
| 126 |
+
# 3 VARIATIONAL NETWORK QUANTIZATION
|
| 127 |
+
|
| 128 |
+
We formulate the preparation of a neural network for a post-training quantization step as a variational inference problem. To this end, we introduce a multi-modal, quantizing prior and train by maximizing the ELBO (Eq. (2)) under a mean-field approximation of the posterior (i.e., a fully factorized Gaussian). The goal of our algorithm is to achieve soft quantization, that is learning a posterior distribution such that the accuracy-loss introduced by post-training quantization is small. Our variational posterior approximation and training procedure is similar to Kingma et al. (2015) and Molchanov et al. (2017) with the crucial difference of using a quantizing prior that drives weights towards the target values for quantization.
|
| 129 |
+
|
| 130 |
+
# 3.1 A QUANTIZING PRIOR
|
| 131 |
+
|
| 132 |
+
The log uniform prior (Eq. (5)) can be viewed as a continuous relaxation of the spike-and-slab prior with a spike at location 0 (Louizos et al., 2017). We use this insight to formulate a quantizing prior, a continuous relaxation of a “multi-spike-and-slab” prior which has multiple spikes at locations $c _ { k }$ , $k \in \{ 1 , \ldots , K \}$ . Each spike location corresponds to one target value for subsequent quantization. The quantizing prior allows weights of low variance only at the locations of the quantization target values $c _ { k }$ . The effect of using such a quantizing prior during Variational Network Quantization is shown in Fig. 1. After training, most weights of low variance are distributed very closely around the quantization target values $c _ { k }$ and can thus be replaced by the corresponding value without significant loss in accuracy. We typically fix one of the quantization targets to zero, e.g., $c _ { 2 } = 0$ , which allows pruning weights. Additionally, weights with a large variance can also be pruned. Both kinds of pruning can be achieved with an $\alpha _ { i j }$ threshold (see Eq. (9)) as in sparse Variational Dropout (Molchanov et al., 2017). Following the interpretation of the log uniform prior $p ( w _ { i j } )$ as a marginal over the scale-hyperparameter $z _ { i j }$ , we extend Eq. (10) with a hyper-prior over locations
|
| 133 |
+
|
| 134 |
+
$$
|
| 135 |
+
p ( w _ { i j } ) = \int \mathcal { N } ( w _ { i j } | m _ { i j } , z _ { i j } ) p _ { z } ( z _ { i j } ) p _ { m } ( m _ { i j } ) \mathrm { d } z _ { i j } \mathrm { d } m _ { i j } \qquad p _ { m } ( m _ { i j } ) = \sum _ { k } a _ { k } \delta ( m _ { i j } - c _ { k } ) ,
|
| 136 |
+
$$
|
| 137 |
+
|
| 138 |
+
with $p ( z _ { i j } ) \propto | z _ { i j } | ^ { - 1 }$ . The location prior $p _ { m } ( m _ { i j } )$ is a mixture of weighted delta distributions located at the quantization values $c _ { k }$ . Marginalizing over $m$ yields the quantizing prior
|
| 139 |
+
|
| 140 |
+
$$
|
| 141 |
+
p ( w _ { i j } ) \propto \sum _ { k } a _ { k } \int \frac { 1 } { | z _ { i j } | } { \mathcal { N } } ( w _ { i j } | c _ { k } , z _ { i j } ) \mathrm { d } z _ { i j } = \sum _ { k } a _ { k } \frac { 1 } { | w _ { i j } - c _ { k } | } .
|
| 142 |
+
$$
|
| 143 |
+
|
| 144 |
+
In our experiments, we use $K = 3$ , $a _ { k } = 1 / K ~ \forall k$ and $c _ { 2 } = 0$ unless indicated otherwise.
|
| 145 |
+
|
| 146 |
+
# 3.2 POST-TRAINING QUANTIZATION
|
| 147 |
+
|
| 148 |
+
Eq. (9) implies that using a threshold on $\alpha _ { i j }$ as a pruning criterion is equivalent to pruning weights whose value does not differ significantly from zero:
|
| 149 |
+
|
| 150 |
+
$$
|
| 151 |
+
\theta _ { i j } ^ { 2 } \leq \frac { \sigma _ { i j } ^ { 2 } } { T _ { \alpha } } \quad \Longleftrightarrow \quad \theta _ { i j } \in ( - \frac { \sigma _ { i j } } { \sqrt { T _ { \alpha } } } , \frac { \sigma _ { i j } } { \sqrt { T _ { \alpha } } } ) .
|
| 152 |
+
$$
|
| 153 |
+
|
| 154 |
+
To be precise, $T _ { \alpha }$ specifies the width of a scaled standard-deviation band $\pm \sigma _ { i j } / \sqrt { T _ { \alpha } }$ around the mean $\theta _ { i j }$ . If the value zero lies within this band, the weight is assigned the value 0. For instance, a pruning threshold which implies $p \geq 0 . 9 5$ corresponds to a variance band of approximately $\sigma _ { i j } / 4$ . An equivalent interpretation is that a weight is pruned if the likelihood for the value 0 under the approximate posterior exceeds the threshold given by the standard-deviation band (Eq. (13)):
|
| 155 |
+
|
| 156 |
+
$$
|
| 157 |
+
\mathcal { N } ( 0 | \theta _ { i j } , \sigma _ { i j } ^ { 2 } ) \geq \mathcal { N } ( \theta _ { i j } \pm \frac { \sigma _ { i j } } { \sqrt { T _ { \alpha } } } | \theta _ { i j } , \sigma _ { i j } ^ { 2 } ) = \frac { 1 } { \sqrt { 2 \pi } \sigma _ { i j } } e ^ { - \frac { 1 } { 2 T _ { \alpha } } } .
|
| 158 |
+
$$
|
| 159 |
+
|
| 160 |
+
Extending this argument for pruning weights to a quantization setting, we design a post-training quantization scheme that assigns each weight the quantized value $c _ { k }$ with the highest likelihood under the approximate posterior. Since variational posteriors over weights are Gaussian, this translates into minimizing the squared distance between the mean $\theta _ { i j }$ and the quantized values $c _ { k }$ :
|
| 161 |
+
|
| 162 |
+
$$
|
| 163 |
+
\arg \operatorname* { m a x } _ { k } \mathcal { N } ( c _ { k } | \theta _ { i j } , \sigma _ { i j } ^ { 2 } ) = \arg \operatorname* { m a x } _ { k } e ^ { - \frac { ( c _ { k } - \theta _ { i j } ) ^ { 2 } } { 2 \sigma _ { i j } ^ { 2 } } } = \arg \operatorname* { m i n } _ { k } ( c _ { k } - \theta _ { i j } ) ^ { 2 } .
|
| 164 |
+
$$
|
| 165 |
+
|
| 166 |
+
Additionally, the pruning rate can be increased by first assigning a hard 0 to all weights that exceed the pruning threshold $T _ { \alpha }$ (see Eq. (9)) before performing the assignment to quantization levels as described above.
|
| 167 |
+
|
| 168 |
+
# 3.3 KL DIVERGENCE APPROXIMATION
|
| 169 |
+
|
| 170 |
+
Under the quantizing prior (Eq. (12)) the KL divergence from the prior $D _ { \mathrm { K L } } ( q _ { \phi } ( w ) | | p ( w ) )$ to the mean-field posterior is analytically intractable. Similar to Kingma et al. (2015); Molchanov et al. (2017), we use a differentiable approximation $F _ { \mathrm { K L } } ( \theta , \sigma , c ) ^ { 3 }$ , composed of a small number of differentiable functions to keep the computational effort low during training. We now present the approximation for a reference codebook $c = [ - r , 0 , r ] , r = 0 . 2$ , however later we show how the approximation can be used for arbitrary ternary, symmetric codebooks as well. The basis of our approximation is the approximation $F _ { \mathrm { K L , L U } }$ introduced by Molchanov et al. (2017) for the KL divergence from a log uniform prior to a Gaussian posterior (see Eq. (7)) which is centered around zero. We observe that a weighted mixture of shifted versions of $F _ { \mathrm { K L , L U } }$ can be used to approximate the KL divergence for our multi-modal quantizing prior (Eq. (12)) (which is composed of shifted versions of the log uniform prior). In a nutshell, we shift one version of $F _ { \mathrm { K L } }$ to each codebook entry $c _ { k }$ and then use $\theta$ -dependent Gaussian windowing functions $\Omega ( \theta )$ to mix the shifted approximations (see more details in the Appendix A.3). The approximation for the KL divergence from our multi-modal quantizing prior to a Gaussian posterior is given as
|
| 171 |
+
|
| 172 |
+
$$
|
| 173 |
+
{ \cal F } _ { \mathrm { K L } } ( \theta , \sigma , c ) = \sum _ { { k : c _ { k } \neq 0 } \atop \mathrm { ~ e l o s } \scriptscriptstyle \mathrm { ~ \left[ \sqrt { ~ \theta ~ - ~ } c _ { k } \right] ~ } } \Omega ( \theta - c _ { k } ) \mathrm { { F } } _ { \mathrm { K L , L U } } ( \theta - c _ { k } , \sigma ) + \underbrace { \Omega _ { 0 } ( \theta ) \mathrm { { F } } _ { \mathrm { K L , L U } } ( \theta , \sigma ) } _ { \mathrm { ~ e l o h ~ s l e n ~ i n ~ \left[ \sqrt { ~ \theta ~ - ~ } c _ { k } \right] ~ } }
|
| 174 |
+
$$
|
| 175 |
+
|
| 176 |
+
with
|
| 177 |
+
|
| 178 |
+
$$
|
| 179 |
+
\Omega ( \theta ) = \exp ( - \frac { 1 } { 2 } \frac { \theta ^ { 2 } } { \tau ^ { 2 } } ) \qquad \Omega _ { 0 } ( \theta ) = 1 - \sum _ { k : c _ { k } \neq 0 } \Omega ( \theta - c _ { k } ) .
|
| 180 |
+
$$
|
| 181 |
+
|
| 182 |
+
We use $\tau = 0 . 0 7 5$ in our experiments. Illustrations of the approximation, including a comparison against the ground-truth computed via Monte Carlo sampling are shown in Fig. 2. Over the range of $\theta \cdot$ and $\sigma$ -values relevant to our method, the maximum absolute deviation from the ground-truth is 1.07 nats. See Fig. 4 in the Appendix for a more detailed quantitative evaluation of our approximation.
|
| 183 |
+
|
| 184 |
+
This $\mathrm { K L }$ approximation in Eq. (16), developed for the reference codebook $c _ { r } = [ - r , 0 , r ]$ , can be reused for any symmetric ternary codebook $c _ { a } = [ - a , 0 , a ]$ , $a \in \mathbb { R } ^ { + }$ , since $c _ { a }$ can be represented with the reference codebook and a positive scaling factor $s$ , $c _ { a } ~ = ~ s c _ { r }$ , $s ~ = ~ a / r$ . As derived in the Appendix (A.4), this re-scaling translates into a multiplicative re-scaling of the variational parameters $\theta$ and $\sigma$ . The KL divergence from a prior based on the codebook $c _ { a }$ to the posterior $q _ { \phi } ( w )$ is thus given by $D _ { K L } ( q _ { \phi } ( w ) \bar { | } | p _ { c _ { a } } ( w ) ) \approx \bar { F _ { \mathrm { K L } } } ( \theta / s , \sigma / s , c _ { r } )$ . This result allows learning the quantization level $a$ during training as well.
|
| 185 |
+
|
| 186 |
+
# 4 EXPERIMENTS
|
| 187 |
+
|
| 188 |
+
In our experiments, we train with VNQ and then first prune via thresholding $\log \alpha _ { i j } \geq \log T _ { \alpha } = 2$ . Remaining weights are then quantized by minimizing the squared distance to the quantization values $c _ { k }$ (see Sec. 3.2). We use warm-up (Sønderby et al., 2016), that is, we multiply the KL divergence term (Eq. (2)) with a factor $\beta$ , where $\beta = 0$ during the first few epochs and then linearly ramp up to $\beta = 1$ . To improve stability of VNQ training, we ensure through clipping that $\log \sigma _ { i j } ^ { 2 ^ { - } } \in ( \bar { - } 1 \bar { 0 } , 1 )$ and $\theta _ { i j } \in ( - a - 0 . 3 6 7 9 \sigma , a + 0 . 3 6 7 9 \sigma )$ (which corresponds to a shifted $\log \alpha$ threshold of 2, that is, we clip $\theta _ { i j }$ if it lies left of the $- a$ funnel or right of the $+ a$ funnel, compare Fig. 1). This leads to a clipping-boundary that depends on trainable parameters. To avoid weights getting stuck at these boundaries, we use gradient-stopping, that is, we apply the gradient to a so-called “shadow weight” and use the clipped weight-value only for the forward pass. Without this procedure our method still works, but accuracies are a bit worse, particularly on CIFAR-10. When learning codebook values $a$ during training, we use a lower learning rate for adjusting the codebook, otherwise we observe a tendency for codebook values to collapse in early stages of training (a similar observation was made by Ullrich et al. (2017)). Additionally, we ensure $a \ge 0 . 0 5$ by clipping.
|
| 189 |
+
|
| 190 |
+

|
| 191 |
+
Figure 2: Approximation to the analytically intractable KL divergence $D _ { \mathrm { K L } } ( q _ { \phi } | | p )$ , constructed by shifting and mixing known approximations to the KL divergence from a log uniform prior to the posterior. Top row: Shifted versions of the known approximation (Eq. (7)) in color and the ground truth KL approximation (computed via Monte Carlo sampling) $\mathrm { D } _ { \mathrm { K L } } ^ { \mathrm { M C } } ( q _ { \phi } | | p )$ in black. Middle row: weighting functions $\Omega ( \theta )$ that mix the shifted known approximation to form the final approximation $F _ { \mathrm { K L } }$ shown in the bottom row (gold), compared against the ground-truth (MC sampled). Each column corresponds to a different value of $\sigma$ . A comparison between ground-truth and our approximation over a large range of $\sigma$ and $\theta$ values is shown in the Appendix in Fig. 4. Note that since the priors are improper, KL approximation and ground-truth can only be compared up to an additive constant $C$ - the constant is irrelevant for network training but has been chosen in the plot such that ground-truth and approximation align for large values of $\theta$ .
|
| 192 |
+
|
| 193 |
+
# 4.1 LENET-5 ON MNIST
|
| 194 |
+
|
| 195 |
+
We demonstrate our method with LeNet- ${ \cdot } 5 ^ { 4 }$ (LeCun et al., 1998) on the MNIST handwritten digits dataset. Images are pre-processed by subtracting the mean and dividing by the standard-deviation over the training set. For the pre-trained network we run 5 epochs on a randomly initialized network (Glorot initialization, Adam optimizer), which leads to a validation accuracy of $9 9 . 2 \%$ . We initialize means $\theta$ with the pre-trained weights and variances with $\log \sigma ^ { 2 } = - 8$ . The warm-up factor $\beta$ is linearly increased from 0 to 1 during the first 15 epochs. VNQ training runs for a total of 195 epochs with a batch-size of 128, the learning rate is linearly decreased from 0.001 to 0 and the learning rate for adjusting the codebook parameter $a$ uses a learning rate that is 100 times lower. We initialize with $a = 0 . 2$ . Results are shown in Table 1, a visualization of the distribution over weights after VNQ training is shown in Fig. 1.
|
| 196 |
+
|
| 197 |
+
We find that VNQ training sufficiently prepares a network for pruning and quantization with negligible loss in accuracy and without requiring subsequent fine-tuning. Training from scratch yields a similar performance compared to initializing with a pre-trained network, with a slightly higher pruning rate. Compared to pruning methods that do not consider few-bit quantization in their objective, we achieve significantly lower pruning rates. This is an interesting observation since our method is based on a similar objective (e.g., compared to Sparse VD) but with the addition of forcing nonpruned weights to tightly cluster around the quantization levels. Few-bit quantization severely limits network capacity. Perhaps this capacity limitation must be countered by pruning fewer weights. Our pruning rates are roughly in line with other papers on ternary quantization, e.g., Zhu et al. (2016), who report sparsity levels between $3 0 \%$ and $5 0 \%$ with their ternary quantization method. Note that
|
| 198 |
+
|
| 199 |
+
Table 1: Results on LeNet-5 (MNIST), showing validation error, percentage of non-pruned weights and bit-precision per parameter. Original is our pre-trained LeNet-5. We show results after VNQ training (without pruning and quantization, denoted by “no P&Q”) where weights were deterministically replaced by the full-precision means $\theta$ and for VNQ training with subsequent pruning and quantization (denoted by “P&Q”). “random init.” denotes training with random weight initialization (Glorot). We also show results of non-ternary or pruning-only methods (P): Deep Compression (Han et al., 2016), Soft weight-sharing (Ullrich et al., 2017), Sparse VD (Molchanov et al., 2017), Bayesian Compression (Louizos et al., 2017) and Stuctured Bayesian Pruning (Neklyudov et al., 2017).
|
| 200 |
+
|
| 201 |
+
<table><tr><td>Method</td><td>val. error [%]</td><td>[u≠0 [%] w</td><td>bits</td></tr><tr><td>Original</td><td>0.8</td><td>100</td><td>32</td></tr><tr><td>VNQ (no P&Q)</td><td>0.67</td><td>100</td><td>32</td></tr><tr><td>VNQ +P&Q</td><td>0.73</td><td>28.3</td><td>2</td></tr><tr><td>VNQ + P&Q (random init.)</td><td>0.73</td><td>17.7</td><td>2</td></tr><tr><td>Deep Compression (P&Q)</td><td>0.74</td><td>8</td><td>5-8</td></tr><tr><td>Soft weight-sharing (P&Q)</td><td>0.97</td><td>0.5</td><td>3</td></tr><tr><td>Sparse VD (P)</td><td>0.75</td><td>0.7</td><td>=</td></tr><tr><td>Bayesian Comp. (P&Q)</td><td>1.0</td><td>0.6</td><td>7-18</td></tr><tr><td>Structured BP (P)</td><td>0.86</td><td>1</td><td>1</td></tr></table>
|
| 202 |
+
|
| 203 |
+
a direct comparison between pruning, quantizing and ternarizing methods is difficult and depends on many factors such that a fair computation of the compression rate that does not implicitly favor certain methods is hardly possible within the scope of this paper. For instance, compression rates for pruning methods are typically reported under the assumption of a CSC storage format which would not fully account for the compression potential of a sparse ternary matrix. We thus choose not to report any measures for compression rates, however for the methods listed in Table 1, they can easily be found in the literature.
|
| 204 |
+
|
| 205 |
+
# 4.2 DENSENET ON CIFAR-10
|
| 206 |
+
|
| 207 |
+
Our second experiment uses a modern DenseNet (Huang et al., 2017) $k = 1 2$ , depth $L = 7 6$ , with bottlenecks) on CIFAR-10 (Krizhevsky & Hinton, 2009). We follow the CIFAR-10 settings of Huang et al. $( 2 0 1 7 ) ^ { 5 }$ . The training procedure is identical to the procedure on MNIST with the following exceptions: we use a batch-size of 64 samples, the warm-up weight $\beta$ of the KL term is 0 for the first 5 epochs and is then linearly ramped up from 0 to 1 over the next 15 epochs, the learning rate of 0.005 is kept constant for the first 50 epochs and then linearly decreased to a value of 0.003 when training stops after 150 epochs. We pre-train a deterministic DenseNet (reaching validation accuracy of $9 3 . 1 9 \%$ ) to initialize VNQ training. The codebook parameter for non-zero values $a$ is initialized with the maximum absolute value over pre-trained weights per layer. Results are shown in Table 2. A visualization of the distribution over weights after VNQ training is shown in the Appendix Fig. 3.
|
| 208 |
+
|
| 209 |
+
We generally observe lower levels of sparsity for DenseNet, compared to LeNet. This might be due to the fact that DenseNet already has an optimized architecture which removed a lot of redundant parameters from the start. In line with previous publications, we generally observed that the first and last layer of the network are most sensitive to pruning and quantization. However, in contrast to many other methods that do not quantize these layers (e.g., Zhu et al. (2016)), we find that after sufficient training, the complete network can be pruned and quantized with very little additional loss in accuracy (see Table 2). Inspecting the weight scatter-plot for the first and last layer (Appendix Fig. 3, top-left and bottom-right panel) it can be seen that some weights did not settle on one of the prior modes (the “funnels”) after VNQ training, particularly the first layer has a few such weights with very low variance. It is likely that quantizing these weights causes the additional loss in accuracy that we observe when quantizing the whole network. Without gradient stopping (i.e., applying gradients to a shadow weight at the trainable clipping boundary) we have observed that pruning and quantizing the first layer leads to a more pronounced drop in accuracy (about $3 \%$ compared to a network where the first layer is kept with full precision, not shown in results).
|
| 210 |
+
|
| 211 |
+
Table 2: Results on DenseNet (CIFAR-10), showing the error on the validation set, the percentage of non-pruned weights and the bit-precision per weight. Original denotes the pre-trained network. We show results after VNQ training without pruning and quantization (weights were deterministically replaced by the full-precision means $\theta$ ) denoted by “no P&Q”, and VNQ with subsequent pruning and quantization denoted by “P&Q” (in the condition “(w/o 1)” we use full-precision means for the weights in the first layer and do not prune and quantize this layer).
|
| 212 |
+
|
| 213 |
+
<table><tr><td>Method</td><td>val error [%]</td><td>[w≠0 [%] w</td><td>bits</td></tr><tr><td>Original</td><td>6.81</td><td>100</td><td>32</td></tr><tr><td>VNQ (no P&Q)</td><td>8.32</td><td>100</td><td>32</td></tr><tr><td>VNQ + P&Q (w/o 1)</td><td>8.78</td><td>46</td><td>2 (32)</td></tr><tr><td>VNQ + P&Q</td><td>8.83</td><td>46</td><td>2</td></tr></table>
|
| 214 |
+
|
| 215 |
+
# 5 RELATED WORK
|
| 216 |
+
|
| 217 |
+
Our method is an extension of Sparse VD (Molchanov et al., 2017), originally used for network pruning. In contrast, we use a quantizing prior, leading to a multi-modal posterior suitable for fewbit quantization and pruning. Bayesian Compression and Structured Bayesian Pruning (Louizos et al., 2017; Neklyudov et al., 2017) extend Sparse VD to prune whole neurons or filters via groupsparsity constraints. Additionally, in Bayesian Compression the required bit-precision per layer is determined via the posterior variance. In contrast to our method, Bayesian Compression does not explicitly enforce clustering of weights during training and thus requires bit-widths in the range between 5 and 18 bits. Extending our method to include group-constraints for pruning is an interesting direction for future work. Another Bayesian method for simultaneous network quantization and pruning is soft weight-sharing (SWS) (Ullrich et al., 2017), which uses a Gaussian mixture model prior (and a KL term without trainable parameters such that the KL term reduces to the prior entropy). SWS acts like a probabilistic version of $\mathbf { k }$ -means clustering with the advantage of automatic collapse of unnecessary mixture components. Similar to learning the codebooks in our method, soft weight-sharing learns the prior from the data, a technique known as empirical Bayes. We cannot directly compare against soft weight-sharing since the authors do not report results on ternary networks. Gal et al. (2017) learn dropout rates by using a continuous relaxation of dropout’s discrete masks (via the concrete distribution). The authors learn layer-wise dropout rates, which does not allow for dropout-rate-based pruning. We experimented with using the concrete distribution for learning codebooks for quantization with promising early results but so far we have observed lower pruning rates or lower accuracy compared to VNQ. A non-probabilistic state-of-the-art method for network ternarization is Trained Ternary Quantization (Zhu et al., 2016) which uses fullprecision shadow weights during training, but quantized forward passes. Additionally it learns a (non-symmetric) scaling per layer for the non-zero quantization values, similar to our learned quantization level $a$ . While the method achieves impressive accuracy, the sparsity and thus pruning rates are rather low (between $3 0 \%$ and $5 0 \%$ sparsity) and the first and last layer need to be kept with full precision.
|
| 218 |
+
|
| 219 |
+
# 6 DISCUSSION
|
| 220 |
+
|
| 221 |
+
A potential shortcoming of our method is the KL divergence approximation (Sec. 3.3). While the approximation is reasonably good on the relevant range of $\theta$ - and $\sigma$ -values, there is still room for improvement which could have the benefit that weights are drawn even more tightly onto the quantization levels, resulting in lower accuracy loss after quantization and pruning. Since our functional approximation to the KL divergence only needs to be computed once and an arbitrary amount of ground-truth data can be produced, it should be possible to improve upon the approximation presented here at least by some brute-force function approximation, e.g., a neural network, polynomial or kernel regression. The main difficulty is that the resulting approximation must be differentiable and must not introduce significant computational overhead since the approximation is evaluated once for each network parameter in each gradient step. We have also experimented with a naive Monte-Carlo approximation of the KL divergence term. This has the disadvantage that local reparameterization (where pre-activations are sampled directly) can no longer be used, since weight samples are required for the MC approximation. To keep computational complexity comparable, we used a single sample for the MC approximation. In our LeNet-5 on MNIST experiment the MC approximation achieves comparable accuracy with higher pruning rates compared to our functional KL approximation. However, with DenseNet on CIFAR-10 and the MC approximation validation accuracy plunges catastrophically after pruning and quantization. See Sec. A.3 in the Appendix for more details. Compared to similar methods that only consider network pruning, our pruning rates are significantly lower. This does not seem to be a particular problem of our method since other papers on network ternarization report similar or even lower sparsity levels (Zhu et al. (2016) roughly achieve between $3 0 \%$ and $5 0 \%$ sparsity). The reason for this might be that heavily quantized networks have a much lower capacity compared to full-precision networks. This limited capacity might require that the network compensates by effectively using more weights such that the pruning rates become significantly lower. Similar trends have also been observed with binary networks, where drops in accuracy could be prevented by increasing the number of neurons (with binary weights) per layer. Principled experiments to test the trade-off between low bit-precision and sparsity rates would be an interesting direction for future work. One starting point could be to test our method with more quantization levels (e.g., 5, 7 or 9) and investigate how this affects the pruning rate.
|
| 222 |
+
|
| 223 |
+
# REFERENCES
|
| 224 |
+
|
| 225 |
+
David F Andrews and Colin L Mallows. Scale mixtures of normal distributions. Journal of the Royal Statistical Society. Series B (Methodological), pp. 99–102, 1974.
|
| 226 |
+
Charles Blundell, Julien Cornebise, Koray Kavukcuoglu, and Daan Wierstra. Weight uncertainty in neural networks. arXiv preprint arXiv:1505.05424, 2015.
|
| 227 |
+
Matthieu Courbariaux, Itay Hubara, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Binarized neural networks: Training deep neural networks with weights and activations constrained $\mathrm { t o } + 1$ or-1. arXiv preprint arXiv:1602.02830, 2016.
|
| 228 |
+
Thomas M Cover and Joy A Thomas. Elements of information theory. John Wiley & Sons, 2006.
|
| 229 |
+
Misha Denil, Babak Shakibi, Laurent Dinh, Nando de Freitas, et al. Predicting parameters in deep learning. In Advances in Neural Information Processing Systems, pp. 2148–2156, 2013.
|
| 230 |
+
Stefan Depeweg, Jose Miguel Hern ´ andez-Lobato, Finale Doshi-Velez, and Steffen Udluft. Learning ´ and policy search in stochastic dynamical systems with bayesian neural networks. arXiv preprint arXiv:1605.07127, 2016.
|
| 231 |
+
Stefan Depeweg, Jose Miguel Hern ´ andez-Lobato, Finale Doshi-Velez, and Steffen Udluft. Un- ´ certainty decomposition in bayesian neural networks with latent variables. arXiv preprint arXiv:1706.08495, 2017.
|
| 232 |
+
Mario Figueiredo. Adaptive sparseness using jeffreys prior. In ´ Advances in neural information processing systems, pp. 697–704, 2002.
|
| 233 |
+
Yarin Gal. Uncertainty in deep learning. PhD thesis, PhD thesis, University of Cambridge, 2016.
|
| 234 |
+
Yarin Gal and Zoubin Ghahramani. Dropout as a Bayesian approximation: Representing model uncertainty in deep learning. arXiv:1506.02142, 2015.
|
| 235 |
+
Yarin Gal, Jiri Hron, and Alex Kendall. Concrete dropout. arXiv preprint arXiv:1705.07832, 2017.
|
| 236 |
+
Tim Genewein and Daniel A Braun. Occam’s razor in sensorimotor learning. Proceedings of the Royal Society of London B: Biological Sciences, 281(1783):20132952, 2014.
|
| 237 |
+
|
| 238 |
+
Tim Genewein, Felix Leibfried, Jordi Grau-Moya, and Daniel Alexander Braun. Bounded rationality, abstraction, and hierarchical decision-making: An information-theoretic optimality principle. Frontiers in Robotics and AI, 2:27, 2015.
|
| 239 |
+
|
| 240 |
+
Alex Graves. Practical variational inference for neural networks. In NIPS, pp. 2348–2356, 2011.
|
| 241 |
+
|
| 242 |
+
Peter D Grunwald. ¨ The minimum description length principle. MIT press, 2007.
|
| 243 |
+
|
| 244 |
+
Yiwen Guo, Anbang Yao, and Yurong Chen. Dynamic network surgery for efficient dnns. In Advances In Neural Information Processing Systems, pp. 1379–1387, 2016.
|
| 245 |
+
|
| 246 |
+
Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. ICLR 2016, 2016.
|
| 247 |
+
|
| 248 |
+
Song Han, Jeff Pool, Sharan Narang, Huizi Mao, Shijian Tang, Erich Elsen, Bryan Catanzaro, John Tran, and William J Dally. Dsd: Regularizing deep neural networks with dense-sparse-dense training flow. ICLR 2017, 2017.
|
| 249 |
+
|
| 250 |
+
Babak Hassibi and David G Stork. Second order derivatives for network pruning: Optimal brain surgeon. In Advances in Neural Information Processing Systems, pp. 164–171, 1993.
|
| 251 |
+
|
| 252 |
+
Jose Miguel Hern ´ andez-Lobato and Ryan Adams. Probabilistic backpropagation for scalable learn- ´ ing of bayesian neural networks. In International Conference on Machine Learning, pp. 1861– 1869, 2015.
|
| 253 |
+
|
| 254 |
+
Matthew D Hoffman and Matthew J Johnson. Elbo surgery: yet another way to carve up the variational evidence lower bound. In Workshop in Advances in Approximate Bayesian Inference, NIPS 2016, 2016.
|
| 255 |
+
|
| 256 |
+
Matthew D Hoffman, Carlos Riquelme, and Matthew J Johnson. The beta-vaes implicit prior. In Workshop on Bayesian deep learning, NIPS 2017, 2017.
|
| 257 |
+
|
| 258 |
+
Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017.
|
| 259 |
+
|
| 260 |
+
Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. 2017.
|
| 261 |
+
|
| 262 |
+
Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Quantized neural networks: Training neural networks with low precision weights and activations. arXiv preprint arXiv:1609.07061, 2016.
|
| 263 |
+
|
| 264 |
+
Forrest N Iandola, Song Han, Matthew W Moskewicz, Khalid Ashraf, William J Dally, and Kurt Keutzer. Squeezenet: Alexnet-level accuracy with 50x fewer parameters and¡ $0 . 5 \mathrm { m b }$ model size. arXiv preprint arXiv:1602.07360, 2016.
|
| 265 |
+
|
| 266 |
+
John Ingraham and Debora Marks. Variational inference for sparse and undirected models. In International Conference on Machine Learning, pp. 1607–1616, 2017.
|
| 267 |
+
|
| 268 |
+
Theofanis Karaletsos and Gunnar Ratsch. Automatic relevance determination for deep generative ¨ models. arXiv preprint arXiv:1505.07765, 2015.
|
| 269 |
+
|
| 270 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. ICLR, 2014.
|
| 271 |
+
|
| 272 |
+
Diederik P Kingma, Tim Salimans, and Max Welling. Variational dropout and the local reparameterization trick. In Advances in Neural Information Processing Systems, pp. 2575–2583, 2015.
|
| 273 |
+
|
| 274 |
+
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009.
|
| 275 |
+
|
| 276 |
+
Yann LeCun, John S. Denker, and Sara A. Solla. Optimal brain damage. In D. S. Touretzky (ed.), Advances in Neural Information Processing Systems, pp. 598–605. 1990.
|
| 277 |
+
|
| 278 |
+
Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
|
| 279 |
+
|
| 280 |
+
Fengfu Li, Bo Zhang, and Bin Liu. Ternary weight networks. arXiv preprint arXiv:1605.04711, 2016.
|
| 281 |
+
|
| 282 |
+
Christos Louizos, Karen Ullrich, and Max Welling. Bayesian compression for deep learning. Advances in Neural Information Processing Systems, 2017.
|
| 283 |
+
|
| 284 |
+
David JC MacKay. Probable networks and plausible predictions - a review of practical bayesian methods for supervised neural networks. Network: Computation in Neural Systems, 6(3):469– 505, 1995.
|
| 285 |
+
|
| 286 |
+
David JC MacKay. Information theory, inference and learning algorithms. Cambridge university press, 2003.
|
| 287 |
+
|
| 288 |
+
Toby J Mitchell and John J Beauchamp. Bayesian variable selection in linear regression. Journal of the American Statistical Association, 83(404):1023–1032, 1988.
|
| 289 |
+
|
| 290 |
+
Dmitry Molchanov, Arsenii Ashukha, and Dmitry Vetrov. Variational dropout sparsifies deep neural networks. ICML 2017, 2017.
|
| 291 |
+
|
| 292 |
+
Radford M Neal. Bayesian Learning for Neural Networks. PhD thesis, University of Toronto, 1995.
|
| 293 |
+
|
| 294 |
+
Kirill Neklyudov, Dmitry Molchanov, Arsenii Ashukha, and Dmitry Vetrov. Structured bayesian pruning via log-normal multiplicative noise. arXiv preprint arXiv:1705.07283, 2017.
|
| 295 |
+
|
| 296 |
+
Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In European Conference on Computer Vision, pp. 525–542. Springer, 2016.
|
| 297 |
+
|
| 298 |
+
Jorma Rissanen. Modeling by shortest data description. Automatica, 14(5):465–471, 1978.
|
| 299 |
+
|
| 300 |
+
Casper Kaae Sønderby, Tapani Raiko, Lars Maaløe, Søren Kaae Sønderby, and Ole Winther. How to train deep variational autoencoders and probabilistic ladder networks. arXiv preprint arXiv:1602.02282, 2016.
|
| 301 |
+
|
| 302 |
+
Daniel Soudry, Itay Hubara, and Ron Meir. Expectation backpropagation: Parameter-free training of multilayer neural networks with continuous or discrete weights. In Advances in Neural Information Processing Systems, pp. 963–971, 2014.
|
| 303 |
+
|
| 304 |
+
Nitish Srivastava, Geoffrey E Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. Journal of machine learning research, 15(1):1929–1958, 2014.
|
| 305 |
+
|
| 306 |
+
Vivienne Sze, Yu-Hsin Chen, Tien-Ju Yang, and Joel Emer. Efficient processing of deep neural networks: A tutorial and survey. arXiv preprint arXiv:1703.09039, 2017.
|
| 307 |
+
|
| 308 |
+
Naftali Tishby, Fernando C Pereira, and William Bialek. The information bottleneck method. arXiv preprint physics/0004057, 2000.
|
| 309 |
+
|
| 310 |
+
Jakub M Tomczak and Max Welling. Vae with a vampprior. arXiv preprint arXiv:1705.07120, 2017.
|
| 311 |
+
|
| 312 |
+
Karen Ullrich, Edward Meeds, and Max Welling. Soft weight-sharing for neural network compression. ICLR 2017, 2017.
|
| 313 |
+
|
| 314 |
+
Sida Wang and Christopher Manning. Fast dropout training. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), pp. 118–126, 2013.
|
| 315 |
+
|
| 316 |
+
Max Welling and Yee W Teh. Bayesian learning via stochastic gradient langevin dynamics. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pp. 681–688, 2011.
|
| 317 |
+
|
| 318 |
+
Shuchang Zhou, Yuxin Wu, Zekun Ni, Xinyu Zhou, He Wen, and Yuheng Zou. Dorefa-net: Training low bitwidth convolutional neural networks with low bitwidth gradients. arXiv preprint arXiv:1606.06160, 2016.
|
| 319 |
+
|
| 320 |
+
Chenzhuo Zhu, Song Han, Huizi Mao, and William J Dally. Trained ternary quantization. arXiv preprint arXiv:1612.01064, 2016.
|
| 321 |
+
|
| 322 |
+
A APPENDIX
|
| 323 |
+
|
| 324 |
+
A.1 VISUALIZATION OF DENSENET WEIGHTS AFTER VNQ TRAINING
|
| 325 |
+
|
| 326 |
+
See Fig. 3.
|
| 327 |
+
|
| 328 |
+

|
| 329 |
+
Figure 3: Visualization of distribution over DenseNet weights after training on CIFAR-10 with VNQ. Each panel shows one (convolutional or dense) layer, starting in the top-left corner with the input- and ending with the final layer in the bottom-right panel (going row-wise, that is first moving to the right as layers increase). The validation accuracy of the network shown is $9 1 . 6 8 \%$ before pruning and quantization and $9 1 . 1 7 \%$ after pruning and quantization.
|
| 330 |
+
|
| 331 |
+
# A.2 LOCAL REPARAMETERIZATION
|
| 332 |
+
|
| 333 |
+
We follow Sparse VD (Molchanov et al., 2017) and use the Local Reparameterization Trick (Kingma et al., 2015) and Additive Noise Reparmetrization to optimize the stochastic gradient variational lower bound $\mathcal { L } ^ { \mathrm { S G V B } }$ (Eq. (2)). We optimize posterior means and log-variances $( \theta , \log \sigma ^ { 2 } )$ and the codebook level $a$ . We apply Variational Network Quantization to fully connected and convolutional layers. Denoting inputs to a layer with $A ^ { M \times I }$ , outputs of a layer with $B ^ { M \times O }$ and using local reparameterization we get:
|
| 334 |
+
|
| 335 |
+
$$
|
| 336 |
+
b _ { m j } \sim { \mathcal { N } } ( \gamma _ { m j } , \delta _ { m j } ) ; \gamma _ { m j } = \sum _ { i = 1 } ^ { I } a _ { m i } \theta _ { i j } , \delta _ { m j } = \sum _ { i = 1 } ^ { I } a _ { m i } ^ { 2 } \sigma _ { i j } ^ { 2 }
|
| 337 |
+
$$
|
| 338 |
+
|
| 339 |
+
for a fully connected layer. Similarly activations for a convolutional layer are computed as follows
|
| 340 |
+
|
| 341 |
+
$$
|
| 342 |
+
\mathrm { v e c } ( b _ { m k } ) \sim \mathcal { N } ( \gamma _ { m k } , \delta _ { m k } ) ; \gamma _ { m k } = \mathrm { v e c } ( A _ { m } * \theta _ { k } ) , \delta _ { m k } = \mathrm { d i a g } ( \mathrm { v e c } ( A _ { m } ^ { 2 } * \sigma _ { k } ^ { 2 } ) ) ,
|
| 343 |
+
$$
|
| 344 |
+
|
| 345 |
+
where $( \cdot ) ^ { 2 }$ denotes an element-wise operation, $^ *$ is the convolution operation and $\mathrm { v e c } ( \cdot )$ denotes reshaping of a matrix/tensor into a vector.
|
| 346 |
+
|
| 347 |
+
# A.3 KL APPROXIMATION FOR QUANTIZING PRIOR
|
| 348 |
+
|
| 349 |
+
Under the quantizing prior (Eq. (12)) the KL divergence from the log uniform prior to the meanfield posterior $D _ { \mathrm { K L } } ( q _ { \phi } ( w _ { i j } ) | | p ( w _ { i j } ) )$ is analytically intractable. Molchanov et al. (2017) presented an approximation for the KL divergence under a (zero-centered) log uniform prior (Eq. (5)). Since our quantizing prior is essentially a composition of shifted log uniform priors, we construct a composition of the approximation given by Molchanov et al. (2017), shown in Eq. (7). The original approximation can be utilized to calculate a KL divergence approximation (up to an additive constant $\tilde { C }$ ) from a shifted log-uniform prior $\begin{array} { r } { p ( w _ { i j } ) \ \propto \ \frac { 1 } { | w _ { i j } - r | } } \end{array}$ to a Gaussian posterior $q _ { \phi } ( w _ { i j } )$ by transferring the shift to the posterior parameter $\theta$
|
| 350 |
+
|
| 351 |
+
$$
|
| 352 |
+
D _ { \mathrm { K L } } \left( q _ { \{ \theta _ { i j } , \sigma _ { i j } \} } | | p ( w _ { i j } ) \propto \frac { 1 } { | w _ { i j } - r | } \right) = D _ { \mathrm { K L } } \left( q _ { \{ \theta _ { i j } - r , \sigma _ { i j } \} } ( w _ { i j } ) | | p ( w _ { i j } ) \propto \frac { 1 } { | w _ { i j } | } \right) + \tilde { C } ,
|
| 353 |
+
$$
|
| 354 |
+
|
| 355 |
+
For small posterior variances $\sigma _ { i j } ^ { 2 }$ $( \sigma _ { i j } \ll r )$ and means near the quantization levels (i.e., $| \theta _ { i j } | \approx r )$ , the KL divergence is dominated by the mixture prior component located at the respective quantization level $r$ . For these values of $\theta$ and $\sigma$ , the KL divergence can be approximated by shifting the approximation $F _ { \mathrm { L U , K L } } ( \theta , \sigma )$ to the quantization level $r$ , i.e., $F _ { \mathrm { L U , K L } } ( \theta \pm r , \sigma )$ . For small $\sigma$ and values of $\theta$ near zero or far away from any quantization level, as well as for large values of $\sigma$ and arbitrary $\theta$ , the KL divergence can be approximated by the original non-shifted approximation $F _ { \mathrm { L U , K L } } ( \theta , \sigma )$ . Based on these observations we construct our KL approximation by properly mixing shifted versions of $F _ { \mathrm { L U , K L } } ( \theta \pm r , \sigma )$ . We use Gaussian window functions $\Omega ( \theta \pm r )$ to perform this weighting (to ensure differentiability). The remaining $\theta$ domain is covered by an approximation located at zero and weighted such that this approximation is dominant near zero and far away from the quantization levels, which is achieved by introducing the constraint that all window functions sum up to one on the full $\theta$ domain. See Fig. 2 for a visual representation of shifted approximations and their respective window functions.
|
| 356 |
+
|
| 357 |
+
# A.3.1 APPROXIMATION QUALITY
|
| 358 |
+
|
| 359 |
+
We evaluate the quality of our KL approximation (Eq. (16)) by comparing against a ground-truth Monte Carlo approximation on a dense grid over the full range of relevant $\theta$ and $\sigma$ values. Results of this comparison are shown in Fig. 4. Alternatively to the functional KL approximation, one could also use a naive Monte Carlo approximation directly. This has the disadvantage that local reparameterization can no longer be used, since actual samples of the weights must be drawn. To assess the quality of our functional KL approximation, we also compare against experiments where we use a naive MC approximation of the KL divergence term, where we only use a single sample for approximating the expectation to keep computational complexity comparable to our original method. Note that the “ground-truth” MC approximation used before to evaluate KL approximation quality uses many more samples which would be prohibitively expensive during training. To test for the effect of local reparameterization in isolation we also show results for our functional KL approximation without using local reparameterization. The results in Table 3 show that the naive MC approximation of the KL term leads to slightly lower validation error on MNIST (LeNet-5) (with higher pruning rates) but on CIFAR-10 (DenseNet) the validation error of the network trained with the naive MC approximation catastrophically increases after pruning and quantizing the network. Except for removing local reparameterization or plugging in the naive MC approximation, experiments were ran as described in Sec. 4.
|
| 360 |
+
|
| 361 |
+

|
| 362 |
+
Figure 4: Quantitative analysis of the KL approxmiation quality. The top panel shows the “groundtruth” (computed via computationally expensive Monte Carlo approximation), the middle panel shows our approxiomation (Eq. (16)) and the bottom panel shows the difference between both. The maximum absolute error between our approximation and the ground-truth is 1.07 nats.
|
| 363 |
+
|
| 364 |
+
Table 3: Comparing the effects of local reparameterization and naive MC approximation of the KL divergence. “func. KL approx” denotes our functional approximation of the KL divergence given by Eq. (16). “naive MC approx” denotes a naive Monte Carlo approximation that uses a single sample only. The first column of results shows the validation error after training, but without pruning and quantization (no P&Q), the next column shows results after pruning and quantization (results in brackets correspond to the validation error without pruning and quantizing the first layer).
|
| 365 |
+
|
| 366 |
+
<table><tr><td> Setting</td><td>val. error no P&Q [%]</td><td>val. error P&Q [%]</td><td>[u0 [%] w</td></tr><tr><td>LeNet-5 on MNIST</td><td></td><td></td><td>28.3</td></tr><tr><td>local reparam, func. KL approx no local reparam, func. KL approx</td><td>0.67 0.69</td><td>0.73 0.91</td><td>12.4</td></tr><tr><td>no local reparam, naive MC approx</td><td>0.6</td><td>0.69</td><td>8.8</td></tr><tr><td>DenseNet on CIFAR-10</td><td></td><td></td><td></td></tr><tr><td>local reparam, func. KL approx no local reparam, naive MC approx</td><td>8.32 20.75</td><td>8.83 (8.78) 77.71 (75.74)</td><td>46 60.7</td></tr></table>
|
| 367 |
+
|
| 368 |
+
Inspecting the distribution over weights after training with the naive MC approximation for the KL divergence, shown in Fig. 5 for LeNet-5 and in Fig. 6 for DenseNet, reveals that weight-means tend to be more dispersed and weight-variances tend to be generally lower than when training with our functional KL approximation (compare Fig. 1 for LeNet-5 and Fig. 3 for DenseNet). We speculate that the combined effects of missing local reparameterization and single-sample MC approximation lead to more noisy gradients.
|
| 369 |
+
|
| 370 |
+

|
| 371 |
+
|
| 372 |
+
(a) No local reprametrization, functional KL approximation given by Eq. (16).
|
| 373 |
+
|
| 374 |
+

|
| 375 |
+
(b) No local reparameterization, naive MC approximation for KL divergence.
|
| 376 |
+
Figure 5: Distribution of weights after training without local reparameterization but with functional KL approximation (a) and after training with naive MC approximation (b). Top rows: scatter plot of weights (blue dots) per layer. Bottom row: corresponding density.
|
| 377 |
+
|
| 378 |
+

|
| 379 |
+
Figure 6: Visualization of distribution over DenseNet weights after training on CIFAR-10 with naive MC approximation for the KL divergence (and without local reparameterization). Each panel shows one layer, starting in the top-left corner with the input- and ending with the final layer in the bottomright panel (going row-wise, that is first moving to the right as layers increase). Validation accuracy before pruning and quantization is $7 9 . 2 5 \%$ but plunges to $2 2 . 2 9 \%$ after pruning and quantization.
|
| 380 |
+
|
| 381 |
+
# A.4 REUSING THE KL APPROXIMATION FOR ARBITRARY CODEBOOKS
|
| 382 |
+
|
| 383 |
+
We show that the KL approximation (Eq. (16)), developed for a fixed reference codebook, can be reused for arbitrary codebooks as long as codebook learning is restricted to learning a multiplicative scaling factor. Without loss of generality we consider the case of ternary, symmetric codebooks6
|
| 384 |
+
|
| 385 |
+
$$
|
| 386 |
+
c _ { r } = [ - r , 0 , r ] ; \quad p _ { c _ { r } } ( w ) = \sum _ { k = 1 } ^ { 3 } \frac { a _ { k } } { | w - c _ { r , k } | }
|
| 387 |
+
$$
|
| 388 |
+
|
| 389 |
+
where $r \in \mathbb { R } ^ { + }$ is the quantization level value and $p _ { c _ { r } }$ denotes a sparsity-inducing, quantizing prior over weights (sparsity is induced because one of the codebook entries is fixed to 0). We denote $c _ { r }$ as the reference codebook for which we design the KL approximation $D _ { \mathrm { K L } } ( q _ { \phi } ( w ) | | p _ { c _ { r } } ) ~ =$ $F _ { \mathrm { K L } } ( \theta , \sigma , c _ { r } )$ (Eq. (16)). This approximation can be reused for any symmetric ternary codebook $c _ { a } = [ - a , 0 , a ]$ with quantization level $a \in \mathbb { R } ^ { + }$ . The latter can be seen by representing $c _ { a }$ with the reference codebook and a positive scaling factor $s > 0$ as $c _ { a } = s c _ { r }$ , $s = a / r$ . This re-scaling translates into a multiplicative re-scaling of the variational parameters $\theta$ and $\sigma$ . To see this, consider the prior $p _ { c _ { a } }$ , based on codebook $c _ { a }$ :
|
| 390 |
+
|
| 391 |
+
$$
|
| 392 |
+
{ p _ { c } } _ { a } ( w ) = \frac { 1 } { Z } \sum _ { k = 1 } ^ { 3 } \frac { a _ { k } } { | w - c _ { a , k } | } = \frac { 1 } { Z } \sum _ { k = 1 } ^ { 3 } \frac { a _ { k } } { | w - s c _ { r , k } | } .
|
| 393 |
+
$$
|
| 394 |
+
|
| 395 |
+
The KL divergence from a prior based on the codebook $c _ { a }$ to the posterior $q _ { \phi } ( w )$ is given by
|
| 396 |
+
|
| 397 |
+
$$
|
| 398 |
+
\begin{array} { r l } { D _ { \mathrm { K L } } ( q _ { \phi } ( w ) | | p _ { c _ { \alpha } } ( w ) ) = \displaystyle \int q _ { \phi } ( w ) \log \frac { q _ { \phi } ( w ) } { \sum _ { k = 1 } ^ { 3 } \frac { a _ { k } } { | w - c _ { \alpha , k } | } } \mathrm { d } w + C } \\ { \displaystyle } & { = \int q _ { \phi } ( w ) \log \frac { q _ { \phi } ( w ) } { \frac { 1 } { s } \sum _ { k = 1 } ^ { 3 } \frac { a _ { k } } { | \frac { w } { s } - c _ { \tau , k } | } } \mathrm { d } w + C \qquad | \mathrm { s u b s t . } z = \frac { w } { s } , \mathrm { d } w = s \mathrm { d } z } \\ { \displaystyle } & { = \int q _ { \phi } ( s z ) \log \frac { q _ { \phi } ( s z ) } { \frac { 1 } { s } \sum _ { k = 1 } ^ { 3 } \frac { a _ { k } } { | z - c _ { \tau , k } | } } s \mathrm { d } z + C . } \end{array}
|
| 399 |
+
$$
|
| 400 |
+
|
| 401 |
+
Since $q _ { \theta } ( s z )$ is Gaussian, the scaling $s$ can be transfered into the variational parameters $\phi = \left( \theta , \sigma \right)$ :
|
| 402 |
+
|
| 403 |
+
$$
|
| 404 |
+
q _ { \phi } ( s z ) = \mathcal { N } ( s ; \theta , \sigma ^ { 2 } ) = \frac { 1 } { s } \mathcal { N } ( z ; \frac { \theta } { s } , \frac { \sigma ^ { 2 } } { s ^ { 2 } } ) = \frac { 1 } { s } q _ { \hat { \phi } } ( z ) ,
|
| 405 |
+
$$
|
| 406 |
+
|
| 407 |
+
with $\begin{array} { r } { \hat { \phi } = \bigl ( \frac { \theta } { s } , \frac { \sigma } { s } \bigr ) } \end{array}$ . Inserting into Eq. (21) yields:
|
| 408 |
+
|
| 409 |
+
$$
|
| 410 |
+
\begin{array} { l } { \displaystyle D _ { \mathrm { K L } } ( q _ { \phi } ( w ) | | p _ { c _ { a } } ( w ) ) = \int \frac { 1 } { s } q _ { \hat { \phi } } ( z ) \log \frac { \frac { 1 } { s } q _ { \hat { \phi } } ( z ) } { \frac { 1 } { s } \sum _ { k = 1 } ^ { 3 } \frac { a _ { k } } { | z - c _ { r , k } | } } s \mathrm { d } z + C . } \\ { = \displaystyle \int q _ { \hat { \phi } } ( z ) \log \frac { q _ { \hat { \phi } } ( z ) } { \sum _ { k = 1 } ^ { 3 } \frac { a _ { k } } { | z - c _ { r , k } | } } \mathrm { d } z + C . } \\ { = D _ { \mathrm { K L } } ( q _ { \hat { \phi } } ( w ) | | p _ { c _ { r } } ( w ) ) + C . } \end{array}
|
| 411 |
+
$$
|
| 412 |
+
|
| 413 |
+
Thus, $D _ { \mathrm { K L } } ( q _ { \phi } ( w ) | | p _ { c _ { a } } ( w ) ) = D _ { \mathrm { K L } } ( q _ { \hat { \phi } } ( w ) | | p _ { c _ { r } } ( w ) ) + C \approx F _ { \mathrm { K L } } ( \theta / s , \sigma / s , c _ { r } )$ , where $F _ { \mathrm { K L } }$ is given by Eq. (16). This means that the $\mathrm { K L }$ approximation can be used for arbitrary ternary, symmetric codebooks of the form $c _ { a } = [ - a , 0 , a ] = { \dot { s } } c _ { r }$ because the scaling factor $s$ translates into a re-scaling of the variational parameters $\begin{array} { r } { \hat { \phi } = \left( \frac { \theta } { s } , \frac { \sigma } { s } \right) } \end{array}$ .
|
parse/train/ry-TW-WAb/ry-TW-WAb_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/ry-TW-WAb/ry-TW-WAb_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/ry-TW-WAb/ry-TW-WAb_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/ryzECoAcY7/ryzECoAcY7.md
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LEARNING MULTI-LEVEL HIERARCHIES WITHHINDSIGHT
|
| 2 |
+
|
| 3 |
+
Andrew Levy
|
| 4 |
+
Department of Computer Science
|
| 5 |
+
Brown University
|
| 6 |
+
Providence, RI, USA
|
| 7 |
+
andrew levy2@brown.edu
|
| 8 |
+
George Konidaris
|
| 9 |
+
Department of Computer Science
|
| 10 |
+
Brown University
|
| 11 |
+
Providence, RI, USA
|
| 12 |
+
gdk@cs.brown.edu
|
| 13 |
+
Robert Platt
|
| 14 |
+
College of Computer and Information Science
|
| 15 |
+
Northeastern University
|
| 16 |
+
Boston, MA, USA
|
| 17 |
+
rplatt@ccs.neu.edu
|
| 18 |
+
Kate Saenko
|
| 19 |
+
Department of Computer Science
|
| 20 |
+
Boston University
|
| 21 |
+
Boston, MA, USA
|
| 22 |
+
saenko@bu.edu
|
| 23 |
+
|
| 24 |
+
# ABSTRACT
|
| 25 |
+
|
| 26 |
+
Hierarchical agents have the potential to solve sequential decision making tasks with greater sample efficiency than their non-hierarchical counterparts because hierarchical agents can break down tasks into sets of subtasks that only require short sequences of decisions. In order to realize this potential of faster learning, hierarchical agents need to be able to learn their multiple levels of policies in parallel so these simpler subproblems can be solved simultaneously. Yet, learning multiple levels of policies in parallel is hard because it is inherently unstable: changes in a policy at one level of the hierarchy may cause changes in the transition and reward functions at higher levels in the hierarchy, making it difficult to jointly learn multiple levels of policies. In this paper, we introduce a new Hierarchical Reinforcement Learning (HRL) framework, Hierarchical Actor-Critic (HAC), that can overcome the instability issues that arise when agents try to jointly learn multiple levels of policies. The main idea behind HAC is to train each level of the hierarchy independently of the lower levels by training each level as if the lower level policies are already optimal. We demonstrate experimentally in both grid world and simulated robotics domains that our approach can significantly accelerate learning relative to other non-hierarchical and hierarchical methods. Indeed, our framework is the first to successfully learn 3-level hierarchies in parallel in tasks with continuous state and action spaces. We also present a video of our results and software to implement our framework.
|
| 27 |
+
|
| 28 |
+
# 1 INTRODUCTION
|
| 29 |
+
|
| 30 |
+
Hierarchy has the potential to accelerate learning in sequential decision making tasks because hierarchical agents can decompose problems into smaller subproblems. In order to take advantage of these shorter horizon subproblems and realize the potential of HRL, an HRL algorithm must be able to learn the multiple levels within the hierarchy in parallel. That is, at the same time one level in the hierarchy is learning the sequence of subtasks needed to solve a task, the level below should be learning the sequence of shorter time scale actions needed to solve each subtask. Yet the existing HRL algorithms that are capable of automatically learning hierarchies in continuous domains (Schmidhuber, 1991; Konidaris & Barto, 2009; Bacon et al., 2017; Vezhnevets et al., 2017; Nachum et al., 2018) do not efficiently learn the multiple levels within the hierarchy in parallel. Instead, these algorithms often resort to learning the hierarchy one level at a time in a bottom-up fashion.
|
| 31 |
+
|
| 32 |
+
Learning multiple levels of policies in parallel is challenging due to non-stationary state transition functions. In nested, multi-level hierarchies, the transition function for any level above the ground level depends on the current policies below that level. For instance, in a 2-level hierarchy, the high-level policy may output a subgoal state for the low level to achieve, and the state to which this subgoal state leads will depend on the current low-level policy. When all policies within the hierarchy are trained simultaneously, the transition function at each level above ground level will continue to change as long as the policies below that level continue to be updated. In this setting of non-stationary transition functions, RL will likely struggle to learn the above ground level policies in the hierarchy because in order for RL methods to effectively value actions, the distribution of states to which those actions lead should be stable. However, learning multiple policies in parallel is still possible because the transition function for each level above ground level will stabilize once all lower level policies have converged to optimal or near optimal policies. Thus, RL can be used to learn all policies in parallel if each level above ground level had a way to simulate a transition function that uses the optimal versions of lower level policies. Our framework is able to simulate a transition function that uses an optimal lower level policy hierarchy and thus can learn multiple levels of policies in parallel.
|
| 33 |
+
|
| 34 |
+

|
| 35 |
+
|
| 36 |
+

|
| 37 |
+
Figure 1: An ant agent uses a 3-level hierarchy to traverse though rooms to reach its goal, represented by the yellow cube. $\Pi _ { 2 }$ uses as input the current state (joint positions $\theta$ and velocities $\dot { \theta }$ ) and goal state (yellow box) and outputs a subgoal state (green box) for $\Pi _ { 1 }$ to achieve. $\Pi _ { 1 }$ takes in the current state and its goal state (green box) and outputs a subgoal state (purple box) for $\Pi _ { 0 }$ to achieve. $\Pi _ { 0 }$ takes in the current state and goal state (purple box) and outputs a vector of joint torques.
|
| 38 |
+
|
| 39 |
+
We introduce a new HRL framework, Hierarchical Actor-Critic (HAC), that can significantly accelerate learning by enabling hierarchical agents to jointly learn a hierarchy of policies. Our framework is primarily comprised of two components: (i) a particular hierarchical architecture and (ii) a method for learning the multiple levels of policies in parallel given sparse rewards.
|
| 40 |
+
|
| 41 |
+
The hierarchies produced by HAC have a specific architecture consisting of a set of nested, goalconditioned policies that use the state space as the mechanism for breaking down a task into subtasks. The hierarchy of nested policies works as follows. The highest level policy takes as input the current state and goal state provided by the task and outputs a subgoal state. This state is used as the goal state for the policy at the next level down. The policy at that level takes as input the current state and the goal state provided by the level above and outputs its own subgoal state for the next level below to achieve. This process continues until the lowest level is reached. The lowest level then takes as input the current state and the goal state provided by the level above and outputs a primitive action. Further, each level has a certain number of attempts to achieve its goal state. When the level either runs out of attempts or achieves its goal state, execution at that level ceases and the level above outputs another subgoal.
|
| 42 |
+
|
| 43 |
+
Figure 1 shows how an ant agent trained with HAC uses its 3-level policy hierarchy $( \pi _ { 2 } , \pi _ { 1 } , \pi _ { 0 } )$ to move through rooms to reach its goal. At the beginning of the episode, the ant’s highest level policy, $\pi _ { 2 }$ , takes as input the current state, which in this case is a vector containing the ant’s joint positions and velocities $( [ \theta , { \dot { \theta } } ] )$ , and its goal state, represented by the yellow box. $\pi _ { 2 }$ then outputs a subgoal state, represented by the green box, for $\pi _ { 1 }$ to achieve. $\pi _ { 1 }$ takes as input the current state and its goal state represented by the green box and outputs the subgoal state represented by the purple box. Finally, $\pi _ { 0 }$ takes as input the current state and the goal state represented by purple box and outputs a primitive action, which in this case is a vector of joint torques. $\pi _ { 0 }$ has a fixed number of attempts to move to the purple box before $\pi _ { 1 }$ outputs another subgoal state. Similarly, $\pi _ { 1 }$ has a fixed number of subgoal states that it can output to try to move the agent to the green box before $\pi _ { 2 }$ outputs another subgoal.
|
| 44 |
+
|
| 45 |
+
In addition, HAC enables agents to learn multiple policies in parallel using only sparse reward functions as a result of two types of hindsight transitions. Hindsight action transitions help agents learn multiple levels of policies simultaneously by training each subgoal policy with respect to a transition function that simulates the optimal lower level policy hierarchy. Hindsight action transitions are implemented by using the subgoal state achieved in hindsight instead of the original subgoal state as the action component in the transition. For instance, when a subgoal level proposes subgoal state $A$ , but the next level policy is unsuccessful and the agent ends in state $B$ after a certain number of attempts, the subgoal level receives a transition in which the state $B$ is the action component, not state $A$ . The key outcome is that now the action and next state components in the transition are the same, as if the optimal lower level policy hierarchy had been used to achieve subgoal state $B$ . Training with respect to a transition function that uses the optimal lower level policy hierarchy is critical to learning multiple policies in parallel, because the subgoal policies can be learned independently of the changing lower level policies. With hindsight action transitions, a subgoal level can focus on learning the sequences of subgoal states that can reach a goal state, while the lower level policies focus on learning the sequences of actions to achieve those subgoal states. The second type of hindsight transition, hindsight goal transitions, helps each level learn a goal-conditioned policy in sparse reward tasks by extending the idea of Hindsight Experience Replay (Andrychowicz et al. (2017)) to the hierarchical setting. In these transitions, one of the states achieved in hindsight is used as the goal state in the transition instead of the original goal state.
|
| 46 |
+
|
| 47 |
+
We evaluated our approach on both grid world tasks and more complex simulated robotics environments. For each task, we evaluated agents with 1, 2, and 3 levels of hierarchy. In all tasks, agents using multiple levels of hierarchy substantially outperformed agents that learned a single policy. Further, in all tasks, agents using 3 levels of hierarchy outperformed agents using 2 levels of hierarchy. Indeed, our framework is the first to show empirically that it can jointly learn 3-level hierarchical policies in tasks with continuous state and action spaces. In addition, our approach outperformed another leading HRL algorithm, HIRO (Nachum et al., 2018), on three simulated robotics tasks.
|
| 48 |
+
|
| 49 |
+
# 2 RELATED WORK
|
| 50 |
+
|
| 51 |
+
Building agents that can learn hierarchical policies is a longstanding problem in Reinforcement Learning (Sutton et al., 1999; Dietterich, 2000; McGovern & Barto, 2001; Kulkarni et al., 2016; Menache et al., 2002; S¸ ims¸ek et al., 2005; Bakker & Schmidhuber, 2004; Wiering & Schmidhuber, 1997). However, most HRL approaches either only work in discrete domains, require pre-trained low-level controllers, or need a model of the environment.
|
| 52 |
+
|
| 53 |
+
There are several other automated HRL techniques that can work in continuous domains. Schmidhuber (1991) proposed a HRL approach that can support multiple levels, as in our method. However, the approach requires that the levels are trained one at a time, beginning with the bottom level, which can slow learning. Konidaris & Barto (2009) proposed Skill Chaining, a 2-level HRL method that incrementally chains options backwards from the end goal state to the start state. Our key advantage relative to Skill Chaining is that our approach can learn the options needed to bring the agent from the start state to the goal state in parallel rather than incrementally. Nachum et al. (2018) proposed HIRO, a 2-level HRL approach that can learn off-policy like our approach and outperforms two other popular HRL techniques used in continuous domains: Option-Critic (Bacon et al. (2017)) and FeUdal Networks (FUN) (Vezhnevets et al. (2017)). HIRO, which was developed simultaneously and independently to our approach, uses the same hierarchical architecture, but does not use either form of hindsight and is therefore not as efficient at learning multiple levels of policies in sparse reward tasks.
|
| 54 |
+
|
| 55 |
+
# 3 BACKGROUND
|
| 56 |
+
|
| 57 |
+
We are interested in solving a Markov Decision Process (MDP) augmented with a set of goals $\mathcal { G }$ (each a state or set of states) that we would like an agent to learn. We define an MDP augmented with a set of goals as a Universal MDP (UMDP). A UMDP is a tuple ${ \mathcal { U } } = ( S , \mathcal { G } , \mathcal { A } , T , R , \gamma )$ , in which $s$ is the set of states; $\mathcal { G }$ is the set of goals; $\mathcal { A }$ is the set of actions; $T$ is the transition probability function in which $T ( s , a , s ^ { \prime } )$ is the probability of transitioning to state $s ^ { \prime }$ when action $a$ is taken in state $s ; R$ is the reward function; $\gamma$ is the discount rate $\in [ 0 , 1 )$ . At the beginning of each episode in a UMDP, a goal $g \in { \mathcal { G } }$ is selected for the entirety of the episode. The solution to a UMDP is a control policy $\pi : { \mathcal { S } } , { \mathcal { G } } \to { \mathcal { A } }$ that maximizes the value function $\begin{array} { r } { v _ { \pi } ( s , g ) = \mathbb { E } _ { \pi } [ \sum _ { n = 0 } ^ { \infty } \gamma ^ { n } R _ { t + n + 1 } | s _ { t } = s , \tilde { g _ { t } } = \bar { g } ] } \end{array}$ for an initial state $s$ and goal $g$ .
|
| 58 |
+
|
| 59 |
+
In order to implement hierarchical agents in tasks with continuous state and actions spaces, we will use two techniques from the RL literature: (i) the Universal Value Function Approximator (UVFA) (Schaul et al., 2015) and (ii) Hindsight Experience Replay (Andrychowicz et al., 2017). The UVFA will be used to estimate the action-value function of a goal-conditioned policy $\pi$ , $q _ { \pi } ( s , g , a ) \ =$ $\begin{array} { r } { \mathbb { E } _ { \boldsymbol \pi } [ \sum _ { n = 0 } ^ { \infty } \gamma ^ { n } R _ { t + n + 1 } | s _ { t } = s , g _ { t } = g , a _ { t } = a ] } \end{array}$ . In our experiments, the UVFAs used will be in the form of feedforward neural networks. UVFAs are important for learning goal-conditioned policies because they can potentially generalize $\mathrm { Q }$ -values from certain regions of the (state, goal, action) tuple space to other regions of the tuple space, which can accelerate learning. However, UVFAs are less helpful in difficult tasks that use sparse reward functions. In these tasks when the sparse reward is rarely achieved, the UVFA will not have large regions of the (state, goal, action) tuple space with relatively high Q-values that it can generalize to other regions. For this reason, we also use Hindsight Experience Replay (Andrychowicz et al., 2017). HER is a data augmentation technique that can accelerate learning in sparse reward tasks. HER first creates copies of the [state, action, reward, next state, goal] transitions that are created in traditional off-policy RL. In the copied transitions, the original goal element is replaced with a state that was actually achieved during the episode, which guarantees that at least one of the HER transitions will contain the sparse reward. These HER transitions in turn help the UVFA learn about regions of the (state, goal, action) tuple space that should have relatively high Q-values, which the UVFA can then potentially extrapolate to the other areas of the tuple space that may be more relevant for achieving the current set of goals.
|
| 60 |
+
|
| 61 |
+
# 4 HIERARCHICAL ACTOR-CRITIC (HAC)
|
| 62 |
+
|
| 63 |
+
We introduce a HRL framework, Hierarchical Actor-Critic, that can efficiently learn the levels in a multi-level hierarchy in parallel. HAC contains two components: (i) a particular hierarchical architecture and (ii) a method for learning the levels of the hierarchy simultaneously and independently. In this section, we will more formally present our proposed system as a UMDP transformation operation.
|
| 64 |
+
|
| 65 |
+
The purpose of our framework is to efficiently learn a $k$ -level hierarchy $\Pi _ { k - 1 }$ consisting of $k$ individual policies $\pi _ { 0 } , \ldots , \pi _ { k - 1 }$ , in which $k$ is a hyperparameter chosen by the user. In order to learn $\pi _ { 0 } , \ldots , \pi _ { k - 1 }$ in parallel our framework transforms the original UMDP, $\mathcal { U } _ { o r i g i n a l } =$ $( S , \mathcal { G } , \mathcal { A } , T , R , \gamma )$ , into a set of $k$ UMDPs $\mathcal { U } _ { 0 } , \dotsc , \mathcal { U } _ { k - 1 }$ , in which $\mathcal { U } _ { i } = ( S _ { i } , \mathcal { G } _ { i } , \mathcal { A } _ { i } , T _ { i } , R _ { i } , \gamma _ { i } )$ . In the remainder of the section, we will describe these tuples at a high-level. See section 7.3 in the Appendix for the full definition of each UMDP tuple.
|
| 66 |
+
|
| 67 |
+
# 4.1 STATE, GOAL, AND ACTION SPACES
|
| 68 |
+
|
| 69 |
+
In our approach, each level of the UMDP hierarchy learns its own deterministic policy: $\pi _ { i } : S _ { i } , { \mathcal { G } } _ { i } \to$ $\mathcal { A } _ { i } , 0 \leq i \leq k - 1$ . The state space for every level $i$ is identical to the state space in the original problem: ${ { S } _ { i } } = { { S } }$ . Since each level will learn to solve a shortest path problem with respect to a goal state, we set the goal space at each level $i$ to be identical to the state space: $\mathcal { G } _ { i } = \mathcal { S }$ . Finally, the action space at all levels except the bottom-most level is identical to the goal space of the next level down (i.e. the state space): $\mathcal { A } _ { i } = \mathcal { S } , i > 0$ . These levels output subgoal states for the next lower level to achieve. The action space of the bottom-most level is identical to the set of primitive actions that are available to the agent: $A _ { 0 } = A$ .
|
| 70 |
+
|
| 71 |
+

|
| 72 |
+
Figure 2: An example episode trajectory for a simple toy example. The tic marks along the trajectory show the next states for the robot after each primitive action is executed. The pink circles show the original subgoal actions. The gray circles show the subgoal states reached in hindsight after at most $H$ actions by the low-level policy.
|
| 73 |
+
|
| 74 |
+
# 4.2 NESTED POLICIES
|
| 75 |
+
|
| 76 |
+
HAC learns hierarchies of nested policies. Nesting is critical to decomposing problems because it enables agents to learn tasks requiring long sequences of primitive actions with policies that only need to learn short sequences of actions. HAC nests policies by embedding the policy at level $i - 1 , \pi _ { i - 1 }$ , into the transition function at level $i$ , $T _ { i }$ . The transition function at each subgoal level, $T _ { i } , i > 0$ , will work as follows. The subgoal action selected $a _ { i }$ by level $i$ is assigned to be the goal of level $i - 1$ : $g _ { i - 1 } = a _ { i }$ . $\pi _ { i - 1 }$ then has at most $H$ attempts to achieve $g _ { i - 1 }$ , in which $H$ , or the maximum horizon of a subgoal action, is another parameter provided by the user. When either $\pi _ { i - 1 }$ runs out of $H$ attempts or a goal $g _ { n } , n \geq i - 1$ , is achieved, the transition function terminates and the agent’s current state is returned. Level $i$ ’s state transition function $T _ { i }$ thus depends on the full policy hierarchy below level $i$ , $\Pi _ { i - 1 }$ , due to the hierarchy’s nested architecture. Each action from $\pi _ { i - 1 }$ depends on $T _ { i - 1 }$ , which depends on $\pi _ { i - 2 }$ and so on. Consequently, we use the notation $T _ { i \left. \Pi _ { i - 1 } \right. }$ for level $i$ ’s state transition function going forward as it depends on the full lower level policy hierarchy. The full state transition function for level $i > 0$ is provided in Algorithm 3 in the Appendix. The base transition function $T _ { 0 }$ is assumed to be provided by the task: $T _ { 0 } = T$ .
|
| 77 |
+
|
| 78 |
+
# 4.3 HINDSIGHT ACTION TRANSITIONS
|
| 79 |
+
|
| 80 |
+
There are two causes of non-stationary transition functions in our framework that will need to be overcome in order to learn multiple policies in parallel. One cause of non-stationary transition functions is updates to lower level policies. That is, whenever $\pi _ { i }$ changes, the transition function at levels above $i$ , $T _ { j | \Pi _ { j - 1 } } , j > i$ , can change. The second cause is exploring lower level policies. Because all levels have a deterministic policy in our algorithm, all levels will need to explore with some behavior policy $\pi _ { i _ { b } }$ that is different than the policy it is learning $\pi _ { i }$ . For instance, in continuous domains, the agent may add Gaussian noise to its greedy policy: $\overline { { \pi } } _ { i _ { b } } = \pi _ { i } + \mathcal { N } ( 0 , \sigma ^ { 2 } )$ for some variance $\sigma ^ { 2 }$ . Yet whenever a lower level policy hierarchy uses some behavior policy $\Pi _ { i - 1 _ { b } }$ to achieve a subgoal, the transition function at level $i$ , $T _ { i | \Pi _ { i - 1 _ { b } } }$ , will also vary over time. RL methods will likely not be effective at learning subgoal policies in parallel if each subgoal policy at level $i$ is trained with respect to a transition function that uses the current lower level policy hierarchy $\Pi _ { i - 1 }$ or the behavior lower level policy hierarchy $\Pi _ { i - 1 _ { b } }$ . RL methods need the distribution of states to which actions lead to be stable in order to effectively value actions and both $\Pi _ { i - 1 }$ and $\Pi _ { i - 1 _ { b } }$ are continually changing.
|
| 81 |
+
|
| 82 |
+
In order to overcome these non-stationary issues that hinder the joint learning of policies, HAC instead trains each subgoal policy assuming a transition function that uses the optimal lower level policy hierarchy, $\Pi _ { i - 1 } ^ { * }$ . $T _ { i | \Pi _ { i - 1 } ^ { * } }$ is stationary because it is independent of the changing and exploring lower level policies, allowing an agent to learn a policy at level $i$ at the same time the agent learns policies below level $i$ .
|
| 83 |
+
|
| 84 |
+
Hindsight action transitions use a simple technique to simulate the transition function that uses the optimal policy hierarchy below level $i$ , $T _ { i | \Pi _ { i - 1 } ^ { * } }$ . In order to explain how hindsight actions transitions are implemented, we will use the example in Figure 2, in which a $k = 2$ -level robot is looking to move from its start state to the yellow flag. The robot begins in state $s _ { 0 }$ when the high level policy $\pi _ { 1 }$ outputs the subgoal state $g _ { 0 }$ for the low level to achieve. The low level policy $\pi _ { 0 }$ then executes $H = 5$ primitive actions using some behavior policy $\pi _ { 0 _ { b } }$ but is unable to achieve $g _ { 0 }$ , instead landing in $s _ { 1 }$ . After executing $H = 5$ primitive actions, the first action by $\pi _ { 1 }$ is complete and a hindsight action transition can be created.
|
| 85 |
+
|
| 86 |
+
Hindsight action transitions have two key components. The first is that the subgoal state achieved in hindsight is used as the action component in the transition, not the originally proposed subgoal state. Thus, the hindsight action transition so far will look like: [initial state $\mathbf { \xi } = \mathbf { \xi } _ { S 0 }$ , $a c t i o n = s _ { 1 }$ , reward $=$ TBD, next state $\mathbf { \delta } = \mathbf { \delta } s _ { 1 }$ , $g o a l =$ yellow flag, discount rate $=$ gamma]. The second key component of the hindsight action transition is the reward function used at all subgoal levels. The first requirement for this reward function is that it should incentivize short paths to the goal because shorter paths can be learned more quickly. The second requirement for the reward function is that it should be independent of the path taken at lower levels. The purpose of hindsight action transitions is to simulate a transition function that uses the optimal lower level policy hierarchy $\Pi _ { i - 1 } ^ { * }$ . Yet without a model of the environment, the exact path $\Pi _ { i - 1 } ^ { * }$ would have taken is unknown. Thus, the reward should only be a function of the state reached in hindsight and the goal state. For each subgoal level, we use the reward function in which a reward of $^ { - 1 }$ is granted if the goal has not been achieved and a reward of 0 otherwise. Thus, in the example above, the high level of the robot would receive the hindsight action transition [initial state $\mathbf { \delta } = \mathbf { \nabla } _ { S 0 }$ , action $\mathbf { \delta } = \mathbf { \delta } s _ { 1 }$ , reward $= - l$ , next state $\mathbf { \delta } = \mathbf { \delta } s _ { 1 }$ , $g o a l =$ yellow flag, discount $\cdot a t e = g a m m a J$ , which is the same transition that would have been created had the high level originally proposed state $s _ { 1 }$ as a subgoal and the transition function used the optimal lower level policy hierarchy to achieve it. Using the same process, the hindsight action transition created for the second action by $\pi _ { 1 }$ would be [initial state $\mathbf { \mu } = s _ { 1 }$ , $a c t i o n = s _ { 2 }$ , reward $= - l$ , next state $\mathbf { \delta } = s _ { 2 }$ , goal $=$ yellow flag, discount rate $= \gamma J$ .
|
| 87 |
+
|
| 88 |
+
Although none of the hindsight actions produced in the episode contained the sparse reward of 0, they are still helpful for the high level of the agent. Through these transitions, the high level discovers on its own possible subgoals that fit the time scale of $H$ primitive actions per high level action, which is the time scale that it should be learning. More importantly, these transitions are robust to a changing and exploring lower level policy $\pi _ { 0 }$ because they assume a transition function that uses $\pi _ { 0 } ^ { * }$ and not the current low level policy $\pi _ { 0 }$ or low level behavior policy $\pi _ { 0 _ { b } }$ .
|
| 89 |
+
|
| 90 |
+
# 4.4 HINDSIGHT GOAL TRANSITIONS
|
| 91 |
+
|
| 92 |
+
We supplement all levels of the hierarchy with an additional set of transitions, which we refer to as hindsight goal transitions, that enable each level to learn more effectively in sparse reward tasks by extending the idea of Hindsight Experience Replay (Andrychowicz et al., 2017) to the hierarchical setting. As the toy robot example illustrates, it can be difficult for any level in our framework to receive the sparse reward. A level needs to randomly reach its goal state in order to obtain the sparse reward. Hindsight goal transitions use another simple use of hindsight to guarantee that after every sequence of actions by each level in the hierarchy, that level receives a transition containing the sparse reward.
|
| 93 |
+
|
| 94 |
+
Hindsight goal transitions would be created for each level in the toy robot example as follows. Beginning with the low level, after each of the at most $H = 5$ primitive actions executed by the low level policy $\pi _ { 0 }$ per high level action, the low level will create two transitions. The first transition is the typical transition non-hierarchical agents create evaluating the primitive action that was taken given the goal state. For instance, assuming the same shortest path reward function described earlier, after the first primitive action in the episode, the low level will receive the transition [initial state $=$ $s _ { 0 }$ , action $=$ joint torques, reward $= - l$ , next state $=$ first tick mark, $g o a l = g _ { 0 }$ , discount rate $= \gamma J$ . The second transition is a copy of the first transition, but the goal state and reward components are temporarily erased: [initial state $\mathbf { \xi } = \mathbf { \xi } _ { S 0 }$ , action $=$ joint torques, reward $= T B D$ , next state $= \mathit { f i r s t } \mathit { t i c k }$ mark, $g o a l = T B D$ , discount rate $= \gamma J$ . After the sequence of at most $H = 5$ primitive actions, the hindsight goal transitions will be created by filling in the TBD components in the extra transitions that were created. First, one of the “next state” elements in one of the transitions will be selected as the new goal state replacing the TBD component in each transition. Second, the reward will be updated in each transition to reflect the new goal state. For instance, after the first set of $H = 5$ primitive actions, the state $s _ { 1 }$ may be chosen as the hindsight goal. The hindsight goal transition created by the fifth primitive action that achieved the hindsight goal would then be [initial state $=$
|
| 95 |
+
|
| 96 |
+
4th tick mark, action $=$ joint torques, reward $= { \cal O }$ , next state $\mathbf { \delta } = \mathbf { \delta } s _ { 1 }$ , $g o a l = s _ { 1 }$ , discount rate $= O J$ . Moreover, hindsight goal transitions would be created in the same way for the high level of the toy robot, except that the hindsight goal transitions would be made from copies of the hindsight action transitions. Assuming the last state reached $s _ { 5 }$ is used as the hindsight goal, the first hindsight goal transition for the high level would be [initial state $\mathbf { \xi } = \mathbf { \xi } _ { S 0 }$ , $a c t i o n = s _ { 1 }$ , reward $= - l$ , next state $\mathbf { \delta } = \mathbf { \nabla } _ { S 1 }$ , $g o a l = s _ { 5 }$ , discount rate $= \gamma J$ . The last hindsight goal transition for the high level would be [initial $s t a t e = s _ { 4 }$ , $a c t i o n = s _ { 5 }$ , reward $= { \cal O } _ { ; }$ , next state $= s _ { 5 }$ , $g o a l = s _ { 5 }$ , discount rate $= O J$ .
|
| 97 |
+
|
| 98 |
+
Hindsight goal transitions should significantly help each level learn an effective goal-conditioned policy because it guarantees that after every sequence of actions, at least one transition will be created that contains the sparse reward (in our case a reward and discount rate of 0). These transitions containing the sparse reward will in turn incentivize the UVFA critic function to assign relatively high Q-values to the (state, action, goal) tuples described by these transitions. The UVFA can then potentially generalize these high $\mathrm { Q }$ -values to the other actions that could help the level solve its tasks.
|
| 99 |
+
|
| 100 |
+
# 4.5 SUBGOAL TESTING TRANSITIONS
|
| 101 |
+
|
| 102 |
+
Hindsight action and hindsight goal transitions give agents the potential to learn multiple policies in parallel with only sparse rewards, but some key issues remain. The most serious flaw is that the strategy only enables a level to learn about a restricted set of subgoal states. A level $i$ will only execute in hindsight subgoal actions that can be achieved with at most $H$ actions from level $i - 1$ . For instance, when the toy robot is in state $s _ { 2 }$ , it will not be able to achieve a subgoal state on the yellow flag in $H = 5$ primitive actions. As a result, level $i$ in a hierarchical agent will only learn Q-values for subgoal actions that are relatively close to its current state and will ignore the Q-values for all subgoal actions that require more than $H$ actions. This is problematic because the action space for all subgoal levels should be the full state space in order for the framework to be end-toend. If the action space is the full state space and the Q-function is ignoring large regions of the action space, significant problems will occur if the learned Q-function assigns higher Q-values to distant subgoals that the agent is ignoring than to feasible subgoals that can be achieved with at most $H$ actions from the level below. $\pi _ { i }$ may adjust its policy to output these distant subgoals that have relatively high Q-values. Yet the lower level policy hierarchy $\Pi _ { i - 1 }$ has not been trained to achieve distant subgoals, which may cause the agent to act erratically.
|
| 103 |
+
|
| 104 |
+
A second, less significant shortcoming is that hindsight action and goal transitions do not incentivize a subgoal level to propose paths to the goal state that the lower levels can actually execute with its current policy hierarchy. Hindsight action and goal transitions purposefully incentivize a subgoal level to ignore the current capabilities of lower level policies and propose the shortest path of subgoals that has been found. But this strategy can be suboptimal because it may cause a subgoal level to prefer a path of subgoals that cannot yet be achieved by the lower level policy hierarchy over subgoal paths that both lead to the goal state and can be achieved by the lower level policy hierarchy.
|
| 105 |
+
|
| 106 |
+
Our framework addresses the above issues by supplying agents with a third set of transitions, which we will refer to as subgoal testing transitions. Subgoal testing transitions essentially play the opposite role of hindsight action transitions. While hindsight actions transitions help a subgoal level learn the value of a subgoal state when lower level policies are optimal, subgoal testing transitions enable a level to understand whether a subgoal state can be achieved by the current set of lower level policies.
|
| 107 |
+
|
| 108 |
+
Subgoal testing transitions are implemented as follows. After level $i$ proposes a subgoal $a _ { i }$ , a certain fraction of the time $\lambda$ , the lower level behavior policy hierarchy, $\Pi _ { i - 1 _ { b } }$ , used to achieve subgoal $a _ { i }$ must be the current lower level policy hierarchy $\Pi _ { i - 1 }$ . That is, instead of a level being able to explore with a noisy policy when trying to achieve its goal, the current lower level policy hierarchy must be followed exactly. Then, if subgoal $a _ { i }$ is not achieved in at most $H$ actions by level $i - 1$ , level $i$ will be penalized with a low reward, penalty. In our experiments, we set $p e n a l t y = - H$ , or the negative of the maximum horizon of a subgoal. In addition, we use a discount rate of 0 in these transitions to avoid non-stationary transition function issues.
|
| 109 |
+
|
| 110 |
+
Using the robot example in Figure 2, after the robot proposes the ambitious subgoal $g _ { 2 }$ when in state $s _ { 2 }$ , the robot may randomly decide to test that subgoal. The low level policy then has at most $H = 5$ primitive actions to achieve $g _ { 2 }$ . These primitive actions must follow $\pi _ { 0 }$ exactly. Because the robot misses its subgoal, it would be penalized with following transition [initial state $= s _ { 2 }$ , $a c t i o n = g _ { 2 }$ reward $= - 5$ , next state $= s _ { 3 }$ , goal $=$ Yellow Flag, discount rate $= O J$ .
|
| 111 |
+
|
| 112 |
+
Subgoal testing transitions have three different effects on Q-values depending on the (state, goal, subgoal action) tuple that is under consideration. For this analysis, we use the notation $| s - a |$ to refer to the number of actions required by an optimal version of the policy at the level below, $\pi _ { i - 1 } ^ { * }$ , to move the agent from state $s$ to subgoal state $a$ .
|
| 113 |
+
|
| 114 |
+
1. $| s - a | > H$ : For those (state, goal, subgoal action) tuples in which the subgoal action could never be completed with $H$ actions by the optimal policy at the level below, the critic function will be incentivized to learn Q-values of $- H$ because the only transitions a subgoal level will receive for these tuples is the penalty transition. Thus, subgoal testing transitions can overcome the major flaw of training only with hindsight action and goal transitions because now the more distant subgoal actions are no longer ignored.
|
| 115 |
+
|
| 116 |
+
2. $| s - a | \le H$ and Achievable by $\Pi _ { i - 1 }$ : For those (state, goal, subgoal action) tuples in which the subgoal action can be achieved by the current lower level policy hierarchy $\Pi _ { i - 1 }$ , subgoal testing should have little to no effect. Critic functions will be incentivized to learn Q-values close to the Q-value targets prescribed by the hindsight action and hindsight goal transitions.
|
| 117 |
+
|
| 118 |
+
3. $| s - a | \le H$ and Not Achievable by $\Pi _ { i - 1 }$ : The effects of subgoal testing are a bit more subtle for those (state, goal, subgoal action) tuples in which the subgoal action can be achieved with at most $H$ actions by an optimal version of the policy below, $\pi _ { i - 1 } ^ { * }$ , but cannot yet be achieved with the current policy $\pi _ { i - 1 }$ . For these tuples, critic functions are incentivized to assign a Q-value that is a weighted average of the target Q-values prescribed by the hindsight action/goal transitions and the penalty value of $- H$ prescribed by the subgoal testing transitions. However, it is important to note that for any given tuple there are likely significantly fewer subgoal testing transitions than the total number of hindsight action and goal transitions. Hindsight action transitions are created after every subgoal action, even during subgoal testing, whereas subgoal testing transitions are not created after each subgoal action. Thus, the critic function is likely to assign Q-values closer to the target value prescribed by the hindsight action and hindsight goal transitions than the penalty value of $- H$ prescribed by the subgoal testing transition.
|
| 119 |
+
|
| 120 |
+
To summarize, subgoal testing transitions can overcome the issues caused by only training with hindsight goal and hindsight action transitions while still enabling all policies of the hierarchy to be learned in parallel. With subgoal testing transitions, critic functions no longer ignore the Q-values of infeasible subgoals. In addition, each subgoal level can still learn simultaneously with lower levels because Q-values are predominately decided by hindsight action and goal transitions, but each level will have a preference for paths of subgoals that can be achieved by the current lower level policy hierarchy.
|
| 121 |
+
|
| 122 |
+
# 4.6 ALGORITHMS
|
| 123 |
+
|
| 124 |
+
Algorithm 1 in the Appendix shows the full procedure for Hierarchical Actor-Critic (HAC). Section 7.6 in the Appendix provides additional HAC implementation details. We also provide the discrete version of our algorithm, Hierarchical $Q$ -Learning (HierQ), in Algorithm 2 in the Appendix.
|
| 125 |
+
|
| 126 |
+
# 5 EXPERIMENTS
|
| 127 |
+
|
| 128 |
+
We evaluated our framework in several discrete state and action and continuous state and action tasks. The discrete tasks consisted of grid world environments. The continuous tasks consisted of the following simulated robotics environments developed in MuJoCo (Todorov et al., 2012): (i) inverted pendulum, (ii) UR5 reacher, (iii) ant reacher, and (iv) ant four rooms. A video showing our experiments is available at https://www.youtube.com/watch?v $=$ DYcVTveeNK0. Figure 3 shows some episode sequences from the grid world and inverted pendulum environments for a 2-level agent.
|
| 129 |
+
|
| 130 |
+

|
| 131 |
+
Figure 3: Episode sequences from the four rooms (top) and inverted pendulum tasks (bottom). In the four rooms task, the $k { = } 2$ level agent is the blue square; the goal is the yellow square; the learned subgoal is the purple square. In the inverted pendulum task, the goal is the yellow sphere and the subgoal is the purple sphere.
|
| 132 |
+
|
| 133 |
+

|
| 134 |
+
Figure 4: Average success rates for 3-level (red), 2-level agent (blue), and flat (green) agents in each task. The error bars show 1 standard deviation.
|
| 135 |
+
|
| 136 |
+
# 5.1 RESULTS
|
| 137 |
+
|
| 138 |
+
We compared the performance of agents using policy hierarchies with 1 (i.e., flat), 2, and 3 levels on each task. The flat agents used Q-learning (Watkins & Dayan, 1992) with HER in the discrete tasks and DDPG (Lillicrap et al., 2015) with HER in the continuous tasks.
|
| 139 |
+
|
| 140 |
+
Our approach significantly outperformed the flat agent in all tasks. Figure 4 shows the average episode success rate for each type of agent in each task. The discrete tasks average data from 50 trials. The continuous tasks average data from at least 7 trials.
|
| 141 |
+
|
| 142 |
+
In addition, our empirical results show that our framework can benefit from additional levels of hierarchy likely because our framework can learn multiple levels of policies in parallel. In all tasks, the 3-level agent outperformed the 2-level agent, and the 2-level agent outperformed the flat agent.
|
| 143 |
+
|
| 144 |
+

|
| 145 |
+
Figure 5: Figure compares the performance of HAC (2 Levels) and HIRO. The charts show the average success rate and 1 standard deviation.
|
| 146 |
+
|
| 147 |
+
# 5.1.1 BASELINE COMPARISON
|
| 148 |
+
|
| 149 |
+
We also directly compared our approach HAC to another HRL technique, HIRO (Nachum et al., 2018), which outperforms the other leading HRL techniques that can work in continuous state and action spaces: FeUdal Networks (Vezhnevets et al., 2017) and Option-Critic (Bacon et al., 2017). HIRO enables agents to learn a 2-level hierarchical policy that like our approach can be trained off-policy and uses the state space to decompose a task. Two of the key differences between the algorithms are that (i) HIRO does not use Hindsight Experience Replay at either of the 2 levels and (ii) HIRO uses a different approach for handling the non-stationary transition functions. Instead of replacing the original proposed action with the hindsight action as in our approach, HIRO uses a subgoal action from a set of candidates that when provided to the current level 0 policy would most likely cause the sequence of (state, action) tuples that originally occurred at level 0 when the level 0 policy was trying to achieve its original subgoal. In other words, HIRO values subgoal actions with respect to a transition function that essentially uses the current lower level policy hierarchy, not the optimal lower level policy hierarchy as in our approach. Consequently, HIRO may need to wait until the lower level policy converges before the higher level can learn a meaningful policy.
|
| 150 |
+
|
| 151 |
+
We compared the 2-level version of HAC to HIRO on the inverted pendulum, UR5 reacher, and ant reacher tasks. In all experiments, the 2-level version of HAC significantly outperformed HIRO. The results are shown in Figure 5.
|
| 152 |
+
|
| 153 |
+
# 5.1.2 SUBGOAL TESTING ABLATION STUDIES
|
| 154 |
+
|
| 155 |
+
We also implemented some ablation studies examining our subgoal testing procedure. We compared our method to (i) no subgoal testing and (ii) always penalizing missed subgoals even when the lower levels use noisy policies when attempting to achieve a subgoal. Our implementation significantly outperformed both baselines. The results and analysis of the ablation studies are given in section 6 of the Appendix.
|
| 156 |
+
|
| 157 |
+
# 6 CONCLUSION
|
| 158 |
+
|
| 159 |
+
Hierarchy has the potential to accelerate learning but in order to realize this potential, hierarchical agents need to be able to learn their multiple levels of policies in parallel. We present a new HRL framework that can efficiently learn multiple levels of policies simultaneously. HAC can overcome the instability issues that arise when agents try to learn to make decisions at multiple time scales because the framework trains each level of the hierarchy as if the lower levels are already optimal. Our results in several discrete and continuous domains, which include the first 3-level agents in tasks with continuous state and action spaces, confirm that HAC can significantly improve sample efficiency.
|
| 160 |
+
|
| 161 |
+
# ACKNOWLEDGEMENTS
|
| 162 |
+
|
| 163 |
+
This work has been supported in part by the National Science Foundation through IIS-1724237, IIS-1427081, IIS-1724191, and IIS-1724257, NASA through NNX16AC48A and NNX13AQ85G,
|
| 164 |
+
|
| 165 |
+
ONR through N000141410047, Amazon through an ARA to Platt, Google through a FRA to Platt, and DARPA.
|
| 166 |
+
|
| 167 |
+
REFERENCES
|
| 168 |
+
M. Andrychowicz, F. Wolski, A. Ray, J. Schneider, R. Fong, P. Welinder, B. McGrew, J. Tobin, P. Abbeel, and W. Zaremba. Hindsight experience replay. In Advances in Neural Information Processing Systems 30, pp. 5048–5058. 2017.
|
| 169 |
+
P-L Bacon, J. Harb, and D. Precup. The option-critic architecture. In Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence, pp. 1726–1734, 2017.
|
| 170 |
+
Bram Bakker and Jurgen Schmidhuber. Hierarchical reinforcement learning with subpolicies spe- ¨ cializing for learned subgoals. In Neural Networks and Computational Intelligence, pp. 125–130, 2004.
|
| 171 |
+
T.G. Dietterich. Hierarchical reinforcement learning with the MAXQ value function decomposition. Journal of Artificial Intelligence Research, 13:227–303, 2000.
|
| 172 |
+
G.D. Konidaris and A.G. Barto. Skill discovery in continuous reinforcement learning domains using skill chaining. In Advances in Neural Information Processing Systems 22, pp. 1015–1023, 2009.
|
| 173 |
+
T.D. Kulkarni, K. Narasimhan, A. Saeedi, and J. Tenenbaum. Hierarchical deep reinforcement learning: Integrating temporal abstraction and intrinsic motivation. In Advances in Neural Information Processing Systems 29, pp. 3675–3683. 2016.
|
| 174 |
+
T.P. Lillicrap, J.J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa, D. Silver, and D. Wierstra. Continuous control with deep reinforcement learning. CoRR, abs/1509.02971, 2015. URL http://arxiv.org/abs/1509.02971.
|
| 175 |
+
A. McGovern and A.G. Barto. Automatic discovery of subgoals in reinforcement learning using diverse density. In Proceedings of the Eighteenth International Conference on Machine Learning, pp. 361–368, 2001.
|
| 176 |
+
I. Menache, S. Mannor, and N. Shimkin. Q-cut—dynamic discovery of sub-goals in reinforcement learning. In Proceedings of the Thirteenth European Conference on Machine Learning, pp. 295– 306, 2002.
|
| 177 |
+
O. Nachum, S. Gu, H. Lee, and S. Levine. Data-efficient hierarchical reinforcement learning. In Advances in Neural Information Processing Systems 31, pp. 3303–3313. 2018.
|
| 178 |
+
T. Schaul, D. Horgan, K. Gregor, and D. Silver. Universal value function approximators. In Proceedings of the 32nd International Conference on Machine Learning, volume 37, pp. 1312–1320, 2015.
|
| 179 |
+
Jurgen Schmidhuber. Learning to generate sub-goals for action sequences. ¨ Artificial Neural Networks, pp. 967–972, 1991.
|
| 180 |
+
O. S¸ ims¸ek, A.P. Wolfe, and A.G. Barto. Identifying useful subgoals in reinforcement learning by ¨ local graph partitioning. In Proceedings of the Twenty-Second International Conference on Machine Learning, pp. 816– 823, 2005.
|
| 181 |
+
R. S. Sutton, D. Precup, and S. Singh. Between MDPs and semi-MDPs: a framework for temporal abstraction in reinforcement learning. Artificial Intelligence Journal, 112:181–211, 1999.
|
| 182 |
+
E. Todorov, T. Erez, and Y. Tassa. MuJoCo: A physics engine for model-based control. Proceedings of the 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 5026– 5033, 2012.
|
| 183 |
+
A. Vezhnevets, S. Osindero, T. Schaul, N. Heess, M. Jaderberg, D. Silver, and K. Kavukcuoglu. FeUdal networks for hierarchical reinforcement learning. In Proceedings of the 34th International Conference on Machine Learning, pp. 3540–3549, 2017.
|
| 184 |
+
|
| 185 |
+
Christopher J. C. H. Watkins and Peter Dayan. Q-learning. In Machine Learning, pp. 279–292, 1992.
|
| 186 |
+
|
| 187 |
+
Marco Wiering and Jurgen Schmidhuber. HQ-learning. ¨ Adaptive Behaviour, 6(2):219–246, 1997.
|
| 188 |
+
|
| 189 |
+
# 7 APPENDIX
|
| 190 |
+
|
| 191 |
+
7.1 HIERARCHICAL ACTOR-CRITIC (HAC) ALGORITHM
|
| 192 |
+
|
| 193 |
+
# Algorithm 1 Hierarchical Actor-Critic (HAC)
|
| 194 |
+
|
| 195 |
+
#
|
| 196 |
+
|
| 197 |
+
• Key agent parameters: number of levels in hierarchy $k$ , maximum subgoal horizon $H$ , and subgoal testing frequency $\lambda$ .
|
| 198 |
+
|
| 199 |
+
#
|
| 200 |
+
|
| 201 |
+
• $k$ trained actor and critic functions $\pi _ { 0 } , . . . , \pi _ { k - 1 } , Q _ { 0 } , . . . , Q _ { k - 1 }$
|
| 202 |
+
|
| 203 |
+
for $M$ episodes do $\triangleright$ Train for M episodes $s \gets S _ { i n i t }$ , $g G _ { k - 1 }$ $\triangleright$ Sample initial state and task goal $t r a i n - l e v e l ( k - 1 , s , g )$ $\triangleright$ Begin training Update all actor and critic networks
|
| 204 |
+
end for
|
| 205 |
+
function TRAIN-LEVEL $( i : : l e v e l , s : : s t a t e , g : : g o a l )$ $s _ { i } \gets s$ , $g _ { i } g$ . Set current state and goal for level $i$ for $H$ attempts or until $g _ { n }$ , $i \leq n < k$ achieved do $a _ { i } \gets \pi _ { i } \bar { ( } s _ { i } , g _ { i } \big ) + n \bar { o } i s e$ (if not subgoal testing) $\triangleright$ Sample (noisy) action from policy if $i > 0$ then Determine whether to test subgoal $a _ { i }$ $s _ { i } ^ { ' } t r a i n - l e v e l ( i - 1 , s _ { i } , \bar { a } _ { i } )$ . Train level $i - 1$ using subgoal $a _ { i }$ else Execute primitive action $a _ { 0 }$ and observe next state $s _ { 0 }$ end if . Create replay transitions if $i > 0$ and $a _ { i }$ missed then if $a _ { i }$ was tested then $\triangleright$ Penalize subgoal $a _ { i }$ $R e p l a y . B u f f e r _ { i } \gets [ s = s _ { i } , a = a _ { i } , r = P e n a l t y , s ^ { ' } = s _ { i } ^ { ' } , g = g _ { i } , \gamma = 0 ]$ end if $a _ { i } s _ { i }$ $\triangleright$ Replace original action with action executed in hindsight end if $\triangleright$ Evaluate executed action on current goal and hindsight goals $\begin{array} { r } { R e p l a y \_ B u f f e r _ { i } \gets [ s = s _ { i } , a = a _ { i } , r \in \{ - 1 , 0 \} , s ^ { ' } = s _ { i } ^ { ' } , g = g _ { i } , \gamma \in \{ \gamma , 0 \} ] } \\ { H E R \_ S t o r a g e _ { i } \gets [ s = s _ { i } , a = a _ { i } , r = T B D , s ^ { ' } = s _ { i } ^ { ' } , g = T B D , \gamma = T B D ] } \end{array}$ $s _ { i } \gets s _ { i } ^ { ' }$ end for Replay Bufferi Perform HER using HER Storagei transitions return s i . Output current state
|
| 206 |
+
end function
|
| 207 |
+
|
| 208 |
+
# 7.2 HIERARCHICAL Q-LEARNING (HIERQ) ALGORITHM
|
| 209 |
+
|
| 210 |
+
HierQ is the version of our algorithm designed for domains with discrete state and action spaces. Note that HierQ does not use subgoal testing. Instead, the algorithm uses pessimistic Q-value initializations to prevent agents from learning to propose subgoal states that are too distant.
|
| 211 |
+
|
| 212 |
+
# Algorithm 2 Hierarchical Q-Learning (HierQ)
|
| 213 |
+
|
| 214 |
+
#
|
| 215 |
+
|
| 216 |
+
• Key agent parameters: number of levels in hierarchy $k > 1$ , maximum subgoal horizon $H$ , learning rate $\alpha$ Output: • $k$ trained Q-tables $Q _ { 0 } ( s , g , a ) , . . . , Q _ { k - 1 } ( s , g , a )$ Use pessimistic $\mathrm { Q }$ -value initialization: $Q _ { i } ( s , g , a ) \leq - H ^ { i + 1 }$ for $M$ episodes do $\triangleright$ Train for M episodes sk−1 ← Sinit, $g _ { k - 1 } G _ { k - 1 }$ $\triangleright$ Sample initial state and task goal . Initialize previous state arrays for levels $i , 0 < i < k$ $P r e v _ { - } S t a t e s _ { i } \gets A r r a y [ H ^ { i } ]$ $\triangleright$ Length of level $i$ array is $H ^ { i }$ while $g _ { k - 1 }$ not achieved do $\triangleright$ Begin Training $a _ { k - 1 } \pi _ { k - 1 _ { b } } ( s _ { k - 1 } , g _ { k - 1 } )$ $\triangleright$ Sample action using $\epsilon$ -greedy policy $\pi _ { k - 1 _ { b } }$ $\begin{array} { r l } & { \mathbf { \Phi } ^ { \mathrm { u } _ { K - 1 } } \cdot \mathbf { \Phi } ^ { \mathrm { \prime } _ { \{ ^ { * } K - 1 _ { b } \{ ^ { \circ } K - 1 \} , \forall \kappa - 1 / } } } \\ & { s _ { k - 1 } \gets t r a i n - l e v e l ( k - 2 , s _ { k - 1 } , a _ { k - 1 } ) } \end{array}$ $\triangleright$ Train next level end while end for function TRAIN-LEVEL $( i : : l e v e l , s : : s t a t e , g : : g o a l )$ $s _ { i } \gets s$ , $g _ { i } g$ . Set current state and goal for level $i$ for $H$ attempts or until $g _ { n }$ $, i \leq n < k$ achieved do $a _ { i } \pi _ { i _ { b } } ( s _ { i } , g _ { i } )$ $\triangleright$ Sample action using $\epsilon$ -greedy policy $\pi _ { i _ { b } }$ if $i > 0$ then $s _ { i } ^ { ' } t r a i n - l e v e l ( i - 1 , s _ { i } , a _ { i } )$ . Train level $i - 1$ using subgoal $a _ { i }$ else Execute primitive action $a _ { 0 }$ and observe next state $^ { \prime }$ $s _ { 0 }$ $\triangleright$ Update $Q _ { 0 } ( s , g , a )$ table for all possible subgoal states for each state $s _ { g o a l } \in S$ do $Q _ { 0 } ( s _ { 0 } , s _ { g o a l } , a _ { 0 } ) \xleftarrow { } { } ( 1 - \alpha ) \cdot Q _ { 0 } ( s _ { 0 } , s _ { g o a l } , a _ { 0 } ) + \alpha \cdot [ R _ { 0 } + \gamma m a x _ { a } Q _ { 0 } ( s _ { 0 } ^ { \prime } , s _ { g o a l } , a _ { 0 } ) ]$ end for $\triangleright$ Add state $s _ { 0 }$ to all previous state arrays $P r e v _ { - } S t a t e s _ { i } s _ { 0 } , 0 < i < k$ . Update $Q _ { i } ( s , g , a ) , 0 < i < k$ , tables for each level $i , 0 < i < k$ do for each state $s \in P r e v \_ S t a t e s _ { i }$ do for each goal $s _ { g o a l } \in S$ do $Q _ { i } ( s , s _ { g o a l } , s _ { 0 } ^ { \prime } ) ~ ~ ( 1 ~ - ~ \alpha ) ~ \cdot ~ Q _ { i } ( s , s _ { g o a l } , s _ { 0 } ^ { \prime } ) ~ + ~ \alpha ~ \cdot ~ [ R _ { i } ~ + ~ \alpha ] ~$ γmaxaQi(s00, sgoal, a) end for end for end for end if $s _ { i } \gets s _ { i } ^ { ' }$ end for return s i . Output current state end function
|
| 217 |
+
|
| 218 |
+
# 7.3 UMDP TUPLE DEFINITIONS
|
| 219 |
+
|
| 220 |
+
We now formally define the UMDPs tuples for all levels.
|
| 221 |
+
|
| 222 |
+
$\mathcal { U } _ { 0 }$ : This is the lowest level of the hierarchy. It has the same state set, action set, and state transition function as $\mathcal { U } _ { o r i g i n a l }$ : ${ \cal S } _ { 0 } = { \cal S } , { \cal A } _ { 0 } = { \cal A }$ , and $T _ { 0 } ~ = ~ T$ . The goal states for which $\mathcal { U } _ { 0 }$ will be responsible for learning will be dictated by the UMDP one level higher, $\mathcal { U } _ { 1 }$ . However, given that every state is potentially a goal, the goal space is defined to be the state space: $\mathcal { G } _ { 0 } ~ = ~ \mathcal { S }$ . The framework is flexible as to the reward function used at level 0, but we will use the shortest path reward function, in which a reward of 0 is granted if the next state, $s ^ { \prime }$ , maps to the goal and $^ { - 1 }$ otherwise: $R _ { 0 } ( s ^ { \prime } , g ) = 0 , \forall s ^ { \prime } : s ^ { \prime } \in g$ and $R _ { 0 } ( s ^ { \prime } , g ) = - 1 , \forall s ^ { \prime } : s ^ { \prime } \notin g$ . In addition, the discount rate is set to 0 if the goal has been achieved, but remains $\gamma$ otherwise: $\bar { \gamma } _ { 0 } ( s ^ { \prime } , g ) = 0 , \forall s ^ { \prime } : s ^ { \prime } \in g$ , $\gamma _ { 0 } ( s ^ { \prime } , g ) \ = \ \gamma , \forall s ^ { \prime } \ : \ s ^ { \prime } \ \notin \ g$ . $\mathcal { U } _ { \mathrm { 0 } }$ $\pi _ { 0 } : { \mathcal { S } } _ { 0 } , { \mathcal { G } } _ { 0 } \to { \mathcal { A } } _ { 0 }$ thatnitial $\begin{array} { r } { { v } _ { \pi _ { 0 } } ( s , g ) \underline { { = } } \mathbb { E } _ { \pi _ { 0 } } [ \sum _ { n = 0 } ^ { \infty } \gamma _ { 0 } ^ { n } R _ { 0 _ { t + n + 1 } } | \bar { s } _ { 0 _ { t } } = s , g _ { 0 _ { t } } = g ] } \end{array}$ state and goal combinations that the policy $\pi _ { 1 }$ from $\mathcal { U } _ { 1 }$ requires.
|
| 223 |
+
|
| 224 |
+
$\mathcal { U } _ { i } , 1 \leq i < k$ : These UMDPs represent the remainder of the hierarchy. The state space is the same as the state space in $U _ { o r i g i n a l }$ : ${ { S } _ { i } } = { { S } }$ . For all levels except for the top level, the set of goals is dictated by the level above. These goals can potentially be any state: $G _ { i } = \bar { \mathcal { S } } , 1 \leq i < k { - } 1$ . For the top level, the goal set is provided by the task: $\mathcal { G } _ { k - 1 } = \mathcal { G }$ . The action space is the state space as these policies will output subgoal states for the next level to achieve: $A _ { i } = S$ . The state transition function consists of two transition functions: $T _ { i | \hat { \Pi } _ { i - 1 } } ( s , a ) = \{ \mathrm { ( i ) } \ T _ { i | \Pi _ { i - 1 } ^ { * } } ( s , \bar { a } ) , \bar { a } = T _ { i | \Pi _ { i - 1 } _ { b } } ( s , \pi _ { i _ { b } } ( s , g _ { i } ) )$ , (ii) $T _ { i \left| \Pi _ { i - 1 } \right. } ( s , a ) \}$ . The first transition function will be used to generate hindsight transitions. Note that the action $\bar { a }$ passed to the first transition function must be generated by some hierarchical behavior policy $\Pi _ { i _ { b } }$ . The second transition function will be used for subgoal testing and will follow the current lower level policy hierarchy exactly. The reward function is $\bar { R } _ { i } ( a , s ^ { \prime } , g ) = p e n a l t y , \forall s ^ { \prime } : s ^ { \prime } \notin a ,$ $R _ { i } ( a , s ^ { \prime } , g ) \bar { = } - 1 , \forall s ^ { \prime } : ( \bar { s ^ { \prime } } \in a ) \land ( s ^ { \prime } \notin g )$ , and $R _ { i } ( a , s ^ { \prime } , g ) = 0 , \forall s ^ { \prime } : ( s ^ { \prime } \in a ) \land ( s ^ { \prime } \in g ) .$ . The penalty reward is only issued during subgoal testing. $\gamma _ { i }$ is set to 0 if a subgoal is tested and missed or if an action achieves the goal, but is otherwise $\gamma$ from $\mathcal { U } _ { o r i g i n a l } : \gamma _ { i } ( a , s ^ { \prime } , g ) = 0 , \forall s ^ { \prime } : ( s ^ { \prime } \notin$ $a ) \vee ( s ^ { \prime } \in g )$ . The objective in each $U _ { i }$ is to learn a policy $\pi _ { i } : S _ { i } , { \mathcal { G } } _ { i } \to { \mathcal { A } } _ { i }$ that maximizes the value function $\begin{array} { r } { v _ { \pi _ { i } | \hat { \Pi } _ { i - 1 } } ( s , g ) = \mathbb { E } _ { \pi _ { i } | \hat { \Pi } _ { i - 1 } } \bigl [ \sum _ { n = 0 } ^ { \infty } \gamma ^ { n } R _ { i _ { t + n + 1 } } | s _ { i _ { t } } = s , g _ { i _ { t } } = g \bigr ] } \end{array}$ .
|
| 225 |
+
|
| 226 |
+
# 7.4 UMDP STATE TRANSITION FUNCTION
|
| 227 |
+
|
| 228 |
+
<table><tr><td>Algorithm 3 UMDP Ui Transition Function: Ti|IIi_1 (state, action)</td><td></td></tr><tr><td>Input: state s,action a,</td><td></td></tr><tr><td>Output: next state</td><td></td></tr><tr><td>return Execute - H - Actions(s,a,i -1,H)</td><td>Execute ≤ H actions using policy πi-1</td></tr><tr><td colspan="2">function ExECUTE-H-AcTiONs(s : state,a :: action,i :: level,itr :: iteration) s' =Ti|IIi-1(s,πi(s,a)) Execute 1 action using policy πi Decrement iteration counter</td></tr><tr><td colspan="2">itr -= 1</td></tr><tr><td colspan="2">if itr == 0 or s' ∈g,∀g∈{gi,.,gk-1} then</td></tr><tr><td colspan="2">return s' >Return next state if out of iterations or goal achieved else Execute another action from Ti</td></tr><tr><td colspan="2">return Execute- H - Actions(s',a,i,itr) end if</td></tr></table>
|
| 229 |
+
|
| 230 |
+
# 7.5 SUBGOAL TESTING ABLATION STUDIES
|
| 231 |
+
|
| 232 |
+
Both the qualitative and quantitative results of the subgoal testing ablation studies support our implementation. When no subgoal testing was used, the results were as expected. The subgoal policies would always learn to set unrealistic subgoals that could not be achieved within $H$ actions by the level below. This led to certain levels of the hierarchy needing to learn very long sequences of actions that the level was not trained to do. When the Q-values of these unrealistic subgoal states were examined, they were high, likely because there were no transitions indicating that these should have low Q-values.
|
| 233 |
+
|
| 234 |
+
The implementation of always penalizing subgoals even when a noisy lower level policy hierarchy was used also performed significantly worse than our implementation. One likely reason for this outcome is that always penalizing strategy incentivizes subgoal levels to output overly conservative subgoals, which means a subgoal level needs to learn longer sequences of subgoals that in turn take longer to learn. Subgoal levels are incentivized to set nearby subgoals because more distant ones are less likely to be achieved when noise is added to actions.
|
| 235 |
+
|
| 236 |
+

|
| 237 |
+
Figure 6: Results from the ablation studies examining our subgoal testing procedure. We compare our implementation to two other options: (i) no subgoal testing and (ii) an implementation in which all missed subgoals are penalized even when lower levels use noisy policies to try to achieve the subgoal state that is being tested. 3-level agents were used in all options.
|
| 238 |
+
|
| 239 |
+
# 7.6 HIERARCHICAL ACTOR-CRITIC IMPLEMENTATION DETAILS
|
| 240 |
+
|
| 241 |
+
Below we provide some of the important details of our implementation of HAC. For further detail, see the GitHub repository available at https://github.com/andrew-j-levy/ Hierarchical-Actor-Critc-HAC-.
|
| 242 |
+
|
| 243 |
+
• DDPG Parameters:
|
| 244 |
+
|
| 245 |
+
– Bounded Q-Values: We bound the output of each critic function to the range $[ - H , 0 ]$ using a negative sigmoid function. An upper bound of 0 was chosen because all rewards in HAC are nonpositive so positive Q-values are illegal. We believe the lower bound of $- H$ is helpful for learning Q-values as the critic function does not need to learn precise Q-values for the large space of irrelevant actions in which the current stat is far from the goal state. The bound of $- H$ also ensures that subgoal states that were reached in hindsight should have higher Q-values than any subgoal state that is too distant and penalized during subgoal testing. DDPG Target Networks: For the 2- and 3-level agents, we removed the target networks used in DDPG because we saw in some of our early MuJoCo experiments that these hierarchical agents performed at least as well without target networks. We evaluated the flat agents with and without target networks. The flat agent generally performed better with target networks, but our results show the better result of the two. Exploration: Each level uses the following exploration strategy when a level is not involved in subgoal testing. ∗ $20 \%$ of actions are sampled uniformly at random from the level’s action space $^ *$ $80 \%$ of actions are the sum of actions sampled from the level’s policy and Gaussian noise
|
| 246 |
+
– Neural Network Architectures: All actor and critic neural networks had 3 hidden layers, with 64 nodes in each hidden layer. ReLU activation functions were used.
|
| 247 |
+
|
| 248 |
+
• HAC Parameters: – Maximum horizon of a subgoal, $H$ : 1. For $k { = } 3$ -level agents in MuJoCo tasks, $H = 1 0$
|
| 249 |
+
|
| 250 |
+
2. For $k { = } 2$ -level agents in MuJoCo tasks, $H$ was generally in the range [20,30] – Subgoal testing rate $\lambda = 0 . 3$ – Goal and subgoal achievement thresholds were hand-crafted.
|
parse/train/ryzECoAcY7/ryzECoAcY7_content_list.json
ADDED
|
@@ -0,0 +1,1281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "LEARNING MULTI-LEVEL HIERARCHIES WITHHINDSIGHT",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
174,
|
| 8 |
+
98,
|
| 9 |
+
823,
|
| 10 |
+
145
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Andrew Levy \nDepartment of Computer Science \nBrown University \nProvidence, RI, USA \nandrew levy2@brown.edu \nGeorge Konidaris \nDepartment of Computer Science \nBrown University \nProvidence, RI, USA \ngdk@cs.brown.edu \nRobert Platt \nCollege of Computer and Information Science \nNortheastern University \nBoston, MA, USA \nrplatt@ccs.neu.edu \nKate Saenko \nDepartment of Computer Science \nBoston University \nBoston, MA, USA \nsaenko@bu.edu ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
184,
|
| 19 |
+
170,
|
| 20 |
+
405,
|
| 21 |
+
239
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "",
|
| 28 |
+
"bbox": [
|
| 29 |
+
593,
|
| 30 |
+
170,
|
| 31 |
+
813,
|
| 32 |
+
239
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "",
|
| 39 |
+
"bbox": [
|
| 40 |
+
184,
|
| 41 |
+
261,
|
| 42 |
+
486,
|
| 43 |
+
330
|
| 44 |
+
],
|
| 45 |
+
"page_idx": 0
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "text",
|
| 49 |
+
"text": "",
|
| 50 |
+
"bbox": [
|
| 51 |
+
593,
|
| 52 |
+
261,
|
| 53 |
+
815,
|
| 54 |
+
330
|
| 55 |
+
],
|
| 56 |
+
"page_idx": 0
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"type": "text",
|
| 60 |
+
"text": "ABSTRACT ",
|
| 61 |
+
"text_level": 1,
|
| 62 |
+
"bbox": [
|
| 63 |
+
454,
|
| 64 |
+
367,
|
| 65 |
+
544,
|
| 66 |
+
382
|
| 67 |
+
],
|
| 68 |
+
"page_idx": 0
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"type": "text",
|
| 72 |
+
"text": "Hierarchical agents have the potential to solve sequential decision making tasks with greater sample efficiency than their non-hierarchical counterparts because hierarchical agents can break down tasks into sets of subtasks that only require short sequences of decisions. In order to realize this potential of faster learning, hierarchical agents need to be able to learn their multiple levels of policies in parallel so these simpler subproblems can be solved simultaneously. Yet, learning multiple levels of policies in parallel is hard because it is inherently unstable: changes in a policy at one level of the hierarchy may cause changes in the transition and reward functions at higher levels in the hierarchy, making it difficult to jointly learn multiple levels of policies. In this paper, we introduce a new Hierarchical Reinforcement Learning (HRL) framework, Hierarchical Actor-Critic (HAC), that can overcome the instability issues that arise when agents try to jointly learn multiple levels of policies. The main idea behind HAC is to train each level of the hierarchy independently of the lower levels by training each level as if the lower level policies are already optimal. We demonstrate experimentally in both grid world and simulated robotics domains that our approach can significantly accelerate learning relative to other non-hierarchical and hierarchical methods. Indeed, our framework is the first to successfully learn 3-level hierarchies in parallel in tasks with continuous state and action spaces. We also present a video of our results and software to implement our framework. ",
|
| 73 |
+
"bbox": [
|
| 74 |
+
233,
|
| 75 |
+
398,
|
| 76 |
+
764,
|
| 77 |
+
676
|
| 78 |
+
],
|
| 79 |
+
"page_idx": 0
|
| 80 |
+
},
|
| 81 |
+
{
|
| 82 |
+
"type": "text",
|
| 83 |
+
"text": "1 INTRODUCTION ",
|
| 84 |
+
"text_level": 1,
|
| 85 |
+
"bbox": [
|
| 86 |
+
176,
|
| 87 |
+
704,
|
| 88 |
+
336,
|
| 89 |
+
719
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "Hierarchy has the potential to accelerate learning in sequential decision making tasks because hierarchical agents can decompose problems into smaller subproblems. In order to take advantage of these shorter horizon subproblems and realize the potential of HRL, an HRL algorithm must be able to learn the multiple levels within the hierarchy in parallel. That is, at the same time one level in the hierarchy is learning the sequence of subtasks needed to solve a task, the level below should be learning the sequence of shorter time scale actions needed to solve each subtask. Yet the existing HRL algorithms that are capable of automatically learning hierarchies in continuous domains (Schmidhuber, 1991; Konidaris & Barto, 2009; Bacon et al., 2017; Vezhnevets et al., 2017; Nachum et al., 2018) do not efficiently learn the multiple levels within the hierarchy in parallel. Instead, these algorithms often resort to learning the hierarchy one level at a time in a bottom-up fashion. ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
734,
|
| 99 |
+
825,
|
| 100 |
+
875
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "Learning multiple levels of policies in parallel is challenging due to non-stationary state transition functions. In nested, multi-level hierarchies, the transition function for any level above the ground level depends on the current policies below that level. For instance, in a 2-level hierarchy, the high-level policy may output a subgoal state for the low level to achieve, and the state to which this subgoal state leads will depend on the current low-level policy. When all policies within the hierarchy are trained simultaneously, the transition function at each level above ground level will continue to change as long as the policies below that level continue to be updated. In this setting of non-stationary transition functions, RL will likely struggle to learn the above ground level policies in the hierarchy because in order for RL methods to effectively value actions, the distribution of states to which those actions lead should be stable. However, learning multiple policies in parallel is still possible because the transition function for each level above ground level will stabilize once all lower level policies have converged to optimal or near optimal policies. Thus, RL can be used to learn all policies in parallel if each level above ground level had a way to simulate a transition function that uses the optimal versions of lower level policies. Our framework is able to simulate a transition function that uses an optimal lower level policy hierarchy and thus can learn multiple levels of policies in parallel. ",
|
| 107 |
+
"bbox": [
|
| 108 |
+
176,
|
| 109 |
+
882,
|
| 110 |
+
823,
|
| 111 |
+
922
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 0
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "image",
|
| 117 |
+
"img_path": "images/961c1db41e551653cf3c8c9973aad9ed298306b3afe092adddfd277376248ee2.jpg",
|
| 118 |
+
"image_caption": [],
|
| 119 |
+
"image_footnote": [],
|
| 120 |
+
"bbox": [
|
| 121 |
+
174,
|
| 122 |
+
162,
|
| 123 |
+
410,
|
| 124 |
+
282
|
| 125 |
+
],
|
| 126 |
+
"page_idx": 1
|
| 127 |
+
},
|
| 128 |
+
{
|
| 129 |
+
"type": "image",
|
| 130 |
+
"img_path": "images/d44946f66aff31b28aa427a86230e14be5c5b6b95232abbb13a15791909cb2f4.jpg",
|
| 131 |
+
"image_caption": [
|
| 132 |
+
"Figure 1: An ant agent uses a 3-level hierarchy to traverse though rooms to reach its goal, represented by the yellow cube. $\\Pi _ { 2 }$ uses as input the current state (joint positions $\\theta$ and velocities $\\dot { \\theta }$ ) and goal state (yellow box) and outputs a subgoal state (green box) for $\\Pi _ { 1 }$ to achieve. $\\Pi _ { 1 }$ takes in the current state and its goal state (green box) and outputs a subgoal state (purple box) for $\\Pi _ { 0 }$ to achieve. $\\Pi _ { 0 }$ takes in the current state and goal state (purple box) and outputs a vector of joint torques. "
|
| 133 |
+
],
|
| 134 |
+
"image_footnote": [],
|
| 135 |
+
"bbox": [
|
| 136 |
+
434,
|
| 137 |
+
103,
|
| 138 |
+
820,
|
| 139 |
+
309
|
| 140 |
+
],
|
| 141 |
+
"page_idx": 1
|
| 142 |
+
},
|
| 143 |
+
{
|
| 144 |
+
"type": "text",
|
| 145 |
+
"text": "",
|
| 146 |
+
"bbox": [
|
| 147 |
+
173,
|
| 148 |
+
441,
|
| 149 |
+
825,
|
| 150 |
+
622
|
| 151 |
+
],
|
| 152 |
+
"page_idx": 1
|
| 153 |
+
},
|
| 154 |
+
{
|
| 155 |
+
"type": "text",
|
| 156 |
+
"text": "We introduce a new HRL framework, Hierarchical Actor-Critic (HAC), that can significantly accelerate learning by enabling hierarchical agents to jointly learn a hierarchy of policies. Our framework is primarily comprised of two components: (i) a particular hierarchical architecture and (ii) a method for learning the multiple levels of policies in parallel given sparse rewards. ",
|
| 157 |
+
"bbox": [
|
| 158 |
+
174,
|
| 159 |
+
628,
|
| 160 |
+
825,
|
| 161 |
+
685
|
| 162 |
+
],
|
| 163 |
+
"page_idx": 1
|
| 164 |
+
},
|
| 165 |
+
{
|
| 166 |
+
"type": "text",
|
| 167 |
+
"text": "The hierarchies produced by HAC have a specific architecture consisting of a set of nested, goalconditioned policies that use the state space as the mechanism for breaking down a task into subtasks. The hierarchy of nested policies works as follows. The highest level policy takes as input the current state and goal state provided by the task and outputs a subgoal state. This state is used as the goal state for the policy at the next level down. The policy at that level takes as input the current state and the goal state provided by the level above and outputs its own subgoal state for the next level below to achieve. This process continues until the lowest level is reached. The lowest level then takes as input the current state and the goal state provided by the level above and outputs a primitive action. Further, each level has a certain number of attempts to achieve its goal state. When the level either runs out of attempts or achieves its goal state, execution at that level ceases and the level above outputs another subgoal. ",
|
| 168 |
+
"bbox": [
|
| 169 |
+
174,
|
| 170 |
+
691,
|
| 171 |
+
825,
|
| 172 |
+
844
|
| 173 |
+
],
|
| 174 |
+
"page_idx": 1
|
| 175 |
+
},
|
| 176 |
+
{
|
| 177 |
+
"type": "text",
|
| 178 |
+
"text": "Figure 1 shows how an ant agent trained with HAC uses its 3-level policy hierarchy $( \\pi _ { 2 } , \\pi _ { 1 } , \\pi _ { 0 } )$ to move through rooms to reach its goal. At the beginning of the episode, the ant’s highest level policy, $\\pi _ { 2 }$ , takes as input the current state, which in this case is a vector containing the ant’s joint positions and velocities $( [ \\theta , { \\dot { \\theta } } ] )$ , and its goal state, represented by the yellow box. $\\pi _ { 2 }$ then outputs a subgoal state, represented by the green box, for $\\pi _ { 1 }$ to achieve. $\\pi _ { 1 }$ takes as input the current state and its goal state represented by the green box and outputs the subgoal state represented by the purple box. Finally, $\\pi _ { 0 }$ takes as input the current state and the goal state represented by purple box and outputs a primitive action, which in this case is a vector of joint torques. $\\pi _ { 0 }$ has a fixed number of attempts to move to the purple box before $\\pi _ { 1 }$ outputs another subgoal state. Similarly, $\\pi _ { 1 }$ has a fixed number of subgoal states that it can output to try to move the agent to the green box before $\\pi _ { 2 }$ outputs another subgoal. ",
|
| 179 |
+
"bbox": [
|
| 180 |
+
174,
|
| 181 |
+
852,
|
| 182 |
+
823,
|
| 183 |
+
924
|
| 184 |
+
],
|
| 185 |
+
"page_idx": 1
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"type": "text",
|
| 189 |
+
"text": "",
|
| 190 |
+
"bbox": [
|
| 191 |
+
174,
|
| 192 |
+
103,
|
| 193 |
+
825,
|
| 194 |
+
188
|
| 195 |
+
],
|
| 196 |
+
"page_idx": 2
|
| 197 |
+
},
|
| 198 |
+
{
|
| 199 |
+
"type": "text",
|
| 200 |
+
"text": "In addition, HAC enables agents to learn multiple policies in parallel using only sparse reward functions as a result of two types of hindsight transitions. Hindsight action transitions help agents learn multiple levels of policies simultaneously by training each subgoal policy with respect to a transition function that simulates the optimal lower level policy hierarchy. Hindsight action transitions are implemented by using the subgoal state achieved in hindsight instead of the original subgoal state as the action component in the transition. For instance, when a subgoal level proposes subgoal state $A$ , but the next level policy is unsuccessful and the agent ends in state $B$ after a certain number of attempts, the subgoal level receives a transition in which the state $B$ is the action component, not state $A$ . The key outcome is that now the action and next state components in the transition are the same, as if the optimal lower level policy hierarchy had been used to achieve subgoal state $B$ . Training with respect to a transition function that uses the optimal lower level policy hierarchy is critical to learning multiple policies in parallel, because the subgoal policies can be learned independently of the changing lower level policies. With hindsight action transitions, a subgoal level can focus on learning the sequences of subgoal states that can reach a goal state, while the lower level policies focus on learning the sequences of actions to achieve those subgoal states. The second type of hindsight transition, hindsight goal transitions, helps each level learn a goal-conditioned policy in sparse reward tasks by extending the idea of Hindsight Experience Replay (Andrychowicz et al. (2017)) to the hierarchical setting. In these transitions, one of the states achieved in hindsight is used as the goal state in the transition instead of the original goal state. ",
|
| 201 |
+
"bbox": [
|
| 202 |
+
173,
|
| 203 |
+
194,
|
| 204 |
+
825,
|
| 205 |
+
458
|
| 206 |
+
],
|
| 207 |
+
"page_idx": 2
|
| 208 |
+
},
|
| 209 |
+
{
|
| 210 |
+
"type": "text",
|
| 211 |
+
"text": "We evaluated our approach on both grid world tasks and more complex simulated robotics environments. For each task, we evaluated agents with 1, 2, and 3 levels of hierarchy. In all tasks, agents using multiple levels of hierarchy substantially outperformed agents that learned a single policy. Further, in all tasks, agents using 3 levels of hierarchy outperformed agents using 2 levels of hierarchy. Indeed, our framework is the first to show empirically that it can jointly learn 3-level hierarchical policies in tasks with continuous state and action spaces. In addition, our approach outperformed another leading HRL algorithm, HIRO (Nachum et al., 2018), on three simulated robotics tasks. ",
|
| 212 |
+
"bbox": [
|
| 213 |
+
174,
|
| 214 |
+
464,
|
| 215 |
+
823,
|
| 216 |
+
563
|
| 217 |
+
],
|
| 218 |
+
"page_idx": 2
|
| 219 |
+
},
|
| 220 |
+
{
|
| 221 |
+
"type": "text",
|
| 222 |
+
"text": "2 RELATED WORK ",
|
| 223 |
+
"text_level": 1,
|
| 224 |
+
"bbox": [
|
| 225 |
+
176,
|
| 226 |
+
614,
|
| 227 |
+
343,
|
| 228 |
+
631
|
| 229 |
+
],
|
| 230 |
+
"page_idx": 2
|
| 231 |
+
},
|
| 232 |
+
{
|
| 233 |
+
"type": "text",
|
| 234 |
+
"text": "Building agents that can learn hierarchical policies is a longstanding problem in Reinforcement Learning (Sutton et al., 1999; Dietterich, 2000; McGovern & Barto, 2001; Kulkarni et al., 2016; Menache et al., 2002; S¸ ims¸ek et al., 2005; Bakker & Schmidhuber, 2004; Wiering & Schmidhuber, 1997). However, most HRL approaches either only work in discrete domains, require pre-trained low-level controllers, or need a model of the environment. ",
|
| 235 |
+
"bbox": [
|
| 236 |
+
174,
|
| 237 |
+
666,
|
| 238 |
+
825,
|
| 239 |
+
736
|
| 240 |
+
],
|
| 241 |
+
"page_idx": 2
|
| 242 |
+
},
|
| 243 |
+
{
|
| 244 |
+
"type": "text",
|
| 245 |
+
"text": "There are several other automated HRL techniques that can work in continuous domains. Schmidhuber (1991) proposed a HRL approach that can support multiple levels, as in our method. However, the approach requires that the levels are trained one at a time, beginning with the bottom level, which can slow learning. Konidaris & Barto (2009) proposed Skill Chaining, a 2-level HRL method that incrementally chains options backwards from the end goal state to the start state. Our key advantage relative to Skill Chaining is that our approach can learn the options needed to bring the agent from the start state to the goal state in parallel rather than incrementally. Nachum et al. (2018) proposed HIRO, a 2-level HRL approach that can learn off-policy like our approach and outperforms two other popular HRL techniques used in continuous domains: Option-Critic (Bacon et al. (2017)) and FeUdal Networks (FUN) (Vezhnevets et al. (2017)). HIRO, which was developed simultaneously and independently to our approach, uses the same hierarchical architecture, but does not use either form of hindsight and is therefore not as efficient at learning multiple levels of policies in sparse reward tasks. ",
|
| 246 |
+
"bbox": [
|
| 247 |
+
173,
|
| 248 |
+
743,
|
| 249 |
+
825,
|
| 250 |
+
922
|
| 251 |
+
],
|
| 252 |
+
"page_idx": 2
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
"type": "text",
|
| 256 |
+
"text": "3 BACKGROUND ",
|
| 257 |
+
"text_level": 1,
|
| 258 |
+
"bbox": [
|
| 259 |
+
176,
|
| 260 |
+
102,
|
| 261 |
+
326,
|
| 262 |
+
117
|
| 263 |
+
],
|
| 264 |
+
"page_idx": 3
|
| 265 |
+
},
|
| 266 |
+
{
|
| 267 |
+
"type": "text",
|
| 268 |
+
"text": "We are interested in solving a Markov Decision Process (MDP) augmented with a set of goals $\\mathcal { G }$ (each a state or set of states) that we would like an agent to learn. We define an MDP augmented with a set of goals as a Universal MDP (UMDP). A UMDP is a tuple ${ \\mathcal { U } } = ( S , \\mathcal { G } , \\mathcal { A } , T , R , \\gamma )$ , in which $s$ is the set of states; $\\mathcal { G }$ is the set of goals; $\\mathcal { A }$ is the set of actions; $T$ is the transition probability function in which $T ( s , a , s ^ { \\prime } )$ is the probability of transitioning to state $s ^ { \\prime }$ when action $a$ is taken in state $s ; R$ is the reward function; $\\gamma$ is the discount rate $\\in [ 0 , 1 )$ . At the beginning of each episode in a UMDP, a goal $g \\in { \\mathcal { G } }$ is selected for the entirety of the episode. The solution to a UMDP is a control policy $\\pi : { \\mathcal { S } } , { \\mathcal { G } } \\to { \\mathcal { A } }$ that maximizes the value function $\\begin{array} { r } { v _ { \\pi } ( s , g ) = \\mathbb { E } _ { \\pi } [ \\sum _ { n = 0 } ^ { \\infty } \\gamma ^ { n } R _ { t + n + 1 } | s _ { t } = s , \\tilde { g _ { t } } = \\bar { g } ] } \\end{array}$ for an initial state $s$ and goal $g$ . ",
|
| 269 |
+
"bbox": [
|
| 270 |
+
174,
|
| 271 |
+
137,
|
| 272 |
+
825,
|
| 273 |
+
263
|
| 274 |
+
],
|
| 275 |
+
"page_idx": 3
|
| 276 |
+
},
|
| 277 |
+
{
|
| 278 |
+
"type": "text",
|
| 279 |
+
"text": "In order to implement hierarchical agents in tasks with continuous state and actions spaces, we will use two techniques from the RL literature: (i) the Universal Value Function Approximator (UVFA) (Schaul et al., 2015) and (ii) Hindsight Experience Replay (Andrychowicz et al., 2017). The UVFA will be used to estimate the action-value function of a goal-conditioned policy $\\pi$ , $q _ { \\pi } ( s , g , a ) \\ =$ $\\begin{array} { r } { \\mathbb { E } _ { \\boldsymbol \\pi } [ \\sum _ { n = 0 } ^ { \\infty } \\gamma ^ { n } R _ { t + n + 1 } | s _ { t } = s , g _ { t } = g , a _ { t } = a ] } \\end{array}$ . In our experiments, the UVFAs used will be in the form of feedforward neural networks. UVFAs are important for learning goal-conditioned policies because they can potentially generalize $\\mathrm { Q }$ -values from certain regions of the (state, goal, action) tuple space to other regions of the tuple space, which can accelerate learning. However, UVFAs are less helpful in difficult tasks that use sparse reward functions. In these tasks when the sparse reward is rarely achieved, the UVFA will not have large regions of the (state, goal, action) tuple space with relatively high Q-values that it can generalize to other regions. For this reason, we also use Hindsight Experience Replay (Andrychowicz et al., 2017). HER is a data augmentation technique that can accelerate learning in sparse reward tasks. HER first creates copies of the [state, action, reward, next state, goal] transitions that are created in traditional off-policy RL. In the copied transitions, the original goal element is replaced with a state that was actually achieved during the episode, which guarantees that at least one of the HER transitions will contain the sparse reward. These HER transitions in turn help the UVFA learn about regions of the (state, goal, action) tuple space that should have relatively high Q-values, which the UVFA can then potentially extrapolate to the other areas of the tuple space that may be more relevant for achieving the current set of goals. ",
|
| 280 |
+
"bbox": [
|
| 281 |
+
174,
|
| 282 |
+
270,
|
| 283 |
+
825,
|
| 284 |
+
534
|
| 285 |
+
],
|
| 286 |
+
"page_idx": 3
|
| 287 |
+
},
|
| 288 |
+
{
|
| 289 |
+
"type": "text",
|
| 290 |
+
"text": "4 HIERARCHICAL ACTOR-CRITIC (HAC) ",
|
| 291 |
+
"text_level": 1,
|
| 292 |
+
"bbox": [
|
| 293 |
+
176,
|
| 294 |
+
561,
|
| 295 |
+
531,
|
| 296 |
+
578
|
| 297 |
+
],
|
| 298 |
+
"page_idx": 3
|
| 299 |
+
},
|
| 300 |
+
{
|
| 301 |
+
"type": "text",
|
| 302 |
+
"text": "We introduce a HRL framework, Hierarchical Actor-Critic, that can efficiently learn the levels in a multi-level hierarchy in parallel. HAC contains two components: (i) a particular hierarchical architecture and (ii) a method for learning the levels of the hierarchy simultaneously and independently. In this section, we will more formally present our proposed system as a UMDP transformation operation. ",
|
| 303 |
+
"bbox": [
|
| 304 |
+
174,
|
| 305 |
+
598,
|
| 306 |
+
825,
|
| 307 |
+
667
|
| 308 |
+
],
|
| 309 |
+
"page_idx": 3
|
| 310 |
+
},
|
| 311 |
+
{
|
| 312 |
+
"type": "text",
|
| 313 |
+
"text": "The purpose of our framework is to efficiently learn a $k$ -level hierarchy $\\Pi _ { k - 1 }$ consisting of $k$ individual policies $\\pi _ { 0 } , \\ldots , \\pi _ { k - 1 }$ , in which $k$ is a hyperparameter chosen by the user. In order to learn $\\pi _ { 0 } , \\ldots , \\pi _ { k - 1 }$ in parallel our framework transforms the original UMDP, $\\mathcal { U } _ { o r i g i n a l } =$ $( S , \\mathcal { G } , \\mathcal { A } , T , R , \\gamma )$ , into a set of $k$ UMDPs $\\mathcal { U } _ { 0 } , \\dotsc , \\mathcal { U } _ { k - 1 }$ , in which $\\mathcal { U } _ { i } = ( S _ { i } , \\mathcal { G } _ { i } , \\mathcal { A } _ { i } , T _ { i } , R _ { i } , \\gamma _ { i } )$ . In the remainder of the section, we will describe these tuples at a high-level. See section 7.3 in the Appendix for the full definition of each UMDP tuple. ",
|
| 314 |
+
"bbox": [
|
| 315 |
+
174,
|
| 316 |
+
674,
|
| 317 |
+
825,
|
| 318 |
+
758
|
| 319 |
+
],
|
| 320 |
+
"page_idx": 3
|
| 321 |
+
},
|
| 322 |
+
{
|
| 323 |
+
"type": "text",
|
| 324 |
+
"text": "4.1 STATE, GOAL, AND ACTION SPACES",
|
| 325 |
+
"text_level": 1,
|
| 326 |
+
"bbox": [
|
| 327 |
+
176,
|
| 328 |
+
782,
|
| 329 |
+
464,
|
| 330 |
+
797
|
| 331 |
+
],
|
| 332 |
+
"page_idx": 3
|
| 333 |
+
},
|
| 334 |
+
{
|
| 335 |
+
"type": "text",
|
| 336 |
+
"text": "In our approach, each level of the UMDP hierarchy learns its own deterministic policy: $\\pi _ { i } : S _ { i } , { \\mathcal { G } } _ { i } \\to$ $\\mathcal { A } _ { i } , 0 \\leq i \\leq k - 1$ . The state space for every level $i$ is identical to the state space in the original problem: ${ { S } _ { i } } = { { S } }$ . Since each level will learn to solve a shortest path problem with respect to a goal state, we set the goal space at each level $i$ to be identical to the state space: $\\mathcal { G } _ { i } = \\mathcal { S }$ . Finally, the action space at all levels except the bottom-most level is identical to the goal space of the next level down (i.e. the state space): $\\mathcal { A } _ { i } = \\mathcal { S } , i > 0$ . These levels output subgoal states for the next lower level to achieve. The action space of the bottom-most level is identical to the set of primitive actions that are available to the agent: $A _ { 0 } = A$ . ",
|
| 337 |
+
"bbox": [
|
| 338 |
+
174,
|
| 339 |
+
811,
|
| 340 |
+
825,
|
| 341 |
+
924
|
| 342 |
+
],
|
| 343 |
+
"page_idx": 3
|
| 344 |
+
},
|
| 345 |
+
{
|
| 346 |
+
"type": "image",
|
| 347 |
+
"img_path": "images/bed74fe62572689896e4ed5f489a5603370fac423b0548007a00f68ccf30f4d4.jpg",
|
| 348 |
+
"image_caption": [
|
| 349 |
+
"Figure 2: An example episode trajectory for a simple toy example. The tic marks along the trajectory show the next states for the robot after each primitive action is executed. The pink circles show the original subgoal actions. The gray circles show the subgoal states reached in hindsight after at most $H$ actions by the low-level policy. "
|
| 350 |
+
],
|
| 351 |
+
"image_footnote": [],
|
| 352 |
+
"bbox": [
|
| 353 |
+
251,
|
| 354 |
+
101,
|
| 355 |
+
743,
|
| 356 |
+
261
|
| 357 |
+
],
|
| 358 |
+
"page_idx": 4
|
| 359 |
+
},
|
| 360 |
+
{
|
| 361 |
+
"type": "text",
|
| 362 |
+
"text": "4.2 NESTED POLICIES ",
|
| 363 |
+
"text_level": 1,
|
| 364 |
+
"bbox": [
|
| 365 |
+
174,
|
| 366 |
+
342,
|
| 367 |
+
341,
|
| 368 |
+
356
|
| 369 |
+
],
|
| 370 |
+
"page_idx": 4
|
| 371 |
+
},
|
| 372 |
+
{
|
| 373 |
+
"type": "text",
|
| 374 |
+
"text": "HAC learns hierarchies of nested policies. Nesting is critical to decomposing problems because it enables agents to learn tasks requiring long sequences of primitive actions with policies that only need to learn short sequences of actions. HAC nests policies by embedding the policy at level $i - 1 , \\pi _ { i - 1 }$ , into the transition function at level $i$ , $T _ { i }$ . The transition function at each subgoal level, $T _ { i } , i > 0$ , will work as follows. The subgoal action selected $a _ { i }$ by level $i$ is assigned to be the goal of level $i - 1$ : $g _ { i - 1 } = a _ { i }$ . $\\pi _ { i - 1 }$ then has at most $H$ attempts to achieve $g _ { i - 1 }$ , in which $H$ , or the maximum horizon of a subgoal action, is another parameter provided by the user. When either $\\pi _ { i - 1 }$ runs out of $H$ attempts or a goal $g _ { n } , n \\geq i - 1$ , is achieved, the transition function terminates and the agent’s current state is returned. Level $i$ ’s state transition function $T _ { i }$ thus depends on the full policy hierarchy below level $i$ , $\\Pi _ { i - 1 }$ , due to the hierarchy’s nested architecture. Each action from $\\pi _ { i - 1 }$ depends on $T _ { i - 1 }$ , which depends on $\\pi _ { i - 2 }$ and so on. Consequently, we use the notation $T _ { i \\left. \\Pi _ { i - 1 } \\right. }$ for level $i$ ’s state transition function going forward as it depends on the full lower level policy hierarchy. The full state transition function for level $i > 0$ is provided in Algorithm 3 in the Appendix. The base transition function $T _ { 0 }$ is assumed to be provided by the task: $T _ { 0 } = T$ . ",
|
| 375 |
+
"bbox": [
|
| 376 |
+
173,
|
| 377 |
+
369,
|
| 378 |
+
825,
|
| 379 |
+
564
|
| 380 |
+
],
|
| 381 |
+
"page_idx": 4
|
| 382 |
+
},
|
| 383 |
+
{
|
| 384 |
+
"type": "text",
|
| 385 |
+
"text": "4.3 HINDSIGHT ACTION TRANSITIONS ",
|
| 386 |
+
"text_level": 1,
|
| 387 |
+
"bbox": [
|
| 388 |
+
176,
|
| 389 |
+
584,
|
| 390 |
+
454,
|
| 391 |
+
598
|
| 392 |
+
],
|
| 393 |
+
"page_idx": 4
|
| 394 |
+
},
|
| 395 |
+
{
|
| 396 |
+
"type": "text",
|
| 397 |
+
"text": "There are two causes of non-stationary transition functions in our framework that will need to be overcome in order to learn multiple policies in parallel. One cause of non-stationary transition functions is updates to lower level policies. That is, whenever $\\pi _ { i }$ changes, the transition function at levels above $i$ , $T _ { j | \\Pi _ { j - 1 } } , j > i$ , can change. The second cause is exploring lower level policies. Because all levels have a deterministic policy in our algorithm, all levels will need to explore with some behavior policy $\\pi _ { i _ { b } }$ that is different than the policy it is learning $\\pi _ { i }$ . For instance, in continuous domains, the agent may add Gaussian noise to its greedy policy: $\\overline { { \\pi } } _ { i _ { b } } = \\pi _ { i } + \\mathcal { N } ( 0 , \\sigma ^ { 2 } )$ for some variance $\\sigma ^ { 2 }$ . Yet whenever a lower level policy hierarchy uses some behavior policy $\\Pi _ { i - 1 _ { b } }$ to achieve a subgoal, the transition function at level $i$ , $T _ { i | \\Pi _ { i - 1 _ { b } } }$ , will also vary over time. RL methods will likely not be effective at learning subgoal policies in parallel if each subgoal policy at level $i$ is trained with respect to a transition function that uses the current lower level policy hierarchy $\\Pi _ { i - 1 }$ or the behavior lower level policy hierarchy $\\Pi _ { i - 1 _ { b } }$ . RL methods need the distribution of states to which actions lead to be stable in order to effectively value actions and both $\\Pi _ { i - 1 }$ and $\\Pi _ { i - 1 _ { b } }$ are continually changing. ",
|
| 398 |
+
"bbox": [
|
| 399 |
+
173,
|
| 400 |
+
611,
|
| 401 |
+
825,
|
| 402 |
+
794
|
| 403 |
+
],
|
| 404 |
+
"page_idx": 4
|
| 405 |
+
},
|
| 406 |
+
{
|
| 407 |
+
"type": "text",
|
| 408 |
+
"text": "In order to overcome these non-stationary issues that hinder the joint learning of policies, HAC instead trains each subgoal policy assuming a transition function that uses the optimal lower level policy hierarchy, $\\Pi _ { i - 1 } ^ { * }$ . $T _ { i | \\Pi _ { i - 1 } ^ { * } }$ is stationary because it is independent of the changing and exploring lower level policies, allowing an agent to learn a policy at level $i$ at the same time the agent learns policies below level $i$ . ",
|
| 409 |
+
"bbox": [
|
| 410 |
+
174,
|
| 411 |
+
800,
|
| 412 |
+
823,
|
| 413 |
+
872
|
| 414 |
+
],
|
| 415 |
+
"page_idx": 4
|
| 416 |
+
},
|
| 417 |
+
{
|
| 418 |
+
"type": "text",
|
| 419 |
+
"text": "Hindsight action transitions use a simple technique to simulate the transition function that uses the optimal policy hierarchy below level $i$ , $T _ { i | \\Pi _ { i - 1 } ^ { * } }$ . In order to explain how hindsight actions transitions are implemented, we will use the example in Figure 2, in which a $k = 2$ -level robot is looking to move from its start state to the yellow flag. The robot begins in state $s _ { 0 }$ when the high level policy $\\pi _ { 1 }$ outputs the subgoal state $g _ { 0 }$ for the low level to achieve. The low level policy $\\pi _ { 0 }$ then executes $H = 5$ primitive actions using some behavior policy $\\pi _ { 0 _ { b } }$ but is unable to achieve $g _ { 0 }$ , instead landing in $s _ { 1 }$ . After executing $H = 5$ primitive actions, the first action by $\\pi _ { 1 }$ is complete and a hindsight action transition can be created. ",
|
| 420 |
+
"bbox": [
|
| 421 |
+
176,
|
| 422 |
+
878,
|
| 423 |
+
823,
|
| 424 |
+
924
|
| 425 |
+
],
|
| 426 |
+
"page_idx": 4
|
| 427 |
+
},
|
| 428 |
+
{
|
| 429 |
+
"type": "text",
|
| 430 |
+
"text": "",
|
| 431 |
+
"bbox": [
|
| 432 |
+
174,
|
| 433 |
+
103,
|
| 434 |
+
823,
|
| 435 |
+
172
|
| 436 |
+
],
|
| 437 |
+
"page_idx": 5
|
| 438 |
+
},
|
| 439 |
+
{
|
| 440 |
+
"type": "text",
|
| 441 |
+
"text": "Hindsight action transitions have two key components. The first is that the subgoal state achieved in hindsight is used as the action component in the transition, not the originally proposed subgoal state. Thus, the hindsight action transition so far will look like: [initial state $\\mathbf { \\xi } = \\mathbf { \\xi } _ { S 0 }$ , $a c t i o n = s _ { 1 }$ , reward $=$ TBD, next state $\\mathbf { \\delta } = \\mathbf { \\delta } s _ { 1 }$ , $g o a l =$ yellow flag, discount rate $=$ gamma]. The second key component of the hindsight action transition is the reward function used at all subgoal levels. The first requirement for this reward function is that it should incentivize short paths to the goal because shorter paths can be learned more quickly. The second requirement for the reward function is that it should be independent of the path taken at lower levels. The purpose of hindsight action transitions is to simulate a transition function that uses the optimal lower level policy hierarchy $\\Pi _ { i - 1 } ^ { * }$ . Yet without a model of the environment, the exact path $\\Pi _ { i - 1 } ^ { * }$ would have taken is unknown. Thus, the reward should only be a function of the state reached in hindsight and the goal state. For each subgoal level, we use the reward function in which a reward of $^ { - 1 }$ is granted if the goal has not been achieved and a reward of 0 otherwise. Thus, in the example above, the high level of the robot would receive the hindsight action transition [initial state $\\mathbf { \\delta } = \\mathbf { \\nabla } _ { S 0 }$ , action $\\mathbf { \\delta } = \\mathbf { \\delta } s _ { 1 }$ , reward $= - l$ , next state $\\mathbf { \\delta } = \\mathbf { \\delta } s _ { 1 }$ , $g o a l =$ yellow flag, discount $\\cdot a t e = g a m m a J$ , which is the same transition that would have been created had the high level originally proposed state $s _ { 1 }$ as a subgoal and the transition function used the optimal lower level policy hierarchy to achieve it. Using the same process, the hindsight action transition created for the second action by $\\pi _ { 1 }$ would be [initial state $\\mathbf { \\mu } = s _ { 1 }$ , $a c t i o n = s _ { 2 }$ , reward $= - l$ , next state $\\mathbf { \\delta } = s _ { 2 }$ , goal $=$ yellow flag, discount rate $= \\gamma J$ . ",
|
| 442 |
+
"bbox": [
|
| 443 |
+
174,
|
| 444 |
+
180,
|
| 445 |
+
825,
|
| 446 |
+
444
|
| 447 |
+
],
|
| 448 |
+
"page_idx": 5
|
| 449 |
+
},
|
| 450 |
+
{
|
| 451 |
+
"type": "text",
|
| 452 |
+
"text": "Although none of the hindsight actions produced in the episode contained the sparse reward of 0, they are still helpful for the high level of the agent. Through these transitions, the high level discovers on its own possible subgoals that fit the time scale of $H$ primitive actions per high level action, which is the time scale that it should be learning. More importantly, these transitions are robust to a changing and exploring lower level policy $\\pi _ { 0 }$ because they assume a transition function that uses $\\pi _ { 0 } ^ { * }$ and not the current low level policy $\\pi _ { 0 }$ or low level behavior policy $\\pi _ { 0 _ { b } }$ . ",
|
| 453 |
+
"bbox": [
|
| 454 |
+
174,
|
| 455 |
+
450,
|
| 456 |
+
825,
|
| 457 |
+
535
|
| 458 |
+
],
|
| 459 |
+
"page_idx": 5
|
| 460 |
+
},
|
| 461 |
+
{
|
| 462 |
+
"type": "text",
|
| 463 |
+
"text": "4.4 HINDSIGHT GOAL TRANSITIONS",
|
| 464 |
+
"text_level": 1,
|
| 465 |
+
"bbox": [
|
| 466 |
+
178,
|
| 467 |
+
556,
|
| 468 |
+
439,
|
| 469 |
+
570
|
| 470 |
+
],
|
| 471 |
+
"page_idx": 5
|
| 472 |
+
},
|
| 473 |
+
{
|
| 474 |
+
"type": "text",
|
| 475 |
+
"text": "We supplement all levels of the hierarchy with an additional set of transitions, which we refer to as hindsight goal transitions, that enable each level to learn more effectively in sparse reward tasks by extending the idea of Hindsight Experience Replay (Andrychowicz et al., 2017) to the hierarchical setting. As the toy robot example illustrates, it can be difficult for any level in our framework to receive the sparse reward. A level needs to randomly reach its goal state in order to obtain the sparse reward. Hindsight goal transitions use another simple use of hindsight to guarantee that after every sequence of actions by each level in the hierarchy, that level receives a transition containing the sparse reward. ",
|
| 476 |
+
"bbox": [
|
| 477 |
+
174,
|
| 478 |
+
583,
|
| 479 |
+
823,
|
| 480 |
+
694
|
| 481 |
+
],
|
| 482 |
+
"page_idx": 5
|
| 483 |
+
},
|
| 484 |
+
{
|
| 485 |
+
"type": "text",
|
| 486 |
+
"text": "Hindsight goal transitions would be created for each level in the toy robot example as follows. Beginning with the low level, after each of the at most $H = 5$ primitive actions executed by the low level policy $\\pi _ { 0 }$ per high level action, the low level will create two transitions. The first transition is the typical transition non-hierarchical agents create evaluating the primitive action that was taken given the goal state. For instance, assuming the same shortest path reward function described earlier, after the first primitive action in the episode, the low level will receive the transition [initial state $=$ $s _ { 0 }$ , action $=$ joint torques, reward $= - l$ , next state $=$ first tick mark, $g o a l = g _ { 0 }$ , discount rate $= \\gamma J$ . The second transition is a copy of the first transition, but the goal state and reward components are temporarily erased: [initial state $\\mathbf { \\xi } = \\mathbf { \\xi } _ { S 0 }$ , action $=$ joint torques, reward $= T B D$ , next state $= \\mathit { f i r s t } \\mathit { t i c k }$ mark, $g o a l = T B D$ , discount rate $= \\gamma J$ . After the sequence of at most $H = 5$ primitive actions, the hindsight goal transitions will be created by filling in the TBD components in the extra transitions that were created. First, one of the “next state” elements in one of the transitions will be selected as the new goal state replacing the TBD component in each transition. Second, the reward will be updated in each transition to reflect the new goal state. For instance, after the first set of $H = 5$ primitive actions, the state $s _ { 1 }$ may be chosen as the hindsight goal. The hindsight goal transition created by the fifth primitive action that achieved the hindsight goal would then be [initial state $=$ ",
|
| 487 |
+
"bbox": [
|
| 488 |
+
174,
|
| 489 |
+
702,
|
| 490 |
+
825,
|
| 491 |
+
924
|
| 492 |
+
],
|
| 493 |
+
"page_idx": 5
|
| 494 |
+
},
|
| 495 |
+
{
|
| 496 |
+
"type": "text",
|
| 497 |
+
"text": "4th tick mark, action $=$ joint torques, reward $= { \\cal O }$ , next state $\\mathbf { \\delta } = \\mathbf { \\delta } s _ { 1 }$ , $g o a l = s _ { 1 }$ , discount rate $= O J$ . Moreover, hindsight goal transitions would be created in the same way for the high level of the toy robot, except that the hindsight goal transitions would be made from copies of the hindsight action transitions. Assuming the last state reached $s _ { 5 }$ is used as the hindsight goal, the first hindsight goal transition for the high level would be [initial state $\\mathbf { \\xi } = \\mathbf { \\xi } _ { S 0 }$ , $a c t i o n = s _ { 1 }$ , reward $= - l$ , next state $\\mathbf { \\delta } = \\mathbf { \\nabla } _ { S 1 }$ , $g o a l = s _ { 5 }$ , discount rate $= \\gamma J$ . The last hindsight goal transition for the high level would be [initial $s t a t e = s _ { 4 }$ , $a c t i o n = s _ { 5 }$ , reward $= { \\cal O } _ { ; }$ , next state $= s _ { 5 }$ , $g o a l = s _ { 5 }$ , discount rate $= O J$ . ",
|
| 498 |
+
"bbox": [
|
| 499 |
+
174,
|
| 500 |
+
103,
|
| 501 |
+
825,
|
| 502 |
+
202
|
| 503 |
+
],
|
| 504 |
+
"page_idx": 6
|
| 505 |
+
},
|
| 506 |
+
{
|
| 507 |
+
"type": "text",
|
| 508 |
+
"text": "Hindsight goal transitions should significantly help each level learn an effective goal-conditioned policy because it guarantees that after every sequence of actions, at least one transition will be created that contains the sparse reward (in our case a reward and discount rate of 0). These transitions containing the sparse reward will in turn incentivize the UVFA critic function to assign relatively high Q-values to the (state, action, goal) tuples described by these transitions. The UVFA can then potentially generalize these high $\\mathrm { Q }$ -values to the other actions that could help the level solve its tasks. ",
|
| 509 |
+
"bbox": [
|
| 510 |
+
174,
|
| 511 |
+
208,
|
| 512 |
+
825,
|
| 513 |
+
305
|
| 514 |
+
],
|
| 515 |
+
"page_idx": 6
|
| 516 |
+
},
|
| 517 |
+
{
|
| 518 |
+
"type": "text",
|
| 519 |
+
"text": "4.5 SUBGOAL TESTING TRANSITIONS ",
|
| 520 |
+
"text_level": 1,
|
| 521 |
+
"bbox": [
|
| 522 |
+
176,
|
| 523 |
+
325,
|
| 524 |
+
449,
|
| 525 |
+
340
|
| 526 |
+
],
|
| 527 |
+
"page_idx": 6
|
| 528 |
+
},
|
| 529 |
+
{
|
| 530 |
+
"type": "text",
|
| 531 |
+
"text": "Hindsight action and hindsight goal transitions give agents the potential to learn multiple policies in parallel with only sparse rewards, but some key issues remain. The most serious flaw is that the strategy only enables a level to learn about a restricted set of subgoal states. A level $i$ will only execute in hindsight subgoal actions that can be achieved with at most $H$ actions from level $i - 1$ . For instance, when the toy robot is in state $s _ { 2 }$ , it will not be able to achieve a subgoal state on the yellow flag in $H = 5$ primitive actions. As a result, level $i$ in a hierarchical agent will only learn Q-values for subgoal actions that are relatively close to its current state and will ignore the Q-values for all subgoal actions that require more than $H$ actions. This is problematic because the action space for all subgoal levels should be the full state space in order for the framework to be end-toend. If the action space is the full state space and the Q-function is ignoring large regions of the action space, significant problems will occur if the learned Q-function assigns higher Q-values to distant subgoals that the agent is ignoring than to feasible subgoals that can be achieved with at most $H$ actions from the level below. $\\pi _ { i }$ may adjust its policy to output these distant subgoals that have relatively high Q-values. Yet the lower level policy hierarchy $\\Pi _ { i - 1 }$ has not been trained to achieve distant subgoals, which may cause the agent to act erratically. ",
|
| 532 |
+
"bbox": [
|
| 533 |
+
174,
|
| 534 |
+
354,
|
| 535 |
+
825,
|
| 536 |
+
561
|
| 537 |
+
],
|
| 538 |
+
"page_idx": 6
|
| 539 |
+
},
|
| 540 |
+
{
|
| 541 |
+
"type": "text",
|
| 542 |
+
"text": "A second, less significant shortcoming is that hindsight action and goal transitions do not incentivize a subgoal level to propose paths to the goal state that the lower levels can actually execute with its current policy hierarchy. Hindsight action and goal transitions purposefully incentivize a subgoal level to ignore the current capabilities of lower level policies and propose the shortest path of subgoals that has been found. But this strategy can be suboptimal because it may cause a subgoal level to prefer a path of subgoals that cannot yet be achieved by the lower level policy hierarchy over subgoal paths that both lead to the goal state and can be achieved by the lower level policy hierarchy. ",
|
| 543 |
+
"bbox": [
|
| 544 |
+
174,
|
| 545 |
+
568,
|
| 546 |
+
825,
|
| 547 |
+
666
|
| 548 |
+
],
|
| 549 |
+
"page_idx": 6
|
| 550 |
+
},
|
| 551 |
+
{
|
| 552 |
+
"type": "text",
|
| 553 |
+
"text": "Our framework addresses the above issues by supplying agents with a third set of transitions, which we will refer to as subgoal testing transitions. Subgoal testing transitions essentially play the opposite role of hindsight action transitions. While hindsight actions transitions help a subgoal level learn the value of a subgoal state when lower level policies are optimal, subgoal testing transitions enable a level to understand whether a subgoal state can be achieved by the current set of lower level policies. ",
|
| 554 |
+
"bbox": [
|
| 555 |
+
174,
|
| 556 |
+
672,
|
| 557 |
+
825,
|
| 558 |
+
756
|
| 559 |
+
],
|
| 560 |
+
"page_idx": 6
|
| 561 |
+
},
|
| 562 |
+
{
|
| 563 |
+
"type": "text",
|
| 564 |
+
"text": "Subgoal testing transitions are implemented as follows. After level $i$ proposes a subgoal $a _ { i }$ , a certain fraction of the time $\\lambda$ , the lower level behavior policy hierarchy, $\\Pi _ { i - 1 _ { b } }$ , used to achieve subgoal $a _ { i }$ must be the current lower level policy hierarchy $\\Pi _ { i - 1 }$ . That is, instead of a level being able to explore with a noisy policy when trying to achieve its goal, the current lower level policy hierarchy must be followed exactly. Then, if subgoal $a _ { i }$ is not achieved in at most $H$ actions by level $i - 1$ , level $i$ will be penalized with a low reward, penalty. In our experiments, we set $p e n a l t y = - H$ , or the negative of the maximum horizon of a subgoal. In addition, we use a discount rate of 0 in these transitions to avoid non-stationary transition function issues. ",
|
| 565 |
+
"bbox": [
|
| 566 |
+
174,
|
| 567 |
+
762,
|
| 568 |
+
825,
|
| 569 |
+
875
|
| 570 |
+
],
|
| 571 |
+
"page_idx": 6
|
| 572 |
+
},
|
| 573 |
+
{
|
| 574 |
+
"type": "text",
|
| 575 |
+
"text": "Using the robot example in Figure 2, after the robot proposes the ambitious subgoal $g _ { 2 }$ when in state $s _ { 2 }$ , the robot may randomly decide to test that subgoal. The low level policy then has at most $H = 5$ primitive actions to achieve $g _ { 2 }$ . These primitive actions must follow $\\pi _ { 0 }$ exactly. Because the robot misses its subgoal, it would be penalized with following transition [initial state $= s _ { 2 }$ , $a c t i o n = g _ { 2 }$ reward $= - 5$ , next state $= s _ { 3 }$ , goal $=$ Yellow Flag, discount rate $= O J$ . ",
|
| 576 |
+
"bbox": [
|
| 577 |
+
176,
|
| 578 |
+
882,
|
| 579 |
+
823,
|
| 580 |
+
924
|
| 581 |
+
],
|
| 582 |
+
"page_idx": 6
|
| 583 |
+
},
|
| 584 |
+
{
|
| 585 |
+
"type": "text",
|
| 586 |
+
"text": "",
|
| 587 |
+
"bbox": [
|
| 588 |
+
173,
|
| 589 |
+
103,
|
| 590 |
+
823,
|
| 591 |
+
132
|
| 592 |
+
],
|
| 593 |
+
"page_idx": 7
|
| 594 |
+
},
|
| 595 |
+
{
|
| 596 |
+
"type": "text",
|
| 597 |
+
"text": "Subgoal testing transitions have three different effects on Q-values depending on the (state, goal, subgoal action) tuple that is under consideration. For this analysis, we use the notation $| s - a |$ to refer to the number of actions required by an optimal version of the policy at the level below, $\\pi _ { i - 1 } ^ { * }$ , to move the agent from state $s$ to subgoal state $a$ . ",
|
| 598 |
+
"bbox": [
|
| 599 |
+
174,
|
| 600 |
+
138,
|
| 601 |
+
825,
|
| 602 |
+
194
|
| 603 |
+
],
|
| 604 |
+
"page_idx": 7
|
| 605 |
+
},
|
| 606 |
+
{
|
| 607 |
+
"type": "text",
|
| 608 |
+
"text": "1. $| s - a | > H$ : For those (state, goal, subgoal action) tuples in which the subgoal action could never be completed with $H$ actions by the optimal policy at the level below, the critic function will be incentivized to learn Q-values of $- H$ because the only transitions a subgoal level will receive for these tuples is the penalty transition. Thus, subgoal testing transitions can overcome the major flaw of training only with hindsight action and goal transitions because now the more distant subgoal actions are no longer ignored. ",
|
| 609 |
+
"bbox": [
|
| 610 |
+
214,
|
| 611 |
+
209,
|
| 612 |
+
825,
|
| 613 |
+
292
|
| 614 |
+
],
|
| 615 |
+
"page_idx": 7
|
| 616 |
+
},
|
| 617 |
+
{
|
| 618 |
+
"type": "text",
|
| 619 |
+
"text": "2. $| s - a | \\le H$ and Achievable by $\\Pi _ { i - 1 }$ : For those (state, goal, subgoal action) tuples in which the subgoal action can be achieved by the current lower level policy hierarchy $\\Pi _ { i - 1 }$ , subgoal testing should have little to no effect. Critic functions will be incentivized to learn Q-values close to the Q-value targets prescribed by the hindsight action and hindsight goal transitions. ",
|
| 620 |
+
"bbox": [
|
| 621 |
+
214,
|
| 622 |
+
301,
|
| 623 |
+
823,
|
| 624 |
+
371
|
| 625 |
+
],
|
| 626 |
+
"page_idx": 7
|
| 627 |
+
},
|
| 628 |
+
{
|
| 629 |
+
"type": "text",
|
| 630 |
+
"text": "3. $| s - a | \\le H$ and Not Achievable by $\\Pi _ { i - 1 }$ : The effects of subgoal testing are a bit more subtle for those (state, goal, subgoal action) tuples in which the subgoal action can be achieved with at most $H$ actions by an optimal version of the policy below, $\\pi _ { i - 1 } ^ { * }$ , but cannot yet be achieved with the current policy $\\pi _ { i - 1 }$ . For these tuples, critic functions are incentivized to assign a Q-value that is a weighted average of the target Q-values prescribed by the hindsight action/goal transitions and the penalty value of $- H$ prescribed by the subgoal testing transitions. However, it is important to note that for any given tuple there are likely significantly fewer subgoal testing transitions than the total number of hindsight action and goal transitions. Hindsight action transitions are created after every subgoal action, even during subgoal testing, whereas subgoal testing transitions are not created after each subgoal action. Thus, the critic function is likely to assign Q-values closer to the target value prescribed by the hindsight action and hindsight goal transitions than the penalty value of $- H$ prescribed by the subgoal testing transition. ",
|
| 631 |
+
"bbox": [
|
| 632 |
+
212,
|
| 633 |
+
381,
|
| 634 |
+
825,
|
| 635 |
+
560
|
| 636 |
+
],
|
| 637 |
+
"page_idx": 7
|
| 638 |
+
},
|
| 639 |
+
{
|
| 640 |
+
"type": "text",
|
| 641 |
+
"text": "To summarize, subgoal testing transitions can overcome the issues caused by only training with hindsight goal and hindsight action transitions while still enabling all policies of the hierarchy to be learned in parallel. With subgoal testing transitions, critic functions no longer ignore the Q-values of infeasible subgoals. In addition, each subgoal level can still learn simultaneously with lower levels because Q-values are predominately decided by hindsight action and goal transitions, but each level will have a preference for paths of subgoals that can be achieved by the current lower level policy hierarchy. ",
|
| 642 |
+
"bbox": [
|
| 643 |
+
174,
|
| 644 |
+
575,
|
| 645 |
+
825,
|
| 646 |
+
672
|
| 647 |
+
],
|
| 648 |
+
"page_idx": 7
|
| 649 |
+
},
|
| 650 |
+
{
|
| 651 |
+
"type": "text",
|
| 652 |
+
"text": "4.6 ALGORITHMS ",
|
| 653 |
+
"text_level": 1,
|
| 654 |
+
"bbox": [
|
| 655 |
+
176,
|
| 656 |
+
695,
|
| 657 |
+
310,
|
| 658 |
+
709
|
| 659 |
+
],
|
| 660 |
+
"page_idx": 7
|
| 661 |
+
},
|
| 662 |
+
{
|
| 663 |
+
"type": "text",
|
| 664 |
+
"text": "Algorithm 1 in the Appendix shows the full procedure for Hierarchical Actor-Critic (HAC). Section 7.6 in the Appendix provides additional HAC implementation details. We also provide the discrete version of our algorithm, Hierarchical $Q$ -Learning (HierQ), in Algorithm 2 in the Appendix. ",
|
| 665 |
+
"bbox": [
|
| 666 |
+
176,
|
| 667 |
+
723,
|
| 668 |
+
825,
|
| 669 |
+
766
|
| 670 |
+
],
|
| 671 |
+
"page_idx": 7
|
| 672 |
+
},
|
| 673 |
+
{
|
| 674 |
+
"type": "text",
|
| 675 |
+
"text": "5 EXPERIMENTS ",
|
| 676 |
+
"text_level": 1,
|
| 677 |
+
"bbox": [
|
| 678 |
+
176,
|
| 679 |
+
791,
|
| 680 |
+
326,
|
| 681 |
+
808
|
| 682 |
+
],
|
| 683 |
+
"page_idx": 7
|
| 684 |
+
},
|
| 685 |
+
{
|
| 686 |
+
"type": "text",
|
| 687 |
+
"text": "We evaluated our framework in several discrete state and action and continuous state and action tasks. The discrete tasks consisted of grid world environments. The continuous tasks consisted of the following simulated robotics environments developed in MuJoCo (Todorov et al., 2012): (i) inverted pendulum, (ii) UR5 reacher, (iii) ant reacher, and (iv) ant four rooms. A video showing our experiments is available at https://www.youtube.com/watch?v $=$ DYcVTveeNK0. Figure 3 shows some episode sequences from the grid world and inverted pendulum environments for a 2-level agent. ",
|
| 688 |
+
"bbox": [
|
| 689 |
+
173,
|
| 690 |
+
825,
|
| 691 |
+
825,
|
| 692 |
+
924
|
| 693 |
+
],
|
| 694 |
+
"page_idx": 7
|
| 695 |
+
},
|
| 696 |
+
{
|
| 697 |
+
"type": "image",
|
| 698 |
+
"img_path": "images/0edce2c139bd087846e5f74cacb681dbde2da9e42c5123dd48bb92852a18381c.jpg",
|
| 699 |
+
"image_caption": [
|
| 700 |
+
"Figure 3: Episode sequences from the four rooms (top) and inverted pendulum tasks (bottom). In the four rooms task, the $k { = } 2$ level agent is the blue square; the goal is the yellow square; the learned subgoal is the purple square. In the inverted pendulum task, the goal is the yellow sphere and the subgoal is the purple sphere. "
|
| 701 |
+
],
|
| 702 |
+
"image_footnote": [],
|
| 703 |
+
"bbox": [
|
| 704 |
+
173,
|
| 705 |
+
102,
|
| 706 |
+
823,
|
| 707 |
+
324
|
| 708 |
+
],
|
| 709 |
+
"page_idx": 8
|
| 710 |
+
},
|
| 711 |
+
{
|
| 712 |
+
"type": "image",
|
| 713 |
+
"img_path": "images/28031fca0167200881bf70ca308b908388b36ad0f829a7df688617047cf225e1.jpg",
|
| 714 |
+
"image_caption": [
|
| 715 |
+
"Figure 4: Average success rates for 3-level (red), 2-level agent (blue), and flat (green) agents in each task. The error bars show 1 standard deviation. "
|
| 716 |
+
],
|
| 717 |
+
"image_footnote": [],
|
| 718 |
+
"bbox": [
|
| 719 |
+
173,
|
| 720 |
+
401,
|
| 721 |
+
826,
|
| 722 |
+
683
|
| 723 |
+
],
|
| 724 |
+
"page_idx": 8
|
| 725 |
+
},
|
| 726 |
+
{
|
| 727 |
+
"type": "text",
|
| 728 |
+
"text": "5.1 RESULTS ",
|
| 729 |
+
"text_level": 1,
|
| 730 |
+
"bbox": [
|
| 731 |
+
174,
|
| 732 |
+
752,
|
| 733 |
+
277,
|
| 734 |
+
766
|
| 735 |
+
],
|
| 736 |
+
"page_idx": 8
|
| 737 |
+
},
|
| 738 |
+
{
|
| 739 |
+
"type": "text",
|
| 740 |
+
"text": "We compared the performance of agents using policy hierarchies with 1 (i.e., flat), 2, and 3 levels on each task. The flat agents used Q-learning (Watkins & Dayan, 1992) with HER in the discrete tasks and DDPG (Lillicrap et al., 2015) with HER in the continuous tasks. ",
|
| 741 |
+
"bbox": [
|
| 742 |
+
174,
|
| 743 |
+
784,
|
| 744 |
+
825,
|
| 745 |
+
825
|
| 746 |
+
],
|
| 747 |
+
"page_idx": 8
|
| 748 |
+
},
|
| 749 |
+
{
|
| 750 |
+
"type": "text",
|
| 751 |
+
"text": "Our approach significantly outperformed the flat agent in all tasks. Figure 4 shows the average episode success rate for each type of agent in each task. The discrete tasks average data from 50 trials. The continuous tasks average data from at least 7 trials. ",
|
| 752 |
+
"bbox": [
|
| 753 |
+
174,
|
| 754 |
+
833,
|
| 755 |
+
825,
|
| 756 |
+
875
|
| 757 |
+
],
|
| 758 |
+
"page_idx": 8
|
| 759 |
+
},
|
| 760 |
+
{
|
| 761 |
+
"type": "text",
|
| 762 |
+
"text": "In addition, our empirical results show that our framework can benefit from additional levels of hierarchy likely because our framework can learn multiple levels of policies in parallel. In all tasks, the 3-level agent outperformed the 2-level agent, and the 2-level agent outperformed the flat agent. ",
|
| 763 |
+
"bbox": [
|
| 764 |
+
174,
|
| 765 |
+
882,
|
| 766 |
+
825,
|
| 767 |
+
924
|
| 768 |
+
],
|
| 769 |
+
"page_idx": 8
|
| 770 |
+
},
|
| 771 |
+
{
|
| 772 |
+
"type": "image",
|
| 773 |
+
"img_path": "images/361a3111b74162b20652e53240f8fbe607ed314eeaee9574bc721550eeed8a43.jpg",
|
| 774 |
+
"image_caption": [
|
| 775 |
+
"Figure 5: Figure compares the performance of HAC (2 Levels) and HIRO. The charts show the average success rate and 1 standard deviation. "
|
| 776 |
+
],
|
| 777 |
+
"image_footnote": [],
|
| 778 |
+
"bbox": [
|
| 779 |
+
176,
|
| 780 |
+
102,
|
| 781 |
+
821,
|
| 782 |
+
242
|
| 783 |
+
],
|
| 784 |
+
"page_idx": 9
|
| 785 |
+
},
|
| 786 |
+
{
|
| 787 |
+
"type": "text",
|
| 788 |
+
"text": "5.1.1 BASELINE COMPARISON",
|
| 789 |
+
"text_level": 1,
|
| 790 |
+
"bbox": [
|
| 791 |
+
176,
|
| 792 |
+
305,
|
| 793 |
+
397,
|
| 794 |
+
319
|
| 795 |
+
],
|
| 796 |
+
"page_idx": 9
|
| 797 |
+
},
|
| 798 |
+
{
|
| 799 |
+
"type": "text",
|
| 800 |
+
"text": "We also directly compared our approach HAC to another HRL technique, HIRO (Nachum et al., 2018), which outperforms the other leading HRL techniques that can work in continuous state and action spaces: FeUdal Networks (Vezhnevets et al., 2017) and Option-Critic (Bacon et al., 2017). HIRO enables agents to learn a 2-level hierarchical policy that like our approach can be trained off-policy and uses the state space to decompose a task. Two of the key differences between the algorithms are that (i) HIRO does not use Hindsight Experience Replay at either of the 2 levels and (ii) HIRO uses a different approach for handling the non-stationary transition functions. Instead of replacing the original proposed action with the hindsight action as in our approach, HIRO uses a subgoal action from a set of candidates that when provided to the current level 0 policy would most likely cause the sequence of (state, action) tuples that originally occurred at level 0 when the level 0 policy was trying to achieve its original subgoal. In other words, HIRO values subgoal actions with respect to a transition function that essentially uses the current lower level policy hierarchy, not the optimal lower level policy hierarchy as in our approach. Consequently, HIRO may need to wait until the lower level policy converges before the higher level can learn a meaningful policy. ",
|
| 801 |
+
"bbox": [
|
| 802 |
+
174,
|
| 803 |
+
329,
|
| 804 |
+
825,
|
| 805 |
+
523
|
| 806 |
+
],
|
| 807 |
+
"page_idx": 9
|
| 808 |
+
},
|
| 809 |
+
{
|
| 810 |
+
"type": "text",
|
| 811 |
+
"text": "We compared the 2-level version of HAC to HIRO on the inverted pendulum, UR5 reacher, and ant reacher tasks. In all experiments, the 2-level version of HAC significantly outperformed HIRO. The results are shown in Figure 5. ",
|
| 812 |
+
"bbox": [
|
| 813 |
+
176,
|
| 814 |
+
531,
|
| 815 |
+
825,
|
| 816 |
+
573
|
| 817 |
+
],
|
| 818 |
+
"page_idx": 9
|
| 819 |
+
},
|
| 820 |
+
{
|
| 821 |
+
"type": "text",
|
| 822 |
+
"text": "5.1.2 SUBGOAL TESTING ABLATION STUDIES",
|
| 823 |
+
"text_level": 1,
|
| 824 |
+
"bbox": [
|
| 825 |
+
174,
|
| 826 |
+
589,
|
| 827 |
+
506,
|
| 828 |
+
603
|
| 829 |
+
],
|
| 830 |
+
"page_idx": 9
|
| 831 |
+
},
|
| 832 |
+
{
|
| 833 |
+
"type": "text",
|
| 834 |
+
"text": "We also implemented some ablation studies examining our subgoal testing procedure. We compared our method to (i) no subgoal testing and (ii) always penalizing missed subgoals even when the lower levels use noisy policies when attempting to achieve a subgoal. Our implementation significantly outperformed both baselines. The results and analysis of the ablation studies are given in section 6 of the Appendix. ",
|
| 835 |
+
"bbox": [
|
| 836 |
+
174,
|
| 837 |
+
614,
|
| 838 |
+
825,
|
| 839 |
+
684
|
| 840 |
+
],
|
| 841 |
+
"page_idx": 9
|
| 842 |
+
},
|
| 843 |
+
{
|
| 844 |
+
"type": "text",
|
| 845 |
+
"text": "6 CONCLUSION ",
|
| 846 |
+
"text_level": 1,
|
| 847 |
+
"bbox": [
|
| 848 |
+
176,
|
| 849 |
+
698,
|
| 850 |
+
318,
|
| 851 |
+
714
|
| 852 |
+
],
|
| 853 |
+
"page_idx": 9
|
| 854 |
+
},
|
| 855 |
+
{
|
| 856 |
+
"type": "text",
|
| 857 |
+
"text": "Hierarchy has the potential to accelerate learning but in order to realize this potential, hierarchical agents need to be able to learn their multiple levels of policies in parallel. We present a new HRL framework that can efficiently learn multiple levels of policies simultaneously. HAC can overcome the instability issues that arise when agents try to learn to make decisions at multiple time scales because the framework trains each level of the hierarchy as if the lower levels are already optimal. Our results in several discrete and continuous domains, which include the first 3-level agents in tasks with continuous state and action spaces, confirm that HAC can significantly improve sample efficiency. ",
|
| 858 |
+
"bbox": [
|
| 859 |
+
174,
|
| 860 |
+
731,
|
| 861 |
+
825,
|
| 862 |
+
842
|
| 863 |
+
],
|
| 864 |
+
"page_idx": 9
|
| 865 |
+
},
|
| 866 |
+
{
|
| 867 |
+
"type": "text",
|
| 868 |
+
"text": "ACKNOWLEDGEMENTS ",
|
| 869 |
+
"text_level": 1,
|
| 870 |
+
"bbox": [
|
| 871 |
+
176,
|
| 872 |
+
864,
|
| 873 |
+
366,
|
| 874 |
+
878
|
| 875 |
+
],
|
| 876 |
+
"page_idx": 9
|
| 877 |
+
},
|
| 878 |
+
{
|
| 879 |
+
"type": "text",
|
| 880 |
+
"text": "This work has been supported in part by the National Science Foundation through IIS-1724237, IIS-1427081, IIS-1724191, and IIS-1724257, NASA through NNX16AC48A and NNX13AQ85G, ",
|
| 881 |
+
"bbox": [
|
| 882 |
+
176,
|
| 883 |
+
895,
|
| 884 |
+
823,
|
| 885 |
+
924
|
| 886 |
+
],
|
| 887 |
+
"page_idx": 9
|
| 888 |
+
},
|
| 889 |
+
{
|
| 890 |
+
"type": "text",
|
| 891 |
+
"text": "ONR through N000141410047, Amazon through an ARA to Platt, Google through a FRA to Platt, and DARPA. ",
|
| 892 |
+
"bbox": [
|
| 893 |
+
169,
|
| 894 |
+
103,
|
| 895 |
+
825,
|
| 896 |
+
133
|
| 897 |
+
],
|
| 898 |
+
"page_idx": 10
|
| 899 |
+
},
|
| 900 |
+
{
|
| 901 |
+
"type": "text",
|
| 902 |
+
"text": "REFERENCES \nM. Andrychowicz, F. Wolski, A. Ray, J. Schneider, R. Fong, P. Welinder, B. McGrew, J. Tobin, P. Abbeel, and W. Zaremba. Hindsight experience replay. In Advances in Neural Information Processing Systems 30, pp. 5048–5058. 2017. \nP-L Bacon, J. Harb, and D. Precup. The option-critic architecture. In Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence, pp. 1726–1734, 2017. \nBram Bakker and Jurgen Schmidhuber. Hierarchical reinforcement learning with subpolicies spe- ¨ cializing for learned subgoals. In Neural Networks and Computational Intelligence, pp. 125–130, 2004. \nT.G. Dietterich. Hierarchical reinforcement learning with the MAXQ value function decomposition. Journal of Artificial Intelligence Research, 13:227–303, 2000. \nG.D. Konidaris and A.G. Barto. Skill discovery in continuous reinforcement learning domains using skill chaining. In Advances in Neural Information Processing Systems 22, pp. 1015–1023, 2009. \nT.D. Kulkarni, K. Narasimhan, A. Saeedi, and J. Tenenbaum. Hierarchical deep reinforcement learning: Integrating temporal abstraction and intrinsic motivation. In Advances in Neural Information Processing Systems 29, pp. 3675–3683. 2016. \nT.P. Lillicrap, J.J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa, D. Silver, and D. Wierstra. Continuous control with deep reinforcement learning. CoRR, abs/1509.02971, 2015. URL http://arxiv.org/abs/1509.02971. \nA. McGovern and A.G. Barto. Automatic discovery of subgoals in reinforcement learning using diverse density. In Proceedings of the Eighteenth International Conference on Machine Learning, pp. 361–368, 2001. \nI. Menache, S. Mannor, and N. Shimkin. Q-cut—dynamic discovery of sub-goals in reinforcement learning. In Proceedings of the Thirteenth European Conference on Machine Learning, pp. 295– 306, 2002. \nO. Nachum, S. Gu, H. Lee, and S. Levine. Data-efficient hierarchical reinforcement learning. In Advances in Neural Information Processing Systems 31, pp. 3303–3313. 2018. \nT. Schaul, D. Horgan, K. Gregor, and D. Silver. Universal value function approximators. In Proceedings of the 32nd International Conference on Machine Learning, volume 37, pp. 1312–1320, 2015. \nJurgen Schmidhuber. Learning to generate sub-goals for action sequences. ¨ Artificial Neural Networks, pp. 967–972, 1991. \nO. S¸ ims¸ek, A.P. Wolfe, and A.G. Barto. Identifying useful subgoals in reinforcement learning by ¨ local graph partitioning. In Proceedings of the Twenty-Second International Conference on Machine Learning, pp. 816– 823, 2005. \nR. S. Sutton, D. Precup, and S. Singh. Between MDPs and semi-MDPs: a framework for temporal abstraction in reinforcement learning. Artificial Intelligence Journal, 112:181–211, 1999. \nE. Todorov, T. Erez, and Y. Tassa. MuJoCo: A physics engine for model-based control. Proceedings of the 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 5026– 5033, 2012. \nA. Vezhnevets, S. Osindero, T. Schaul, N. Heess, M. Jaderberg, D. Silver, and K. Kavukcuoglu. FeUdal networks for hierarchical reinforcement learning. In Proceedings of the 34th International Conference on Machine Learning, pp. 3540–3549, 2017. ",
|
| 903 |
+
"bbox": [
|
| 904 |
+
169,
|
| 905 |
+
117,
|
| 906 |
+
828,
|
| 907 |
+
930
|
| 908 |
+
],
|
| 909 |
+
"page_idx": 10
|
| 910 |
+
},
|
| 911 |
+
{
|
| 912 |
+
"type": "text",
|
| 913 |
+
"text": "Christopher J. C. H. Watkins and Peter Dayan. Q-learning. In Machine Learning, pp. 279–292, 1992. ",
|
| 914 |
+
"bbox": [
|
| 915 |
+
174,
|
| 916 |
+
103,
|
| 917 |
+
823,
|
| 918 |
+
132
|
| 919 |
+
],
|
| 920 |
+
"page_idx": 11
|
| 921 |
+
},
|
| 922 |
+
{
|
| 923 |
+
"type": "text",
|
| 924 |
+
"text": "Marco Wiering and Jurgen Schmidhuber. HQ-learning. ¨ Adaptive Behaviour, 6(2):219–246, 1997. ",
|
| 925 |
+
"bbox": [
|
| 926 |
+
176,
|
| 927 |
+
140,
|
| 928 |
+
816,
|
| 929 |
+
156
|
| 930 |
+
],
|
| 931 |
+
"page_idx": 11
|
| 932 |
+
},
|
| 933 |
+
{
|
| 934 |
+
"type": "text",
|
| 935 |
+
"text": "7 APPENDIX ",
|
| 936 |
+
"text_level": 1,
|
| 937 |
+
"bbox": [
|
| 938 |
+
176,
|
| 939 |
+
183,
|
| 940 |
+
294,
|
| 941 |
+
198
|
| 942 |
+
],
|
| 943 |
+
"page_idx": 11
|
| 944 |
+
},
|
| 945 |
+
{
|
| 946 |
+
"type": "text",
|
| 947 |
+
"text": "7.1 HIERARCHICAL ACTOR-CRITIC (HAC) ALGORITHM ",
|
| 948 |
+
"bbox": [
|
| 949 |
+
174,
|
| 950 |
+
213,
|
| 951 |
+
578,
|
| 952 |
+
228
|
| 953 |
+
],
|
| 954 |
+
"page_idx": 11
|
| 955 |
+
},
|
| 956 |
+
{
|
| 957 |
+
"type": "text",
|
| 958 |
+
"text": "Algorithm 1 Hierarchical Actor-Critic (HAC) ",
|
| 959 |
+
"text_level": 1,
|
| 960 |
+
"bbox": [
|
| 961 |
+
176,
|
| 962 |
+
248,
|
| 963 |
+
475,
|
| 964 |
+
262
|
| 965 |
+
],
|
| 966 |
+
"page_idx": 11
|
| 967 |
+
},
|
| 968 |
+
{
|
| 969 |
+
"type": "text",
|
| 970 |
+
"text": "",
|
| 971 |
+
"text_level": 1,
|
| 972 |
+
"bbox": [
|
| 973 |
+
191,
|
| 974 |
+
266,
|
| 975 |
+
236,
|
| 976 |
+
279
|
| 977 |
+
],
|
| 978 |
+
"page_idx": 11
|
| 979 |
+
},
|
| 980 |
+
{
|
| 981 |
+
"type": "text",
|
| 982 |
+
"text": "• Key agent parameters: number of levels in hierarchy $k$ , maximum subgoal horizon $H$ , and subgoal testing frequency $\\lambda$ . ",
|
| 983 |
+
"bbox": [
|
| 984 |
+
200,
|
| 985 |
+
281,
|
| 986 |
+
823,
|
| 987 |
+
309
|
| 988 |
+
],
|
| 989 |
+
"page_idx": 11
|
| 990 |
+
},
|
| 991 |
+
{
|
| 992 |
+
"type": "text",
|
| 993 |
+
"text": "",
|
| 994 |
+
"text_level": 1,
|
| 995 |
+
"bbox": [
|
| 996 |
+
191,
|
| 997 |
+
313,
|
| 998 |
+
248,
|
| 999 |
+
325
|
| 1000 |
+
],
|
| 1001 |
+
"page_idx": 11
|
| 1002 |
+
},
|
| 1003 |
+
{
|
| 1004 |
+
"type": "text",
|
| 1005 |
+
"text": "• $k$ trained actor and critic functions $\\pi _ { 0 } , . . . , \\pi _ { k - 1 } , Q _ { 0 } , . . . , Q _ { k - 1 }$ ",
|
| 1006 |
+
"bbox": [
|
| 1007 |
+
205,
|
| 1008 |
+
328,
|
| 1009 |
+
625,
|
| 1010 |
+
343
|
| 1011 |
+
],
|
| 1012 |
+
"page_idx": 11
|
| 1013 |
+
},
|
| 1014 |
+
{
|
| 1015 |
+
"type": "text",
|
| 1016 |
+
"text": "for $M$ episodes do $\\triangleright$ Train for M episodes $s \\gets S _ { i n i t }$ , $g G _ { k - 1 }$ $\\triangleright$ Sample initial state and task goal $t r a i n - l e v e l ( k - 1 , s , g )$ $\\triangleright$ Begin training Update all actor and critic networks \nend for \nfunction TRAIN-LEVEL $( i : : l e v e l , s : : s t a t e , g : : g o a l )$ $s _ { i } \\gets s$ , $g _ { i } g$ . Set current state and goal for level $i$ for $H$ attempts or until $g _ { n }$ , $i \\leq n < k$ achieved do $a _ { i } \\gets \\pi _ { i } \\bar { ( } s _ { i } , g _ { i } \\big ) + n \\bar { o } i s e$ (if not subgoal testing) $\\triangleright$ Sample (noisy) action from policy if $i > 0$ then Determine whether to test subgoal $a _ { i }$ $s _ { i } ^ { ' } t r a i n - l e v e l ( i - 1 , s _ { i } , \\bar { a } _ { i } )$ . Train level $i - 1$ using subgoal $a _ { i }$ else Execute primitive action $a _ { 0 }$ and observe next state $s _ { 0 }$ end if . Create replay transitions if $i > 0$ and $a _ { i }$ missed then if $a _ { i }$ was tested then $\\triangleright$ Penalize subgoal $a _ { i }$ $R e p l a y . B u f f e r _ { i } \\gets [ s = s _ { i } , a = a _ { i } , r = P e n a l t y , s ^ { ' } = s _ { i } ^ { ' } , g = g _ { i } , \\gamma = 0 ]$ end if $a _ { i } s _ { i }$ $\\triangleright$ Replace original action with action executed in hindsight end if $\\triangleright$ Evaluate executed action on current goal and hindsight goals $\\begin{array} { r } { R e p l a y \\_ B u f f e r _ { i } \\gets [ s = s _ { i } , a = a _ { i } , r \\in \\{ - 1 , 0 \\} , s ^ { ' } = s _ { i } ^ { ' } , g = g _ { i } , \\gamma \\in \\{ \\gamma , 0 \\} ] } \\\\ { H E R \\_ S t o r a g e _ { i } \\gets [ s = s _ { i } , a = a _ { i } , r = T B D , s ^ { ' } = s _ { i } ^ { ' } , g = T B D , \\gamma = T B D ] } \\end{array}$ $s _ { i } \\gets s _ { i } ^ { ' }$ end for Replay Bufferi Perform HER using HER Storagei transitions return s i . Output current state \nend function ",
|
| 1017 |
+
"bbox": [
|
| 1018 |
+
184,
|
| 1019 |
+
337,
|
| 1020 |
+
826,
|
| 1021 |
+
801
|
| 1022 |
+
],
|
| 1023 |
+
"page_idx": 11
|
| 1024 |
+
},
|
| 1025 |
+
{
|
| 1026 |
+
"type": "text",
|
| 1027 |
+
"text": "7.2 HIERARCHICAL Q-LEARNING (HIERQ) ALGORITHM ",
|
| 1028 |
+
"text_level": 1,
|
| 1029 |
+
"bbox": [
|
| 1030 |
+
173,
|
| 1031 |
+
103,
|
| 1032 |
+
580,
|
| 1033 |
+
118
|
| 1034 |
+
],
|
| 1035 |
+
"page_idx": 12
|
| 1036 |
+
},
|
| 1037 |
+
{
|
| 1038 |
+
"type": "text",
|
| 1039 |
+
"text": "HierQ is the version of our algorithm designed for domains with discrete state and action spaces. Note that HierQ does not use subgoal testing. Instead, the algorithm uses pessimistic Q-value initializations to prevent agents from learning to propose subgoal states that are too distant. ",
|
| 1040 |
+
"bbox": [
|
| 1041 |
+
174,
|
| 1042 |
+
130,
|
| 1043 |
+
825,
|
| 1044 |
+
172
|
| 1045 |
+
],
|
| 1046 |
+
"page_idx": 12
|
| 1047 |
+
},
|
| 1048 |
+
{
|
| 1049 |
+
"type": "text",
|
| 1050 |
+
"text": "Algorithm 2 Hierarchical Q-Learning (HierQ) ",
|
| 1051 |
+
"text_level": 1,
|
| 1052 |
+
"bbox": [
|
| 1053 |
+
176,
|
| 1054 |
+
189,
|
| 1055 |
+
480,
|
| 1056 |
+
204
|
| 1057 |
+
],
|
| 1058 |
+
"page_idx": 12
|
| 1059 |
+
},
|
| 1060 |
+
{
|
| 1061 |
+
"type": "text",
|
| 1062 |
+
"text": "",
|
| 1063 |
+
"text_level": 1,
|
| 1064 |
+
"bbox": [
|
| 1065 |
+
191,
|
| 1066 |
+
207,
|
| 1067 |
+
236,
|
| 1068 |
+
219
|
| 1069 |
+
],
|
| 1070 |
+
"page_idx": 12
|
| 1071 |
+
},
|
| 1072 |
+
{
|
| 1073 |
+
"type": "text",
|
| 1074 |
+
"text": "• Key agent parameters: number of levels in hierarchy $k > 1$ , maximum subgoal horizon $H$ , learning rate $\\alpha$ Output: • $k$ trained Q-tables $Q _ { 0 } ( s , g , a ) , . . . , Q _ { k - 1 } ( s , g , a )$ Use pessimistic $\\mathrm { Q }$ -value initialization: $Q _ { i } ( s , g , a ) \\leq - H ^ { i + 1 }$ for $M$ episodes do $\\triangleright$ Train for M episodes sk−1 ← Sinit, $g _ { k - 1 } G _ { k - 1 }$ $\\triangleright$ Sample initial state and task goal . Initialize previous state arrays for levels $i , 0 < i < k$ $P r e v _ { - } S t a t e s _ { i } \\gets A r r a y [ H ^ { i } ]$ $\\triangleright$ Length of level $i$ array is $H ^ { i }$ while $g _ { k - 1 }$ not achieved do $\\triangleright$ Begin Training $a _ { k - 1 } \\pi _ { k - 1 _ { b } } ( s _ { k - 1 } , g _ { k - 1 } )$ $\\triangleright$ Sample action using $\\epsilon$ -greedy policy $\\pi _ { k - 1 _ { b } }$ $\\begin{array} { r l } & { \\mathbf { \\Phi } ^ { \\mathrm { u } _ { K - 1 } } \\cdot \\mathbf { \\Phi } ^ { \\mathrm { \\prime } _ { \\{ ^ { * } K - 1 _ { b } \\{ ^ { \\circ } K - 1 \\} , \\forall \\kappa - 1 / } } } \\\\ & { s _ { k - 1 } \\gets t r a i n - l e v e l ( k - 2 , s _ { k - 1 } , a _ { k - 1 } ) } \\end{array}$ $\\triangleright$ Train next level end while end for function TRAIN-LEVEL $( i : : l e v e l , s : : s t a t e , g : : g o a l )$ $s _ { i } \\gets s$ , $g _ { i } g$ . Set current state and goal for level $i$ for $H$ attempts or until $g _ { n }$ $, i \\leq n < k$ achieved do $a _ { i } \\pi _ { i _ { b } } ( s _ { i } , g _ { i } )$ $\\triangleright$ Sample action using $\\epsilon$ -greedy policy $\\pi _ { i _ { b } }$ if $i > 0$ then $s _ { i } ^ { ' } t r a i n - l e v e l ( i - 1 , s _ { i } , a _ { i } )$ . Train level $i - 1$ using subgoal $a _ { i }$ else Execute primitive action $a _ { 0 }$ and observe next state $^ { \\prime }$ $s _ { 0 }$ $\\triangleright$ Update $Q _ { 0 } ( s , g , a )$ table for all possible subgoal states for each state $s _ { g o a l } \\in S$ do $Q _ { 0 } ( s _ { 0 } , s _ { g o a l } , a _ { 0 } ) \\xleftarrow { } { } ( 1 - \\alpha ) \\cdot Q _ { 0 } ( s _ { 0 } , s _ { g o a l } , a _ { 0 } ) + \\alpha \\cdot [ R _ { 0 } + \\gamma m a x _ { a } Q _ { 0 } ( s _ { 0 } ^ { \\prime } , s _ { g o a l } , a _ { 0 } ) ]$ end for $\\triangleright$ Add state $s _ { 0 }$ to all previous state arrays $P r e v _ { - } S t a t e s _ { i } s _ { 0 } , 0 < i < k$ . Update $Q _ { i } ( s , g , a ) , 0 < i < k$ , tables for each level $i , 0 < i < k$ do for each state $s \\in P r e v \\_ S t a t e s _ { i }$ do for each goal $s _ { g o a l } \\in S$ do $Q _ { i } ( s , s _ { g o a l } , s _ { 0 } ^ { \\prime } ) ~ ~ ( 1 ~ - ~ \\alpha ) ~ \\cdot ~ Q _ { i } ( s , s _ { g o a l } , s _ { 0 } ^ { \\prime } ) ~ + ~ \\alpha ~ \\cdot ~ [ R _ { i } ~ + ~ \\alpha ] ~$ γmaxaQi(s00, sgoal, a) end for end for end for end if $s _ { i } \\gets s _ { i } ^ { ' }$ end for return s i . Output current state end function ",
|
| 1075 |
+
"bbox": [
|
| 1076 |
+
183,
|
| 1077 |
+
222,
|
| 1078 |
+
826,
|
| 1079 |
+
859
|
| 1080 |
+
],
|
| 1081 |
+
"page_idx": 12
|
| 1082 |
+
},
|
| 1083 |
+
{
|
| 1084 |
+
"type": "text",
|
| 1085 |
+
"text": "7.3 UMDP TUPLE DEFINITIONS ",
|
| 1086 |
+
"text_level": 1,
|
| 1087 |
+
"bbox": [
|
| 1088 |
+
174,
|
| 1089 |
+
882,
|
| 1090 |
+
413,
|
| 1091 |
+
897
|
| 1092 |
+
],
|
| 1093 |
+
"page_idx": 12
|
| 1094 |
+
},
|
| 1095 |
+
{
|
| 1096 |
+
"type": "text",
|
| 1097 |
+
"text": "We now formally define the UMDPs tuples for all levels. ",
|
| 1098 |
+
"bbox": [
|
| 1099 |
+
174,
|
| 1100 |
+
909,
|
| 1101 |
+
547,
|
| 1102 |
+
924
|
| 1103 |
+
],
|
| 1104 |
+
"page_idx": 12
|
| 1105 |
+
},
|
| 1106 |
+
{
|
| 1107 |
+
"type": "text",
|
| 1108 |
+
"text": "$\\mathcal { U } _ { 0 }$ : This is the lowest level of the hierarchy. It has the same state set, action set, and state transition function as $\\mathcal { U } _ { o r i g i n a l }$ : ${ \\cal S } _ { 0 } = { \\cal S } , { \\cal A } _ { 0 } = { \\cal A }$ , and $T _ { 0 } ~ = ~ T$ . The goal states for which $\\mathcal { U } _ { 0 }$ will be responsible for learning will be dictated by the UMDP one level higher, $\\mathcal { U } _ { 1 }$ . However, given that every state is potentially a goal, the goal space is defined to be the state space: $\\mathcal { G } _ { 0 } ~ = ~ \\mathcal { S }$ . The framework is flexible as to the reward function used at level 0, but we will use the shortest path reward function, in which a reward of 0 is granted if the next state, $s ^ { \\prime }$ , maps to the goal and $^ { - 1 }$ otherwise: $R _ { 0 } ( s ^ { \\prime } , g ) = 0 , \\forall s ^ { \\prime } : s ^ { \\prime } \\in g$ and $R _ { 0 } ( s ^ { \\prime } , g ) = - 1 , \\forall s ^ { \\prime } : s ^ { \\prime } \\notin g$ . In addition, the discount rate is set to 0 if the goal has been achieved, but remains $\\gamma$ otherwise: $\\bar { \\gamma } _ { 0 } ( s ^ { \\prime } , g ) = 0 , \\forall s ^ { \\prime } : s ^ { \\prime } \\in g$ , $\\gamma _ { 0 } ( s ^ { \\prime } , g ) \\ = \\ \\gamma , \\forall s ^ { \\prime } \\ : \\ s ^ { \\prime } \\ \\notin \\ g$ . $\\mathcal { U } _ { \\mathrm { 0 } }$ $\\pi _ { 0 } : { \\mathcal { S } } _ { 0 } , { \\mathcal { G } } _ { 0 } \\to { \\mathcal { A } } _ { 0 }$ thatnitial $\\begin{array} { r } { { v } _ { \\pi _ { 0 } } ( s , g ) \\underline { { = } } \\mathbb { E } _ { \\pi _ { 0 } } [ \\sum _ { n = 0 } ^ { \\infty } \\gamma _ { 0 } ^ { n } R _ { 0 _ { t + n + 1 } } | \\bar { s } _ { 0 _ { t } } = s , g _ { 0 _ { t } } = g ] } \\end{array}$ state and goal combinations that the policy $\\pi _ { 1 }$ from $\\mathcal { U } _ { 1 }$ requires. ",
|
| 1109 |
+
"bbox": [
|
| 1110 |
+
173,
|
| 1111 |
+
103,
|
| 1112 |
+
825,
|
| 1113 |
+
257
|
| 1114 |
+
],
|
| 1115 |
+
"page_idx": 13
|
| 1116 |
+
},
|
| 1117 |
+
{
|
| 1118 |
+
"type": "text",
|
| 1119 |
+
"text": "$\\mathcal { U } _ { i } , 1 \\leq i < k$ : These UMDPs represent the remainder of the hierarchy. The state space is the same as the state space in $U _ { o r i g i n a l }$ : ${ { S } _ { i } } = { { S } }$ . For all levels except for the top level, the set of goals is dictated by the level above. These goals can potentially be any state: $G _ { i } = \\bar { \\mathcal { S } } , 1 \\leq i < k { - } 1$ . For the top level, the goal set is provided by the task: $\\mathcal { G } _ { k - 1 } = \\mathcal { G }$ . The action space is the state space as these policies will output subgoal states for the next level to achieve: $A _ { i } = S$ . The state transition function consists of two transition functions: $T _ { i | \\hat { \\Pi } _ { i - 1 } } ( s , a ) = \\{ \\mathrm { ( i ) } \\ T _ { i | \\Pi _ { i - 1 } ^ { * } } ( s , \\bar { a } ) , \\bar { a } = T _ { i | \\Pi _ { i - 1 } _ { b } } ( s , \\pi _ { i _ { b } } ( s , g _ { i } ) )$ , (ii) $T _ { i \\left| \\Pi _ { i - 1 } \\right. } ( s , a ) \\}$ . The first transition function will be used to generate hindsight transitions. Note that the action $\\bar { a }$ passed to the first transition function must be generated by some hierarchical behavior policy $\\Pi _ { i _ { b } }$ . The second transition function will be used for subgoal testing and will follow the current lower level policy hierarchy exactly. The reward function is $\\bar { R } _ { i } ( a , s ^ { \\prime } , g ) = p e n a l t y , \\forall s ^ { \\prime } : s ^ { \\prime } \\notin a ,$ $R _ { i } ( a , s ^ { \\prime } , g ) \\bar { = } - 1 , \\forall s ^ { \\prime } : ( \\bar { s ^ { \\prime } } \\in a ) \\land ( s ^ { \\prime } \\notin g )$ , and $R _ { i } ( a , s ^ { \\prime } , g ) = 0 , \\forall s ^ { \\prime } : ( s ^ { \\prime } \\in a ) \\land ( s ^ { \\prime } \\in g ) .$ . The penalty reward is only issued during subgoal testing. $\\gamma _ { i }$ is set to 0 if a subgoal is tested and missed or if an action achieves the goal, but is otherwise $\\gamma$ from $\\mathcal { U } _ { o r i g i n a l } : \\gamma _ { i } ( a , s ^ { \\prime } , g ) = 0 , \\forall s ^ { \\prime } : ( s ^ { \\prime } \\notin$ $a ) \\vee ( s ^ { \\prime } \\in g )$ . The objective in each $U _ { i }$ is to learn a policy $\\pi _ { i } : S _ { i } , { \\mathcal { G } } _ { i } \\to { \\mathcal { A } } _ { i }$ that maximizes the value function $\\begin{array} { r } { v _ { \\pi _ { i } | \\hat { \\Pi } _ { i - 1 } } ( s , g ) = \\mathbb { E } _ { \\pi _ { i } | \\hat { \\Pi } _ { i - 1 } } \\bigl [ \\sum _ { n = 0 } ^ { \\infty } \\gamma ^ { n } R _ { i _ { t + n + 1 } } | s _ { i _ { t } } = s , g _ { i _ { t } } = g \\bigr ] } \\end{array}$ . ",
|
| 1120 |
+
"bbox": [
|
| 1121 |
+
173,
|
| 1122 |
+
263,
|
| 1123 |
+
825,
|
| 1124 |
+
478
|
| 1125 |
+
],
|
| 1126 |
+
"page_idx": 13
|
| 1127 |
+
},
|
| 1128 |
+
{
|
| 1129 |
+
"type": "text",
|
| 1130 |
+
"text": "7.4 UMDP STATE TRANSITION FUNCTION ",
|
| 1131 |
+
"text_level": 1,
|
| 1132 |
+
"bbox": [
|
| 1133 |
+
176,
|
| 1134 |
+
492,
|
| 1135 |
+
482,
|
| 1136 |
+
507
|
| 1137 |
+
],
|
| 1138 |
+
"page_idx": 13
|
| 1139 |
+
},
|
| 1140 |
+
{
|
| 1141 |
+
"type": "table",
|
| 1142 |
+
"img_path": "images/acfd2a92599be91c3f4c966109a91d2e956d91e66e3a7ca25f1b60114f5d23ec.jpg",
|
| 1143 |
+
"table_caption": [],
|
| 1144 |
+
"table_footnote": [],
|
| 1145 |
+
"table_body": "<table><tr><td>Algorithm 3 UMDP Ui Transition Function: Ti|IIi_1 (state, action)</td><td></td></tr><tr><td>Input: state s,action a,</td><td></td></tr><tr><td>Output: next state</td><td></td></tr><tr><td>return Execute - H - Actions(s,a,i -1,H)</td><td>Execute ≤ H actions using policy πi-1</td></tr><tr><td colspan=\"2\">function ExECUTE-H-AcTiONs(s : state,a :: action,i :: level,itr :: iteration) s' =Ti|IIi-1(s,πi(s,a)) Execute 1 action using policy πi Decrement iteration counter</td></tr><tr><td colspan=\"2\">itr -= 1</td></tr><tr><td colspan=\"2\">if itr == 0 or s' ∈g,∀g∈{gi,.,gk-1} then</td></tr><tr><td colspan=\"2\">return s' >Return next state if out of iterations or goal achieved else Execute another action from Ti</td></tr><tr><td colspan=\"2\">return Execute- H - Actions(s',a,i,itr) end if</td></tr></table>",
|
| 1146 |
+
"bbox": [
|
| 1147 |
+
174,
|
| 1148 |
+
521,
|
| 1149 |
+
826,
|
| 1150 |
+
741
|
| 1151 |
+
],
|
| 1152 |
+
"page_idx": 13
|
| 1153 |
+
},
|
| 1154 |
+
{
|
| 1155 |
+
"type": "text",
|
| 1156 |
+
"text": "7.5 SUBGOAL TESTING ABLATION STUDIES",
|
| 1157 |
+
"text_level": 1,
|
| 1158 |
+
"bbox": [
|
| 1159 |
+
176,
|
| 1160 |
+
765,
|
| 1161 |
+
493,
|
| 1162 |
+
780
|
| 1163 |
+
],
|
| 1164 |
+
"page_idx": 13
|
| 1165 |
+
},
|
| 1166 |
+
{
|
| 1167 |
+
"type": "text",
|
| 1168 |
+
"text": "Both the qualitative and quantitative results of the subgoal testing ablation studies support our implementation. When no subgoal testing was used, the results were as expected. The subgoal policies would always learn to set unrealistic subgoals that could not be achieved within $H$ actions by the level below. This led to certain levels of the hierarchy needing to learn very long sequences of actions that the level was not trained to do. When the Q-values of these unrealistic subgoal states were examined, they were high, likely because there were no transitions indicating that these should have low Q-values. ",
|
| 1169 |
+
"bbox": [
|
| 1170 |
+
174,
|
| 1171 |
+
790,
|
| 1172 |
+
825,
|
| 1173 |
+
888
|
| 1174 |
+
],
|
| 1175 |
+
"page_idx": 13
|
| 1176 |
+
},
|
| 1177 |
+
{
|
| 1178 |
+
"type": "text",
|
| 1179 |
+
"text": "The implementation of always penalizing subgoals even when a noisy lower level policy hierarchy was used also performed significantly worse than our implementation. One likely reason for this outcome is that always penalizing strategy incentivizes subgoal levels to output overly conservative subgoals, which means a subgoal level needs to learn longer sequences of subgoals that in turn take longer to learn. Subgoal levels are incentivized to set nearby subgoals because more distant ones are less likely to be achieved when noise is added to actions. ",
|
| 1180 |
+
"bbox": [
|
| 1181 |
+
174,
|
| 1182 |
+
895,
|
| 1183 |
+
821,
|
| 1184 |
+
924
|
| 1185 |
+
],
|
| 1186 |
+
"page_idx": 13
|
| 1187 |
+
},
|
| 1188 |
+
{
|
| 1189 |
+
"type": "image",
|
| 1190 |
+
"img_path": "images/7b2feaa9e7ebcd9c333bd23063938eb192ba13f10b860378301ba8a3af15cead.jpg",
|
| 1191 |
+
"image_caption": [
|
| 1192 |
+
"Figure 6: Results from the ablation studies examining our subgoal testing procedure. We compare our implementation to two other options: (i) no subgoal testing and (ii) an implementation in which all missed subgoals are penalized even when lower levels use noisy policies to try to achieve the subgoal state that is being tested. 3-level agents were used in all options. "
|
| 1193 |
+
],
|
| 1194 |
+
"image_footnote": [],
|
| 1195 |
+
"bbox": [
|
| 1196 |
+
176,
|
| 1197 |
+
106,
|
| 1198 |
+
820,
|
| 1199 |
+
303
|
| 1200 |
+
],
|
| 1201 |
+
"page_idx": 14
|
| 1202 |
+
},
|
| 1203 |
+
{
|
| 1204 |
+
"type": "text",
|
| 1205 |
+
"text": "",
|
| 1206 |
+
"bbox": [
|
| 1207 |
+
174,
|
| 1208 |
+
397,
|
| 1209 |
+
825,
|
| 1210 |
+
452
|
| 1211 |
+
],
|
| 1212 |
+
"page_idx": 14
|
| 1213 |
+
},
|
| 1214 |
+
{
|
| 1215 |
+
"type": "text",
|
| 1216 |
+
"text": "7.6 HIERARCHICAL ACTOR-CRITIC IMPLEMENTATION DETAILS ",
|
| 1217 |
+
"text_level": 1,
|
| 1218 |
+
"bbox": [
|
| 1219 |
+
176,
|
| 1220 |
+
469,
|
| 1221 |
+
629,
|
| 1222 |
+
483
|
| 1223 |
+
],
|
| 1224 |
+
"page_idx": 14
|
| 1225 |
+
},
|
| 1226 |
+
{
|
| 1227 |
+
"type": "text",
|
| 1228 |
+
"text": "Below we provide some of the important details of our implementation of HAC. For further detail, see the GitHub repository available at https://github.com/andrew-j-levy/ Hierarchical-Actor-Critc-HAC-. ",
|
| 1229 |
+
"bbox": [
|
| 1230 |
+
176,
|
| 1231 |
+
496,
|
| 1232 |
+
825,
|
| 1233 |
+
537
|
| 1234 |
+
],
|
| 1235 |
+
"page_idx": 14
|
| 1236 |
+
},
|
| 1237 |
+
{
|
| 1238 |
+
"type": "text",
|
| 1239 |
+
"text": "• DDPG Parameters: ",
|
| 1240 |
+
"bbox": [
|
| 1241 |
+
217,
|
| 1242 |
+
550,
|
| 1243 |
+
359,
|
| 1244 |
+
563
|
| 1245 |
+
],
|
| 1246 |
+
"page_idx": 14
|
| 1247 |
+
},
|
| 1248 |
+
{
|
| 1249 |
+
"type": "text",
|
| 1250 |
+
"text": "– Bounded Q-Values: We bound the output of each critic function to the range $[ - H , 0 ]$ using a negative sigmoid function. An upper bound of 0 was chosen because all rewards in HAC are nonpositive so positive Q-values are illegal. We believe the lower bound of $- H$ is helpful for learning Q-values as the critic function does not need to learn precise Q-values for the large space of irrelevant actions in which the current stat is far from the goal state. The bound of $- H$ also ensures that subgoal states that were reached in hindsight should have higher Q-values than any subgoal state that is too distant and penalized during subgoal testing. DDPG Target Networks: For the 2- and 3-level agents, we removed the target networks used in DDPG because we saw in some of our early MuJoCo experiments that these hierarchical agents performed at least as well without target networks. We evaluated the flat agents with and without target networks. The flat agent generally performed better with target networks, but our results show the better result of the two. Exploration: Each level uses the following exploration strategy when a level is not involved in subgoal testing. ∗ $20 \\%$ of actions are sampled uniformly at random from the level’s action space $^ *$ $80 \\%$ of actions are the sum of actions sampled from the level’s policy and Gaussian noise \n– Neural Network Architectures: All actor and critic neural networks had 3 hidden layers, with 64 nodes in each hidden layer. ReLU activation functions were used. ",
|
| 1251 |
+
"bbox": [
|
| 1252 |
+
241,
|
| 1253 |
+
569,
|
| 1254 |
+
825,
|
| 1255 |
+
869
|
| 1256 |
+
],
|
| 1257 |
+
"page_idx": 14
|
| 1258 |
+
},
|
| 1259 |
+
{
|
| 1260 |
+
"type": "text",
|
| 1261 |
+
"text": "• HAC Parameters: – Maximum horizon of a subgoal, $H$ : 1. For $k { = } 3$ -level agents in MuJoCo tasks, $H = 1 0$ ",
|
| 1262 |
+
"bbox": [
|
| 1263 |
+
217,
|
| 1264 |
+
875,
|
| 1265 |
+
604,
|
| 1266 |
+
924
|
| 1267 |
+
],
|
| 1268 |
+
"page_idx": 14
|
| 1269 |
+
},
|
| 1270 |
+
{
|
| 1271 |
+
"type": "text",
|
| 1272 |
+
"text": "2. For $k { = } 2$ -level agents in MuJoCo tasks, $H$ was generally in the range [20,30] – Subgoal testing rate $\\lambda = 0 . 3$ – Goal and subgoal achievement thresholds were hand-crafted. ",
|
| 1273 |
+
"bbox": [
|
| 1274 |
+
246,
|
| 1275 |
+
103,
|
| 1276 |
+
790,
|
| 1277 |
+
151
|
| 1278 |
+
],
|
| 1279 |
+
"page_idx": 15
|
| 1280 |
+
}
|
| 1281 |
+
]
|
parse/train/ryzECoAcY7/ryzECoAcY7_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/ryzECoAcY7/ryzECoAcY7_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/wCrH0JBCFNm/wCrH0JBCFNm.md
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Post-Training Quantization for Vision Transformer
|
| 2 |
+
|
| 3 |
+
Zhenhua Liu1,2, Yunhe Wang2∗, Kai Han2, Wei Zhang2, Siwei $\mathbf { M } \mathbf { a } ^ { 1 , 3 }$ , Wen Gao1,3
|
| 4 |
+
|
| 5 |
+
1School of Electronic Engineering and Computer Science, Peking University 2 Huawei Noah’s Ark Lab 3Peng Cheng Laboratory liu-zh@pku.edu.cn, {yunhe.wang, kai.han, wz.zhang}@huawei.com, {swma, wgao}@pku.edu.cn
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Recently, transformer has achieved remarkable performance on a variety of computer vision applications. Compared with mainstream convolutional neural networks, vision transformers are often of sophisticated architectures for extracting powerful feature representations, which are more difficult to be developed on mobile devices. In this paper, we present an effective post-training quantization algorithm for reducing the memory storage and computational costs of vision transformers. Basically, the quantization task can be regarded as finding the optimal low-bit quantization intervals for weights and inputs, respectively. To preserve the functionality of the attention mechanism, we introduce a ranking loss into the conventional quantization objective that aims to keep the relative order of the self-attention results after quantization. Moreover, we thoroughly analyze the relationship between quantization loss of different layers and the feature diversity, and explore a mixedprecision quantization scheme by exploiting the nuclear norm of each attention map and output feature. The effectiveness of the proposed method is verified on several benchmark models and datasets, which outperforms the state-of-the-art posttraining quantization algorithms. For instance, we can obtain an $8 1 . 2 9 \%$ top-1 accuracy using DeiT-B model on ImageNet dataset with about 8-bit quantization. Code will be available at https://gitee.com/mindspore/models/tree/master/research/cv/VTPTQ.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Following the applications in Natural Language Processing (NLP) tasks, transformer-based models have shown great power in various Computer Vision (CV) tasks, such as image classification [11, 26], object detection [4, 39] and image super-resolution [5]. Pre-trained with large-scale data, these models usually have hundreds of millions of parameters. For instance, there are 307M parameters and 64G FLOPs in the ViT-L model, which is both memory and computation expensive during inference. This brings great challenges for these models to run on resource-constrained devices like mobile phones and intelligent cars. Besides, the real-time computer vision applications that integrate transformer-based models have to meet low latency requirements to achieve a high quality customer experience. Therefore, the model compression technology of transformer-based models is urgently needed for deployment in industrial environments.
|
| 14 |
+
|
| 15 |
+
Among various compression methods like pruning [16, 29, 19] and weight decomposition [37], quantization method [9, 38, 7, 27, 14, 32] compresses a neural network by using lower bit-width for weight values without changing the model architecture, which is particularly useful for carefullydesigned network architectures like transformers. Quantizing both weights and inputs can speed up inference by tuning floating-point operations into integer or bit operations. There have been some training-aware quantization approaches for transformer-based models in NLP (e.g., BERT [17]) [34, 23, 35, 22]. However, these methods are not designed for computer vision tasks and usually need additional training or fine-tuning. Furthermore, in some scenarios, the entire training data is not available to optimize the quantization model and the training costs for edge devices are intolerable.
|
| 16 |
+
|
| 17 |
+
Post-training quantization [24] is a kind of efficient model compression technique, which can directly quantize neural network models without fine-tuning. Most of the existing post-training quantization methods are designed for convolutional neural networks [3, 21, 30] or recurrent neural networks [36]. These methods do not take the character of vision transformer into consideration (e.g., the attention mechanism do not exist in CNNs), which are not perfectly suitable for quantizing vision transformer. However, vision transformers are showing stronger performance in a large variety of computer vision tasks. Thus, we are motivated to explore the post-training quantization for them to reduce the costs on memory and computation.
|
| 18 |
+
|
| 19 |
+
In this paper, we study the post-training quantization method for vision transformer models with mixed-precision for higher compression and speed-up ratios. The quantized process in the transformer is formulated as an optimization problem for finding the optimal quantization intervals. Specially, our goal is to maximize the similarity between the full-precision and quantized outputs in vision transformers. To better preserve the functionality of the attention mechanism, we thoroughly analyze the difference between attention layers and conventional layers such as MLP. Then, a ranking loss is introduced to keep the relative order of attention values. Furthermore, we propose to determine the bit-widths of each layer according to the feature diversity, $i , e ,$ , the nuclear norm calculated by the attention map and output features. We alternatively search the quantization intervals of weights and inputs in all layers to obtain the best quantization results. In addition, bias correction is introduced to diminish the cumulative quantization error. Experimental results on several benchmarks demonstrate the effectiveness of our algorithm for achieving better performance over the state-of-art post-training quantization approaches.
|
| 20 |
+
|
| 21 |
+
# 2 Related Works
|
| 22 |
+
|
| 23 |
+
Here, we reviews the transformer-based models designed for computer vision tasks. And the training-aware quantization schemes proposed for BERT and post-training quantization algorithms are summarized and analyzed.
|
| 24 |
+
|
| 25 |
+
# 2.1 Vision Transformer
|
| 26 |
+
|
| 27 |
+
Inspired by the major success of transformer architectures in the field of NLP, researchers have recently applied transformer to computer vision (CV) tasks [13]. Chen et al. [6] trained a sequence transformer to auto-regressively predict pixels, achieving results comparable to CNNs on image classification tasks. Another vision transformer model is ViT, which applies a pure transformer directly to treat image patches as the sequences. Recently proposed by Dosovitskiy et al. [11], it has achieved great performance on multiple image recognition benchmarks. Touvron et al. [26] produce competitive convolution-free transformers by training on ImageNet only while introducing a teacher-student strategy specific to transformers. In addition to basic image classification, transformer has been utilized to address a variety of other computer vision problems, including object detection [4, 39], semantic segmentation [5], image processing [5], and video understanding [5]. Han et al. [15] proposed a Transformer-iN-Transformer (TNT) model for modeling both patch-level and pixel-level representation. Tang et al. [25] proposed an augmented shortcut scheme to improve the performance of vision transformers. Thanks to its exceptional performance, more and more researchers are proposing transformer-based models for a wide range of computer vision tasks.
|
| 28 |
+
|
| 29 |
+
# 2.2 Compression of Transformer in NLP
|
| 30 |
+
|
| 31 |
+
Owing to the remarkable performance of BERT in many NLP tasks, many researchers have tried to compress the model to reduce the memory and computation complexity of BERT. Wu et al. [31] proposed Short Range Attention (LSRA) to conduct transformer on edge devices, where one group of heads specializes in the local context modeling (by convolution) while another group specializes in the long-distance relationship modeling. In [22, 34], 8-bit quantization is successfully applied to Transformer-based models with comparable performance as the full-precision baseline. However, quantizing these models to ultra low bits (e.g., 1 or 2 bits) can be much more challenging due to significant reduction in model capacity. To avoid severe accuracy drop, more complex quantization methods, like mixed-precision quantization [23, 33] and product quantization (PQ) [12] are used. In addition, Zhang et al. [35] propose TernaryBERT, which use both approximation-based and lossaware ternarization methods and empirically investigate the ternarization granularity of different parts of BERT. Moreover, to reduce the accuracy degradation, they also leverage the knowledge distillation technique. Bai et al. [1] further push BERT quantization to the limit with weight binarization. They propose ternary weight splitting, which initializes the binary model by equivalent splitting from a half-sized ternary network. However, these methods are not designed for computer vision tasks and need additional training or fine-tuning.
|
| 32 |
+
|
| 33 |
+
# 2.3 Post-Training Quantization
|
| 34 |
+
|
| 35 |
+
There are many works focusing on developing post-training quantization methods, without any training or fine-tuning. In particular, Yoni et al. [8] propose the OMSE method to optimize the $L _ { 2 }$ distance between the quantized tensor and the original tensor. Moreover, Ron et al. [2] present the so-called ACIQ method to analytically compute the clipping range, as well as the per-channel bit allocation for NNs. Zhao et al. [36] propose an outlier channel splitting (OCS) method to solve the outlier channel problem. Wang et al. [28] propose a Bit-Split and Stitching framework for lower-bit post-training quantization and an Error Compensated Activation Quantization method, which could lower the quantization error for activations. Nagel et al. [20] propose AdaRound, a weight-rounding mechanism for post-training quantization that adapts to the data and the task loss. By approximating the task loss with a Taylor series expansion, the rounding task is posed as a quadratic unconstrained binary optimization problem. The recent work of [21] propose Data-Free Quantization, which further pushes post-training quantization to zero-shot scenarios, where neither training nor testing data are accessible during quantization. Cai et al. [3] introduce ZeroQ, which distills an input data distribution to match the statistics in the batch normalization layers of the model and utilize a Pareto Frontier method to select automatically the bit-precision configuration of mixed-precision settings. These methods are designed for CNNs and do not consider the unique structure of vision transformers such as self-attention layers.
|
| 36 |
+
|
| 37 |
+
# 3 Methodology
|
| 38 |
+
|
| 39 |
+
In this section, we elaborate on the proposed mixed-precision post-training quantization scheme for the vision transformer. The similarity-aware quantization for linear layers and ranking-aware quantization for self-attention layers are presented. In addition, the bias correction method for optimization and the mixed-precision quantization based on nuclear norm of the attention map and output feature are introduced.
|
| 40 |
+
|
| 41 |
+
# 3.1 Preliminaries
|
| 42 |
+
|
| 43 |
+
A standard transformer receives an input as a 1-D sequence of token embeddings, so the vision transformers usually reshape the image $\mathbf { I } \in \mathbb { R } ^ { H \times W \times C }$ into a sequence of flatted 2D patches $I ^ { p } \in$ $\mathbb { R } ^ { n \times ( P ^ { 2 } \cdot C ) }$ . Here, $H$ and $W$ are the height and width of the original image and $( P , P )$ is the resolution of each image patch, $\begin{array} { r } { n = \frac { H W } { P ^ { 2 } } } \end{array}$ is then the effective sequence length for the transformer. Usually, the vision transformers use constant widths through all of its layers, so a trainable linear projection maps each vectorized patch to the model dimension $d$ . Thus, the input to the first transformer layer is:
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
\begin{array} { r l } & { \mathbf { X } _ { 1 } = [ x _ { c l a s s } ; I _ { 1 } ^ { p } \mathbf { W } _ { 1 } ^ { E } ; \cdot \cdot \cdot ; I _ { n } ^ { p } \mathbf { W } _ { n } ^ { E } ] + \mathbf { E } ^ { p o s } . } \\ & { \mathrm { w h e r e ~ } \mathbf { W } ^ { E } \in \mathbb { R } ^ { ( P ^ { 2 } \cdot C ) \times d } , \mathbf { E } ^ { p o s } \in \mathbb { R } ^ { ( n + 1 ) \times d } } \end{array}
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
A standard transformer layer includes two main modules: Multi-Head Self Attention (MSA) and Multi-Layer Perceptron (MLP) module. For the $l$ -th transformer layer, suppose the input to it is $\mathbf { X } _ { l } \in \mathbb { R } ^ { n \times d }$ , the attention scores computed by the dot product of queries and keys can be formulated as:
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
\mathbf { A } _ { l } = \mathbf { Q } _ { l } \mathbf { K } _ { l } ^ { \mathrm { T } } = \mathbf { X } _ { l } \mathbf { W } _ { l } ^ { Q } \mathbf { W } _ { l } ^ { K ^ { \mathrm { T } } } \mathbf { X } _ { l } ^ { \mathrm { T } } .
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+

|
| 56 |
+
Figure 1: Diagram of the proposed mixed-precision post-training quantization method for vision transformer. The similarity-aware and ranking-aware quantization are designed for finding the optimal quantization interval of the linear operations and self-attention layers. The bit-widths of transformer layers are determined based on the nuclear norm of the attention map and the output feature.
|
| 57 |
+
|
| 58 |
+
Then the softmax function is applied on the normalized scores to get the output and the output of the multi-head self attention module is:
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
\mathbf { M S A } ( \mathbf { X } _ { l } ) = \operatorname { S o f t m a x } ( \frac { 1 } { \sqrt { d } } \mathbf { A } _ { l } ) \mathbf { X } _ { l } \mathbf { W } _ { l } ^ { V } \cdot \mathbf { W } _ { l } ^ { O } .
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
The MLP module contains two linear layers parameterized by $\mathbf { W } ^ { 1 } \in \mathbb { R } ^ { d \times d _ { f } } , b ^ { 1 } \in \mathbb { R } ^ { d _ { f } }$ and $\mathbf { W } ^ { 2 } \in \mathbf { \Sigma }$ $\mathbb { R } ^ { d _ { f } \times d } , b ^ { 2 } \in \mathbb { R } ^ { d }$ respectively, where $d _ { f }$ is the number of neurons in the intermediate layer of MLP. Denote the input to MLP as $\mathbf { Z } _ { l } \in \mathbb { R } ^ { n \times d }$ , the output is then computed as:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\begin{array} { r } { \mathbf { M } \mathbf { L } \mathbf { P } ( \mathbf { Z } _ { l } ) = \mathbf { G } \mathbf { e } \mathbf { L } \mathbf { U } ( \mathbf { Z } _ { l } \mathbf { W } ^ { 1 } + b ^ { 1 } ) \mathbf { W } ^ { 2 } + b ^ { 2 } . } \end{array}
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
Combining Eq. (4) and (5), the forward propagation for the $l$ -th transformer layer can be formulated as:
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
\begin{array} { r } { \mathbf { Z } _ { l } = \mathbf { X } _ { l } + \mathbf { M S A } ( \mathbf { L N } ( \mathbf { X } _ { l } ) ) , } \\ { \mathbf { X } _ { l + 1 } = \mathbf { Z } _ { l } + \mathbf { M L P } ( \mathbf { L N } ( \mathbf { Z } _ { l } ) ) , } \end{array}
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where LN represents the layer normalization.
|
| 77 |
+
|
| 78 |
+
The most computational costs of vision transformer lie on the large matrix multiplication in MSA and MLP module. Following the mainstream quantization methods for CNNs [7, 21], we quantize all the weights and inputs involved in matrix multiplication. For weight quantization, we quantize the weights $\mathbf { W } ^ { Q } , \mathbf { W } ^ { \hat { K } } , \mathbf { W } ^ { V } , \mathbf { W } ^ { O } , \mathbf { W } ^ { 1 } , \mathbf { W } ^ { 2 }$ in Eq. (4) and (5) for all transformer layers, as well as the linear embedding $\mathbf { W } ^ { E }$ in Eq. (1). Besides these weights, we also quantize the inputs of all linear layers and matrix multiplication operations. Following the methods in [22, 35], we do not quantize the softmax operation and layer normalization, because the parameters contained in these operations are negligible and quantizing them may bring significant accuracy degradation.
|
| 79 |
+
|
| 80 |
+
# 3.2 Ranking-Aware Post-Training Quantization
|
| 81 |
+
|
| 82 |
+
For post-training quantization, we need to restrict the floating-numbers to a finite set of values. The choice of quantization intervals is critical for quantization and one popular option is to use a uniform quantization function, where the data range is equally split:
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\Psi _ { \Delta } ( \mathbf { Y } ) = \mathrm { C l a m p } ( \mathrm { R o u n d } ( \frac { \mathbf { Y } } { \Delta } ) , - 2 ^ { b - 1 } , 2 ^ { b - 1 } - 1 ) ,
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
where $\Delta$ is the quantization interval, $b$ is the quantization bit-width and $\mathbf { Y }$ is a tensor representing weights or inputs. Clamp denotes that elements in the tensor that exceed the ranges of the quantized domain are clipped.
|
| 89 |
+
|
| 90 |
+
For the layers in vision transformer, the original output can be computed as $\mathbf { O } _ { l } = \mathbf { X } _ { l } \mathbf { W } _ { l }$ . The uniform quantization for the weights and inputs and the corresponding dequant operation can be described as:
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\begin{array} { r } { \widehat { \mathbf { O } } _ { l } = \Psi _ { \Delta _ { l } ^ { X } } ( \mathbf { X } _ { l } ) \Psi _ { \Delta _ { l } ^ { W } } ( \mathbf { W } _ { l } ) \cdot \Delta _ { l } ^ { W } \cdot \Delta _ { l } ^ { X } , } \end{array}
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
where $\widehat { \mathbf { O } } _ { l }$ denotes the outputs of the quantized layer. From Eq. (8) and Eq. (9), it can be seen that the quantization intervals actually control the clamping thresholds in quantization process, which affects the quantization results to a great extent. Therefore, we are motivated to focus on optimizing the quantization intervals for both weights $\Delta _ { l } ^ { W }$ and inputs $\Delta _ { l } ^ { X }$ , where inputs $X _ { l }$ are generated from a given calibration dataset $\mathbf { D }$ with $N$ samples. Specifically, the calibration dataset is much less than the common training dataset.
|
| 97 |
+
|
| 98 |
+
The self-attention layer is the critical component of the transformer since it can calculate the global relevance of the features, which makes the transformer unique from the convolutional neural networks. For the calculation of self-attention (Eq. 3), we empirically find that the relative order of the attention map has been changed after quantization as shown in $\mathrm { F i g ~ 1 }$ , which could cause a significant performance degradation. Thus, a ranking loss is introduced to solve this problem during the quantization process:
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\mathcal { L } _ { r a n k i n g } = \sum _ { k = 1 } ^ { h } \sum _ { p = 1 } ^ { w - 1 } \sum _ { q = p + 1 } ^ { w } \varPhi \bigl ( \bigl ( \widehat { \mathbf { A } } _ { k p } - \widehat { \mathbf { A } } _ { k q } \bigr ) \cdot s i g n \bigl ( \mathbf { A } _ { k p } - \mathbf { A } _ { k q } \bigr ) \bigr ) ,
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
in which $\varPhi ( m ) = ( \theta - m ) _ { + }$ is hinge function with parameter $\theta$ , $( h , w )$ are the size of matrix A. Given a pair of examples, the loss is 0 only when the examples are in the correct order and differed by a margin.
|
| 105 |
+
|
| 106 |
+
Then we combine the ranking loss with the similarity-aware quantization, and the overall optimization goal can be described as:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\operatorname* { m i n } _ { \Delta _ { l } ^ { W } , \Delta _ { l } ^ { X } } \gamma \cdot \mathcal { L } _ { r a n k i n g } - \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \Gamma ( \mathbf { O } _ { l } ^ { i } , \widehat { \mathbf { O } } _ { l } ^ { i } ) , \quad s . t . \Delta _ { l } ^ { W } , \Delta _ { l } ^ { X } \in \mathbb { R } ^ { + }
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
where $\mathcal { L } _ { r a n k }$ denote the pairwise ranking based loss function, and $\gamma$ is the trade-off hyper-parameter. $\Gamma ( \mathbf { O } _ { l } ^ { i } , \widehat { \mathbf { O } } _ { l } ^ { i } )$ denotes the similarity metric between the original and quantized output feature maps, which can be formulated as:
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
\Gamma ( \widehat { \bf O } , { \bf O } ) = \frac { \sum _ { j = 1 } ( { \bf O } _ { j } - \overline { { \bf O } } ) ( \widehat { \bf O } _ { j } - \overline { { \bf O } } ) } { \sqrt { \sum _ { j = 1 } ( { \bf O } _ { j } - \overline { { \bf O } } ) ^ { 2 } } \sqrt { \sum _ { j = 1 } ( \widehat { \bf O } _ { j } - \overline { { \bf O } } ) ^ { 2 } } } ,
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
where the Pearson correlation coefficient is adopted as the measurement for the similarity since it subtracts the mean value of the data and can be more representative for the similarity between the distribution of quantized and original feature maps.
|
| 119 |
+
|
| 120 |
+
To solve the above optimization problem, we present a simple but efficient alternative searching method for the uniform quantization of transformer layers. Firstly, the quantization interval of inputs $\Delta _ { l } ^ { X }$ is fixed, and the quantization interval of weights $\Delta _ { l } ^ { W }$ is optimized for adjustment. Secondly, $\Delta _ { l } ^ { W }$ is fixed, and $\Delta _ { l } ^ { X }$ is optimized to fine-tune the quantization interval of the inputs. $\Delta _ { l } ^ { W }$ and $\Delta _ { l } ^ { X }$ are alternately optimized until the target function converges or the maximum iteration is exceeded. Moreover, for fast convergence, $\Delta _ { l } ^ { W }$ and $\Delta _ { l } ^ { X }$ are initialized in terms of the maximum of weights or inputs respectively. For the search space of $\Delta _ { l } ^ { W }$ and $\Delta _ { l } ^ { X }$ , we linearly divide interval of $[ \alpha \Delta _ { l } , \beta \Delta _ { l } ]$ into $C$ candidate options and conduct a simple search strategy on them.
|
| 121 |
+
|
| 122 |
+
Bias Correction To further reduce the biased error for the outputs raised by quantization, a bias correction method is then introduced after each search iteration. Suppose the quantization error of weights and inputs are defined as:
|
| 123 |
+
|
| 124 |
+
$$
|
| 125 |
+
\begin{array} { r l } & { \epsilon ^ { X } = \Psi _ { \Delta ^ { X } } ( \mathbf { X } ) \cdot \Delta ^ { X } - \mathbf { X } , } \\ & { \epsilon ^ { W } = \Psi _ { \Delta ^ { W } } ( \mathbf { W } ) \cdot \Delta ^ { W } - \mathbf { W } . } \end{array}
|
| 126 |
+
$$
|
| 127 |
+
|
| 128 |
+
If the expectation of the error for output is not zero, then the mean of the output will change. This shift in distribution may lead to detrimental behavior in the following layers. We can correct this change by seeing that:
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
\begin{array} { r } { \mathbb { E } [ \widehat { \mathbf { O } } ] = \mathbb { E } [ \mathbf { O } ] + \mathbb { E } [ \epsilon ^ { W } \mathbf { X } ] + \mathbb { E } [ \epsilon ^ { X } \mathbf { W } ] + \mathbb { E } [ \epsilon ^ { X } \epsilon ^ { W } ] . } \end{array}
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
Thus, subtracting the expected error on the output from the biased output ensures that the mean for each output unit is preserved. For implementation, the expected error can be computed using the calibration data and subtracted from the layer’s bias parameter, since the expected error vector has the same shape as the layer’s output.
|
| 135 |
+
|
| 136 |
+
# 3.3 Nuclear Norm Based Mixed-Precision Quantization
|
| 137 |
+
|
| 138 |
+
Different transformer layers are attending to different structures, and it is expected that they exhibit different sensitivity. Thus, assigning the same number of bit-widths to all the layers is sub-optimal. As a result, we explore mixed-precision quantization, where more bits are assigned to more sensitive layers in order to retain performance. Considering the unique structure of transformer layer, we assign all the operations in the MSA or MLP modules with the same bit-width. This will also be friendly to the hardware implementation since the weights and inputs are assigned with the same bit-width.
|
| 139 |
+
|
| 140 |
+
Singular value decomposition (SVD) is an important matrix decomposition approach in linear algebra. It takes a rectangular matrix of gene expression data, whose formulation can be written as :
|
| 141 |
+
|
| 142 |
+
$$
|
| 143 |
+
\mathbf { M } = \mathbf { U } \boldsymbol { \Sigma } \mathbf { V } , \quad \mathrm { t r ( } \mathbf { M } ) = \sum _ { i = 1 } ^ { m } \boldsymbol { \Sigma } _ { i i } ,
|
| 144 |
+
$$
|
| 145 |
+
|
| 146 |
+
where the diagonal entries $\Sigma _ { i i }$ of $\pmb { \Sigma }$ are known as the singular values of $\mathbf { M }$ . And the nuclear norm tr is the sum of singular values, which represents the data relevance of the matrix. In this paper, we propose to estimate the sensitivity of the transformer layer with the nuclear norm of the attention map in the MSA module and the output feature in the MLP module. The nuclear norm can be used to reduce the search space of the mixed-precision settings, while using higher bit-widths for layers that are more sensitive and vice versa. Inspired by the method in [10], we utilize a Pareto frontier approach to determine the bit-width. The main idea is to sort each candidate bit-width configuration based on the total second-order perturbation that they cause, according to the following metric:
|
| 147 |
+
|
| 148 |
+
$$
|
| 149 |
+
\Omega = \sum _ { i = 1 } ^ { L } \Omega _ { i } = \sum _ { i = 1 } ^ { L _ { M H A } } \mathrm { t r } ( \mathbf A _ { i } ) \cdot \lVert \widehat { \mathbf A _ { i } } - \mathbf A _ { i } \rVert _ { 2 } ^ { 2 } + \sum _ { j = 1 } ^ { L _ { M S A } } \mathrm { t r } ( \mathbf O _ { j } ) \cdot \lVert \widehat { \mathbf O _ { j } } - \mathbf O _ { j } \rVert _ { 2 } ^ { 2 } .
|
| 150 |
+
$$
|
| 151 |
+
|
| 152 |
+
Given a target model size, the candidate bit-width configurations are sorted based on their $\Omega$ value and choose the bit-width configuration with minimal $\Omega$ . The nuclear norm of the attention map and output feature in each transformer layer are shown in Figure 1. As we can see, they are various for different transformer layers.
|
| 153 |
+
|
| 154 |
+
# 4 Exprimental results
|
| 155 |
+
|
| 156 |
+
In this section, we evaluate the performance of the proposed post-training quantization scheme on vision transformer model for image classification (ViT [11] and DeiT [26]) and object detection (DETR [4]). To the best of our knowledge, there is no published work done on post-training quantization of vision transformer at this point, so we implement recent post-training quantization methods for CNNs as described in the papers by ourselves. It is shown that the proposed method outperforms the conventional post-training quantization methods. Moreover, extensive experiments of ablation study have shown that the proposed similarity-aware, ranking-aware quantization and bias correction method are beneficial for the post-training quantization of vision transformer.
|
| 157 |
+
|
| 158 |
+
# 4.1 Implementation details
|
| 159 |
+
|
| 160 |
+
Datasets For image classification, the CIFAR-10, CIFAR-100 and ILSVRC-2012 ImageNet (we refer to it as ImageNet in what follows) datasets are utilized to evaluate the quantization performance.
|
| 161 |
+
|
| 162 |
+
The CIFAR-10 dataset consists of $5 0 K$ training images and $1 0 K$ test images, which are labeled for 10 classes. And CIFAR-100 dataset also contains $5 0 K$ training images and $1 0 K$ test images, expect that they are labeled for 100 classes. ImageNet dataset contains 1.2 million training images and $5 0 K$ validation images labeled for 1,000 categories. For object detection task, the COCO2017 dataset is utilized to evaluate the quantization performance, which contains $1 1 8 K$ training images and $5 K$ validation images.
|
| 163 |
+
|
| 164 |
+
Experimental settings We randomly select 100 images for CIFAR-10 and CIFAR-100 dataset and 1000 images for ImageNet and COCO2017 dataset from the training dataset as the calibration dataset. For the hyper-parameter, $\alpha$ and $\beta$ are set to 0.5 and 1.2 for all the experiments. The maximum iteration is set to 20 if not mentioned specifically. For mixed-precision, we utilize {4,5,6,7,8} and {6,7,8,9,10} bits while the target bit-width are 6 bit and 8 bit, respectively.
|
| 165 |
+
|
| 166 |
+
Baseline For image classification, we evaluate our quantization method on two popular vision transformer implementation: ViT [11] and DeiT [26]. The ViT-B, ViT-L, DeiT-S, DeiT-B are adopted as the baseline model, whose top-1 accuracy on ImageNet dataset are $7 1 . 5 8 \%$ , $7 1 . 4 8 \%$ , $7 9 . 8 \%$ , $8 1 . 8 \%$ respectively. For a fair comparison, we utilize the official implementation of DeiT and do not use other techniques like knowledge distillation. For object detection, the DETR model using ResNet-50 backbone is adopted, which achieves a $4 2 . 0 \mathrm { m A P }$ on COCO dataset.
|
| 167 |
+
|
| 168 |
+
# 4.2 Results and Analysis
|
| 169 |
+
|
| 170 |
+
Image classification The experimental results are shown in Table 1. We firstly evaluate the proposed method on ViT-B and ViT-L model. ViT-B model is a 12-layer transformer with 12 heads and 768 embedding dimension. For the similar quantized model size, the proposed method outperforms percentile-based method [18] by $3 . 3 5 \%$ and $2 . 0 7 \%$ on CIFAR-10 dataset, respectively. And it is worth noting that the performance of the proposed 8-bit model is comparable to the fullprecision model. The proposed method obtains the similar performance on CIFAR-100 dataset and ImageNet dataset, while the average gains are $2 . 9 5 \%$ and $3 . 2 8 \%$ respectively. Moreover, the performance of the proposed 6-bit model is even better than the 8-bit percentile-based model, which means that the proposed method can save about $2 5 \%$ memory and $44 \%$ computational costs than conventional post-training quantization method.
|
| 171 |
+
|
| 172 |
+
ViT-L model is much larger network which consists of 24 transformer layer with 16 heads and 1024 embedding dimension. It contains 307M parameters, however its performance is worse than ViT-B. We also test the quantization methods on CIFAR-10, CIFAR-100 and ImageNet dataset. As shown in Table 1, the performance of the proposed method outperforms the percentile-based method by a large margin. It is worth mentioning that the 8-bit proposed model is even better than full-precision model on CIFAR-10 dataset and comparable to the full-precision model on CIFAR-100 dataset and ImageNet model. It is supposed that there is more redundancy in the ViT-L model and the performance degradation of quantization is less than that of ViT-B model.
|
| 173 |
+
|
| 174 |
+
The architecture of DeiT network is the same as ViT, expect that DeiT utilizes the data augmentation and regularization strategies. As a result, the performance of DeiT is much better than ViT. Among the models, ViT-S consists of 12 transformer layers with 6 heads and 384 embedding dimension. As we can see, the percentile-based method largely hurts the performance while the accuracy losses of 6-bit and 8-bit models are $9 . 3 1 \%$ and $5 . 8 2 \%$ . EasyQuant [30] is a popular simple post-training quantization method which improves the performance loss to $6 . 5 4 \%$ and $3 . 2 1 \%$ , respectively. Bit-Split proposes a bit splitting and stitching framework [28], while the Top-1 accuracy degradation are $5 . 7 6 \%$ and $2 . 7 4 \%$ . In comparison, the Top-1 accuracy losses of the proposed post-training quantization scheme are $5 . 2 2 \%$ and $2 . 3 3 \%$ respectively. In addition, when the mixed-precision is conducted, the 8-bit quantized model can achieve $7 8 . 0 9 \%$ Top-1 accuracy.
|
| 175 |
+
|
| 176 |
+
DeiT-B is a much larger network than DeiT-S, which consists of 12 transformer layers with 12 heads and 768 embedding dimension. As shown in Table 1, the Top-1 accuracy of percentile-based are $7 3 . 9 9 \%$ and $7 5 . 2 1 \%$ when quantized to 6-bit and 8-bit respectively. And the proposed scheme improves the performance of the quantized model to $7 7 . 4 7 \%$ and $8 1 . 2 9 \%$ . Another point is that the accuracy losses of DeiT-B are smaller than DeiT-S and we think that this is because DeiT-B consists of more parameters and is more representive when quantized to the same bit-width.
|
| 177 |
+
|
| 178 |
+
Table 1: Comparison on the performance of proposed mixed-precision post-training quantization method with conventional quantization method for image classification. ’MP’ represents for mixedprecision.
|
| 179 |
+
|
| 180 |
+
<table><tr><td>Model</td><td>Dataset</td><td>Method</td><td>W-bit</td><td>A-bit</td><td>Model size (MB)</td><td>Top-1 Accuracy</td></tr><tr><td rowspan="12">ViT-B</td><td rowspan="5">CIFAR-10</td><td>Baseline Percentile</td><td>32 6</td><td>32 6</td><td>344 64.5</td><td>98.13 93.48</td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Ours</td><td>6MP</td><td>6MP</td><td>64.6</td><td>96.83</td></tr><tr><td>Percentile</td><td>8</td><td>8</td><td>86.2</td><td>95.72</td></tr><tr><td>Ours</td><td>8 MP</td><td>8 MP</td><td>86.0</td><td>97.79</td></tr><tr><td rowspan="5">CIFAR-100</td><td>Baseline</td><td>32 6</td><td>32 6</td><td>344</td><td>87.13 80.56</td></tr><tr><td>Percentile</td><td></td><td></td><td>64.5 64.4</td><td>83.99</td></tr><tr><td>Ours</td><td>6MP 8</td><td>6MP 8</td><td>86.2</td><td></td></tr><tr><td>Percentile</td><td></td><td>8MP</td><td>86.5</td><td>83.28</td></tr><tr><td>Ours Baseline</td><td>8 MP 32</td><td></td><td></td><td>85.76</td></tr><tr><td rowspan="5">ImageNet</td><td>Percentile</td><td>6</td><td>32 6</td><td>344 64.5</td><td>77.91 71.58</td></tr><tr><td>Ours</td><td>6MP</td><td>6MP</td><td>64.8</td><td>75.26</td></tr><tr><td>Percentile</td><td>8</td><td>8</td><td>86.2</td><td>74.10</td></tr><tr><td>Ours</td><td>8 MP</td><td>8 MP</td><td>86.5</td><td>76.98</td></tr><tr><td></td><td></td><td>32</td><td>1228</td><td></td></tr><tr><td rowspan="9">ViT-L</td><td rowspan="6">CIFAR-10</td><td>Baseline</td><td>32</td><td></td><td></td><td>97.86</td></tr><tr><td>Percentile Ours</td><td>6 6MP</td><td>6 6MP</td><td>230.2 232</td><td>93.27 96.09</td></tr><tr><td>Percentile</td><td>8</td><td>8</td><td>307</td><td>94.19</td></tr><tr><td>Ours</td><td>8 MP</td><td>8 MP</td><td>305.8</td><td>97.90</td></tr><tr><td>Baseline</td><td>32</td><td>32</td><td>1228</td><td>86.35</td></tr><tr><td>Percentile</td><td>6</td><td>6</td><td>230.2</td><td></td></tr><tr><td>Ours</td><td>6 MP</td><td>6MP</td><td>231</td><td>80.54</td></tr><tr><td rowspan="5">CIFAR-100</td><td></td><td>8</td><td></td><td></td><td>83.69</td></tr><tr><td>Percentile Ours</td><td>8 MP</td><td>8</td><td>307</td><td>83.01</td></tr><tr><td></td><td></td><td>8 MP</td><td>307.8</td><td>85.83</td></tr><tr><td>Baseline</td><td>32</td><td>32</td><td>1228</td><td>76.53</td></tr><tr><td>Percentile Ours</td><td>6</td><td>6</td><td>230.2</td><td>71.48</td></tr><tr><td rowspan="5">ImageNet</td><td></td><td>6 MP</td><td>6 MP</td><td>231.6</td><td>75.46</td></tr><tr><td>Percentile</td><td>8</td><td>8</td><td>307</td><td>75.17</td></tr><tr><td>Ours</td><td>8 MP</td><td>8 MP</td><td>306.4</td><td>76.41</td></tr><tr><td>Baseline</td><td>32</td><td>32</td><td>88</td><td>79.8</td></tr><tr><td>Percentile [18] EasyQuant [30]</td><td>6</td><td>6</td><td>16.5</td><td>70.49</td></tr><tr><td rowspan="9">DeiT-S</td><td></td><td>6</td><td>6</td><td>16.5</td><td>73.26</td><td></td></tr><tr><td>Bit-Split [28]</td><td>6</td><td>6</td><td>16.5</td><td></td><td>74.04</td></tr><tr><td>Ours</td><td>6</td><td>6</td><td>16.5</td><td></td><td>74.58</td></tr><tr><td>ImageNet Ours</td><td>6MP</td><td>6MP</td><td>16.6</td><td></td><td>75.10</td></tr><tr><td>Percentile [18]</td><td></td><td>8</td><td>8</td><td>22.0</td><td>73.98</td></tr><tr><td>EasyQuant [30]</td><td>8</td><td>8</td><td>22.0</td><td></td><td>76.59</td></tr><tr><td>Bit-Split [28]</td><td></td><td>8</td><td>22.0</td><td></td><td>77.06</td></tr><tr><td>Ours</td><td>8 8</td><td>8</td><td>22.0</td><td></td><td>77.47</td></tr><tr><td>Ours</td><td>8 MP</td><td>8 MP</td><td>22.2</td><td></td><td>78.09</td></tr><tr><td rowspan="11">DeiT-B</td><td></td><td></td><td></td><td></td><td>344</td><td>81.8</td></tr><tr><td>Percentile [18]</td><td>Baseline</td><td>32 6</td><td>32 6</td><td>64.5</td><td>73.99</td></tr><tr><td></td><td>EasyQuant [30]</td><td>6</td><td>6</td><td>64.5</td><td>75.86</td></tr><tr><td>Bit-Split [28]</td><td>6</td><td>6</td><td>64.5</td><td></td><td>76.39</td></tr><tr><td>Ours</td><td>4 MP</td><td>4 MP</td><td>43.6</td><td></td><td>75.94</td></tr><tr><td>Ours</td><td>6</td><td>6</td><td>64.5</td><td></td><td>77.02</td></tr><tr><td rowspan="8">ImageNet</td><td>Ours</td><td>6 MP</td><td>6MP</td><td>64.3</td><td>77.47</td></tr><tr><td>Percentile [18]</td><td>8</td><td>8</td><td>86.0</td><td>75.21</td></tr><tr><td>EasyQuant [30]</td><td>8</td><td>8</td><td>86.0</td><td>79.36</td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Bit-Split [28]</td><td>8</td><td>8</td><td>86.0</td><td>79.42</td></tr><tr><td>Ours</td><td>8</td><td>8</td><td>86.0</td><td>80.48</td></tr><tr><td>Ours</td><td>8 MP</td><td>8MP</td><td>86.8</td><td>81.29</td></tr></table>
|
| 181 |
+
|
| 182 |
+
Table 2: Comparison on the performance of proposed mixed-precision post-training quantization method with conventional quantization method for DETR. ’MP’ represents for mixed-precision.
|
| 183 |
+
|
| 184 |
+
<table><tr><td>Model</td><td>Dataset</td><td>Method</td><td>W-bit</td><td>A-bit</td><td>Model size (MB)</td><td>mAP</td></tr><tr><td rowspan="9">DETR</td><td rowspan="6">COCO2017</td><td>Baseline</td><td>32</td><td>32</td><td>164</td><td>42.0</td></tr><tr><td>Percentile [18]</td><td>6</td><td>6</td><td>30.75</td><td>37.5</td></tr><tr><td>EasyQuant [30]</td><td>6</td><td>6</td><td>30.75</td><td>39.0</td></tr><tr><td>Bit-Split [28]</td><td>6</td><td>6</td><td>30.75</td><td>38.9</td></tr><tr><td>Ours</td><td>6</td><td>6</td><td>30.75</td><td>40.1</td></tr><tr><td>Ours</td><td>6 MP</td><td>6 MP</td><td>30.98</td><td>40.5</td></tr><tr><td>Percentile [18] EasyQuant [30]</td><td>8</td><td>8</td><td>41.00</td><td>38.6</td></tr><tr><td></td><td>8</td><td>8</td><td>41.00</td><td>40.4</td></tr><tr><td></td><td>Bit-Split [28]</td><td>8 8 8</td><td>41.00</td><td>40.6</td></tr><tr><td></td><td>Ours</td><td>8</td><td>41.00</td><td>41.2</td></tr><tr><td>Ours</td><td>8 MP</td><td>8 MP</td><td>41.64</td><td>41.7</td></tr></table>
|
| 185 |
+
|
| 186 |
+
Object Detection In order to show the generalization capability of proposed method, we also evaluate our method for object detection task using DETR [4]. The experimental results are shown in Table 2. As we can see, the proposed method outperforms percentile-based method, EasyQuant, BitSplit by 2.6, 1.1 and $1 . 2 \mathrm { m A P }$ for 6-bit quantization, respectively. The mixed-precision quantization can further boost the performance of the method. For 8-bit quantization, the mAP of the proposed mixed-precision quantization method is comparable to the full-precision model.
|
| 187 |
+
|
| 188 |
+
# 4.3 Ablation study
|
| 189 |
+
|
| 190 |
+
In this section, we evaluate the effect of the proposed similarity-aware quantization module, rankingaware quantization module, bias correction method and the mixed-precision method. The experimental results are shown in Table 3, while experiments are conducted on ImageNet dataset with ViT-B model. As we can see, the Top-1 accuracy of only using similarity-aware quantization is $7 5 . 4 2 \%$ which is inferior to the full-precision model and using ranking-aware quantization loss and bias correction method can improve the performance by $0 . 5 2 \%$ and $0 . 3 9 \%$ . It is worth noting that the nuclear norm based mixed-precision can further promote the performance of the quantized model, since it considers the variant sensitivity of different layers.
|
| 191 |
+
|
| 192 |
+
It is also shown that the Top-1 accuracy of using the similarity-aware mixed-precision quantization is $7 6 . 2 6 \%$ . And the ranking-aware quantization and bias correction can still boost the performance in this case. Besides, the performance of the 8-bit quantized model using all the proposed methods is $7 6 . 9 8 \%$ , which is comparable to the full-precision model.
|
| 193 |
+
|
| 194 |
+
Table 3: Ablation study of the proposed similarity-aware quantization module, ranking-aware quantization module, bias correction and mixed-precision method.
|
| 195 |
+
|
| 196 |
+
<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Similarity</td><td rowspan=1 colspan=1>Ranking</td><td rowspan=1 colspan=1>Bias Correction</td><td rowspan=1 colspan=1>Mixed-Precision</td><td rowspan=1 colspan=1>Modelsize(MB)</td><td rowspan=1 colspan=1>Top-1 Accuracy</td></tr><tr><td rowspan=3 colspan=1></td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>344</td><td rowspan=1 colspan=1>77.91</td></tr><tr><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>86.2</td><td rowspan=2 colspan=1>75.4275.94</td></tr><tr><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>86.2</td></tr><tr><td rowspan=6 colspan=1>ViT-B</td><td rowspan=3 colspan=1>√√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>86.2</td><td rowspan=1 colspan=1>75.81</td></tr><tr><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>86.2</td><td rowspan=1 colspan=1>76.49</td></tr><tr><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>86.5</td><td rowspan=1 colspan=1>76.26</td></tr><tr><td rowspan=3 colspan=1>√T√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>86.5</td><td rowspan=1 colspan=1>76.61</td></tr><tr><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>86.5</td><td rowspan=1 colspan=1>76.53</td></tr><tr><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>86.5</td><td rowspan=1 colspan=1>76.98</td></tr></table>
|
| 197 |
+
|
| 198 |
+
We also compared the performance of the proposed method with the hessian-based mixed-precision method, where the experiments are conducted with ViT-B on ImageNet dataset. As we can see in Table 4, the proposed method achieves a similar result while the consuming computation time is much less than hessian-based approach.
|
| 199 |
+
|
| 200 |
+
Table 4: Performance comparison with hessian-based mixed=precision method.
|
| 201 |
+
|
| 202 |
+
<table><tr><td>Method</td><td>W-bit</td><td>A-bit</td><td>Model size (MB)</td><td>Computation time (s)</td><td>Top-1 Accuracy</td></tr><tr><td>Hessian-based</td><td>8MP</td><td>8MP</td><td>86.7</td><td>754.6</td><td>77.01</td></tr><tr><td>Ours</td><td>8 MP</td><td>8 MP</td><td>86.5</td><td>53.1</td><td>76.98</td></tr></table>
|
| 203 |
+
|
| 204 |
+
# 5 Conclusion
|
| 205 |
+
|
| 206 |
+
In this paper, we have developed a novel post-training quantization scheme for vision transformer, in which the bit-widths of each layer are variant based on the nuclear norm of the attention map and output feature in the transformer layer. To solve the optimization problem of the quantization, we propose to search the optimal quantization interval for remaining the similarity between the quantized and original feature maps. In addition, we thoroughly analyze the different between attention layers and conventional layers and introduce a ranking loss to keep the relative order of the attention values. Specifically, the bias correction is employed to reduce the accumulated quantization error. Last but not the least, the optimal quantization interval for each transformer layer is carefully optimized using an alternative searching strategy. Experimental results show that the proposed method outperforms the conventional post-training quantization method by a large margin in terms of both network accuracy and memory costs.
|
| 207 |
+
|
| 208 |
+
# Acknowledge
|
| 209 |
+
|
| 210 |
+
This work was partly supported by the National Natural Science Foundation of China (61961130392) and PKU-Baidu Fund(2019BD003). Besides, High-Performance Computing Platform of Peking University is acknowledged.
|
| 211 |
+
|
| 212 |
+
# References
|
| 213 |
+
|
| 214 |
+
[1] Haoli Bai, Wei Zhang, Lu Hou, Lifeng Shang, Jing Jin, Xin Jiang, Qun Liu, Michael Lyu, and Irwin King. Binarybert: Pushing the limit of bert quantization. arXiv preprint arXiv:2012.15701, 2020.
|
| 215 |
+
[2] Ron Banner, Yury Nahshan, Elad Hoffer, and Daniel Soudry. Post-training 4-bit quantization of convolution networks for rapid-deployment. arXiv preprint arXiv:1810.05723, 2018.
|
| 216 |
+
[3] Yaohui Cai, Zhewei Yao, Zhen Dong, Amir Gholami, Michael W Mahoney, and Kurt Keutzer. Zeroq: A novel zero shot quantization framework. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13169–13178, 2020.
|
| 217 |
+
[4] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. arXiv preprint arXiv:2005.12872, 2020.
|
| 218 |
+
[5] Hanting Chen, Yunhe Wang, Tianyu Guo, Chang Xu, Yiping Deng, Zhenhua Liu, Siwei Ma, Chunjing Xu, Chao Xu, and Wen Gao. Pre-trained image processing transformer. arXiv preprint arXiv:2012.00364, 2020.
|
| 219 |
+
[6] Mark Chen, Alec Radford, Rewon Child, Jeffrey Wu, Heewoo Jun, David Luan, and Ilya Sutskever. Generative pretraining from pixels. In International Conference on Machine Learning, pages 1691–1703. PMLR, 2020.
|
| 220 |
+
[7] Jungwook Choi, Zhuo Wang, Swagath Venkataramani, Pierce I-Jen Chuang, Vijayalakshmi Srinivasan, and Kailash Gopalakrishnan. Pact: Parameterized clipping activation for quantized neural networks. arXiv preprint arXiv:1805.06085, 2018.
|
| 221 |
+
[8] Yoni Choukroun, Eli Kravchik, Fan Yang, and Pavel Kisilev. Low-bit quantization of neural networks for efficient inference. In ICCV Workshops, pages 3009–3018, 2019.
|
| 222 |
+
[9] M. Courbariaux, I. Hubara, D. Soudry, R. El-Yaniv, and Y. Bengio. Binarized neural networks: Training deep neural networks with weights and activations constrained $^ \mathrm { t o + 1 }$ or-1. arXiv preprint arXiv:1602.02830, 2016.
|
| 223 |
+
[10] Zhen Dong, Zhewei Yao, Yaohui Cai, Daiyaan Arfeen, Amir Gholami, Michael W. Mahoney, and Kurt Keutzer. Hawq-v2: Hessian aware trace-weighted quantization of neural networks. arXiv preprint arXiv:1911.03852, 2019.
|
| 224 |
+
[11] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. arXiv:2010.11929, 2020.
|
| 225 |
+
[12] Angela Fan, Pierre Stock, Benjamin Graham, Edouard Grave, Rémi Gribonval, Hervé Jégou, and Armand Joulin. Training with quantization noise for extreme model compression. arXiv e-prints, pages arXiv–2004, 2020.
|
| 226 |
+
[13] Kai Han, Yunhe Wang, Hanting Chen, Xinghao Chen, Jianyuan Guo, Zhenhua Liu, Yehui Tang, An Xiao, Chunjing Xu, Yixing Xu, et al. A survey on visual transformer. arXiv preprint arXiv:2012.12556, 2020.
|
| 227 |
+
[14] Kai Han, Yunhe Wang, Yixing Xu, Chunjing Xu, Enhua Wu, and Chang Xu. Training binary neural networks through learning with noisy supervision. In International Conference on Machine Learning, pages 4017–4026. PMLR, 2020.
|
| 228 |
+
[15] Kai Han, An Xiao, Enhua Wu, Jianyuan Guo, Chunjing Xu, and Yunhe Wang. Transformer in transformer. arXiv preprint arXiv:2103.00112, 2021.
|
| 229 |
+
[16] Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015.
|
| 230 |
+
[17] Jacob Devlin Ming-Wei Chang Kenton and Lee Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of NAACL-HLT, pages 4171–4186, 2019.
|
| 231 |
+
[18] Rundong Li, Yan Wang, Feng Liang, Hongwei Qin, Junjie Yan, and Rui Fan. Fully quantized network for object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2810–2819, 2019.
|
| 232 |
+
[19] Zhuang Liu, Jianguo Li, Zhiqiang Shen, Gao Huang, Shoumeng Yan, and Changshui Zhang. Learning efficient convolutional networks through network slimming. In Proceedings of the IEEE International Conference on Computer Vision, pages 2736–2744, 2017.
|
| 233 |
+
[20] Markus Nagel, Rana Ali Amjad, Mart Van Baalen, Christos Louizos, and Tijmen Blankevoort. Up or down? adaptive rounding for post-training quantization. In International Conference on Machine Learning, pages 7197–7206. PMLR, 2020.
|
| 234 |
+
[21] Markus Nagel, Mart van Baalen, Tijmen Blankevoort, and Max Welling. Data-free quantization through weight equalization and bias correction. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1325–1334, 2019.
|
| 235 |
+
[22] Gabriele Prato, Ella Charlaix, and Mehdi Rezagholizadeh. Fully quantized transformer for improved translation. 2019.
|
| 236 |
+
[23] Sheng Shen, Zhen Dong, Jiayu Ye, Linjian Ma, Zhewei Yao, Amir Gholami, Michael W Mahoney, and Kurt Keutzer. Q-bert: Hessian based ultra low precision quantization of bert. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 8815–8821, 2020.
|
| 237 |
+
[24] Wonyong Sung, Sungho Shin, and Kyuyeon Hwang. Resiliency of deep neural networks under quantization. arXiv preprint arXiv:1511.06488, 2015.
|
| 238 |
+
[25] Yehui Tang, Kai Han, Chang Xu, An Xiao, Yiping Deng, Chao Xu, and Yunhe Wang. Augmented shortcuts for vision transformers. arXiv preprint arXiv:2106.15941, 2021.
|
| 239 |
+
[26] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. arXiv preprint arXiv:2012.12877, 2020.
|
| 240 |
+
[27] Kuan Wang, Zhijian Liu, Yujun Lin, Ji Lin, and Song Han. Haq: Hardware-aware automated quantization with mixed precision. In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 8612–8620, 2019.
|
| 241 |
+
[28] Peisong Wang, Qiang Chen, Xiangyu He, and Jian Cheng. Towards accurate post-training network quantization via bit-split and stitching. In International Conference on Machine Learning, pages 9847–9856. PMLR, 2020.
|
| 242 |
+
[29] Yunhe Wang, Chang Xu, Shan You, Dacheng Tao, and Chao Xu. Cnnpack: Packing convolutional neural networks in the frequency domain. In NIPS, volume 1, page 3, 2016.
|
| 243 |
+
[30] Di Wu, Qi Tang, Yongle Zhao, Ming Zhang, Ying Fu, and Debing Zhang. Easyquant: Posttraining quantization via scale optimization. arXiv preprint arXiv:2006.16669, 2020.
|
| 244 |
+
[31] Zhanghao Wu, Zhijian Liu, Ji Lin, Yujun Lin, and Song Han. Lite transformer with long-short range attention. arXiv preprint arXiv:2004.11886, 2020.
|
| 245 |
+
[32] Yixing Xu, Kai Han, Chang Xu, Yehui Tang, Chunjing Xu, and Yunhe Wang. Learning frequency domain approximation for binary neural networks. arXiv preprint arXiv:2103.00841, 2021.
|
| 246 |
+
[33] Ali Hadi Zadeh, Isak Edo, Omar Mohamed Awad, and Andreas Moshovos. Gobo: Quantizing attention-based nlp models for low latency and energy efficient inference. In 2020 53rd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO), pages 811–824. IEEE, 2020.
|
| 247 |
+
[34] Ofir Zafrir, Guy Boudoukh, Peter Izsak, and Moshe Wasserblat. Q8bert: Quantized 8bit bert. arXiv preprint arXiv:1910.06188, 2019.
|
| 248 |
+
[35] Wei Zhang, Lu Hou, Yichun Yin, Lifeng Shang, Xiao Chen, Xin Jiang, and Qun Liu. Ternarybert: Distillation-aware ultra-low bit bert. arXiv preprint arXiv:2009.12812, 2020.
|
| 249 |
+
[36] Ritchie Zhao, Yuwei Hu, Jordan Dotzel, Chris De Sa, and Zhiru Zhang. Improving neural network quantization without retraining using outlier channel splitting. In International conference on machine learning, pages 7543–7552. PMLR, 2019.
|
| 250 |
+
[37] Zhisheng Zhong, Fangyin Wei, Zhouchen Lin, and Chao Zhang. Ada-tucker: Compressing deep neural networks via adaptive dimension adjustment tucker decomposition. Neural Networks, 110:104–115, 2019.
|
| 251 |
+
[38] Chenzhuo Zhu, Song Han, Huizi Mao, and William J Dally. Trained ternary quantization. arXiv preprint arXiv:1612.01064, 2016.
|
| 252 |
+
[39] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable detr: Deformable transformers for end-to-end object detection. arXiv preprint arXiv:2010.04159, 2020.
|
parse/train/wCrH0JBCFNm/wCrH0JBCFNm_content_list.json
ADDED
|
@@ -0,0 +1,1095 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "Post-Training Quantization for Vision Transformer ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
186,
|
| 8 |
+
122,
|
| 9 |
+
808,
|
| 10 |
+
148
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Zhenhua Liu1,2, Yunhe Wang2∗, Kai Han2, Wei Zhang2, Siwei $\\mathbf { M } \\mathbf { a } ^ { 1 , 3 }$ , Wen Gao1,3 ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
222,
|
| 19 |
+
199,
|
| 20 |
+
774,
|
| 21 |
+
215
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "1School of Electronic Engineering and Computer Science, Peking University 2 Huawei Noah’s Ark Lab 3Peng Cheng Laboratory liu-zh@pku.edu.cn, {yunhe.wang, kai.han, wz.zhang}@huawei.com, {swma, wgao}@pku.edu.cn ",
|
| 28 |
+
"bbox": [
|
| 29 |
+
235,
|
| 30 |
+
217,
|
| 31 |
+
769,
|
| 32 |
+
272
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "Abstract ",
|
| 39 |
+
"text_level": 1,
|
| 40 |
+
"bbox": [
|
| 41 |
+
462,
|
| 42 |
+
308,
|
| 43 |
+
535,
|
| 44 |
+
324
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "Recently, transformer has achieved remarkable performance on a variety of computer vision applications. Compared with mainstream convolutional neural networks, vision transformers are often of sophisticated architectures for extracting powerful feature representations, which are more difficult to be developed on mobile devices. In this paper, we present an effective post-training quantization algorithm for reducing the memory storage and computational costs of vision transformers. Basically, the quantization task can be regarded as finding the optimal low-bit quantization intervals for weights and inputs, respectively. To preserve the functionality of the attention mechanism, we introduce a ranking loss into the conventional quantization objective that aims to keep the relative order of the self-attention results after quantization. Moreover, we thoroughly analyze the relationship between quantization loss of different layers and the feature diversity, and explore a mixedprecision quantization scheme by exploiting the nuclear norm of each attention map and output feature. The effectiveness of the proposed method is verified on several benchmark models and datasets, which outperforms the state-of-the-art posttraining quantization algorithms. For instance, we can obtain an $8 1 . 2 9 \\%$ top-1 accuracy using DeiT-B model on ImageNet dataset with about 8-bit quantization. Code will be available at https://gitee.com/mindspore/models/tree/master/research/cv/VTPTQ. ",
|
| 51 |
+
"bbox": [
|
| 52 |
+
232,
|
| 53 |
+
339,
|
| 54 |
+
766,
|
| 55 |
+
602
|
| 56 |
+
],
|
| 57 |
+
"page_idx": 0
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "1 Introduction ",
|
| 62 |
+
"text_level": 1,
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
628,
|
| 66 |
+
310,
|
| 67 |
+
646
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "Following the applications in Natural Language Processing (NLP) tasks, transformer-based models have shown great power in various Computer Vision (CV) tasks, such as image classification [11, 26], object detection [4, 39] and image super-resolution [5]. Pre-trained with large-scale data, these models usually have hundreds of millions of parameters. For instance, there are 307M parameters and 64G FLOPs in the ViT-L model, which is both memory and computation expensive during inference. This brings great challenges for these models to run on resource-constrained devices like mobile phones and intelligent cars. Besides, the real-time computer vision applications that integrate transformer-based models have to meet low latency requirements to achieve a high quality customer experience. Therefore, the model compression technology of transformer-based models is urgently needed for deployment in industrial environments. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
660,
|
| 77 |
+
825,
|
| 78 |
+
799
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "Among various compression methods like pruning [16, 29, 19] and weight decomposition [37], quantization method [9, 38, 7, 27, 14, 32] compresses a neural network by using lower bit-width for weight values without changing the model architecture, which is particularly useful for carefullydesigned network architectures like transformers. Quantizing both weights and inputs can speed up inference by tuning floating-point operations into integer or bit operations. There have been some training-aware quantization approaches for transformer-based models in NLP (e.g., BERT [17]) [34, 23, 35, 22]. However, these methods are not designed for computer vision tasks and usually need additional training or fine-tuning. Furthermore, in some scenarios, the entire training data is not available to optimize the quantization model and the training costs for edge devices are intolerable. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
806,
|
| 88 |
+
825,
|
| 89 |
+
876
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
92,
|
| 99 |
+
825,
|
| 100 |
+
147
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 1
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "Post-training quantization [24] is a kind of efficient model compression technique, which can directly quantize neural network models without fine-tuning. Most of the existing post-training quantization methods are designed for convolutional neural networks [3, 21, 30] or recurrent neural networks [36]. These methods do not take the character of vision transformer into consideration (e.g., the attention mechanism do not exist in CNNs), which are not perfectly suitable for quantizing vision transformer. However, vision transformers are showing stronger performance in a large variety of computer vision tasks. Thus, we are motivated to explore the post-training quantization for them to reduce the costs on memory and computation. ",
|
| 107 |
+
"bbox": [
|
| 108 |
+
174,
|
| 109 |
+
152,
|
| 110 |
+
825,
|
| 111 |
+
263
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 1
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "In this paper, we study the post-training quantization method for vision transformer models with mixed-precision for higher compression and speed-up ratios. The quantized process in the transformer is formulated as an optimization problem for finding the optimal quantization intervals. Specially, our goal is to maximize the similarity between the full-precision and quantized outputs in vision transformers. To better preserve the functionality of the attention mechanism, we thoroughly analyze the difference between attention layers and conventional layers such as MLP. Then, a ranking loss is introduced to keep the relative order of attention values. Furthermore, we propose to determine the bit-widths of each layer according to the feature diversity, $i , e ,$ , the nuclear norm calculated by the attention map and output features. We alternatively search the quantization intervals of weights and inputs in all layers to obtain the best quantization results. In addition, bias correction is introduced to diminish the cumulative quantization error. Experimental results on several benchmarks demonstrate the effectiveness of our algorithm for achieving better performance over the state-of-art post-training quantization approaches. ",
|
| 118 |
+
"bbox": [
|
| 119 |
+
174,
|
| 120 |
+
270,
|
| 121 |
+
825,
|
| 122 |
+
450
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 1
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "2 Related Works ",
|
| 129 |
+
"text_level": 1,
|
| 130 |
+
"bbox": [
|
| 131 |
+
176,
|
| 132 |
+
470,
|
| 133 |
+
330,
|
| 134 |
+
488
|
| 135 |
+
],
|
| 136 |
+
"page_idx": 1
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"type": "text",
|
| 140 |
+
"text": "Here, we reviews the transformer-based models designed for computer vision tasks. And the training-aware quantization schemes proposed for BERT and post-training quantization algorithms are summarized and analyzed. ",
|
| 141 |
+
"bbox": [
|
| 142 |
+
176,
|
| 143 |
+
503,
|
| 144 |
+
823,
|
| 145 |
+
546
|
| 146 |
+
],
|
| 147 |
+
"page_idx": 1
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"type": "text",
|
| 151 |
+
"text": "2.1 Vision Transformer ",
|
| 152 |
+
"text_level": 1,
|
| 153 |
+
"bbox": [
|
| 154 |
+
174,
|
| 155 |
+
564,
|
| 156 |
+
348,
|
| 157 |
+
579
|
| 158 |
+
],
|
| 159 |
+
"page_idx": 1
|
| 160 |
+
},
|
| 161 |
+
{
|
| 162 |
+
"type": "text",
|
| 163 |
+
"text": "Inspired by the major success of transformer architectures in the field of NLP, researchers have recently applied transformer to computer vision (CV) tasks [13]. Chen et al. [6] trained a sequence transformer to auto-regressively predict pixels, achieving results comparable to CNNs on image classification tasks. Another vision transformer model is ViT, which applies a pure transformer directly to treat image patches as the sequences. Recently proposed by Dosovitskiy et al. [11], it has achieved great performance on multiple image recognition benchmarks. Touvron et al. [26] produce competitive convolution-free transformers by training on ImageNet only while introducing a teacher-student strategy specific to transformers. In addition to basic image classification, transformer has been utilized to address a variety of other computer vision problems, including object detection [4, 39], semantic segmentation [5], image processing [5], and video understanding [5]. Han et al. [15] proposed a Transformer-iN-Transformer (TNT) model for modeling both patch-level and pixel-level representation. Tang et al. [25] proposed an augmented shortcut scheme to improve the performance of vision transformers. Thanks to its exceptional performance, more and more researchers are proposing transformer-based models for a wide range of computer vision tasks. ",
|
| 164 |
+
"bbox": [
|
| 165 |
+
174,
|
| 166 |
+
590,
|
| 167 |
+
825,
|
| 168 |
+
784
|
| 169 |
+
],
|
| 170 |
+
"page_idx": 1
|
| 171 |
+
},
|
| 172 |
+
{
|
| 173 |
+
"type": "text",
|
| 174 |
+
"text": "2.2 Compression of Transformer in NLP ",
|
| 175 |
+
"text_level": 1,
|
| 176 |
+
"bbox": [
|
| 177 |
+
176,
|
| 178 |
+
801,
|
| 179 |
+
467,
|
| 180 |
+
816
|
| 181 |
+
],
|
| 182 |
+
"page_idx": 1
|
| 183 |
+
},
|
| 184 |
+
{
|
| 185 |
+
"type": "text",
|
| 186 |
+
"text": "Owing to the remarkable performance of BERT in many NLP tasks, many researchers have tried to compress the model to reduce the memory and computation complexity of BERT. Wu et al. [31] proposed Short Range Attention (LSRA) to conduct transformer on edge devices, where one group of heads specializes in the local context modeling (by convolution) while another group specializes in the long-distance relationship modeling. In [22, 34], 8-bit quantization is successfully applied to Transformer-based models with comparable performance as the full-precision baseline. However, quantizing these models to ultra low bits (e.g., 1 or 2 bits) can be much more challenging due to significant reduction in model capacity. To avoid severe accuracy drop, more complex quantization methods, like mixed-precision quantization [23, 33] and product quantization (PQ) [12] are used. In addition, Zhang et al. [35] propose TernaryBERT, which use both approximation-based and lossaware ternarization methods and empirically investigate the ternarization granularity of different parts of BERT. Moreover, to reduce the accuracy degradation, they also leverage the knowledge distillation technique. Bai et al. [1] further push BERT quantization to the limit with weight binarization. They propose ternary weight splitting, which initializes the binary model by equivalent splitting from a half-sized ternary network. However, these methods are not designed for computer vision tasks and need additional training or fine-tuning. ",
|
| 187 |
+
"bbox": [
|
| 188 |
+
174,
|
| 189 |
+
827,
|
| 190 |
+
823,
|
| 191 |
+
911
|
| 192 |
+
],
|
| 193 |
+
"page_idx": 1
|
| 194 |
+
},
|
| 195 |
+
{
|
| 196 |
+
"type": "text",
|
| 197 |
+
"text": "",
|
| 198 |
+
"bbox": [
|
| 199 |
+
174,
|
| 200 |
+
90,
|
| 201 |
+
825,
|
| 202 |
+
229
|
| 203 |
+
],
|
| 204 |
+
"page_idx": 2
|
| 205 |
+
},
|
| 206 |
+
{
|
| 207 |
+
"type": "text",
|
| 208 |
+
"text": "2.3 Post-Training Quantization ",
|
| 209 |
+
"text_level": 1,
|
| 210 |
+
"bbox": [
|
| 211 |
+
176,
|
| 212 |
+
248,
|
| 213 |
+
403,
|
| 214 |
+
263
|
| 215 |
+
],
|
| 216 |
+
"page_idx": 2
|
| 217 |
+
},
|
| 218 |
+
{
|
| 219 |
+
"type": "text",
|
| 220 |
+
"text": "There are many works focusing on developing post-training quantization methods, without any training or fine-tuning. In particular, Yoni et al. [8] propose the OMSE method to optimize the $L _ { 2 }$ distance between the quantized tensor and the original tensor. Moreover, Ron et al. [2] present the so-called ACIQ method to analytically compute the clipping range, as well as the per-channel bit allocation for NNs. Zhao et al. [36] propose an outlier channel splitting (OCS) method to solve the outlier channel problem. Wang et al. [28] propose a Bit-Split and Stitching framework for lower-bit post-training quantization and an Error Compensated Activation Quantization method, which could lower the quantization error for activations. Nagel et al. [20] propose AdaRound, a weight-rounding mechanism for post-training quantization that adapts to the data and the task loss. By approximating the task loss with a Taylor series expansion, the rounding task is posed as a quadratic unconstrained binary optimization problem. The recent work of [21] propose Data-Free Quantization, which further pushes post-training quantization to zero-shot scenarios, where neither training nor testing data are accessible during quantization. Cai et al. [3] introduce ZeroQ, which distills an input data distribution to match the statistics in the batch normalization layers of the model and utilize a Pareto Frontier method to select automatically the bit-precision configuration of mixed-precision settings. These methods are designed for CNNs and do not consider the unique structure of vision transformers such as self-attention layers. ",
|
| 221 |
+
"bbox": [
|
| 222 |
+
174,
|
| 223 |
+
275,
|
| 224 |
+
825,
|
| 225 |
+
511
|
| 226 |
+
],
|
| 227 |
+
"page_idx": 2
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"type": "text",
|
| 231 |
+
"text": "3 Methodology ",
|
| 232 |
+
"text_level": 1,
|
| 233 |
+
"bbox": [
|
| 234 |
+
174,
|
| 235 |
+
532,
|
| 236 |
+
313,
|
| 237 |
+
550
|
| 238 |
+
],
|
| 239 |
+
"page_idx": 2
|
| 240 |
+
},
|
| 241 |
+
{
|
| 242 |
+
"type": "text",
|
| 243 |
+
"text": "In this section, we elaborate on the proposed mixed-precision post-training quantization scheme for the vision transformer. The similarity-aware quantization for linear layers and ranking-aware quantization for self-attention layers are presented. In addition, the bias correction method for optimization and the mixed-precision quantization based on nuclear norm of the attention map and output feature are introduced. ",
|
| 244 |
+
"bbox": [
|
| 245 |
+
174,
|
| 246 |
+
565,
|
| 247 |
+
825,
|
| 248 |
+
636
|
| 249 |
+
],
|
| 250 |
+
"page_idx": 2
|
| 251 |
+
},
|
| 252 |
+
{
|
| 253 |
+
"type": "text",
|
| 254 |
+
"text": "3.1 Preliminaries ",
|
| 255 |
+
"text_level": 1,
|
| 256 |
+
"bbox": [
|
| 257 |
+
174,
|
| 258 |
+
655,
|
| 259 |
+
307,
|
| 260 |
+
670
|
| 261 |
+
],
|
| 262 |
+
"page_idx": 2
|
| 263 |
+
},
|
| 264 |
+
{
|
| 265 |
+
"type": "text",
|
| 266 |
+
"text": "A standard transformer receives an input as a 1-D sequence of token embeddings, so the vision transformers usually reshape the image $\\mathbf { I } \\in \\mathbb { R } ^ { H \\times W \\times C }$ into a sequence of flatted 2D patches $I ^ { p } \\in$ $\\mathbb { R } ^ { n \\times ( P ^ { 2 } \\cdot C ) }$ . Here, $H$ and $W$ are the height and width of the original image and $( P , P )$ is the resolution of each image patch, $\\begin{array} { r } { n = \\frac { H W } { P ^ { 2 } } } \\end{array}$ is then the effective sequence length for the transformer. Usually, the vision transformers use constant widths through all of its layers, so a trainable linear projection maps each vectorized patch to the model dimension $d$ . Thus, the input to the first transformer layer is: ",
|
| 267 |
+
"bbox": [
|
| 268 |
+
173,
|
| 269 |
+
681,
|
| 270 |
+
825,
|
| 271 |
+
770
|
| 272 |
+
],
|
| 273 |
+
"page_idx": 2
|
| 274 |
+
},
|
| 275 |
+
{
|
| 276 |
+
"type": "equation",
|
| 277 |
+
"img_path": "images/033dd778b4afcfed6cab97989406843f6a989621239cc1651567da062281fdc9.jpg",
|
| 278 |
+
"text": "$$\n\\begin{array} { r l } & { \\mathbf { X } _ { 1 } = [ x _ { c l a s s } ; I _ { 1 } ^ { p } \\mathbf { W } _ { 1 } ^ { E } ; \\cdot \\cdot \\cdot ; I _ { n } ^ { p } \\mathbf { W } _ { n } ^ { E } ] + \\mathbf { E } ^ { p o s } . } \\\\ & { \\mathrm { w h e r e ~ } \\mathbf { W } ^ { E } \\in \\mathbb { R } ^ { ( P ^ { 2 } \\cdot C ) \\times d } , \\mathbf { E } ^ { p o s } \\in \\mathbb { R } ^ { ( n + 1 ) \\times d } } \\end{array}\n$$",
|
| 279 |
+
"text_format": "latex",
|
| 280 |
+
"bbox": [
|
| 281 |
+
351,
|
| 282 |
+
779,
|
| 283 |
+
643,
|
| 284 |
+
820
|
| 285 |
+
],
|
| 286 |
+
"page_idx": 2
|
| 287 |
+
},
|
| 288 |
+
{
|
| 289 |
+
"type": "text",
|
| 290 |
+
"text": "A standard transformer layer includes two main modules: Multi-Head Self Attention (MSA) and Multi-Layer Perceptron (MLP) module. For the $l$ -th transformer layer, suppose the input to it is $\\mathbf { X } _ { l } \\in \\mathbb { R } ^ { n \\times d }$ , the attention scores computed by the dot product of queries and keys can be formulated as: ",
|
| 291 |
+
"bbox": [
|
| 292 |
+
173,
|
| 293 |
+
835,
|
| 294 |
+
825,
|
| 295 |
+
891
|
| 296 |
+
],
|
| 297 |
+
"page_idx": 2
|
| 298 |
+
},
|
| 299 |
+
{
|
| 300 |
+
"type": "equation",
|
| 301 |
+
"img_path": "images/50bafd429c02d900ae7011b695186e90dc6823aca6190d64485f72fb2ecb9d16.jpg",
|
| 302 |
+
"text": "$$\n\\mathbf { A } _ { l } = \\mathbf { Q } _ { l } \\mathbf { K } _ { l } ^ { \\mathrm { T } } = \\mathbf { X } _ { l } \\mathbf { W } _ { l } ^ { Q } \\mathbf { W } _ { l } ^ { K ^ { \\mathrm { T } } } \\mathbf { X } _ { l } ^ { \\mathrm { T } } .\n$$",
|
| 303 |
+
"text_format": "latex",
|
| 304 |
+
"bbox": [
|
| 305 |
+
387,
|
| 306 |
+
891,
|
| 307 |
+
611,
|
| 308 |
+
912
|
| 309 |
+
],
|
| 310 |
+
"page_idx": 2
|
| 311 |
+
},
|
| 312 |
+
{
|
| 313 |
+
"type": "image",
|
| 314 |
+
"img_path": "images/3292269e6cd90c724e6c8a93882cc07e007da8744dec98efb6c3a7530403fc85.jpg",
|
| 315 |
+
"image_caption": [
|
| 316 |
+
"Figure 1: Diagram of the proposed mixed-precision post-training quantization method for vision transformer. The similarity-aware and ranking-aware quantization are designed for finding the optimal quantization interval of the linear operations and self-attention layers. The bit-widths of transformer layers are determined based on the nuclear norm of the attention map and the output feature. "
|
| 317 |
+
],
|
| 318 |
+
"image_footnote": [],
|
| 319 |
+
"bbox": [
|
| 320 |
+
189,
|
| 321 |
+
89,
|
| 322 |
+
803,
|
| 323 |
+
359
|
| 324 |
+
],
|
| 325 |
+
"page_idx": 3
|
| 326 |
+
},
|
| 327 |
+
{
|
| 328 |
+
"type": "text",
|
| 329 |
+
"text": "Then the softmax function is applied on the normalized scores to get the output and the output of the multi-head self attention module is: ",
|
| 330 |
+
"bbox": [
|
| 331 |
+
176,
|
| 332 |
+
450,
|
| 333 |
+
823,
|
| 334 |
+
479
|
| 335 |
+
],
|
| 336 |
+
"page_idx": 3
|
| 337 |
+
},
|
| 338 |
+
{
|
| 339 |
+
"type": "equation",
|
| 340 |
+
"img_path": "images/df672f711e914dc8d00f5d4fcf7a23dbaa28d0a56a9b68ba73588b7ae01e30b3.jpg",
|
| 341 |
+
"text": "$$\n\\mathbf { M S A } ( \\mathbf { X } _ { l } ) = \\operatorname { S o f t m a x } ( \\frac { 1 } { \\sqrt { d } } \\mathbf { A } _ { l } ) \\mathbf { X } _ { l } \\mathbf { W } _ { l } ^ { V } \\cdot \\mathbf { W } _ { l } ^ { O } .\n$$",
|
| 342 |
+
"text_format": "latex",
|
| 343 |
+
"bbox": [
|
| 344 |
+
346,
|
| 345 |
+
479,
|
| 346 |
+
650,
|
| 347 |
+
513
|
| 348 |
+
],
|
| 349 |
+
"page_idx": 3
|
| 350 |
+
},
|
| 351 |
+
{
|
| 352 |
+
"type": "text",
|
| 353 |
+
"text": "The MLP module contains two linear layers parameterized by $\\mathbf { W } ^ { 1 } \\in \\mathbb { R } ^ { d \\times d _ { f } } , b ^ { 1 } \\in \\mathbb { R } ^ { d _ { f } }$ and $\\mathbf { W } ^ { 2 } \\in \\mathbf { \\Sigma }$ $\\mathbb { R } ^ { d _ { f } \\times d } , b ^ { 2 } \\in \\mathbb { R } ^ { d }$ respectively, where $d _ { f }$ is the number of neurons in the intermediate layer of MLP. Denote the input to MLP as $\\mathbf { Z } _ { l } \\in \\mathbb { R } ^ { n \\times d }$ , the output is then computed as: ",
|
| 354 |
+
"bbox": [
|
| 355 |
+
173,
|
| 356 |
+
523,
|
| 357 |
+
826,
|
| 358 |
+
568
|
| 359 |
+
],
|
| 360 |
+
"page_idx": 3
|
| 361 |
+
},
|
| 362 |
+
{
|
| 363 |
+
"type": "equation",
|
| 364 |
+
"img_path": "images/3028477eee6111c771ec7a6fbff9fd1e935f2c3bbe2101c19be90ae753990c79.jpg",
|
| 365 |
+
"text": "$$\n\\begin{array} { r } { \\mathbf { M } \\mathbf { L } \\mathbf { P } ( \\mathbf { Z } _ { l } ) = \\mathbf { G } \\mathbf { e } \\mathbf { L } \\mathbf { U } ( \\mathbf { Z } _ { l } \\mathbf { W } ^ { 1 } + b ^ { 1 } ) \\mathbf { W } ^ { 2 } + b ^ { 2 } . } \\end{array}\n$$",
|
| 366 |
+
"text_format": "latex",
|
| 367 |
+
"bbox": [
|
| 368 |
+
354,
|
| 369 |
+
570,
|
| 370 |
+
642,
|
| 371 |
+
589
|
| 372 |
+
],
|
| 373 |
+
"page_idx": 3
|
| 374 |
+
},
|
| 375 |
+
{
|
| 376 |
+
"type": "text",
|
| 377 |
+
"text": "Combining Eq. (4) and (5), the forward propagation for the $l$ -th transformer layer can be formulated as: ",
|
| 378 |
+
"bbox": [
|
| 379 |
+
173,
|
| 380 |
+
598,
|
| 381 |
+
826,
|
| 382 |
+
627
|
| 383 |
+
],
|
| 384 |
+
"page_idx": 3
|
| 385 |
+
},
|
| 386 |
+
{
|
| 387 |
+
"type": "equation",
|
| 388 |
+
"img_path": "images/75efd99ccac64d97dff18ab61ddb1b1806133d904d8df80e20b3b45ee603159b.jpg",
|
| 389 |
+
"text": "$$\n\\begin{array} { r } { \\mathbf { Z } _ { l } = \\mathbf { X } _ { l } + \\mathbf { M S A } ( \\mathbf { L N } ( \\mathbf { X } _ { l } ) ) , } \\\\ { \\mathbf { X } _ { l + 1 } = \\mathbf { Z } _ { l } + \\mathbf { M L P } ( \\mathbf { L N } ( \\mathbf { Z } _ { l } ) ) , } \\end{array}\n$$",
|
| 390 |
+
"text_format": "latex",
|
| 391 |
+
"bbox": [
|
| 392 |
+
395,
|
| 393 |
+
628,
|
| 394 |
+
601,
|
| 395 |
+
666
|
| 396 |
+
],
|
| 397 |
+
"page_idx": 3
|
| 398 |
+
},
|
| 399 |
+
{
|
| 400 |
+
"type": "text",
|
| 401 |
+
"text": "where LN represents the layer normalization. ",
|
| 402 |
+
"bbox": [
|
| 403 |
+
174,
|
| 404 |
+
667,
|
| 405 |
+
470,
|
| 406 |
+
683
|
| 407 |
+
],
|
| 408 |
+
"page_idx": 3
|
| 409 |
+
},
|
| 410 |
+
{
|
| 411 |
+
"type": "text",
|
| 412 |
+
"text": "The most computational costs of vision transformer lie on the large matrix multiplication in MSA and MLP module. Following the mainstream quantization methods for CNNs [7, 21], we quantize all the weights and inputs involved in matrix multiplication. For weight quantization, we quantize the weights $\\mathbf { W } ^ { Q } , \\mathbf { W } ^ { \\hat { K } } , \\mathbf { W } ^ { V } , \\mathbf { W } ^ { O } , \\mathbf { W } ^ { 1 } , \\mathbf { W } ^ { 2 }$ in Eq. (4) and (5) for all transformer layers, as well as the linear embedding $\\mathbf { W } ^ { E }$ in Eq. (1). Besides these weights, we also quantize the inputs of all linear layers and matrix multiplication operations. Following the methods in [22, 35], we do not quantize the softmax operation and layer normalization, because the parameters contained in these operations are negligible and quantizing them may bring significant accuracy degradation. ",
|
| 413 |
+
"bbox": [
|
| 414 |
+
173,
|
| 415 |
+
688,
|
| 416 |
+
825,
|
| 417 |
+
800
|
| 418 |
+
],
|
| 419 |
+
"page_idx": 3
|
| 420 |
+
},
|
| 421 |
+
{
|
| 422 |
+
"type": "text",
|
| 423 |
+
"text": "3.2 Ranking-Aware Post-Training Quantization ",
|
| 424 |
+
"text_level": 1,
|
| 425 |
+
"bbox": [
|
| 426 |
+
174,
|
| 427 |
+
814,
|
| 428 |
+
517,
|
| 429 |
+
830
|
| 430 |
+
],
|
| 431 |
+
"page_idx": 3
|
| 432 |
+
},
|
| 433 |
+
{
|
| 434 |
+
"type": "text",
|
| 435 |
+
"text": "For post-training quantization, we need to restrict the floating-numbers to a finite set of values. The choice of quantization intervals is critical for quantization and one popular option is to use a uniform quantization function, where the data range is equally split: ",
|
| 436 |
+
"bbox": [
|
| 437 |
+
174,
|
| 438 |
+
840,
|
| 439 |
+
825,
|
| 440 |
+
883
|
| 441 |
+
],
|
| 442 |
+
"page_idx": 3
|
| 443 |
+
},
|
| 444 |
+
{
|
| 445 |
+
"type": "equation",
|
| 446 |
+
"img_path": "images/49d72afc0aeecc68dea66dd4da08876e36b4c83cf39ee81c03a792addefb6507.jpg",
|
| 447 |
+
"text": "$$\n\\Psi _ { \\Delta } ( \\mathbf { Y } ) = \\mathrm { C l a m p } ( \\mathrm { R o u n d } ( \\frac { \\mathbf { Y } } { \\Delta } ) , - 2 ^ { b - 1 } , 2 ^ { b - 1 } - 1 ) ,\n$$",
|
| 448 |
+
"text_format": "latex",
|
| 449 |
+
"bbox": [
|
| 450 |
+
333,
|
| 451 |
+
886,
|
| 452 |
+
663,
|
| 453 |
+
916
|
| 454 |
+
],
|
| 455 |
+
"page_idx": 3
|
| 456 |
+
},
|
| 457 |
+
{
|
| 458 |
+
"type": "text",
|
| 459 |
+
"text": "where $\\Delta$ is the quantization interval, $b$ is the quantization bit-width and $\\mathbf { Y }$ is a tensor representing weights or inputs. Clamp denotes that elements in the tensor that exceed the ranges of the quantized domain are clipped. ",
|
| 460 |
+
"bbox": [
|
| 461 |
+
176,
|
| 462 |
+
90,
|
| 463 |
+
823,
|
| 464 |
+
133
|
| 465 |
+
],
|
| 466 |
+
"page_idx": 4
|
| 467 |
+
},
|
| 468 |
+
{
|
| 469 |
+
"type": "text",
|
| 470 |
+
"text": "For the layers in vision transformer, the original output can be computed as $\\mathbf { O } _ { l } = \\mathbf { X } _ { l } \\mathbf { W } _ { l }$ . The uniform quantization for the weights and inputs and the corresponding dequant operation can be described as: ",
|
| 471 |
+
"bbox": [
|
| 472 |
+
174,
|
| 473 |
+
138,
|
| 474 |
+
825,
|
| 475 |
+
179
|
| 476 |
+
],
|
| 477 |
+
"page_idx": 4
|
| 478 |
+
},
|
| 479 |
+
{
|
| 480 |
+
"type": "equation",
|
| 481 |
+
"img_path": "images/48deb88ba116d02041955547aae8ddc2b774033683e36fa1bd0be3cf738a6535.jpg",
|
| 482 |
+
"text": "$$\n\\begin{array} { r } { \\widehat { \\mathbf { O } } _ { l } = \\Psi _ { \\Delta _ { l } ^ { X } } ( \\mathbf { X } _ { l } ) \\Psi _ { \\Delta _ { l } ^ { W } } ( \\mathbf { W } _ { l } ) \\cdot \\Delta _ { l } ^ { W } \\cdot \\Delta _ { l } ^ { X } , } \\end{array}\n$$",
|
| 483 |
+
"text_format": "latex",
|
| 484 |
+
"bbox": [
|
| 485 |
+
364,
|
| 486 |
+
178,
|
| 487 |
+
632,
|
| 488 |
+
199
|
| 489 |
+
],
|
| 490 |
+
"page_idx": 4
|
| 491 |
+
},
|
| 492 |
+
{
|
| 493 |
+
"type": "text",
|
| 494 |
+
"text": "where $\\widehat { \\mathbf { O } } _ { l }$ denotes the outputs of the quantized layer. From Eq. (8) and Eq. (9), it can be seen that the quantization intervals actually control the clamping thresholds in quantization process, which affects the quantization results to a great extent. Therefore, we are motivated to focus on optimizing the quantization intervals for both weights $\\Delta _ { l } ^ { W }$ and inputs $\\Delta _ { l } ^ { X }$ , where inputs $X _ { l }$ are generated from a given calibration dataset $\\mathbf { D }$ with $N$ samples. Specifically, the calibration dataset is much less than the common training dataset. ",
|
| 495 |
+
"bbox": [
|
| 496 |
+
173,
|
| 497 |
+
200,
|
| 498 |
+
825,
|
| 499 |
+
286
|
| 500 |
+
],
|
| 501 |
+
"page_idx": 4
|
| 502 |
+
},
|
| 503 |
+
{
|
| 504 |
+
"type": "text",
|
| 505 |
+
"text": "The self-attention layer is the critical component of the transformer since it can calculate the global relevance of the features, which makes the transformer unique from the convolutional neural networks. For the calculation of self-attention (Eq. 3), we empirically find that the relative order of the attention map has been changed after quantization as shown in $\\mathrm { F i g ~ 1 }$ , which could cause a significant performance degradation. Thus, a ranking loss is introduced to solve this problem during the quantization process: ",
|
| 506 |
+
"bbox": [
|
| 507 |
+
173,
|
| 508 |
+
291,
|
| 509 |
+
826,
|
| 510 |
+
375
|
| 511 |
+
],
|
| 512 |
+
"page_idx": 4
|
| 513 |
+
},
|
| 514 |
+
{
|
| 515 |
+
"type": "equation",
|
| 516 |
+
"img_path": "images/e7fc04d523ed0c02f3f4463af1b2e5f9f96225d716e40db6711e28cc839a5e9e.jpg",
|
| 517 |
+
"text": "$$\n\\mathcal { L } _ { r a n k i n g } = \\sum _ { k = 1 } ^ { h } \\sum _ { p = 1 } ^ { w - 1 } \\sum _ { q = p + 1 } ^ { w } \\varPhi \\bigl ( \\bigl ( \\widehat { \\mathbf { A } } _ { k p } - \\widehat { \\mathbf { A } } _ { k q } \\bigr ) \\cdot s i g n \\bigl ( \\mathbf { A } _ { k p } - \\mathbf { A } _ { k q } \\bigr ) \\bigr ) ,\n$$",
|
| 518 |
+
"text_format": "latex",
|
| 519 |
+
"bbox": [
|
| 520 |
+
281,
|
| 521 |
+
372,
|
| 522 |
+
715,
|
| 523 |
+
417
|
| 524 |
+
],
|
| 525 |
+
"page_idx": 4
|
| 526 |
+
},
|
| 527 |
+
{
|
| 528 |
+
"type": "text",
|
| 529 |
+
"text": "in which $\\varPhi ( m ) = ( \\theta - m ) _ { + }$ is hinge function with parameter $\\theta$ , $( h , w )$ are the size of matrix A. Given a pair of examples, the loss is 0 only when the examples are in the correct order and differed by a margin. ",
|
| 530 |
+
"bbox": [
|
| 531 |
+
173,
|
| 532 |
+
417,
|
| 533 |
+
826,
|
| 534 |
+
460
|
| 535 |
+
],
|
| 536 |
+
"page_idx": 4
|
| 537 |
+
},
|
| 538 |
+
{
|
| 539 |
+
"type": "text",
|
| 540 |
+
"text": "Then we combine the ranking loss with the similarity-aware quantization, and the overall optimization goal can be described as: ",
|
| 541 |
+
"bbox": [
|
| 542 |
+
173,
|
| 543 |
+
465,
|
| 544 |
+
823,
|
| 545 |
+
494
|
| 546 |
+
],
|
| 547 |
+
"page_idx": 4
|
| 548 |
+
},
|
| 549 |
+
{
|
| 550 |
+
"type": "equation",
|
| 551 |
+
"img_path": "images/9a01cdc6e49b598bf831acd6cd343a5e5dc2000ca3faa1f7c3428207e0e40017.jpg",
|
| 552 |
+
"text": "$$\n\\operatorname* { m i n } _ { \\Delta _ { l } ^ { W } , \\Delta _ { l } ^ { X } } \\gamma \\cdot \\mathcal { L } _ { r a n k i n g } - \\frac { 1 } { N } \\sum _ { i = 1 } ^ { N } \\Gamma ( \\mathbf { O } _ { l } ^ { i } , \\widehat { \\mathbf { O } } _ { l } ^ { i } ) , \\quad s . t . \\Delta _ { l } ^ { W } , \\Delta _ { l } ^ { X } \\in \\mathbb { R } ^ { + }\n$$",
|
| 553 |
+
"text_format": "latex",
|
| 554 |
+
"bbox": [
|
| 555 |
+
284,
|
| 556 |
+
494,
|
| 557 |
+
714,
|
| 558 |
+
537
|
| 559 |
+
],
|
| 560 |
+
"page_idx": 4
|
| 561 |
+
},
|
| 562 |
+
{
|
| 563 |
+
"type": "text",
|
| 564 |
+
"text": "where $\\mathcal { L } _ { r a n k }$ denote the pairwise ranking based loss function, and $\\gamma$ is the trade-off hyper-parameter. $\\Gamma ( \\mathbf { O } _ { l } ^ { i } , \\widehat { \\mathbf { O } } _ { l } ^ { i } )$ denotes the similarity metric between the original and quantized output feature maps, which can be formulated as: ",
|
| 565 |
+
"bbox": [
|
| 566 |
+
174,
|
| 567 |
+
539,
|
| 568 |
+
826,
|
| 569 |
+
583
|
| 570 |
+
],
|
| 571 |
+
"page_idx": 4
|
| 572 |
+
},
|
| 573 |
+
{
|
| 574 |
+
"type": "equation",
|
| 575 |
+
"img_path": "images/3da44615b954525ddea7bfb22b884187b8e468c9c37931da5fa66f6636a1c39d.jpg",
|
| 576 |
+
"text": "$$\n\\Gamma ( \\widehat { \\bf O } , { \\bf O } ) = \\frac { \\sum _ { j = 1 } ( { \\bf O } _ { j } - \\overline { { \\bf O } } ) ( \\widehat { \\bf O } _ { j } - \\overline { { \\bf O } } ) } { \\sqrt { \\sum _ { j = 1 } ( { \\bf O } _ { j } - \\overline { { \\bf O } } ) ^ { 2 } } \\sqrt { \\sum _ { j = 1 } ( \\widehat { \\bf O } _ { j } - \\overline { { \\bf O } } ) ^ { 2 } } } ,\n$$",
|
| 577 |
+
"text_format": "latex",
|
| 578 |
+
"bbox": [
|
| 579 |
+
320,
|
| 580 |
+
598,
|
| 581 |
+
676,
|
| 582 |
+
651
|
| 583 |
+
],
|
| 584 |
+
"page_idx": 4
|
| 585 |
+
},
|
| 586 |
+
{
|
| 587 |
+
"type": "text",
|
| 588 |
+
"text": "where the Pearson correlation coefficient is adopted as the measurement for the similarity since it subtracts the mean value of the data and can be more representative for the similarity between the distribution of quantized and original feature maps. ",
|
| 589 |
+
"bbox": [
|
| 590 |
+
176,
|
| 591 |
+
651,
|
| 592 |
+
821,
|
| 593 |
+
693
|
| 594 |
+
],
|
| 595 |
+
"page_idx": 4
|
| 596 |
+
},
|
| 597 |
+
{
|
| 598 |
+
"type": "text",
|
| 599 |
+
"text": "To solve the above optimization problem, we present a simple but efficient alternative searching method for the uniform quantization of transformer layers. Firstly, the quantization interval of inputs $\\Delta _ { l } ^ { X }$ is fixed, and the quantization interval of weights $\\Delta _ { l } ^ { W }$ is optimized for adjustment. Secondly, $\\Delta _ { l } ^ { W }$ is fixed, and $\\Delta _ { l } ^ { X }$ is optimized to fine-tune the quantization interval of the inputs. $\\Delta _ { l } ^ { W }$ and $\\Delta _ { l } ^ { X }$ are alternately optimized until the target function converges or the maximum iteration is exceeded. Moreover, for fast convergence, $\\Delta _ { l } ^ { W }$ and $\\Delta _ { l } ^ { X }$ are initialized in terms of the maximum of weights or inputs respectively. For the search space of $\\Delta _ { l } ^ { W }$ and $\\Delta _ { l } ^ { X }$ , we linearly divide interval of $[ \\alpha \\Delta _ { l } , \\beta \\Delta _ { l } ]$ into $C$ candidate options and conduct a simple search strategy on them. ",
|
| 600 |
+
"bbox": [
|
| 601 |
+
173,
|
| 602 |
+
698,
|
| 603 |
+
826,
|
| 604 |
+
814
|
| 605 |
+
],
|
| 606 |
+
"page_idx": 4
|
| 607 |
+
},
|
| 608 |
+
{
|
| 609 |
+
"type": "text",
|
| 610 |
+
"text": "Bias Correction To further reduce the biased error for the outputs raised by quantization, a bias correction method is then introduced after each search iteration. Suppose the quantization error of weights and inputs are defined as: ",
|
| 611 |
+
"bbox": [
|
| 612 |
+
173,
|
| 613 |
+
825,
|
| 614 |
+
826,
|
| 615 |
+
868
|
| 616 |
+
],
|
| 617 |
+
"page_idx": 4
|
| 618 |
+
},
|
| 619 |
+
{
|
| 620 |
+
"type": "equation",
|
| 621 |
+
"img_path": "images/43c99137e4f7f1908424ca8a5f2179457d494612ac997fd84df48a84cfe006cd.jpg",
|
| 622 |
+
"text": "$$\n\\begin{array} { r l } & { \\epsilon ^ { X } = \\Psi _ { \\Delta ^ { X } } ( \\mathbf { X } ) \\cdot \\Delta ^ { X } - \\mathbf { X } , } \\\\ & { \\epsilon ^ { W } = \\Psi _ { \\Delta ^ { W } } ( \\mathbf { W } ) \\cdot \\Delta ^ { W } - \\mathbf { W } . } \\end{array}\n$$",
|
| 623 |
+
"text_format": "latex",
|
| 624 |
+
"bbox": [
|
| 625 |
+
398,
|
| 626 |
+
868,
|
| 627 |
+
599,
|
| 628 |
+
911
|
| 629 |
+
],
|
| 630 |
+
"page_idx": 4
|
| 631 |
+
},
|
| 632 |
+
{
|
| 633 |
+
"type": "text",
|
| 634 |
+
"text": "If the expectation of the error for output is not zero, then the mean of the output will change. This shift in distribution may lead to detrimental behavior in the following layers. We can correct this change by seeing that: ",
|
| 635 |
+
"bbox": [
|
| 636 |
+
174,
|
| 637 |
+
90,
|
| 638 |
+
825,
|
| 639 |
+
133
|
| 640 |
+
],
|
| 641 |
+
"page_idx": 5
|
| 642 |
+
},
|
| 643 |
+
{
|
| 644 |
+
"type": "equation",
|
| 645 |
+
"img_path": "images/5a60bf5238bd9b4e7231fe7f1fbd3ae4289a9fca3037b5ecf67271b8ea3a312a.jpg",
|
| 646 |
+
"text": "$$\n\\begin{array} { r } { \\mathbb { E } [ \\widehat { \\mathbf { O } } ] = \\mathbb { E } [ \\mathbf { O } ] + \\mathbb { E } [ \\epsilon ^ { W } \\mathbf { X } ] + \\mathbb { E } [ \\epsilon ^ { X } \\mathbf { W } ] + \\mathbb { E } [ \\epsilon ^ { X } \\epsilon ^ { W } ] . } \\end{array}\n$$",
|
| 647 |
+
"text_format": "latex",
|
| 648 |
+
"bbox": [
|
| 649 |
+
331,
|
| 650 |
+
138,
|
| 651 |
+
665,
|
| 652 |
+
159
|
| 653 |
+
],
|
| 654 |
+
"page_idx": 5
|
| 655 |
+
},
|
| 656 |
+
{
|
| 657 |
+
"type": "text",
|
| 658 |
+
"text": "Thus, subtracting the expected error on the output from the biased output ensures that the mean for each output unit is preserved. For implementation, the expected error can be computed using the calibration data and subtracted from the layer’s bias parameter, since the expected error vector has the same shape as the layer’s output. ",
|
| 659 |
+
"bbox": [
|
| 660 |
+
173,
|
| 661 |
+
164,
|
| 662 |
+
825,
|
| 663 |
+
219
|
| 664 |
+
],
|
| 665 |
+
"page_idx": 5
|
| 666 |
+
},
|
| 667 |
+
{
|
| 668 |
+
"type": "text",
|
| 669 |
+
"text": "3.3 Nuclear Norm Based Mixed-Precision Quantization ",
|
| 670 |
+
"text_level": 1,
|
| 671 |
+
"bbox": [
|
| 672 |
+
173,
|
| 673 |
+
234,
|
| 674 |
+
573,
|
| 675 |
+
251
|
| 676 |
+
],
|
| 677 |
+
"page_idx": 5
|
| 678 |
+
},
|
| 679 |
+
{
|
| 680 |
+
"type": "text",
|
| 681 |
+
"text": "Different transformer layers are attending to different structures, and it is expected that they exhibit different sensitivity. Thus, assigning the same number of bit-widths to all the layers is sub-optimal. As a result, we explore mixed-precision quantization, where more bits are assigned to more sensitive layers in order to retain performance. Considering the unique structure of transformer layer, we assign all the operations in the MSA or MLP modules with the same bit-width. This will also be friendly to the hardware implementation since the weights and inputs are assigned with the same bit-width. ",
|
| 682 |
+
"bbox": [
|
| 683 |
+
173,
|
| 684 |
+
261,
|
| 685 |
+
825,
|
| 686 |
+
358
|
| 687 |
+
],
|
| 688 |
+
"page_idx": 5
|
| 689 |
+
},
|
| 690 |
+
{
|
| 691 |
+
"type": "text",
|
| 692 |
+
"text": "Singular value decomposition (SVD) is an important matrix decomposition approach in linear algebra. It takes a rectangular matrix of gene expression data, whose formulation can be written as : ",
|
| 693 |
+
"bbox": [
|
| 694 |
+
173,
|
| 695 |
+
364,
|
| 696 |
+
823,
|
| 697 |
+
392
|
| 698 |
+
],
|
| 699 |
+
"page_idx": 5
|
| 700 |
+
},
|
| 701 |
+
{
|
| 702 |
+
"type": "equation",
|
| 703 |
+
"img_path": "images/0820e4928cac1c6aa27264e471d7759341403acdbe4480b502b49b3186167b10.jpg",
|
| 704 |
+
"text": "$$\n\\mathbf { M } = \\mathbf { U } \\boldsymbol { \\Sigma } \\mathbf { V } , \\quad \\mathrm { t r ( } \\mathbf { M } ) = \\sum _ { i = 1 } ^ { m } \\boldsymbol { \\Sigma } _ { i i } ,\n$$",
|
| 705 |
+
"text_format": "latex",
|
| 706 |
+
"bbox": [
|
| 707 |
+
385,
|
| 708 |
+
398,
|
| 709 |
+
611,
|
| 710 |
+
439
|
| 711 |
+
],
|
| 712 |
+
"page_idx": 5
|
| 713 |
+
},
|
| 714 |
+
{
|
| 715 |
+
"type": "text",
|
| 716 |
+
"text": "where the diagonal entries $\\Sigma _ { i i }$ of $\\pmb { \\Sigma }$ are known as the singular values of $\\mathbf { M }$ . And the nuclear norm tr is the sum of singular values, which represents the data relevance of the matrix. In this paper, we propose to estimate the sensitivity of the transformer layer with the nuclear norm of the attention map in the MSA module and the output feature in the MLP module. The nuclear norm can be used to reduce the search space of the mixed-precision settings, while using higher bit-widths for layers that are more sensitive and vice versa. Inspired by the method in [10], we utilize a Pareto frontier approach to determine the bit-width. The main idea is to sort each candidate bit-width configuration based on the total second-order perturbation that they cause, according to the following metric: ",
|
| 717 |
+
"bbox": [
|
| 718 |
+
173,
|
| 719 |
+
450,
|
| 720 |
+
825,
|
| 721 |
+
563
|
| 722 |
+
],
|
| 723 |
+
"page_idx": 5
|
| 724 |
+
},
|
| 725 |
+
{
|
| 726 |
+
"type": "equation",
|
| 727 |
+
"img_path": "images/1aa201e4fb459e36c1e4b140e84cef2e892fb69c88a8d3daf18ef26b7e30bc88.jpg",
|
| 728 |
+
"text": "$$\n\\Omega = \\sum _ { i = 1 } ^ { L } \\Omega _ { i } = \\sum _ { i = 1 } ^ { L _ { M H A } } \\mathrm { t r } ( \\mathbf A _ { i } ) \\cdot \\lVert \\widehat { \\mathbf A _ { i } } - \\mathbf A _ { i } \\rVert _ { 2 } ^ { 2 } + \\sum _ { j = 1 } ^ { L _ { M S A } } \\mathrm { t r } ( \\mathbf O _ { j } ) \\cdot \\lVert \\widehat { \\mathbf O _ { j } } - \\mathbf O _ { j } \\rVert _ { 2 } ^ { 2 } .\n$$",
|
| 729 |
+
"text_format": "latex",
|
| 730 |
+
"bbox": [
|
| 731 |
+
259,
|
| 732 |
+
578,
|
| 733 |
+
736,
|
| 734 |
+
623
|
| 735 |
+
],
|
| 736 |
+
"page_idx": 5
|
| 737 |
+
},
|
| 738 |
+
{
|
| 739 |
+
"type": "text",
|
| 740 |
+
"text": "Given a target model size, the candidate bit-width configurations are sorted based on their $\\Omega$ value and choose the bit-width configuration with minimal $\\Omega$ . The nuclear norm of the attention map and output feature in each transformer layer are shown in Figure 1. As we can see, they are various for different transformer layers. ",
|
| 741 |
+
"bbox": [
|
| 742 |
+
174,
|
| 743 |
+
625,
|
| 744 |
+
825,
|
| 745 |
+
680
|
| 746 |
+
],
|
| 747 |
+
"page_idx": 5
|
| 748 |
+
},
|
| 749 |
+
{
|
| 750 |
+
"type": "text",
|
| 751 |
+
"text": "4 Exprimental results ",
|
| 752 |
+
"text_level": 1,
|
| 753 |
+
"bbox": [
|
| 754 |
+
176,
|
| 755 |
+
699,
|
| 756 |
+
370,
|
| 757 |
+
717
|
| 758 |
+
],
|
| 759 |
+
"page_idx": 5
|
| 760 |
+
},
|
| 761 |
+
{
|
| 762 |
+
"type": "text",
|
| 763 |
+
"text": "In this section, we evaluate the performance of the proposed post-training quantization scheme on vision transformer model for image classification (ViT [11] and DeiT [26]) and object detection (DETR [4]). To the best of our knowledge, there is no published work done on post-training quantization of vision transformer at this point, so we implement recent post-training quantization methods for CNNs as described in the papers by ourselves. It is shown that the proposed method outperforms the conventional post-training quantization methods. Moreover, extensive experiments of ablation study have shown that the proposed similarity-aware, ranking-aware quantization and bias correction method are beneficial for the post-training quantization of vision transformer. ",
|
| 764 |
+
"bbox": [
|
| 765 |
+
173,
|
| 766 |
+
731,
|
| 767 |
+
825,
|
| 768 |
+
842
|
| 769 |
+
],
|
| 770 |
+
"page_idx": 5
|
| 771 |
+
},
|
| 772 |
+
{
|
| 773 |
+
"type": "text",
|
| 774 |
+
"text": "4.1 Implementation details ",
|
| 775 |
+
"text_level": 1,
|
| 776 |
+
"bbox": [
|
| 777 |
+
174,
|
| 778 |
+
857,
|
| 779 |
+
374,
|
| 780 |
+
872
|
| 781 |
+
],
|
| 782 |
+
"page_idx": 5
|
| 783 |
+
},
|
| 784 |
+
{
|
| 785 |
+
"type": "text",
|
| 786 |
+
"text": "Datasets For image classification, the CIFAR-10, CIFAR-100 and ILSVRC-2012 ImageNet (we refer to it as ImageNet in what follows) datasets are utilized to evaluate the quantization performance. ",
|
| 787 |
+
"bbox": [
|
| 788 |
+
173,
|
| 789 |
+
882,
|
| 790 |
+
823,
|
| 791 |
+
911
|
| 792 |
+
],
|
| 793 |
+
"page_idx": 5
|
| 794 |
+
},
|
| 795 |
+
{
|
| 796 |
+
"type": "text",
|
| 797 |
+
"text": "The CIFAR-10 dataset consists of $5 0 K$ training images and $1 0 K$ test images, which are labeled for 10 classes. And CIFAR-100 dataset also contains $5 0 K$ training images and $1 0 K$ test images, expect that they are labeled for 100 classes. ImageNet dataset contains 1.2 million training images and $5 0 K$ validation images labeled for 1,000 categories. For object detection task, the COCO2017 dataset is utilized to evaluate the quantization performance, which contains $1 1 8 K$ training images and $5 K$ validation images. ",
|
| 798 |
+
"bbox": [
|
| 799 |
+
173,
|
| 800 |
+
90,
|
| 801 |
+
825,
|
| 802 |
+
174
|
| 803 |
+
],
|
| 804 |
+
"page_idx": 6
|
| 805 |
+
},
|
| 806 |
+
{
|
| 807 |
+
"type": "text",
|
| 808 |
+
"text": "Experimental settings We randomly select 100 images for CIFAR-10 and CIFAR-100 dataset and 1000 images for ImageNet and COCO2017 dataset from the training dataset as the calibration dataset. For the hyper-parameter, $\\alpha$ and $\\beta$ are set to 0.5 and 1.2 for all the experiments. The maximum iteration is set to 20 if not mentioned specifically. For mixed-precision, we utilize {4,5,6,7,8} and {6,7,8,9,10} bits while the target bit-width are 6 bit and 8 bit, respectively. ",
|
| 809 |
+
"bbox": [
|
| 810 |
+
174,
|
| 811 |
+
195,
|
| 812 |
+
825,
|
| 813 |
+
265
|
| 814 |
+
],
|
| 815 |
+
"page_idx": 6
|
| 816 |
+
},
|
| 817 |
+
{
|
| 818 |
+
"type": "text",
|
| 819 |
+
"text": "Baseline For image classification, we evaluate our quantization method on two popular vision transformer implementation: ViT [11] and DeiT [26]. The ViT-B, ViT-L, DeiT-S, DeiT-B are adopted as the baseline model, whose top-1 accuracy on ImageNet dataset are $7 1 . 5 8 \\%$ , $7 1 . 4 8 \\%$ , $7 9 . 8 \\%$ , $8 1 . 8 \\%$ respectively. For a fair comparison, we utilize the official implementation of DeiT and do not use other techniques like knowledge distillation. For object detection, the DETR model using ResNet-50 backbone is adopted, which achieves a $4 2 . 0 \\mathrm { m A P }$ on COCO dataset. ",
|
| 820 |
+
"bbox": [
|
| 821 |
+
174,
|
| 822 |
+
287,
|
| 823 |
+
825,
|
| 824 |
+
369
|
| 825 |
+
],
|
| 826 |
+
"page_idx": 6
|
| 827 |
+
},
|
| 828 |
+
{
|
| 829 |
+
"type": "text",
|
| 830 |
+
"text": "4.2 Results and Analysis ",
|
| 831 |
+
"text_level": 1,
|
| 832 |
+
"bbox": [
|
| 833 |
+
174,
|
| 834 |
+
393,
|
| 835 |
+
356,
|
| 836 |
+
409
|
| 837 |
+
],
|
| 838 |
+
"page_idx": 6
|
| 839 |
+
},
|
| 840 |
+
{
|
| 841 |
+
"type": "text",
|
| 842 |
+
"text": "Image classification The experimental results are shown in Table 1. We firstly evaluate the proposed method on ViT-B and ViT-L model. ViT-B model is a 12-layer transformer with 12 heads and 768 embedding dimension. For the similar quantized model size, the proposed method outperforms percentile-based method [18] by $3 . 3 5 \\%$ and $2 . 0 7 \\%$ on CIFAR-10 dataset, respectively. And it is worth noting that the performance of the proposed 8-bit model is comparable to the fullprecision model. The proposed method obtains the similar performance on CIFAR-100 dataset and ImageNet dataset, while the average gains are $2 . 9 5 \\%$ and $3 . 2 8 \\%$ respectively. Moreover, the performance of the proposed 6-bit model is even better than the 8-bit percentile-based model, which means that the proposed method can save about $2 5 \\%$ memory and $44 \\%$ computational costs than conventional post-training quantization method. ",
|
| 843 |
+
"bbox": [
|
| 844 |
+
174,
|
| 845 |
+
421,
|
| 846 |
+
825,
|
| 847 |
+
560
|
| 848 |
+
],
|
| 849 |
+
"page_idx": 6
|
| 850 |
+
},
|
| 851 |
+
{
|
| 852 |
+
"type": "text",
|
| 853 |
+
"text": "ViT-L model is much larger network which consists of 24 transformer layer with 16 heads and 1024 embedding dimension. It contains 307M parameters, however its performance is worse than ViT-B. We also test the quantization methods on CIFAR-10, CIFAR-100 and ImageNet dataset. As shown in Table 1, the performance of the proposed method outperforms the percentile-based method by a large margin. It is worth mentioning that the 8-bit proposed model is even better than full-precision model on CIFAR-10 dataset and comparable to the full-precision model on CIFAR-100 dataset and ImageNet model. It is supposed that there is more redundancy in the ViT-L model and the performance degradation of quantization is less than that of ViT-B model. ",
|
| 854 |
+
"bbox": [
|
| 855 |
+
174,
|
| 856 |
+
566,
|
| 857 |
+
825,
|
| 858 |
+
678
|
| 859 |
+
],
|
| 860 |
+
"page_idx": 6
|
| 861 |
+
},
|
| 862 |
+
{
|
| 863 |
+
"type": "text",
|
| 864 |
+
"text": "The architecture of DeiT network is the same as ViT, expect that DeiT utilizes the data augmentation and regularization strategies. As a result, the performance of DeiT is much better than ViT. Among the models, ViT-S consists of 12 transformer layers with 6 heads and 384 embedding dimension. As we can see, the percentile-based method largely hurts the performance while the accuracy losses of 6-bit and 8-bit models are $9 . 3 1 \\%$ and $5 . 8 2 \\%$ . EasyQuant [30] is a popular simple post-training quantization method which improves the performance loss to $6 . 5 4 \\%$ and $3 . 2 1 \\%$ , respectively. Bit-Split proposes a bit splitting and stitching framework [28], while the Top-1 accuracy degradation are $5 . 7 6 \\%$ and $2 . 7 4 \\%$ . In comparison, the Top-1 accuracy losses of the proposed post-training quantization scheme are $5 . 2 2 \\%$ and $2 . 3 3 \\%$ respectively. In addition, when the mixed-precision is conducted, the 8-bit quantized model can achieve $7 8 . 0 9 \\%$ Top-1 accuracy. ",
|
| 865 |
+
"bbox": [
|
| 866 |
+
174,
|
| 867 |
+
683,
|
| 868 |
+
825,
|
| 869 |
+
821
|
| 870 |
+
],
|
| 871 |
+
"page_idx": 6
|
| 872 |
+
},
|
| 873 |
+
{
|
| 874 |
+
"type": "text",
|
| 875 |
+
"text": "DeiT-B is a much larger network than DeiT-S, which consists of 12 transformer layers with 12 heads and 768 embedding dimension. As shown in Table 1, the Top-1 accuracy of percentile-based are $7 3 . 9 9 \\%$ and $7 5 . 2 1 \\%$ when quantized to 6-bit and 8-bit respectively. And the proposed scheme improves the performance of the quantized model to $7 7 . 4 7 \\%$ and $8 1 . 2 9 \\%$ . Another point is that the accuracy losses of DeiT-B are smaller than DeiT-S and we think that this is because DeiT-B consists of more parameters and is more representive when quantized to the same bit-width. ",
|
| 876 |
+
"bbox": [
|
| 877 |
+
174,
|
| 878 |
+
828,
|
| 879 |
+
823,
|
| 880 |
+
911
|
| 881 |
+
],
|
| 882 |
+
"page_idx": 6
|
| 883 |
+
},
|
| 884 |
+
{
|
| 885 |
+
"type": "table",
|
| 886 |
+
"img_path": "images/eb037808763b98307e093cd771d25b3a9c4d077d720cec16443b5c084821ca86.jpg",
|
| 887 |
+
"table_caption": [
|
| 888 |
+
"Table 1: Comparison on the performance of proposed mixed-precision post-training quantization method with conventional quantization method for image classification. ’MP’ represents for mixedprecision. "
|
| 889 |
+
],
|
| 890 |
+
"table_footnote": [],
|
| 891 |
+
"table_body": "<table><tr><td>Model</td><td>Dataset</td><td>Method</td><td>W-bit</td><td>A-bit</td><td>Model size (MB)</td><td>Top-1 Accuracy</td></tr><tr><td rowspan=\"12\">ViT-B</td><td rowspan=\"5\">CIFAR-10</td><td>Baseline Percentile</td><td>32 6</td><td>32 6</td><td>344 64.5</td><td>98.13 93.48</td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Ours</td><td>6MP</td><td>6MP</td><td>64.6</td><td>96.83</td></tr><tr><td>Percentile</td><td>8</td><td>8</td><td>86.2</td><td>95.72</td></tr><tr><td>Ours</td><td>8 MP</td><td>8 MP</td><td>86.0</td><td>97.79</td></tr><tr><td rowspan=\"5\">CIFAR-100</td><td>Baseline</td><td>32 6</td><td>32 6</td><td>344</td><td>87.13 80.56</td></tr><tr><td>Percentile</td><td></td><td></td><td>64.5 64.4</td><td>83.99</td></tr><tr><td>Ours</td><td>6MP 8</td><td>6MP 8</td><td>86.2</td><td></td></tr><tr><td>Percentile</td><td></td><td>8MP</td><td>86.5</td><td>83.28</td></tr><tr><td>Ours Baseline</td><td>8 MP 32</td><td></td><td></td><td>85.76</td></tr><tr><td rowspan=\"5\">ImageNet</td><td>Percentile</td><td>6</td><td>32 6</td><td>344 64.5</td><td>77.91 71.58</td></tr><tr><td>Ours</td><td>6MP</td><td>6MP</td><td>64.8</td><td>75.26</td></tr><tr><td>Percentile</td><td>8</td><td>8</td><td>86.2</td><td>74.10</td></tr><tr><td>Ours</td><td>8 MP</td><td>8 MP</td><td>86.5</td><td>76.98</td></tr><tr><td></td><td></td><td>32</td><td>1228</td><td></td></tr><tr><td rowspan=\"9\">ViT-L</td><td rowspan=\"6\">CIFAR-10</td><td>Baseline</td><td>32</td><td></td><td></td><td>97.86</td></tr><tr><td>Percentile Ours</td><td>6 6MP</td><td>6 6MP</td><td>230.2 232</td><td>93.27 96.09</td></tr><tr><td>Percentile</td><td>8</td><td>8</td><td>307</td><td>94.19</td></tr><tr><td>Ours</td><td>8 MP</td><td>8 MP</td><td>305.8</td><td>97.90</td></tr><tr><td>Baseline</td><td>32</td><td>32</td><td>1228</td><td>86.35</td></tr><tr><td>Percentile</td><td>6</td><td>6</td><td>230.2</td><td></td></tr><tr><td>Ours</td><td>6 MP</td><td>6MP</td><td>231</td><td>80.54</td></tr><tr><td rowspan=\"5\">CIFAR-100</td><td></td><td>8</td><td></td><td></td><td>83.69</td></tr><tr><td>Percentile Ours</td><td>8 MP</td><td>8</td><td>307</td><td>83.01</td></tr><tr><td></td><td></td><td>8 MP</td><td>307.8</td><td>85.83</td></tr><tr><td>Baseline</td><td>32</td><td>32</td><td>1228</td><td>76.53</td></tr><tr><td>Percentile Ours</td><td>6</td><td>6</td><td>230.2</td><td>71.48</td></tr><tr><td rowspan=\"5\">ImageNet</td><td></td><td>6 MP</td><td>6 MP</td><td>231.6</td><td>75.46</td></tr><tr><td>Percentile</td><td>8</td><td>8</td><td>307</td><td>75.17</td></tr><tr><td>Ours</td><td>8 MP</td><td>8 MP</td><td>306.4</td><td>76.41</td></tr><tr><td>Baseline</td><td>32</td><td>32</td><td>88</td><td>79.8</td></tr><tr><td>Percentile [18] EasyQuant [30]</td><td>6</td><td>6</td><td>16.5</td><td>70.49</td></tr><tr><td rowspan=\"9\">DeiT-S</td><td></td><td>6</td><td>6</td><td>16.5</td><td>73.26</td><td></td></tr><tr><td>Bit-Split [28]</td><td>6</td><td>6</td><td>16.5</td><td></td><td>74.04</td></tr><tr><td>Ours</td><td>6</td><td>6</td><td>16.5</td><td></td><td>74.58</td></tr><tr><td>ImageNet Ours</td><td>6MP</td><td>6MP</td><td>16.6</td><td></td><td>75.10</td></tr><tr><td>Percentile [18]</td><td></td><td>8</td><td>8</td><td>22.0</td><td>73.98</td></tr><tr><td>EasyQuant [30]</td><td>8</td><td>8</td><td>22.0</td><td></td><td>76.59</td></tr><tr><td>Bit-Split [28]</td><td></td><td>8</td><td>22.0</td><td></td><td>77.06</td></tr><tr><td>Ours</td><td>8 8</td><td>8</td><td>22.0</td><td></td><td>77.47</td></tr><tr><td>Ours</td><td>8 MP</td><td>8 MP</td><td>22.2</td><td></td><td>78.09</td></tr><tr><td rowspan=\"11\">DeiT-B</td><td></td><td></td><td></td><td></td><td>344</td><td>81.8</td></tr><tr><td>Percentile [18]</td><td>Baseline</td><td>32 6</td><td>32 6</td><td>64.5</td><td>73.99</td></tr><tr><td></td><td>EasyQuant [30]</td><td>6</td><td>6</td><td>64.5</td><td>75.86</td></tr><tr><td>Bit-Split [28]</td><td>6</td><td>6</td><td>64.5</td><td></td><td>76.39</td></tr><tr><td>Ours</td><td>4 MP</td><td>4 MP</td><td>43.6</td><td></td><td>75.94</td></tr><tr><td>Ours</td><td>6</td><td>6</td><td>64.5</td><td></td><td>77.02</td></tr><tr><td rowspan=\"8\">ImageNet</td><td>Ours</td><td>6 MP</td><td>6MP</td><td>64.3</td><td>77.47</td></tr><tr><td>Percentile [18]</td><td>8</td><td>8</td><td>86.0</td><td>75.21</td></tr><tr><td>EasyQuant [30]</td><td>8</td><td>8</td><td>86.0</td><td>79.36</td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Bit-Split [28]</td><td>8</td><td>8</td><td>86.0</td><td>79.42</td></tr><tr><td>Ours</td><td>8</td><td>8</td><td>86.0</td><td>80.48</td></tr><tr><td>Ours</td><td>8 MP</td><td>8MP</td><td>86.8</td><td>81.29</td></tr></table>",
|
| 892 |
+
"bbox": [
|
| 893 |
+
173,
|
| 894 |
+
150,
|
| 895 |
+
830,
|
| 896 |
+
897
|
| 897 |
+
],
|
| 898 |
+
"page_idx": 7
|
| 899 |
+
},
|
| 900 |
+
{
|
| 901 |
+
"type": "table",
|
| 902 |
+
"img_path": "images/b9cc9f1b8213161c7f862bd8e24aac816633ffb22f9dac4f48ba22f6aa64fda4.jpg",
|
| 903 |
+
"table_caption": [
|
| 904 |
+
"Table 2: Comparison on the performance of proposed mixed-precision post-training quantization method with conventional quantization method for DETR. ’MP’ represents for mixed-precision. "
|
| 905 |
+
],
|
| 906 |
+
"table_footnote": [],
|
| 907 |
+
"table_body": "<table><tr><td>Model</td><td>Dataset</td><td>Method</td><td>W-bit</td><td>A-bit</td><td>Model size (MB)</td><td>mAP</td></tr><tr><td rowspan=\"9\">DETR</td><td rowspan=\"6\">COCO2017</td><td>Baseline</td><td>32</td><td>32</td><td>164</td><td>42.0</td></tr><tr><td>Percentile [18]</td><td>6</td><td>6</td><td>30.75</td><td>37.5</td></tr><tr><td>EasyQuant [30]</td><td>6</td><td>6</td><td>30.75</td><td>39.0</td></tr><tr><td>Bit-Split [28]</td><td>6</td><td>6</td><td>30.75</td><td>38.9</td></tr><tr><td>Ours</td><td>6</td><td>6</td><td>30.75</td><td>40.1</td></tr><tr><td>Ours</td><td>6 MP</td><td>6 MP</td><td>30.98</td><td>40.5</td></tr><tr><td>Percentile [18] EasyQuant [30]</td><td>8</td><td>8</td><td>41.00</td><td>38.6</td></tr><tr><td></td><td>8</td><td>8</td><td>41.00</td><td>40.4</td></tr><tr><td></td><td>Bit-Split [28]</td><td>8 8 8</td><td>41.00</td><td>40.6</td></tr><tr><td></td><td>Ours</td><td>8</td><td>41.00</td><td>41.2</td></tr><tr><td>Ours</td><td>8 MP</td><td>8 MP</td><td>41.64</td><td>41.7</td></tr></table>",
|
| 908 |
+
"bbox": [
|
| 909 |
+
209,
|
| 910 |
+
123,
|
| 911 |
+
790,
|
| 912 |
+
292
|
| 913 |
+
],
|
| 914 |
+
"page_idx": 8
|
| 915 |
+
},
|
| 916 |
+
{
|
| 917 |
+
"type": "text",
|
| 918 |
+
"text": "Object Detection In order to show the generalization capability of proposed method, we also evaluate our method for object detection task using DETR [4]. The experimental results are shown in Table 2. As we can see, the proposed method outperforms percentile-based method, EasyQuant, BitSplit by 2.6, 1.1 and $1 . 2 \\mathrm { m A P }$ for 6-bit quantization, respectively. The mixed-precision quantization can further boost the performance of the method. For 8-bit quantization, the mAP of the proposed mixed-precision quantization method is comparable to the full-precision model. ",
|
| 919 |
+
"bbox": [
|
| 920 |
+
173,
|
| 921 |
+
325,
|
| 922 |
+
826,
|
| 923 |
+
410
|
| 924 |
+
],
|
| 925 |
+
"page_idx": 8
|
| 926 |
+
},
|
| 927 |
+
{
|
| 928 |
+
"type": "text",
|
| 929 |
+
"text": "4.3 Ablation study ",
|
| 930 |
+
"text_level": 1,
|
| 931 |
+
"bbox": [
|
| 932 |
+
174,
|
| 933 |
+
434,
|
| 934 |
+
315,
|
| 935 |
+
449
|
| 936 |
+
],
|
| 937 |
+
"page_idx": 8
|
| 938 |
+
},
|
| 939 |
+
{
|
| 940 |
+
"type": "text",
|
| 941 |
+
"text": "In this section, we evaluate the effect of the proposed similarity-aware quantization module, rankingaware quantization module, bias correction method and the mixed-precision method. The experimental results are shown in Table 3, while experiments are conducted on ImageNet dataset with ViT-B model. As we can see, the Top-1 accuracy of only using similarity-aware quantization is $7 5 . 4 2 \\%$ which is inferior to the full-precision model and using ranking-aware quantization loss and bias correction method can improve the performance by $0 . 5 2 \\%$ and $0 . 3 9 \\%$ . It is worth noting that the nuclear norm based mixed-precision can further promote the performance of the quantized model, since it considers the variant sensitivity of different layers. ",
|
| 942 |
+
"bbox": [
|
| 943 |
+
173,
|
| 944 |
+
463,
|
| 945 |
+
826,
|
| 946 |
+
574
|
| 947 |
+
],
|
| 948 |
+
"page_idx": 8
|
| 949 |
+
},
|
| 950 |
+
{
|
| 951 |
+
"type": "text",
|
| 952 |
+
"text": "It is also shown that the Top-1 accuracy of using the similarity-aware mixed-precision quantization is $7 6 . 2 6 \\%$ . And the ranking-aware quantization and bias correction can still boost the performance in this case. Besides, the performance of the 8-bit quantized model using all the proposed methods is $7 6 . 9 8 \\%$ , which is comparable to the full-precision model. ",
|
| 953 |
+
"bbox": [
|
| 954 |
+
174,
|
| 955 |
+
580,
|
| 956 |
+
825,
|
| 957 |
+
636
|
| 958 |
+
],
|
| 959 |
+
"page_idx": 8
|
| 960 |
+
},
|
| 961 |
+
{
|
| 962 |
+
"type": "table",
|
| 963 |
+
"img_path": "images/b92f3f7bd422da48496a2266c9895f75e7411eb73b5a7d50460c8e0a364a1cef.jpg",
|
| 964 |
+
"table_caption": [
|
| 965 |
+
"Table 3: Ablation study of the proposed similarity-aware quantization module, ranking-aware quantization module, bias correction and mixed-precision method. "
|
| 966 |
+
],
|
| 967 |
+
"table_footnote": [],
|
| 968 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Similarity</td><td rowspan=1 colspan=1>Ranking</td><td rowspan=1 colspan=1>Bias Correction</td><td rowspan=1 colspan=1>Mixed-Precision</td><td rowspan=1 colspan=1>Modelsize(MB)</td><td rowspan=1 colspan=1>Top-1 Accuracy</td></tr><tr><td rowspan=3 colspan=1></td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>344</td><td rowspan=1 colspan=1>77.91</td></tr><tr><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>86.2</td><td rowspan=2 colspan=1>75.4275.94</td></tr><tr><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>86.2</td></tr><tr><td rowspan=6 colspan=1>ViT-B</td><td rowspan=3 colspan=1>√√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>86.2</td><td rowspan=1 colspan=1>75.81</td></tr><tr><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>86.2</td><td rowspan=1 colspan=1>76.49</td></tr><tr><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>86.5</td><td rowspan=1 colspan=1>76.26</td></tr><tr><td rowspan=3 colspan=1>√T√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>86.5</td><td rowspan=1 colspan=1>76.61</td></tr><tr><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>86.5</td><td rowspan=1 colspan=1>76.53</td></tr><tr><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>86.5</td><td rowspan=1 colspan=1>76.98</td></tr></table>",
|
| 969 |
+
"bbox": [
|
| 970 |
+
173,
|
| 971 |
+
691,
|
| 972 |
+
848,
|
| 973 |
+
833
|
| 974 |
+
],
|
| 975 |
+
"page_idx": 8
|
| 976 |
+
},
|
| 977 |
+
{
|
| 978 |
+
"type": "text",
|
| 979 |
+
"text": "We also compared the performance of the proposed method with the hessian-based mixed-precision method, where the experiments are conducted with ViT-B on ImageNet dataset. As we can see in Table 4, the proposed method achieves a similar result while the consuming computation time is much less than hessian-based approach. ",
|
| 980 |
+
"bbox": [
|
| 981 |
+
174,
|
| 982 |
+
854,
|
| 983 |
+
825,
|
| 984 |
+
911
|
| 985 |
+
],
|
| 986 |
+
"page_idx": 8
|
| 987 |
+
},
|
| 988 |
+
{
|
| 989 |
+
"type": "table",
|
| 990 |
+
"img_path": "images/c952a1116892a5982d0e62fbae9d52ab8f02fefeec8f7de1278093c932c060eb.jpg",
|
| 991 |
+
"table_caption": [
|
| 992 |
+
"Table 4: Performance comparison with hessian-based mixed=precision method. "
|
| 993 |
+
],
|
| 994 |
+
"table_footnote": [],
|
| 995 |
+
"table_body": "<table><tr><td>Method</td><td>W-bit</td><td>A-bit</td><td>Model size (MB)</td><td>Computation time (s)</td><td>Top-1 Accuracy</td></tr><tr><td>Hessian-based</td><td>8MP</td><td>8MP</td><td>86.7</td><td>754.6</td><td>77.01</td></tr><tr><td>Ours</td><td>8 MP</td><td>8 MP</td><td>86.5</td><td>53.1</td><td>76.98</td></tr></table>",
|
| 996 |
+
"bbox": [
|
| 997 |
+
178,
|
| 998 |
+
108,
|
| 999 |
+
818,
|
| 1000 |
+
155
|
| 1001 |
+
],
|
| 1002 |
+
"page_idx": 9
|
| 1003 |
+
},
|
| 1004 |
+
{
|
| 1005 |
+
"type": "text",
|
| 1006 |
+
"text": "5 Conclusion ",
|
| 1007 |
+
"text_level": 1,
|
| 1008 |
+
"bbox": [
|
| 1009 |
+
173,
|
| 1010 |
+
180,
|
| 1011 |
+
299,
|
| 1012 |
+
198
|
| 1013 |
+
],
|
| 1014 |
+
"page_idx": 9
|
| 1015 |
+
},
|
| 1016 |
+
{
|
| 1017 |
+
"type": "text",
|
| 1018 |
+
"text": "In this paper, we have developed a novel post-training quantization scheme for vision transformer, in which the bit-widths of each layer are variant based on the nuclear norm of the attention map and output feature in the transformer layer. To solve the optimization problem of the quantization, we propose to search the optimal quantization interval for remaining the similarity between the quantized and original feature maps. In addition, we thoroughly analyze the different between attention layers and conventional layers and introduce a ranking loss to keep the relative order of the attention values. Specifically, the bias correction is employed to reduce the accumulated quantization error. Last but not the least, the optimal quantization interval for each transformer layer is carefully optimized using an alternative searching strategy. Experimental results show that the proposed method outperforms the conventional post-training quantization method by a large margin in terms of both network accuracy and memory costs. ",
|
| 1019 |
+
"bbox": [
|
| 1020 |
+
173,
|
| 1021 |
+
213,
|
| 1022 |
+
826,
|
| 1023 |
+
366
|
| 1024 |
+
],
|
| 1025 |
+
"page_idx": 9
|
| 1026 |
+
},
|
| 1027 |
+
{
|
| 1028 |
+
"type": "text",
|
| 1029 |
+
"text": "Acknowledge ",
|
| 1030 |
+
"text_level": 1,
|
| 1031 |
+
"bbox": [
|
| 1032 |
+
176,
|
| 1033 |
+
387,
|
| 1034 |
+
287,
|
| 1035 |
+
405
|
| 1036 |
+
],
|
| 1037 |
+
"page_idx": 9
|
| 1038 |
+
},
|
| 1039 |
+
{
|
| 1040 |
+
"type": "text",
|
| 1041 |
+
"text": "This work was partly supported by the National Natural Science Foundation of China (61961130392) and PKU-Baidu Fund(2019BD003). Besides, High-Performance Computing Platform of Peking University is acknowledged. ",
|
| 1042 |
+
"bbox": [
|
| 1043 |
+
176,
|
| 1044 |
+
420,
|
| 1045 |
+
825,
|
| 1046 |
+
462
|
| 1047 |
+
],
|
| 1048 |
+
"page_idx": 9
|
| 1049 |
+
},
|
| 1050 |
+
{
|
| 1051 |
+
"type": "text",
|
| 1052 |
+
"text": "References ",
|
| 1053 |
+
"text_level": 1,
|
| 1054 |
+
"bbox": [
|
| 1055 |
+
174,
|
| 1056 |
+
484,
|
| 1057 |
+
266,
|
| 1058 |
+
501
|
| 1059 |
+
],
|
| 1060 |
+
"page_idx": 9
|
| 1061 |
+
},
|
| 1062 |
+
{
|
| 1063 |
+
"type": "text",
|
| 1064 |
+
"text": "[1] Haoli Bai, Wei Zhang, Lu Hou, Lifeng Shang, Jing Jin, Xin Jiang, Qun Liu, Michael Lyu, and Irwin King. Binarybert: Pushing the limit of bert quantization. arXiv preprint arXiv:2012.15701, 2020. \n[2] Ron Banner, Yury Nahshan, Elad Hoffer, and Daniel Soudry. Post-training 4-bit quantization of convolution networks for rapid-deployment. arXiv preprint arXiv:1810.05723, 2018. \n[3] Yaohui Cai, Zhewei Yao, Zhen Dong, Amir Gholami, Michael W Mahoney, and Kurt Keutzer. Zeroq: A novel zero shot quantization framework. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13169–13178, 2020. \n[4] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. arXiv preprint arXiv:2005.12872, 2020. \n[5] Hanting Chen, Yunhe Wang, Tianyu Guo, Chang Xu, Yiping Deng, Zhenhua Liu, Siwei Ma, Chunjing Xu, Chao Xu, and Wen Gao. Pre-trained image processing transformer. arXiv preprint arXiv:2012.00364, 2020. \n[6] Mark Chen, Alec Radford, Rewon Child, Jeffrey Wu, Heewoo Jun, David Luan, and Ilya Sutskever. Generative pretraining from pixels. In International Conference on Machine Learning, pages 1691–1703. PMLR, 2020. \n[7] Jungwook Choi, Zhuo Wang, Swagath Venkataramani, Pierce I-Jen Chuang, Vijayalakshmi Srinivasan, and Kailash Gopalakrishnan. Pact: Parameterized clipping activation for quantized neural networks. arXiv preprint arXiv:1805.06085, 2018. \n[8] Yoni Choukroun, Eli Kravchik, Fan Yang, and Pavel Kisilev. Low-bit quantization of neural networks for efficient inference. In ICCV Workshops, pages 3009–3018, 2019. \n[9] M. Courbariaux, I. Hubara, D. Soudry, R. El-Yaniv, and Y. Bengio. Binarized neural networks: Training deep neural networks with weights and activations constrained $^ \\mathrm { t o + 1 }$ or-1. arXiv preprint arXiv:1602.02830, 2016. \n[10] Zhen Dong, Zhewei Yao, Yaohui Cai, Daiyaan Arfeen, Amir Gholami, Michael W. Mahoney, and Kurt Keutzer. Hawq-v2: Hessian aware trace-weighted quantization of neural networks. arXiv preprint arXiv:1911.03852, 2019. \n[11] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. arXiv:2010.11929, 2020. \n[12] Angela Fan, Pierre Stock, Benjamin Graham, Edouard Grave, Rémi Gribonval, Hervé Jégou, and Armand Joulin. Training with quantization noise for extreme model compression. arXiv e-prints, pages arXiv–2004, 2020. \n[13] Kai Han, Yunhe Wang, Hanting Chen, Xinghao Chen, Jianyuan Guo, Zhenhua Liu, Yehui Tang, An Xiao, Chunjing Xu, Yixing Xu, et al. A survey on visual transformer. arXiv preprint arXiv:2012.12556, 2020. \n[14] Kai Han, Yunhe Wang, Yixing Xu, Chunjing Xu, Enhua Wu, and Chang Xu. Training binary neural networks through learning with noisy supervision. In International Conference on Machine Learning, pages 4017–4026. PMLR, 2020. \n[15] Kai Han, An Xiao, Enhua Wu, Jianyuan Guo, Chunjing Xu, and Yunhe Wang. Transformer in transformer. arXiv preprint arXiv:2103.00112, 2021. \n[16] Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015. \n[17] Jacob Devlin Ming-Wei Chang Kenton and Lee Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of NAACL-HLT, pages 4171–4186, 2019. \n[18] Rundong Li, Yan Wang, Feng Liang, Hongwei Qin, Junjie Yan, and Rui Fan. Fully quantized network for object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2810–2819, 2019. \n[19] Zhuang Liu, Jianguo Li, Zhiqiang Shen, Gao Huang, Shoumeng Yan, and Changshui Zhang. Learning efficient convolutional networks through network slimming. In Proceedings of the IEEE International Conference on Computer Vision, pages 2736–2744, 2017. \n[20] Markus Nagel, Rana Ali Amjad, Mart Van Baalen, Christos Louizos, and Tijmen Blankevoort. Up or down? adaptive rounding for post-training quantization. In International Conference on Machine Learning, pages 7197–7206. PMLR, 2020. \n[21] Markus Nagel, Mart van Baalen, Tijmen Blankevoort, and Max Welling. Data-free quantization through weight equalization and bias correction. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1325–1334, 2019. \n[22] Gabriele Prato, Ella Charlaix, and Mehdi Rezagholizadeh. Fully quantized transformer for improved translation. 2019. \n[23] Sheng Shen, Zhen Dong, Jiayu Ye, Linjian Ma, Zhewei Yao, Amir Gholami, Michael W Mahoney, and Kurt Keutzer. Q-bert: Hessian based ultra low precision quantization of bert. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 8815–8821, 2020. \n[24] Wonyong Sung, Sungho Shin, and Kyuyeon Hwang. Resiliency of deep neural networks under quantization. arXiv preprint arXiv:1511.06488, 2015. \n[25] Yehui Tang, Kai Han, Chang Xu, An Xiao, Yiping Deng, Chao Xu, and Yunhe Wang. Augmented shortcuts for vision transformers. arXiv preprint arXiv:2106.15941, 2021. \n[26] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. arXiv preprint arXiv:2012.12877, 2020. \n[27] Kuan Wang, Zhijian Liu, Yujun Lin, Ji Lin, and Song Han. Haq: Hardware-aware automated quantization with mixed precision. In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 8612–8620, 2019. \n[28] Peisong Wang, Qiang Chen, Xiangyu He, and Jian Cheng. Towards accurate post-training network quantization via bit-split and stitching. In International Conference on Machine Learning, pages 9847–9856. PMLR, 2020. \n[29] Yunhe Wang, Chang Xu, Shan You, Dacheng Tao, and Chao Xu. Cnnpack: Packing convolutional neural networks in the frequency domain. In NIPS, volume 1, page 3, 2016. \n[30] Di Wu, Qi Tang, Yongle Zhao, Ming Zhang, Ying Fu, and Debing Zhang. Easyquant: Posttraining quantization via scale optimization. arXiv preprint arXiv:2006.16669, 2020. \n[31] Zhanghao Wu, Zhijian Liu, Ji Lin, Yujun Lin, and Song Han. Lite transformer with long-short range attention. arXiv preprint arXiv:2004.11886, 2020. \n[32] Yixing Xu, Kai Han, Chang Xu, Yehui Tang, Chunjing Xu, and Yunhe Wang. Learning frequency domain approximation for binary neural networks. arXiv preprint arXiv:2103.00841, 2021. \n[33] Ali Hadi Zadeh, Isak Edo, Omar Mohamed Awad, and Andreas Moshovos. Gobo: Quantizing attention-based nlp models for low latency and energy efficient inference. In 2020 53rd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO), pages 811–824. IEEE, 2020. \n[34] Ofir Zafrir, Guy Boudoukh, Peter Izsak, and Moshe Wasserblat. Q8bert: Quantized 8bit bert. arXiv preprint arXiv:1910.06188, 2019. \n[35] Wei Zhang, Lu Hou, Yichun Yin, Lifeng Shang, Xiao Chen, Xin Jiang, and Qun Liu. Ternarybert: Distillation-aware ultra-low bit bert. arXiv preprint arXiv:2009.12812, 2020. \n[36] Ritchie Zhao, Yuwei Hu, Jordan Dotzel, Chris De Sa, and Zhiru Zhang. Improving neural network quantization without retraining using outlier channel splitting. In International conference on machine learning, pages 7543–7552. PMLR, 2019. \n[37] Zhisheng Zhong, Fangyin Wei, Zhouchen Lin, and Chao Zhang. Ada-tucker: Compressing deep neural networks via adaptive dimension adjustment tucker decomposition. Neural Networks, 110:104–115, 2019. \n[38] Chenzhuo Zhu, Song Han, Huizi Mao, and William J Dally. Trained ternary quantization. arXiv preprint arXiv:1612.01064, 2016. \n[39] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable detr: Deformable transformers for end-to-end object detection. arXiv preprint arXiv:2010.04159, 2020. ",
|
| 1065 |
+
"bbox": [
|
| 1066 |
+
178,
|
| 1067 |
+
511,
|
| 1068 |
+
826,
|
| 1069 |
+
911
|
| 1070 |
+
],
|
| 1071 |
+
"page_idx": 9
|
| 1072 |
+
},
|
| 1073 |
+
{
|
| 1074 |
+
"type": "text",
|
| 1075 |
+
"text": "",
|
| 1076 |
+
"bbox": [
|
| 1077 |
+
171,
|
| 1078 |
+
103,
|
| 1079 |
+
826,
|
| 1080 |
+
900
|
| 1081 |
+
],
|
| 1082 |
+
"page_idx": 10
|
| 1083 |
+
},
|
| 1084 |
+
{
|
| 1085 |
+
"type": "text",
|
| 1086 |
+
"text": "",
|
| 1087 |
+
"bbox": [
|
| 1088 |
+
173,
|
| 1089 |
+
90,
|
| 1090 |
+
828,
|
| 1091 |
+
319
|
| 1092 |
+
],
|
| 1093 |
+
"page_idx": 11
|
| 1094 |
+
}
|
| 1095 |
+
]
|
parse/train/wCrH0JBCFNm/wCrH0JBCFNm_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/wCrH0JBCFNm/wCrH0JBCFNm_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
vlm/dev/-P7G-8dmSh4/0.png
ADDED
|
Git LFS Details
|
vlm/dev/-P7G-8dmSh4/1.png
ADDED
|
Git LFS Details
|
vlm/dev/-P7G-8dmSh4/10.png
ADDED
|
Git LFS Details
|
vlm/dev/-P7G-8dmSh4/11.png
ADDED
|
Git LFS Details
|
vlm/dev/-P7G-8dmSh4/12.png
ADDED
|
Git LFS Details
|
vlm/dev/-P7G-8dmSh4/13.png
ADDED
|
Git LFS Details
|
vlm/dev/-P7G-8dmSh4/14.png
ADDED
|
Git LFS Details
|
vlm/dev/-P7G-8dmSh4/15.png
ADDED
|
Git LFS Details
|
vlm/dev/-P7G-8dmSh4/16.png
ADDED
|
Git LFS Details
|
vlm/dev/-P7G-8dmSh4/17.png
ADDED
|
Git LFS Details
|