Datasets:
Add files using upload-large-folder tool
Browse files- parse/dev/6UtOXn1LwNE/6UtOXn1LwNE.md +422 -0
- parse/dev/6UtOXn1LwNE/6UtOXn1LwNE_content_list.json +1292 -0
- parse/dev/6UtOXn1LwNE/6UtOXn1LwNE_model.json +0 -0
- parse/dev/9t-j3xDm7_Q/9t-j3xDm7_Q_model.json +0 -0
- parse/dev/MG3YN3z1J4M/MG3YN3z1J4M.md +329 -0
- parse/dev/MG3YN3z1J4M/MG3YN3z1J4M_content_list.json +1017 -0
- parse/dev/MG3YN3z1J4M/MG3YN3z1J4M_middle.json +0 -0
- parse/dev/TiZYrQ-mPup/TiZYrQ-mPup_content_list.json +1646 -0
- parse/dev/UhEJz3wgLnG/UhEJz3wgLnG.md +428 -0
- parse/dev/UhEJz3wgLnG/UhEJz3wgLnG_content_list.json +0 -0
- parse/dev/UhEJz3wgLnG/UhEJz3wgLnG_model.json +0 -0
- parse/dev/krI-ahhgN2/krI-ahhgN2.md +0 -0
- parse/dev/krI-ahhgN2/krI-ahhgN2_content_list.json +0 -0
- parse/dev/krI-ahhgN2/krI-ahhgN2_middle.json +0 -0
- parse/dev/krI-ahhgN2/krI-ahhgN2_model.json +0 -0
- parse/dev/nJfylDvgzlq/nJfylDvgzlq_model.json +0 -0
- parse/dev/zSkYVeX7bC4/zSkYVeX7bC4.md +171 -0
- parse/dev/zSkYVeX7bC4/zSkYVeX7bC4_content_list.json +833 -0
- parse/dev/zSkYVeX7bC4/zSkYVeX7bC4_middle.json +0 -0
- parse/dev/zSkYVeX7bC4/zSkYVeX7bC4_model.json +0 -0
parse/dev/6UtOXn1LwNE/6UtOXn1LwNE.md
ADDED
|
@@ -0,0 +1,422 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Models of human preference for learning reward functions
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
1 The utility of reinforcement learning is limited by the alignment of reward functions
|
| 11 |
+
2 with the interests of human stakeholders. One promising method for alignment is
|
| 12 |
+
3 to learn the reward function from human-generated preferences between pairs of
|
| 13 |
+
4 trajectory segments. These human preferences are typically assumed to be informed
|
| 14 |
+
5 solely by partial return, the sum of rewards along each segment. We find this
|
| 15 |
+
6 assumption to be flawed and propose modeling preferences instead as arising from
|
| 16 |
+
7 a different statistic: each segment’s regret, a measure of a segment’s deviation from
|
| 17 |
+
8 optimal decision-making. Given infinitely many preferences generated according
|
| 18 |
+
9 to regret, we prove that we can identify a reward function equivalent to the reward
|
| 19 |
+
10 function that generated those preferences. We also prove that the previous partial
|
| 20 |
+
11 return model lacks this identifiability property without preference noise that reveals
|
| 21 |
+
12 rewards’ relative proportions, and we empirically show that our proposed regret
|
| 22 |
+
13 preference model outperforms it with finite training data in otherwise the same
|
| 23 |
+
14 setting. Additionally, our proposed regret preference model better predicts real
|
| 24 |
+
15 human preferences and also learns reward functions from these preferences that
|
| 25 |
+
16 lead to policies that are better human-aligned. Overall, this work establishes that
|
| 26 |
+
17 the choice of preference model is impactful, and our proposed regret preference
|
| 27 |
+
18 model provides an improvement upon a core assumption of recent research.
|
| 28 |
+
|
| 29 |
+
# 19 1 Introduction
|
| 30 |
+
|
| 31 |
+
20 Improvements in reinforcement learning (RL) have led to notable recent achievements [1–6],
|
| 32 |
+
21 increasing its applicability to real-world problems. Yet, like all optimization algorithms, even perfect
|
| 33 |
+
22 RL optimization is limited by the objective it optimizes. For RL, this objective is created in large
|
| 34 |
+
23 part by the reward function. Poor alignment between reward functions and the interests of human
|
| 35 |
+
24 stakeholders limits the utility of RL and may even pose catastrophic risks [7, 8].
|
| 36 |
+
25 Influential recent research has focused on reward learning from preferences over pairs of fixed-length
|
| 37 |
+
26 trajectory segments. Nearly all of this recent work assumes that human preferences arise probabilis
|
| 38 |
+
27 tically from only the sum of rewards over a segment, i.e., the segment’s partial return [9–16]. That is,
|
| 39 |
+
28 these works assume that people tend to prefer trajectory segments that yield greater rewards during the
|
| 40 |
+
29 segment. However, this preference model ignores seemingly important information about the segment’s
|
| 41 |
+
30 desirability, including the state values of the segment’s start and end states. Separately, this partial return
|
| 42 |
+
31 preference model can prefer suboptimal actions with lucky outcomes, like buying a lottery ticket.
|
| 43 |
+
32 This paper proposes an alternative preference model based on the regret of each segment, which is equiv
|
| 44 |
+
33 alent to the negated sum of an optimal policy’s advantage of each transition in the segment (Section $\left. \overline { { 2 . 2 } } \right)$ .
|
| 45 |
+
34 Figure 1 shows an intuitive example of when these two models disagree. Other classes of domains that
|
| 46 |
+
35 the models will differ on are those with constant reward until the end, including competitive games like
|
| 47 |
+
36 chess, go, and soccer as well as tasks for which the objective is to minimize time until reaching a goal.
|
| 48 |
+
37 For these two preference models, we first focus the
|
| 49 |
+
38 oretically on a normative analysis (Section 3)— i.e.,
|
| 50 |
+
39 what preference model would we want humans
|
| 51 |
+
40 to use if we could choose—proving that reward
|
| 52 |
+
41 learning on infinite, exhaustive preferences with
|
| 53 |
+
42 our proposed regret preference model identifies a
|
| 54 |
+
43 reward function with the same set of optimal poli
|
| 55 |
+
44 cies as the reward function with which the prefer
|
| 56 |
+
45 ences are generated. We also prove that the par
|
| 57 |
+
46 tial return preference model is not guaranteed to
|
| 58 |
+
47 identify such a reward function without preference
|
| 59 |
+
48 noise. We follow up with a descriptive analysis of
|
| 60 |
+
49 how well each of these proposed models align with
|
| 61 |
+
50 actual human preferences by collecting a human
|
| 62 |
+
51 labeled dataset of preferences in a rich grid world
|
| 63 |
+
52 domain (Section 4) and showing that the regret pref
|
| 64 |
+
53 erence model better predicts these human prefer
|
| 65 |
+
54 ences (Section 5). Finally, we find that the policies
|
| 66 |
+
55 ultimately created through the regret preference
|
| 67 |
+
56 model tend to outperform those from the partial
|
| 68 |
+
57 return model learning—both when assessed with
|
| 69 |
+
58 collected human preferences or when assessed with
|
| 70 |
+
59 synthetic preferences (Section 6)
|
| 71 |
+
|
| 72 |
+

|
| 73 |
+
Figure 1: Two segments of a car moving at high speed near a brick wall. Assume the right segment is optimal and the left segment is suboptimal (as defined in Sec. 2.1). The left segment has a higher sum of reward, so the partial return preference model tends to prefer it. The regret preference model instead tends to prefer the right segment because optimal segments have minimal regret. If we also assume deterministic transitions, then the regret model includes the difference in values between the start state and the end state (Eq. 3), and the right segment would tend to be preferred because it greatly improves its state values from start to end, whereas the left segment’s state values greatly worsen. We suspect our human readers will also tend to prefer the right segment.
|
| 74 |
+
|
| 75 |
+
# 60 2 Preference models for learning reward functions
|
| 76 |
+
|
| 77 |
+
61 We assume that the task environment is a Markov decision process (MDP) specified by the tuple $( S , A ,$
|
| 78 |
+
62 $T , \gamma , D _ { 0 } , r )$ . $S$ and $A$ are the sets of possible states and actions, respectively. $T$ is a transition function,
|
| 79 |
+
63 $T : S \times A \to S$ . $\gamma$ is the discount factor and $D _ { 0 }$ is the distribution of start states. Unless otherwise
|
| 80 |
+
64 stated, we assume undiscounted tasks (i.e., $\gamma = 1$ ) that have terminal states, after which only 0 reward
|
| 81 |
+
65 can be received. $r$ is a reward function, $r : S \times A \times S \mathbb { R }$ , where the reward $r _ { t }$ at time $t$ is a function of
|
| 82 |
+
66 $s _ { t } , a _ { t }$ , and $s _ { t + 1 }$ . An $\mathsf { M D P } \backslash r$ is an MDP without a reward function.
|
| 83 |
+
67 Throughout this paper, $r$ refers to the ground-truth reward function for some MDP; $\hat { r }$ refers to a learned
|
| 84 |
+
68 approximation of $r$ ; and $\tilde { r }$ refers to any reward function (including $r$ or $\hat { r }$ ). A policy $( \pi : S \times A \to [ 0 , 1 ] )$ )
|
| 85 |
+
69 specifies the probability of an action given a state. $Q _ { \tilde { r } } ^ { * }$ and $V _ { \tilde { r } } ^ { * }$ refer respectively to the state-action value
|
| 86 |
+
70 function and state value function for an optimal policy, $\pi ^ { * }$ , under $\tilde { r }$ . The optimal advantage function is
|
| 87 |
+
71 defined as $A _ { \tilde { r } } ^ { \ast } ( s , a ) \triangleq Q _ { \tilde { r } } ^ { \ast } ( s , a ) - V _ { \tilde { r } } ^ { \ast } ( s )$ . Throughout this paper, the ground-truth reward function $r$
|
| 88 |
+
72 is used to algorithmically generate preferences when they are not human-generated, is hidden during
|
| 89 |
+
73 reward learning, and is used to evaluate the performance of optimal policies under a learned $\hat { r }$ .
|
| 90 |
+
|
| 91 |
+
# 74 2.1 Reward learning from pairwise preferences
|
| 92 |
+
|
| 93 |
+
5 A reward function can be learned by minimizing the cross-entropy loss—i.e., maximizing the
|
| 94 |
+
6 likelihood—of observed human preferences, a common approach in recent literature [9–11, 14, 16].
|
| 95 |
+
77 Segments Let $\sigma$ denote a segment starting at state $s _ { \sigma , 0 }$ . Its length $| \sigma |$ is the number of transitions within
|
| 96 |
+
78 the segment. A segment includes $| \sigma | + 1$ states and $| \sigma |$ actions: $( s _ { \sigma , 0 } , a _ { \sigma , 0 } , s _ { \sigma , 1 } , a _ { \sigma , 1 } , . . . , s _ { \sigma , | \sigma | } )$ . In this
|
| 97 |
+
79 problem setting, segments lack any reward information. As shorthand, we define $\sigma _ { t } \triangleq \left( s _ { \sigma , t } , a _ { \sigma , t } , s _ { \sigma , t + 1 } \right)$ .
|
| 98 |
+
80 A segment $\sigma$ is optimal with respect to $\tilde { r }$ if, for every $i \in \{ 1 , . . . , | \sigma | { - 1 } \}$ , $Q _ { \tilde { r } } ^ { * } ( s _ { \sigma , i } , a _ { \sigma , i } ) = V _ { \tilde { r } } ^ { * } ( s _ { \sigma , i } )$ . A
|
| 99 |
+
81 segment that is not optimal is suboand the partial return of a segment 82 imis ome , de $\tilde { r }$ and a segment ted in shorthan $\sigma , \tilde { r } _ { t } \triangleq \tilde { r } \big ( s _ { \sigma , t } , a _ { \sigma , t } , s _ { \sigma , t + 1 } \big )$ ,
|
| 100 |
+
$\sigma$ $\scriptstyle \sum _ { t = 0 } ^ { | \sigma | - 1 } \gamma ^ { t } { \tilde { r } } _ { t }$ $\Sigma _ { \sigma } r$
|
| 101 |
+
83 Preference datasets Each preference over a pair of segments creates a sample $( \sigma _ { 1 } , \sigma _ { 2 } , \mu )$ in a
|
| 102 |
+
84 preference dataset $D _ { \succ }$ . Vector $\mu = \langle \mu _ { 1 } , \mu _ { 2 } \rangle$ represents the preference; specifically, if $\sigma _ { 1 }$ is preferred
|
| 103 |
+
85 over $\sigma _ { 2 }$ , denoted $\sigma _ { 1 } \succ \sigma _ { 2 }$ , $\mu = \langle 1 , 0 \rangle$ . $\mu$ is $^ { \langle 0 , 1 \rangle }$ if $\sigma _ { 1 } \prec \sigma _ { 2 }$ and is $\langle 0 . 5 , 0 . 5 \rangle$ for $\sigma _ { 1 } \sim \sigma _ { 2 }$ (no preference).
|
| 104 |
+
86 Loss function To learn a reward function from a preference dataset, $D _ { \succ }$ , a common assumption
|
| 105 |
+
87 is that these preferences were generated by a preference model $P$ that arises from an unobservable
|
| 106 |
+
88 ground-truth reward function $r$ . We approximate $r$ by minimizing cross-entropy loss to learn $\hat { r }$ :
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\begin{array} { r l } { l o s s ( \hat { r } , D _ { \succ } ) { = } { - } { \sum _ { \alpha } { \mu _ { 1 } } { \log } P ( \sigma _ { 1 } \succ \sigma _ { 2 } | \hat { r } ) { + } \mu _ { 2 } { \log } P ( \sigma _ { 1 } { \prec } \sigma _ { 2 } | \hat { r } ) } } & { { } } \\ { ( \sigma _ { 1 } , \sigma _ { 2 } , \mu ) { \in } D _ { \succ } } & { { } } \end{array}
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
89 This loss is under-specified until $P ( \sigma _ { 1 } \succ \sigma _ { 2 } | \hat { r } )$ is defined, which is the focus of this paper. We show that
|
| 113 |
+
90 the common model of preference probabilities is flawed and introduce an improved preference model.
|
| 114 |
+
|
| 115 |
+
Preference models A preference model determines the probability of one trajectory segment being 2 preferred over another, $P ( \sigma _ { 1 } \succ \sigma _ { 2 } | \tilde { r } )$ . Preference models could be applied to model preferences provided by humans or other systems. Preference models can also directly generate preferences, and in such cases we refer to them as preference generators.
|
| 116 |
+
|
| 117 |
+
# 2.2 Choice of preference model: partial return and regret
|
| 118 |
+
|
| 119 |
+
Partial return Recent work assumes human preferences are generated by a Boltzmann distribution over the two segments’ partial returns [9–16], expressed here as a logistic function1 :
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
\begin{array} { r } { P _ { \Sigma _ { r } } ( \sigma _ { 1 } \succ \sigma _ { 2 } | \tilde { r } ) = l o g i s t i c \Big ( \Sigma _ { \sigma _ { 1 } } \tilde { r } - \Sigma _ { \sigma _ { 2 } } \tilde { r } \Big ) . } \end{array}
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
98 Regret We introduce an alternative preference model based on the regret of each transition in a
|
| 126 |
+
99 segment. We first focus on segments with deterministic transitions. For a transition $\left( { { s _ { t } } , { a _ { t } } , { s _ { t + 1 } } } \right)$ in a
|
| 127 |
+
100 deterministic segment, $r e g r e t _ { \mathrm { d } } ( \sigma _ { t } | \tilde { r } ) \stackrel { \Delta } { = } V _ { \tilde { r } } ^ { \ast } ( s _ { \sigma , t } ) - \left[ \tilde { r } _ { t } + V _ { \tilde { r } } ^ { \ast } ( s _ { \sigma , t + 1 } ) \right]$ . For a full deterministic segment,
|
| 128 |
+
|
| 129 |
+
$$
|
| 130 |
+
r e g r e t _ { d } ( \sigma | \tilde { r } ) \triangleq \sum _ { t = 0 } ^ { | \sigma | - 1 } r e g r e t _ { d } ( \sigma _ { t } | \tilde { r } ) = V _ { \tilde { r } } ^ { * } ( s _ { \sigma , 0 } ) - \big ( \Sigma _ { \sigma } \tilde { r } + V _ { \tilde { r } } ^ { * } ( s _ { \sigma , | \sigma | } ) \big ) ,
|
| 131 |
+
$$
|
| 132 |
+
|
| 133 |
+
102 with the right-hand expression arising from cancelling out intermediate state values. Therefore,
|
| 134 |
+
103 deterministic regret measures how much the segment reduces expected return from $V _ { \tilde { r } } ^ { * } ( s _ { \sigma , 0 } )$ . An
|
| 135 |
+
104 optimal segment, $\sigma ^ { * }$ , always has 0 regret, and a suboptimal segment, $\sigma ^ { \ast }$ , will always have positive
|
| 136 |
+
105 regret, a intuitively appealing property that also plays a role in the identifiability proof of Theorem 3.1.
|
| 137 |
+
106 Stochastic transitions, however, can result in $r e g r e t _ { d } ( \sigma ^ { * } | \hat { r } ) > r e g r e t _ { d } ( \sigma ^ { \neg * } | \tilde { r } )$ , losing the property
|
| 138 |
+
107 above. To retain it, we note that the effect on expected return of transition stochasticity from a
|
| 139 |
+
108 transition $\left( { { s _ { t } } , { a _ { t } } , { s _ { t + 1 } } } \right)$ is $\left[ \tilde { r } _ { t } + V _ { \tilde { r } } ^ { * } ( s _ { t + 1 } ) \right] - Q _ { \tilde { r } } ^ { * } ( s _ { t } , a _ { t } )$ and add this expression once per transition to
|
| 140 |
+
109 get regret $( \sigma )$ , removing the subscript $d$ that refers to determinism. The regret for a single transition
|
| 141 |
+
110 becomes $r e g r e t ( \sigma _ { t } | \tilde { r } ) = [ V _ { \tilde { r } } ^ { * } ( s _ { \sigma , t } ) - [ \tilde { r } _ { t } + V _ { \tilde { r } } ^ { * } ( s _ { \sigma , t + 1 } ) ] ] + [ [ \tilde { r } _ { t } + V _ { \tilde { r } } ^ { * } ( s _ { \sigma , t + 1 } ) ] - Q _ { \tilde { r } } ^ { * } ( s _ { \sigma , t } , a _ { \sigma , t } ) ] = 0 .$
|
| 142 |
+
111 $V _ { \tilde { r } } ^ { * } \left( s _ { \sigma , t } \right) - Q _ { \tilde { r } } ^ { * } \left( s _ { \sigma , t } , a _ { \sigma , t } \right) = - A _ { \tilde { r } } ^ { * } \left( s _ { \sigma , t } , a _ { \sigma , t } \right)$ . Regret for a full segment is
|
| 143 |
+
|
| 144 |
+
$$
|
| 145 |
+
r e g r e t ( \sigma | \tilde { r } ) = \sum _ { t = 0 } ^ { | \sigma | - 1 } r e g r e t ( \sigma _ { t } | \tilde { r } ) = \sum _ { t = 0 } ^ { | \sigma | - 1 } \left[ V _ { \tilde { r } } ^ { * } ( s _ { \sigma , t } ) - Q _ { \tilde { r } } ^ { * } ( s _ { \sigma , t } , a _ { \sigma , t } ) \right] = \sum _ { t = 0 } ^ { | \sigma | - 1 } - A _ { \tilde { r } } ^ { * } ( s _ { \sigma , t } , a _ { \sigma , t } ) .
|
| 146 |
+
$$
|
| 147 |
+
|
| 148 |
+
112 The regret preference model is the Boltzmann distribution over negated regret:
|
| 149 |
+
|
| 150 |
+
$$
|
| 151 |
+
P _ { r e g r e t } ( \sigma _ { 1 } \sim \sigma _ { 2 } | \tilde { r } ) \stackrel { \Delta } { = } l o g i s t i c \Bigl ( r e g r e t ( \sigma _ { 2 } | \tilde { r } ) - r e g r e t ( \sigma _ { 1 } | \tilde { r } ) \Bigr ) .
|
| 152 |
+
$$
|
| 153 |
+
|
| 154 |
+
113 Lastly, we note that if two segments have deterministic transitions, end in terminal states, and have the same starting state, this regret model reduces to the partial return model: 114 $P _ { r e g r e t } ( \cdot | \tilde { r } ) = P _ { \Sigma _ { r } } ( \cdot | \tilde { r } )$ .
|
| 155 |
+
|
| 156 |
+
115 Algorithms in this paper All algorithms in the body of this paper are defined simply as “minimize
|
| 157 |
+
116 Equation 1”. They differ only in how the preference probabilities are calculated. All reward function
|
| 158 |
+
117 learning via partial return uses Equation $2 .$ We use two algorithms for reward function learning
|
| 159 |
+
118 via regret. The theory in Section $3$ assumes exact measurement of regret, using Equation 5. Our
|
| 160 |
+
119 experimental results in Section 6 use Equation 6 to approximate regret. Appendix B introduces other
|
| 161 |
+
120 algorithms that use Equation 1, as well as one in Appendix $\overline { { \mathbf { B } . 2 } }$ that generalizes Equation 1.
|
| 162 |
+
|
| 163 |
+
Regret as a model for human preference $P _ { r e g r e t }$ makes at least three assumptions worth noting. First, it keeps the assumption that human preferences follow a Boltzmann distribution over some statistic, which is a common model of choice behavior in economics and psychology, where it is called the Luce-Shepard choice rule $\textcircled { 1 1 7 } , \textcircled { 1 8 } \textcircled { 1 }$ . Second, $P _ { r e g r e t }$ implicitly assumes humans can identify optimal and suboptimal segments when they see them, which will less true in domains where the human has less expertise. Lastly, $P _ { r e g r e t }$ assumes that in stochastic settings where the best outcome may only result from suboptimal decisions (e.g., buying a lottery ticket), humans instead prefer optimal decisions. We suspect humans are capable of expressing either type of preference—based on decision quality or desirability of outcomes—and can be influenced by training or the preference elicitation interface. In practice we determine that the regret model produces improvements over the partial-return model (Section 6), and its assumptions represent an opportunity for follow-up research.
|
| 164 |
+
|
| 165 |
+
Alternative methods for learning reward functions Other methods for learning reward functions include inverse reinforcement learning from demonstrations [19, 20] (discussed in Appendix B.5) and inverse reward design from trial-and-error reward design in multiple instances of a task domain [21].
|
| 166 |
+
|
| 167 |
+
# 3 Theoretical comparisons
|
| 168 |
+
|
| 169 |
+
In this section, we consider how different ways of generating preferences affect reward inference, setting aside whether humans can be influenced to give preferences in accordance with a specific preference method. In economic terms, this analysis—and all of our analyses with synthetic preferences—could be considered a normative analysis. In artificial intelligence, this analysis might be cast as a step towards defining criteria for a rational preference model.
|
| 170 |
+
|
| 171 |
+
Definition 3.1 (An identifiable preference model). For a preference model $P$ , assume an infinite dataset $D _ { \succ }$ of $\dot { n }$ -length pairs of segments is constructed by repeatedly choosing $\left( \sigma _ { 1 } , \sigma _ { 2 } \right)$ and sampling a label $\mu \sim P ( \sigma _ { 1 } \succ \sigma _ { 2 } | r )$ , using $P$ as a preference generator. Further assume that in this dataset, all possible $n$ -length segment pairs appear infinitely many times. For some $M D P \backslash r M$ , let $M _ { \tilde { r } }$ be $M$ with the reward function $\tilde { r }$ . Let $\Pi _ { \tilde { r } } ^ { * }$ be the set of optimal policies in $M _ { \tilde { r } }$ . Let reward-equivalence class R be the set of all reward functions such that if ${ \dot { r } } _ { 1 } , r _ { 2 } \in \Re$ then $\Pi _ { r _ { 1 } } ^ { * } = \Pi _ { r _ { 2 } } ^ { * }$ . Preference model $P$ is identifiable if, for any choice of $n$ and $M _ { r }$ , any $\hat { r } = a r g m i n _ { \tilde { r } , D _ { \sim } } [ l o s s ( \tilde { r } ) ] .$ —for the cross-entropy loss $( E q n . \bigtriangledown )$ with $P$ as the preference model—is in the same reward equivalence class as $r$ . I.e., $\Pi _ { r } ^ { * } { = } \Pi _ { \hat { r } } ^ { * }$ .
|
| 172 |
+
|
| 173 |
+
Theorem 3.1 $P _ { r e g r e t }$ is identifiable). Let $P _ { r e g r e t }$ be any function such that if regret $( \sigma _ { 1 } | \tilde { r } ) <$ regret $( \sigma _ { 2 } | \tilde { r } )$ , $P _ { r e g r e t } ( \sigma _ { 1 } \succ \sigma _ { 2 } | \tilde { r } ) > 0 . 5 $ , and if regret $( \sigma _ { 1 } | \tilde { r } ) = r e g r e t ( \sigma _ { 2 } | \tilde { r } )$ , $P _ { r e g r e t } ( \sigma _ { 1 } \succ \sigma _ { 2 } | \tilde { r } ) =$ 0.5. $P _ { r e g r e t }$ is identifiable.
|
| 174 |
+
|
| 175 |
+
This class of regret preference models includes but is not limited to the Boltzmann distribution of Eqn. 5 and the narrower class that Theorem $3 . 1$ focuses upon.
|
| 176 |
+
|
| 177 |
+
154 Theorem 3.2 (Noiseless $P _ { \Sigma _ { r } }$ is not identifiable). Let $P _ { \Sigma _ { r } }$ be any function such that if $\Sigma _ { \sigma _ { 1 } } \tilde { r } > \Sigma _ { \sigma _ { 2 } } \tilde { r }$ ,
|
| 178 |
+
155 $P _ { \Sigma _ { r } } ( \sigma _ { 1 } \succ \sigma _ { 2 } | \tilde { r } ) = 1 _ { \tilde { \mathbf { \Sigma } } }$ , and if $\Sigma _ { \sigma _ { 1 } } \tilde { r } { = } \Sigma _ { \sigma _ { 2 } } \tilde { r }$ , $P _ { \Sigma _ { r } } ( \sigma _ { 1 } \succ \sigma _ { 2 } | \tilde { r } ) = 0 . 5 .$ . There exists an MDP in which $P _ { \Sigma _ { r } }$ is
|
| 179 |
+
156 not identifiable.
|
| 180 |
+
157 Appendix $\mathbf { C }$ contains a proof of Theorem $\underline { { \boldsymbol { \left. 3 . 1 \right. } } }$ and two proofs by example for Theorem $\underline { { \boldsymbol { \mathfrak { B . 2 } } } } \flat$ each
|
| 181 |
+
158 focusing on a different weakness of $P _ { \Sigma _ { r } }$ .The first proof by example reveals issues when learning
|
| 182 |
+
159 reward functions with stochastic transitions with either $P _ { \Sigma _ { r } }$ or deterministic $P _ { r e g r e t _ { d } }$ . These issues
|
| 183 |
+
160 directly correspond to the need for preferences over distributions over outcomes (i.e., lotteries) to
|
| 184 |
+
161 construct a cardinal utility function (see Russell and Norvig $\mathbb { \left[ \left[ 2 2 \right] \right. }$ Ch. 16]). Note that the noiseless
|
| 185 |
+
162 version of $P _ { \Sigma _ { r } }$ in Theorem $\boxed { 3 . 2 }$ is achieved in the limit as reward values are scaled higher; equivalently,
|
| 186 |
+
163 one could include a Boltzmann temperature parameter in Equation 2 and scale it towards 0. Intuitively,
|
| 187 |
+
164 Theorem $3 . 2$ says that $P _ { \Sigma _ { r } }$ is not identifiable without the distribution over preferences providing
|
| 188 |
+
165 information about the proportions of rewards with respect to each other. In contrast, to be identifiable,
|
| 189 |
+
166 the regret preference model does not require this preference error (though it can presumably benefit
|
| 190 |
+
167 from it in certain contexts).
|
| 191 |
+
|
| 192 |
+
# 168 4 Creating a human-labeled preference dataset
|
| 193 |
+
|
| 194 |
+
9 To empirically investigate the consequences of each preference model when learning reward from 0 human preferences, we created a preference dataset labeled by human subjects via Amazon Mechanical Turk. This data collection was IRB-approved. Appendix D adds detail to the content below.
|
| 195 |
+
|
| 196 |
+
# 72 4.1 The general delivery domain
|
| 197 |
+
|
| 198 |
+
173 The delivery domain consists of a grid of cells, each of a specific road surface type. The delivery agent’s
|
| 199 |
+
174 state is its location. The agent’s action space is moving one cell in one of the four cardinal directions.
|
| 200 |
+
175 The episode can terminate either at the destination for $+ 5 0$ reward or in failure at a sheep for $- 5 0$
|
| 201 |
+
176 reward. The reward for a non-terminal transition is the sum of any reward components. Cells with a
|
| 202 |
+
177 white road surface have a $- 1$ reward component, and cells with brick surface have a $- 2$ component.
|
| 203 |
+
178 Additionally, each cell may contain a coin $( + 1 )$ or a roadblock $( - 1 )$ . Coins do not disappear and at
|
| 204 |
+
179 best cancel out the road surface cost. Actions that would move the agent into a house or beyond the
|
| 205 |
+
180 grid’s perimeter result in no motion and receive reward that includes the current cell’s surface reward
|
| 206 |
+
181 component but not any coin or roadblock components. In this work, the start state distribution, $D _ { 0 }$ , is
|
| 207 |
+
182 always uniformly random over non-terminal states. This domain was designed to permit subjects to
|
| 208 |
+
183 easily identify bad behavior yet also to be difficult for them to determine optimal behavior from most
|
| 209 |
+
184 states, which is representative of many common tasks.
|
| 210 |
+
|
| 211 |
+
# 4.1.1 The delivery task
|
| 212 |
+
|
| 213 |
+
We chose one instantiation of the delivery domain for gathering our dataset of human preferences. This specific MDP has a $1 0 \times 1 0$ grid. From every state, the highest return possible involves reaching the goal, rather than hitting a sheep or perpetually avoiding termination. Figure 2 shows this task.
|
| 214 |
+
|
| 215 |
+
# 4.2 The user interface and survey
|
| 216 |
+
|
| 217 |
+
This subsection describes the three main stages of the experimental session. A video showing the full experimental protocol can be seen at bit.ly/humanprefs.
|
| 218 |
+
|
| 219 |
+

|
| 220 |
+
Figure 2: The delivery task used to gather human preferences. The yellow van is the agent and the red inverted teardrop is the destination.
|
| 221 |
+
|
| 222 |
+
Teaching subjects about the task Subjects first view instructions describing the general domain. To avoid the jargon of “return” and “reward,” these terms are mapped to equivalent values in US dollars, and the instructions describe the goal of the task as maximizing the delivery vehicle’s financial outcome, where the reward components are specific financial impacts. This information is shared amongst interspersed interactive episodes, in which the subject controls the agent in domain maps that are each designed to teach one or two concepts. Our intention during this stage is to inform the later preferences of the subject by teaching them about the domain’s dynamics and its reward function, as well as to develop the subject’s sense of how desirable various behaviors are. At the end of this stage, the subject controls the agent for two episodes in the specific delivery task shown in Figure 2.
|
| 223 |
+
|
| 224 |
+
Preference elicitation After each subject is trained to understand the task, they indicate their preferences between 40–50 randomly-ordered pairs of segments, using the interface shown in Figure 3. The users select a preference, no preference (“same"), or “can’t tell”. In this work, we exclude responses labeled “can’t tell”, though one might alternatively try to extract information from these responses.
|
| 225 |
+
|
| 226 |
+
Users’ task comprehension Subjects then answered questions testing their understanding of the task, and we removed their data if they scored poorly. We also removed a subject’s data if they preferred colliding the vehicle into a sheep over not doing so, which we interpreted as poor task understanding or inattentiveness. This filtered dataset contains 1812 preferences from 50 subjects.
|
| 227 |
+
|
| 228 |
+
We collected human preferences in two stages, each with different methods for selecting which segment pairs to present for labeling. The second stage’s sole purpose was to improve the reward-learning performance of $P _ { \Sigma _ { r } }$ . Without second-stage data, $P _ { \Sigma _ { r } }$ compared even worse to $P _ { r e g r e t }$ than in the results described in Section $\boxed { 6 }$ (see Appendix ??). Both stages’
|
| 229 |
+
|
| 230 |
+

|
| 231 |
+
Figure 3: Interface shown to subjects during preference elicitation.
|
| 232 |
+
|
| 233 |
+
229 data are combined and used as a single dataset. These methods and their justification are described in
|
| 234 |
+
230 Appendix D.3.
|
| 235 |
+
|
| 236 |
+
# 5 Descriptive results
|
| 237 |
+
|
| 238 |
+
This section considers how well different preference models explain our dataset of human preferences.
|
| 239 |
+
|
| 240 |
+
# 5 5.1 Correlations between preferences and segment statistics
|
| 241 |
+
|
| 242 |
+
We hypothesize that the values of segments’ start and end states—which are included in $P _ { r e g r e t }$ but not in $P _ { \Sigma }$ —affect human preferences, independent of partial return. To simplify analysis, we combine the two parts of $r e g r e t _ { \mathrm { d } } ( \sigma | \boldsymbol { r } )$ that are additional to $\Sigma _ { \sigma } \tilde { r }$ and introduce the following shorthand: $\Delta _ { \sigma } V _ { \tilde { r } } \triangleq V _ { \tilde { r } } ^ { \ast } \big ( s _ { \sigma , | \sigma | } \big ) - V _ { \tilde { r } } ^ { \ast } \big ( s _ { \sigma , 0 } \big )$ Note that with an algebraic manipulation (see Appendix $\mathbf { E . 1 } )$ , $\begin{array} { r l } { r e g r e t _ { \mathrm { d } } ( \sigma _ { 2 } | \tilde { r } ) - r e g r e t _ { \mathrm { d } } ( \sigma _ { 1 } | \tilde { r } ) = } \end{array}$ $\left( \Delta _ { \sigma _ { 1 } } V _ { \tilde { r } } - \Delta _ { \sigma _ { 2 } } V _ { \tilde { r } } \right) + \left( \Sigma _ { \sigma _ { 1 } } \tilde { r } - \Sigma _ { \sigma _ { 2 } } \tilde { r } \right)$ . Therefore, on the diagonal line in Figure 4, $r e g r e t _ { \mathrm { d } } ( \sigma _ { 2 } | \boldsymbol { r } ) =$ $r e g r e t _ { \mathrm { d } } ( \sigma _ { 1 } | \boldsymbol { r } )$ , making the $P _ { r e g r e t _ { d } }$ preference model indifferent.
|
| 243 |
+
|
| 244 |
+

|
| 245 |
+
Figure 4: Proportions at which subjects preferred each segment in a pair, plotted by the difference in the segments’ changes in state values ( $\mathbf { \dot { x } }$ -axis) and partial returns (y-axis). The diagonal line shows points of preference indifference for $P _ { r e g r e t }$ . Points of indifference for $P _ { \Sigma }$ lie on the $\mathbf { X }$ -axis. The shaded gray area indicates where the two models disagree, each giving a different segment a preference probability greater than 0.5. Each circle’s area is proportional to the number of samples it describes.
|
| 246 |
+
|
| 247 |
+
The dataset of preferences is visualized in Figure $\mathbb { E }$ This plot shows how $\Delta _ { \sigma } V _ { r }$ has influence independent of partial return by focusing only on points at a chosen $y$ -axis value; if the colors along the corresponding horizontal line reddens as the $x$ -axis value increases, then $\Delta _ { \sigma } V _ { r }$ appears to have independent influence. To statistically test for independent influence of $\Delta _ { \sigma } V _ { r }$ on preferences, we consider subsets of data where $\Sigma _ { \sigma _ { 1 } } r - \Sigma _ { \sigma _ { 2 } } r$ is constant. For $\Sigma _ { \sigma _ { 1 } } r - \Sigma _ { \sigma _ { 2 } } r = - 1$ and $\Sigma _ { \sigma _ { 1 } } r - \Sigma _ { \sigma _ { 2 } } r = - 2$ , the only values with
|
| 248 |
+
|
| 249 |
+
<table><tr><td>Preference model</td><td>Loss</td></tr><tr><td>P(·)=0.5 (uninformed)</td><td>0.69</td></tr><tr><td>Pε, (partial return)</td><td>0.62</td></tr><tr><td>Pregret</td><td>0.57</td></tr></table>
|
| 250 |
+
|
| 251 |
+
Table 1: Mean cross-entropy test loss over 10-fold cross validation $( \mathrm { n } { = } 1 8 1 2 )$ from predicting human preferences. Lower is better.
|
| 252 |
+
|
| 253 |
+
more than 30 samples that also include informative samples with both negative and positive values of $r e g r e t ( \sigma _ { 1 } | r ) - r e g r e t ( \sigma _ { 2 } | r )$ , the Spearman’s rank correlations between $\Delta _ { \sigma } V _ { r }$ and the preferences are significant ( $_ { r > = 0 . 3 }$ , $p { < } 0 . 0 0 0 1$ ). This result indicates that $\Delta _ { \sigma } V _ { r }$ influences human preferences independent of partial return, validating our hypothesis that humans form preferences based on information about segments’ start states and end states, not only partial returns.
|
| 254 |
+
|
| 255 |
+
To examine how well each preference model predicts human preferences, we calculate the crossentropy loss for each model (Eqn. $^ { 1 ) }$ —i.e., the negative log likelihood—of the preferences in our dataset. Scaling reward by a constant factor does not affect the set of optimal policies. Therefore, throughout this work we ensure that our analyses of preference models are insensitive to reward scaling. To do so for this specific analysis, we conduct 10-fold cross validation to learn a reward scaling factor for each of $P _ { r e g r e t }$ and $P _ { \Sigma _ { r } }$ . Table $^ 1$ shows that the loss of $P _ { r e g r e t }$ is lower than that of $P _ { \Sigma _ { r } }$ , indicating that it is more reflective of how people actually express preferences.
|
| 256 |
+
|
| 257 |
+
# 270 6 Results from learning reward functions
|
| 258 |
+
|
| 259 |
+
Analysis of a preference model’s predictions of human preferences is informative, but such predictions are a means to the ends of learning human-aligned reward functions and policies. We now examine each preference model’s performance on these ends. In all cases, we learn a reward function $\hat { r }$ according to Eqn. 1 and apply value iteration $[ | 2 3 | ]$ to find the approximately optimal $Q _ { \hat { r } } ^ { * }$ function. For this $Q _ { \hat { r } } ^ { * }$ , we then evaluate the mean return of the maximum-entropy optimal policy—which chooses uniformly randomly among all optimal actions—with respect to the ground-truth reward function $r$ , over $D _ { 0 }$ . To compare performance across different MDPs, the mean return of a policy $\pi$ , $V _ { r } ^ { \pi }$ , is normalized to $( V _ { r } ^ { \pi } - V _ { r } ^ { \bar { U } } ) / V _ { r } ^ { * }$ , where $V _ { r } ^ { * }$ is the optimal expected return and $V _ { r } ^ { U }$ is the expected return of the uniformly random policy (both given $D _ { 0 }$ ). Normalized mean return above 0 is better than $V _ { r } ^ { U }$ . Optimal policies have a normalized mean return of 1, and we consider above 0.9 to be near optimal.
|
| 260 |
+
|
| 261 |
+
# 81 6.1 An algorithm to learn reward functions with regret $( \sigma _ { \sigma } | \hat { r } )$
|
| 262 |
+
|
| 263 |
+
Algorithm $^ 1$ is a general algorithm for learning a linear reward function according to $P _ { r e g r e t }$ . This regret-specific algorithm only changes the regret-based algorithm from Section $2 . 2$ by replacing Equation $\boxed { 5 }$ with a tractable approximation of regret, avoiding expensive repeated evaluation of $V _ { \hat { r } } ^ { * } ( \cdot )$ and $Q _ { \hat { r } } ^ { * } ( \cdot , \cdot )$ to compute $P _ { r e g r e t } ( \cdot | \hat { r } )$ during reward learning. Specifically, successor features for a set of policies are used to approximate the optimal state values and state-action values for any reward function.
|
| 264 |
+
|
| 265 |
+
Approximating $P _ { r e g r e t }$ with successor features Following the notation of Barreto et al. $\mathbb { \lVert 2 4 \rVert }$ , assume the ground-truth reward is linear with respect to a feature vector extracted by $\phi : S \times A \times S \to \mathbb { R } ^ { d }$ and a weight vector $\pmb { w _ { r } } \in \mathbb { R } ^ { d } ; \ : r ( s , a , s ^ { \prime } ) = \phi ( s , a , s ^ { \prime } ) ^ { \top } \pmb { w _ { r } }$ . During learning, ${ \pmb w } _ { \hat { \pmb r } }$ similarly expresses $\hat { r }$ as $\hat { r } ( s , a , s ^ { \prime } ) = \phi ( s , a , s ^ { \prime } ) ^ { \top } \pmb { w } _ { \hat { r } }$ .
|
| 266 |
+
|
| 267 |
+
Given a policy $\pi$ , the successor features for $^ { ( s , a ) }$ are the expectation of discounted reward features from that state-action pair when following $\pi$ $\begin{array} { r } { \because \psi _ { Q } ^ { \pi } ( s , a ) = E ^ { \pi } [ \sum _ { i = t } ^ { \infty } \gamma ^ { i - t } \phi ( s _ { t } , a _ { t } , s _ { t + 1 } ) | s _ { t } = s , a _ { t } = a ] } \end{array}$ Therefore, $Q _ { \hat { r } } ^ { \pi } ( s , a ) = \psi _ { Q } ^ { \pi } \left( s , a \right) ^ { \top } \mathbf { \boldsymbol { w } } _ { \hat { r } }$ . Additionally, state-based successor features can be calculated from the $\psi _ { Q } ^ { \pi }$ above as $\begin{array} { r } { \psi _ { v } ^ { \pi } \left( s \right) = \sum _ { a \in A } \pi ( a | s ) \psi _ { Q } ^ { \pi } \left( s , a \right) } \end{array}$ , making $V _ { \hat { r } } ^ { \pi } ( s ) = \psi _ { v } ^ { \pi } ( s ) ^ { \top } \pmb { w } _ { \hat { r } } .$ .
|
| 268 |
+
|
| 269 |
+
Given a set $\Psi _ { _ Q }$ of state-action successor feature functions and a set $\Psi _ { \scriptscriptstyle V }$ of state successor feature functions for various policies and given a reward function via ${ \pmb w } _ { \hat { r } }$ , $Q _ { \hat { r } } ^ { \pi ^ { * } } ( s , a ) { \geq } m a x _ { \psi _ { Q } \in \Psi _ { Q } } [ \psi _ { Q } ^ { \pi } ( s , a ) ^ { \top } \pmb { w } _ { \hat { r } } ]$ and $V _ { \hat { r } } ^ { \pi ^ { * } } \left( s \right) \geq m a x _ { \psi _ { \scriptstyle V } \in \Psi _ { V } } \left[ \psi _ { v } ^ { \pi } \left( s \right) ^ { \top } { \pmb w } _ { \hat { r } } \right] \left\| 2 4 \right\|$ , so we use these two maximizations as approximations of $Q _ { \hat { r } } ^ { * } ( s , a )$ and $V _ { \hat { r } } ^ { * } ( s )$ , respectively. In practice, to enable gradient-based optimization with current tools, the maximization in this expression is replaced with the softmax-weighted average, making the loss function linear. Focusing first on the approximation of $V _ { \hat { r } } ^ { * } ( s )$ , for each $\psi _ { v } \in \Psi _ { V }$ , a softmax weight is calculated for $\begin{array} { r } { \psi _ { _ { V } } ^ { \pi } ( s ) \colon s o f i m a x _ { \Psi } ( \psi _ { _ { V } } ^ { \pi } ( s ) ^ { \top } \pmb { w } _ { \hat { r } } ) \triangleq [ ( \psi _ { _ { V } } ^ { \pi } ( s ) ^ { \top } \pmb { w } _ { \hat { r } } ) ^ { 1 / T } ] / [ ( \dot { \sum } _ { \psi _ { _ { V } } ^ { \prime } \in \Psi _ { _ { V } } } \psi _ { _ { V } } ^ { \prime \pi } ( s ) ^ { \top } \pmb { w } _ { \hat { r } } ) ^ { 1 / T } ] . } \end{array}$ where temperature $T$ is a constant hyperparameter. The resulting approximation of $V _ { \widehat { r } } ^ { * } ( s )$ is therefore defined as $\begin{array} { r } { \tilde { V } _ { \hat { r } } ^ { * } ( s ) \triangleq \sum _ { \pmb { \psi } _ { V } \in \Psi _ { V } } s o f t m a x _ { \Psi _ { V } } ( \pmb { \psi } _ { V } ^ { \pi } ( s ) ^ { \top } \pmb { w } _ { \hat { r } } ) [ \pmb { \psi } _ { V } ^ { \pi } ( s ) ^ { \top } \pmb { w } _ { \hat { r } } ] } \end{array}$ . Similarly, to approxi
|
| 270 |
+
mate 305 $\begin{array} { r } { \mathcal { Q } _ { \vec { r } } ^ { * } ( s , a ) , s o f i m a x _ { \Psi _ { Q } } ( \psi _ { _ { Q } } ^ { \pi } ( s , a ) ^ { \top } \pmb { w } _ { \hat { r } } ) \triangleq [ ( \psi _ { _ { Q } } ^ { \pi } ( s , a ) ^ { \top } \pmb { w } _ { \hat { r } } ) ^ { 1 / T } ] / [ ( \sum _ { \psi _ { _ Q } ^ { \prime } \in \Psi } \psi _ { _ { Q } } ^ { \prime \pi } ( s , a ) ^ { \top } \pmb { w } _ { \hat { r } } ) ^ { 1 / T } ] } \end{array}$
|
| 271 |
+
and 306 $\begin{array} { r } { \tilde { Q } _ { \hat { r } } ^ { * } ( s , a ) \triangleq \sum _ { \psi _ { Q } \in \Psi _ { Q } } s o f t m a x _ { \Psi _ { Q } } ( \psi _ { Q } ^ { \pi } ( s , a ) ^ { \top } \pmb { w } _ { \hat { r } } ) [ \psi _ { Q } ^ { \pi } ( s , a ) ^ { \top } \pmb { w } _ { \hat { r } } ] } \end{array}$ . Consequently, from Eqns. 4
|
| 272 |
+
|
| 273 |
+
1: Input: a set of reward functions and a set of policies (where one set can be $\mathcal { D }$ )
|
| 274 |
+
2: $\Psi \emptyset$
|
| 275 |
+
3: for each reward function $r _ { S F }$ or policy $\pi _ { S F }$ in the input sets do
|
| 276 |
+
4: if $r _ { S F }$ then $\pi _ { S F } $ estimate of optimal maximum-entropy policy for $r _ { S F }$
|
| 277 |
+
5: 6: add estimate $\psi _ { Q } ^ { \pi _ { S F } }$ $\psi _ { Q } ^ { \pi _ { S F } }$ Q to $\Psi _ { _ Q }$ and n $\psi _ { V } ^ { \pi _ { S F } }$ (if not estimated already during step 4)
|
| 278 |
+
7: add $\psi _ { V } ^ { \dot { \pi } _ { S F } }$ to $\Psi _ { \scriptscriptstyle V }$
|
| 279 |
+
8: end for
|
| 280 |
+
9: repeat
|
| 281 |
+
10: optimize ${ \pmb w } _ { \hat { \pmb r } }$ by loss of Eqn. 1, calculating $\tilde { P } _ { r e g r e t } ( \sigma _ { 1 } \succ \sigma _ { 2 } | \hat { r } )$ via Eqn. $6 ,$ using $\Psi _ { _ Q }$ and $\Psi _ { \scriptscriptstyle V }$
|
| 282 |
+
11: until stopping criteria are met
|
| 283 |
+
12: return ${ \pmb w } _ { \hat { \pmb r } }$
|
| 284 |
+
|
| 285 |
+
and307 $\cdot 5 ,$ the corresponding approximation $\tilde { P } _ { r e g r e t }$ of the regret preference model is:
|
| 286 |
+
|
| 287 |
+
$$
|
| 288 |
+
\begin{array} { r } { \tilde { P } _ { r e g r e t } ( \sigma _ { 1 } \succ \sigma _ { 2 } | \hat { r } ) = l o g i s t i c \biggl ( \sum _ { t = 0 } ^ { | \sigma _ { 2 } | \cdot 1 } \left[ \tilde { V } _ { \hat { r } } ^ { * } ( s _ { \sigma _ { 2 } , t } ) - \tilde { Q } _ { \hat { r } } ^ { * } ( s _ { \sigma _ { 2 } , t } , a _ { \sigma _ { 2 } , t } ) \right] - \sum _ { t = 0 } ^ { | \sigma _ { 1 } | \cdot 1 } \left[ \tilde { V } _ { \hat { r } } ^ { * } ( s _ { \sigma _ { 1 } , t } ) - \tilde { Q } _ { \hat { r } } ^ { * } ( s _ { \sigma _ { 1 } , t } , a _ { \sigma _ { 1 } , t } ) \right] \biggr ) } \end{array}
|
| 289 |
+
$$
|
| 290 |
+
|
| 291 |
+
308 The algorithm In Algorithm $\underline { { \left. 1 , \right. } }$ lines 9–12 describe the supervised-learning optimization using
|
| 292 |
+
309 the approximation $\tilde { P } _ { r e g r e t }$ , and the prior lines create $\Psi _ { _ Q }$ and $\Psi _ { \scriptscriptstyle V }$ . Specifically, given a set of reward
|
| 293 |
+
310 functions, a corresponding set of policies is created (line 4), where each policy is an estimate of the
|
| 294 |
+
311 maximum entropy policy for a reward function. Standard policy improvement methods can be used to
|
| 295 |
+
312 create each such policy. Alternatively, some or all of the set of policies can be given as input directly,
|
| 296 |
+
313 not derived from input reward functions. For each such policy $\pi _ { S F }$ , successor feature functions $\Psi _ { Q _ { - } } ^ { \pi _ { S F } }$
|
| 297 |
+
314 and $\Psi _ { V } ^ { \pi _ { S F } }$ are estimated (line 5), which by default would be performed by a minor extension of a
|
| 298 |
+
315 standard policy evaluation algorithm as detailed by Barreto et al. $[ [ 2 4 ]$ . Note that the reward function
|
| 299 |
+
316 that is ultimately learned is not restricted to be in the input set of reward functions, which is used only
|
| 300 |
+
317 to create an approximation of regret.
|
| 301 |
+
|
| 302 |
+
The details of our instantiation of Algorithm 1 for the delivery domain can be found in Appendix F.
|
| 303 |
+
along with guidance for extending it to reward functions that might be non-linear.
|
| 304 |
+
|
| 305 |
+
# 6.2 Results from synthetic preferences
|
| 306 |
+
|
| 307 |
+
Before considering human preferences, we first ask how each preference model performs when it is correct. In other words, we investigate empirically how well the preference model could perform if humans perfectly adhered to it. Recall that the ground-truth reward function, $r$ , is used to create these preferences but is inaccessible to the reward-learning algorithms.
|
| 308 |
+
|
| 309 |
+
For these evaluations, either a stochastic or noiseless preference model acts a preference generator to create a preference dataset, and then the stochastic version of the same model is used for reward learning. For the noiseless case, the deterministic preference generator compares a segment pair’s $\Sigma _ { \sigma } r$ values for $P _ { \Sigma _ { r } }$ or their $r e g r e t ( \sigma | \boldsymbol { r } )$ values for $P _ { r e g r e t }$ . Note that through reward scaling the preference generators approach determinism in the limit, so this noiseless analysis examines minimal-entropy versions
|
| 310 |
+
|
| 311 |
+

|
| 312 |
+
Figure 5: Performance comparison over 100 randomly generated deterministic MDPs
|
| 313 |
+
|
| 314 |
+
336 of the two preference-generating models. (The opposite extreme, uniformly random preferences,
|
| 315 |
+
337 would remove all information from preferences and therefore is not examined.) In the stochastic case,
|
| 316 |
+
338 for each preference model, each segment pair is labeled by sampling from that preference generator’s
|
| 317 |
+
339 output distribution $( \operatorname { E q s } 2 \operatorname { o r } 5 )$ , using the unscaled ground-truth reward function.
|
| 318 |
+
340 We created 100 deterministic MDPs that instantiate variants of our delivery domain (see Section 4.1)
|
| 319 |
+
341 To create each MDP, we sampled from sets of possible widths, heights, and reward component values,
|
| 320 |
+
342 and the resultant grid cells were randomly populated with a destination, objects, and road surface types
|
| 321 |
+
343 (see Appendix F.2 for details). Each segment in the preference datasets for each MDP was generated
|
| 322 |
+
344 by choosing a start state and three actions, all uniformly randomly. For a set number of preferences,
|
| 323 |
+
345 each method had the same set of segment pairs in its preference dataset. Figure 5 shows the percentage
|
| 324 |
+
346 of MDPs in which each preference model results in near-optimal performance. The regret preference
|
| 325 |
+
347 model outperforms the partial return model at every dataset size, both with and without noise. By a
|
| 326 |
+
348 Wilcoxon paired signed-rank test on normalized mean returns, $p { < } 0 . 0 5$ for $86 \%$ of these comparisons
|
| 327 |
+
349 and $p { < } 0 . 0 1$ for $57 \%$ of them, as reported in Appendix F.2.
|
| 328 |
+
350 Further analyses can be found in Appendix F.2, including with stochastic transitions, with different
|
| 329 |
+
351 segment lengths, and while artificially lowering the discount factor (as is common in deep RL and
|
| 330 |
+
352 recent work on deep reward learning from preferences).
|
| 331 |
+
|
| 332 |
+
# 6.3 Results from human preferences
|
| 333 |
+
|
| 334 |
+
We randomly assign human preferences from our gathered dataset to different numbers of same-sized partitions, resulting in different training set sizes, and test each preference model on each partition. Figure 6 shows the results. With smaller training sets (20–100 partitions), the regret preference model results in nearoptimal performance more often. With larger training sets (1–10 partitions), both preference models always reach near-optimal return, but the mean return from the regret preference model is higher for all of these partitions except for 3 partitions in the 10-partition test. Applying a Wilcoxon paired signed-rank test on normalized mean return to each group with 5 or more partitions, $p { < } 0 . 0 5$ for all numbers of partitions except 100 and $p { < } 0 . 0 1$ for 20 and 50 partitions.
|
| 335 |
+
|
| 336 |
+

|
| 337 |
+
Figure 6: Performance comparison over various amounts of human preferences. Each partition has the number of preferences shown or one less.
|
| 338 |
+
|
| 339 |
+
# 7 Conclusion
|
| 340 |
+
|
| 341 |
+
Over numerous evaluations with human preferences, our proposed regret preference model $( P _ { r e g r e t } )$ shows improvements summarized below over the previous partial return preference model $( P _ { \Sigma _ { r } } )$ . When each preference model generates the preferences for its own infinite and exhaustive training set, we prove that $P _ { r e g r e t }$ identifies the set of optimal policies, whereas $P _ { \Sigma _ { r } }$ is not guaranteed to do so without preference noise that reveals the proportions of rewards with respect to each other. With finite training data of synthetic preferences, $P _ { r e g r e t }$ also empirically results in learned policies that tend to outperform those resulting from $P _ { \Sigma _ { r } }$ . This superior performance of $P _ { r e g r e t }$ is also seen with human preferences. In summary, our analyses suggest that regret preference models are more effective both descriptively with respect to human preferences and also normatively, as the model we want humans to follow if we had the choice.
|
| 342 |
+
|
| 343 |
+
378 Independent of $P _ { r e g r e t }$ , this paper also reveals that segments’ changes in state values provide informa
|
| 344 |
+
379 tion about human preferences that is not fully provided by partial return. More generally, we show that
|
| 345 |
+
380 the choice of preference model impacts the performance of learned reward functions.
|
| 346 |
+
This study motivates several new directions for research. Future work could address any of the
|
| 347 |
+
82 limitations detailed in Appendix $\mathbf { \nabla } \cdot \mathbf { A } . 1 .$ Specifically, future work could further test the general superiority
|
| 348 |
+
83 of $P _ { r e g r e t }$ or apply it to deep learning settings. Additionally, prescriptive methods could be developed
|
| 349 |
+
84 via the user interface or elsewhere to nudge humans to conform more to $P _ { r e g r e t }$ or to other normatively
|
| 350 |
+
85 appealing preference models. Lastly, subsequent efforts could seek preference models that are even
|
| 351 |
+
86 more effective with preferences from actual humans, now that this work has provided conclusive
|
| 352 |
+
7 evidence that the choice of preference model is impactful.
|
| 353 |
+
|
| 354 |
+
References
|
| 355 |
+
[1] David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016.
|
| 356 |
+
[2] Andrew W Senior, Richard Evans, John Jumper, James Kirkpatrick, Laurent Sifre, Tim Green, Chongli Qin, Augustin Žídek, Alexander WR Nelson, Alex Bridgland, et al. Improved protein structure prediction using potentials from deep learning. Nature, 577(7792):706–710, 2020.
|
| 357 |
+
[3] Oriol Vinyals, Igor Babuschkin, Wojciech M Czarnecki, Michaël Mathieu, Andrew Dudzik, Junyoung Chung, David H Choi, Richard Powell, Timo Ewalds, Petko Georgiev, et al. Grandmaster level in StarCraft II using multi-agent reinforcement learning. Nature, 575(7782):350–354, 2019.
|
| 358 |
+
[4] Marc G Bellemare, Salvatore Candido, Pablo Samuel Castro, Jun Gong, Marlos C Machado, Subhodeep Moitra, Sameera S Ponda, and Ziyu Wang. Autonomous navigation of stratospheric balloons using reinforcement learning. Nature, 588(7836):77–82, 2020.
|
| 359 |
+
[5] Christopher Berner, Greg Brockman, Brooke Chan, Vicki Cheung, Przemysław D˛ebiak, Christy Dennison, David Farhi, Quirin Fischer, Shariq Hashme, Chris Hesse, et al. Dota 2 with large scale deep reinforcement learning. arXiv preprint arXiv:1912.06680, 2019.
|
| 360 |
+
[6] Jonas Degrave, Federico Felici, Jonas Buchli, Michael Neunert, Brendan Tracey, Francesco Carpanese, Timo Ewalds, Roland Hafner, Abbas Abdolmaleki, Diego de Las Casas, et al. Magnetic control of tokamak plasmas through deep reinforcement learning. Nature, 602(7897):414–419, 2022.
|
| 361 |
+
[7] Dario Amodei, Chris Olah, Jacob Steinhardt, Paul Christiano, John Schulman, and Dan Mané. Concrete problems in ai safety. arXiv preprint arXiv:1606.06565, 2016.
|
| 362 |
+
[8] W Bradley Knox, Alessandro Allievi, Holger Banzhaf, Felix Schmitt, and Peter Stone. Reward (mis)design for autonomous driving. arXiv preprint arXiv:2104.13906, 2021.
|
| 363 |
+
[9] Paul F Christiano, Jan Leike, Tom Brown, Miljan Martic, Shane Legg, and Dario Amodei. Deep reinforcement learning from human preferences. In Advances in Neural Information Processing Systems (NIPS), pages 4299–4307, 2017.
|
| 364 |
+
[10] Borja Ibarz, Jan Leike, Tobias Pohlen, Geoffrey Irving, Shane Legg, and Dario Amodei. Reward learning from human preferences and demonstrations in atari. arXiv preprint arXiv:1811.06521, 2018.
|
| 365 |
+
[11] Xiaofei Wang, Kimin Lee, Kourosh Hakhamaneshi, Pieter Abbeel, and Michael Laskin. Skill preferences: Learning to extract and execute robotic skills from human feedback. In Conference on Robot Learning, pages 1259–1268. PMLR, 2022.
|
| 366 |
+
[12] Erdem Bıyık, Dylan P Losey, Malayandi Palan, Nicholas C Landolfi, Gleb Shevchuk, and Dorsa Sadigh. Learning reward functions from diverse sources of human feedback: Optimally integrating demonstrations and preferences. The International Journal of Robotics Research, page 02783649211041652, 2021.
|
| 367 |
+
[13] Dorsa Sadigh, Anca D Dragan, Shankar Sastry, and Sanjit A Seshia. Active preference-based learning of reward functions. Robotics: Science and Systems, 2017.
|
| 368 |
+
[14] Kimin Lee, Laura Smith, and Pieter Abbeel. Pebble: Feedback-efficient interactive reinforcement learning via relabeling experience and unsupervised pre-training. arXiv preprint arXiv:2106.05091, 2021.
|
| 369 |
+
[15] Kimin Lee, Laura Smith, Anca Dragan, and Pieter Abbeel. B-pref: Benchmarking preference-based reinforcement learning. arXiv preprint arXiv:2111.03026, 2021.
|
| 370 |
+
[16] Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. Training language models to follow instructions with human feedback. arXiv preprint arXiv:2203.02155, 2022.
|
| 371 |
+
[17] R Duncan Luce. Individual choice behavior: A theoretical analysis. John Wiley, 1959.
|
| 372 |
+
[18] Roger N Shepard. Stimulus and response generalization: A stochastic model relating generalization to distance in psychological space. Psychometrika, 22(4):325–345, 1957.
|
| 373 |
+
[19] A.Y. Ng and S. Russell. Algorithms for inverse reinforcement learning. In Seventeenth International Conference on Machine Learning (ICML), 2000.
|
| 374 |
+
[20] Brian D Ziebart, Andrew L Maas, J Andrew Bagnell, and Anind K Dey. Maximum entropy inverse reinforcement learning. In Twenty-third AAAI Conference on Artificial Intelligence, volume 8, pages 1433–1438, 2008.
|
| 375 |
+
[21] Dylan Hadfield-Menell, Smitha Milli, Pieter Abbeel, Stuart J Russell, and Anca Dragan. Inverse reward design. In Advances in Neural Information Processing Systems (NIPS), pages 6765–6774, 2017.
|
| 376 |
+
[22] Stuart Russell and Peter Norvig. Artificial intelligence: a modern approach. 2020.
|
| 377 |
+
[23] Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018.
|
| 378 |
+
[24] André Barreto, Will Dabney, Rémi Munos, Jonathan J Hunt, Tom Schaul, Hado Van Hasselt, and David Silver. Successor features for transfer in reinforcement learning. arXiv preprint arXiv:1606.05312, 2016.
|
| 379 |
+
[25] Riad Akrour, Marc Schoenauer, and Michele Sebag. Preference-based policy learning. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pages 12–27. Springer, 2011.
|
| 380 |
+
[26] Daniel Brown, Russell Coleman, Ravi Srinivasan, and Scott Niekum. Safe imitation learning via fast bayesian reward inference from preferences. In International Conference on Machine Learning, pages 1165–1177. PMLR, 2020.
|
| 381 |
+
[27] Pieter Abbeel and Andrew Y Ng. Apprenticeship learning via inverse reinforcement learning. In Proceedings of the twenty-first international conference on Machine learning, page 1, 2004.
|
| 382 |
+
[28] Kuno Kim, Shivam Garg, Kirankumar Shiragur, and Stefano Ermon. Reward identification in inverse reinforcement learning. In International Conference on Machine Learning, pages 5496–5505. PMLR, 2021.
|
| 383 |
+
[29] Saurabh Arora and Prashant Doshi. A survey of inverse reinforcement learning: Challenges, methods and progress. Artificial Intelligence, 297:103500, 2021.
|
| 384 |
+
[30] John Von Neumann and Oskar Morgenstern. Theory of games and economic behavior. Princeton university press, 1944.
|
| 385 |
+
[31] Yuchen Cui, Qiping Zhang, Alessandro Allievi, Peter Stone, Scott Niekum, and W Bradley Knox. The empathic framework for task learning from implicit human feedback. arXiv preprint arXiv:2009.13649, 2020.
|
| 386 |
+
[32] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 8024–8035. Curran Associates, Inc., 2019.
|
| 387 |
+
[33] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011.
|
| 388 |
+
|
| 389 |
+
# 470 Checklist
|
| 390 |
+
|
| 391 |
+
1. For all authors...
|
| 392 |
+
|
| 393 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 394 |
+
(b) Did you describe the limitations of your work? [Yes] See Appendix A.1.
|
| 395 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes] See Appendix A.2.
|
| 396 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 397 |
+
|
| 398 |
+
2. If you are including theoretical results...
|
| 399 |
+
|
| 400 |
+
(a) Did you state the full set of assumptions of all theoretical results? [Yes] Sections 3 and C include all assumptions.
|
| 401 |
+
(b) Did you include complete proofs of all theoretical results? [Yes] See Section 3 and Appendix C.
|
| 402 |
+
|
| 403 |
+
3. If you ran experiments...
|
| 404 |
+
|
| 405 |
+
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [No] However, the learning code, the code for running experiments, the code and UI elements for gathering human preferences on Mechanical Turk, and the anonymized human preferences data will be opened. We are particularly excited to provide the first open dataset of human preferences over pairs of trajectory segments.
|
| 406 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] Appendix F.1
|
| 407 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] Error bars do not seem applicable to our plots, which do not show the exact data that we do statistical testing on. However, statistical significance testing was reported, in Sections 5.1 and 6.2 (with a pointer to the appendix for details).
|
| 408 |
+
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Appendix F.1.
|
| 409 |
+
|
| 410 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 411 |
+
|
| 412 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] Appendix D does so for visual assets used to visualize the delivery task.
|
| 413 |
+
(b) Did you mention the license of the assets? [Yes] Appendix D mentions the license for visual assets used to visualize the delivery task.
|
| 414 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [No]
|
| 415 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [Yes] See Appendix D.
|
| 416 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [Yes] See Appendix D
|
| 417 |
+
|
| 418 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 419 |
+
|
| 420 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [Yes] Section 4.1.1 includes a link to a video of a full experimental session (with an author acting as the subject).
|
| 421 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [Yes] We discuss participant risks from our crowdsourced study and provide a link to the IRB approval in Appendix D.
|
| 422 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [Yes] See Appendix D.
|
parse/dev/6UtOXn1LwNE/6UtOXn1LwNE_content_list.json
ADDED
|
@@ -0,0 +1,1292 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "Models of human preference for learning reward functions ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
323,
|
| 8 |
+
122,
|
| 9 |
+
676,
|
| 10 |
+
172
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Anonymous Author(s) \nAffiliation \nAddress \nemail ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
423,
|
| 19 |
+
226,
|
| 20 |
+
578,
|
| 21 |
+
281
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Abstract ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
462,
|
| 31 |
+
319,
|
| 32 |
+
535,
|
| 33 |
+
335
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "1 The utility of reinforcement learning is limited by the alignment of reward functions \n2 with the interests of human stakeholders. One promising method for alignment is \n3 to learn the reward function from human-generated preferences between pairs of \n4 trajectory segments. These human preferences are typically assumed to be informed \n5 solely by partial return, the sum of rewards along each segment. We find this \n6 assumption to be flawed and propose modeling preferences instead as arising from \n7 a different statistic: each segment’s regret, a measure of a segment’s deviation from \n8 optimal decision-making. Given infinitely many preferences generated according \n9 to regret, we prove that we can identify a reward function equivalent to the reward \n10 function that generated those preferences. We also prove that the previous partial \n11 return model lacks this identifiability property without preference noise that reveals \n12 rewards’ relative proportions, and we empirically show that our proposed regret \n13 preference model outperforms it with finite training data in otherwise the same \n14 setting. Additionally, our proposed regret preference model better predicts real \n15 human preferences and also learns reward functions from these preferences that \n16 lead to policies that are better human-aligned. Overall, this work establishes that \n17 the choice of preference model is impactful, and our proposed regret preference \n18 model provides an improvement upon a core assumption of recent research. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
147,
|
| 42 |
+
351,
|
| 43 |
+
766,
|
| 44 |
+
622
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "19 1 Introduction ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
148,
|
| 54 |
+
648,
|
| 55 |
+
312,
|
| 56 |
+
665
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "20 Improvements in reinforcement learning (RL) have led to notable recent achievements [1–6], \n21 increasing its applicability to real-world problems. Yet, like all optimization algorithms, even perfect \n22 RL optimization is limited by the objective it optimizes. For RL, this objective is created in large \n23 part by the reward function. Poor alignment between reward functions and the interests of human \n24 stakeholders limits the utility of RL and may even pose catastrophic risks [7, 8]. \n25 Influential recent research has focused on reward learning from preferences over pairs of fixed-length \n26 trajectory segments. Nearly all of this recent work assumes that human preferences arise probabilis \n27 tically from only the sum of rewards over a segment, i.e., the segment’s partial return [9–16]. That is, \n28 these works assume that people tend to prefer trajectory segments that yield greater rewards during the \n29 segment. However, this preference model ignores seemingly important information about the segment’s \n30 desirability, including the state values of the segment’s start and end states. Separately, this partial return \n31 preference model can prefer suboptimal actions with lucky outcomes, like buying a lottery ticket. \n32 This paper proposes an alternative preference model based on the regret of each segment, which is equiv \n33 alent to the negated sum of an optimal policy’s advantage of each transition in the segment (Section $\\left. \\overline { { 2 . 2 } } \\right)$ . \n34 Figure 1 shows an intuitive example of when these two models disagree. Other classes of domains that \n35 the models will differ on are those with constant reward until the end, including competitive games like \n36 chess, go, and soccer as well as tasks for which the objective is to minimize time until reaching a goal. \n37 For these two preference models, we first focus the \n38 oretically on a normative analysis (Section 3)— i.e., \n39 what preference model would we want humans \n40 to use if we could choose—proving that reward \n41 learning on infinite, exhaustive preferences with \n42 our proposed regret preference model identifies a \n43 reward function with the same set of optimal poli \n44 cies as the reward function with which the prefer \n45 ences are generated. We also prove that the par \n46 tial return preference model is not guaranteed to \n47 identify such a reward function without preference \n48 noise. We follow up with a descriptive analysis of \n49 how well each of these proposed models align with \n50 actual human preferences by collecting a human \n51 labeled dataset of preferences in a rich grid world \n52 domain (Section 4) and showing that the regret pref \n53 erence model better predicts these human prefer \n54 ences (Section 5). Finally, we find that the policies \n55 ultimately created through the regret preference \n56 model tend to outperform those from the partial \n57 return model learning—both when assessed with \n58 collected human preferences or when assessed with \n59 synthetic preferences (Section 6) ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
147,
|
| 65 |
+
679,
|
| 66 |
+
825,
|
| 67 |
+
755
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "",
|
| 74 |
+
"bbox": [
|
| 75 |
+
147,
|
| 76 |
+
762,
|
| 77 |
+
826,
|
| 78 |
+
867
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "",
|
| 85 |
+
"bbox": [
|
| 86 |
+
148,
|
| 87 |
+
875,
|
| 88 |
+
825,
|
| 89 |
+
905
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "",
|
| 96 |
+
"bbox": [
|
| 97 |
+
145,
|
| 98 |
+
90,
|
| 99 |
+
826,
|
| 100 |
+
136
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 1
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "",
|
| 107 |
+
"bbox": [
|
| 108 |
+
147,
|
| 109 |
+
143,
|
| 110 |
+
498,
|
| 111 |
+
491
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 1
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "image",
|
| 117 |
+
"img_path": "images/30754911e67a1c946475604cad19a97926c4d80ced20ee65661465106afe2875.jpg",
|
| 118 |
+
"image_caption": [
|
| 119 |
+
"Figure 1: Two segments of a car moving at high speed near a brick wall. Assume the right segment is optimal and the left segment is suboptimal (as defined in Sec. 2.1). The left segment has a higher sum of reward, so the partial return preference model tends to prefer it. The regret preference model instead tends to prefer the right segment because optimal segments have minimal regret. If we also assume deterministic transitions, then the regret model includes the difference in values between the start state and the end state (Eq. 3), and the right segment would tend to be preferred because it greatly improves its state values from start to end, whereas the left segment’s state values greatly worsen. We suspect our human readers will also tend to prefer the right segment. "
|
| 120 |
+
],
|
| 121 |
+
"image_footnote": [],
|
| 122 |
+
"bbox": [
|
| 123 |
+
513,
|
| 124 |
+
147,
|
| 125 |
+
820,
|
| 126 |
+
261
|
| 127 |
+
],
|
| 128 |
+
"page_idx": 1
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "text",
|
| 132 |
+
"text": "60 2 Preference models for learning reward functions ",
|
| 133 |
+
"text_level": 1,
|
| 134 |
+
"bbox": [
|
| 135 |
+
151,
|
| 136 |
+
505,
|
| 137 |
+
604,
|
| 138 |
+
522
|
| 139 |
+
],
|
| 140 |
+
"page_idx": 1
|
| 141 |
+
},
|
| 142 |
+
{
|
| 143 |
+
"type": "text",
|
| 144 |
+
"text": "61 We assume that the task environment is a Markov decision process (MDP) specified by the tuple $( S , A ,$ \n62 $T , \\gamma , D _ { 0 } , r )$ . $S$ and $A$ are the sets of possible states and actions, respectively. $T$ is a transition function, \n63 $T : S \\times A \\to S$ . $\\gamma$ is the discount factor and $D _ { 0 }$ is the distribution of start states. Unless otherwise \n64 stated, we assume undiscounted tasks (i.e., $\\gamma = 1$ ) that have terminal states, after which only 0 reward \n65 can be received. $r$ is a reward function, $r : S \\times A \\times S \\mathbb { R }$ , where the reward $r _ { t }$ at time $t$ is a function of \n66 $s _ { t } , a _ { t }$ , and $s _ { t + 1 }$ . An $\\mathsf { M D P } \\backslash r$ is an MDP without a reward function. \n67 Throughout this paper, $r$ refers to the ground-truth reward function for some MDP; $\\hat { r }$ refers to a learned \n68 approximation of $r$ ; and $\\tilde { r }$ refers to any reward function (including $r$ or $\\hat { r }$ ). A policy $( \\pi : S \\times A \\to [ 0 , 1 ] )$ ) \n69 specifies the probability of an action given a state. $Q _ { \\tilde { r } } ^ { * }$ and $V _ { \\tilde { r } } ^ { * }$ refer respectively to the state-action value \n70 function and state value function for an optimal policy, $\\pi ^ { * }$ , under $\\tilde { r }$ . The optimal advantage function is \n71 defined as $A _ { \\tilde { r } } ^ { \\ast } ( s , a ) \\triangleq Q _ { \\tilde { r } } ^ { \\ast } ( s , a ) - V _ { \\tilde { r } } ^ { \\ast } ( s )$ . Throughout this paper, the ground-truth reward function $r$ \n72 is used to algorithmically generate preferences when they are not human-generated, is hidden during \n73 reward learning, and is used to evaluate the performance of optimal policies under a learned $\\hat { r }$ . ",
|
| 145 |
+
"bbox": [
|
| 146 |
+
148,
|
| 147 |
+
535,
|
| 148 |
+
825,
|
| 149 |
+
626
|
| 150 |
+
],
|
| 151 |
+
"page_idx": 1
|
| 152 |
+
},
|
| 153 |
+
{
|
| 154 |
+
"type": "text",
|
| 155 |
+
"text": "",
|
| 156 |
+
"bbox": [
|
| 157 |
+
147,
|
| 158 |
+
632,
|
| 159 |
+
825,
|
| 160 |
+
739
|
| 161 |
+
],
|
| 162 |
+
"page_idx": 1
|
| 163 |
+
},
|
| 164 |
+
{
|
| 165 |
+
"type": "text",
|
| 166 |
+
"text": "74 2.1 Reward learning from pairwise preferences ",
|
| 167 |
+
"text_level": 1,
|
| 168 |
+
"bbox": [
|
| 169 |
+
150,
|
| 170 |
+
752,
|
| 171 |
+
513,
|
| 172 |
+
767
|
| 173 |
+
],
|
| 174 |
+
"page_idx": 1
|
| 175 |
+
},
|
| 176 |
+
{
|
| 177 |
+
"type": "text",
|
| 178 |
+
"text": "5 A reward function can be learned by minimizing the cross-entropy loss—i.e., maximizing the \n6 likelihood—of observed human preferences, a common approach in recent literature [9–11, 14, 16]. \n77 Segments Let $\\sigma$ denote a segment starting at state $s _ { \\sigma , 0 }$ . Its length $| \\sigma |$ is the number of transitions within \n78 the segment. A segment includes $| \\sigma | + 1$ states and $| \\sigma |$ actions: $( s _ { \\sigma , 0 } , a _ { \\sigma , 0 } , s _ { \\sigma , 1 } , a _ { \\sigma , 1 } , . . . , s _ { \\sigma , | \\sigma | } )$ . In this \n79 problem setting, segments lack any reward information. As shorthand, we define $\\sigma _ { t } \\triangleq \\left( s _ { \\sigma , t } , a _ { \\sigma , t } , s _ { \\sigma , t + 1 } \\right)$ . \n80 A segment $\\sigma$ is optimal with respect to $\\tilde { r }$ if, for every $i \\in \\{ 1 , . . . , | \\sigma | { - 1 } \\}$ , $Q _ { \\tilde { r } } ^ { * } ( s _ { \\sigma , i } , a _ { \\sigma , i } ) = V _ { \\tilde { r } } ^ { * } ( s _ { \\sigma , i } )$ . A \n81 segment that is not optimal is suboand the partial return of a segment 82 imis ome , de $\\tilde { r }$ and a segment ted in shorthan $\\sigma , \\tilde { r } _ { t } \\triangleq \\tilde { r } \\big ( s _ { \\sigma , t } , a _ { \\sigma , t } , s _ { \\sigma , t + 1 } \\big )$ , \n$\\sigma$ $\\scriptstyle \\sum _ { t = 0 } ^ { | \\sigma | - 1 } \\gamma ^ { t } { \\tilde { r } } _ { t }$ $\\Sigma _ { \\sigma } r$ \n83 Preference datasets Each preference over a pair of segments creates a sample $( \\sigma _ { 1 } , \\sigma _ { 2 } , \\mu )$ in a \n84 preference dataset $D _ { \\succ }$ . Vector $\\mu = \\langle \\mu _ { 1 } , \\mu _ { 2 } \\rangle$ represents the preference; specifically, if $\\sigma _ { 1 }$ is preferred \n85 over $\\sigma _ { 2 }$ , denoted $\\sigma _ { 1 } \\succ \\sigma _ { 2 }$ , $\\mu = \\langle 1 , 0 \\rangle$ . $\\mu$ is $^ { \\langle 0 , 1 \\rangle }$ if $\\sigma _ { 1 } \\prec \\sigma _ { 2 }$ and is $\\langle 0 . 5 , 0 . 5 \\rangle$ for $\\sigma _ { 1 } \\sim \\sigma _ { 2 }$ (no preference). \n86 Loss function To learn a reward function from a preference dataset, $D _ { \\succ }$ , a common assumption \n87 is that these preferences were generated by a preference model $P$ that arises from an unobservable \n88 ground-truth reward function $r$ . We approximate $r$ by minimizing cross-entropy loss to learn $\\hat { r }$ : ",
|
| 179 |
+
"bbox": [
|
| 180 |
+
158,
|
| 181 |
+
777,
|
| 182 |
+
825,
|
| 183 |
+
808
|
| 184 |
+
],
|
| 185 |
+
"page_idx": 1
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"type": "text",
|
| 189 |
+
"text": "",
|
| 190 |
+
"bbox": [
|
| 191 |
+
147,
|
| 192 |
+
814,
|
| 193 |
+
826,
|
| 194 |
+
914
|
| 195 |
+
],
|
| 196 |
+
"page_idx": 1
|
| 197 |
+
},
|
| 198 |
+
{
|
| 199 |
+
"type": "text",
|
| 200 |
+
"text": "",
|
| 201 |
+
"bbox": [
|
| 202 |
+
147,
|
| 203 |
+
90,
|
| 204 |
+
825,
|
| 205 |
+
137
|
| 206 |
+
],
|
| 207 |
+
"page_idx": 2
|
| 208 |
+
},
|
| 209 |
+
{
|
| 210 |
+
"type": "text",
|
| 211 |
+
"text": "",
|
| 212 |
+
"bbox": [
|
| 213 |
+
147,
|
| 214 |
+
143,
|
| 215 |
+
825,
|
| 216 |
+
189
|
| 217 |
+
],
|
| 218 |
+
"page_idx": 2
|
| 219 |
+
},
|
| 220 |
+
{
|
| 221 |
+
"type": "equation",
|
| 222 |
+
"img_path": "images/8474c99647f42525b3c31a98638bce0c09829df058a2c06a20c2d1fb7720016a.jpg",
|
| 223 |
+
"text": "$$\n\\begin{array} { r l } { l o s s ( \\hat { r } , D _ { \\succ } ) { = } { - } { \\sum _ { \\alpha } { \\mu _ { 1 } } { \\log } P ( \\sigma _ { 1 } \\succ \\sigma _ { 2 } | \\hat { r } ) { + } \\mu _ { 2 } { \\log } P ( \\sigma _ { 1 } { \\prec } \\sigma _ { 2 } | \\hat { r } ) } } & { { } } \\\\ { ( \\sigma _ { 1 } , \\sigma _ { 2 } , \\mu ) { \\in } D _ { \\succ } } & { { } } \\end{array}\n$$",
|
| 224 |
+
"text_format": "latex",
|
| 225 |
+
"bbox": [
|
| 226 |
+
297,
|
| 227 |
+
194,
|
| 228 |
+
700,
|
| 229 |
+
229
|
| 230 |
+
],
|
| 231 |
+
"page_idx": 2
|
| 232 |
+
},
|
| 233 |
+
{
|
| 234 |
+
"type": "text",
|
| 235 |
+
"text": "89 This loss is under-specified until $P ( \\sigma _ { 1 } \\succ \\sigma _ { 2 } | \\hat { r } )$ is defined, which is the focus of this paper. We show that \n90 the common model of preference probabilities is flawed and introduce an improved preference model. ",
|
| 236 |
+
"bbox": [
|
| 237 |
+
147,
|
| 238 |
+
236,
|
| 239 |
+
826,
|
| 240 |
+
267
|
| 241 |
+
],
|
| 242 |
+
"page_idx": 2
|
| 243 |
+
},
|
| 244 |
+
{
|
| 245 |
+
"type": "text",
|
| 246 |
+
"text": "Preference models A preference model determines the probability of one trajectory segment being 2 preferred over another, $P ( \\sigma _ { 1 } \\succ \\sigma _ { 2 } | \\tilde { r } )$ . Preference models could be applied to model preferences provided by humans or other systems. Preference models can also directly generate preferences, and in such cases we refer to them as preference generators. ",
|
| 247 |
+
"bbox": [
|
| 248 |
+
156,
|
| 249 |
+
272,
|
| 250 |
+
825,
|
| 251 |
+
334
|
| 252 |
+
],
|
| 253 |
+
"page_idx": 2
|
| 254 |
+
},
|
| 255 |
+
{
|
| 256 |
+
"type": "text",
|
| 257 |
+
"text": "2.2 Choice of preference model: partial return and regret ",
|
| 258 |
+
"text_level": 1,
|
| 259 |
+
"bbox": [
|
| 260 |
+
158,
|
| 261 |
+
345,
|
| 262 |
+
581,
|
| 263 |
+
362
|
| 264 |
+
],
|
| 265 |
+
"page_idx": 2
|
| 266 |
+
},
|
| 267 |
+
{
|
| 268 |
+
"type": "text",
|
| 269 |
+
"text": "Partial return Recent work assumes human preferences are generated by a Boltzmann distribution over the two segments’ partial returns [9–16], expressed here as a logistic function1 : ",
|
| 270 |
+
"bbox": [
|
| 271 |
+
166,
|
| 272 |
+
372,
|
| 273 |
+
825,
|
| 274 |
+
404
|
| 275 |
+
],
|
| 276 |
+
"page_idx": 2
|
| 277 |
+
},
|
| 278 |
+
{
|
| 279 |
+
"type": "equation",
|
| 280 |
+
"img_path": "images/0dbae59db4af0f485d9daa159784956a2ebb1f175cebe5ac18fe956023410a76.jpg",
|
| 281 |
+
"text": "$$\n\\begin{array} { r } { P _ { \\Sigma _ { r } } ( \\sigma _ { 1 } \\succ \\sigma _ { 2 } | \\tilde { r } ) = l o g i s t i c \\Big ( \\Sigma _ { \\sigma _ { 1 } } \\tilde { r } - \\Sigma _ { \\sigma _ { 2 } } \\tilde { r } \\Big ) . } \\end{array}\n$$",
|
| 282 |
+
"text_format": "latex",
|
| 283 |
+
"bbox": [
|
| 284 |
+
357,
|
| 285 |
+
405,
|
| 286 |
+
638,
|
| 287 |
+
431
|
| 288 |
+
],
|
| 289 |
+
"page_idx": 2
|
| 290 |
+
},
|
| 291 |
+
{
|
| 292 |
+
"type": "text",
|
| 293 |
+
"text": "98 Regret We introduce an alternative preference model based on the regret of each transition in a \n99 segment. We first focus on segments with deterministic transitions. For a transition $\\left( { { s _ { t } } , { a _ { t } } , { s _ { t + 1 } } } \\right)$ in a \n100 deterministic segment, $r e g r e t _ { \\mathrm { d } } ( \\sigma _ { t } | \\tilde { r } ) \\stackrel { \\Delta } { = } V _ { \\tilde { r } } ^ { \\ast } ( s _ { \\sigma , t } ) - \\left[ \\tilde { r } _ { t } + V _ { \\tilde { r } } ^ { \\ast } ( s _ { \\sigma , t + 1 } ) \\right]$ . For a full deterministic segment, ",
|
| 294 |
+
"bbox": [
|
| 295 |
+
143,
|
| 296 |
+
436,
|
| 297 |
+
826,
|
| 298 |
+
483
|
| 299 |
+
],
|
| 300 |
+
"page_idx": 2
|
| 301 |
+
},
|
| 302 |
+
{
|
| 303 |
+
"type": "equation",
|
| 304 |
+
"img_path": "images/5ca016ee10949858ad5903b8310d613ea4de78aa3f4dc3be067b338256393918.jpg",
|
| 305 |
+
"text": "$$\nr e g r e t _ { d } ( \\sigma | \\tilde { r } ) \\triangleq \\sum _ { t = 0 } ^ { | \\sigma | - 1 } r e g r e t _ { d } ( \\sigma _ { t } | \\tilde { r } ) = V _ { \\tilde { r } } ^ { * } ( s _ { \\sigma , 0 } ) - \\big ( \\Sigma _ { \\sigma } \\tilde { r } + V _ { \\tilde { r } } ^ { * } ( s _ { \\sigma , | \\sigma | } ) \\big ) ,\n$$",
|
| 306 |
+
"text_format": "latex",
|
| 307 |
+
"bbox": [
|
| 308 |
+
271,
|
| 309 |
+
488,
|
| 310 |
+
725,
|
| 311 |
+
534
|
| 312 |
+
],
|
| 313 |
+
"page_idx": 2
|
| 314 |
+
},
|
| 315 |
+
{
|
| 316 |
+
"type": "text",
|
| 317 |
+
"text": "102 with the right-hand expression arising from cancelling out intermediate state values. Therefore, \n103 deterministic regret measures how much the segment reduces expected return from $V _ { \\tilde { r } } ^ { * } ( s _ { \\sigma , 0 } )$ . An \n104 optimal segment, $\\sigma ^ { * }$ , always has 0 regret, and a suboptimal segment, $\\sigma ^ { \\ast }$ , will always have positive \n105 regret, a intuitively appealing property that also plays a role in the identifiability proof of Theorem 3.1. \n106 Stochastic transitions, however, can result in $r e g r e t _ { d } ( \\sigma ^ { * } | \\hat { r } ) > r e g r e t _ { d } ( \\sigma ^ { \\neg * } | \\tilde { r } )$ , losing the property \n107 above. To retain it, we note that the effect on expected return of transition stochasticity from a \n108 transition $\\left( { { s _ { t } } , { a _ { t } } , { s _ { t + 1 } } } \\right)$ is $\\left[ \\tilde { r } _ { t } + V _ { \\tilde { r } } ^ { * } ( s _ { t + 1 } ) \\right] - Q _ { \\tilde { r } } ^ { * } ( s _ { t } , a _ { t } )$ and add this expression once per transition to \n109 get regret $( \\sigma )$ , removing the subscript $d$ that refers to determinism. The regret for a single transition \n110 becomes $r e g r e t ( \\sigma _ { t } | \\tilde { r } ) = [ V _ { \\tilde { r } } ^ { * } ( s _ { \\sigma , t } ) - [ \\tilde { r } _ { t } + V _ { \\tilde { r } } ^ { * } ( s _ { \\sigma , t + 1 } ) ] ] + [ [ \\tilde { r } _ { t } + V _ { \\tilde { r } } ^ { * } ( s _ { \\sigma , t + 1 } ) ] - Q _ { \\tilde { r } } ^ { * } ( s _ { \\sigma , t } , a _ { \\sigma , t } ) ] = 0 .$ \n111 $V _ { \\tilde { r } } ^ { * } \\left( s _ { \\sigma , t } \\right) - Q _ { \\tilde { r } } ^ { * } \\left( s _ { \\sigma , t } , a _ { \\sigma , t } \\right) = - A _ { \\tilde { r } } ^ { * } \\left( s _ { \\sigma , t } , a _ { \\sigma , t } \\right)$ . Regret for a full segment is ",
|
| 318 |
+
"bbox": [
|
| 319 |
+
142,
|
| 320 |
+
534,
|
| 321 |
+
828,
|
| 322 |
+
595
|
| 323 |
+
],
|
| 324 |
+
"page_idx": 2
|
| 325 |
+
},
|
| 326 |
+
{
|
| 327 |
+
"type": "text",
|
| 328 |
+
"text": "",
|
| 329 |
+
"bbox": [
|
| 330 |
+
142,
|
| 331 |
+
601,
|
| 332 |
+
823,
|
| 333 |
+
694
|
| 334 |
+
],
|
| 335 |
+
"page_idx": 2
|
| 336 |
+
},
|
| 337 |
+
{
|
| 338 |
+
"type": "equation",
|
| 339 |
+
"img_path": "images/c31bbcb4f50bb0e26e714d378d648bd3b946ca7d7a3ee3fa835fb23b64e294a3.jpg",
|
| 340 |
+
"text": "$$\nr e g r e t ( \\sigma | \\tilde { r } ) = \\sum _ { t = 0 } ^ { | \\sigma | - 1 } r e g r e t ( \\sigma _ { t } | \\tilde { r } ) = \\sum _ { t = 0 } ^ { | \\sigma | - 1 } \\left[ V _ { \\tilde { r } } ^ { * } ( s _ { \\sigma , t } ) - Q _ { \\tilde { r } } ^ { * } ( s _ { \\sigma , t } , a _ { \\sigma , t } ) \\right] = \\sum _ { t = 0 } ^ { | \\sigma | - 1 } - A _ { \\tilde { r } } ^ { * } ( s _ { \\sigma , t } , a _ { \\sigma , t } ) .\n$$",
|
| 341 |
+
"text_format": "latex",
|
| 342 |
+
"bbox": [
|
| 343 |
+
191,
|
| 344 |
+
695,
|
| 345 |
+
785,
|
| 346 |
+
741
|
| 347 |
+
],
|
| 348 |
+
"page_idx": 2
|
| 349 |
+
},
|
| 350 |
+
{
|
| 351 |
+
"type": "text",
|
| 352 |
+
"text": "112 The regret preference model is the Boltzmann distribution over negated regret: ",
|
| 353 |
+
"bbox": [
|
| 354 |
+
142,
|
| 355 |
+
744,
|
| 356 |
+
679,
|
| 357 |
+
760
|
| 358 |
+
],
|
| 359 |
+
"page_idx": 2
|
| 360 |
+
},
|
| 361 |
+
{
|
| 362 |
+
"type": "equation",
|
| 363 |
+
"img_path": "images/f1d89beff80f0b6277039be36a7f0b7aae9e1ad45813419059e459cc897caabf.jpg",
|
| 364 |
+
"text": "$$\nP _ { r e g r e t } ( \\sigma _ { 1 } \\sim \\sigma _ { 2 } | \\tilde { r } ) \\stackrel { \\Delta } { = } l o g i s t i c \\Bigl ( r e g r e t ( \\sigma _ { 2 } | \\tilde { r } ) - r e g r e t ( \\sigma _ { 1 } | \\tilde { r } ) \\Bigr ) .\n$$",
|
| 365 |
+
"text_format": "latex",
|
| 366 |
+
"bbox": [
|
| 367 |
+
295,
|
| 368 |
+
762,
|
| 369 |
+
702,
|
| 370 |
+
789
|
| 371 |
+
],
|
| 372 |
+
"page_idx": 2
|
| 373 |
+
},
|
| 374 |
+
{
|
| 375 |
+
"type": "text",
|
| 376 |
+
"text": "113 Lastly, we note that if two segments have deterministic transitions, end in terminal states, and have the same starting state, this regret model reduces to the partial return model: 114 $P _ { r e g r e t } ( \\cdot | \\tilde { r } ) = P _ { \\Sigma _ { r } } ( \\cdot | \\tilde { r } )$ . ",
|
| 377 |
+
"bbox": [
|
| 378 |
+
147,
|
| 379 |
+
792,
|
| 380 |
+
825,
|
| 381 |
+
824
|
| 382 |
+
],
|
| 383 |
+
"page_idx": 2
|
| 384 |
+
},
|
| 385 |
+
{
|
| 386 |
+
"type": "text",
|
| 387 |
+
"text": "115 Algorithms in this paper All algorithms in the body of this paper are defined simply as “minimize \n116 Equation 1”. They differ only in how the preference probabilities are calculated. All reward function \n117 learning via partial return uses Equation $2 .$ We use two algorithms for reward function learning \n118 via regret. The theory in Section $3$ assumes exact measurement of regret, using Equation 5. Our \n119 experimental results in Section 6 use Equation 6 to approximate regret. Appendix B introduces other \n120 algorithms that use Equation 1, as well as one in Appendix $\\overline { { \\mathbf { B } . 2 } }$ that generalizes Equation 1. ",
|
| 388 |
+
"bbox": [
|
| 389 |
+
140,
|
| 390 |
+
829,
|
| 391 |
+
826,
|
| 392 |
+
876
|
| 393 |
+
],
|
| 394 |
+
"page_idx": 2
|
| 395 |
+
},
|
| 396 |
+
{
|
| 397 |
+
"type": "text",
|
| 398 |
+
"text": "",
|
| 399 |
+
"bbox": [
|
| 400 |
+
142,
|
| 401 |
+
90,
|
| 402 |
+
825,
|
| 403 |
+
137
|
| 404 |
+
],
|
| 405 |
+
"page_idx": 3
|
| 406 |
+
},
|
| 407 |
+
{
|
| 408 |
+
"type": "text",
|
| 409 |
+
"text": "Regret as a model for human preference $P _ { r e g r e t }$ makes at least three assumptions worth noting. First, it keeps the assumption that human preferences follow a Boltzmann distribution over some statistic, which is a common model of choice behavior in economics and psychology, where it is called the Luce-Shepard choice rule $\\textcircled { 1 1 7 } , \\textcircled { 1 8 } \\textcircled { 1 }$ . Second, $P _ { r e g r e t }$ implicitly assumes humans can identify optimal and suboptimal segments when they see them, which will less true in domains where the human has less expertise. Lastly, $P _ { r e g r e t }$ assumes that in stochastic settings where the best outcome may only result from suboptimal decisions (e.g., buying a lottery ticket), humans instead prefer optimal decisions. We suspect humans are capable of expressing either type of preference—based on decision quality or desirability of outcomes—and can be influenced by training or the preference elicitation interface. In practice we determine that the regret model produces improvements over the partial-return model (Section 6), and its assumptions represent an opportunity for follow-up research. ",
|
| 410 |
+
"bbox": [
|
| 411 |
+
158,
|
| 412 |
+
143,
|
| 413 |
+
826,
|
| 414 |
+
310
|
| 415 |
+
],
|
| 416 |
+
"page_idx": 3
|
| 417 |
+
},
|
| 418 |
+
{
|
| 419 |
+
"type": "text",
|
| 420 |
+
"text": "Alternative methods for learning reward functions Other methods for learning reward functions include inverse reinforcement learning from demonstrations [19, 20] (discussed in Appendix B.5) and inverse reward design from trial-and-error reward design in multiple instances of a task domain [21]. ",
|
| 421 |
+
"bbox": [
|
| 422 |
+
171,
|
| 423 |
+
316,
|
| 424 |
+
825,
|
| 425 |
+
362
|
| 426 |
+
],
|
| 427 |
+
"page_idx": 3
|
| 428 |
+
},
|
| 429 |
+
{
|
| 430 |
+
"type": "text",
|
| 431 |
+
"text": "3 Theoretical comparisons ",
|
| 432 |
+
"text_level": 1,
|
| 433 |
+
"bbox": [
|
| 434 |
+
161,
|
| 435 |
+
376,
|
| 436 |
+
410,
|
| 437 |
+
393
|
| 438 |
+
],
|
| 439 |
+
"page_idx": 3
|
| 440 |
+
},
|
| 441 |
+
{
|
| 442 |
+
"type": "text",
|
| 443 |
+
"text": "In this section, we consider how different ways of generating preferences affect reward inference, setting aside whether humans can be influenced to give preferences in accordance with a specific preference method. In economic terms, this analysis—and all of our analyses with synthetic preferences—could be considered a normative analysis. In artificial intelligence, this analysis might be cast as a step towards defining criteria for a rational preference model. ",
|
| 444 |
+
"bbox": [
|
| 445 |
+
173,
|
| 446 |
+
406,
|
| 447 |
+
825,
|
| 448 |
+
483
|
| 449 |
+
],
|
| 450 |
+
"page_idx": 3
|
| 451 |
+
},
|
| 452 |
+
{
|
| 453 |
+
"type": "text",
|
| 454 |
+
"text": "Definition 3.1 (An identifiable preference model). For a preference model $P$ , assume an infinite dataset $D _ { \\succ }$ of $\\dot { n }$ -length pairs of segments is constructed by repeatedly choosing $\\left( \\sigma _ { 1 } , \\sigma _ { 2 } \\right)$ and sampling a label $\\mu \\sim P ( \\sigma _ { 1 } \\succ \\sigma _ { 2 } | r )$ , using $P$ as a preference generator. Further assume that in this dataset, all possible $n$ -length segment pairs appear infinitely many times. For some $M D P \\backslash r M$ , let $M _ { \\tilde { r } }$ be $M$ with the reward function $\\tilde { r }$ . Let $\\Pi _ { \\tilde { r } } ^ { * }$ be the set of optimal policies in $M _ { \\tilde { r } }$ . Let reward-equivalence class R be the set of all reward functions such that if ${ \\dot { r } } _ { 1 } , r _ { 2 } \\in \\Re$ then $\\Pi _ { r _ { 1 } } ^ { * } = \\Pi _ { r _ { 2 } } ^ { * }$ . Preference model $P$ is identifiable if, for any choice of $n$ and $M _ { r }$ , any $\\hat { r } = a r g m i n _ { \\tilde { r } , D _ { \\sim } } [ l o s s ( \\tilde { r } ) ] .$ —for the cross-entropy loss $( E q n . \\bigtriangledown )$ with $P$ as the preference model—is in the same reward equivalence class as $r$ . I.e., $\\Pi _ { r } ^ { * } { = } \\Pi _ { \\hat { r } } ^ { * }$ . ",
|
| 455 |
+
"bbox": [
|
| 456 |
+
173,
|
| 457 |
+
487,
|
| 458 |
+
825,
|
| 459 |
+
609
|
| 460 |
+
],
|
| 461 |
+
"page_idx": 3
|
| 462 |
+
},
|
| 463 |
+
{
|
| 464 |
+
"type": "text",
|
| 465 |
+
"text": "Theorem 3.1 $P _ { r e g r e t }$ is identifiable). Let $P _ { r e g r e t }$ be any function such that if regret $( \\sigma _ { 1 } | \\tilde { r } ) <$ regret $( \\sigma _ { 2 } | \\tilde { r } )$ , $P _ { r e g r e t } ( \\sigma _ { 1 } \\succ \\sigma _ { 2 } | \\tilde { r } ) > 0 . 5 $ , and if regret $( \\sigma _ { 1 } | \\tilde { r } ) = r e g r e t ( \\sigma _ { 2 } | \\tilde { r } )$ , $P _ { r e g r e t } ( \\sigma _ { 1 } \\succ \\sigma _ { 2 } | \\tilde { r } ) =$ 0.5. $P _ { r e g r e t }$ is identifiable. ",
|
| 466 |
+
"bbox": [
|
| 467 |
+
166,
|
| 468 |
+
613,
|
| 469 |
+
825,
|
| 470 |
+
659
|
| 471 |
+
],
|
| 472 |
+
"page_idx": 3
|
| 473 |
+
},
|
| 474 |
+
{
|
| 475 |
+
"type": "text",
|
| 476 |
+
"text": "This class of regret preference models includes but is not limited to the Boltzmann distribution of Eqn. 5 and the narrower class that Theorem $3 . 1$ focuses upon. ",
|
| 477 |
+
"bbox": [
|
| 478 |
+
165,
|
| 479 |
+
662,
|
| 480 |
+
823,
|
| 481 |
+
694
|
| 482 |
+
],
|
| 483 |
+
"page_idx": 3
|
| 484 |
+
},
|
| 485 |
+
{
|
| 486 |
+
"type": "text",
|
| 487 |
+
"text": "154 Theorem 3.2 (Noiseless $P _ { \\Sigma _ { r } }$ is not identifiable). Let $P _ { \\Sigma _ { r } }$ be any function such that if $\\Sigma _ { \\sigma _ { 1 } } \\tilde { r } > \\Sigma _ { \\sigma _ { 2 } } \\tilde { r }$ , \n155 $P _ { \\Sigma _ { r } } ( \\sigma _ { 1 } \\succ \\sigma _ { 2 } | \\tilde { r } ) = 1 _ { \\tilde { \\mathbf { \\Sigma } } }$ , and if $\\Sigma _ { \\sigma _ { 1 } } \\tilde { r } { = } \\Sigma _ { \\sigma _ { 2 } } \\tilde { r }$ , $P _ { \\Sigma _ { r } } ( \\sigma _ { 1 } \\succ \\sigma _ { 2 } | \\tilde { r } ) = 0 . 5 .$ . There exists an MDP in which $P _ { \\Sigma _ { r } }$ is \n156 not identifiable. \n157 Appendix $\\mathbf { C }$ contains a proof of Theorem $\\underline { { \\boldsymbol { \\left. 3 . 1 \\right. } } }$ and two proofs by example for Theorem $\\underline { { \\boldsymbol { \\mathfrak { B . 2 } } } } \\flat$ each \n158 focusing on a different weakness of $P _ { \\Sigma _ { r } }$ .The first proof by example reveals issues when learning \n159 reward functions with stochastic transitions with either $P _ { \\Sigma _ { r } }$ or deterministic $P _ { r e g r e t _ { d } }$ . These issues \n160 directly correspond to the need for preferences over distributions over outcomes (i.e., lotteries) to \n161 construct a cardinal utility function (see Russell and Norvig $\\mathbb { \\left[ \\left[ 2 2 \\right] \\right. }$ Ch. 16]). Note that the noiseless \n162 version of $P _ { \\Sigma _ { r } }$ in Theorem $\\boxed { 3 . 2 }$ is achieved in the limit as reward values are scaled higher; equivalently, \n163 one could include a Boltzmann temperature parameter in Equation 2 and scale it towards 0. Intuitively, \n164 Theorem $3 . 2$ says that $P _ { \\Sigma _ { r } }$ is not identifiable without the distribution over preferences providing \n165 information about the proportions of rewards with respect to each other. In contrast, to be identifiable, \n166 the regret preference model does not require this preference error (though it can presumably benefit \n167 from it in certain contexts). ",
|
| 488 |
+
"bbox": [
|
| 489 |
+
142,
|
| 490 |
+
698,
|
| 491 |
+
826,
|
| 492 |
+
743
|
| 493 |
+
],
|
| 494 |
+
"page_idx": 3
|
| 495 |
+
},
|
| 496 |
+
{
|
| 497 |
+
"type": "text",
|
| 498 |
+
"text": "",
|
| 499 |
+
"bbox": [
|
| 500 |
+
140,
|
| 501 |
+
747,
|
| 502 |
+
826,
|
| 503 |
+
914
|
| 504 |
+
],
|
| 505 |
+
"page_idx": 3
|
| 506 |
+
},
|
| 507 |
+
{
|
| 508 |
+
"type": "text",
|
| 509 |
+
"text": "168 4 Creating a human-labeled preference dataset ",
|
| 510 |
+
"text_level": 1,
|
| 511 |
+
"bbox": [
|
| 512 |
+
142,
|
| 513 |
+
89,
|
| 514 |
+
578,
|
| 515 |
+
107
|
| 516 |
+
],
|
| 517 |
+
"page_idx": 4
|
| 518 |
+
},
|
| 519 |
+
{
|
| 520 |
+
"type": "text",
|
| 521 |
+
"text": "9 To empirically investigate the consequences of each preference model when learning reward from 0 human preferences, we created a preference dataset labeled by human subjects via Amazon Mechanical Turk. This data collection was IRB-approved. Appendix D adds detail to the content below. ",
|
| 522 |
+
"bbox": [
|
| 523 |
+
158,
|
| 524 |
+
122,
|
| 525 |
+
825,
|
| 526 |
+
167
|
| 527 |
+
],
|
| 528 |
+
"page_idx": 4
|
| 529 |
+
},
|
| 530 |
+
{
|
| 531 |
+
"type": "text",
|
| 532 |
+
"text": "72 4.1 The general delivery domain ",
|
| 533 |
+
"text_level": 1,
|
| 534 |
+
"bbox": [
|
| 535 |
+
151,
|
| 536 |
+
184,
|
| 537 |
+
410,
|
| 538 |
+
199
|
| 539 |
+
],
|
| 540 |
+
"page_idx": 4
|
| 541 |
+
},
|
| 542 |
+
{
|
| 543 |
+
"type": "text",
|
| 544 |
+
"text": "173 The delivery domain consists of a grid of cells, each of a specific road surface type. The delivery agent’s \n174 state is its location. The agent’s action space is moving one cell in one of the four cardinal directions. \n175 The episode can terminate either at the destination for $+ 5 0$ reward or in failure at a sheep for $- 5 0$ \n176 reward. The reward for a non-terminal transition is the sum of any reward components. Cells with a \n177 white road surface have a $- 1$ reward component, and cells with brick surface have a $- 2$ component. \n178 Additionally, each cell may contain a coin $( + 1 )$ or a roadblock $( - 1 )$ . Coins do not disappear and at \n179 best cancel out the road surface cost. Actions that would move the agent into a house or beyond the \n180 grid’s perimeter result in no motion and receive reward that includes the current cell’s surface reward \n181 component but not any coin or roadblock components. In this work, the start state distribution, $D _ { 0 }$ , is \n182 always uniformly random over non-terminal states. This domain was designed to permit subjects to \n183 easily identify bad behavior yet also to be difficult for them to determine optimal behavior from most \n184 states, which is representative of many common tasks. ",
|
| 545 |
+
"bbox": [
|
| 546 |
+
142,
|
| 547 |
+
212,
|
| 548 |
+
826,
|
| 549 |
+
392
|
| 550 |
+
],
|
| 551 |
+
"page_idx": 4
|
| 552 |
+
},
|
| 553 |
+
{
|
| 554 |
+
"type": "text",
|
| 555 |
+
"text": "4.1.1 The delivery task ",
|
| 556 |
+
"text_level": 1,
|
| 557 |
+
"bbox": [
|
| 558 |
+
173,
|
| 559 |
+
410,
|
| 560 |
+
343,
|
| 561 |
+
425
|
| 562 |
+
],
|
| 563 |
+
"page_idx": 4
|
| 564 |
+
},
|
| 565 |
+
{
|
| 566 |
+
"type": "text",
|
| 567 |
+
"text": "We chose one instantiation of the delivery domain for gathering our dataset of human preferences. This specific MDP has a $1 0 \\times 1 0$ grid. From every state, the highest return possible involves reaching the goal, rather than hitting a sheep or perpetually avoiding termination. Figure 2 shows this task. ",
|
| 568 |
+
"bbox": [
|
| 569 |
+
173,
|
| 570 |
+
436,
|
| 571 |
+
563,
|
| 572 |
+
512
|
| 573 |
+
],
|
| 574 |
+
"page_idx": 4
|
| 575 |
+
},
|
| 576 |
+
{
|
| 577 |
+
"type": "text",
|
| 578 |
+
"text": "4.2 The user interface and survey ",
|
| 579 |
+
"text_level": 1,
|
| 580 |
+
"bbox": [
|
| 581 |
+
165,
|
| 582 |
+
531,
|
| 583 |
+
415,
|
| 584 |
+
545
|
| 585 |
+
],
|
| 586 |
+
"page_idx": 4
|
| 587 |
+
},
|
| 588 |
+
{
|
| 589 |
+
"type": "text",
|
| 590 |
+
"text": "This subsection describes the three main stages of the experimental session. A video showing the full experimental protocol can be seen at bit.ly/humanprefs. ",
|
| 591 |
+
"bbox": [
|
| 592 |
+
174,
|
| 593 |
+
559,
|
| 594 |
+
562,
|
| 595 |
+
604
|
| 596 |
+
],
|
| 597 |
+
"page_idx": 4
|
| 598 |
+
},
|
| 599 |
+
{
|
| 600 |
+
"type": "image",
|
| 601 |
+
"img_path": "images/d22635a19a01e2310799f31252c06d77703e6bde0883dfb331f3f0b8968548ef.jpg",
|
| 602 |
+
"image_caption": [
|
| 603 |
+
"Figure 2: The delivery task used to gather human preferences. The yellow van is the agent and the red inverted teardrop is the destination. "
|
| 604 |
+
],
|
| 605 |
+
"image_footnote": [],
|
| 606 |
+
"bbox": [
|
| 607 |
+
578,
|
| 608 |
+
410,
|
| 609 |
+
820,
|
| 610 |
+
598
|
| 611 |
+
],
|
| 612 |
+
"page_idx": 4
|
| 613 |
+
},
|
| 614 |
+
{
|
| 615 |
+
"type": "text",
|
| 616 |
+
"text": "Teaching subjects about the task Subjects first view instructions describing the general domain. To avoid the jargon of “return” and “reward,” these terms are mapped to equivalent values in US dollars, and the instructions describe the goal of the task as maximizing the delivery vehicle’s financial outcome, where the reward components are specific financial impacts. This information is shared amongst interspersed interactive episodes, in which the subject controls the agent in domain maps that are each designed to teach one or two concepts. Our intention during this stage is to inform the later preferences of the subject by teaching them about the domain’s dynamics and its reward function, as well as to develop the subject’s sense of how desirable various behaviors are. At the end of this stage, the subject controls the agent for two episodes in the specific delivery task shown in Figure 2. ",
|
| 617 |
+
"bbox": [
|
| 618 |
+
174,
|
| 619 |
+
611,
|
| 620 |
+
562,
|
| 621 |
+
671
|
| 622 |
+
],
|
| 623 |
+
"page_idx": 4
|
| 624 |
+
},
|
| 625 |
+
{
|
| 626 |
+
"type": "text",
|
| 627 |
+
"text": "",
|
| 628 |
+
"bbox": [
|
| 629 |
+
173,
|
| 630 |
+
671,
|
| 631 |
+
826,
|
| 632 |
+
777
|
| 633 |
+
],
|
| 634 |
+
"page_idx": 4
|
| 635 |
+
},
|
| 636 |
+
{
|
| 637 |
+
"type": "text",
|
| 638 |
+
"text": "Preference elicitation After each subject is trained to understand the task, they indicate their preferences between 40–50 randomly-ordered pairs of segments, using the interface shown in Figure 3. The users select a preference, no preference (“same\"), or “can’t tell”. In this work, we exclude responses labeled “can’t tell”, though one might alternatively try to extract information from these responses. ",
|
| 639 |
+
"bbox": [
|
| 640 |
+
173,
|
| 641 |
+
784,
|
| 642 |
+
825,
|
| 643 |
+
844
|
| 644 |
+
],
|
| 645 |
+
"page_idx": 4
|
| 646 |
+
},
|
| 647 |
+
{
|
| 648 |
+
"type": "text",
|
| 649 |
+
"text": "Users’ task comprehension Subjects then answered questions testing their understanding of the task, and we removed their data if they scored poorly. We also removed a subject’s data if they preferred colliding the vehicle into a sheep over not doing so, which we interpreted as poor task understanding or inattentiveness. This filtered dataset contains 1812 preferences from 50 subjects. ",
|
| 650 |
+
"bbox": [
|
| 651 |
+
165,
|
| 652 |
+
851,
|
| 653 |
+
825,
|
| 654 |
+
911
|
| 655 |
+
],
|
| 656 |
+
"page_idx": 4
|
| 657 |
+
},
|
| 658 |
+
{
|
| 659 |
+
"type": "text",
|
| 660 |
+
"text": "We collected human preferences in two stages, each with different methods for selecting which segment pairs to present for labeling. The second stage’s sole purpose was to improve the reward-learning performance of $P _ { \\Sigma _ { r } }$ . Without second-stage data, $P _ { \\Sigma _ { r } }$ compared even worse to $P _ { r e g r e t }$ than in the results described in Section $\\boxed { 6 }$ (see Appendix ??). Both stages’ ",
|
| 661 |
+
"bbox": [
|
| 662 |
+
158,
|
| 663 |
+
121,
|
| 664 |
+
356,
|
| 665 |
+
330
|
| 666 |
+
],
|
| 667 |
+
"page_idx": 5
|
| 668 |
+
},
|
| 669 |
+
{
|
| 670 |
+
"type": "image",
|
| 671 |
+
"img_path": "images/922a50393e0a06c6b0ae1cbc67bb91b225cff0192783483533fcd29806df996a.jpg",
|
| 672 |
+
"image_caption": [
|
| 673 |
+
"Figure 3: Interface shown to subjects during preference elicitation. "
|
| 674 |
+
],
|
| 675 |
+
"image_footnote": [],
|
| 676 |
+
"bbox": [
|
| 677 |
+
374,
|
| 678 |
+
113,
|
| 679 |
+
820,
|
| 680 |
+
299
|
| 681 |
+
],
|
| 682 |
+
"page_idx": 5
|
| 683 |
+
},
|
| 684 |
+
{
|
| 685 |
+
"type": "text",
|
| 686 |
+
"text": "229 data are combined and used as a single dataset. These methods and their justification are described in \n230 Appendix D.3. ",
|
| 687 |
+
"bbox": [
|
| 688 |
+
151,
|
| 689 |
+
332,
|
| 690 |
+
825,
|
| 691 |
+
363
|
| 692 |
+
],
|
| 693 |
+
"page_idx": 5
|
| 694 |
+
},
|
| 695 |
+
{
|
| 696 |
+
"type": "text",
|
| 697 |
+
"text": "5 Descriptive results ",
|
| 698 |
+
"text_level": 1,
|
| 699 |
+
"bbox": [
|
| 700 |
+
156,
|
| 701 |
+
383,
|
| 702 |
+
359,
|
| 703 |
+
400
|
| 704 |
+
],
|
| 705 |
+
"page_idx": 5
|
| 706 |
+
},
|
| 707 |
+
{
|
| 708 |
+
"type": "text",
|
| 709 |
+
"text": "This section considers how well different preference models explain our dataset of human preferences. ",
|
| 710 |
+
"bbox": [
|
| 711 |
+
173,
|
| 712 |
+
419,
|
| 713 |
+
486,
|
| 714 |
+
463
|
| 715 |
+
],
|
| 716 |
+
"page_idx": 5
|
| 717 |
+
},
|
| 718 |
+
{
|
| 719 |
+
"type": "text",
|
| 720 |
+
"text": "5 5.1 Correlations between preferences and segment statistics ",
|
| 721 |
+
"text_level": 1,
|
| 722 |
+
"bbox": [
|
| 723 |
+
156,
|
| 724 |
+
484,
|
| 725 |
+
468,
|
| 726 |
+
513
|
| 727 |
+
],
|
| 728 |
+
"page_idx": 5
|
| 729 |
+
},
|
| 730 |
+
{
|
| 731 |
+
"type": "text",
|
| 732 |
+
"text": "We hypothesize that the values of segments’ start and end states—which are included in $P _ { r e g r e t }$ but not in $P _ { \\Sigma }$ —affect human preferences, independent of partial return. To simplify analysis, we combine the two parts of $r e g r e t _ { \\mathrm { d } } ( \\sigma | \\boldsymbol { r } )$ that are additional to $\\Sigma _ { \\sigma } \\tilde { r }$ and introduce the following shorthand: $\\Delta _ { \\sigma } V _ { \\tilde { r } } \\triangleq V _ { \\tilde { r } } ^ { \\ast } \\big ( s _ { \\sigma , | \\sigma | } \\big ) - V _ { \\tilde { r } } ^ { \\ast } \\big ( s _ { \\sigma , 0 } \\big )$ Note that with an algebraic manipulation (see Appendix $\\mathbf { E . 1 } )$ , $\\begin{array} { r l } { r e g r e t _ { \\mathrm { d } } ( \\sigma _ { 2 } | \\tilde { r } ) - r e g r e t _ { \\mathrm { d } } ( \\sigma _ { 1 } | \\tilde { r } ) = } \\end{array}$ $\\left( \\Delta _ { \\sigma _ { 1 } } V _ { \\tilde { r } } - \\Delta _ { \\sigma _ { 2 } } V _ { \\tilde { r } } \\right) + \\left( \\Sigma _ { \\sigma _ { 1 } } \\tilde { r } - \\Sigma _ { \\sigma _ { 2 } } \\tilde { r } \\right)$ . Therefore, on the diagonal line in Figure 4, $r e g r e t _ { \\mathrm { d } } ( \\sigma _ { 2 } | \\boldsymbol { r } ) =$ $r e g r e t _ { \\mathrm { d } } ( \\sigma _ { 1 } | \\boldsymbol { r } )$ , making the $P _ { r e g r e t _ { d } }$ preference model indifferent. ",
|
| 733 |
+
"bbox": [
|
| 734 |
+
174,
|
| 735 |
+
527,
|
| 736 |
+
485,
|
| 737 |
+
694
|
| 738 |
+
],
|
| 739 |
+
"page_idx": 5
|
| 740 |
+
},
|
| 741 |
+
{
|
| 742 |
+
"type": "image",
|
| 743 |
+
"img_path": "images/5adfb7ffc8b9ef1ea5bcdc7175f3437282c564b4ab3b5935c8a3bbdca9530e6d.jpg",
|
| 744 |
+
"image_caption": [
|
| 745 |
+
"Figure 4: Proportions at which subjects preferred each segment in a pair, plotted by the difference in the segments’ changes in state values ( $\\mathbf { \\dot { x } }$ -axis) and partial returns (y-axis). The diagonal line shows points of preference indifference for $P _ { r e g r e t }$ . Points of indifference for $P _ { \\Sigma }$ lie on the $\\mathbf { X }$ -axis. The shaded gray area indicates where the two models disagree, each giving a different segment a preference probability greater than 0.5. Each circle’s area is proportional to the number of samples it describes. "
|
| 746 |
+
],
|
| 747 |
+
"image_footnote": [],
|
| 748 |
+
"bbox": [
|
| 749 |
+
498,
|
| 750 |
+
382,
|
| 751 |
+
821,
|
| 752 |
+
531
|
| 753 |
+
],
|
| 754 |
+
"page_idx": 5
|
| 755 |
+
},
|
| 756 |
+
{
|
| 757 |
+
"type": "text",
|
| 758 |
+
"text": "",
|
| 759 |
+
"bbox": [
|
| 760 |
+
173,
|
| 761 |
+
694,
|
| 762 |
+
598,
|
| 763 |
+
709
|
| 764 |
+
],
|
| 765 |
+
"page_idx": 5
|
| 766 |
+
},
|
| 767 |
+
{
|
| 768 |
+
"type": "text",
|
| 769 |
+
"text": "The dataset of preferences is visualized in Figure $\\mathbb { E }$ This plot shows how $\\Delta _ { \\sigma } V _ { r }$ has influence independent of partial return by focusing only on points at a chosen $y$ -axis value; if the colors along the corresponding horizontal line reddens as the $x$ -axis value increases, then $\\Delta _ { \\sigma } V _ { r }$ appears to have independent influence. To statistically test for independent influence of $\\Delta _ { \\sigma } V _ { r }$ on preferences, we consider subsets of data where $\\Sigma _ { \\sigma _ { 1 } } r - \\Sigma _ { \\sigma _ { 2 } } r$ is constant. For $\\Sigma _ { \\sigma _ { 1 } } r - \\Sigma _ { \\sigma _ { 2 } } r = - 1$ and $\\Sigma _ { \\sigma _ { 1 } } r - \\Sigma _ { \\sigma _ { 2 } } r = - 2$ , the only values with ",
|
| 770 |
+
"bbox": [
|
| 771 |
+
171,
|
| 772 |
+
715,
|
| 773 |
+
591,
|
| 774 |
+
837
|
| 775 |
+
],
|
| 776 |
+
"page_idx": 5
|
| 777 |
+
},
|
| 778 |
+
{
|
| 779 |
+
"type": "table",
|
| 780 |
+
"img_path": "images/d0f698a2b2e259f1f36c853ce1b3701d0dce3a48484d82c3a1e981e5cc913d61.jpg",
|
| 781 |
+
"table_caption": [],
|
| 782 |
+
"table_footnote": [],
|
| 783 |
+
"table_body": "<table><tr><td>Preference model</td><td>Loss</td></tr><tr><td>P(·)=0.5 (uninformed)</td><td>0.69</td></tr><tr><td>Pε, (partial return)</td><td>0.62</td></tr><tr><td>Pregret</td><td>0.57</td></tr></table>",
|
| 784 |
+
"bbox": [
|
| 785 |
+
604,
|
| 786 |
+
718,
|
| 787 |
+
818,
|
| 788 |
+
771
|
| 789 |
+
],
|
| 790 |
+
"page_idx": 5
|
| 791 |
+
},
|
| 792 |
+
{
|
| 793 |
+
"type": "text",
|
| 794 |
+
"text": "Table 1: Mean cross-entropy test loss over 10-fold cross validation $( \\mathrm { n } { = } 1 8 1 2 )$ from predicting human preferences. Lower is better. ",
|
| 795 |
+
"bbox": [
|
| 796 |
+
602,
|
| 797 |
+
775,
|
| 798 |
+
825,
|
| 799 |
+
825
|
| 800 |
+
],
|
| 801 |
+
"page_idx": 5
|
| 802 |
+
},
|
| 803 |
+
{
|
| 804 |
+
"type": "text",
|
| 805 |
+
"text": "more than 30 samples that also include informative samples with both negative and positive values of $r e g r e t ( \\sigma _ { 1 } | r ) - r e g r e t ( \\sigma _ { 2 } | r )$ , the Spearman’s rank correlations between $\\Delta _ { \\sigma } V _ { r }$ and the preferences are significant ( $_ { r > = 0 . 3 }$ , $p { < } 0 . 0 0 0 1$ ). This result indicates that $\\Delta _ { \\sigma } V _ { r }$ influences human preferences independent of partial return, validating our hypothesis that humans form preferences based on information about segments’ start states and end states, not only partial returns. ",
|
| 806 |
+
"bbox": [
|
| 807 |
+
169,
|
| 808 |
+
837,
|
| 809 |
+
825,
|
| 810 |
+
911
|
| 811 |
+
],
|
| 812 |
+
"page_idx": 5
|
| 813 |
+
},
|
| 814 |
+
{
|
| 815 |
+
"type": "text",
|
| 816 |
+
"text": "To examine how well each preference model predicts human preferences, we calculate the crossentropy loss for each model (Eqn. $^ { 1 ) }$ —i.e., the negative log likelihood—of the preferences in our dataset. Scaling reward by a constant factor does not affect the set of optimal policies. Therefore, throughout this work we ensure that our analyses of preference models are insensitive to reward scaling. To do so for this specific analysis, we conduct 10-fold cross validation to learn a reward scaling factor for each of $P _ { r e g r e t }$ and $P _ { \\Sigma _ { r } }$ . Table $^ 1$ shows that the loss of $P _ { r e g r e t }$ is lower than that of $P _ { \\Sigma _ { r } }$ , indicating that it is more reflective of how people actually express preferences. ",
|
| 817 |
+
"bbox": [
|
| 818 |
+
169,
|
| 819 |
+
119,
|
| 820 |
+
826,
|
| 821 |
+
227
|
| 822 |
+
],
|
| 823 |
+
"page_idx": 6
|
| 824 |
+
},
|
| 825 |
+
{
|
| 826 |
+
"type": "text",
|
| 827 |
+
"text": "270 6 Results from learning reward functions ",
|
| 828 |
+
"text_level": 1,
|
| 829 |
+
"bbox": [
|
| 830 |
+
142,
|
| 831 |
+
247,
|
| 832 |
+
531,
|
| 833 |
+
265
|
| 834 |
+
],
|
| 835 |
+
"page_idx": 6
|
| 836 |
+
},
|
| 837 |
+
{
|
| 838 |
+
"type": "text",
|
| 839 |
+
"text": "Analysis of a preference model’s predictions of human preferences is informative, but such predictions are a means to the ends of learning human-aligned reward functions and policies. We now examine each preference model’s performance on these ends. In all cases, we learn a reward function $\\hat { r }$ according to Eqn. 1 and apply value iteration $[ | 2 3 | ]$ to find the approximately optimal $Q _ { \\hat { r } } ^ { * }$ function. For this $Q _ { \\hat { r } } ^ { * }$ , we then evaluate the mean return of the maximum-entropy optimal policy—which chooses uniformly randomly among all optimal actions—with respect to the ground-truth reward function $r$ , over $D _ { 0 }$ . To compare performance across different MDPs, the mean return of a policy $\\pi$ , $V _ { r } ^ { \\pi }$ , is normalized to $( V _ { r } ^ { \\pi } - V _ { r } ^ { \\bar { U } } ) / V _ { r } ^ { * }$ , where $V _ { r } ^ { * }$ is the optimal expected return and $V _ { r } ^ { U }$ is the expected return of the uniformly random policy (both given $D _ { 0 }$ ). Normalized mean return above 0 is better than $V _ { r } ^ { U }$ . Optimal policies have a normalized mean return of 1, and we consider above 0.9 to be near optimal. ",
|
| 840 |
+
"bbox": [
|
| 841 |
+
140,
|
| 842 |
+
282,
|
| 843 |
+
826,
|
| 844 |
+
434
|
| 845 |
+
],
|
| 846 |
+
"page_idx": 6
|
| 847 |
+
},
|
| 848 |
+
{
|
| 849 |
+
"type": "text",
|
| 850 |
+
"text": "81 6.1 An algorithm to learn reward functions with regret $( \\sigma _ { \\sigma } | \\hat { r } )$ ",
|
| 851 |
+
"text_level": 1,
|
| 852 |
+
"bbox": [
|
| 853 |
+
155,
|
| 854 |
+
454,
|
| 855 |
+
607,
|
| 856 |
+
469
|
| 857 |
+
],
|
| 858 |
+
"page_idx": 6
|
| 859 |
+
},
|
| 860 |
+
{
|
| 861 |
+
"type": "text",
|
| 862 |
+
"text": "Algorithm $^ 1$ is a general algorithm for learning a linear reward function according to $P _ { r e g r e t }$ . This regret-specific algorithm only changes the regret-based algorithm from Section $2 . 2$ by replacing Equation $\\boxed { 5 }$ with a tractable approximation of regret, avoiding expensive repeated evaluation of $V _ { \\hat { r } } ^ { * } ( \\cdot )$ and $Q _ { \\hat { r } } ^ { * } ( \\cdot , \\cdot )$ to compute $P _ { r e g r e t } ( \\cdot | \\hat { r } )$ during reward learning. Specifically, successor features for a set of policies are used to approximate the optimal state values and state-action values for any reward function. ",
|
| 863 |
+
"bbox": [
|
| 864 |
+
171,
|
| 865 |
+
483,
|
| 866 |
+
825,
|
| 867 |
+
574
|
| 868 |
+
],
|
| 869 |
+
"page_idx": 6
|
| 870 |
+
},
|
| 871 |
+
{
|
| 872 |
+
"type": "text",
|
| 873 |
+
"text": "Approximating $P _ { r e g r e t }$ with successor features Following the notation of Barreto et al. $\\mathbb { \\lVert 2 4 \\rVert }$ , assume the ground-truth reward is linear with respect to a feature vector extracted by $\\phi : S \\times A \\times S \\to \\mathbb { R } ^ { d }$ and a weight vector $\\pmb { w _ { r } } \\in \\mathbb { R } ^ { d } ; \\ : r ( s , a , s ^ { \\prime } ) = \\phi ( s , a , s ^ { \\prime } ) ^ { \\top } \\pmb { w _ { r } }$ . During learning, ${ \\pmb w } _ { \\hat { \\pmb r } }$ similarly expresses $\\hat { r }$ as $\\hat { r } ( s , a , s ^ { \\prime } ) = \\phi ( s , a , s ^ { \\prime } ) ^ { \\top } \\pmb { w } _ { \\hat { r } }$ . ",
|
| 874 |
+
"bbox": [
|
| 875 |
+
171,
|
| 876 |
+
580,
|
| 877 |
+
825,
|
| 878 |
+
642
|
| 879 |
+
],
|
| 880 |
+
"page_idx": 6
|
| 881 |
+
},
|
| 882 |
+
{
|
| 883 |
+
"type": "text",
|
| 884 |
+
"text": "Given a policy $\\pi$ , the successor features for $^ { ( s , a ) }$ are the expectation of discounted reward features from that state-action pair when following $\\pi$ $\\begin{array} { r } { \\because \\psi _ { Q } ^ { \\pi } ( s , a ) = E ^ { \\pi } [ \\sum _ { i = t } ^ { \\infty } \\gamma ^ { i - t } \\phi ( s _ { t } , a _ { t } , s _ { t + 1 } ) | s _ { t } = s , a _ { t } = a ] } \\end{array}$ Therefore, $Q _ { \\hat { r } } ^ { \\pi } ( s , a ) = \\psi _ { Q } ^ { \\pi } \\left( s , a \\right) ^ { \\top } \\mathbf { \\boldsymbol { w } } _ { \\hat { r } }$ . Additionally, state-based successor features can be calculated from the $\\psi _ { Q } ^ { \\pi }$ above as $\\begin{array} { r } { \\psi _ { v } ^ { \\pi } \\left( s \\right) = \\sum _ { a \\in A } \\pi ( a | s ) \\psi _ { Q } ^ { \\pi } \\left( s , a \\right) } \\end{array}$ , making $V _ { \\hat { r } } ^ { \\pi } ( s ) = \\psi _ { v } ^ { \\pi } ( s ) ^ { \\top } \\pmb { w } _ { \\hat { r } } .$ . ",
|
| 885 |
+
"bbox": [
|
| 886 |
+
153,
|
| 887 |
+
647,
|
| 888 |
+
826,
|
| 889 |
+
715
|
| 890 |
+
],
|
| 891 |
+
"page_idx": 6
|
| 892 |
+
},
|
| 893 |
+
{
|
| 894 |
+
"type": "text",
|
| 895 |
+
"text": "Given a set $\\Psi _ { _ Q }$ of state-action successor feature functions and a set $\\Psi _ { \\scriptscriptstyle V }$ of state successor feature functions for various policies and given a reward function via ${ \\pmb w } _ { \\hat { r } }$ , $Q _ { \\hat { r } } ^ { \\pi ^ { * } } ( s , a ) { \\geq } m a x _ { \\psi _ { Q } \\in \\Psi _ { Q } } [ \\psi _ { Q } ^ { \\pi } ( s , a ) ^ { \\top } \\pmb { w } _ { \\hat { r } } ]$ and $V _ { \\hat { r } } ^ { \\pi ^ { * } } \\left( s \\right) \\geq m a x _ { \\psi _ { \\scriptstyle V } \\in \\Psi _ { V } } \\left[ \\psi _ { v } ^ { \\pi } \\left( s \\right) ^ { \\top } { \\pmb w } _ { \\hat { r } } \\right] \\left\\| 2 4 \\right\\|$ , so we use these two maximizations as approximations of $Q _ { \\hat { r } } ^ { * } ( s , a )$ and $V _ { \\hat { r } } ^ { * } ( s )$ , respectively. In practice, to enable gradient-based optimization with current tools, the maximization in this expression is replaced with the softmax-weighted average, making the loss function linear. Focusing first on the approximation of $V _ { \\hat { r } } ^ { * } ( s )$ , for each $\\psi _ { v } \\in \\Psi _ { V }$ , a softmax weight is calculated for $\\begin{array} { r } { \\psi _ { _ { V } } ^ { \\pi } ( s ) \\colon s o f i m a x _ { \\Psi } ( \\psi _ { _ { V } } ^ { \\pi } ( s ) ^ { \\top } \\pmb { w } _ { \\hat { r } } ) \\triangleq [ ( \\psi _ { _ { V } } ^ { \\pi } ( s ) ^ { \\top } \\pmb { w } _ { \\hat { r } } ) ^ { 1 / T } ] / [ ( \\dot { \\sum } _ { \\psi _ { _ { V } } ^ { \\prime } \\in \\Psi _ { _ { V } } } \\psi _ { _ { V } } ^ { \\prime \\pi } ( s ) ^ { \\top } \\pmb { w } _ { \\hat { r } } ) ^ { 1 / T } ] . } \\end{array}$ where temperature $T$ is a constant hyperparameter. The resulting approximation of $V _ { \\widehat { r } } ^ { * } ( s )$ is therefore defined as $\\begin{array} { r } { \\tilde { V } _ { \\hat { r } } ^ { * } ( s ) \\triangleq \\sum _ { \\pmb { \\psi } _ { V } \\in \\Psi _ { V } } s o f t m a x _ { \\Psi _ { V } } ( \\pmb { \\psi } _ { V } ^ { \\pi } ( s ) ^ { \\top } \\pmb { w } _ { \\hat { r } } ) [ \\pmb { \\psi } _ { V } ^ { \\pi } ( s ) ^ { \\top } \\pmb { w } _ { \\hat { r } } ] } \\end{array}$ . Similarly, to approxi \nmate 305 $\\begin{array} { r } { \\mathcal { Q } _ { \\vec { r } } ^ { * } ( s , a ) , s o f i m a x _ { \\Psi _ { Q } } ( \\psi _ { _ { Q } } ^ { \\pi } ( s , a ) ^ { \\top } \\pmb { w } _ { \\hat { r } } ) \\triangleq [ ( \\psi _ { _ { Q } } ^ { \\pi } ( s , a ) ^ { \\top } \\pmb { w } _ { \\hat { r } } ) ^ { 1 / T } ] / [ ( \\sum _ { \\psi _ { _ Q } ^ { \\prime } \\in \\Psi } \\psi _ { _ { Q } } ^ { \\prime \\pi } ( s , a ) ^ { \\top } \\pmb { w } _ { \\hat { r } } ) ^ { 1 / T } ] } \\end{array}$ \nand 306 $\\begin{array} { r } { \\tilde { Q } _ { \\hat { r } } ^ { * } ( s , a ) \\triangleq \\sum _ { \\psi _ { Q } \\in \\Psi _ { Q } } s o f t m a x _ { \\Psi _ { Q } } ( \\psi _ { Q } ^ { \\pi } ( s , a ) ^ { \\top } \\pmb { w } _ { \\hat { r } } ) [ \\psi _ { Q } ^ { \\pi } ( s , a ) ^ { \\top } \\pmb { w } _ { \\hat { r } } ] } \\end{array}$ . Consequently, from Eqns. 4 ",
|
| 896 |
+
"bbox": [
|
| 897 |
+
140,
|
| 898 |
+
719,
|
| 899 |
+
826,
|
| 900 |
+
916
|
| 901 |
+
],
|
| 902 |
+
"page_idx": 6
|
| 903 |
+
},
|
| 904 |
+
{
|
| 905 |
+
"type": "text",
|
| 906 |
+
"text": "1: Input: a set of reward functions and a set of policies (where one set can be $\\mathcal { D }$ ) \n2: $\\Psi \\emptyset$ \n3: for each reward function $r _ { S F }$ or policy $\\pi _ { S F }$ in the input sets do \n4: if $r _ { S F }$ then $\\pi _ { S F } $ estimate of optimal maximum-entropy policy for $r _ { S F }$ \n5: 6: add estimate $\\psi _ { Q } ^ { \\pi _ { S F } }$ $\\psi _ { Q } ^ { \\pi _ { S F } }$ Q to $\\Psi _ { _ Q }$ and n $\\psi _ { V } ^ { \\pi _ { S F } }$ (if not estimated already during step 4) \n7: add $\\psi _ { V } ^ { \\dot { \\pi } _ { S F } }$ to $\\Psi _ { \\scriptscriptstyle V }$ \n8: end for \n9: repeat \n10: optimize ${ \\pmb w } _ { \\hat { \\pmb r } }$ by loss of Eqn. 1, calculating $\\tilde { P } _ { r e g r e t } ( \\sigma _ { 1 } \\succ \\sigma _ { 2 } | \\hat { r } )$ via Eqn. $6 ,$ using $\\Psi _ { _ Q }$ and $\\Psi _ { \\scriptscriptstyle V }$ \n11: until stopping criteria are met \n12: return ${ \\pmb w } _ { \\hat { \\pmb r } }$ ",
|
| 907 |
+
"bbox": [
|
| 908 |
+
178,
|
| 909 |
+
108,
|
| 910 |
+
813,
|
| 911 |
+
284
|
| 912 |
+
],
|
| 913 |
+
"page_idx": 7
|
| 914 |
+
},
|
| 915 |
+
{
|
| 916 |
+
"type": "text",
|
| 917 |
+
"text": "and307 $\\cdot 5 ,$ the corresponding approximation $\\tilde { P } _ { r e g r e t }$ of the regret preference model is: ",
|
| 918 |
+
"bbox": [
|
| 919 |
+
143,
|
| 920 |
+
310,
|
| 921 |
+
700,
|
| 922 |
+
329
|
| 923 |
+
],
|
| 924 |
+
"page_idx": 7
|
| 925 |
+
},
|
| 926 |
+
{
|
| 927 |
+
"type": "equation",
|
| 928 |
+
"img_path": "images/db0742627a2e3d04731b283589814e0492b34f29b9de6dffe29d7ae1e9211896.jpg",
|
| 929 |
+
"text": "$$\n\\begin{array} { r } { \\tilde { P } _ { r e g r e t } ( \\sigma _ { 1 } \\succ \\sigma _ { 2 } | \\hat { r } ) = l o g i s t i c \\biggl ( \\sum _ { t = 0 } ^ { | \\sigma _ { 2 } | \\cdot 1 } \\left[ \\tilde { V } _ { \\hat { r } } ^ { * } ( s _ { \\sigma _ { 2 } , t } ) - \\tilde { Q } _ { \\hat { r } } ^ { * } ( s _ { \\sigma _ { 2 } , t } , a _ { \\sigma _ { 2 } , t } ) \\right] - \\sum _ { t = 0 } ^ { | \\sigma _ { 1 } | \\cdot 1 } \\left[ \\tilde { V } _ { \\hat { r } } ^ { * } ( s _ { \\sigma _ { 1 } , t } ) - \\tilde { Q } _ { \\hat { r } } ^ { * } ( s _ { \\sigma _ { 1 } , t } , a _ { \\sigma _ { 1 } , t } ) \\right] \\biggr ) } \\end{array}\n$$",
|
| 930 |
+
"text_format": "latex",
|
| 931 |
+
"bbox": [
|
| 932 |
+
166,
|
| 933 |
+
338,
|
| 934 |
+
782,
|
| 935 |
+
369
|
| 936 |
+
],
|
| 937 |
+
"page_idx": 7
|
| 938 |
+
},
|
| 939 |
+
{
|
| 940 |
+
"type": "text",
|
| 941 |
+
"text": "308 The algorithm In Algorithm $\\underline { { \\left. 1 , \\right. } }$ lines 9–12 describe the supervised-learning optimization using \n309 the approximation $\\tilde { P } _ { r e g r e t }$ , and the prior lines create $\\Psi _ { _ Q }$ and $\\Psi _ { \\scriptscriptstyle V }$ . Specifically, given a set of reward \n310 functions, a corresponding set of policies is created (line 4), where each policy is an estimate of the \n311 maximum entropy policy for a reward function. Standard policy improvement methods can be used to \n312 create each such policy. Alternatively, some or all of the set of policies can be given as input directly, \n313 not derived from input reward functions. For each such policy $\\pi _ { S F }$ , successor feature functions $\\Psi _ { Q _ { - } } ^ { \\pi _ { S F } }$ \n314 and $\\Psi _ { V } ^ { \\pi _ { S F } }$ are estimated (line 5), which by default would be performed by a minor extension of a \n315 standard policy evaluation algorithm as detailed by Barreto et al. $[ [ 2 4 ]$ . Note that the reward function \n316 that is ultimately learned is not restricted to be in the input set of reward functions, which is used only \n317 to create an approximation of regret. ",
|
| 942 |
+
"bbox": [
|
| 943 |
+
142,
|
| 944 |
+
383,
|
| 945 |
+
826,
|
| 946 |
+
536
|
| 947 |
+
],
|
| 948 |
+
"page_idx": 7
|
| 949 |
+
},
|
| 950 |
+
{
|
| 951 |
+
"type": "text",
|
| 952 |
+
"text": "The details of our instantiation of Algorithm 1 for the delivery domain can be found in Appendix F. \nalong with guidance for extending it to reward functions that might be non-linear. ",
|
| 953 |
+
"bbox": [
|
| 954 |
+
173,
|
| 955 |
+
542,
|
| 956 |
+
812,
|
| 957 |
+
573
|
| 958 |
+
],
|
| 959 |
+
"page_idx": 7
|
| 960 |
+
},
|
| 961 |
+
{
|
| 962 |
+
"type": "text",
|
| 963 |
+
"text": "6.2 Results from synthetic preferences ",
|
| 964 |
+
"text_level": 1,
|
| 965 |
+
"bbox": [
|
| 966 |
+
171,
|
| 967 |
+
590,
|
| 968 |
+
449,
|
| 969 |
+
606
|
| 970 |
+
],
|
| 971 |
+
"page_idx": 7
|
| 972 |
+
},
|
| 973 |
+
{
|
| 974 |
+
"type": "text",
|
| 975 |
+
"text": "Before considering human preferences, we first ask how each preference model performs when it is correct. In other words, we investigate empirically how well the preference model could perform if humans perfectly adhered to it. Recall that the ground-truth reward function, $r$ , is used to create these preferences but is inaccessible to the reward-learning algorithms. ",
|
| 976 |
+
"bbox": [
|
| 977 |
+
173,
|
| 978 |
+
618,
|
| 979 |
+
826,
|
| 980 |
+
678
|
| 981 |
+
],
|
| 982 |
+
"page_idx": 7
|
| 983 |
+
},
|
| 984 |
+
{
|
| 985 |
+
"type": "text",
|
| 986 |
+
"text": "For these evaluations, either a stochastic or noiseless preference model acts a preference generator to create a preference dataset, and then the stochastic version of the same model is used for reward learning. For the noiseless case, the deterministic preference generator compares a segment pair’s $\\Sigma _ { \\sigma } r$ values for $P _ { \\Sigma _ { r } }$ or their $r e g r e t ( \\sigma | \\boldsymbol { r } )$ values for $P _ { r e g r e t }$ . Note that through reward scaling the preference generators approach determinism in the limit, so this noiseless analysis examines minimal-entropy versions ",
|
| 987 |
+
"bbox": [
|
| 988 |
+
173,
|
| 989 |
+
685,
|
| 990 |
+
485,
|
| 991 |
+
851
|
| 992 |
+
],
|
| 993 |
+
"page_idx": 7
|
| 994 |
+
},
|
| 995 |
+
{
|
| 996 |
+
"type": "image",
|
| 997 |
+
"img_path": "images/f56dad99f6ed6373687ff546ecbf4b134e8fff14fb7367f474428e4005f276cb.jpg",
|
| 998 |
+
"image_caption": [
|
| 999 |
+
"Figure 5: Performance comparison over 100 randomly generated deterministic MDPs "
|
| 1000 |
+
],
|
| 1001 |
+
"image_footnote": [],
|
| 1002 |
+
"bbox": [
|
| 1003 |
+
496,
|
| 1004 |
+
689,
|
| 1005 |
+
823,
|
| 1006 |
+
801
|
| 1007 |
+
],
|
| 1008 |
+
"page_idx": 7
|
| 1009 |
+
},
|
| 1010 |
+
{
|
| 1011 |
+
"type": "text",
|
| 1012 |
+
"text": "336 of the two preference-generating models. (The opposite extreme, uniformly random preferences, \n337 would remove all information from preferences and therefore is not examined.) In the stochastic case, \n338 for each preference model, each segment pair is labeled by sampling from that preference generator’s \n339 output distribution $( \\operatorname { E q s } 2 \\operatorname { o r } 5 )$ , using the unscaled ground-truth reward function. \n340 We created 100 deterministic MDPs that instantiate variants of our delivery domain (see Section 4.1) \n341 To create each MDP, we sampled from sets of possible widths, heights, and reward component values, \n342 and the resultant grid cells were randomly populated with a destination, objects, and road surface types \n343 (see Appendix F.2 for details). Each segment in the preference datasets for each MDP was generated \n344 by choosing a start state and three actions, all uniformly randomly. For a set number of preferences, \n345 each method had the same set of segment pairs in its preference dataset. Figure 5 shows the percentage \n346 of MDPs in which each preference model results in near-optimal performance. The regret preference \n347 model outperforms the partial return model at every dataset size, both with and without noise. By a \n348 Wilcoxon paired signed-rank test on normalized mean returns, $p { < } 0 . 0 5$ for $86 \\%$ of these comparisons \n349 and $p { < } 0 . 0 1$ for $57 \\%$ of them, as reported in Appendix F.2. \n350 Further analyses can be found in Appendix F.2, including with stochastic transitions, with different \n351 segment lengths, and while artificially lowering the discount factor (as is common in deep RL and \n352 recent work on deep reward learning from preferences). ",
|
| 1013 |
+
"bbox": [
|
| 1014 |
+
140,
|
| 1015 |
+
852,
|
| 1016 |
+
826,
|
| 1017 |
+
912
|
| 1018 |
+
],
|
| 1019 |
+
"page_idx": 7
|
| 1020 |
+
},
|
| 1021 |
+
{
|
| 1022 |
+
"type": "text",
|
| 1023 |
+
"text": "",
|
| 1024 |
+
"bbox": [
|
| 1025 |
+
140,
|
| 1026 |
+
90,
|
| 1027 |
+
826,
|
| 1028 |
+
243
|
| 1029 |
+
],
|
| 1030 |
+
"page_idx": 8
|
| 1031 |
+
},
|
| 1032 |
+
{
|
| 1033 |
+
"type": "text",
|
| 1034 |
+
"text": "",
|
| 1035 |
+
"bbox": [
|
| 1036 |
+
142,
|
| 1037 |
+
250,
|
| 1038 |
+
826,
|
| 1039 |
+
294
|
| 1040 |
+
],
|
| 1041 |
+
"page_idx": 8
|
| 1042 |
+
},
|
| 1043 |
+
{
|
| 1044 |
+
"type": "text",
|
| 1045 |
+
"text": "6.3 Results from human preferences ",
|
| 1046 |
+
"text_level": 1,
|
| 1047 |
+
"bbox": [
|
| 1048 |
+
166,
|
| 1049 |
+
308,
|
| 1050 |
+
436,
|
| 1051 |
+
321
|
| 1052 |
+
],
|
| 1053 |
+
"page_idx": 8
|
| 1054 |
+
},
|
| 1055 |
+
{
|
| 1056 |
+
"type": "text",
|
| 1057 |
+
"text": "We randomly assign human preferences from our gathered dataset to different numbers of same-sized partitions, resulting in different training set sizes, and test each preference model on each partition. Figure 6 shows the results. With smaller training sets (20–100 partitions), the regret preference model results in nearoptimal performance more often. With larger training sets (1–10 partitions), both preference models always reach near-optimal return, but the mean return from the regret preference model is higher for all of these partitions except for 3 partitions in the 10-partition test. Applying a Wilcoxon paired signed-rank test on normalized mean return to each group with 5 or more partitions, $p { < } 0 . 0 5$ for all numbers of partitions except 100 and $p { < } 0 . 0 1$ for 20 and 50 partitions. ",
|
| 1058 |
+
"bbox": [
|
| 1059 |
+
174,
|
| 1060 |
+
333,
|
| 1061 |
+
517,
|
| 1062 |
+
500
|
| 1063 |
+
],
|
| 1064 |
+
"page_idx": 8
|
| 1065 |
+
},
|
| 1066 |
+
{
|
| 1067 |
+
"type": "image",
|
| 1068 |
+
"img_path": "images/45e374eeb1341d12a2fa51f1ae55ddab832c909534e3c12782aa3a116010f0ae.jpg",
|
| 1069 |
+
"image_caption": [
|
| 1070 |
+
"Figure 6: Performance comparison over various amounts of human preferences. Each partition has the number of preferences shown or one less. "
|
| 1071 |
+
],
|
| 1072 |
+
"image_footnote": [],
|
| 1073 |
+
"bbox": [
|
| 1074 |
+
531,
|
| 1075 |
+
299,
|
| 1076 |
+
825,
|
| 1077 |
+
440
|
| 1078 |
+
],
|
| 1079 |
+
"page_idx": 8
|
| 1080 |
+
},
|
| 1081 |
+
{
|
| 1082 |
+
"type": "text",
|
| 1083 |
+
"text": "",
|
| 1084 |
+
"bbox": [
|
| 1085 |
+
173,
|
| 1086 |
+
501,
|
| 1087 |
+
825,
|
| 1088 |
+
530
|
| 1089 |
+
],
|
| 1090 |
+
"page_idx": 8
|
| 1091 |
+
},
|
| 1092 |
+
{
|
| 1093 |
+
"type": "text",
|
| 1094 |
+
"text": "7 Conclusion ",
|
| 1095 |
+
"text_level": 1,
|
| 1096 |
+
"bbox": [
|
| 1097 |
+
166,
|
| 1098 |
+
544,
|
| 1099 |
+
299,
|
| 1100 |
+
561
|
| 1101 |
+
],
|
| 1102 |
+
"page_idx": 8
|
| 1103 |
+
},
|
| 1104 |
+
{
|
| 1105 |
+
"type": "text",
|
| 1106 |
+
"text": "Over numerous evaluations with human preferences, our proposed regret preference model $( P _ { r e g r e t } )$ shows improvements summarized below over the previous partial return preference model $( P _ { \\Sigma _ { r } } )$ . When each preference model generates the preferences for its own infinite and exhaustive training set, we prove that $P _ { r e g r e t }$ identifies the set of optimal policies, whereas $P _ { \\Sigma _ { r } }$ is not guaranteed to do so without preference noise that reveals the proportions of rewards with respect to each other. With finite training data of synthetic preferences, $P _ { r e g r e t }$ also empirically results in learned policies that tend to outperform those resulting from $P _ { \\Sigma _ { r } }$ . This superior performance of $P _ { r e g r e t }$ is also seen with human preferences. In summary, our analyses suggest that regret preference models are more effective both descriptively with respect to human preferences and also normatively, as the model we want humans to follow if we had the choice. ",
|
| 1107 |
+
"bbox": [
|
| 1108 |
+
169,
|
| 1109 |
+
575,
|
| 1110 |
+
826,
|
| 1111 |
+
727
|
| 1112 |
+
],
|
| 1113 |
+
"page_idx": 8
|
| 1114 |
+
},
|
| 1115 |
+
{
|
| 1116 |
+
"type": "text",
|
| 1117 |
+
"text": "378 Independent of $P _ { r e g r e t }$ , this paper also reveals that segments’ changes in state values provide informa \n379 tion about human preferences that is not fully provided by partial return. More generally, we show that \n380 the choice of preference model impacts the performance of learned reward functions. \nThis study motivates several new directions for research. Future work could address any of the \n82 limitations detailed in Appendix $\\mathbf { \\nabla } \\cdot \\mathbf { A } . 1 .$ Specifically, future work could further test the general superiority \n83 of $P _ { r e g r e t }$ or apply it to deep learning settings. Additionally, prescriptive methods could be developed \n84 via the user interface or elsewhere to nudge humans to conform more to $P _ { r e g r e t }$ or to other normatively \n85 appealing preference models. Lastly, subsequent efforts could seek preference models that are even \n86 more effective with preferences from actual humans, now that this work has provided conclusive \n7 evidence that the choice of preference model is impactful. ",
|
| 1118 |
+
"bbox": [
|
| 1119 |
+
142,
|
| 1120 |
+
733,
|
| 1121 |
+
825,
|
| 1122 |
+
779
|
| 1123 |
+
],
|
| 1124 |
+
"page_idx": 8
|
| 1125 |
+
},
|
| 1126 |
+
{
|
| 1127 |
+
"type": "text",
|
| 1128 |
+
"text": "",
|
| 1129 |
+
"bbox": [
|
| 1130 |
+
153,
|
| 1131 |
+
785,
|
| 1132 |
+
825,
|
| 1133 |
+
892
|
| 1134 |
+
],
|
| 1135 |
+
"page_idx": 8
|
| 1136 |
+
},
|
| 1137 |
+
{
|
| 1138 |
+
"type": "text",
|
| 1139 |
+
"text": "References \n[1] David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016. \n[2] Andrew W Senior, Richard Evans, John Jumper, James Kirkpatrick, Laurent Sifre, Tim Green, Chongli Qin, Augustin Žídek, Alexander WR Nelson, Alex Bridgland, et al. Improved protein structure prediction using potentials from deep learning. Nature, 577(7792):706–710, 2020. \n[3] Oriol Vinyals, Igor Babuschkin, Wojciech M Czarnecki, Michaël Mathieu, Andrew Dudzik, Junyoung Chung, David H Choi, Richard Powell, Timo Ewalds, Petko Georgiev, et al. Grandmaster level in StarCraft II using multi-agent reinforcement learning. Nature, 575(7782):350–354, 2019. \n[4] Marc G Bellemare, Salvatore Candido, Pablo Samuel Castro, Jun Gong, Marlos C Machado, Subhodeep Moitra, Sameera S Ponda, and Ziyu Wang. Autonomous navigation of stratospheric balloons using reinforcement learning. Nature, 588(7836):77–82, 2020. \n[5] Christopher Berner, Greg Brockman, Brooke Chan, Vicki Cheung, Przemysław D˛ebiak, Christy Dennison, David Farhi, Quirin Fischer, Shariq Hashme, Chris Hesse, et al. Dota 2 with large scale deep reinforcement learning. arXiv preprint arXiv:1912.06680, 2019. \n[6] Jonas Degrave, Federico Felici, Jonas Buchli, Michael Neunert, Brendan Tracey, Francesco Carpanese, Timo Ewalds, Roland Hafner, Abbas Abdolmaleki, Diego de Las Casas, et al. Magnetic control of tokamak plasmas through deep reinforcement learning. Nature, 602(7897):414–419, 2022. \n[7] Dario Amodei, Chris Olah, Jacob Steinhardt, Paul Christiano, John Schulman, and Dan Mané. Concrete problems in ai safety. arXiv preprint arXiv:1606.06565, 2016. \n[8] W Bradley Knox, Alessandro Allievi, Holger Banzhaf, Felix Schmitt, and Peter Stone. Reward (mis)design for autonomous driving. arXiv preprint arXiv:2104.13906, 2021. \n[9] Paul F Christiano, Jan Leike, Tom Brown, Miljan Martic, Shane Legg, and Dario Amodei. Deep reinforcement learning from human preferences. In Advances in Neural Information Processing Systems (NIPS), pages 4299–4307, 2017. \n[10] Borja Ibarz, Jan Leike, Tobias Pohlen, Geoffrey Irving, Shane Legg, and Dario Amodei. Reward learning from human preferences and demonstrations in atari. arXiv preprint arXiv:1811.06521, 2018. \n[11] Xiaofei Wang, Kimin Lee, Kourosh Hakhamaneshi, Pieter Abbeel, and Michael Laskin. Skill preferences: Learning to extract and execute robotic skills from human feedback. In Conference on Robot Learning, pages 1259–1268. PMLR, 2022. \n[12] Erdem Bıyık, Dylan P Losey, Malayandi Palan, Nicholas C Landolfi, Gleb Shevchuk, and Dorsa Sadigh. Learning reward functions from diverse sources of human feedback: Optimally integrating demonstrations and preferences. The International Journal of Robotics Research, page 02783649211041652, 2021. \n[13] Dorsa Sadigh, Anca D Dragan, Shankar Sastry, and Sanjit A Seshia. Active preference-based learning of reward functions. Robotics: Science and Systems, 2017. \n[14] Kimin Lee, Laura Smith, and Pieter Abbeel. Pebble: Feedback-efficient interactive reinforcement learning via relabeling experience and unsupervised pre-training. arXiv preprint arXiv:2106.05091, 2021. \n[15] Kimin Lee, Laura Smith, Anca Dragan, and Pieter Abbeel. B-pref: Benchmarking preference-based reinforcement learning. arXiv preprint arXiv:2111.03026, 2021. \n[16] Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. Training language models to follow instructions with human feedback. arXiv preprint arXiv:2203.02155, 2022. \n[17] R Duncan Luce. Individual choice behavior: A theoretical analysis. John Wiley, 1959. \n[18] Roger N Shepard. Stimulus and response generalization: A stochastic model relating generalization to distance in psychological space. Psychometrika, 22(4):325–345, 1957. \n[19] A.Y. Ng and S. Russell. Algorithms for inverse reinforcement learning. In Seventeenth International Conference on Machine Learning (ICML), 2000. \n[20] Brian D Ziebart, Andrew L Maas, J Andrew Bagnell, and Anind K Dey. Maximum entropy inverse reinforcement learning. In Twenty-third AAAI Conference on Artificial Intelligence, volume 8, pages 1433–1438, 2008. \n[21] Dylan Hadfield-Menell, Smitha Milli, Pieter Abbeel, Stuart J Russell, and Anca Dragan. Inverse reward design. In Advances in Neural Information Processing Systems (NIPS), pages 6765–6774, 2017. \n[22] Stuart Russell and Peter Norvig. Artificial intelligence: a modern approach. 2020. \n[23] Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018. \n[24] André Barreto, Will Dabney, Rémi Munos, Jonathan J Hunt, Tom Schaul, Hado Van Hasselt, and David Silver. Successor features for transfer in reinforcement learning. arXiv preprint arXiv:1606.05312, 2016. \n[25] Riad Akrour, Marc Schoenauer, and Michele Sebag. Preference-based policy learning. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pages 12–27. Springer, 2011. \n[26] Daniel Brown, Russell Coleman, Ravi Srinivasan, and Scott Niekum. Safe imitation learning via fast bayesian reward inference from preferences. In International Conference on Machine Learning, pages 1165–1177. PMLR, 2020. \n[27] Pieter Abbeel and Andrew Y Ng. Apprenticeship learning via inverse reinforcement learning. In Proceedings of the twenty-first international conference on Machine learning, page 1, 2004. \n[28] Kuno Kim, Shivam Garg, Kirankumar Shiragur, and Stefano Ermon. Reward identification in inverse reinforcement learning. In International Conference on Machine Learning, pages 5496–5505. PMLR, 2021. \n[29] Saurabh Arora and Prashant Doshi. A survey of inverse reinforcement learning: Challenges, methods and progress. Artificial Intelligence, 297:103500, 2021. \n[30] John Von Neumann and Oskar Morgenstern. Theory of games and economic behavior. Princeton university press, 1944. \n[31] Yuchen Cui, Qiping Zhang, Alessandro Allievi, Peter Stone, Scott Niekum, and W Bradley Knox. The empathic framework for task learning from implicit human feedback. arXiv preprint arXiv:2009.13649, 2020. \n[32] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 8024–8035. Curran Associates, Inc., 2019. \n[33] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011. ",
|
| 1140 |
+
"bbox": [
|
| 1141 |
+
151,
|
| 1142 |
+
90,
|
| 1143 |
+
828,
|
| 1144 |
+
920
|
| 1145 |
+
],
|
| 1146 |
+
"page_idx": 9
|
| 1147 |
+
},
|
| 1148 |
+
{
|
| 1149 |
+
"type": "text",
|
| 1150 |
+
"text": "",
|
| 1151 |
+
"bbox": [
|
| 1152 |
+
169,
|
| 1153 |
+
92,
|
| 1154 |
+
826,
|
| 1155 |
+
484
|
| 1156 |
+
],
|
| 1157 |
+
"page_idx": 10
|
| 1158 |
+
},
|
| 1159 |
+
{
|
| 1160 |
+
"type": "text",
|
| 1161 |
+
"text": "470 Checklist ",
|
| 1162 |
+
"text_level": 1,
|
| 1163 |
+
"bbox": [
|
| 1164 |
+
142,
|
| 1165 |
+
510,
|
| 1166 |
+
254,
|
| 1167 |
+
526
|
| 1168 |
+
],
|
| 1169 |
+
"page_idx": 10
|
| 1170 |
+
},
|
| 1171 |
+
{
|
| 1172 |
+
"type": "text",
|
| 1173 |
+
"text": "1. For all authors... ",
|
| 1174 |
+
"bbox": [
|
| 1175 |
+
214,
|
| 1176 |
+
539,
|
| 1177 |
+
339,
|
| 1178 |
+
553
|
| 1179 |
+
],
|
| 1180 |
+
"page_idx": 10
|
| 1181 |
+
},
|
| 1182 |
+
{
|
| 1183 |
+
"type": "text",
|
| 1184 |
+
"text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] \n(b) Did you describe the limitations of your work? [Yes] See Appendix A.1. \n(c) Did you discuss any potential negative societal impacts of your work? [Yes] See Appendix A.2. \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
|
| 1185 |
+
"bbox": [
|
| 1186 |
+
238,
|
| 1187 |
+
558,
|
| 1188 |
+
825,
|
| 1189 |
+
672
|
| 1190 |
+
],
|
| 1191 |
+
"page_idx": 10
|
| 1192 |
+
},
|
| 1193 |
+
{
|
| 1194 |
+
"type": "text",
|
| 1195 |
+
"text": "2. If you are including theoretical results... ",
|
| 1196 |
+
"bbox": [
|
| 1197 |
+
214,
|
| 1198 |
+
679,
|
| 1199 |
+
490,
|
| 1200 |
+
693
|
| 1201 |
+
],
|
| 1202 |
+
"page_idx": 10
|
| 1203 |
+
},
|
| 1204 |
+
{
|
| 1205 |
+
"type": "text",
|
| 1206 |
+
"text": "(a) Did you state the full set of assumptions of all theoretical results? [Yes] Sections 3 and C include all assumptions. \n(b) Did you include complete proofs of all theoretical results? [Yes] See Section 3 and Appendix C. ",
|
| 1207 |
+
"bbox": [
|
| 1208 |
+
238,
|
| 1209 |
+
699,
|
| 1210 |
+
825,
|
| 1211 |
+
763
|
| 1212 |
+
],
|
| 1213 |
+
"page_idx": 10
|
| 1214 |
+
},
|
| 1215 |
+
{
|
| 1216 |
+
"type": "text",
|
| 1217 |
+
"text": "3. If you ran experiments... ",
|
| 1218 |
+
"bbox": [
|
| 1219 |
+
214,
|
| 1220 |
+
768,
|
| 1221 |
+
392,
|
| 1222 |
+
782
|
| 1223 |
+
],
|
| 1224 |
+
"page_idx": 10
|
| 1225 |
+
},
|
| 1226 |
+
{
|
| 1227 |
+
"type": "text",
|
| 1228 |
+
"text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [No] However, the learning code, the code for running experiments, the code and UI elements for gathering human preferences on Mechanical Turk, and the anonymized human preferences data will be opened. We are particularly excited to provide the first open dataset of human preferences over pairs of trajectory segments. \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] Appendix F.1 \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] Error bars do not seem applicable to our plots, which do not show the exact data that we do statistical testing on. However, statistical significance testing was reported, in Sections 5.1 and 6.2 (with a pointer to the appendix for details). \n(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Appendix F.1. ",
|
| 1229 |
+
"bbox": [
|
| 1230 |
+
235,
|
| 1231 |
+
787,
|
| 1232 |
+
825,
|
| 1233 |
+
912
|
| 1234 |
+
],
|
| 1235 |
+
"page_idx": 10
|
| 1236 |
+
},
|
| 1237 |
+
{
|
| 1238 |
+
"type": "text",
|
| 1239 |
+
"text": "",
|
| 1240 |
+
"bbox": [
|
| 1241 |
+
233,
|
| 1242 |
+
90,
|
| 1243 |
+
825,
|
| 1244 |
+
184
|
| 1245 |
+
],
|
| 1246 |
+
"page_idx": 11
|
| 1247 |
+
},
|
| 1248 |
+
{
|
| 1249 |
+
"type": "text",
|
| 1250 |
+
"text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
|
| 1251 |
+
"bbox": [
|
| 1252 |
+
222,
|
| 1253 |
+
189,
|
| 1254 |
+
816,
|
| 1255 |
+
205
|
| 1256 |
+
],
|
| 1257 |
+
"page_idx": 11
|
| 1258 |
+
},
|
| 1259 |
+
{
|
| 1260 |
+
"type": "text",
|
| 1261 |
+
"text": "(a) If your work uses existing assets, did you cite the creators? [Yes] Appendix D does so for visual assets used to visualize the delivery task. \n(b) Did you mention the license of the assets? [Yes] Appendix D mentions the license for visual assets used to visualize the delivery task. \n(c) Did you include any new assets either in the supplemental material or as a URL? [No] \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [Yes] See Appendix D. \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [Yes] See Appendix D ",
|
| 1262 |
+
"bbox": [
|
| 1263 |
+
238,
|
| 1264 |
+
209,
|
| 1265 |
+
825,
|
| 1266 |
+
356
|
| 1267 |
+
],
|
| 1268 |
+
"page_idx": 11
|
| 1269 |
+
},
|
| 1270 |
+
{
|
| 1271 |
+
"type": "text",
|
| 1272 |
+
"text": "5. If you used crowdsourcing or conducted research with human subjects... ",
|
| 1273 |
+
"bbox": [
|
| 1274 |
+
214,
|
| 1275 |
+
361,
|
| 1276 |
+
697,
|
| 1277 |
+
376
|
| 1278 |
+
],
|
| 1279 |
+
"page_idx": 11
|
| 1280 |
+
},
|
| 1281 |
+
{
|
| 1282 |
+
"type": "text",
|
| 1283 |
+
"text": "(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [Yes] Section 4.1.1 includes a link to a video of a full experimental session (with an author acting as the subject). \n(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [Yes] We discuss participant risks from our crowdsourced study and provide a link to the IRB approval in Appendix D. \n(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [Yes] See Appendix D. ",
|
| 1284 |
+
"bbox": [
|
| 1285 |
+
238,
|
| 1286 |
+
381,
|
| 1287 |
+
825,
|
| 1288 |
+
508
|
| 1289 |
+
],
|
| 1290 |
+
"page_idx": 11
|
| 1291 |
+
}
|
| 1292 |
+
]
|
parse/dev/6UtOXn1LwNE/6UtOXn1LwNE_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/9t-j3xDm7_Q/9t-j3xDm7_Q_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/MG3YN3z1J4M/MG3YN3z1J4M.md
ADDED
|
@@ -0,0 +1,329 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Unveiling The Mask of Position-Information Pattern Through the Mist of Image Features
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
1 Recent studies show that paddings in convolutional neural networks encode ab
|
| 11 |
+
2 solute position information which can negatively affect the model performance
|
| 12 |
+
3 for certain tasks. However, existing metrics for quantifying the strength of po
|
| 13 |
+
4 sitional information remain unreliable and frequently lead to erroneous results.
|
| 14 |
+
5 To address this issue, we propose novel metrics for measuring (and visualizing)
|
| 15 |
+
6 the encoded positional information. We formally define the encoded information
|
| 16 |
+
7 as PPP (Position-information Pattern from Padding) and conduct a series of ex
|
| 17 |
+
8 periments to study its properties as well as its formation. The proposed metrics
|
| 18 |
+
9 measure the presence of positional information more reliably than the existing
|
| 19 |
+
10 metrics based on PosENet and a test in F-Conv. We also demonstrate that for any
|
| 20 |
+
11 extant (and proposed) padding schemes, PPP is primarily a learning artifact and is
|
| 21 |
+
12 less dependent on the characteristics of the underlying padding schemes.
|
| 22 |
+
|
| 23 |
+
# 13 1 Introduction
|
| 24 |
+
|
| 25 |
+
14 Padding, one of the most fundamental components in neural network architectures, has received
|
| 26 |
+
15 much less attention than other modules. Zero padding is frequently used in CNNs, perhaps due to its
|
| 27 |
+
16 simplicity and low computational costs. This design preference remains almost unchanged in the past
|
| 28 |
+
17 decade. Recent studies [1, 2, 3, 4] show that padding can implicitly provide a network model with
|
| 29 |
+
18 positional information. Such positional information can cause unwanted side-effects by interfering
|
| 30 |
+
19 and affecting other sources of position-sensitive cues (e.g., explicit coordinate inputs [5, 6, 7, 8, 9],
|
| 31 |
+
20 embeddings [10], or boundary conditions of the model [4, 11, 12]). Furthermore, padding may lead
|
| 32 |
+
21 to several unintended behaviors [5, 7, 8, 9], degrade model performance [10, 11, 12], or sometimes
|
| 33 |
+
22 create blind spots [6]. Meanwhile, simply ignoring the padding pixels (known as no-padding or
|
| 34 |
+
23 valid-padding) leads to the foveal effect [13, 14] that causes a model to become less attentive to
|
| 35 |
+
24 the features on the image border. These observations motivate us to thoroughly investigate the
|
| 36 |
+
25 phenomenon of positional encoding including the impact of commonly used padding schemes.
|
| 37 |
+
|
| 38 |
+
Conducting such a study requires a reliable metric to detect the presence of positional information introduced by padding, and more importantly, quantify its strength consistently. We observe that the existing methods for detecting and quantifying the strength of positional information yield inconsistent results. In Section 3, we revisit two closely related evaluation methods, PosENet [1] and F-Conv [3]. Our extensive experiments demonstrate that (a) metrics based on PosENet are unreliable with an unacceptably high variance, and (b) the ‘Border Handling Variants’ (BHV) test in F-Conv suffers from unaware confounding variables in its design, leading to unreliable test results.
|
| 39 |
+
|
| 40 |
+

|
| 41 |
+
Figure 1: Position-information Pattern from Padding (PPP). We propose a method that can consistently and effectively extract PPPs through the distributional difference between optimallypadded (gray-scale surfaces) and algorithmically-padded features (colored surfaces). The results show that the two distributions become distinguishable as the number of sample increases. Following the procedure in Section 2.2, we extract a clear view of PPP with the expectation of the pairwise differences between optimally-padded and algorithmically-padded features. We render each visualization in tilted view (first row) and top view (second row). The colors represent the magnitude (blue/cold/weak to green/warm/strong) at each pixel. The features are extracted at the 3rd layer of interest (Appendix A) from a randn-padded (Section 2.4) ResNet50 pretrained on ImageNet.
|
| 42 |
+
|
| 43 |
+
33 In addition, we observe all commonly-used padding schemes actually encode consistent patterns
|
| 44 |
+
34 underneath the highly dynamic model features. However, such a pattern is rather obscure, noisy,
|
| 45 |
+
35 and visually imperceptible1 in most cases. Fortunately, we show that such patterns can be consis
|
| 46 |
+
36 tently revealed with a sufficient number of samples by defining an optimal padding scheme (see
|
| 47 |
+
37 Section 2.1 and Figure 1). We accordingly propose a new evaluation paradigm and develop a method
|
| 48 |
+
38 to consistently detect the presence of the Position-information Pattern from Padding (PPP), which
|
| 49 |
+
39 is a persistent pattern embedded in the model features to retain positional information. We present
|
| 50 |
+
40 two metrics to measure the response of PPP from the signal-to-noise perspective and demonstrate its
|
| 51 |
+
41 robustness and low deviation among different settings, each with multiple trials of training.
|
| 52 |
+
42 To weaken the effect of PPP, we design a padding scheme with built-in stochasticity to halt the
|
| 53 |
+
43 model from constructing consistent patterns in Section 2.4. However, our experiments show that the
|
| 54 |
+
44 models can still circumvent the stochasticity and end up consistently constructing certain PPPs. This
|
| 55 |
+
45 observation suggests that a model likely constructs PPPs purposely to facilitate its training, rather
|
| 56 |
+
46 than falsely or accidentally learning some filters that respond to padding features.
|
| 57 |
+
47 With reliable PPP metrics, we conduct a series of experiments to analyze the characteristics of PPP in
|
| 58 |
+
48 Section 4.1. Specifically, we monitor the formation of PPP throughout each model training process in
|
| 59 |
+
49 Section 4.3. The results show PPPs are formed expeditiously at the early stage of model training,
|
| 60 |
+
50 slowly but steadily strengthened through time, and eventually shaped in clear and complete patterns.
|
| 61 |
+
51 These results show that a model intentionally develops and reinforces PPPs to facilitate its learning
|
| 62 |
+
52 process. Moreover, we observe the PPPs of all pretrained networks are significantly stronger than
|
| 63 |
+
53 those in their initial states. This indicates an unbiased training procedure is of great importance in
|
| 64 |
+
54 resolving the critical failures caused by PPP in numerous vision tasks [6, 7, 10, 11].
|
| 65 |
+
|
| 66 |
+
# 2 Observations and Methodology
|
| 67 |
+
|
| 68 |
+
In this section, we first define symbols for expressing the functionality of paddings and define the optimal-padding scheme. We then give a formal definition of Position-information Pattern from
|
| 69 |
+
|
| 70 |
+

|
| 71 |
+
Figure 2: Principal point shift. (a) The stride-2 Conv2d only pads on one side, causing the principal point shift (red squares) in earlier layers. (b) Such a shift requires careful margin correction while aligning algorithmically-padded and optimally-padded features (we describe the details of point shift in Appendix A). (c) The shift is visible in the feature space (spade-shaped and question-mark-shaped patterns in the marked box). (d) It is crucial to correct the principal point shift while measuring PPP. The PPP calculation involves pixel-wise distance functions, which are not robust to spatial shifts [15].
|
| 72 |
+
|
| 73 |
+
58 Padding (PPP) and utilize the optimal-padding scheme to develop propose a method to capture PPP
|
| 74 |
+
59 and measure its response with two metrics.
|
| 75 |
+
|
| 76 |
+
# 2.1 Optimal Padding
|
| 77 |
+
|
| 78 |
+
61 The process of capturing an image from the real world can be simplified as the 3D information of
|
| 79 |
+
62 the environment is first projected onto an infinitely large 2D plane, and then the camera determines
|
| 80 |
+
63 resolution as well as field-of-view to form an image from such infinitely large and continuous 2D
|
| 81 |
+
64 65 signals [16, 17]. Letand the collection o $S ^ { * } = \{ s _ { n } ^ { * } \} _ { n = 1 } ^ { N }$ be a collection of such infinitely largptured by cameras at a spatial size $( h _ { n } , w _ { n } )$ tinbe $S ^ { \prime } = \{ s _ { n } ^ { \prime } \} _ { n = 1 } ^ { N }$
|
| 82 |
+
66 A padding scheme produces a set of algorithmically-padded images $\hat { S } = \{ \hat { s } _ { n } \} _ { n = 1 } ^ { N }$ by a padding
|
| 83 |
+
67 function $\rho$ :
|
| 84 |
+
|
| 85 |
+
$$
|
| 86 |
+
\hat { s } _ { n } [ i , j ] = \left\{ { \begin{array} { l l } { s _ { n } ^ { \prime } [ i , j ] = s ^ { * } [ i , j ] } & { { \mathrm { i f ~ } } 0 < i < h _ { n } { \mathrm { ~ a n d ~ } } 0 < j < w _ { n } , } \\ { \rho ( s _ { n } ^ { \prime } , i , j ) } & { { \mathrm { o t h e r w i s e } } , } \end{array} } \right.
|
| 87 |
+
$$
|
| 88 |
+
|
| 89 |
+
68 where $i$ and $j$ are index of a pixel in the spatial dimension. We define a theoretical optimally-padded collection 69 ${ \cal { S } } ^ { \dagger } = \{ s _ { n } ^ { \dagger } \} _ { n = 1 } ^ { N }$ with an optimal-padding function $\rho ^ { \dagger }$ by:
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
\begin{array} { r } { s _ { n } ^ { \dagger } [ i , j ] = \left\{ { s _ { n } ^ { \prime } [ i , j ] } \atop { \rho ^ { \dagger } ( s _ { n } ^ { \prime } , i , j ) } \right. \ } & { = s ^ { * } [ i , j ] \quad \mathrm { i f ~ } 0 < i < h _ { n } \mathrm { ~ a n d ~ } 0 < j < w _ { n } , } \\ { s ^ { \dagger } _ { n } [ i , j ] = \left\{ { s _ { n } ^ { \prime } [ i , j ] } \atop { \rho ^ { \dagger } ( s _ { n } ^ { \prime } , i , j ) } \right. \ } & { = s ^ { * } [ i , j ] \quad \mathrm { o t h e r w i s e } . } \end{array}
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
70 In practice, such an optimal-padding scheme is difficult to achieve. However, it can be simulated if we have access to images beyond the sizes 71 $( h _ { n } , w _ { n } )$ and artificially create $S ^ { \prime }$ .
|
| 96 |
+
|
| 97 |
+
# 2.2 Positional-information Pattern from Padding
|
| 98 |
+
|
| 99 |
+
73 As PPP has not been well defined in the literature, there is no effective metric to detect or quantify it.
|
| 100 |
+
74 Ideally, PPP should have two properties. First, it is a spatial pattern as the padding pixels at different
|
| 101 |
+
75 locations contribute differently to the formation of PPP. Its shape enables the network to develop and
|
| 102 |
+
76 exploit the absolute positional information of each pixel, eventually leading to the unattended and
|
| 103 |
+
77 undesirable effects in certain tasks [5, 6, 7, 8, 9, 10, 11].
|
| 104 |
+
78 Second, as it represents the positional information purely contributed by the padding, it is a constant
|
| 105 |
+
79 term irrelevant to the image contents. Unfortunately, PPP shares space with image features, and
|
| 106 |
+
80 these two spaces interfere with each other, causing the appearance of PPP extremely obscure in most
|
| 107 |
+
81 cases (except zeros padding). Figure 1 shows if we visualize features sample-by-sample, there are
|
| 108 |
+
82 no obvious differences between optimally-padded features (gray-scale surface) and algorithmically
|
| 109 |
+
83 padded features (colored surface). Fortunately, if we assume the interferences between PPP and
|
| 110 |
+
84 image features to be random, then its expectation over a large set of images will saturate to a constant
|
| 111 |
+
85 bias and no longer hinder us from capturing PPP.
|
| 112 |
+
86 Based on these observations, we define PPP as the constant component independent of model inputs,
|
| 113 |
+
87 and its presence is completely contributed by the existence of a padding scheme $\rho$ . Given $\hat { S }$ and a
|
| 114 |
+
88 model $F ( \hat { s } ; \theta , \rho )$ , which $\theta$ is the model parameters and $\rho$ is a padding scheme applied to $F$ . Let the
|
| 115 |
+
89 model feature extracted at $k$ -th layer be $f _ { n , k } = F _ { k } ( \hat { s } _ { n } ; \theta , \rho )$ , where $F _ { k }$ is the model from the first
|
| 116 |
+
90 layer to the $k$ -th layer. The PPP at $k$ -th layer $( P P P _ { k } )$ can be formulated by:
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\begin{array} { r } { \mathsf { P P P } _ { k } \ = \ \underset { n } { \mathbb { E } } \left[ \textit { d } \big ( \begin{array} { l } { F _ { k } ( s _ { n } ^ { \dagger } ; \theta , \rho ^ { \dagger } ) , F _ { k } ( \hat { s } _ { n } ; \theta , \rho ) } \end{array} \big ) \ \right] \ , } \end{array}
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
91 where $d ( \cdot , \cdot )$ can be any distance function, and we use $\ell _ { 1 }$ distance in this work.
|
| 123 |
+
|
| 124 |
+
Pitfalls: feature misalignment. It is important to note that, some CNN components can cause serious feature misalignment while computing PPP and leads to erroneous results. A typical example is principal point shift, where the uneven padding in stride-2 convolution causes the centers of features slightly drifted, as shown in Figure 2. Since the measurement of PPP requires perfect alignment, such a drift should be carefully considered while integrating PPP into new architectures. We further discuss the issue along with other pitfalls in Appendix A and provide three detailed examples of correcting the principal point shifting.
|
| 125 |
+
|
| 126 |
+
# 2.3 Metrics
|
| 127 |
+
|
| 128 |
+
In order to measure the strength of PPP, a proper baseline signal is needed. As discussed above, a strong PPP should be distinguishable from the interferences of the model features, so that the model can successfully extract the positional information from PPP. Thus, if we consider the model features as a background noise signal and PPP as the signal of interest, we can measure the significance of PPP using the signal-to-noise ratio (SNR). We define the SNR for PPP at $k$ -th layer as:
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
\begin{array} { r } { \mathrm { S N R } \mathrm { - P P P } _ { k } \ = \ \mu \left( \underset { n } { \mathbb { E } } \left[ \begin{array} { l } { | } \end{array} \middle | F _ { k } \big ( s _ { n } ^ { \dagger } ; \theta , \rho ^ { \dagger } \big ) \ - \ F _ { k } \big ( \hat { s } _ { n } ; \theta , \rho \big ) \ B _ { 1 } \ \right] \ \right) \ / \ \sigma \big ( \ F _ { k } \big ( \hat { s } _ { n } ; \theta , \rho \big ) \ \big ) , } \end{array}
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
where $\mu$ and $\sigma$ are the mean and standard deviation on the spatial dimensions.
|
| 135 |
+
|
| 136 |
+
106 However, SNR only measures the significance of the signal versus the noise but ignores the location
|
| 137 |
+
107 of the signal. Given PPP is a spatially varying pattern, we further include Mean Absolute Error
|
| 138 |
+
108 (MAE) to measure PPP versus the average of the noise map with:
|
| 139 |
+
|
| 140 |
+
$$
|
| 141 |
+
\begin{array} { r } { \mathbf { M A E - P P P } _ { k } \ = \ \underset { n } { \mathbb { E } } \left[ \ \mathbf { M A E } \left( \ F _ { k } ( s _ { n } ^ { \dagger } ; \theta , \rho ^ { \dagger } ) \ , \ F _ { k } ( \hat { s } _ { n } ; \theta , \rho ) \ \right) \ \right] \ . } \end{array}
|
| 142 |
+
$$
|
| 143 |
+
|
| 144 |
+
# 2.4 Randn Padding
|
| 145 |
+
|
| 146 |
+
10 Most of the existing padding schemes (e.g., zeros, reflect, replicate, circular) exhibit certain consistent
|
| 147 |
+
11 patterns that can be easily detected by some designed convolutional kernels. One may argue that the
|
| 148 |
+
12 nature of easy detectability can be a root cause of encouraging the models to learn to rely on these
|
| 149 |
+
113 obvious patterns. This motivates us to design an additional sampling-based padding scheme without
|
| 150 |
+
114 any consistent patterns, namely randn (i.e., random normal) padding, which produces dynamical
|
| 151 |
+
15 values from a normal distribution while following the local statistics. We first determine the maximal
|
| 152 |
+
116 and minimal values of a sliding window (which can be easily achieved with max-pooling), use the
|
| 153 |
+
17 average of them as a proxy mean $\mu _ { p }$ , and use the difference between the mean and the maximal
|
| 154 |
+
118 value as a proxy standard deviation $\sigma _ { p }$ . For each padding location, we sample the padding value
|
| 155 |
+
119 according to a normal distribution $\mathcal { N } ( \mu _ { p } , \sigma _ { p } ^ { 2 } )$ from the nearest sliding window. We include more
|
| 156 |
+
120 implementation details in Appendix A.
|
| 157 |
+
121 Aside from creating a pattern-less padding scheme with sampling, the design of randn padding is
|
| 158 |
+
122 based on several factors. The sampled padding pixels are allowed to occasionally exceed the min/max
|
| 159 |
+
123 bound of the sliding window. Without breaking the min/max bound can introduce detectable patterns
|
| 160 |
+
124 in certain extreme cases, such as a gradient-like feature that has its maximal intensity at the top-left
|
| 161 |
+
125 corner and minimal intensity at the bottom-right corner. We also design the padding scheme to
|
| 162 |
+
126 follow the local distribution. The padding exhibits a high entropy when the local variation is high,
|
| 163 |
+
127 while degenerates to value repetition with imperceptible perturbations while padding a flat area. As
|
| 164 |
+
|
| 165 |
+
such, not only do the padding pixels exhibit less pattern, but it also prevents the padding pixels from breaking the features in the border region. We later show that a model still deliberately and incredibly built up PPP over time even with such a sophisticated padding scheme.
|
| 166 |
+
|
| 167 |
+
# 3 Revisiting Prior Work
|
| 168 |
+
|
| 169 |
+
In this section, we first reproduce two experiments from the prior art, which aim to assess positional information from paddings. We show several critical design issues in these experiments and discuss how these problems affect the drawn conclusions. Finally, we propose two additional experiments to quantify the amount of positional information embedded in the paddings.
|
| 170 |
+
|
| 171 |
+
# 3.1 PosENet
|
| 172 |
+
|
| 173 |
+
Islam et al. show zeros-padding provides CNN models positional information cues, and propose PosENet [1] to quantify the amount of positional information encoded within CNN features. A PosENet experiment involves several components: a pretrained CNN model $F$ , a shallow CNN $E _ { p e m }$ (i.e., position encoding module), an image dataset $X = \{ x _ { i } \} _ { i = 1 } ^ { N }$ to examine, and a constant target pattern $y$ (e.g., 2D Gaussian pattern). PosENet first extracts intermediate features at $k$ - th layer with $f _ { ( i , k ) } = F _ { k } ( x _ { i } )$ using the pretrained CNN, and then optimizes $E _ { p e m }$ to minimize $\mathbb { E } _ { i , k } \big [ | | E _ { p e m } ( f _ { ( i , k ) } ) - y | | _ { 2 } \big ]$ . Finally, the amount of positional information is quantified by the average Spearman’s correlation (SPC) and Mean Absolute Error (MAE) overall $E _ { p e m } ( f _ { ( i , k ) } )$ toward $y$ .
|
| 174 |
+
|
| 175 |
+
145 A critical issue with PosENet is the use of an optimization-based metric. It is sensitive to hyper
|
| 176 |
+
146 parameters with large variation. As shown in Table 2, for all the PosENet results, the standard
|
| 177 |
+
147 deviation over five trials significantly dominates the differences between different types of paddings,
|
| 178 |
+
148 and thus no definitive conclusions can be drawn. We also observed that PosENet can report NaN
|
| 179 |
+
149 results in certain setups. Furthermore, PosENet quantifies the amount of positional information by
|
| 180 |
+
150 the faithfulness of the final reconstruction. However, a better reconstruction does not have a clear
|
| 181 |
+
151 relationship to measuring the strength and significance of positional information. For instance, the
|
| 182 |
+
152 VGG architecture with zeros-padding in Table 2, PosENet cannot recognize the positional information
|
| 183 |
+
153 has been strengthened after training, which can be seen in Figure 4. PosENet falsely assigns a much
|
| 184 |
+
154 lower SPC to the fully pretrained model. Moreover, for the no-padding entries in Table 2, PosENet
|
| 185 |
+
155 can still sometimes show responses to no-padding models, demonstrating it is a metric with an
|
| 186 |
+
156 indefinite bias pending on the memorization ability of $E _ { p e m }$ .
|
| 187 |
+
|
| 188 |
+
Another issue is that the no-padding scheme used in $E _ { p e m }$ is known to have the foveal effect [13, 14], where a model pays less attention to the information on the edge of inputs. Using such a padding scheme for detecting positional information from paddings, which is mostly concentrated on the edge of the feature maps, is less effective. This is an inevitable dilemma as PosENet aims to identify positional information from the padding of the pretrained $F$ , while applying any padding scheme to $E _ { p e m }$ introduces intractable effects between the paddings of the two models.
|
| 189 |
+
|
| 190 |
+
# 3.2 F-Conv
|
| 191 |
+
|
| 192 |
+
64 Kayhan et al. propose a full-padding scheme (F-Conv) [3] and demonstrate it is more translational
|
| 193 |
+
65 invariant than the alternatives. One of the critical results is on “border handling variants” (Exp 2
|
| 194 |
+
66 of [3]), which we call it BHV test. The BHV test creates a toy dataset, where each image has a black
|
| 195 |
+
67 background with a green square and a red square in the foreground. The task is to predict if the red
|
| 196 |
+
68 square is on the left of the green square (class 1), or vice versa (class 2). In addition, Kayhan et al.
|
| 197 |
+
69 intentionally adds a location bias such that both squares are located in the upper half of the image for
|
| 198 |
+
70 class 1, and located in the lower half of the image for class 2. During testing, a “similar test” inherits
|
| 199 |
+
71 the same bias, while a “dissimilar test” exchanges the bias (i.e., both squares are in the lower half
|
| 200 |
+
72 of the image for class 1). As a truly translation-invariant CNN model should not be affected by the
|
| 201 |
+
73 location bias, it should focus on the relation between the red and green squares and perform similarly
|
| 202 |
+
74 on both tests. Since the experimental results show that F-Conv performs best on the dissimilar test, it
|
| 203 |
+
75 is concluded that F-Conv is less sensitive to the location bias. The authors also conclude the circular
|
| 204 |
+
76 padding performs worse due to the behavior of wrapping the pixels to the other side of the image,
|
| 205 |
+
77 which leads to confusion between two classes.
|
| 206 |
+
178 However, as shown in Figure 3, we find the experimental design
|
| 207 |
+
179 does not consider a crucial confounding variable: the black back
|
| 208 |
+
180 ground has a zero intensity, making zeros padding the optimal
|
| 209 |
+
181 padding that perfectly follows the background distribution. In Ta
|
| 210 |
+
182 ble 1, we show that the dissimilar test is no longer in favor of
|
| 211 |
+
183 F-Conv zeros after changing the background color to grey. We also
|
| 212 |
+
184 show that F-Conv replicate and F-Conv circular perform best on
|
| 213 |
+
185 the dissimilar test, which is different from the original observation.
|
| 214 |
+
|
| 215 |
+
Table 1: Background color as a critical confounding variable in BHV test. We show that using a grey background similar to Figure 3 leads to discrepant results. The standard deviations are reported among 10 individual trials. We mark the best performance in green, and the worst two in red.
|
| 216 |
+
|
| 217 |
+
<table><tr><td rowspan="2">Padding</td><td rowspan="2">F-Conv?</td><td colspan="4">Black Background</td><td colspan="4">Grey Background</td></tr><tr><td>Similar (%)</td><td>Dissimilar (%)</td><td>Diff (%)</td><td>Inconsistency (%)</td><td>Similar (%)</td><td>Dissimilar (%)</td><td>Diff (%)</td><td>Inconsistency (%)</td></tr><tr><td rowspan="2">Zeros</td><td>N</td><td>99.83±0.00</td><td>3.21± 8.35</td><td>-87.68</td><td>95.81± 2.07</td><td>100.00± 0.00</td><td>4.96± 5.93</td><td>-95.04</td><td>97.85± 4.55</td></tr><tr><td>Y</td><td>89.24±0.98</td><td>89.24±0.98</td><td>0.00</td><td>18.02± 8.08</td><td>100.00±0.00</td><td>4.77± 6.52</td><td>95.23</td><td>96.79±7.13</td></tr><tr><td rowspan="2">Circular</td><td>N</td><td>80.31±3.23</td><td>80.31± 3.23</td><td>0.00</td><td>34.25± 8.32</td><td>72.75± 0.96</td><td>72.75± 0.96</td><td>0.00</td><td>26.30± 5.55</td></tr><tr><td>Y</td><td>99.20±0.23</td><td>93.14± 2.88</td><td>-6.06</td><td>18.48±3.55</td><td>98.26± 0.50</td><td>92.40±4.23</td><td>-5.87</td><td>28.67± 6.18</td></tr><tr><td rowspan="2">Reflect</td><td>N</td><td>100.00±0.00</td><td>15.67±12.72</td><td>-84.33</td><td>91.18±13.19</td><td>100.00±0.00</td><td>19.96±13.54</td><td>-80.04</td><td>90.33±11.95</td></tr><tr><td>Y</td><td>100.00±0.00</td><td>11.70±15.38</td><td>-88.30</td><td>97.33± 6.16</td><td>100.00±0.00</td><td>17.16±12.19</td><td>-82.84</td><td>98.13± 3.44</td></tr><tr><td rowspan="2">Replicate</td><td>N</td><td>100.00±0.00</td><td>43.39±11.42</td><td>-56.61</td><td>75.32± 8.20</td><td>100.00± 0.00</td><td>33.16± 6.42</td><td>-66.83</td><td>84.09± 6.47</td></tr><tr><td>Y</td><td>98.32±0.39</td><td>93.65± 1.36</td><td>-4.67</td><td>32.60± 4.97</td><td>97.17± 0.48</td><td>94.99± 1.20</td><td>-2.18</td><td>32.15± 5.11</td></tr><tr><td rowspan="2">Randn</td><td>N</td><td>100.00±0.00</td><td>10.31±12.56</td><td>-89.70</td><td>94.88± 5.55</td><td>99.97± 0.13</td><td>35.47±10.82</td><td>-64.50</td><td>83.59± 8.48</td></tr><tr><td>Y</td><td>100.00±0.00</td><td>20.80±14.15</td><td>-79.20</td><td>92.54±8.37</td><td>77.28±16.13</td><td>66.70±11.58</td><td>-10.59</td><td>45.70±20.62</td></tr><tr><td>No-pad</td><td>-</td><td>100.00±0.00</td><td>3.21± 8.35</td><td>-96.79</td><td>95.81± 2.07</td><td>100.00± 0.00</td><td>30.07± 4.06</td><td>-69.93</td><td>81.30± 2.44</td></tr></table>
|
| 218 |
+
|
| 219 |
+
Finally, we report an additional inconsistency rate to show that the CNN architecture used in the BHV test actually has access to the absolute position of the squares. Given a random sample in class 1, we create a trajectory of samples by simultaneously moving the two squares to the bottom of the canvas and recording the CNNmodel prediction in all intermediate states. We label a trajectory to be inconsistent if the prediction of the CNN-model switches classes at any step of the trajectory. A CNN model with no access to the absolute-position information should have all trajectories maintaining consistent predictions, with $0 \%$ inconsistency. Table 1 shows the inconsistent ratio over 228 uniformly sampled trajectories, where all models maintain high inconsistency rates, even with a no-padding architecture. These results show that the CNN model used in the BHV test is not translation invariant. This can be attributed to that a CNN model has a large receptive field covering the whole experiment canvas, therefore capable of gradually constructing absolute coordinates for each input pixel. Note that we only show the design of the BHV test is not suitable for quantifying the amount of positional information exhibited in a CNN model. Such a conclusion does not imply that F-Conv cannot potentially improve the translation-invariant property of CNNs.
|
| 220 |
+
|
| 221 |
+

|
| 222 |
+
Figure 3: The BHV test trains a binary classifier to predict the relative position of the two colored squares. It hypothesizes if the padding provides no positional information, the classifier will only focus on the relative position of the two squares. (Left) The black background is a confounding variable. (Right) Zeros padding no-longer pads optimum values after changing the background color.
|
| 223 |
+
|
| 224 |
+
# 4 Experiments and Analysis
|
| 225 |
+
|
| 226 |
+
Datasets Since most vision models are trained on tasks for recognizing objects, an image collection containing a diverse object appearance is more suitable for the task. We collect a set of 480 satellite images at $2 , 0 4 8 \times 2 , 0 4 8$ pixels from Google Map for experiments. All the PPP metrics are measured with this image collection. We crop such images depending on the requested input image sizes and principal point shifts from each model (see Appendix A for details). We will release the script for collecting and composing these large images.
|
| 227 |
+
|
| 228 |
+
# 4.1 Visualizing Position-information Pattern from Padding (PPP)
|
| 229 |
+
|
| 230 |
+
212 We start with visualizing PPP in Figure 4. All the visualizations are conducted at the 4th layer of
|
| 231 |
+
213 interest as detailed in Appendix A. We compute PPP using Eq. 3 and $\ell _ { 1 }$ norm as the distance metric,
|
| 232 |
+
214 then average the resulting PPP in the channel dimension to generate a gray-scale image. Since the
|
| 233 |
+
215 quantities are small and difficult to perceive, we normalize the gray-scale image to [0, 1] range, and
|
| 234 |
+
216 thus the colors between images are not directly comparable.
|
| 235 |
+
217 In all scenarios, a noticeable difference is that PPP spreads out after pretraining on ImageNet.
|
| 236 |
+
218 In Table 2, the PPP-SNR of the VGG19 and ResNet50 also reflects that the response of PPP is
|
| 237 |
+
219 significantly strengthened after model training. That is, the model training has substantial effects on
|
| 238 |
+
220 the construction of PPP. Although the formation of padding pattern is suggested to mainly caused by
|
| 239 |
+
21 the distributional difference between features and paddings [6], our results show that it only increases
|
| 240 |
+
22 the response slightly, compared to the considerable PPP-SNR gain through training.
|
| 241 |
+
|
| 242 |
+
Table 2: Comparing PosENet and our proposed PPP metrics. The standard deviation is computed by five different pretrained models for each test. The performance shows the accuracy for the classification task or weighted F-measure score [18] for the saliency object detection task. Note that we use 2D Gaussian as PosENet reconstruction pattern, and the PPP metrics are measured at the 4th layer of interest. Here, $( ^ { * } )$ indicates a NaN is reported in any of the trials, and (↑) indicates a higher value corresponds to stronger positional information or better performance on the task (vice versa for (↓)). For each group of pretrained models, we label the strongest and weakest positional information response with red and blue.
|
| 243 |
+
|
| 244 |
+
<table><tr><td rowspan="2">Model</td><td rowspan="2">Padding</td><td rowspan="2">Pretrained</td><td colspan="2">PosENet</td><td colspan="2">PPP (ours)</td><td rowspan="2">Performance (个)</td></tr><tr><td>SPC (1)</td><td>MAE (↓)</td><td>SNR-PPP (↑)</td><td>MAE-PPP (↑)</td></tr><tr><td rowspan="10">VGG-19</td><td rowspan="2">Zeros</td><td rowspan="2">× ImageNet</td><td>0.518±0.121</td><td>0.184±0.004</td><td>0.0665±0.0024</td><td>0.0132±0.0006</td><td rowspan="2">74.0972±0.0870</td></tr><tr><td>0.142±0.139</td><td>0.194±0.006</td><td>1.2289±0.0613</td><td>0.0176±0.0005</td></tr><tr><td rowspan="2">Circular</td><td rowspan="2">× ImageNet</td><td>0.001±0.092</td><td>0.197±0.002</td><td>0.0000±0.0000</td><td>0.0000±0.0000</td><td rowspan="2">74.4716±0.0863</td></tr><tr><td>0.102±0.136</td><td>0.197±0.007</td><td>1.1488±0.0589</td><td>0.0158±0.0006</td></tr><tr><td rowspan="2">Reflect</td><td rowspan="2">× ImageNet</td><td></td><td>0.197±0.002</td><td>0.0000±0.0000</td><td>0.0000±0.0000</td><td rowspan="2"></td></tr><tr><td>0.001±0.091 0.116±0.134</td><td>0.195±0.006</td><td></td><td>0.0158±0.0002</td></tr><tr><td rowspan="2">Replicate</td><td rowspan="2">×</td><td></td><td></td><td>1.2022±0.0226</td><td></td><td rowspan="2">74.0516±0.0621</td></tr><tr><td>0.001±0.091</td><td>0.197±0.002</td><td>0.0000±0.0000</td><td>0.0000±0.0000</td></tr><tr><td rowspan="2">Randn</td><td rowspan="2">ImageNet ×</td><td>0.116±0.132</td><td>0.195±0.006</td><td>1.2494±0.0258</td><td>0.0144±0.0009</td><td rowspan="2">73.9964±0.1079</td></tr><tr><td>0.001±0.093 0.115±0.146</td><td>0.197±0.002 0.195±0.006</td><td>0.0000±0.0000</td><td>0.0000±0.0000</td></tr><tr><td rowspan="2">No-padding</td><td rowspan="2">ImageNet ×</td><td></td><td></td><td>1.2366±0.0774</td><td>0.0182±0.0012</td><td rowspan="2">73.7716±0.0758</td></tr><tr><td>0.000±0.091</td><td>0.197±0.002</td><td>0.0000±0.0000</td><td>0.0000±0.0000</td></tr><tr><td rowspan="9"></td><td rowspan="2">Zeros</td><td>ImageNet ×</td><td>0.001±0.220</td><td>0.203±0.012</td><td>0.0000±0.0000</td><td>0.0000±0.0000</td><td rowspan="2">62.0396±0.0830</td></tr><tr><td>DUTS</td><td>0.682±0.099 0.343±0.151</td><td>0.171±0.008</td><td>0.0306±0.0020</td><td>0.0068±0.0007</td></tr><tr><td rowspan="2">Circular</td><td></td><td></td><td>0.186±0.011</td><td>0.2429±0.0035</td><td>0.0049±0.0001</td><td rowspan="2">0.6269±0.0015</td></tr><tr><td>× DUTS</td><td>0.001±0.081 0.158±0.188</td><td>0.197±0.002 0.196±0.013</td><td>0.0000±0.0000 0.2677±0.0062</td><td>0.0000±0.0000 0.0062±0.0001</td></tr><tr><td rowspan="2">Reflect</td><td>X</td><td>-0.002±0.080</td><td>0.197±0.002</td><td></td><td></td><td rowspan="2">0.6260±0.0009</td></tr><tr><td>DUTS</td><td>0.160±0.223</td><td>0.195±0.014</td><td>0.0000±0.0000 0.1972±0.0024</td><td>0.0000±0.0000 0.0053±0.0001</td></tr><tr><td rowspan="2">Replicate</td><td>×</td><td>-0.002±0.087</td><td>0.197±0.002</td><td></td><td></td><td rowspan="2">0.6243±0.0022</td></tr><tr><td>DUTS</td><td>0.075±0.174</td><td>0.201±0.010</td><td>0.0000±0.0000 0.1908±0.0056</td><td>0.0000±0.0000 0.0043±0.0002</td></tr><tr><td rowspan="2">Randn</td><td>×</td><td>0.000±0.082</td><td></td><td></td><td></td><td rowspan="2">0.6255±0.0013</td></tr><tr><td>DUTS</td><td>0.004±0.106</td><td>0.197±0.002 0.196±0.001</td><td>0.0000±0.0000 0.0005±0.0001</td><td>0.0000±0.0000 0.0001±0.0000</td></tr><tr><td rowspan="8"></td><td rowspan="2">No-padding</td><td>×</td><td></td><td></td><td></td><td></td><td rowspan="2">0.2570±0.0022</td></tr><tr><td>DUTS</td><td>0.000±0.087 0.003±0.252</td><td>0.197±0.002</td><td>0.0000±0.0000</td><td>0.0000±0.0000 0.0000±0.0000</td></tr><tr><td rowspan="2">Zeros</td><td>×</td><td>0.096±0.118</td><td>0.200±0.010</td><td>0.0000±0.0000</td><td></td><td rowspan="2">0.4759±0.0013</td></tr><tr><td>ImageNet</td><td>0.329±0.201</td><td>0.196±0.003 0.185±0.011</td><td>0.0918±0.0119 0.8171±0.0173</td><td>0.0052±0.0004 0.0162±0.0012</td></tr><tr><td rowspan="2">Circular</td><td>×</td><td>*0.027±0.093</td><td>*0.197±0.003</td><td>0.0454±0.0041</td><td>0.0032±0.0004</td><td rowspan="2">75.6856±0.0924</td></tr><tr><td>ImageNet</td><td>0.184±0.201</td><td>0.192±0.010</td><td>0.7018±0.0320</td><td>0.0188±0.0016</td></tr><tr><td rowspan="2">Reflect</td><td>×</td><td>*0.004±0.094</td><td>*0.198±0.003</td><td>0.0291±0.0017</td><td>0.0018±0.0001</td><td rowspan="2">76.1432±0.1026 75.5068±0.1213</td></tr><tr><td>ImageNet ×</td><td>0.293±0.181</td><td>0.187±0.009</td><td>0.6960±0.0221</td><td>0.0150±0.0004</td></tr><tr><td rowspan="2">Randn</td><td>Replicate ImageNet</td><td>*0.002±0.094</td><td>*0.198±0.003</td><td>0.0226±0.0013</td><td>0.0015±0.0001</td><td></td><td rowspan="2">75.6122±0.0911</td></tr><tr><td>×</td><td>0.347±0.205 *0.006±0.090</td><td>0.184±0.012</td><td>0.7461±0.0254</td><td>0.0138±0.0003</td><td></td></tr><tr><td rowspan="2"></td><td rowspan="2"></td><td>ImageNet</td><td>0.358±0.240</td><td>*0.198±0.003 0.181±0.016</td><td>0.0326±0.0016 0.6648±0.0204</td><td>0.0020±0.0002 0.0147±0.0007</td><td rowspan="2">75.3076±0.1016</td></tr><tr><td>×</td><td>0.360±0.327</td><td>0.180±0.026</td><td>0.5074±0.0260</td><td>0.0398±0.0027</td></tr><tr><td rowspan="9">EfficientNet</td><td rowspan="2">Circular</td><td>ImageNet</td><td>0.667±0.111</td><td>0.166±0.014</td><td>0.7590±0.0208</td><td>0.0471±0.0022</td><td rowspan="2">61.8652±0.1380</td></tr><tr><td>×</td><td>0.004±0.192</td><td>0.205±0.013</td><td>0.3008±0.0883</td><td>0.0222±0.0048</td></tr><tr><td rowspan="2"></td><td>ImageNet</td><td>0.020±0.123</td><td>0.203±0.009</td><td>0.4326±0.0251</td><td>0.0256±0.0017</td><td rowspan="2">61.2208±0.2128</td></tr><tr><td>×</td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="2">Reflect</td><td>ImageNet</td><td>0.003±0.175 0.062±0.116</td><td>0.205±0.012 0.201±0.008</td><td>0.2245±0.0639 0.4667±0.0232</td><td>0.0183±0.0053 0.0268±0.0014</td><td rowspan="2">60.4164±0.2924</td></table>
|
| 245 |
+
|
| 246 |
+

|
| 247 |
+
Figure 4: Visualization of Position-Information Pattern from Padding (PPP). The visualizations are calculated based on Eq. 3 over 480 GMap samples extracted at the 3rd layer-of-interest (Appendix A). The results show that the pretrained model significantly reinforces PPP compared to randomly initialized networks. Note that each image is normalized to [0, 1] separately, therefore the colors between images are not comparable. More visualizations are presented in Appendix B.
|
| 248 |
+
|
| 249 |
+

|
| 250 |
+
Figure 5: Chronological PPP. We quantify PPP every 10 epochs and plot its development in four different layer of depth (the rightmost layer is the one closest to model output). All curves consistently show a sudden surge at the early stage, and all the later layers are slowly but steadily gaining stronger PPP until the end of training. The shadow region represents standard deviations among 5 individual training episodes. The colors represent zeros, circular, reflect, replicate, and randn paddings.
|
| 251 |
+
|
| 252 |
+
Another intriguing observation is that, despite some variations in the detailed patterns, the overall structure of PPP remains similar. Regardless of padding minimum values with zero-padding (consider the features are processed with ReLU activation), randn-padding that can sometimes produce large quantities by chance, or the unbalanced initial state of ResNet50 caused by strided convolution (the first row of ResNet50 in Figure 4), all models tend to have the maximal PPP response in the corner of the features after fully trained. While the underlying mechanism causing such consistent preferences remains unknown, such preferences may be an important factor to consider in future model design.
|
| 253 |
+
|
| 254 |
+
# 4.2 Quantifying PPP and Comparing with PosENet
|
| 255 |
+
|
| 256 |
+
Table 2 shows the measurements of PPP and PosENet on various architectures and padding schemes. We train five models for each setup and measure the standard deviation of these models. Our PPP metrics have significantly lower standard deviations compared to PosENet, where the standard deviation dominates the differences between padding variants, and thus the quantities from PosENet cannot provide sufficient information for any analysis. The main reason that PosENet has such a large variation is due to its optimization-based formulation, and thus the final quantities highly depend on the convergence of the PosENet training. In fact, we also observe a similar level of standard deviation even when the PosENet is measured on the same model for multiple trials. On the other hand, PPP metrics are based on a closed-form formulation, and thus the variations are only introduced by the differences among the parameters of the pretrained models. Furthermore, PosENet frequently reports positive SPC responses from no-padding models, as shown in its large standard deviation. In contrast, PPP has zero response to no-padding models by definition, and therefore is less biased for measuring the positional information from padding.
|
| 257 |
+
|
| 258 |
+
SNR-PPP and MAE-PPP assess the response of PPP from two different perspectives, the ratio of the overall PPP magnitude to the image feature variation, and the position-aware average gain of PPP. Despite both measuring the PPP gain and mostly following similar trends, the two metrics can sometimes have discrepancies, such as the randn padding case in EfficientNet pretrained on ImageNet in Table 2. We note that the two metrics should be both measured and considered altogether.
|
| 259 |
+
|
| 260 |
+
Although certain paddings seem to have lower SNR-PPP or MAE-PPP on trained networks, we find the differences are not significant when comparing the extremely low SNR-PPP and MAE-PPP from the randomly initialized networks. In most cases, the network can effectively construct its PPP, even with the highly stochastic randn padding. The only exception seems to be the case of randn padding in the salient object detection (SOD) task, where the network fails to achieve a compatible performance to other paddings2. The results show that the model training plays an important role in the formation of PPP, and perhaps its contribution is much larger than which underlying padding scheme is being used. This motivates us to further analyze the PPP formulation during model training.
|
| 261 |
+
|
| 262 |
+
# 4.3 Chronological PPP
|
| 263 |
+
|
| 264 |
+
To understand the formulation of PPP through time, we snapshot checkpoints every 10 epochs for all training episodes. By measuring the PPP metrics at all the checkpoints, we plot a chronological curve and monitor the progress of PPP. We train 5 individual models for each pair of model-padding setup and report the standard deviations, which demonstrates the significance of the trend.
|
| 265 |
+
|
| 266 |
+
Figure 5 shows all models achieve a significant gain of PPP within the first 10 epochs in all intermediate layers. Most models continuously increase their PPP as training proceeds, especially in the fourth layer of interest, which is the last output from the convolutional layers before the final linear projection. Another interesting observation is that our randn padding, which is designed to be less easily detectable with built-in stochasticity, indeed shows less PPP built-up at the intermediate stages in certain layers. However, the network still adjusts the behavior and ends up forming complete PPPs at the fourth layer of interest in all scenarios. All these evidences show that the network builds PPP purposely as a favorable representation to assist its learning.
|
| 267 |
+
|
| 268 |
+
# 5 Conclusion and Limitations
|
| 269 |
+
|
| 270 |
+
In this paper, we develop a reliable method for measuring PPP and conduct a series of analyses toward understanding the formation and properties of PPP. Through a large-scale study, we demonstrate that PPP is a representation that the network favorably develops as a part of its learning process, and its formation has weak connections to the underlying padding algorithm. We show that reliable PPP metrics are important steps for understanding the effects of PPPs in different tasks, and useful for measuring the effectiveness of future methods in debiasing PPP.
|
| 271 |
+
|
| 272 |
+
However, an unfortunate and inevitable limitation of the PPP metrics is that their measure is biased by the model architecture and parameters. Since the PPP metrics are based on the distributional differences between the paired model outputs (i.e., optimal padding to algorithmic padding), different architecture and layers of depth exhibit different and intractable biases due to different interactions between PPP and model parameters. Such a bias makes PPP metrics less useful for evaluating models, and therefore cannot be used to study the effect of architectural changes. This limitation is inevitable for any (and all existing) metric that attempts to measure PPP using the outputs of a model. We note future studies in measuring PPP without model inferences3 will be an important step toward tackling and understanding the property of PPP under different architectural choices.
|
| 273 |
+
|
| 274 |
+
# References
|
| 275 |
+
|
| 276 |
+
[1] Md Amirul Islam\*, Sen Jia\*, and Neil D. B. Bruce. How much position information do convolutional neural networks encode? In International Conference on Learning Representations, 2020. 1, 2, 5
|
| 277 |
+
[2] Md Amirul Islam, Matthew Kowal, Sen Jia, Konstantinos G Derpanis, and Neil DB Bruce. Position, padding and predictions: A deeper look at position information in cnns. arXiv preprint arXiv:2101.12322, 2021. 1
|
| 278 |
+
[3] Osman Semih Kayhan and Jan C van Gemert. On translation invariance in cnns: Convolutional layers can exploit absolute spatial location. In IEEE Conference on Computer Vision and Pattern Recognition, 2020. 1, 5
|
| 279 |
+
[4] Carlo Innamorati, Tobias Ritschel, Tim Weyrich, and Niloy J Mitra. Learning on the edge: Investigating boundary filters in cnns. International Journal of Computer Vision, 2020. 1
|
| 280 |
+
[5] Chieh Hubert Lin, Yen-Chi Cheng, Hsin-Ying Lee, Sergey Tulyakov, and Ming-Hsuan Yang. InfinityGAN: Towards infinite-pixel image synthesis. In International Conference on Learning Representations, 2022. 1, 3
|
| 281 |
+
[6] Bilal Alsallakh, Narine Kokhlikyan, Vivek Miglani, Jun Yuan, and Orion Reblitz-Richardson. Mind the pad – {cnn}s can develop blind spots. In International Conference on Learning Representations, 2021. 1, 2, 3, 8
|
| 282 |
+
[7] Rui Xu, Xintao Wang, Kai Chen, Bolei Zhou, and Chen Change Loy. Positional encoding as spatial inductive bias in gans. In IEEE Conference on Computer Vision and Pattern Recognition, 2021. 1, 2, 3
|
| 283 |
+
[8] Evangelos Ntavelis, Mohamad Shahbazi, Iason Kastanis, Radu Timofte, Martin Danelljan, and Luc Van Gool. Arbitrary-scale image synthesis. In IEEE Conference on Computer Vision and Pattern Recognition, 2022. 1, 3
|
| 284 |
+
[9] Jooyoung Choi, Jungbeom Lee, Yonghyun Jeong, and Sungroh Yoon. Toward spatially unbiased generative models. In IEEE International Conference on Computer Vision, 2021. 1, 3
|
| 285 |
+
[10] Songwei Ge, Thomas Hayes, Harry Yang, Xi Yin, Guan Pang, David Jacobs, Jia-Bin Huang, and Devi Parikh. Long video generation with time-agnostic vqgan and time-sensitive transformer. arXiv preprint arXiv:2204.03638, 2022. 1, 2, 3
|
| 286 |
+
[11] Antonio Alguacil, Wagner Gonçalves Pinto, Michael Bauerheim, Marc C Jacob, and Stéphane Moreau. Effects of boundary conditions in fully convolutional networks for learning spatio-temporal dynamics. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, 2021. 1, 2, 3
|
| 287 |
+
[12] Md Amirul Islam, Matthew Kowal, Sen Jia, Konstantinos G. Derpanis, and Neil Bruce. Boundary effects in $\{ \mathrm { c n n } \} \mathrm { s }$ : Feature or bug? https://openreview.net/forum?id=M4qXqdw3xC, 2021. 1
|
| 288 |
+
[13] Bilal Alsallakh, Vivek Miglani, Narine Kokhlikyan, David Adkins, and Orion Reblitz-Richardson. Are convolutional networks inherently foveated? In SVRHM 2021 Workshop at NeurIPS, 2021. 1, 5
|
| 289 |
+
[14] Wenjie Luo, Yujia Li, Raquel Urtasun, and Richard Zemel. Understanding the effective receptive field in deep convolutional neural networks. In Neural Information Processing Systems, 2016. 1, 5
|
| 290 |
+
[15] Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 3
|
| 291 |
+
[16] Shichen Liu, Tianye Li, Weikai Chen, and Hao Li. Soft rasterizer: A differentiable renderer for image-based 3d reasoning. In IEEE International Conference on Computer Vision, 2019. 3
|
| 292 |
+
[17] Nikhila Ravi, Jeremy Reizenstein, David Novotny, Taylor Gordon, Wan-Yen Lo, Justin Johnson, and Georgia Gkioxari. Accelerating 3d deep learning with pytorch3d. arXiv preprint arXiv:2007.08501, 2020. 3
|
| 293 |
+
[18] Ran Margolin, Lihi Zelnik-Manor, and Ayellet Tal. How to evaluate foreground maps? In IEEE Conference on Computer Vision and Pattern Recognition, 2014. 7
|
| 294 |
+
[19] Nian Liu, Junwei Han, and Ming-Hsuan Yang. Picanet: Learning pixel-wise contextual attention for saliency detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 9
|
| 295 |
+
[20] Joe Mellor, Jack Turner, Amos Storkey, and Elliot J Crowley. Neural architecture search without training. In International Conference on Machine Learning, 2021. 9
|
| 296 |
+
|
| 297 |
+
# Checklist
|
| 298 |
+
|
| 299 |
+
1. For all authors...
|
| 300 |
+
|
| 301 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 302 |
+
(b) Did you describe the limitations of your work? [Yes]
|
| 303 |
+
(c) Did you discuss any potential negative societal impacts of your work? [No]
|
| 304 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 305 |
+
|
| 306 |
+
2. If you are including theoretical results...
|
| 307 |
+
|
| 308 |
+
(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A]
|
| 309 |
+
|
| 310 |
+
3. If you ran experiments...
|
| 311 |
+
|
| 312 |
+
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [No] All the codes for reproducing all results shown in the paper will be made publicly available.
|
| 313 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes]
|
| 314 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes]
|
| 315 |
+
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [No] It is not a critical computational constraint to the experiments. In order to properly report the standard deviation, we use a total of 24 GPUs over 3 clusters to train 150 CNN models on ImageNet and DUTS datasets. These computations are completely for analyses. Running our PPP metrics only need 1GB of memory on any type of GPU, or even CPU.
|
| 316 |
+
|
| 317 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 318 |
+
|
| 319 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes]
|
| 320 |
+
(b) Did you mention the license of the assets? [No] The assets used in our codes are released under MIT or BSD-3, which have no restricted usage.
|
| 321 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [No]
|
| 322 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A] We did not obtain personal data.
|
| 323 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] We did not use personal data.
|
| 324 |
+
|
| 325 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 326 |
+
|
| 327 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 328 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 329 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
parse/dev/MG3YN3z1J4M/MG3YN3z1J4M_content_list.json
ADDED
|
@@ -0,0 +1,1017 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "Unveiling The Mask of Position-Information Pattern Through the Mist of Image Features ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
183,
|
| 8 |
+
122,
|
| 9 |
+
816,
|
| 10 |
+
172
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Anonymous Author(s) \nAffiliation \nAddress \nemail ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
423,
|
| 19 |
+
226,
|
| 20 |
+
580,
|
| 21 |
+
281
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Abstract ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
462,
|
| 31 |
+
319,
|
| 32 |
+
535,
|
| 33 |
+
335
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "1 Recent studies show that paddings in convolutional neural networks encode ab \n2 solute position information which can negatively affect the model performance \n3 for certain tasks. However, existing metrics for quantifying the strength of po \n4 sitional information remain unreliable and frequently lead to erroneous results. \n5 To address this issue, we propose novel metrics for measuring (and visualizing) \n6 the encoded positional information. We formally define the encoded information \n7 as PPP (Position-information Pattern from Padding) and conduct a series of ex \n8 periments to study its properties as well as its formation. The proposed metrics \n9 measure the presence of positional information more reliably than the existing \n10 metrics based on PosENet and a test in F-Conv. We also demonstrate that for any \n11 extant (and proposed) padding schemes, PPP is primarily a learning artifact and is \n12 less dependent on the characteristics of the underlying padding schemes. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
148,
|
| 42 |
+
353,
|
| 43 |
+
767,
|
| 44 |
+
535
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "13 1 Introduction ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
148,
|
| 54 |
+
559,
|
| 55 |
+
312,
|
| 56 |
+
575
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "14 Padding, one of the most fundamental components in neural network architectures, has received \n15 much less attention than other modules. Zero padding is frequently used in CNNs, perhaps due to its \n16 simplicity and low computational costs. This design preference remains almost unchanged in the past \n17 decade. Recent studies [1, 2, 3, 4] show that padding can implicitly provide a network model with \n18 positional information. Such positional information can cause unwanted side-effects by interfering \n19 and affecting other sources of position-sensitive cues (e.g., explicit coordinate inputs [5, 6, 7, 8, 9], \n20 embeddings [10], or boundary conditions of the model [4, 11, 12]). Furthermore, padding may lead \n21 to several unintended behaviors [5, 7, 8, 9], degrade model performance [10, 11, 12], or sometimes \n22 create blind spots [6]. Meanwhile, simply ignoring the padding pixels (known as no-padding or \n23 valid-padding) leads to the foveal effect [13, 14] that causes a model to become less attentive to \n24 the features on the image border. These observations motivate us to thoroughly investigate the \n25 phenomenon of positional encoding including the impact of commonly used padding schemes. ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
147,
|
| 65 |
+
582,
|
| 66 |
+
825,
|
| 67 |
+
762
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "Conducting such a study requires a reliable metric to detect the presence of positional information introduced by padding, and more importantly, quantify its strength consistently. We observe that the existing methods for detecting and quantifying the strength of positional information yield inconsistent results. In Section 3, we revisit two closely related evaluation methods, PosENet [1] and F-Conv [3]. Our extensive experiments demonstrate that (a) metrics based on PosENet are unreliable with an unacceptably high variance, and (b) the ‘Border Handling Variants’ (BHV) test in F-Conv suffers from unaware confounding variables in its design, leading to unreliable test results. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
165,
|
| 76 |
+
770,
|
| 77 |
+
825,
|
| 78 |
+
875
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "image",
|
| 84 |
+
"img_path": "images/054c0e962fd0b59fd12f8b63f39d438a3f8703023bb28d65f74af164456564c0.jpg",
|
| 85 |
+
"image_caption": [
|
| 86 |
+
"Figure 1: Position-information Pattern from Padding (PPP). We propose a method that can consistently and effectively extract PPPs through the distributional difference between optimallypadded (gray-scale surfaces) and algorithmically-padded features (colored surfaces). The results show that the two distributions become distinguishable as the number of sample increases. Following the procedure in Section 2.2, we extract a clear view of PPP with the expectation of the pairwise differences between optimally-padded and algorithmically-padded features. We render each visualization in tilted view (first row) and top view (second row). The colors represent the magnitude (blue/cold/weak to green/warm/strong) at each pixel. The features are extracted at the 3rd layer of interest (Appendix A) from a randn-padded (Section 2.4) ResNet50 pretrained on ImageNet. "
|
| 87 |
+
],
|
| 88 |
+
"image_footnote": [],
|
| 89 |
+
"bbox": [
|
| 90 |
+
179,
|
| 91 |
+
88,
|
| 92 |
+
810,
|
| 93 |
+
333
|
| 94 |
+
],
|
| 95 |
+
"page_idx": 1
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"type": "text",
|
| 99 |
+
"text": "33 In addition, we observe all commonly-used padding schemes actually encode consistent patterns \n34 underneath the highly dynamic model features. However, such a pattern is rather obscure, noisy, \n35 and visually imperceptible1 in most cases. Fortunately, we show that such patterns can be consis \n36 tently revealed with a sufficient number of samples by defining an optimal padding scheme (see \n37 Section 2.1 and Figure 1). We accordingly propose a new evaluation paradigm and develop a method \n38 to consistently detect the presence of the Position-information Pattern from Padding (PPP), which \n39 is a persistent pattern embedded in the model features to retain positional information. We present \n40 two metrics to measure the response of PPP from the signal-to-noise perspective and demonstrate its \n41 robustness and low deviation among different settings, each with multiple trials of training. \n42 To weaken the effect of PPP, we design a padding scheme with built-in stochasticity to halt the \n43 model from constructing consistent patterns in Section 2.4. However, our experiments show that the \n44 models can still circumvent the stochasticity and end up consistently constructing certain PPPs. This \n45 observation suggests that a model likely constructs PPPs purposely to facilitate its training, rather \n46 than falsely or accidentally learning some filters that respond to padding features. \n47 With reliable PPP metrics, we conduct a series of experiments to analyze the characteristics of PPP in \n48 Section 4.1. Specifically, we monitor the formation of PPP throughout each model training process in \n49 Section 4.3. The results show PPPs are formed expeditiously at the early stage of model training, \n50 slowly but steadily strengthened through time, and eventually shaped in clear and complete patterns. \n51 These results show that a model intentionally develops and reinforces PPPs to facilitate its learning \n52 process. Moreover, we observe the PPPs of all pretrained networks are significantly stronger than \n53 those in their initial states. This indicates an unbiased training procedure is of great importance in \n54 resolving the critical failures caused by PPP in numerous vision tasks [6, 7, 10, 11]. ",
|
| 100 |
+
"bbox": [
|
| 101 |
+
147,
|
| 102 |
+
481,
|
| 103 |
+
825,
|
| 104 |
+
616
|
| 105 |
+
],
|
| 106 |
+
"page_idx": 1
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"type": "text",
|
| 110 |
+
"text": "",
|
| 111 |
+
"bbox": [
|
| 112 |
+
147,
|
| 113 |
+
623,
|
| 114 |
+
825,
|
| 115 |
+
698
|
| 116 |
+
],
|
| 117 |
+
"page_idx": 1
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "text",
|
| 121 |
+
"text": "",
|
| 122 |
+
"bbox": [
|
| 123 |
+
148,
|
| 124 |
+
705,
|
| 125 |
+
825,
|
| 126 |
+
827
|
| 127 |
+
],
|
| 128 |
+
"page_idx": 1
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "text",
|
| 132 |
+
"text": "2 Observations and Methodology ",
|
| 133 |
+
"text_level": 1,
|
| 134 |
+
"bbox": [
|
| 135 |
+
168,
|
| 136 |
+
835,
|
| 137 |
+
465,
|
| 138 |
+
852
|
| 139 |
+
],
|
| 140 |
+
"page_idx": 1
|
| 141 |
+
},
|
| 142 |
+
{
|
| 143 |
+
"type": "text",
|
| 144 |
+
"text": "In this section, we first define symbols for expressing the functionality of paddings and define the optimal-padding scheme. We then give a formal definition of Position-information Pattern from ",
|
| 145 |
+
"bbox": [
|
| 146 |
+
165,
|
| 147 |
+
857,
|
| 148 |
+
821,
|
| 149 |
+
887
|
| 150 |
+
],
|
| 151 |
+
"page_idx": 1
|
| 152 |
+
},
|
| 153 |
+
{
|
| 154 |
+
"type": "image",
|
| 155 |
+
"img_path": "images/0a7cf022609fc673da61b48cede967ee0d693a13932569575b27639dcbaaeffe.jpg",
|
| 156 |
+
"image_caption": [
|
| 157 |
+
"Figure 2: Principal point shift. (a) The stride-2 Conv2d only pads on one side, causing the principal point shift (red squares) in earlier layers. (b) Such a shift requires careful margin correction while aligning algorithmically-padded and optimally-padded features (we describe the details of point shift in Appendix A). (c) The shift is visible in the feature space (spade-shaped and question-mark-shaped patterns in the marked box). (d) It is crucial to correct the principal point shift while measuring PPP. The PPP calculation involves pixel-wise distance functions, which are not robust to spatial shifts [15]. "
|
| 158 |
+
],
|
| 159 |
+
"image_footnote": [],
|
| 160 |
+
"bbox": [
|
| 161 |
+
192,
|
| 162 |
+
92,
|
| 163 |
+
800,
|
| 164 |
+
311
|
| 165 |
+
],
|
| 166 |
+
"page_idx": 2
|
| 167 |
+
},
|
| 168 |
+
{
|
| 169 |
+
"type": "text",
|
| 170 |
+
"text": "58 Padding (PPP) and utilize the optimal-padding scheme to develop propose a method to capture PPP \n59 and measure its response with two metrics. ",
|
| 171 |
+
"bbox": [
|
| 172 |
+
150,
|
| 173 |
+
422,
|
| 174 |
+
826,
|
| 175 |
+
452
|
| 176 |
+
],
|
| 177 |
+
"page_idx": 2
|
| 178 |
+
},
|
| 179 |
+
{
|
| 180 |
+
"type": "text",
|
| 181 |
+
"text": "2.1 Optimal Padding ",
|
| 182 |
+
"text_level": 1,
|
| 183 |
+
"bbox": [
|
| 184 |
+
166,
|
| 185 |
+
462,
|
| 186 |
+
333,
|
| 187 |
+
477
|
| 188 |
+
],
|
| 189 |
+
"page_idx": 2
|
| 190 |
+
},
|
| 191 |
+
{
|
| 192 |
+
"type": "text",
|
| 193 |
+
"text": "61 The process of capturing an image from the real world can be simplified as the 3D information of \n62 the environment is first projected onto an infinitely large 2D plane, and then the camera determines \n63 resolution as well as field-of-view to form an image from such infinitely large and continuous 2D \n64 65 signals [16, 17]. Letand the collection o $S ^ { * } = \\{ s _ { n } ^ { * } \\} _ { n = 1 } ^ { N }$ be a collection of such infinitely largptured by cameras at a spatial size $( h _ { n } , w _ { n } )$ tinbe $S ^ { \\prime } = \\{ s _ { n } ^ { \\prime } \\} _ { n = 1 } ^ { N }$ \n66 A padding scheme produces a set of algorithmically-padded images $\\hat { S } = \\{ \\hat { s } _ { n } \\} _ { n = 1 } ^ { N }$ by a padding \n67 function $\\rho$ : ",
|
| 194 |
+
"bbox": [
|
| 195 |
+
147,
|
| 196 |
+
481,
|
| 197 |
+
826,
|
| 198 |
+
587
|
| 199 |
+
],
|
| 200 |
+
"page_idx": 2
|
| 201 |
+
},
|
| 202 |
+
{
|
| 203 |
+
"type": "equation",
|
| 204 |
+
"img_path": "images/68bafcc36195e583029de91c1c8b11a07c373faa0294c451d47635ca04e24204.jpg",
|
| 205 |
+
"text": "$$\n\\hat { s } _ { n } [ i , j ] = \\left\\{ { \\begin{array} { l l } { s _ { n } ^ { \\prime } [ i , j ] = s ^ { * } [ i , j ] } & { { \\mathrm { i f ~ } } 0 < i < h _ { n } { \\mathrm { ~ a n d ~ } } 0 < j < w _ { n } , } \\\\ { \\rho ( s _ { n } ^ { \\prime } , i , j ) } & { { \\mathrm { o t h e r w i s e } } , } \\end{array} } \\right.\n$$",
|
| 206 |
+
"text_format": "latex",
|
| 207 |
+
"bbox": [
|
| 208 |
+
287,
|
| 209 |
+
585,
|
| 210 |
+
707,
|
| 211 |
+
622
|
| 212 |
+
],
|
| 213 |
+
"page_idx": 2
|
| 214 |
+
},
|
| 215 |
+
{
|
| 216 |
+
"type": "text",
|
| 217 |
+
"text": "68 where $i$ and $j$ are index of a pixel in the spatial dimension. We define a theoretical optimally-padded collection 69 ${ \\cal { S } } ^ { \\dagger } = \\{ s _ { n } ^ { \\dagger } \\} _ { n = 1 } ^ { N }$ with an optimal-padding function $\\rho ^ { \\dagger }$ by: ",
|
| 218 |
+
"bbox": [
|
| 219 |
+
145,
|
| 220 |
+
625,
|
| 221 |
+
826,
|
| 222 |
+
656
|
| 223 |
+
],
|
| 224 |
+
"page_idx": 2
|
| 225 |
+
},
|
| 226 |
+
{
|
| 227 |
+
"type": "equation",
|
| 228 |
+
"img_path": "images/4de75b0b58ac55b982bd23937978ccac6a21ffc24a8022ec19b26da5a1084e46.jpg",
|
| 229 |
+
"text": "$$\n\\begin{array} { r } { s _ { n } ^ { \\dagger } [ i , j ] = \\left\\{ { s _ { n } ^ { \\prime } [ i , j ] } \\atop { \\rho ^ { \\dagger } ( s _ { n } ^ { \\prime } , i , j ) } \\right. \\ } & { = s ^ { * } [ i , j ] \\quad \\mathrm { i f ~ } 0 < i < h _ { n } \\mathrm { ~ a n d ~ } 0 < j < w _ { n } , } \\\\ { s ^ { \\dagger } _ { n } [ i , j ] = \\left\\{ { s _ { n } ^ { \\prime } [ i , j ] } \\atop { \\rho ^ { \\dagger } ( s _ { n } ^ { \\prime } , i , j ) } \\right. \\ } & { = s ^ { * } [ i , j ] \\quad \\mathrm { o t h e r w i s e } . } \\end{array}\n$$",
|
| 230 |
+
"text_format": "latex",
|
| 231 |
+
"bbox": [
|
| 232 |
+
267,
|
| 233 |
+
659,
|
| 234 |
+
725,
|
| 235 |
+
694
|
| 236 |
+
],
|
| 237 |
+
"page_idx": 2
|
| 238 |
+
},
|
| 239 |
+
{
|
| 240 |
+
"type": "text",
|
| 241 |
+
"text": "70 In practice, such an optimal-padding scheme is difficult to achieve. However, it can be simulated if we have access to images beyond the sizes 71 $( h _ { n } , w _ { n } )$ and artificially create $S ^ { \\prime }$ . ",
|
| 242 |
+
"bbox": [
|
| 243 |
+
148,
|
| 244 |
+
695,
|
| 245 |
+
826,
|
| 246 |
+
726
|
| 247 |
+
],
|
| 248 |
+
"page_idx": 2
|
| 249 |
+
},
|
| 250 |
+
{
|
| 251 |
+
"type": "text",
|
| 252 |
+
"text": "2.2 Positional-information Pattern from Padding ",
|
| 253 |
+
"text_level": 1,
|
| 254 |
+
"bbox": [
|
| 255 |
+
163,
|
| 256 |
+
734,
|
| 257 |
+
527,
|
| 258 |
+
750
|
| 259 |
+
],
|
| 260 |
+
"page_idx": 2
|
| 261 |
+
},
|
| 262 |
+
{
|
| 263 |
+
"type": "text",
|
| 264 |
+
"text": "73 As PPP has not been well defined in the literature, there is no effective metric to detect or quantify it. \n74 Ideally, PPP should have two properties. First, it is a spatial pattern as the padding pixels at different \n75 locations contribute differently to the formation of PPP. Its shape enables the network to develop and \n76 exploit the absolute positional information of each pixel, eventually leading to the unattended and \n77 undesirable effects in certain tasks [5, 6, 7, 8, 9, 10, 11]. \n78 Second, as it represents the positional information purely contributed by the padding, it is a constant \n79 term irrelevant to the image contents. Unfortunately, PPP shares space with image features, and \n80 these two spaces interfere with each other, causing the appearance of PPP extremely obscure in most \n81 cases (except zeros padding). Figure 1 shows if we visualize features sample-by-sample, there are \n82 no obvious differences between optimally-padded features (gray-scale surface) and algorithmically \n83 padded features (colored surface). Fortunately, if we assume the interferences between PPP and \n84 image features to be random, then its expectation over a large set of images will saturate to a constant \n85 bias and no longer hinder us from capturing PPP. \n86 Based on these observations, we define PPP as the constant component independent of model inputs, \n87 and its presence is completely contributed by the existence of a padding scheme $\\rho$ . Given $\\hat { S }$ and a \n88 model $F ( \\hat { s } ; \\theta , \\rho )$ , which $\\theta$ is the model parameters and $\\rho$ is a padding scheme applied to $F$ . Let the \n89 model feature extracted at $k$ -th layer be $f _ { n , k } = F _ { k } ( \\hat { s } _ { n } ; \\theta , \\rho )$ , where $F _ { k }$ is the model from the first \n90 layer to the $k$ -th layer. The PPP at $k$ -th layer $( P P P _ { k } )$ can be formulated by: ",
|
| 265 |
+
"bbox": [
|
| 266 |
+
147,
|
| 267 |
+
753,
|
| 268 |
+
825,
|
| 269 |
+
830
|
| 270 |
+
],
|
| 271 |
+
"page_idx": 2
|
| 272 |
+
},
|
| 273 |
+
{
|
| 274 |
+
"type": "text",
|
| 275 |
+
"text": "",
|
| 276 |
+
"bbox": [
|
| 277 |
+
147,
|
| 278 |
+
835,
|
| 279 |
+
825,
|
| 280 |
+
912
|
| 281 |
+
],
|
| 282 |
+
"page_idx": 2
|
| 283 |
+
},
|
| 284 |
+
{
|
| 285 |
+
"type": "text",
|
| 286 |
+
"text": "",
|
| 287 |
+
"bbox": [
|
| 288 |
+
147,
|
| 289 |
+
90,
|
| 290 |
+
825,
|
| 291 |
+
136
|
| 292 |
+
],
|
| 293 |
+
"page_idx": 3
|
| 294 |
+
},
|
| 295 |
+
{
|
| 296 |
+
"type": "text",
|
| 297 |
+
"text": "",
|
| 298 |
+
"bbox": [
|
| 299 |
+
145,
|
| 300 |
+
142,
|
| 301 |
+
825,
|
| 302 |
+
218
|
| 303 |
+
],
|
| 304 |
+
"page_idx": 3
|
| 305 |
+
},
|
| 306 |
+
{
|
| 307 |
+
"type": "equation",
|
| 308 |
+
"img_path": "images/52f61a351b948c7cf0bc7a7c482e18a52883fbb8aced97f16e95806d7d12ae12.jpg",
|
| 309 |
+
"text": "$$\n\\begin{array} { r } { \\mathsf { P P P } _ { k } \\ = \\ \\underset { n } { \\mathbb { E } } \\left[ \\textit { d } \\big ( \\begin{array} { l } { F _ { k } ( s _ { n } ^ { \\dagger } ; \\theta , \\rho ^ { \\dagger } ) , F _ { k } ( \\hat { s } _ { n } ; \\theta , \\rho ) } \\end{array} \\big ) \\ \\right] \\ , } \\end{array}\n$$",
|
| 310 |
+
"text_format": "latex",
|
| 311 |
+
"bbox": [
|
| 312 |
+
326,
|
| 313 |
+
219,
|
| 314 |
+
668,
|
| 315 |
+
243
|
| 316 |
+
],
|
| 317 |
+
"page_idx": 3
|
| 318 |
+
},
|
| 319 |
+
{
|
| 320 |
+
"type": "text",
|
| 321 |
+
"text": "91 where $d ( \\cdot , \\cdot )$ can be any distance function, and we use $\\ell _ { 1 }$ distance in this work. ",
|
| 322 |
+
"bbox": [
|
| 323 |
+
151,
|
| 324 |
+
244,
|
| 325 |
+
687,
|
| 326 |
+
260
|
| 327 |
+
],
|
| 328 |
+
"page_idx": 3
|
| 329 |
+
},
|
| 330 |
+
{
|
| 331 |
+
"type": "text",
|
| 332 |
+
"text": "Pitfalls: feature misalignment. It is important to note that, some CNN components can cause serious feature misalignment while computing PPP and leads to erroneous results. A typical example is principal point shift, where the uneven padding in stride-2 convolution causes the centers of features slightly drifted, as shown in Figure 2. Since the measurement of PPP requires perfect alignment, such a drift should be carefully considered while integrating PPP into new architectures. We further discuss the issue along with other pitfalls in Appendix A and provide three detailed examples of correcting the principal point shifting. ",
|
| 333 |
+
"bbox": [
|
| 334 |
+
171,
|
| 335 |
+
266,
|
| 336 |
+
825,
|
| 337 |
+
372
|
| 338 |
+
],
|
| 339 |
+
"page_idx": 3
|
| 340 |
+
},
|
| 341 |
+
{
|
| 342 |
+
"type": "text",
|
| 343 |
+
"text": "2.3 Metrics ",
|
| 344 |
+
"text_level": 1,
|
| 345 |
+
"bbox": [
|
| 346 |
+
173,
|
| 347 |
+
381,
|
| 348 |
+
267,
|
| 349 |
+
396
|
| 350 |
+
],
|
| 351 |
+
"page_idx": 3
|
| 352 |
+
},
|
| 353 |
+
{
|
| 354 |
+
"type": "text",
|
| 355 |
+
"text": "In order to measure the strength of PPP, a proper baseline signal is needed. As discussed above, a strong PPP should be distinguishable from the interferences of the model features, so that the model can successfully extract the positional information from PPP. Thus, if we consider the model features as a background noise signal and PPP as the signal of interest, we can measure the significance of PPP using the signal-to-noise ratio (SNR). We define the SNR for PPP at $k$ -th layer as: ",
|
| 356 |
+
"bbox": [
|
| 357 |
+
171,
|
| 358 |
+
400,
|
| 359 |
+
826,
|
| 360 |
+
477
|
| 361 |
+
],
|
| 362 |
+
"page_idx": 3
|
| 363 |
+
},
|
| 364 |
+
{
|
| 365 |
+
"type": "equation",
|
| 366 |
+
"img_path": "images/10c598b5adb4be0465ace0f5fa85852dc4afefdfbcc79463e3442737a5eb8e61.jpg",
|
| 367 |
+
"text": "$$\n\\begin{array} { r } { \\mathrm { S N R } \\mathrm { - P P P } _ { k } \\ = \\ \\mu \\left( \\underset { n } { \\mathbb { E } } \\left[ \\begin{array} { l } { | } \\end{array} \\middle | F _ { k } \\big ( s _ { n } ^ { \\dagger } ; \\theta , \\rho ^ { \\dagger } \\big ) \\ - \\ F _ { k } \\big ( \\hat { s } _ { n } ; \\theta , \\rho \\big ) \\ B _ { 1 } \\ \\right] \\ \\right) \\ / \\ \\sigma \\big ( \\ F _ { k } \\big ( \\hat { s } _ { n } ; \\theta , \\rho \\big ) \\ \\big ) , } \\end{array}\n$$",
|
| 368 |
+
"text_format": "latex",
|
| 369 |
+
"bbox": [
|
| 370 |
+
214,
|
| 371 |
+
477,
|
| 372 |
+
779,
|
| 373 |
+
511
|
| 374 |
+
],
|
| 375 |
+
"page_idx": 3
|
| 376 |
+
},
|
| 377 |
+
{
|
| 378 |
+
"type": "text",
|
| 379 |
+
"text": "where $\\mu$ and $\\sigma$ are the mean and standard deviation on the spatial dimensions. ",
|
| 380 |
+
"bbox": [
|
| 381 |
+
176,
|
| 382 |
+
511,
|
| 383 |
+
684,
|
| 384 |
+
526
|
| 385 |
+
],
|
| 386 |
+
"page_idx": 3
|
| 387 |
+
},
|
| 388 |
+
{
|
| 389 |
+
"type": "text",
|
| 390 |
+
"text": "106 However, SNR only measures the significance of the signal versus the noise but ignores the location \n107 of the signal. Given PPP is a spatially varying pattern, we further include Mean Absolute Error \n108 (MAE) to measure PPP versus the average of the noise map with: ",
|
| 391 |
+
"bbox": [
|
| 392 |
+
142,
|
| 393 |
+
531,
|
| 394 |
+
825,
|
| 395 |
+
577
|
| 396 |
+
],
|
| 397 |
+
"page_idx": 3
|
| 398 |
+
},
|
| 399 |
+
{
|
| 400 |
+
"type": "equation",
|
| 401 |
+
"img_path": "images/b98c66d804749f9775d912f986e112dfe0435c3ac36b66875072d70428ad72b7.jpg",
|
| 402 |
+
"text": "$$\n\\begin{array} { r } { \\mathbf { M A E - P P P } _ { k } \\ = \\ \\underset { n } { \\mathbb { E } } \\left[ \\ \\mathbf { M A E } \\left( \\ F _ { k } ( s _ { n } ^ { \\dagger } ; \\theta , \\rho ^ { \\dagger } ) \\ , \\ F _ { k } ( \\hat { s } _ { n } ; \\theta , \\rho ) \\ \\right) \\ \\right] \\ . } \\end{array}\n$$",
|
| 403 |
+
"text_format": "latex",
|
| 404 |
+
"bbox": [
|
| 405 |
+
290,
|
| 406 |
+
578,
|
| 407 |
+
704,
|
| 408 |
+
603
|
| 409 |
+
],
|
| 410 |
+
"page_idx": 3
|
| 411 |
+
},
|
| 412 |
+
{
|
| 413 |
+
"type": "text",
|
| 414 |
+
"text": "2.4 Randn Padding ",
|
| 415 |
+
"text_level": 1,
|
| 416 |
+
"bbox": [
|
| 417 |
+
173,
|
| 418 |
+
613,
|
| 419 |
+
323,
|
| 420 |
+
628
|
| 421 |
+
],
|
| 422 |
+
"page_idx": 3
|
| 423 |
+
},
|
| 424 |
+
{
|
| 425 |
+
"type": "text",
|
| 426 |
+
"text": "10 Most of the existing padding schemes (e.g., zeros, reflect, replicate, circular) exhibit certain consistent \n11 patterns that can be easily detected by some designed convolutional kernels. One may argue that the \n12 nature of easy detectability can be a root cause of encouraging the models to learn to rely on these \n113 obvious patterns. This motivates us to design an additional sampling-based padding scheme without \n114 any consistent patterns, namely randn (i.e., random normal) padding, which produces dynamical \n15 values from a normal distribution while following the local statistics. We first determine the maximal \n116 and minimal values of a sliding window (which can be easily achieved with max-pooling), use the \n17 average of them as a proxy mean $\\mu _ { p }$ , and use the difference between the mean and the maximal \n118 value as a proxy standard deviation $\\sigma _ { p }$ . For each padding location, we sample the padding value \n119 according to a normal distribution $\\mathcal { N } ( \\mu _ { p } , \\sigma _ { p } ^ { 2 } )$ from the nearest sliding window. We include more \n120 implementation details in Appendix A. \n121 Aside from creating a pattern-less padding scheme with sampling, the design of randn padding is \n122 based on several factors. The sampled padding pixels are allowed to occasionally exceed the min/max \n123 bound of the sliding window. Without breaking the min/max bound can introduce detectable patterns \n124 in certain extreme cases, such as a gradient-like feature that has its maximal intensity at the top-left \n125 corner and minimal intensity at the bottom-right corner. We also design the padding scheme to \n126 follow the local distribution. The padding exhibits a high entropy when the local variation is high, \n127 while degenerates to value repetition with imperceptible perturbations while padding a flat area. As ",
|
| 427 |
+
"bbox": [
|
| 428 |
+
148,
|
| 429 |
+
632,
|
| 430 |
+
825,
|
| 431 |
+
799
|
| 432 |
+
],
|
| 433 |
+
"page_idx": 3
|
| 434 |
+
},
|
| 435 |
+
{
|
| 436 |
+
"type": "text",
|
| 437 |
+
"text": "",
|
| 438 |
+
"bbox": [
|
| 439 |
+
140,
|
| 440 |
+
806,
|
| 441 |
+
825,
|
| 442 |
+
912
|
| 443 |
+
],
|
| 444 |
+
"page_idx": 3
|
| 445 |
+
},
|
| 446 |
+
{
|
| 447 |
+
"type": "text",
|
| 448 |
+
"text": "such, not only do the padding pixels exhibit less pattern, but it also prevents the padding pixels from breaking the features in the border region. We later show that a model still deliberately and incredibly built up PPP over time even with such a sophisticated padding scheme. ",
|
| 449 |
+
"bbox": [
|
| 450 |
+
166,
|
| 451 |
+
90,
|
| 452 |
+
823,
|
| 453 |
+
136
|
| 454 |
+
],
|
| 455 |
+
"page_idx": 4
|
| 456 |
+
},
|
| 457 |
+
{
|
| 458 |
+
"type": "text",
|
| 459 |
+
"text": "3 Revisiting Prior Work ",
|
| 460 |
+
"text_level": 1,
|
| 461 |
+
"bbox": [
|
| 462 |
+
174,
|
| 463 |
+
147,
|
| 464 |
+
390,
|
| 465 |
+
165
|
| 466 |
+
],
|
| 467 |
+
"page_idx": 4
|
| 468 |
+
},
|
| 469 |
+
{
|
| 470 |
+
"type": "text",
|
| 471 |
+
"text": "In this section, we first reproduce two experiments from the prior art, which aim to assess positional information from paddings. We show several critical design issues in these experiments and discuss how these problems affect the drawn conclusions. Finally, we propose two additional experiments to quantify the amount of positional information embedded in the paddings. ",
|
| 472 |
+
"bbox": [
|
| 473 |
+
174,
|
| 474 |
+
170,
|
| 475 |
+
825,
|
| 476 |
+
231
|
| 477 |
+
],
|
| 478 |
+
"page_idx": 4
|
| 479 |
+
},
|
| 480 |
+
{
|
| 481 |
+
"type": "text",
|
| 482 |
+
"text": "3.1 PosENet ",
|
| 483 |
+
"text_level": 1,
|
| 484 |
+
"bbox": [
|
| 485 |
+
173,
|
| 486 |
+
242,
|
| 487 |
+
272,
|
| 488 |
+
257
|
| 489 |
+
],
|
| 490 |
+
"page_idx": 4
|
| 491 |
+
},
|
| 492 |
+
{
|
| 493 |
+
"type": "text",
|
| 494 |
+
"text": "Islam et al. show zeros-padding provides CNN models positional information cues, and propose PosENet [1] to quantify the amount of positional information encoded within CNN features. A PosENet experiment involves several components: a pretrained CNN model $F$ , a shallow CNN $E _ { p e m }$ (i.e., position encoding module), an image dataset $X = \\{ x _ { i } \\} _ { i = 1 } ^ { N }$ to examine, and a constant target pattern $y$ (e.g., 2D Gaussian pattern). PosENet first extracts intermediate features at $k$ - th layer with $f _ { ( i , k ) } = F _ { k } ( x _ { i } )$ using the pretrained CNN, and then optimizes $E _ { p e m }$ to minimize $\\mathbb { E } _ { i , k } \\big [ | | E _ { p e m } ( f _ { ( i , k ) } ) - y | | _ { 2 } \\big ]$ . Finally, the amount of positional information is quantified by the average Spearman’s correlation (SPC) and Mean Absolute Error (MAE) overall $E _ { p e m } ( f _ { ( i , k ) } )$ toward $y$ . ",
|
| 495 |
+
"bbox": [
|
| 496 |
+
169,
|
| 497 |
+
262,
|
| 498 |
+
825,
|
| 499 |
+
383
|
| 500 |
+
],
|
| 501 |
+
"page_idx": 4
|
| 502 |
+
},
|
| 503 |
+
{
|
| 504 |
+
"type": "text",
|
| 505 |
+
"text": "145 A critical issue with PosENet is the use of an optimization-based metric. It is sensitive to hyper \n146 parameters with large variation. As shown in Table 2, for all the PosENet results, the standard \n147 deviation over five trials significantly dominates the differences between different types of paddings, \n148 and thus no definitive conclusions can be drawn. We also observed that PosENet can report NaN \n149 results in certain setups. Furthermore, PosENet quantifies the amount of positional information by \n150 the faithfulness of the final reconstruction. However, a better reconstruction does not have a clear \n151 relationship to measuring the strength and significance of positional information. For instance, the \n152 VGG architecture with zeros-padding in Table 2, PosENet cannot recognize the positional information \n153 has been strengthened after training, which can be seen in Figure 4. PosENet falsely assigns a much \n154 lower SPC to the fully pretrained model. Moreover, for the no-padding entries in Table 2, PosENet \n155 can still sometimes show responses to no-padding models, demonstrating it is a metric with an \n156 indefinite bias pending on the memorization ability of $E _ { p e m }$ . ",
|
| 506 |
+
"bbox": [
|
| 507 |
+
140,
|
| 508 |
+
390,
|
| 509 |
+
825,
|
| 510 |
+
571
|
| 511 |
+
],
|
| 512 |
+
"page_idx": 4
|
| 513 |
+
},
|
| 514 |
+
{
|
| 515 |
+
"type": "text",
|
| 516 |
+
"text": "Another issue is that the no-padding scheme used in $E _ { p e m }$ is known to have the foveal effect [13, 14], where a model pays less attention to the information on the edge of inputs. Using such a padding scheme for detecting positional information from paddings, which is mostly concentrated on the edge of the feature maps, is less effective. This is an inevitable dilemma as PosENet aims to identify positional information from the padding of the pretrained $F$ , while applying any padding scheme to $E _ { p e m }$ introduces intractable effects between the paddings of the two models. ",
|
| 517 |
+
"bbox": [
|
| 518 |
+
163,
|
| 519 |
+
578,
|
| 520 |
+
825,
|
| 521 |
+
669
|
| 522 |
+
],
|
| 523 |
+
"page_idx": 4
|
| 524 |
+
},
|
| 525 |
+
{
|
| 526 |
+
"type": "text",
|
| 527 |
+
"text": "3.2 F-Conv ",
|
| 528 |
+
"text_level": 1,
|
| 529 |
+
"bbox": [
|
| 530 |
+
173,
|
| 531 |
+
680,
|
| 532 |
+
264,
|
| 533 |
+
694
|
| 534 |
+
],
|
| 535 |
+
"page_idx": 4
|
| 536 |
+
},
|
| 537 |
+
{
|
| 538 |
+
"type": "text",
|
| 539 |
+
"text": "64 Kayhan et al. propose a full-padding scheme (F-Conv) [3] and demonstrate it is more translational \n65 invariant than the alternatives. One of the critical results is on “border handling variants” (Exp 2 \n66 of [3]), which we call it BHV test. The BHV test creates a toy dataset, where each image has a black \n67 background with a green square and a red square in the foreground. The task is to predict if the red \n68 square is on the left of the green square (class 1), or vice versa (class 2). In addition, Kayhan et al. \n69 intentionally adds a location bias such that both squares are located in the upper half of the image for \n70 class 1, and located in the lower half of the image for class 2. During testing, a “similar test” inherits \n71 the same bias, while a “dissimilar test” exchanges the bias (i.e., both squares are in the lower half \n72 of the image for class 1). As a truly translation-invariant CNN model should not be affected by the \n73 location bias, it should focus on the relation between the red and green squares and perform similarly \n74 on both tests. Since the experimental results show that F-Conv performs best on the dissimilar test, it \n75 is concluded that F-Conv is less sensitive to the location bias. The authors also conclude the circular \n76 padding performs worse due to the behavior of wrapping the pixels to the other side of the image, \n77 which leads to confusion between two classes. \n178 However, as shown in Figure 3, we find the experimental design \n179 does not consider a crucial confounding variable: the black back \n180 ground has a zero intensity, making zeros padding the optimal \n181 padding that perfectly follows the background distribution. In Ta \n182 ble 1, we show that the dissimilar test is no longer in favor of \n183 F-Conv zeros after changing the background color to grey. We also \n184 show that F-Conv replicate and F-Conv circular perform best on \n185 the dissimilar test, which is different from the original observation. ",
|
| 540 |
+
"bbox": [
|
| 541 |
+
151,
|
| 542 |
+
700,
|
| 543 |
+
825,
|
| 544 |
+
911
|
| 545 |
+
],
|
| 546 |
+
"page_idx": 4
|
| 547 |
+
},
|
| 548 |
+
{
|
| 549 |
+
"type": "table",
|
| 550 |
+
"img_path": "images/be8f1b07ba3f3130d01a03a6f3d453a736519a874a49e2e3edacd64c6c67d748.jpg",
|
| 551 |
+
"table_caption": [
|
| 552 |
+
"Table 1: Background color as a critical confounding variable in BHV test. We show that using a grey background similar to Figure 3 leads to discrepant results. The standard deviations are reported among 10 individual trials. We mark the best performance in green, and the worst two in red. "
|
| 553 |
+
],
|
| 554 |
+
"table_footnote": [],
|
| 555 |
+
"table_body": "<table><tr><td rowspan=\"2\">Padding</td><td rowspan=\"2\">F-Conv?</td><td colspan=\"4\">Black Background</td><td colspan=\"4\">Grey Background</td></tr><tr><td>Similar (%)</td><td>Dissimilar (%)</td><td>Diff (%)</td><td>Inconsistency (%)</td><td>Similar (%)</td><td>Dissimilar (%)</td><td>Diff (%)</td><td>Inconsistency (%)</td></tr><tr><td rowspan=\"2\">Zeros</td><td>N</td><td>99.83±0.00</td><td>3.21± 8.35</td><td>-87.68</td><td>95.81± 2.07</td><td>100.00± 0.00</td><td>4.96± 5.93</td><td>-95.04</td><td>97.85± 4.55</td></tr><tr><td>Y</td><td>89.24±0.98</td><td>89.24±0.98</td><td>0.00</td><td>18.02± 8.08</td><td>100.00±0.00</td><td>4.77± 6.52</td><td>95.23</td><td>96.79±7.13</td></tr><tr><td rowspan=\"2\">Circular</td><td>N</td><td>80.31±3.23</td><td>80.31± 3.23</td><td>0.00</td><td>34.25± 8.32</td><td>72.75± 0.96</td><td>72.75± 0.96</td><td>0.00</td><td>26.30± 5.55</td></tr><tr><td>Y</td><td>99.20±0.23</td><td>93.14± 2.88</td><td>-6.06</td><td>18.48±3.55</td><td>98.26± 0.50</td><td>92.40±4.23</td><td>-5.87</td><td>28.67± 6.18</td></tr><tr><td rowspan=\"2\">Reflect</td><td>N</td><td>100.00±0.00</td><td>15.67±12.72</td><td>-84.33</td><td>91.18±13.19</td><td>100.00±0.00</td><td>19.96±13.54</td><td>-80.04</td><td>90.33±11.95</td></tr><tr><td>Y</td><td>100.00±0.00</td><td>11.70±15.38</td><td>-88.30</td><td>97.33± 6.16</td><td>100.00±0.00</td><td>17.16±12.19</td><td>-82.84</td><td>98.13± 3.44</td></tr><tr><td rowspan=\"2\">Replicate</td><td>N</td><td>100.00±0.00</td><td>43.39±11.42</td><td>-56.61</td><td>75.32± 8.20</td><td>100.00± 0.00</td><td>33.16± 6.42</td><td>-66.83</td><td>84.09± 6.47</td></tr><tr><td>Y</td><td>98.32±0.39</td><td>93.65± 1.36</td><td>-4.67</td><td>32.60± 4.97</td><td>97.17± 0.48</td><td>94.99± 1.20</td><td>-2.18</td><td>32.15± 5.11</td></tr><tr><td rowspan=\"2\">Randn</td><td>N</td><td>100.00±0.00</td><td>10.31±12.56</td><td>-89.70</td><td>94.88± 5.55</td><td>99.97± 0.13</td><td>35.47±10.82</td><td>-64.50</td><td>83.59± 8.48</td></tr><tr><td>Y</td><td>100.00±0.00</td><td>20.80±14.15</td><td>-79.20</td><td>92.54±8.37</td><td>77.28±16.13</td><td>66.70±11.58</td><td>-10.59</td><td>45.70±20.62</td></tr><tr><td>No-pad</td><td>-</td><td>100.00±0.00</td><td>3.21± 8.35</td><td>-96.79</td><td>95.81± 2.07</td><td>100.00± 0.00</td><td>30.07± 4.06</td><td>-69.93</td><td>81.30± 2.44</td></tr></table>",
|
| 556 |
+
"bbox": [
|
| 557 |
+
173,
|
| 558 |
+
137,
|
| 559 |
+
826,
|
| 560 |
+
311
|
| 561 |
+
],
|
| 562 |
+
"page_idx": 5
|
| 563 |
+
},
|
| 564 |
+
{
|
| 565 |
+
"type": "text",
|
| 566 |
+
"text": "",
|
| 567 |
+
"bbox": [
|
| 568 |
+
140,
|
| 569 |
+
333,
|
| 570 |
+
607,
|
| 571 |
+
454
|
| 572 |
+
],
|
| 573 |
+
"page_idx": 5
|
| 574 |
+
},
|
| 575 |
+
{
|
| 576 |
+
"type": "text",
|
| 577 |
+
"text": "Finally, we report an additional inconsistency rate to show that the CNN architecture used in the BHV test actually has access to the absolute position of the squares. Given a random sample in class 1, we create a trajectory of samples by simultaneously moving the two squares to the bottom of the canvas and recording the CNNmodel prediction in all intermediate states. We label a trajectory to be inconsistent if the prediction of the CNN-model switches classes at any step of the trajectory. A CNN model with no access to the absolute-position information should have all trajectories maintaining consistent predictions, with $0 \\%$ inconsistency. Table 1 shows the inconsistent ratio over 228 uniformly sampled trajectories, where all models maintain high inconsistency rates, even with a no-padding architecture. These results show that the CNN model used in the BHV test is not translation invariant. This can be attributed to that a CNN model has a large receptive field covering the whole experiment canvas, therefore capable of gradually constructing absolute coordinates for each input pixel. Note that we only show the design of the BHV test is not suitable for quantifying the amount of positional information exhibited in a CNN model. Such a conclusion does not imply that F-Conv cannot potentially improve the translation-invariant property of CNNs. ",
|
| 578 |
+
"bbox": [
|
| 579 |
+
160,
|
| 580 |
+
460,
|
| 581 |
+
607,
|
| 582 |
+
611
|
| 583 |
+
],
|
| 584 |
+
"page_idx": 5
|
| 585 |
+
},
|
| 586 |
+
{
|
| 587 |
+
"type": "image",
|
| 588 |
+
"img_path": "images/73c9a1245b33bca1e4c9aa83e8883fabfe480fe9b808f2bcb99b210b747e2d70.jpg",
|
| 589 |
+
"image_caption": [
|
| 590 |
+
"Figure 3: The BHV test trains a binary classifier to predict the relative position of the two colored squares. It hypothesizes if the padding provides no positional information, the classifier will only focus on the relative position of the two squares. (Left) The black background is a confounding variable. (Right) Zeros padding no-longer pads optimum values after changing the background color. "
|
| 591 |
+
],
|
| 592 |
+
"image_footnote": [],
|
| 593 |
+
"bbox": [
|
| 594 |
+
620,
|
| 595 |
+
337,
|
| 596 |
+
821,
|
| 597 |
+
412
|
| 598 |
+
],
|
| 599 |
+
"page_idx": 5
|
| 600 |
+
},
|
| 601 |
+
{
|
| 602 |
+
"type": "text",
|
| 603 |
+
"text": "",
|
| 604 |
+
"bbox": [
|
| 605 |
+
173,
|
| 606 |
+
612,
|
| 607 |
+
825,
|
| 608 |
+
732
|
| 609 |
+
],
|
| 610 |
+
"page_idx": 5
|
| 611 |
+
},
|
| 612 |
+
{
|
| 613 |
+
"type": "text",
|
| 614 |
+
"text": "4 Experiments and Analysis ",
|
| 615 |
+
"text_level": 1,
|
| 616 |
+
"bbox": [
|
| 617 |
+
169,
|
| 618 |
+
741,
|
| 619 |
+
424,
|
| 620 |
+
758
|
| 621 |
+
],
|
| 622 |
+
"page_idx": 5
|
| 623 |
+
},
|
| 624 |
+
{
|
| 625 |
+
"type": "text",
|
| 626 |
+
"text": "Datasets Since most vision models are trained on tasks for recognizing objects, an image collection containing a diverse object appearance is more suitable for the task. We collect a set of 480 satellite images at $2 , 0 4 8 \\times 2 , 0 4 8$ pixels from Google Map for experiments. All the PPP metrics are measured with this image collection. We crop such images depending on the requested input image sizes and principal point shifts from each model (see Appendix A for details). We will release the script for collecting and composing these large images. ",
|
| 627 |
+
"bbox": [
|
| 628 |
+
173,
|
| 629 |
+
762,
|
| 630 |
+
825,
|
| 631 |
+
853
|
| 632 |
+
],
|
| 633 |
+
"page_idx": 5
|
| 634 |
+
},
|
| 635 |
+
{
|
| 636 |
+
"type": "text",
|
| 637 |
+
"text": "4.1 Visualizing Position-information Pattern from Padding (PPP) ",
|
| 638 |
+
"text_level": 1,
|
| 639 |
+
"bbox": [
|
| 640 |
+
169,
|
| 641 |
+
862,
|
| 642 |
+
640,
|
| 643 |
+
877
|
| 644 |
+
],
|
| 645 |
+
"page_idx": 5
|
| 646 |
+
},
|
| 647 |
+
{
|
| 648 |
+
"type": "text",
|
| 649 |
+
"text": "212 We start with visualizing PPP in Figure 4. All the visualizations are conducted at the 4th layer of \n213 interest as detailed in Appendix A. We compute PPP using Eq. 3 and $\\ell _ { 1 }$ norm as the distance metric, \n214 then average the resulting PPP in the channel dimension to generate a gray-scale image. Since the \n215 quantities are small and difficult to perceive, we normalize the gray-scale image to [0, 1] range, and \n216 thus the colors between images are not directly comparable. \n217 In all scenarios, a noticeable difference is that PPP spreads out after pretraining on ImageNet. \n218 In Table 2, the PPP-SNR of the VGG19 and ResNet50 also reflects that the response of PPP is \n219 significantly strengthened after model training. That is, the model training has substantial effects on \n220 the construction of PPP. Although the formation of padding pattern is suggested to mainly caused by \n21 the distributional difference between features and paddings [6], our results show that it only increases \n22 the response slightly, compared to the considerable PPP-SNR gain through training. ",
|
| 650 |
+
"bbox": [
|
| 651 |
+
143,
|
| 652 |
+
882,
|
| 653 |
+
828,
|
| 654 |
+
911
|
| 655 |
+
],
|
| 656 |
+
"page_idx": 5
|
| 657 |
+
},
|
| 658 |
+
{
|
| 659 |
+
"type": "table",
|
| 660 |
+
"img_path": "images/2fe9eef08dd5a51ac883a6dc01e06e733100bda2cd94a57391752b49add3ffca.jpg",
|
| 661 |
+
"table_caption": [
|
| 662 |
+
"Table 2: Comparing PosENet and our proposed PPP metrics. The standard deviation is computed by five different pretrained models for each test. The performance shows the accuracy for the classification task or weighted F-measure score [18] for the saliency object detection task. Note that we use 2D Gaussian as PosENet reconstruction pattern, and the PPP metrics are measured at the 4th layer of interest. Here, $( ^ { * } )$ indicates a NaN is reported in any of the trials, and (↑) indicates a higher value corresponds to stronger positional information or better performance on the task (vice versa for (↓)). For each group of pretrained models, we label the strongest and weakest positional information response with red and blue. "
|
| 663 |
+
],
|
| 664 |
+
"table_footnote": [],
|
| 665 |
+
"table_body": "<table><tr><td rowspan=\"2\">Model</td><td rowspan=\"2\">Padding</td><td rowspan=\"2\">Pretrained</td><td colspan=\"2\">PosENet</td><td colspan=\"2\">PPP (ours)</td><td rowspan=\"2\">Performance (个)</td></tr><tr><td>SPC (1)</td><td>MAE (↓)</td><td>SNR-PPP (↑)</td><td>MAE-PPP (↑)</td></tr><tr><td rowspan=\"10\">VGG-19</td><td rowspan=\"2\">Zeros</td><td rowspan=\"2\">× ImageNet</td><td>0.518±0.121</td><td>0.184±0.004</td><td>0.0665±0.0024</td><td>0.0132±0.0006</td><td rowspan=\"2\">74.0972±0.0870</td></tr><tr><td>0.142±0.139</td><td>0.194±0.006</td><td>1.2289±0.0613</td><td>0.0176±0.0005</td></tr><tr><td rowspan=\"2\">Circular</td><td rowspan=\"2\">× ImageNet</td><td>0.001±0.092</td><td>0.197±0.002</td><td>0.0000±0.0000</td><td>0.0000±0.0000</td><td rowspan=\"2\">74.4716±0.0863</td></tr><tr><td>0.102±0.136</td><td>0.197±0.007</td><td>1.1488±0.0589</td><td>0.0158±0.0006</td></tr><tr><td rowspan=\"2\">Reflect</td><td rowspan=\"2\">× ImageNet</td><td></td><td>0.197±0.002</td><td>0.0000±0.0000</td><td>0.0000±0.0000</td><td rowspan=\"2\"></td></tr><tr><td>0.001±0.091 0.116±0.134</td><td>0.195±0.006</td><td></td><td>0.0158±0.0002</td></tr><tr><td rowspan=\"2\">Replicate</td><td rowspan=\"2\">×</td><td></td><td></td><td>1.2022±0.0226</td><td></td><td rowspan=\"2\">74.0516±0.0621</td></tr><tr><td>0.001±0.091</td><td>0.197±0.002</td><td>0.0000±0.0000</td><td>0.0000±0.0000</td></tr><tr><td rowspan=\"2\">Randn</td><td rowspan=\"2\">ImageNet ×</td><td>0.116±0.132</td><td>0.195±0.006</td><td>1.2494±0.0258</td><td>0.0144±0.0009</td><td rowspan=\"2\">73.9964±0.1079</td></tr><tr><td>0.001±0.093 0.115±0.146</td><td>0.197±0.002 0.195±0.006</td><td>0.0000±0.0000</td><td>0.0000±0.0000</td></tr><tr><td rowspan=\"2\">No-padding</td><td rowspan=\"2\">ImageNet ×</td><td></td><td></td><td>1.2366±0.0774</td><td>0.0182±0.0012</td><td rowspan=\"2\">73.7716±0.0758</td></tr><tr><td>0.000±0.091</td><td>0.197±0.002</td><td>0.0000±0.0000</td><td>0.0000±0.0000</td></tr><tr><td rowspan=\"9\"></td><td rowspan=\"2\">Zeros</td><td>ImageNet ×</td><td>0.001±0.220</td><td>0.203±0.012</td><td>0.0000±0.0000</td><td>0.0000±0.0000</td><td rowspan=\"2\">62.0396±0.0830</td></tr><tr><td>DUTS</td><td>0.682±0.099 0.343±0.151</td><td>0.171±0.008</td><td>0.0306±0.0020</td><td>0.0068±0.0007</td></tr><tr><td rowspan=\"2\">Circular</td><td></td><td></td><td>0.186±0.011</td><td>0.2429±0.0035</td><td>0.0049±0.0001</td><td rowspan=\"2\">0.6269±0.0015</td></tr><tr><td>× DUTS</td><td>0.001±0.081 0.158±0.188</td><td>0.197±0.002 0.196±0.013</td><td>0.0000±0.0000 0.2677±0.0062</td><td>0.0000±0.0000 0.0062±0.0001</td></tr><tr><td rowspan=\"2\">Reflect</td><td>X</td><td>-0.002±0.080</td><td>0.197±0.002</td><td></td><td></td><td rowspan=\"2\">0.6260±0.0009</td></tr><tr><td>DUTS</td><td>0.160±0.223</td><td>0.195±0.014</td><td>0.0000±0.0000 0.1972±0.0024</td><td>0.0000±0.0000 0.0053±0.0001</td></tr><tr><td rowspan=\"2\">Replicate</td><td>×</td><td>-0.002±0.087</td><td>0.197±0.002</td><td></td><td></td><td rowspan=\"2\">0.6243±0.0022</td></tr><tr><td>DUTS</td><td>0.075±0.174</td><td>0.201±0.010</td><td>0.0000±0.0000 0.1908±0.0056</td><td>0.0000±0.0000 0.0043±0.0002</td></tr><tr><td rowspan=\"2\">Randn</td><td>×</td><td>0.000±0.082</td><td></td><td></td><td></td><td rowspan=\"2\">0.6255±0.0013</td></tr><tr><td>DUTS</td><td>0.004±0.106</td><td>0.197±0.002 0.196±0.001</td><td>0.0000±0.0000 0.0005±0.0001</td><td>0.0000±0.0000 0.0001±0.0000</td></tr><tr><td rowspan=\"8\"></td><td rowspan=\"2\">No-padding</td><td>×</td><td></td><td></td><td></td><td></td><td rowspan=\"2\">0.2570±0.0022</td></tr><tr><td>DUTS</td><td>0.000±0.087 0.003±0.252</td><td>0.197±0.002</td><td>0.0000±0.0000</td><td>0.0000±0.0000 0.0000±0.0000</td></tr><tr><td rowspan=\"2\">Zeros</td><td>×</td><td>0.096±0.118</td><td>0.200±0.010</td><td>0.0000±0.0000</td><td></td><td rowspan=\"2\">0.4759±0.0013</td></tr><tr><td>ImageNet</td><td>0.329±0.201</td><td>0.196±0.003 0.185±0.011</td><td>0.0918±0.0119 0.8171±0.0173</td><td>0.0052±0.0004 0.0162±0.0012</td></tr><tr><td rowspan=\"2\">Circular</td><td>×</td><td>*0.027±0.093</td><td>*0.197±0.003</td><td>0.0454±0.0041</td><td>0.0032±0.0004</td><td rowspan=\"2\">75.6856±0.0924</td></tr><tr><td>ImageNet</td><td>0.184±0.201</td><td>0.192±0.010</td><td>0.7018±0.0320</td><td>0.0188±0.0016</td></tr><tr><td rowspan=\"2\">Reflect</td><td>×</td><td>*0.004±0.094</td><td>*0.198±0.003</td><td>0.0291±0.0017</td><td>0.0018±0.0001</td><td rowspan=\"2\">76.1432±0.1026 75.5068±0.1213</td></tr><tr><td>ImageNet ×</td><td>0.293±0.181</td><td>0.187±0.009</td><td>0.6960±0.0221</td><td>0.0150±0.0004</td></tr><tr><td rowspan=\"2\">Randn</td><td>Replicate ImageNet</td><td>*0.002±0.094</td><td>*0.198±0.003</td><td>0.0226±0.0013</td><td>0.0015±0.0001</td><td></td><td rowspan=\"2\">75.6122±0.0911</td></tr><tr><td>×</td><td>0.347±0.205 *0.006±0.090</td><td>0.184±0.012</td><td>0.7461±0.0254</td><td>0.0138±0.0003</td><td></td></tr><tr><td rowspan=\"2\"></td><td rowspan=\"2\"></td><td>ImageNet</td><td>0.358±0.240</td><td>*0.198±0.003 0.181±0.016</td><td>0.0326±0.0016 0.6648±0.0204</td><td>0.0020±0.0002 0.0147±0.0007</td><td rowspan=\"2\">75.3076±0.1016</td></tr><tr><td>×</td><td>0.360±0.327</td><td>0.180±0.026</td><td>0.5074±0.0260</td><td>0.0398±0.0027</td></tr><tr><td rowspan=\"9\">EfficientNet</td><td rowspan=\"2\">Circular</td><td>ImageNet</td><td>0.667±0.111</td><td>0.166±0.014</td><td>0.7590±0.0208</td><td>0.0471±0.0022</td><td rowspan=\"2\">61.8652±0.1380</td></tr><tr><td>×</td><td>0.004±0.192</td><td>0.205±0.013</td><td>0.3008±0.0883</td><td>0.0222±0.0048</td></tr><tr><td rowspan=\"2\"></td><td>ImageNet</td><td>0.020±0.123</td><td>0.203±0.009</td><td>0.4326±0.0251</td><td>0.0256±0.0017</td><td rowspan=\"2\">61.2208±0.2128</td></tr><tr><td>×</td><td></td><td></td><td></td><td></td></tr><tr><td rowspan=\"2\">Reflect</td><td>ImageNet</td><td>0.003±0.175 0.062±0.116</td><td>0.205±0.012 0.201±0.008</td><td>0.2245±0.0639 0.4667±0.0232</td><td>0.0183±0.0053 0.0268±0.0014</td><td rowspan=\"2\">60.4164±0.2924</td></table>",
|
| 666 |
+
"bbox": [
|
| 667 |
+
173,
|
| 668 |
+
198,
|
| 669 |
+
820,
|
| 670 |
+
785
|
| 671 |
+
],
|
| 672 |
+
"page_idx": 6
|
| 673 |
+
},
|
| 674 |
+
{
|
| 675 |
+
"type": "text",
|
| 676 |
+
"text": "",
|
| 677 |
+
"bbox": [
|
| 678 |
+
140,
|
| 679 |
+
799,
|
| 680 |
+
825,
|
| 681 |
+
844
|
| 682 |
+
],
|
| 683 |
+
"page_idx": 6
|
| 684 |
+
},
|
| 685 |
+
{
|
| 686 |
+
"type": "text",
|
| 687 |
+
"text": "",
|
| 688 |
+
"bbox": [
|
| 689 |
+
140,
|
| 690 |
+
851,
|
| 691 |
+
825,
|
| 692 |
+
911
|
| 693 |
+
],
|
| 694 |
+
"page_idx": 6
|
| 695 |
+
},
|
| 696 |
+
{
|
| 697 |
+
"type": "image",
|
| 698 |
+
"img_path": "images/3f917646ee5b9af09ef9bd944fcca4304b63f2cb0117a0ce31aa12334309f4b5.jpg",
|
| 699 |
+
"image_caption": [
|
| 700 |
+
"Figure 4: Visualization of Position-Information Pattern from Padding (PPP). The visualizations are calculated based on Eq. 3 over 480 GMap samples extracted at the 3rd layer-of-interest (Appendix A). The results show that the pretrained model significantly reinforces PPP compared to randomly initialized networks. Note that each image is normalized to [0, 1] separately, therefore the colors between images are not comparable. More visualizations are presented in Appendix B. "
|
| 701 |
+
],
|
| 702 |
+
"image_footnote": [],
|
| 703 |
+
"bbox": [
|
| 704 |
+
173,
|
| 705 |
+
88,
|
| 706 |
+
823,
|
| 707 |
+
222
|
| 708 |
+
],
|
| 709 |
+
"page_idx": 7
|
| 710 |
+
},
|
| 711 |
+
{
|
| 712 |
+
"type": "image",
|
| 713 |
+
"img_path": "images/94967fa89409c5e8def3d59caaa0c17f70fff4c8d9b075d418615fce3c7bce81.jpg",
|
| 714 |
+
"image_caption": [
|
| 715 |
+
"Figure 5: Chronological PPP. We quantify PPP every 10 epochs and plot its development in four different layer of depth (the rightmost layer is the one closest to model output). All curves consistently show a sudden surge at the early stage, and all the later layers are slowly but steadily gaining stronger PPP until the end of training. The shadow region represents standard deviations among 5 individual training episodes. The colors represent zeros, circular, reflect, replicate, and randn paddings. "
|
| 716 |
+
],
|
| 717 |
+
"image_footnote": [],
|
| 718 |
+
"bbox": [
|
| 719 |
+
173,
|
| 720 |
+
315,
|
| 721 |
+
825,
|
| 722 |
+
497
|
| 723 |
+
],
|
| 724 |
+
"page_idx": 7
|
| 725 |
+
},
|
| 726 |
+
{
|
| 727 |
+
"type": "text",
|
| 728 |
+
"text": "",
|
| 729 |
+
"bbox": [
|
| 730 |
+
151,
|
| 731 |
+
589,
|
| 732 |
+
823,
|
| 733 |
+
619
|
| 734 |
+
],
|
| 735 |
+
"page_idx": 7
|
| 736 |
+
},
|
| 737 |
+
{
|
| 738 |
+
"type": "text",
|
| 739 |
+
"text": "Another intriguing observation is that, despite some variations in the detailed patterns, the overall structure of PPP remains similar. Regardless of padding minimum values with zero-padding (consider the features are processed with ReLU activation), randn-padding that can sometimes produce large quantities by chance, or the unbalanced initial state of ResNet50 caused by strided convolution (the first row of ResNet50 in Figure 4), all models tend to have the maximal PPP response in the corner of the features after fully trained. While the underlying mechanism causing such consistent preferences remains unknown, such preferences may be an important factor to consider in future model design. ",
|
| 740 |
+
"bbox": [
|
| 741 |
+
173,
|
| 742 |
+
626,
|
| 743 |
+
825,
|
| 744 |
+
732
|
| 745 |
+
],
|
| 746 |
+
"page_idx": 7
|
| 747 |
+
},
|
| 748 |
+
{
|
| 749 |
+
"type": "text",
|
| 750 |
+
"text": "4.2 Quantifying PPP and Comparing with PosENet ",
|
| 751 |
+
"text_level": 1,
|
| 752 |
+
"bbox": [
|
| 753 |
+
174,
|
| 754 |
+
741,
|
| 755 |
+
544,
|
| 756 |
+
757
|
| 757 |
+
],
|
| 758 |
+
"page_idx": 7
|
| 759 |
+
},
|
| 760 |
+
{
|
| 761 |
+
"type": "text",
|
| 762 |
+
"text": "Table 2 shows the measurements of PPP and PosENet on various architectures and padding schemes. We train five models for each setup and measure the standard deviation of these models. Our PPP metrics have significantly lower standard deviations compared to PosENet, where the standard deviation dominates the differences between padding variants, and thus the quantities from PosENet cannot provide sufficient information for any analysis. The main reason that PosENet has such a large variation is due to its optimization-based formulation, and thus the final quantities highly depend on the convergence of the PosENet training. In fact, we also observe a similar level of standard deviation even when the PosENet is measured on the same model for multiple trials. On the other hand, PPP metrics are based on a closed-form formulation, and thus the variations are only introduced by the differences among the parameters of the pretrained models. Furthermore, PosENet frequently reports positive SPC responses from no-padding models, as shown in its large standard deviation. In contrast, PPP has zero response to no-padding models by definition, and therefore is less biased for measuring the positional information from padding. ",
|
| 763 |
+
"bbox": [
|
| 764 |
+
171,
|
| 765 |
+
761,
|
| 766 |
+
825,
|
| 767 |
+
911
|
| 768 |
+
],
|
| 769 |
+
"page_idx": 7
|
| 770 |
+
},
|
| 771 |
+
{
|
| 772 |
+
"type": "text",
|
| 773 |
+
"text": "",
|
| 774 |
+
"bbox": [
|
| 775 |
+
143,
|
| 776 |
+
92,
|
| 777 |
+
825,
|
| 778 |
+
136
|
| 779 |
+
],
|
| 780 |
+
"page_idx": 8
|
| 781 |
+
},
|
| 782 |
+
{
|
| 783 |
+
"type": "text",
|
| 784 |
+
"text": "SNR-PPP and MAE-PPP assess the response of PPP from two different perspectives, the ratio of the overall PPP magnitude to the image feature variation, and the position-aware average gain of PPP. Despite both measuring the PPP gain and mostly following similar trends, the two metrics can sometimes have discrepancies, such as the randn padding case in EfficientNet pretrained on ImageNet in Table 2. We note that the two metrics should be both measured and considered altogether. ",
|
| 785 |
+
"bbox": [
|
| 786 |
+
171,
|
| 787 |
+
143,
|
| 788 |
+
825,
|
| 789 |
+
218
|
| 790 |
+
],
|
| 791 |
+
"page_idx": 8
|
| 792 |
+
},
|
| 793 |
+
{
|
| 794 |
+
"type": "text",
|
| 795 |
+
"text": "Although certain paddings seem to have lower SNR-PPP or MAE-PPP on trained networks, we find the differences are not significant when comparing the extremely low SNR-PPP and MAE-PPP from the randomly initialized networks. In most cases, the network can effectively construct its PPP, even with the highly stochastic randn padding. The only exception seems to be the case of randn padding in the salient object detection (SOD) task, where the network fails to achieve a compatible performance to other paddings2. The results show that the model training plays an important role in the formation of PPP, and perhaps its contribution is much larger than which underlying padding scheme is being used. This motivates us to further analyze the PPP formulation during model training. ",
|
| 796 |
+
"bbox": [
|
| 797 |
+
171,
|
| 798 |
+
224,
|
| 799 |
+
825,
|
| 800 |
+
347
|
| 801 |
+
],
|
| 802 |
+
"page_idx": 8
|
| 803 |
+
},
|
| 804 |
+
{
|
| 805 |
+
"type": "text",
|
| 806 |
+
"text": "4.3 Chronological PPP ",
|
| 807 |
+
"text_level": 1,
|
| 808 |
+
"bbox": [
|
| 809 |
+
174,
|
| 810 |
+
354,
|
| 811 |
+
346,
|
| 812 |
+
369
|
| 813 |
+
],
|
| 814 |
+
"page_idx": 8
|
| 815 |
+
},
|
| 816 |
+
{
|
| 817 |
+
"type": "text",
|
| 818 |
+
"text": "To understand the formulation of PPP through time, we snapshot checkpoints every 10 epochs for all training episodes. By measuring the PPP metrics at all the checkpoints, we plot a chronological curve and monitor the progress of PPP. We train 5 individual models for each pair of model-padding setup and report the standard deviations, which demonstrates the significance of the trend. ",
|
| 819 |
+
"bbox": [
|
| 820 |
+
174,
|
| 821 |
+
375,
|
| 822 |
+
825,
|
| 823 |
+
434
|
| 824 |
+
],
|
| 825 |
+
"page_idx": 8
|
| 826 |
+
},
|
| 827 |
+
{
|
| 828 |
+
"type": "text",
|
| 829 |
+
"text": "Figure 5 shows all models achieve a significant gain of PPP within the first 10 epochs in all intermediate layers. Most models continuously increase their PPP as training proceeds, especially in the fourth layer of interest, which is the last output from the convolutional layers before the final linear projection. Another interesting observation is that our randn padding, which is designed to be less easily detectable with built-in stochasticity, indeed shows less PPP built-up at the intermediate stages in certain layers. However, the network still adjusts the behavior and ends up forming complete PPPs at the fourth layer of interest in all scenarios. All these evidences show that the network builds PPP purposely as a favorable representation to assist its learning. ",
|
| 830 |
+
"bbox": [
|
| 831 |
+
173,
|
| 832 |
+
441,
|
| 833 |
+
825,
|
| 834 |
+
563
|
| 835 |
+
],
|
| 836 |
+
"page_idx": 8
|
| 837 |
+
},
|
| 838 |
+
{
|
| 839 |
+
"type": "text",
|
| 840 |
+
"text": "5 Conclusion and Limitations ",
|
| 841 |
+
"text_level": 1,
|
| 842 |
+
"bbox": [
|
| 843 |
+
173,
|
| 844 |
+
570,
|
| 845 |
+
437,
|
| 846 |
+
588
|
| 847 |
+
],
|
| 848 |
+
"page_idx": 8
|
| 849 |
+
},
|
| 850 |
+
{
|
| 851 |
+
"type": "text",
|
| 852 |
+
"text": "In this paper, we develop a reliable method for measuring PPP and conduct a series of analyses toward understanding the formation and properties of PPP. Through a large-scale study, we demonstrate that PPP is a representation that the network favorably develops as a part of its learning process, and its formation has weak connections to the underlying padding algorithm. We show that reliable PPP metrics are important steps for understanding the effects of PPPs in different tasks, and useful for measuring the effectiveness of future methods in debiasing PPP. ",
|
| 853 |
+
"bbox": [
|
| 854 |
+
174,
|
| 855 |
+
592,
|
| 856 |
+
825,
|
| 857 |
+
683
|
| 858 |
+
],
|
| 859 |
+
"page_idx": 8
|
| 860 |
+
},
|
| 861 |
+
{
|
| 862 |
+
"type": "text",
|
| 863 |
+
"text": "However, an unfortunate and inevitable limitation of the PPP metrics is that their measure is biased by the model architecture and parameters. Since the PPP metrics are based on the distributional differences between the paired model outputs (i.e., optimal padding to algorithmic padding), different architecture and layers of depth exhibit different and intractable biases due to different interactions between PPP and model parameters. Such a bias makes PPP metrics less useful for evaluating models, and therefore cannot be used to study the effect of architectural changes. This limitation is inevitable for any (and all existing) metric that attempts to measure PPP using the outputs of a model. We note future studies in measuring PPP without model inferences3 will be an important step toward tackling and understanding the property of PPP under different architectural choices. ",
|
| 864 |
+
"bbox": [
|
| 865 |
+
173,
|
| 866 |
+
689,
|
| 867 |
+
826,
|
| 868 |
+
825
|
| 869 |
+
],
|
| 870 |
+
"page_idx": 8
|
| 871 |
+
},
|
| 872 |
+
{
|
| 873 |
+
"type": "text",
|
| 874 |
+
"text": "References ",
|
| 875 |
+
"text_level": 1,
|
| 876 |
+
"bbox": [
|
| 877 |
+
143,
|
| 878 |
+
90,
|
| 879 |
+
267,
|
| 880 |
+
106
|
| 881 |
+
],
|
| 882 |
+
"page_idx": 9
|
| 883 |
+
},
|
| 884 |
+
{
|
| 885 |
+
"type": "text",
|
| 886 |
+
"text": "[1] Md Amirul Islam\\*, Sen Jia\\*, and Neil D. B. Bruce. How much position information do convolutional neural networks encode? In International Conference on Learning Representations, 2020. 1, 2, 5 \n[2] Md Amirul Islam, Matthew Kowal, Sen Jia, Konstantinos G Derpanis, and Neil DB Bruce. Position, padding and predictions: A deeper look at position information in cnns. arXiv preprint arXiv:2101.12322, 2021. 1 \n[3] Osman Semih Kayhan and Jan C van Gemert. On translation invariance in cnns: Convolutional layers can exploit absolute spatial location. In IEEE Conference on Computer Vision and Pattern Recognition, 2020. 1, 5 \n[4] Carlo Innamorati, Tobias Ritschel, Tim Weyrich, and Niloy J Mitra. Learning on the edge: Investigating boundary filters in cnns. International Journal of Computer Vision, 2020. 1 \n[5] Chieh Hubert Lin, Yen-Chi Cheng, Hsin-Ying Lee, Sergey Tulyakov, and Ming-Hsuan Yang. InfinityGAN: Towards infinite-pixel image synthesis. In International Conference on Learning Representations, 2022. 1, 3 \n[6] Bilal Alsallakh, Narine Kokhlikyan, Vivek Miglani, Jun Yuan, and Orion Reblitz-Richardson. Mind the pad – {cnn}s can develop blind spots. In International Conference on Learning Representations, 2021. 1, 2, 3, 8 \n[7] Rui Xu, Xintao Wang, Kai Chen, Bolei Zhou, and Chen Change Loy. Positional encoding as spatial inductive bias in gans. In IEEE Conference on Computer Vision and Pattern Recognition, 2021. 1, 2, 3 \n[8] Evangelos Ntavelis, Mohamad Shahbazi, Iason Kastanis, Radu Timofte, Martin Danelljan, and Luc Van Gool. Arbitrary-scale image synthesis. In IEEE Conference on Computer Vision and Pattern Recognition, 2022. 1, 3 \n[9] Jooyoung Choi, Jungbeom Lee, Yonghyun Jeong, and Sungroh Yoon. Toward spatially unbiased generative models. In IEEE International Conference on Computer Vision, 2021. 1, 3 \n[10] Songwei Ge, Thomas Hayes, Harry Yang, Xi Yin, Guan Pang, David Jacobs, Jia-Bin Huang, and Devi Parikh. Long video generation with time-agnostic vqgan and time-sensitive transformer. arXiv preprint arXiv:2204.03638, 2022. 1, 2, 3 \n[11] Antonio Alguacil, Wagner Gonçalves Pinto, Michael Bauerheim, Marc C Jacob, and Stéphane Moreau. Effects of boundary conditions in fully convolutional networks for learning spatio-temporal dynamics. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, 2021. 1, 2, 3 \n[12] Md Amirul Islam, Matthew Kowal, Sen Jia, Konstantinos G. Derpanis, and Neil Bruce. Boundary effects in $\\{ \\mathrm { c n n } \\} \\mathrm { s }$ : Feature or bug? https://openreview.net/forum?id=M4qXqdw3xC, 2021. 1 \n[13] Bilal Alsallakh, Vivek Miglani, Narine Kokhlikyan, David Adkins, and Orion Reblitz-Richardson. Are convolutional networks inherently foveated? In SVRHM 2021 Workshop at NeurIPS, 2021. 1, 5 \n[14] Wenjie Luo, Yujia Li, Raquel Urtasun, and Richard Zemel. Understanding the effective receptive field in deep convolutional neural networks. In Neural Information Processing Systems, 2016. 1, 5 \n[15] Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 3 \n[16] Shichen Liu, Tianye Li, Weikai Chen, and Hao Li. Soft rasterizer: A differentiable renderer for image-based 3d reasoning. In IEEE International Conference on Computer Vision, 2019. 3 \n[17] Nikhila Ravi, Jeremy Reizenstein, David Novotny, Taylor Gordon, Wan-Yen Lo, Justin Johnson, and Georgia Gkioxari. Accelerating 3d deep learning with pytorch3d. arXiv preprint arXiv:2007.08501, 2020. 3 \n[18] Ran Margolin, Lihi Zelnik-Manor, and Ayellet Tal. How to evaluate foreground maps? In IEEE Conference on Computer Vision and Pattern Recognition, 2014. 7 \n[19] Nian Liu, Junwei Han, and Ming-Hsuan Yang. Picanet: Learning pixel-wise contextual attention for saliency detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 9 \n[20] Joe Mellor, Jack Turner, Amos Storkey, and Elliot J Crowley. Neural architecture search without training. In International Conference on Machine Learning, 2021. 9 ",
|
| 887 |
+
"bbox": [
|
| 888 |
+
173,
|
| 889 |
+
118,
|
| 890 |
+
828,
|
| 891 |
+
851
|
| 892 |
+
],
|
| 893 |
+
"page_idx": 9
|
| 894 |
+
},
|
| 895 |
+
{
|
| 896 |
+
"type": "text",
|
| 897 |
+
"text": "Checklist ",
|
| 898 |
+
"text_level": 1,
|
| 899 |
+
"bbox": [
|
| 900 |
+
173,
|
| 901 |
+
868,
|
| 902 |
+
254,
|
| 903 |
+
883
|
| 904 |
+
],
|
| 905 |
+
"page_idx": 9
|
| 906 |
+
},
|
| 907 |
+
{
|
| 908 |
+
"type": "text",
|
| 909 |
+
"text": "1. For all authors... ",
|
| 910 |
+
"bbox": [
|
| 911 |
+
214,
|
| 912 |
+
897,
|
| 913 |
+
339,
|
| 914 |
+
911
|
| 915 |
+
],
|
| 916 |
+
"page_idx": 9
|
| 917 |
+
},
|
| 918 |
+
{
|
| 919 |
+
"type": "text",
|
| 920 |
+
"text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] \n(b) Did you describe the limitations of your work? [Yes] \n(c) Did you discuss any potential negative societal impacts of your work? [No] \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
|
| 921 |
+
"bbox": [
|
| 922 |
+
238,
|
| 923 |
+
92,
|
| 924 |
+
825,
|
| 925 |
+
189
|
| 926 |
+
],
|
| 927 |
+
"page_idx": 10
|
| 928 |
+
},
|
| 929 |
+
{
|
| 930 |
+
"type": "text",
|
| 931 |
+
"text": "2. If you are including theoretical results... ",
|
| 932 |
+
"bbox": [
|
| 933 |
+
214,
|
| 934 |
+
194,
|
| 935 |
+
493,
|
| 936 |
+
209
|
| 937 |
+
],
|
| 938 |
+
"page_idx": 10
|
| 939 |
+
},
|
| 940 |
+
{
|
| 941 |
+
"type": "text",
|
| 942 |
+
"text": "(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A] ",
|
| 943 |
+
"bbox": [
|
| 944 |
+
236,
|
| 945 |
+
214,
|
| 946 |
+
738,
|
| 947 |
+
247
|
| 948 |
+
],
|
| 949 |
+
"page_idx": 10
|
| 950 |
+
},
|
| 951 |
+
{
|
| 952 |
+
"type": "text",
|
| 953 |
+
"text": "3. If you ran experiments... ",
|
| 954 |
+
"bbox": [
|
| 955 |
+
214,
|
| 956 |
+
252,
|
| 957 |
+
393,
|
| 958 |
+
267
|
| 959 |
+
],
|
| 960 |
+
"page_idx": 10
|
| 961 |
+
},
|
| 962 |
+
{
|
| 963 |
+
"type": "text",
|
| 964 |
+
"text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [No] All the codes for reproducing all results shown in the paper will be made publicly available. \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] \n(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [No] It is not a critical computational constraint to the experiments. In order to properly report the standard deviation, we use a total of 24 GPUs over 3 clusters to train 150 CNN models on ImageNet and DUTS datasets. These computations are completely for analyses. Running our PPP metrics only need 1GB of memory on any type of GPU, or even CPU. ",
|
| 965 |
+
"bbox": [
|
| 966 |
+
238,
|
| 967 |
+
272,
|
| 968 |
+
825,
|
| 969 |
+
477
|
| 970 |
+
],
|
| 971 |
+
"page_idx": 10
|
| 972 |
+
},
|
| 973 |
+
{
|
| 974 |
+
"type": "text",
|
| 975 |
+
"text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
|
| 976 |
+
"bbox": [
|
| 977 |
+
214,
|
| 978 |
+
481,
|
| 979 |
+
825,
|
| 980 |
+
497
|
| 981 |
+
],
|
| 982 |
+
"page_idx": 10
|
| 983 |
+
},
|
| 984 |
+
{
|
| 985 |
+
"type": "text",
|
| 986 |
+
"text": "(a) If your work uses existing assets, did you cite the creators? [Yes] \n(b) Did you mention the license of the assets? [No] The assets used in our codes are released under MIT or BSD-3, which have no restricted usage. \n(c) Did you include any new assets either in the supplemental material or as a URL? [No] \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A] We did not obtain personal data. \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] We did not use personal data. ",
|
| 987 |
+
"bbox": [
|
| 988 |
+
238,
|
| 989 |
+
501,
|
| 990 |
+
825,
|
| 991 |
+
632
|
| 992 |
+
],
|
| 993 |
+
"page_idx": 10
|
| 994 |
+
},
|
| 995 |
+
{
|
| 996 |
+
"type": "text",
|
| 997 |
+
"text": "5. If you used crowdsourcing or conducted research with human subjects... ",
|
| 998 |
+
"bbox": [
|
| 999 |
+
212,
|
| 1000 |
+
637,
|
| 1001 |
+
705,
|
| 1002 |
+
652
|
| 1003 |
+
],
|
| 1004 |
+
"page_idx": 10
|
| 1005 |
+
},
|
| 1006 |
+
{
|
| 1007 |
+
"type": "text",
|
| 1008 |
+
"text": "(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] \n(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] \n(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] ",
|
| 1009 |
+
"bbox": [
|
| 1010 |
+
238,
|
| 1011 |
+
657,
|
| 1012 |
+
825,
|
| 1013 |
+
753
|
| 1014 |
+
],
|
| 1015 |
+
"page_idx": 10
|
| 1016 |
+
}
|
| 1017 |
+
]
|
parse/dev/MG3YN3z1J4M/MG3YN3z1J4M_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/TiZYrQ-mPup/TiZYrQ-mPup_content_list.json
ADDED
|
@@ -0,0 +1,1646 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "COLD Decoding: Energy-based Constrained Text Generation with Langevin Dynamics ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
122,
|
| 9 |
+
825,
|
| 10 |
+
172
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Lianhui Qin1 Sean Welleck1 2 Daniel Khashabi3⇤ Yejin Choi1 2 1Paul G. Allen School of Computer Science & Engineering, University of Washington 2Allen Institute for Artificial Intelligence 3Department of Computer Science, Johns Hopkins University ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
217,
|
| 19 |
+
224,
|
| 20 |
+
782,
|
| 21 |
+
284
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Abstract ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
462,
|
| 31 |
+
319,
|
| 32 |
+
535,
|
| 33 |
+
335
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "Many applications of text generation require incorporating different constraints to control the semantics or style of generated text. These constraints can be hard (e.g., ensuring certain keywords are included in the output) and soft (e.g., contextualizing the output with the left- or right-hand context). In this paper, we present Energy-based Constrained Decoding with Langevin Dynamics (COLD), a decoding framework which unifies constrained generation as specifying constraints through an energy function, then performing efficient differentiable reasoning over the constraints through gradient-based sampling. COLD decoding is a flexible framework that can be applied directly to off-the-shelf left-to-right language models without the need for any task-specific fine-tuning, as demonstrated through three challenging text generation applications: lexically-constrained generation, abductive reasoning, and counterfactual reasoning. Our experiments on these constrained generation tasks point to the effectiveness of our approach, both in terms of automatic and human evaluation.1 ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
352,
|
| 43 |
+
766,
|
| 44 |
+
545
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 Introduction ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
174,
|
| 54 |
+
571,
|
| 55 |
+
310,
|
| 56 |
+
590
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Many text generation applications require producing text that is not only fluent, but also satisfies various constraints which control the semantics or style of the generated text. For example (Figure 1), for knowledge-grounded or keyword-guided generation, we might want to ensure that certain keywords are included in the generated output as hard lexical constraints [29, 52]. For other types of text generation, we often wish to incorporate soft topical constraints to contextualize the desired output, e.g., abductively $\\mathbb { \\lVert \\rVert 3 \\rVert }$ reasoning about what happened in the middle of a story given the past and the future story context [1]. Yet another class of text generation applications requires revising an input based on a new counterfactual condition $\\mathbb { 1 1 3 }$ , which simultaneously requires semantic coherence as well as minimal-edit constraints with respect to the input text [44]. ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
604,
|
| 66 |
+
825,
|
| 67 |
+
729
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "The dominant paradigm to various text generation applications has been supervised learning with task-specific training data. However, different applications require varied and potentially evolving constraints, and annotating a large amount of task-specific training data for each different combination of constraints can be costly. Recent work has explored incorporating constraints through energy-based text modeling that alleviates the need of supervised data [23, 7, 41]. Yet those approaches still require expensive training of specific generation models. In addition, training might not even be feasible with recent models that are extreme in scale, like GPT-3 [3]. This motivates the need to enrich decoding algorithms that can work directly with pretrained language models without task-specific fine-tuning, and support complex combinations of hard and soft constraints to control the generated text on the fly. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
736,
|
| 77 |
+
825,
|
| 78 |
+
859
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "image",
|
| 84 |
+
"img_path": "images/a278d5161a63fc518077926d28cecdd3429210689225b1380de33e4beee2706b.jpg",
|
| 85 |
+
"image_caption": [
|
| 86 |
+
"Figure 1: Applying COLD to different constrained generation tasks amounts to specifying an energy function $E$ by plugging in relevant constraint functions. Text in grey boxes is the input, and text in blue boxes is the output. "
|
| 87 |
+
],
|
| 88 |
+
"image_footnote": [],
|
| 89 |
+
"bbox": [
|
| 90 |
+
176,
|
| 91 |
+
89,
|
| 92 |
+
820,
|
| 93 |
+
190
|
| 94 |
+
],
|
| 95 |
+
"page_idx": 1
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"type": "text",
|
| 99 |
+
"text": "We propose a new constrained decoding approach that formulates decoding as sampling from an energy-based model (EBM) [16, 27]. Constrained generation with our approach amounts to specifying an energy function by plugging in arbitrary constraint functions that are suitable for the task at hand, then sampling from its induced distribution. In particular, to overcome the longstanding challenges of sampling discrete text from EBMs, we for the first time introduce Langevin dynamics $\\tilde { \\left\\| 5 3 \\right\\| }$ to text-based EBMs for efficient gradient-based sampling. As a result, our approach, Constrained Decoding with Langevin Dynamics (COLD), performs sampling by iteratively updating a continuous relaxation of text using gradients of the energy function. The resulting continuous text samples are then mapped back to the discrete space with a simple guided discretization approach, yielding text sequences that are fluent and adhere to the constraints. ",
|
| 100 |
+
"bbox": [
|
| 101 |
+
173,
|
| 102 |
+
265,
|
| 103 |
+
825,
|
| 104 |
+
404
|
| 105 |
+
],
|
| 106 |
+
"page_idx": 1
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"type": "text",
|
| 110 |
+
"text": "Our work makes unique contributions to a recent line of research investigating decoding algorithms for incorporating different constraints [45, 6, 33, 26] in three distinct aspects. First, our formulation unifies various constrained generation scenarios that involve hard lexical constraints and/or soft contextual constraints: specifying an energy function, then sampling from its induced distribution. Second, we propose a sampling method, which complements decoding algorithms that look for a single optimal solution. Finally, we provide new empirical insights into the strengths and weaknesses of existing approaches to discrete search and differentiable reasoning. ",
|
| 111 |
+
"bbox": [
|
| 112 |
+
174,
|
| 113 |
+
410,
|
| 114 |
+
825,
|
| 115 |
+
507
|
| 116 |
+
],
|
| 117 |
+
"page_idx": 1
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "text",
|
| 121 |
+
"text": "To test the flexibility and empirical performance of COLD decoding, we experiment with three challenging text generation tasks: lexically constrained generation $\\mathbb { \\ m } \\mathbb { \\bar { \\left[ \\left. 2 \\mathrm { { 9 } } \\right.} } \\\\right]bar { \\left. { 1 } \\mathrm { { 8 } } }\\right]$ , abductive reasoning [1], and counterfactual story generation [44]. COLD achieves better lexical coverage than NEUROLOGIC [33], a beam-based discrete decoding algorithm specifically designed for lexically constrained generation, while producing more coherent and higher quality text than DELOREAN [45], a state-of-the-art gradient-based generation method for abductive reasoning and counterfactual reasoning. COLD supports all three constrained generation settings under a unified framework – specifying an energy function using a collection of fluency and task-specific constraints, then sampling from its induced distribution and achieves strong performance on both automatic and human evaluation. ",
|
| 122 |
+
"bbox": [
|
| 123 |
+
174,
|
| 124 |
+
512,
|
| 125 |
+
826,
|
| 126 |
+
638
|
| 127 |
+
],
|
| 128 |
+
"page_idx": 1
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "text",
|
| 132 |
+
"text": "2 Background ",
|
| 133 |
+
"text_level": 1,
|
| 134 |
+
"bbox": [
|
| 135 |
+
174,
|
| 136 |
+
661,
|
| 137 |
+
308,
|
| 138 |
+
678
|
| 139 |
+
],
|
| 140 |
+
"page_idx": 1
|
| 141 |
+
},
|
| 142 |
+
{
|
| 143 |
+
"type": "text",
|
| 144 |
+
"text": "Neural text generation. Neural text generation typically involves two stages: modeling a distribution over text sequences, and using a decoding algorithm to generate sequences with the model. Let $\\mathbf { y } = ( y _ { 1 } , \\dots , y _ { T } )$ denote a discrete sequence where each $y _ { t }$ is a token from a vocabulary $\\nu$ . Common neural language models (e.g., GPT-2/3 [46, $\\textcircled { 3 } \\textcircled { 1 }$ ) factorize the probability of a sequence into the product of per-token conditionals in left-to-right order, $\\begin{array} { r } { p _ { \\theta } ( \\mathbf { y } ) = \\bar { \\prod } _ { t = 1 } ^ { T } p _ { \\theta } \\bar { ( y _ { t } | \\mathbf { y } _ { < t } ) } } \\end{array}$ , with each conditional parameterized by a shared neural network, such as transformer $\\mathbb { \\left. \\boldsymbol { \\mathsf { \\Sigma } } \\boldsymbol { \\mathsf { O } } \\right. }$ . Popular decoding algorithms, ranging from beam search or greedy decoding to sampling methods such as top- $k$ [12] or nucleus [19] sampling, produce text sequences y using the model $p _ { \\theta }$ , often conditioned on a prompt $\\mathbf { x }$ . ",
|
| 145 |
+
"bbox": [
|
| 146 |
+
173,
|
| 147 |
+
694,
|
| 148 |
+
825,
|
| 149 |
+
809
|
| 150 |
+
],
|
| 151 |
+
"page_idx": 1
|
| 152 |
+
},
|
| 153 |
+
{
|
| 154 |
+
"type": "text",
|
| 155 |
+
"text": "Constrained text generation. We view text generation as the problem of finding a sequence that satisfies a collection of constraints. For instance, the scenario above amounts to generating a sequence $\\mathbf { y } = ( y _ { 1 } , \\dots , y _ { T } )$ subject to a soft constraint that the continuation $\\mathbf { y }$ should be fluent and logically coherent with the prompt $\\mathbf { x }$ . Other constrained generation problems impose additional constraints, such as text infilling $\\overline { { \\mathbb { B O } } } \\boxtimes $ where coherence constraints move beyond a left-hand prefix, lexically constrained generation in which hard constraints require the output to contain given tokens, and various forms of semantically-constrained generation in which the output is softly constrained to be similar to another sequence. Since common decoding algorithms generate text monotonically, relying on $p _ { \\theta } ( y _ { t } | \\mathbf { y } _ { < t } )$ for determining the next token, it is challenging to enforce these diverse constraints. ",
|
| 156 |
+
"bbox": [
|
| 157 |
+
174,
|
| 158 |
+
814,
|
| 159 |
+
825,
|
| 160 |
+
911
|
| 161 |
+
],
|
| 162 |
+
"page_idx": 1
|
| 163 |
+
},
|
| 164 |
+
{
|
| 165 |
+
"type": "image",
|
| 166 |
+
"img_path": "images/4e675fb12725fed4720b90fd09002f2975431465d92f1658abc37a32ba480da9.jpg",
|
| 167 |
+
"image_caption": [
|
| 168 |
+
"Figure 2: An overview of the COLD decoding procedure. Given an energy function $E ( \\tilde { \\bf { y } } ) =$ $\\textstyle \\sum _ { i } \\lambda _ { i } f _ { i } ( \\tilde { \\mathbf { y } } )$ with various constraints, the procedure starts with a soft sequence $\\tilde { \\mathbf { y } } ^ { ( 0 ) }$ as a sample from an initial energy-based distribution, and performs Langevin dynamics iterations using the gradient $\\nabla _ { \\tilde { \\mathbf { y } } } E ( \\tilde { \\mathbf { y } } ) \\ ( \\mathrm { E q } . \\big \\vert 2 )$ . The resulting sequence $\\tilde { \\mathbf { y } } ^ { ( N ) }$ after $N$ iterations is approximately a sample from the desired constrained distribution. We then apply top- $\\mathbf { \\nabla } \\cdot \\mathbf { k }$ filtering on the soft sequence to produce a discrete text sequence y $( \\mathrm { E q } . 6 )$ "
|
| 169 |
+
],
|
| 170 |
+
"image_footnote": [],
|
| 171 |
+
"bbox": [
|
| 172 |
+
178,
|
| 173 |
+
85,
|
| 174 |
+
821,
|
| 175 |
+
214
|
| 176 |
+
],
|
| 177 |
+
"page_idx": 2
|
| 178 |
+
},
|
| 179 |
+
{
|
| 180 |
+
"type": "text",
|
| 181 |
+
"text": "",
|
| 182 |
+
"bbox": [
|
| 183 |
+
173,
|
| 184 |
+
342,
|
| 185 |
+
823,
|
| 186 |
+
369
|
| 187 |
+
],
|
| 188 |
+
"page_idx": 2
|
| 189 |
+
},
|
| 190 |
+
{
|
| 191 |
+
"type": "text",
|
| 192 |
+
"text": "Energy-based models and Langevin dynamics. Given an energy function $E ( \\mathbf { y } ) \\in \\mathbb { R }$ , an energybased model (EBM) is defined as a Boltzmann distribution $p ( \\mathbf { y } ) = \\exp \\{ - E ( \\mathbf { y } ) \\} / Z$ , where $Z =$ $\\begin{array} { r } { \\sum _ { \\mathbf { y } } \\exp \\{ - E ( \\mathbf { y } ) \\} } \\end{array}$ is the normalizing factor (The sum is replaced with an integral if $\\mathbf { y }$ is continuous). EBMs are flexible, in that one can incorporate arbitrary functions such as constraints into the energy function $E ( \\mathbf { y } )$ . Recent work has thus made attempts to train text-based EBMs each for specific tasks [21, 41, 7, 23]. As discussed earlier, we instead use the energy-based formulation to develop an inference (decoding) procedure that enables off-the-shelf pretrained language models to perform arbitrary constrained generation, without any fine-tuning. ",
|
| 193 |
+
"bbox": [
|
| 194 |
+
174,
|
| 195 |
+
376,
|
| 196 |
+
825,
|
| 197 |
+
488
|
| 198 |
+
],
|
| 199 |
+
"page_idx": 2
|
| 200 |
+
},
|
| 201 |
+
{
|
| 202 |
+
"type": "text",
|
| 203 |
+
"text": "Despite the flexibility, however, sampling from an EBM is particularly challenging, as computing $Z$ is intractable. Common gradient-free Markov chain Monte Carlo (MCMC) methods such as Gibbs sampling $\\left[ \\left[ 2 \\right] \\right]$ can be used, but they are often prohibitively slow $\\textcircled { 1 0 } , \\textcircled { 3 8 } \\textcircled { 1 }$ . Langevin dynamics [53, 37, 34], a gradient-based MCMC method, offers more efficient sampling by using the gradient of the energy function $\\nabla _ { \\mathbf y } E ( \\mathbf y )$ , enabling sampling in domains such as image generation [9, 48]. However, since text is discrete, the gradient $\\nabla _ { \\mathbf y } E ( \\mathbf y )$ is not well-defined, making it non-trivial to apply Langevin dynamics for sampling text from an EBM. Our approach bridges this gap with continuous relaxation of text, differentiable constraints, and guided discretization, as described below. ",
|
| 204 |
+
"bbox": [
|
| 205 |
+
174,
|
| 206 |
+
494,
|
| 207 |
+
826,
|
| 208 |
+
606
|
| 209 |
+
],
|
| 210 |
+
"page_idx": 2
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"type": "text",
|
| 214 |
+
"text": "3 COLD Decoding with Langevin Dynamics ",
|
| 215 |
+
"text_level": 1,
|
| 216 |
+
"bbox": [
|
| 217 |
+
173,
|
| 218 |
+
635,
|
| 219 |
+
558,
|
| 220 |
+
654
|
| 221 |
+
],
|
| 222 |
+
"page_idx": 2
|
| 223 |
+
},
|
| 224 |
+
{
|
| 225 |
+
"type": "text",
|
| 226 |
+
"text": "To enable flexible and diverse constrained generation in off-the-shelf language models, we develop Constrained Decoding with Langevin Dynamics (COLD), a decoding approach that treats text generation as sampling from an energy-based distribution, allowing for flexibly composing constraints based on the task at hand. COLD decoding generates text by sampling from an EBM defined over a sequence of “soft” tokens using Langevin dynamics, then maps the continuous sample into discrete, fluent text. We provide our formulation of constrained text generation $( \\ S _ { \\perp } 3 . 1 )$ , present differentiable constraints that can be composed into energy functions $( \\ S 3 . { \\bar { 2 } } )$ along with our discretization method $( \\ S 3 . 3 )$ and discuss practical details of COLD decoding $( \\ S 3 . 4 )$ . Figure 2 provides an overview. ",
|
| 227 |
+
"bbox": [
|
| 228 |
+
173,
|
| 229 |
+
672,
|
| 230 |
+
826,
|
| 231 |
+
786
|
| 232 |
+
],
|
| 233 |
+
"page_idx": 2
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"type": "text",
|
| 237 |
+
"text": "3.1 Energy-based Decoding ",
|
| 238 |
+
"text_level": 1,
|
| 239 |
+
"bbox": [
|
| 240 |
+
176,
|
| 241 |
+
811,
|
| 242 |
+
379,
|
| 243 |
+
827
|
| 244 |
+
],
|
| 245 |
+
"page_idx": 2
|
| 246 |
+
},
|
| 247 |
+
{
|
| 248 |
+
"type": "text",
|
| 249 |
+
"text": "Constrained text generation aims to produce text samples $\\mathbf { y }$ that satisfy a set of constraints (usually conditioned on an input $\\mathbf { x }$ omitted for brevity). We assume each constraint can be captured by a constraint function $f _ { i } ( \\mathbf { y } ) \\in \\mathbb { R }$ , where higher values of $f _ { i }$ mean that the text $\\mathbf { y }$ better satisfies the constraint. For example, $f _ { i }$ could measure the likelihood of $\\mathbf { y }$ as a fluency constraint (more in $\\ S [ 3 . 2 )$ , while a hard constraint $f _ { i }$ amounts to a large negative penalty when y does not satisfy the constraint. ",
|
| 250 |
+
"bbox": [
|
| 251 |
+
174,
|
| 252 |
+
842,
|
| 253 |
+
825,
|
| 254 |
+
911
|
| 255 |
+
],
|
| 256 |
+
"page_idx": 2
|
| 257 |
+
},
|
| 258 |
+
{
|
| 259 |
+
"type": "image",
|
| 260 |
+
"img_path": "images/962eb2d2fc8422eb6a3cd6ea55664e55c4a46a2b655274d9085ffecdbfdbd760.jpg",
|
| 261 |
+
"image_caption": [
|
| 262 |
+
"Figure 3: Illustrations of the differentiable constraints introduced in $\\ S 3 . 2 .$ (1) The soft fluency constraint $\\mathrm { ( E q } \\vert \\mathfrak { Z } \\vert \\mathfrak { p }$ to encourage fluency of $\\tilde { \\mathbf { y } } _ { t }$ based on LM probabilities. (2) The future contextualization constraint in Eq. $\\textcircled{4}$ to encourage coherence w.r.t. the future context (has eight legs). (3) The $n$ -gram similarity constraint in $\\operatorname { E q . } ( { \\sqrt { 5 } } )$ , where the left figure shows the case of $n = 1$ which encourages keywords (e.g., hand) to appear in the generation, and the right figure shows the case of $n > 1$ which is typically used to encourage sequence similarity with a reference text $\\mathbf { y } _ { * }$ . "
|
| 263 |
+
],
|
| 264 |
+
"image_footnote": [],
|
| 265 |
+
"bbox": [
|
| 266 |
+
176,
|
| 267 |
+
85,
|
| 268 |
+
823,
|
| 269 |
+
217
|
| 270 |
+
],
|
| 271 |
+
"page_idx": 3
|
| 272 |
+
},
|
| 273 |
+
{
|
| 274 |
+
"type": "text",
|
| 275 |
+
"text": "The set of constraints induces a distribution over text, written in an energy-based form as: ",
|
| 276 |
+
"bbox": [
|
| 277 |
+
171,
|
| 278 |
+
328,
|
| 279 |
+
759,
|
| 280 |
+
343
|
| 281 |
+
],
|
| 282 |
+
"page_idx": 3
|
| 283 |
+
},
|
| 284 |
+
{
|
| 285 |
+
"type": "equation",
|
| 286 |
+
"img_path": "images/7b3b85f38cd187d050ef62e97f7cb393484bf6ff541b1949272355e0d32ea82e.jpg",
|
| 287 |
+
"text": "$$\np ( \\mathbf { y } ) = \\exp \\left\\{ \\sum _ { i } \\lambda _ { i } f _ { i } ( \\mathbf { y } ) \\right\\} / Z ,\n$$",
|
| 288 |
+
"text_format": "latex",
|
| 289 |
+
"bbox": [
|
| 290 |
+
392,
|
| 291 |
+
349,
|
| 292 |
+
606,
|
| 293 |
+
377
|
| 294 |
+
],
|
| 295 |
+
"page_idx": 3
|
| 296 |
+
},
|
| 297 |
+
{
|
| 298 |
+
"type": "text",
|
| 299 |
+
"text": "where $\\lambda _ { i } \\ \\geq \\ 0$ is the weight of the ith constraint, $Z$ is the normalizing factor. Here $E ( \\mathbf { y } ) : =$ $- \\sum _ { i } \\lambda _ { i } f _ { i } ( \\mathbf { y } )$ is the energy function. This energy-based form is flexible, as one can plug in any constraint functions required for a task of interest. Generating text under the constraints can then be seen as sampling from the energy-based distribution $\\mathbf { y } \\sim p ( \\mathbf { y } )$ . One can also draw multiple samples and pick the best if only one sample is needed, as discussed later $( \\ S \\bigcirc . 4 )$ . ",
|
| 300 |
+
"bbox": [
|
| 301 |
+
173,
|
| 302 |
+
381,
|
| 303 |
+
825,
|
| 304 |
+
453
|
| 305 |
+
],
|
| 306 |
+
"page_idx": 3
|
| 307 |
+
},
|
| 308 |
+
{
|
| 309 |
+
"type": "text",
|
| 310 |
+
"text": "As mentioned above, for efficient sampling from $p ( \\mathbf { y } )$ we want to use Langevin dynamics, which makes use of the gradient $\\nabla _ { \\mathbf y } E ( \\mathbf y )$ . However, in our case $\\mathbf { y }$ is a discrete sequence and the gradient $\\nabla _ { \\mathbf y } E ( \\mathbf y )$ is not well-defined. As a result, we perform Langevin dynamics with an energy defined on a sequence of continuous token vectors, described below. ",
|
| 311 |
+
"bbox": [
|
| 312 |
+
174,
|
| 313 |
+
458,
|
| 314 |
+
825,
|
| 315 |
+
513
|
| 316 |
+
],
|
| 317 |
+
"page_idx": 3
|
| 318 |
+
},
|
| 319 |
+
{
|
| 320 |
+
"type": "text",
|
| 321 |
+
"text": "Differentiable decoding with Langevin dynamics. Instead of defining the energy function on discrete tokens, we define the energy function on a sequence of continuous vectors $\\tilde { \\mathbf { y } } = _ { . } ( \\tilde { \\mathbf { y } } _ { 1 } , \\dots , \\tilde { \\mathbf { y } } _ { T } )$ , which we call a soft sequence. Each position in the soft sequence is a vector $\\tilde { \\mathbf { y } } _ { t } \\in \\mathbb { R } ^ { V }$ , where $V$ is the vocabulary size, and each element $\\tilde { \\mathbf { y } } _ { t } ( v ) \\in \\mathbb { R }$ corresponds to the logit of word $v$ in the vocabulary. Taking the softmax of $\\tilde { \\mathbf { y } } _ { t }$ yields a distribution over the vocabulary for position $t$ , $\\tilde { \\mathbf { p } } _ { t } ^ { \\tau } = \\mathrm { s o f t m a x } ( \\tilde { \\mathbf { y } } _ { t } / \\tau )$ . As $\\tau 0$ , $\\tilde { \\mathbf { p } } _ { t } ^ { \\tau }$ becomes a one-hot vector, indicating a discrete token. ",
|
| 322 |
+
"bbox": [
|
| 323 |
+
173,
|
| 324 |
+
520,
|
| 325 |
+
826,
|
| 326 |
+
604
|
| 327 |
+
],
|
| 328 |
+
"page_idx": 3
|
| 329 |
+
},
|
| 330 |
+
{
|
| 331 |
+
"type": "text",
|
| 332 |
+
"text": "By specifying an energy $E ( \\tilde { \\mathbf { y } } )$ on the soft sequence $\\tilde { \\mathbf { y } }$ , we can use Langevin dynamics to obtain a sample. Specifically, the sampling is done by forming a Markov chain: ",
|
| 333 |
+
"bbox": [
|
| 334 |
+
174,
|
| 335 |
+
609,
|
| 336 |
+
823,
|
| 337 |
+
638
|
| 338 |
+
],
|
| 339 |
+
"page_idx": 3
|
| 340 |
+
},
|
| 341 |
+
{
|
| 342 |
+
"type": "equation",
|
| 343 |
+
"img_path": "images/3b99c9bf52d7e8f80cdce802cf54ecb700a482ccfe8658422b74eadb4be3cb0f.jpg",
|
| 344 |
+
"text": "$$\n\\begin{array} { r } { \\tilde { \\mathbf { y } } ^ { ( n + 1 ) } \\tilde { \\mathbf { y } } ^ { ( n ) } - \\eta \\nabla _ { \\tilde { \\mathbf { y } } } E ( \\tilde { \\mathbf { y } } ^ { ( n ) } ) + \\epsilon ^ { ( n ) } , } \\end{array}\n$$",
|
| 345 |
+
"text_format": "latex",
|
| 346 |
+
"bbox": [
|
| 347 |
+
367,
|
| 348 |
+
643,
|
| 349 |
+
627,
|
| 350 |
+
664
|
| 351 |
+
],
|
| 352 |
+
"page_idx": 3
|
| 353 |
+
},
|
| 354 |
+
{
|
| 355 |
+
"type": "text",
|
| 356 |
+
"text": "where $\\eta > 0$ is the step size, and $\\epsilon ^ { ( n ) } \\in \\mathcal { N } ( 0 , \\sigma )$ is the noise at iteration $n$ . As shown in Welling and Teh $\\mathbb { \\lVert 5 3 \\rVert }$ , by adding the right amount of noise and annealing the step size, the procedure will converge to samples from the true distribution. That is, if we let $p ^ { ( n ) }$ be the distribution such that $\\tilde { \\mathbf { y } } ^ { ( n ) } \\sim p ^ { ( \\bar { n } ) }$ , then as $n \\to \\infty$ and $\\sigma \\to 0$ , we have $p ^ { ( n ) } \\to p ( \\tilde { \\mathbf { y } } ) : = \\exp \\{ - E ( \\tilde { \\mathbf { y } } ) \\} / Z$ . That is, the procedure ends up generating samples from the distribution induced by the energy function. ",
|
| 357 |
+
"bbox": [
|
| 358 |
+
174,
|
| 359 |
+
670,
|
| 360 |
+
825,
|
| 361 |
+
746
|
| 362 |
+
],
|
| 363 |
+
"page_idx": 3
|
| 364 |
+
},
|
| 365 |
+
{
|
| 366 |
+
"type": "text",
|
| 367 |
+
"text": "Next, we describe constraint functions defined on the soft sequence $\\tilde { \\mathbf { y } }$ that can be plugged in as components of the energy function. Later in $\\ S \\bigstar 3 . 3 \\AA$ we describe how to obtain a discrete sequence from a soft sequence sample $\\tilde { \\mathbf { y } }$ . ",
|
| 368 |
+
"bbox": [
|
| 369 |
+
174,
|
| 370 |
+
751,
|
| 371 |
+
825,
|
| 372 |
+
792
|
| 373 |
+
],
|
| 374 |
+
"page_idx": 3
|
| 375 |
+
},
|
| 376 |
+
{
|
| 377 |
+
"type": "text",
|
| 378 |
+
"text": "3.2 A Collection of COLD Constraints ",
|
| 379 |
+
"text_level": 1,
|
| 380 |
+
"bbox": [
|
| 381 |
+
176,
|
| 382 |
+
801,
|
| 383 |
+
449,
|
| 384 |
+
818
|
| 385 |
+
],
|
| 386 |
+
"page_idx": 3
|
| 387 |
+
},
|
| 388 |
+
{
|
| 389 |
+
"type": "text",
|
| 390 |
+
"text": "COLD provides a flexible framework for plugging in a wide range of constraint functions for a task of interest. We describe constraint functions that are useful in various constrained generation problems, such as those we consider in the experiments $( \\ S \\boxed { 4 } )$ . The constraints include language model-based fluency constraints, along with lexical and semantic constraints on the sequence content. More generally, any differentiable function that outputs a goodness score of (soft) text can be used as a constraint function, as long as it reflects the requirements of the target task. ",
|
| 391 |
+
"bbox": [
|
| 392 |
+
174,
|
| 393 |
+
827,
|
| 394 |
+
825,
|
| 395 |
+
911
|
| 396 |
+
],
|
| 397 |
+
"page_idx": 3
|
| 398 |
+
},
|
| 399 |
+
{
|
| 400 |
+
"type": "text",
|
| 401 |
+
"text": "Algorithm 1 Constrained Decoding w/ Langevin Dynamics. ",
|
| 402 |
+
"text_level": 1,
|
| 403 |
+
"bbox": [
|
| 404 |
+
173,
|
| 405 |
+
93,
|
| 406 |
+
570,
|
| 407 |
+
108
|
| 408 |
+
],
|
| 409 |
+
"page_idx": 4
|
| 410 |
+
},
|
| 411 |
+
{
|
| 412 |
+
"type": "text",
|
| 413 |
+
"text": "input Constraints $\\{ f _ { i } \\}$ , length $T$ , iterations $N$ . \noutput Sample sequence 0L $\\tilde { \\mathbf { y } } _ { t } ^ { ( 0 ) } \\gets \\mathrm { i n i t } ( )$ for all position . $t$ // init soft-tokens for $n \\in \\{ 1 , \\ldots , N \\}$ do er $E ^ { ( n ) } \\gets E ( \\tilde { \\mathbf { y } } ^ { ( n ) } ; \\{ f _ { i } \\} )$ $\\tilde { \\mathbf { y } } _ { t } ^ { ( n + 1 ) } \\gets \\tilde { \\mathbf { y } } _ { t } ^ { ( n ) } - \\eta \\nabla _ { \\tilde { \\mathbf { y } } _ { t } } E ^ { ( n ) } + \\epsilon _ { t } ^ { ( n ) }$ // compute energy for all $t$ // update soft tokens (Eq.2) $( \\ S \\sqrt { 3 . 2 } )$ $y _ { t } = \\arg \\operatorname* { m a x } _ { v }$ topk-filter $\\left( \\tilde { \\mathbf { y } } _ { t } ^ { ( N ) } ( v ) \\right)$ for all $t$ // discretize (Eq.6) \nreturn: $\\mathbf { y } = ( y _ { 1 } , \\dots , y _ { T } )$ ",
|
| 414 |
+
"bbox": [
|
| 415 |
+
171,
|
| 416 |
+
111,
|
| 417 |
+
696,
|
| 418 |
+
241
|
| 419 |
+
],
|
| 420 |
+
"page_idx": 4
|
| 421 |
+
},
|
| 422 |
+
{
|
| 423 |
+
"type": "text",
|
| 424 |
+
"text": "Soft fluency constraint. Fluency is a common requirement for generated text. To promote fluency, we use a constraint which favors soft sequences that receive high probability according to the underlying left-to-right LM $p _ { \\mathrm { L M } } ^ { }$ (e.g., GPT2): ",
|
| 425 |
+
"bbox": [
|
| 426 |
+
173,
|
| 427 |
+
248,
|
| 428 |
+
820,
|
| 429 |
+
291
|
| 430 |
+
],
|
| 431 |
+
"page_idx": 4
|
| 432 |
+
},
|
| 433 |
+
{
|
| 434 |
+
"type": "equation",
|
| 435 |
+
"img_path": "images/ea59443b04df091e7dad0fd57e46156e910ded65fd331c1fe28585e74fedc188.jpg",
|
| 436 |
+
"text": "$$\nf _ { \\mathrm { L M } } ^ { } ( \\tilde { \\bf y } ) = \\sum _ { t = 1 } ^ { T } \\sum _ { v \\in \\mathcal { V } } p _ { \\mathrm { L M } } ^ { } ( v | \\tilde { \\bf y } _ { < t } ) \\log \\mathrm { s o f t m a x } ( \\tilde { \\bf y } _ { t } ( v ) ) ,\n$$",
|
| 437 |
+
"text_format": "latex",
|
| 438 |
+
"bbox": [
|
| 439 |
+
302,
|
| 440 |
+
295,
|
| 441 |
+
696,
|
| 442 |
+
325
|
| 443 |
+
],
|
| 444 |
+
"page_idx": 4
|
| 445 |
+
},
|
| 446 |
+
{
|
| 447 |
+
"type": "text",
|
| 448 |
+
"text": "where $p _ { \\mathrm { L M } } ^ { } ( \\cdot | \\tilde { \\mathbf { y } } _ { < t } )$ means the next-token distribution when providing the neural language model with the preceding soft tokens $\\tilde { \\mathbf { y } } _ { < t }$ (i.e., feeding the weighted average of word embeddings, with the weights being softmax $\\left( \\tilde { \\mathbf { y } } _ { t ^ { \\prime } } / \\tau \\right)$ for $t ^ { \\prime } < t$ [20, 45]). ",
|
| 449 |
+
"bbox": [
|
| 450 |
+
173,
|
| 451 |
+
328,
|
| 452 |
+
825,
|
| 453 |
+
372
|
| 454 |
+
],
|
| 455 |
+
"page_idx": 4
|
| 456 |
+
},
|
| 457 |
+
{
|
| 458 |
+
"type": "text",
|
| 459 |
+
"text": "Intuitively, the constraint says that each token distribution in the soft sequence, softmax $\\left( \\tilde { \\mathbf { y } } _ { t } \\right)$ , must match the “reference” distribution $p _ { \\mathrm { L M } } ^ { } ( \\cdot | \\tilde { \\mathbf { y } } _ { < t } )$ predicted by the underlying language model. The match is measured by the (negative) cross-entropy between the two distributions. The constraint thus encourages fluency. In practice, if there is left-side context $\\mathbf { x }$ for the generation to condition on, we feed $\\mathbf { x }$ to the LM to form the “reference” distribution $p _ { \\mathtt { L M } } ^ { } ( \\cdot | \\tilde { \\mathbf { y } } _ { < t } , \\mathbf { x } )$ . As a result, $\\tilde { \\mathbf { y } }$ is encouraged to be fluent and coherent with the context $\\mathbf { x }$ . ",
|
| 460 |
+
"bbox": [
|
| 461 |
+
173,
|
| 462 |
+
376,
|
| 463 |
+
825,
|
| 464 |
+
460
|
| 465 |
+
],
|
| 466 |
+
"page_idx": 4
|
| 467 |
+
},
|
| 468 |
+
{
|
| 469 |
+
"type": "text",
|
| 470 |
+
"text": "We can easily incorporate an additional reverse LM constraint, $f _ { \\mathrm { L M } } ^ { }$ , using a right-to-left LM $p _ { \\mathtt { L M } } ^ { } ( \\cdot | \\tilde { \\mathbf { y } } _ { > t } )$ , as an additional fluency constraint. Flexibly leveraging multiple models in this way is infeasible with conventional decoding methods such as beam search or nucleus sampling. ",
|
| 471 |
+
"bbox": [
|
| 472 |
+
174,
|
| 473 |
+
465,
|
| 474 |
+
823,
|
| 475 |
+
508
|
| 476 |
+
],
|
| 477 |
+
"page_idx": 4
|
| 478 |
+
},
|
| 479 |
+
{
|
| 480 |
+
"type": "text",
|
| 481 |
+
"text": "Future-token prediction constraint. Applications such as text infilling involve future input tokens that remain fixed, but should contribute to updating past positions. For instance, consider updating the second position of The has eight legs. A sample should be coherent with the tokens ${ \\bf x } _ { r }$ on the right (i.e., has eight legs). ",
|
| 482 |
+
"bbox": [
|
| 483 |
+
173,
|
| 484 |
+
515,
|
| 485 |
+
825,
|
| 486 |
+
570
|
| 487 |
+
],
|
| 488 |
+
"page_idx": 4
|
| 489 |
+
},
|
| 490 |
+
{
|
| 491 |
+
"type": "text",
|
| 492 |
+
"text": "To this end, we use a constraint that adjusts soft tokens to maximize the likelihood of input tokens ${ \\bf x } _ { r }$ ",
|
| 493 |
+
"bbox": [
|
| 494 |
+
176,
|
| 495 |
+
577,
|
| 496 |
+
823,
|
| 497 |
+
592
|
| 498 |
+
],
|
| 499 |
+
"page_idx": 4
|
| 500 |
+
},
|
| 501 |
+
{
|
| 502 |
+
"type": "equation",
|
| 503 |
+
"img_path": "images/198dec76aaa9fb155dbeb999fc9c961a53ce7add6df844e4da24696c6066b820.jpg",
|
| 504 |
+
"text": "$$\nf _ { \\mathrm { p r e d } } ( \\tilde { \\mathbf { y } } ; \\mathbf { x } _ { r } ) = \\sum _ { k = 1 } ^ { K } \\log p _ { \\mathrm { L M } } ^ { } ( x _ { r , k } | \\tilde { \\mathbf { y } } , \\mathbf { x } _ { r , < k } ) ,\n$$",
|
| 505 |
+
"text_format": "latex",
|
| 506 |
+
"bbox": [
|
| 507 |
+
346,
|
| 508 |
+
595,
|
| 509 |
+
650,
|
| 510 |
+
625
|
| 511 |
+
],
|
| 512 |
+
"page_idx": 4
|
| 513 |
+
},
|
| 514 |
+
{
|
| 515 |
+
"type": "text",
|
| 516 |
+
"text": "where $K$ is the length of ${ \\bf x } _ { r }$ . In other words, the constraint adjusts the soft sequence $\\tilde { \\mathbf { y } }$ such that the underlying LM predicts the future tokens ${ \\bf x } _ { r }$ after seeing $\\tilde { \\mathbf { y } }$ . ",
|
| 517 |
+
"bbox": [
|
| 518 |
+
173,
|
| 519 |
+
627,
|
| 520 |
+
823,
|
| 521 |
+
656
|
| 522 |
+
],
|
| 523 |
+
"page_idx": 4
|
| 524 |
+
},
|
| 525 |
+
{
|
| 526 |
+
"type": "text",
|
| 527 |
+
"text": "N-gram similarity constraint. Many constrained generation scenarios pose requirements on the wording and expression of generated text sequences. For instance, lexically constrained generation tasks $\\bar { \\mathbb { E } 8 } \\mathbb { I }$ require certain keywords to be presented in the text samples, while counterfactual reasoning [44] or text editing $\\textcircled { 1 1 5 } , \\textcircled { 3 1 }$ tasks require the text to retain the essence of a reference sequence. ",
|
| 528 |
+
"bbox": [
|
| 529 |
+
174,
|
| 530 |
+
661,
|
| 531 |
+
825,
|
| 532 |
+
718
|
| 533 |
+
],
|
| 534 |
+
"page_idx": 4
|
| 535 |
+
},
|
| 536 |
+
{
|
| 537 |
+
"type": "text",
|
| 538 |
+
"text": "We formulate these requirements as an $n$ -gram similarity constraint which favors sequences that overlap with a reference $\\mathbf { y } _ { * }$ at the $n$ -gram level, ",
|
| 539 |
+
"bbox": [
|
| 540 |
+
174,
|
| 541 |
+
723,
|
| 542 |
+
823,
|
| 543 |
+
752
|
| 544 |
+
],
|
| 545 |
+
"page_idx": 4
|
| 546 |
+
},
|
| 547 |
+
{
|
| 548 |
+
"type": "equation",
|
| 549 |
+
"img_path": "images/f0307fe3c992d3eeeaaa68ad98d3bc2f1f44ed00e52a7eab9137a3b63033489f.jpg",
|
| 550 |
+
"text": "$$\nf _ { \\sin } ( { \\tilde { \\bf y } } ; { \\bf y } _ { \\ast } ) = \\mathrm { n g r a m - m a t c h } ( { \\tilde { \\bf y } } , { \\bf y } _ { \\ast } ) ,\n$$",
|
| 551 |
+
"text_format": "latex",
|
| 552 |
+
"bbox": [
|
| 553 |
+
369,
|
| 554 |
+
757,
|
| 555 |
+
625,
|
| 556 |
+
773
|
| 557 |
+
],
|
| 558 |
+
"page_idx": 4
|
| 559 |
+
},
|
| 560 |
+
{
|
| 561 |
+
"type": "text",
|
| 562 |
+
"text": "where ngram-mat $\\operatorname { c h } ( \\cdot , \\cdot )$ is a recent differentiable $n$ -gram matching function $\\left[ \\left[ 3 2 \\right] \\right]$ which can be seen as a differentiable approximation to the BLEU- $^ n$ metric $\\mathbb { H O }$ . When $n = 1$ and $\\mathbf { y } _ { * }$ a sequence of keywords, the constraint in effect enforces $\\tilde { \\mathbf { y } }$ to assign higher values to the keywords (1-grams). When $n$ is larger and $\\tilde { \\mathbf { y } } _ { \\ast }$ is a reference sequence, the constraint encourages $\\tilde { \\mathbf { y } }$ to resemble the reference by assigning high values to tokens making up $n$ -grams from $\\mathbf { y } _ { * }$ . ",
|
| 563 |
+
"bbox": [
|
| 564 |
+
174,
|
| 565 |
+
779,
|
| 566 |
+
825,
|
| 567 |
+
849
|
| 568 |
+
],
|
| 569 |
+
"page_idx": 4
|
| 570 |
+
},
|
| 571 |
+
{
|
| 572 |
+
"type": "text",
|
| 573 |
+
"text": "3.3 From Soft to Discrete and Fluent Text ",
|
| 574 |
+
"text_level": 1,
|
| 575 |
+
"bbox": [
|
| 576 |
+
174,
|
| 577 |
+
857,
|
| 578 |
+
475,
|
| 579 |
+
872
|
| 580 |
+
],
|
| 581 |
+
"page_idx": 4
|
| 582 |
+
},
|
| 583 |
+
{
|
| 584 |
+
"type": "text",
|
| 585 |
+
"text": "After receiving a soft sequence sample $\\tilde { \\mathbf { y } }$ from running Langevin dynamics $( \\mathrm { E q . } \\bigtriangledown )$ , we map the soft sequence to a discrete text sequence which we consider as the output of COLD decoding. A simple method would be selecting the most-likely token at each position $t$ , $y _ { t } = \\arg \\operatorname* { m a x } _ { v } \\tilde { \\mathbf { y } } _ { t } ( v$ $\\tilde { \\mathbf { y } } _ { t } ( v )$ . However, the resulting text can suffer from fluency issues even if the soft fluency constraint $( \\mathrm { E q } . 3 )$ is used, due to competing constraints that sacrifice fluency. To overcome this, we use the underlying LM (e.g., GPT2-XL) as a “guardian” for obtaining the discrete sequence. Specifically, at each position $t$ , we first use the LM to produce the top- $k$ most-likely candidate tokens based on its generation distribution conditioning on preceding tokens, which we denote as $\\nu _ { t } ^ { k }$ . We then select from the top- $k$ candidates the most likely token based on the soft sample $\\tilde { \\mathbf { y } }$ : ",
|
| 586 |
+
"bbox": [
|
| 587 |
+
174,
|
| 588 |
+
882,
|
| 589 |
+
821,
|
| 590 |
+
911
|
| 591 |
+
],
|
| 592 |
+
"page_idx": 4
|
| 593 |
+
},
|
| 594 |
+
{
|
| 595 |
+
"type": "table",
|
| 596 |
+
"img_path": "images/184c6665d9a49dbf167a7c7356830c49142f8a4771b0b502998789625cbc3b47.jpg",
|
| 597 |
+
"table_caption": [
|
| 598 |
+
"Table 1: Automatic and human evaluation of abductive reasoning $\\underline { { ( \\overline { { 4 . 1 } } ) } }$ Our proposed method (COLD decoding) outperforms DELOREAN, a recent decoding algorithm achieving strong results in this task. "
|
| 599 |
+
],
|
| 600 |
+
"table_footnote": [],
|
| 601 |
+
"table_body": "<table><tr><td rowspan=\"2\">Models</td><td colspan=\"4\">Automatic Eval</td><td colspan=\"4\">Human Eval</td></tr><tr><td>BLEU4</td><td>ROUGE-L</td><td>CIDEr</td><td>BERTScore</td><td>Grammar</td><td>Left-coherence (xiy)</td><td>Right-coherence (yxr)</td><td>Overall-coherence (xtyxr)</td></tr><tr><td>LEFT-ONLY</td><td>0.88</td><td>16.26</td><td>3.49</td><td>38.48</td><td>4.57</td><td>3.95</td><td>2.68</td><td>2.70</td></tr><tr><td>DELOREAN</td><td>1.60</td><td>19.06</td><td>7.88</td><td>41.74</td><td>4.30</td><td>4.23</td><td>2.83</td><td>2.87</td></tr><tr><td>COLD (ours)</td><td>1.79</td><td>19.50</td><td>10.68</td><td>42.67</td><td>4.44</td><td>4.00</td><td>3.06</td><td>2.96</td></tr></table>",
|
| 602 |
+
"bbox": [
|
| 603 |
+
176,
|
| 604 |
+
88,
|
| 605 |
+
821,
|
| 606 |
+
166
|
| 607 |
+
],
|
| 608 |
+
"page_idx": 5
|
| 609 |
+
},
|
| 610 |
+
{
|
| 611 |
+
"type": "text",
|
| 612 |
+
"text": "",
|
| 613 |
+
"bbox": [
|
| 614 |
+
173,
|
| 615 |
+
219,
|
| 616 |
+
825,
|
| 617 |
+
318
|
| 618 |
+
],
|
| 619 |
+
"page_idx": 5
|
| 620 |
+
},
|
| 621 |
+
{
|
| 622 |
+
"type": "equation",
|
| 623 |
+
"img_path": "images/26a75b930bf8ceb35d3fcd23675f5719e3de9bf3d0673195e39edce60fbe104c.jpg",
|
| 624 |
+
"text": "$$\ny _ { t } = \\arg \\operatorname* { m a x } _ { v \\in \\mathcal { V } _ { t } ^ { k } } \\tilde { \\mathbf { y } } _ { t } ( v ) .\n$$",
|
| 625 |
+
"text_format": "latex",
|
| 626 |
+
"bbox": [
|
| 627 |
+
413,
|
| 628 |
+
325,
|
| 629 |
+
584,
|
| 630 |
+
344
|
| 631 |
+
],
|
| 632 |
+
"page_idx": 5
|
| 633 |
+
},
|
| 634 |
+
{
|
| 635 |
+
"type": "text",
|
| 636 |
+
"text": "We refer to this method as “top- $k$ filtering”. The resulting text tends to be fluent because each token is among the top- $k$ most probable tokens from the LM $\\bar { \\mathbb { E } } \\bar { 2 } \\mathbb { I }$ . In practice, to ease the satisfaction of certain constraints (e.g. $n$ -gram similarity), we expand the candidate set $\\mathcal { V } _ { t } ^ { k }$ to include constraint tokens (e.g., in the tasks of abductive reasoning $\\ S 4 . { \\dot { 1 } }$ and lexically constrained decoding $\\ S [ \\underline { { 4 . 3 } } )$ ",
|
| 637 |
+
"bbox": [
|
| 638 |
+
173,
|
| 639 |
+
352,
|
| 640 |
+
825,
|
| 641 |
+
410
|
| 642 |
+
],
|
| 643 |
+
"page_idx": 5
|
| 644 |
+
},
|
| 645 |
+
{
|
| 646 |
+
"type": "text",
|
| 647 |
+
"text": "Figure $\\boxed { 2 }$ illustrates the decoding procedure to get one output from COLD decoding. Algorithm 1 summarizes the algorithm. Next, we move to practical considerations of applying COLD. ",
|
| 648 |
+
"bbox": [
|
| 649 |
+
173,
|
| 650 |
+
415,
|
| 651 |
+
820,
|
| 652 |
+
443
|
| 653 |
+
],
|
| 654 |
+
"page_idx": 5
|
| 655 |
+
},
|
| 656 |
+
{
|
| 657 |
+
"type": "text",
|
| 658 |
+
"text": "3.4 Implementation of COLD Decoding ",
|
| 659 |
+
"text_level": 1,
|
| 660 |
+
"bbox": [
|
| 661 |
+
176,
|
| 662 |
+
459,
|
| 663 |
+
460,
|
| 664 |
+
474
|
| 665 |
+
],
|
| 666 |
+
"page_idx": 5
|
| 667 |
+
},
|
| 668 |
+
{
|
| 669 |
+
"type": "text",
|
| 670 |
+
"text": "Sample-and-select. COLD decoding allows for drawing multiple text samples from the distribution induced by the energy function $E ( \\tilde { \\mathbf { y } } )$ . Depending on task requirements, we could either present the set of samples as output, or select one from the set based on some criteria (e.g., different energy terms) and return a single sequence, as in those tasks considered in the experiments $( \\ S \\boxed { 4 } )$ . This “sample-andselect” approach differs from deterministic constrained decoding methods, which optimize only one sequence [e.g., $\\textcircled { 3 3 } , \\textcircled { 2 6 } \\textcircled { }$ , and is used widely in various generation settings [e.g., 28, 11, 4]. ",
|
| 671 |
+
"bbox": [
|
| 672 |
+
174,
|
| 673 |
+
484,
|
| 674 |
+
825,
|
| 675 |
+
569
|
| 676 |
+
],
|
| 677 |
+
"page_idx": 5
|
| 678 |
+
},
|
| 679 |
+
{
|
| 680 |
+
"type": "text",
|
| 681 |
+
"text": "Initialization. We initialize the soft sequence $\\tilde { \\mathbf { y } }$ by running greedy decoding with the $\\mathrm { L M } p _ { \\mathrm { L M } }$ to obtain output logits. In our preliminary experiments, the initialization strategy had limited influence on the generation results. ",
|
| 682 |
+
"bbox": [
|
| 683 |
+
174,
|
| 684 |
+
574,
|
| 685 |
+
825,
|
| 686 |
+
616
|
| 687 |
+
],
|
| 688 |
+
"page_idx": 5
|
| 689 |
+
},
|
| 690 |
+
{
|
| 691 |
+
"type": "text",
|
| 692 |
+
"text": "Noise schedule. Each iteration of Langevin dynamics adds noise $\\epsilon ^ { ( n ) } \\sim \\mathcal { N } ( 0 , \\sigma ^ { ( n ) } )$ to the gradient (Eq. 2). We gradually decrease $\\boldsymbol { \\sigma } ^ { ( n ) }$ across iterations, which intuitively transitions the decoding procedure from exploration to optimization. In our experiments, we typically used the schedule which sets/reduces $\\sigma$ to $\\{ 1 , 0 . 5 , 0 . 1 , 0 . 0 5 , 0 . 0 1 \\}$ at iterations $\\{ 0 , 5 0 , 5 0 0 , \\overleftarrow { 1 } 0 0 0 , \\overleftarrow { 1 } 5 0 0 \\}$ , respectively. ",
|
| 693 |
+
"bbox": [
|
| 694 |
+
173,
|
| 695 |
+
622,
|
| 696 |
+
825,
|
| 697 |
+
683
|
| 698 |
+
],
|
| 699 |
+
"page_idx": 5
|
| 700 |
+
},
|
| 701 |
+
{
|
| 702 |
+
"type": "text",
|
| 703 |
+
"text": "Long sequences. COLD decoding produces a fixed-length sequence $\\mathbf { y } = ( y _ { 1 } , \\dots , y _ { T } )$ . To produce longer sequences, e.g. in cases where $y _ { T }$ is not the end of a sentence, we use $p _ { \\mathrm { L M } }$ to produce a continuation of $\\mathbf { y }$ using greedy decoding. ",
|
| 704 |
+
"bbox": [
|
| 705 |
+
174,
|
| 706 |
+
688,
|
| 707 |
+
825,
|
| 708 |
+
731
|
| 709 |
+
],
|
| 710 |
+
"page_idx": 5
|
| 711 |
+
},
|
| 712 |
+
{
|
| 713 |
+
"type": "text",
|
| 714 |
+
"text": "4 Experiments ",
|
| 715 |
+
"text_level": 1,
|
| 716 |
+
"bbox": [
|
| 717 |
+
174,
|
| 718 |
+
743,
|
| 719 |
+
312,
|
| 720 |
+
761
|
| 721 |
+
],
|
| 722 |
+
"page_idx": 5
|
| 723 |
+
},
|
| 724 |
+
{
|
| 725 |
+
"type": "text",
|
| 726 |
+
"text": "We evaluate COLD on three constrained generation tasks. Using COLD for each task amounts to specifying a set of task-specific constraints (instances of those in $\\ S [ 3 . 2 )$ . Our focus is enabling constrained generation for settings in which fine-tuning is infeasible, through changing the decoding method. Thus, our experiments (i) use off-the-shelf LMs without fine-tuning, and (ii) compare COLD primarily against alternative decoding methods. As our base LM, we use GPT2-XL $\\lVert \\rVert \\mathbf { 4 6 } \\rVert$ . ",
|
| 727 |
+
"bbox": [
|
| 728 |
+
173,
|
| 729 |
+
775,
|
| 730 |
+
825,
|
| 731 |
+
844
|
| 732 |
+
],
|
| 733 |
+
"page_idx": 5
|
| 734 |
+
},
|
| 735 |
+
{
|
| 736 |
+
"type": "text",
|
| 737 |
+
"text": "4.1 Abductive Reasoning ",
|
| 738 |
+
"text_level": 1,
|
| 739 |
+
"bbox": [
|
| 740 |
+
174,
|
| 741 |
+
857,
|
| 742 |
+
361,
|
| 743 |
+
872
|
| 744 |
+
],
|
| 745 |
+
"page_idx": 5
|
| 746 |
+
},
|
| 747 |
+
{
|
| 748 |
+
"type": "text",
|
| 749 |
+
"text": "We study a specific formulation of abductive reasoning $\\mathbb { \\lVert \\rVert 3 \\rVert }$ as a language generation challenge. Specifically, given a beginning sentence $\\mathbf { x } _ { l }$ and an ending sentence ${ \\bf x } _ { r }$ , the abductive language generation $( \\alpha \\mathbf { N } \\mathbf { L } \\mathbf { G } )$ problem [1] consists of generating a bridge sentence y that fills in between the two sentences and forms a coherent full story (see Figure $\\boxed { 1 }$ for example). The task is particularly challenging for conventional monotonic left-to-right LMs (such as GPT-2 and GPT-3) since it requires non-monotonic reasoning that not only conditions on the past context $( { \\bf x } _ { l }$ , on the left), but also the future story ending $\\mathbf { \\check { x } } _ { r }$ , on the right). ",
|
| 750 |
+
"bbox": [
|
| 751 |
+
173,
|
| 752 |
+
882,
|
| 753 |
+
823,
|
| 754 |
+
911
|
| 755 |
+
],
|
| 756 |
+
"page_idx": 5
|
| 757 |
+
},
|
| 758 |
+
{
|
| 759 |
+
"type": "text",
|
| 760 |
+
"text": "",
|
| 761 |
+
"bbox": [
|
| 762 |
+
174,
|
| 763 |
+
90,
|
| 764 |
+
825,
|
| 765 |
+
161
|
| 766 |
+
],
|
| 767 |
+
"page_idx": 6
|
| 768 |
+
},
|
| 769 |
+
{
|
| 770 |
+
"type": "text",
|
| 771 |
+
"text": "4.1.1 The COLD Solution ",
|
| 772 |
+
"text_level": 1,
|
| 773 |
+
"bbox": [
|
| 774 |
+
174,
|
| 775 |
+
180,
|
| 776 |
+
361,
|
| 777 |
+
195
|
| 778 |
+
],
|
| 779 |
+
"page_idx": 6
|
| 780 |
+
},
|
| 781 |
+
{
|
| 782 |
+
"type": "text",
|
| 783 |
+
"text": "COLD decoding can readily accommodate the abductive reasoning task by simply plugging in appropriate constraints to specify an energy function. Specifically, the generated text needs to be (1) fluent and consistent with the left context $\\mathbf { x } _ { l }$ , and (2) coherent with the right context ${ \\bf x } _ { r }$ . Accordingly, we compose an energy using relevant constraints from $\\ S 3 . 2 \\colon$ ",
|
| 784 |
+
"bbox": [
|
| 785 |
+
174,
|
| 786 |
+
207,
|
| 787 |
+
825,
|
| 788 |
+
265
|
| 789 |
+
],
|
| 790 |
+
"page_idx": 6
|
| 791 |
+
},
|
| 792 |
+
{
|
| 793 |
+
"type": "equation",
|
| 794 |
+
"img_path": "images/28b5241610cfecd2f6ec82fcc137135a6c21f2c4c4eac4156f901c372894223a.jpg",
|
| 795 |
+
"text": "$$\n\\begin{array} { r l } & { E ( \\tilde { \\bf { y } } ) = \\lambda _ { a } ^ { l r } f _ { \\mathrm { L M } } ^ { \\right. } ( \\tilde { \\bf { y } } ; { \\bf { x } } _ { l } ) + \\lambda _ { a } ^ { r l } f _ { \\mathrm { L M } } ^ { \\left. } ( \\tilde { \\bf { y } } ; { \\bf { x } } _ { r } ) + \\lambda _ { b } f _ { \\mathrm { p r e d } } ( \\tilde { \\bf { y } } ; { \\bf { x } } _ { r } ) + \\lambda _ { c } f _ { \\mathrm { i m } } ( \\tilde { \\bf { y } } ; { \\bf { k } } { \\bf { w } } ( { \\bf { x } } _ { r } ) - { \\bf { k } } { \\bf { w } } ( { \\bf { x } } _ { l } ) ) . } \\end{array}\n$$",
|
| 796 |
+
"text_format": "latex",
|
| 797 |
+
"bbox": [
|
| 798 |
+
225,
|
| 799 |
+
273,
|
| 800 |
+
769,
|
| 801 |
+
292
|
| 802 |
+
],
|
| 803 |
+
"page_idx": 6
|
| 804 |
+
},
|
| 805 |
+
{
|
| 806 |
+
"type": "text",
|
| 807 |
+
"text": "That is, we combine (a) a soft fluency constraint (Eq. 3) conditioning on the left sentence $\\mathbf { x } _ { l }$ to enforce fluency and consistency with the left context, and a reverse fluency constraint with a right-to-left LM conditioning on ${ \\bf x } _ { r }$ to encourage coherence with the right context; $\\mathbf { ( b ) }$ a future-token prediction constraint $( \\mathrm { E q . } \\dot { \\bigtriangledown } )$ that enforces consistency between the generation $\\mathbf { y }$ and the story ending $\\mathbf { x } _ { r }$ ; (c) a 1-gram similarity constraint $( \\mathrm { E q . } 5 )$ between the generation $\\mathbf { y }$ and keywords (non-stopwords) in ${ \\bf x } _ { r }$ (excluding those in $\\mathbf { x } _ { l }$ ), i.e., $\\mathrm { k w } ( \\mathbf x _ { r } ) - \\mathrm { k w } ( \\mathbf x _ { l } )$ , which intuitively promotes a ‘smooth transition’ between $\\mathbf x _ { l } , \\mathbf y$ , and $\\mathbf { x } _ { r }$ . ",
|
| 808 |
+
"bbox": [
|
| 809 |
+
173,
|
| 810 |
+
304,
|
| 811 |
+
825,
|
| 812 |
+
404
|
| 813 |
+
],
|
| 814 |
+
"page_idx": 6
|
| 815 |
+
},
|
| 816 |
+
{
|
| 817 |
+
"type": "text",
|
| 818 |
+
"text": "For the energy function in $\\operatorname { E q . } ( 7 )$ , we select the constraint weights on the dev set. Throughout the experiments, we set the number of Langevin dynamics steps to $N = 2 0 0 0$ , with a step size $\\eta = 0 . 1$ (Eq. 2). We discuss more details of the configurations in the appendix. ",
|
| 819 |
+
"bbox": [
|
| 820 |
+
174,
|
| 821 |
+
409,
|
| 822 |
+
825,
|
| 823 |
+
452
|
| 824 |
+
],
|
| 825 |
+
"page_idx": 6
|
| 826 |
+
},
|
| 827 |
+
{
|
| 828 |
+
"type": "text",
|
| 829 |
+
"text": "Baselines. We compare with previous decoding approaches for this task. In particular, we compare with DELOREAN $\\lvert \\boxed { \\boxplus 5 } \\rvert$ which outperformed a wide range of supervised and unsupervised methods on the abductive reasoning task in Qin et al. $\\lVert \\boldsymbol { \\mathsf { 4 5 } } \\rVert$ . Following Qin et al. $\\lVert \\boldsymbol { \\mathsf { 4 5 } } \\rVert$ , we also compare with a LEFT-ONLY method that generates the continuation of $\\mathbf { x } _ { l }$ without considering the right-side ${ \\bf x } _ { r }$ , i.e., $\\mathbf { y } \\sim p _ { \\mathrm { L M } } ( \\mathbf { y } | \\mathbf { x } _ { l } )$ . ",
|
| 830 |
+
"bbox": [
|
| 831 |
+
174,
|
| 832 |
+
457,
|
| 833 |
+
825,
|
| 834 |
+
527
|
| 835 |
+
],
|
| 836 |
+
"page_idx": 6
|
| 837 |
+
},
|
| 838 |
+
{
|
| 839 |
+
"type": "text",
|
| 840 |
+
"text": "Evaluation. We perform both automatic and human evaluation. We adopt the standard automatic metrics on the task $\\mathbb { M }$ that measure the minimal edit between the generated text and the humanwritten references on the test set, including BLEU $\\mathbb { H O }$ , ROUGE $\\pmb { \\Vert 3 0 \\Vert }$ , CIDEr $\\mathbb { \\left[ \\left[ 5 1 \\right] \\right] }$ , and BERTScore $\\left[ \\left[ 5 8 \\right] \\right]$ . For the human evaluation, we follow $\\overline { { \\| \\sharp \\bar { \\cdot } \\| } }$ and let crowdworkers from Amazon Mechanical Turk rate the generations on 200 test examples. Workers were presented a pair of observations $\\mathbf { \\Delta x } _ { l }$ and ${ \\bf x } _ { r }$ ) and a generated hypothesis $\\mathbf { y }$ , and asked to rate the coherence of the hypothesis with respect to the observation $\\mathbf { x } _ { l }$ (i.e., $\\mathbf { x } _ { l } \\mathbf { y }$ ), the observation ${ \\bf x } _ { r }$ (i.e., $\\mathbf { y } \\mathbf { x } _ { r }$ ), and both (i.e., $\\mathbf { x } _ { l } \\mathbf { y } \\mathbf { x } _ { r }$ ), as well as the grammaticality of the hypothesis $\\mathbf { y }$ itself, on a 5-point Likert scale. The average ordinal Krippendorff alpha $0 \\leq \\alpha \\leq 1$ ) $[ [ 2 5 ] ]$ is 0.36, indicating a fair inner-annotator agreement. ",
|
| 841 |
+
"bbox": [
|
| 842 |
+
174,
|
| 843 |
+
532,
|
| 844 |
+
825,
|
| 845 |
+
659
|
| 846 |
+
],
|
| 847 |
+
"page_idx": 6
|
| 848 |
+
},
|
| 849 |
+
{
|
| 850 |
+
"type": "text",
|
| 851 |
+
"text": "4.1.2 Results ",
|
| 852 |
+
"text_level": 1,
|
| 853 |
+
"bbox": [
|
| 854 |
+
174,
|
| 855 |
+
676,
|
| 856 |
+
276,
|
| 857 |
+
690
|
| 858 |
+
],
|
| 859 |
+
"page_idx": 6
|
| 860 |
+
},
|
| 861 |
+
{
|
| 862 |
+
"type": "text",
|
| 863 |
+
"text": "Table $^ 1$ shows the evaluation results on the abductive reasoning task. Under automatic evaluation (the left panel), COLD consistently outperforms the previous best unsupervised decoding algorithm DELOREAN, as well as the LEFT-ONLY method, in terms of both the lexical overlap metrics (BLEU, ROUGE and CIDEr) and semantic similarity metric BERTScore. The human evaluation (the right panel) provide more fine-grained insights. COLD achieves the best overall coherence, meaning that the generated y from COLD fits best with both the left-side context $\\mathbf { x } _ { l }$ and the right-side context ${ \\bf x } _ { r }$ compared to the other methods. In contrast, DELOREAN excels only in terms of the left-side coherence (with $\\mathbf { x } _ { l }$ ), with inferior right-coherence (with ${ \\bf x } _ { r }$ ). We speculate this is because of DELOREAN’s complex interleaving of forward and backward decoding passes that make it difficult to balance the left- and right-coherence constraints. In terms of grammaticality, unsurprisingly, LEFT-ONLY obtains the best score as it ignores any other constraints (and fails this task with low coherence scores). More importantly, COLD achieves a high grammaticality score along with its high coherence, substantially improving over DELOREAN. Example generations in Appendix Table 7 show how COLD can reason with the right-hand context (e.g. ‘no heels’), while DELOREAN’s generations are contradictory (‘red shoes’ vs. ‘white pair’) or equivalent to those from LEFT-ONLY. ",
|
| 864 |
+
"bbox": [
|
| 865 |
+
173,
|
| 866 |
+
704,
|
| 867 |
+
825,
|
| 868 |
+
911
|
| 869 |
+
],
|
| 870 |
+
"page_idx": 6
|
| 871 |
+
},
|
| 872 |
+
{
|
| 873 |
+
"type": "table",
|
| 874 |
+
"img_path": "images/a1b081bb11eb7d23cf69ff0ed34f671815e7dc31c96e49daead4f06dd3103795.jpg",
|
| 875 |
+
"table_caption": [],
|
| 876 |
+
"table_footnote": [],
|
| 877 |
+
"table_body": "<table><tr><td rowspan=\"2\">Models</td><td colspan=\"2\">Min-Edit</td><td colspan=\"2\">Coherence</td></tr><tr><td>Overlap</td><td>Human</td><td>BERTS.</td><td>Human</td></tr><tr><td>LEFT-ONLY</td><td>50.56</td><td>1.21</td><td>73.83</td><td>2.30</td></tr><tr><td>Mix-Match </td><td>85.07</td><td>1</td><td>65.20</td><td>1</td></tr><tr><td>Mix-MatchL 国</td><td>84.79</td><td>1</td><td>66.03</td><td>1</td></tr><tr><td>DELOREAN</td><td>52.90</td><td>1.81</td><td>73.66</td><td>1.92</td></tr><tr><td>COLD (ours)</td><td>56.84</td><td>1.82</td><td>73.47</td><td>2.12</td></tr></table>",
|
| 878 |
+
"bbox": [
|
| 879 |
+
176,
|
| 880 |
+
77,
|
| 881 |
+
490,
|
| 882 |
+
178
|
| 883 |
+
],
|
| 884 |
+
"page_idx": 7
|
| 885 |
+
},
|
| 886 |
+
{
|
| 887 |
+
"type": "text",
|
| 888 |
+
"text": "Table 2: Automatic and human evaluation of counterfactual story rewriting. As a trivial method, LEFT-ONLY is coherent but fails on minimal-edit. COLD is superior to DELOREAN in terms of most metrics, including human evaluation. ",
|
| 889 |
+
"bbox": [
|
| 890 |
+
174,
|
| 891 |
+
181,
|
| 892 |
+
488,
|
| 893 |
+
263
|
| 894 |
+
],
|
| 895 |
+
"page_idx": 7
|
| 896 |
+
},
|
| 897 |
+
{
|
| 898 |
+
"type": "table",
|
| 899 |
+
"img_path": "images/f985297fd1aac65dc88bc9cbaeb8c1ea3c2f86365367805b36cff543721a77bc.jpg",
|
| 900 |
+
"table_caption": [],
|
| 901 |
+
"table_footnote": [],
|
| 902 |
+
"table_body": "<table><tr><td rowspan=\"2\">Models</td><td colspan=\"2\">Coverage</td><td colspan=\"2\">Fluency</td></tr><tr><td>Count</td><td>Percent</td><td>PPL</td><td>Human</td></tr><tr><td>TSMH</td><td>2.72</td><td>71.27</td><td>1545.15</td><td>1.72</td></tr><tr><td>NEUROLOGIC</td><td>3.30</td><td>91.00</td><td>28.61</td><td>2.53</td></tr><tr><td>COLD (ours)</td><td>4.24</td><td>94.50</td><td>54.98</td><td>2.07</td></tr></table>",
|
| 903 |
+
"bbox": [
|
| 904 |
+
509,
|
| 905 |
+
78,
|
| 906 |
+
815,
|
| 907 |
+
151
|
| 908 |
+
],
|
| 909 |
+
"page_idx": 7
|
| 910 |
+
},
|
| 911 |
+
{
|
| 912 |
+
"type": "text",
|
| 913 |
+
"text": "Table 3: Results of lexically constrained decoding $( \\ S 4 . 3 )$ . For keyword coverage, we report both the average number and average percentage of constraint words present in the generated text. For language fluency, we use perplexity and human judgement. ",
|
| 914 |
+
"bbox": [
|
| 915 |
+
506,
|
| 916 |
+
155,
|
| 917 |
+
821,
|
| 918 |
+
239
|
| 919 |
+
],
|
| 920 |
+
"page_idx": 7
|
| 921 |
+
},
|
| 922 |
+
{
|
| 923 |
+
"type": "text",
|
| 924 |
+
"text": "4.2 Counterfactual Story Rewriting ",
|
| 925 |
+
"text_level": 1,
|
| 926 |
+
"bbox": [
|
| 927 |
+
174,
|
| 928 |
+
270,
|
| 929 |
+
436,
|
| 930 |
+
286
|
| 931 |
+
],
|
| 932 |
+
"page_idx": 7
|
| 933 |
+
},
|
| 934 |
+
{
|
| 935 |
+
"type": "text",
|
| 936 |
+
"text": "Next, we consider counterfactual story rewriting $\\pm \\mathbb { H }$ . Given a story context $\\mathbf { x } _ { l }$ with ending ${ \\bf x } _ { r }$ , the task is to generate a new story ending y that is (i) similar to the original ending $\\mathbf { x } _ { r }$ , yet (ii) consistent with a new story context $\\mathbf { x } _ { l } ^ { \\prime }$ (see Figure 1 for example). The task is challenging as it requires capturing the aspects of future events that are invariant under the new (counterfactual) context, while only making necessary edits for coherence. ",
|
| 937 |
+
"bbox": [
|
| 938 |
+
174,
|
| 939 |
+
295,
|
| 940 |
+
825,
|
| 941 |
+
366
|
| 942 |
+
],
|
| 943 |
+
"page_idx": 7
|
| 944 |
+
},
|
| 945 |
+
{
|
| 946 |
+
"type": "text",
|
| 947 |
+
"text": "4.2.1 The COLD Solution ",
|
| 948 |
+
"text_level": 1,
|
| 949 |
+
"bbox": [
|
| 950 |
+
174,
|
| 951 |
+
380,
|
| 952 |
+
361,
|
| 953 |
+
395
|
| 954 |
+
],
|
| 955 |
+
"page_idx": 7
|
| 956 |
+
},
|
| 957 |
+
{
|
| 958 |
+
"type": "text",
|
| 959 |
+
"text": "To tackle this task, we use COLD with an energy composed of constraint functions that promote coherence with the new context $\\mathbf { x } _ { l } ^ { \\prime }$ , and minimal edits to the original ending ${ \\bf x } _ { r }$ : ",
|
| 960 |
+
"bbox": [
|
| 961 |
+
173,
|
| 962 |
+
404,
|
| 963 |
+
821,
|
| 964 |
+
433
|
| 965 |
+
],
|
| 966 |
+
"page_idx": 7
|
| 967 |
+
},
|
| 968 |
+
{
|
| 969 |
+
"type": "equation",
|
| 970 |
+
"img_path": "images/9487ca5880f6f5324d19f12488ee48a5700fa39e50f72995d7fcc37dbca89b0c.jpg",
|
| 971 |
+
"text": "$$\n\\begin{array} { r } { E ( \\tilde { \\mathbf { y } } ) = \\lambda _ { a } ^ { l r } f _ { \\mathrm { L M } } ^ { \\right. } ( \\tilde { \\mathbf { y } } ; \\mathbf { x } _ { l } ^ { \\prime } ) + \\lambda _ { a } ^ { r l } f _ { \\mathrm { L M } } ^ { \\left. } ( \\tilde { \\mathbf { y } } ) + \\lambda _ { b } f _ { \\mathrm { s i m } } ( \\tilde { \\mathbf { y } } ; \\mathbf { x } _ { r } ) . } \\end{array}\n$$",
|
| 972 |
+
"text_format": "latex",
|
| 973 |
+
"bbox": [
|
| 974 |
+
338,
|
| 975 |
+
436,
|
| 976 |
+
660,
|
| 977 |
+
455
|
| 978 |
+
],
|
| 979 |
+
"page_idx": 7
|
| 980 |
+
},
|
| 981 |
+
{
|
| 982 |
+
"type": "text",
|
| 983 |
+
"text": "These constraints combine: (a) a soft fluency constraint $\\left( \\mathrm { E q . } \\bigstar \\bigstar \\right)$ conditioned on $\\mathbf { x } _ { l } ^ { \\prime }$ to promote coherence between the generation $\\mathbf { y }$ and the new (counterfactual) context $\\mathbf { x } _ { l } ^ { \\prime }$ ; a reverse LM constraint to improve fluency; (b) a $n$ -gram similarity constraint (Eq. 5, $n = \\{ 2 , 3 \\} ,$ ) to encourage generating an ending $\\tilde { \\mathbf { y } }$ that is close to the original ending ${ \\bf x } _ { r }$ . We largely follow the configurations in $\\ S 4 . 1$ with some exceptions described in the appendix. ",
|
| 984 |
+
"bbox": [
|
| 985 |
+
174,
|
| 986 |
+
462,
|
| 987 |
+
825,
|
| 988 |
+
532
|
| 989 |
+
],
|
| 990 |
+
"page_idx": 7
|
| 991 |
+
},
|
| 992 |
+
{
|
| 993 |
+
"type": "text",
|
| 994 |
+
"text": "Baselines. Similar to the setup in $\\ S [ 4 . 1 ]$ we compare with DELOREAN $\\lVert \\rVert \\bigstar \\bigstar \\rVert$ , a recent state-of-the-art decoding algorithm. As a reference, we also report the performance of a trivial solution, LEFT-ONLY, that generates a continuation of $\\mathbf { x } _ { l } ^ { \\prime }$ without considering the minimal edit constraint with the original ending ${ \\bf x } _ { r }$ . Thus the method is expected to generate a coherent ending which however does not necessarily resemble the original ending. Finally, we compare with Mix-and-Match $\\left[ \\left[ 3 6 \\right] \\right]$ , a recent energy-based decoding method with discrete MCMC sampling, using BERT-base and BERT-Large. ",
|
| 995 |
+
"bbox": [
|
| 996 |
+
173,
|
| 997 |
+
537,
|
| 998 |
+
825,
|
| 999 |
+
622
|
| 1000 |
+
],
|
| 1001 |
+
"page_idx": 7
|
| 1002 |
+
},
|
| 1003 |
+
{
|
| 1004 |
+
"type": "text",
|
| 1005 |
+
"text": "Evaluation. We use the benchmark dataset TIMETRAVEL [44]. The original data contains three sentences in a story ending. Due to computation constraints, we use the first sentence as the original ending and generate a new single-sentence ending accordingly. Following [44, 45] we conduct both automatic and human evaluation. For automatic evaluation, we measure BERTScore $\\mathbb { \\left. \\boldsymbol { \\mathsf { \\Sigma } } \\boldsymbol { \\mathsf { 8 } } \\right. }$ , and Minimal Edit which computes the overlap of text edits (insertion, deletion, replacement, etc.) [49] needed to produce the gold ending $\\mathbf { y } _ { * }$ and the generated ending y, starting from the original ending ${ \\bf x } _ { r }$ . We do not use other common metrics such as BLEU since they were shown to be ineffective [44]. For human evaluation, each crowdworker is presented with the original story $\\left( \\mathbf { x } _ { l } , \\mathbf { x } _ { r } \\right)$ , the counterfactual condition $\\mathbf { x } _ { l } ^ { \\prime }$ , and the generated ending $\\mathbf { y }$ , and the worker is asked to rate (1) the coherence of $\\tilde { \\mathbf { y } }$ with respect to $\\mathbf { x } _ { l } ^ { \\prime }$ and (2) the extent to which the generated ending y preserves the details of the original ending ${ \\bf x } _ { r }$ (“minimal edit”), on a 3-point Likert scale for 200 test examples. The average ordinal Krippendorff alpha is 0.52, indicating a moderate inner-annotator agreement. We exclude Mix-and-Match from human evaluation given the significant performance gap in automated evaluation. ",
|
| 1006 |
+
"bbox": [
|
| 1007 |
+
173,
|
| 1008 |
+
627,
|
| 1009 |
+
825,
|
| 1010 |
+
820
|
| 1011 |
+
],
|
| 1012 |
+
"page_idx": 7
|
| 1013 |
+
},
|
| 1014 |
+
{
|
| 1015 |
+
"type": "text",
|
| 1016 |
+
"text": "4.2.2 Results ",
|
| 1017 |
+
"text_level": 1,
|
| 1018 |
+
"bbox": [
|
| 1019 |
+
174,
|
| 1020 |
+
832,
|
| 1021 |
+
276,
|
| 1022 |
+
845
|
| 1023 |
+
],
|
| 1024 |
+
"page_idx": 7
|
| 1025 |
+
},
|
| 1026 |
+
{
|
| 1027 |
+
"type": "text",
|
| 1028 |
+
"text": "Table $2$ shows the results of automatic and human evaluation in terms of both minimal-edit and coherence. As expected, the reference method LEFT-ONLY that completely ignores the minimal edit constraint can easily generate a new ending that is coherent with the new context $\\mathbf { x } _ { l } ^ { \\prime }$ . Compared to the baseline approach DELOREAN, our method COLD achieves overall superior performance, with substantially improved coherence score and comparable minimal-edit score by human evaluation. Mix-and-Match, based on discrete MCMC sampling, performs poorly. Intuitively, its discrete sampling tends to get stuck in a mode of the target distribution (i.e., the region surrounding the original story ending), and struggles to explore further to find samples of interest. COLD’s gradientbased sampling with continuous approximation leads to more efficient and effective exploration and mixing, as evidenced by samples that better meet the task requirements. See Appendix for examples. ",
|
| 1029 |
+
"bbox": [
|
| 1030 |
+
174,
|
| 1031 |
+
856,
|
| 1032 |
+
823,
|
| 1033 |
+
911
|
| 1034 |
+
],
|
| 1035 |
+
"page_idx": 7
|
| 1036 |
+
},
|
| 1037 |
+
{
|
| 1038 |
+
"type": "text",
|
| 1039 |
+
"text": "",
|
| 1040 |
+
"bbox": [
|
| 1041 |
+
174,
|
| 1042 |
+
90,
|
| 1043 |
+
826,
|
| 1044 |
+
175
|
| 1045 |
+
],
|
| 1046 |
+
"page_idx": 8
|
| 1047 |
+
},
|
| 1048 |
+
{
|
| 1049 |
+
"type": "text",
|
| 1050 |
+
"text": "4.3 Lexically Constrained Decoding ",
|
| 1051 |
+
"text_level": 1,
|
| 1052 |
+
"bbox": [
|
| 1053 |
+
176,
|
| 1054 |
+
185,
|
| 1055 |
+
436,
|
| 1056 |
+
200
|
| 1057 |
+
],
|
| 1058 |
+
"page_idx": 8
|
| 1059 |
+
},
|
| 1060 |
+
{
|
| 1061 |
+
"type": "text",
|
| 1062 |
+
"text": "Next, we use COLD for lexically constrained decoding. Given a set of words $\\mathcal { W }$ , the task aims to generate a coherent sentence that contains these words (Figure $^ { 1 ) }$ . The task is challenging as it requires proper planning to coherently include the constraint words. ",
|
| 1063 |
+
"bbox": [
|
| 1064 |
+
174,
|
| 1065 |
+
210,
|
| 1066 |
+
825,
|
| 1067 |
+
253
|
| 1068 |
+
],
|
| 1069 |
+
"page_idx": 8
|
| 1070 |
+
},
|
| 1071 |
+
{
|
| 1072 |
+
"type": "text",
|
| 1073 |
+
"text": "4.3.1 The COLD Solution ",
|
| 1074 |
+
"text_level": 1,
|
| 1075 |
+
"bbox": [
|
| 1076 |
+
174,
|
| 1077 |
+
265,
|
| 1078 |
+
361,
|
| 1079 |
+
280
|
| 1080 |
+
],
|
| 1081 |
+
"page_idx": 8
|
| 1082 |
+
},
|
| 1083 |
+
{
|
| 1084 |
+
"type": "text",
|
| 1085 |
+
"text": "We specify an energy function of the following form: ",
|
| 1086 |
+
"bbox": [
|
| 1087 |
+
174,
|
| 1088 |
+
287,
|
| 1089 |
+
522,
|
| 1090 |
+
303
|
| 1091 |
+
],
|
| 1092 |
+
"page_idx": 8
|
| 1093 |
+
},
|
| 1094 |
+
{
|
| 1095 |
+
"type": "equation",
|
| 1096 |
+
"img_path": "images/b1b33c4751855fdd3042c0f157eb67d8d9745cc350c3c341fec554bbed6f9233.jpg",
|
| 1097 |
+
"text": "$$\nE ( \\tilde { \\mathbf { y } } ) = \\lambda _ { a } ^ { l r } f _ { \\mathrm { L M } } ^ { \\right. } ( \\tilde { \\mathbf { y } } ) + \\lambda _ { a } ^ { r l } f _ { \\mathrm { L M } } ^ { \\left. } ( \\tilde { \\mathbf { y } } ) + \\lambda _ { b } f _ { \\mathrm { s i m } } ( \\tilde { \\mathbf { y } } ; \\mathcal { W } ) + \\lambda _ { c } f _ { \\mathrm { p r e d } } ( \\tilde { \\mathbf { y } } ; c ( \\mathcal { W } ) ) .\n$$",
|
| 1098 |
+
"text_format": "latex",
|
| 1099 |
+
"bbox": [
|
| 1100 |
+
284,
|
| 1101 |
+
309,
|
| 1102 |
+
714,
|
| 1103 |
+
327
|
| 1104 |
+
],
|
| 1105 |
+
"page_idx": 8
|
| 1106 |
+
},
|
| 1107 |
+
{
|
| 1108 |
+
"type": "text",
|
| 1109 |
+
"text": "Specifically, this energy function incorporates: (a) a soft fluency constraint $( \\mathrm { E q } . 3 )$ and a reverse LM fluency constraint as in the previous tasks; $\\mathbf { ( b ) }$ a 1-gram similarity constraint (Eq. 5) between the generation $\\tilde { \\mathbf { y } }$ and the given words $\\mathcal { W }$ ; (c) a future-token prediction constraint, where we concatenate the constraint words (in an arbitrary order), denoted as $c ( \\mathcal { W } )$ , and use it as the right-side content ${ \\bf x } _ { r }$ in Eq. $( 4 )$ . Again we use similar configurations as in $\\ S 4 . 1 .$ More details can be found in appendix. ",
|
| 1110 |
+
"bbox": [
|
| 1111 |
+
174,
|
| 1112 |
+
334,
|
| 1113 |
+
825,
|
| 1114 |
+
406
|
| 1115 |
+
],
|
| 1116 |
+
"page_idx": 8
|
| 1117 |
+
},
|
| 1118 |
+
{
|
| 1119 |
+
"type": "text",
|
| 1120 |
+
"text": "Baselines. We compare with a recent state-of-the-art method NEUROLOGIC $\\pmb { \\mathbb { B 3 } }$ , a beam-search variant specifically designed for lexically constrained generation which outperformed many supervised and unsupervised approaches in Lu et al. $\\mathbb { \\left[ \\left. 3 3 \\right] \\right. }$ . We also report the results of TSMH $\\dot { \\mathbb { B } } \\dot { \\mathbb { Z } } \\dot { \\mathbb { I } }$ as another recent baseline which uses Monte-Carlo Tree Search [5]. ",
|
| 1121 |
+
"bbox": [
|
| 1122 |
+
174,
|
| 1123 |
+
410,
|
| 1124 |
+
825,
|
| 1125 |
+
467
|
| 1126 |
+
],
|
| 1127 |
+
"page_idx": 8
|
| 1128 |
+
},
|
| 1129 |
+
{
|
| 1130 |
+
"type": "text",
|
| 1131 |
+
"text": "Evaluation. We use the set of constraint words from the COMMONGEN corpus $\\mathbb { E 9 }$ , but adopt the canonical setting that the generated text must contain the exact constraint words (e.g., write) instead of their variants (e.g., wrote) [18, 47]. Following previous works [18, 47, 57], we report a measure of constraint words coverage as well as language fluency by evaluating the perplexity of the text . We also ask crowdworkers to rate the text fluency on a 3-point Likert scale on 200 test examples. The average ordinal Krippendorff alpha is 0.29, indicating a fair inner-annotator agreement. ",
|
| 1132 |
+
"bbox": [
|
| 1133 |
+
173,
|
| 1134 |
+
472,
|
| 1135 |
+
826,
|
| 1136 |
+
558
|
| 1137 |
+
],
|
| 1138 |
+
"page_idx": 8
|
| 1139 |
+
},
|
| 1140 |
+
{
|
| 1141 |
+
"type": "text",
|
| 1142 |
+
"text": "4.3.2 Results ",
|
| 1143 |
+
"text_level": 1,
|
| 1144 |
+
"bbox": [
|
| 1145 |
+
174,
|
| 1146 |
+
568,
|
| 1147 |
+
276,
|
| 1148 |
+
582
|
| 1149 |
+
],
|
| 1150 |
+
"page_idx": 8
|
| 1151 |
+
},
|
| 1152 |
+
{
|
| 1153 |
+
"type": "text",
|
| 1154 |
+
"text": "Table $\\triangledown$ shows the evaluation results for the lexically constrained decoding task. COLD, a general constrained decoding method, is comparable to the state-of-the-art method NEUROLOGIC designed specifically for dealing with lexical constraints. In particular, COLD achieves a higher coverage of given keywords, at the expense of generating slightly less fluent language. COLD is also substantially better than lexically constrained decoding method TSMH in terms of both coverage and fluency. ",
|
| 1155 |
+
"bbox": [
|
| 1156 |
+
174,
|
| 1157 |
+
592,
|
| 1158 |
+
825,
|
| 1159 |
+
661
|
| 1160 |
+
],
|
| 1161 |
+
"page_idx": 8
|
| 1162 |
+
},
|
| 1163 |
+
{
|
| 1164 |
+
"type": "text",
|
| 1165 |
+
"text": "4.4 Additional Analysis ",
|
| 1166 |
+
"text_level": 1,
|
| 1167 |
+
"bbox": [
|
| 1168 |
+
174,
|
| 1169 |
+
678,
|
| 1170 |
+
349,
|
| 1171 |
+
693
|
| 1172 |
+
],
|
| 1173 |
+
"page_idx": 8
|
| 1174 |
+
},
|
| 1175 |
+
{
|
| 1176 |
+
"type": "text",
|
| 1177 |
+
"text": "Ablation studies. We ablate two important ingredients of our approach, namely the constraints and the top- $k$ filtering. Due to space limit, we report the results of constraints and defer the results of top- $k$ filtering to the appendix. Table $\\textcircled{5}$ shows the human evaluation results for ablations of the constraints used on the abductive reasoning task $( \\mathrm { E q . ~ } 7 )$ . The $n$ -gram similarity constraint $f _ { \\mathrm { s i m } }$ provides the largest contribution to the overall coherence. The reverse LM fluency constraint $f _ { \\mathrm { L M } } ^ { }$ also to some extent helps with the right-side coherence by conditioning on the right-side content ${ \\bf x } _ { r }$ . Removing the future-token prediction constraint similarly causes inferior scores in terms of right-side and ",
|
| 1178 |
+
"bbox": [
|
| 1179 |
+
174,
|
| 1180 |
+
704,
|
| 1181 |
+
485,
|
| 1182 |
+
911
|
| 1183 |
+
],
|
| 1184 |
+
"page_idx": 8
|
| 1185 |
+
},
|
| 1186 |
+
{
|
| 1187 |
+
"type": "table",
|
| 1188 |
+
"img_path": "images/b56703aef10d159142d9c1688f6d1eb379d6d3e6777923c8b82124881a28f04a.jpg",
|
| 1189 |
+
"table_caption": [],
|
| 1190 |
+
"table_footnote": [],
|
| 1191 |
+
"table_body": "<table><tr><td>Models</td><td>Gra- mmar</td><td>Left- coher. (x-y)</td><td>Right- coher. (y-z)</td><td>Overall- coher. (x-y-z)</td></tr><tr><td>COLD (Full)</td><td>4.17</td><td>3.96</td><td>2.88</td><td>2.83</td></tr><tr><td>COLD -fsim</td><td>4.54</td><td>3.82</td><td>2.73</td><td>2.69</td></tr><tr><td>COLD -fim</td><td>4.35</td><td>3.97</td><td>2.84</td><td>2.80</td></tr><tr><td>COLD -fpred</td><td>4.61</td><td>4.07</td><td>2.75</td><td>2.77</td></tr></table>",
|
| 1192 |
+
"bbox": [
|
| 1193 |
+
496,
|
| 1194 |
+
720,
|
| 1195 |
+
813,
|
| 1196 |
+
827
|
| 1197 |
+
],
|
| 1198 |
+
"page_idx": 8
|
| 1199 |
+
},
|
| 1200 |
+
{
|
| 1201 |
+
"type": "text",
|
| 1202 |
+
"text": "Table 4: Ablation for the effect of different constraints in $\\operatorname { E q . } ( 7 )$ . We do human evaluation on 125 test examples. The best overall coherence is achieved when all the constraints are present. ",
|
| 1203 |
+
"bbox": [
|
| 1204 |
+
496,
|
| 1205 |
+
832,
|
| 1206 |
+
825,
|
| 1207 |
+
888
|
| 1208 |
+
],
|
| 1209 |
+
"page_idx": 8
|
| 1210 |
+
},
|
| 1211 |
+
{
|
| 1212 |
+
"type": "text",
|
| 1213 |
+
"text": "overall coherence, as expected. Removing the individual constraints leads to better grammaticality due to less competition among different constraints, at the cost of coherence. Our uniform treatment of all constraints as energy terms makes it straightforward to balance the different constraints by controlling the constraint weights. ",
|
| 1214 |
+
"bbox": [
|
| 1215 |
+
173,
|
| 1216 |
+
90,
|
| 1217 |
+
825,
|
| 1218 |
+
147
|
| 1219 |
+
],
|
| 1220 |
+
"page_idx": 9
|
| 1221 |
+
},
|
| 1222 |
+
{
|
| 1223 |
+
"type": "text",
|
| 1224 |
+
"text": "Efficiency of COLD. We report the average runtime of generating one sample on the Counterfactual Story Rewriting data. The table below shows the results (on an NVIDIA Quadro GV100 GPU, batch size ${ \\ = } 3 2$ ). We compare with Mix-and-Match $\\pmb { \\mathbb { B } } \\pmb { \\ 6 } \\|$ , a recent energy-based decoding method with discrete MCMC sampling (Metropolis-Hastings, in particular). COLD, which uses gradient-based sampling, is faster than the gradient-free Mix-and-Match: COLD is $30 \\%$ faster with base LMs of similar sizes (GPT2-M and BERTLarge), and has roughly the ",
|
| 1225 |
+
"bbox": [
|
| 1226 |
+
174,
|
| 1227 |
+
161,
|
| 1228 |
+
483,
|
| 1229 |
+
327
|
| 1230 |
+
],
|
| 1231 |
+
"page_idx": 9
|
| 1232 |
+
},
|
| 1233 |
+
{
|
| 1234 |
+
"type": "table",
|
| 1235 |
+
"img_path": "images/4bb7a7a1ee9ec50740af397cea872c602ce8321b3e152962489076cdf4e550d4.jpg",
|
| 1236 |
+
"table_caption": [],
|
| 1237 |
+
"table_footnote": [],
|
| 1238 |
+
"table_body": "<table><tr><td>Method</td><td>Runtime (s)</td></tr><tr><td>COLD (GPT2-XL,1.5B)</td><td>33.6</td></tr><tr><td>COLD (GPT2-M,355M)</td><td>22.7</td></tr><tr><td>Mix-and-Match (BERTLarge, 340M)</td><td>33.5</td></tr></table>",
|
| 1239 |
+
"bbox": [
|
| 1240 |
+
496,
|
| 1241 |
+
178,
|
| 1242 |
+
821,
|
| 1243 |
+
246
|
| 1244 |
+
],
|
| 1245 |
+
"page_idx": 9
|
| 1246 |
+
},
|
| 1247 |
+
{
|
| 1248 |
+
"type": "text",
|
| 1249 |
+
"text": "Table 5: COLD is more efficient than gradient-free Mix-and-Match $\\left[ \\left[ 3 6 \\right] \\right]$ . The runtime shown is seconds per sample on Counterfactual Story Rewriting. ",
|
| 1250 |
+
"bbox": [
|
| 1251 |
+
496,
|
| 1252 |
+
251,
|
| 1253 |
+
825,
|
| 1254 |
+
306
|
| 1255 |
+
],
|
| 1256 |
+
"page_idx": 9
|
| 1257 |
+
},
|
| 1258 |
+
{
|
| 1259 |
+
"type": "text",
|
| 1260 |
+
"text": "same time cost when using a much larger LM (GPT2-XL). ",
|
| 1261 |
+
"bbox": [
|
| 1262 |
+
173,
|
| 1263 |
+
327,
|
| 1264 |
+
558,
|
| 1265 |
+
340
|
| 1266 |
+
],
|
| 1267 |
+
"page_idx": 9
|
| 1268 |
+
},
|
| 1269 |
+
{
|
| 1270 |
+
"type": "text",
|
| 1271 |
+
"text": "5 Related Work ",
|
| 1272 |
+
"text_level": 1,
|
| 1273 |
+
"bbox": [
|
| 1274 |
+
174,
|
| 1275 |
+
352,
|
| 1276 |
+
321,
|
| 1277 |
+
369
|
| 1278 |
+
],
|
| 1279 |
+
"page_idx": 9
|
| 1280 |
+
},
|
| 1281 |
+
{
|
| 1282 |
+
"type": "text",
|
| 1283 |
+
"text": "Previous works proposed beam search variants for lexically constrained decoding $\\boxed { 1 8 } \\boxed { 4 2 } \\boxed { 3 3 }$ which enforce constraints in a discrete space. Recent works consider constraint satisfaction by adjusting vocabulary distributions using an additional discriminator or LM [6, 24, 56]. Differing from those approaches that determine the generation token by token auto-regressively, Qin et al. $[ \\bar { 1 4 5 } ]$ optimize the whole (soft) token sequence via gradient propagation, which facilitates sequence-level semantic constraints (e.g., right-coherence, minimal-edits). COLD also samples complete sequences, while offering a principled and unified formulation based on energy-based modeling. Kumar et al. $\\pmb { \\left. 2 6 \\right. }$ extend $\\bar { \\lfloor 1 7 \\rfloor }$ by imposing constraints with a Lagrangian method and optimizing for a single output with gradient descent. In contrast, our approach based on energy-based sampling $( \\ S 3 . 1 )$ allows for generating samples for other utilities (e.g., rank-and-select $\\ S 3 . { \\bar { 4 } } , \\quad$ estimating expectations). We also introduce components for more fluent generations such as the novel discretization procedure. Also, on the empirical side, we explore a different class of problems and tackle them in the absence of labeled data. The recent CGMH $\\overline { { \\mathbb { B } 5 } }$ and TSMH $ { \\mathbb { B } } ^ { { 7 } { \\mathbb { I } } }$ , followed by [36, 14], perform constrained decoding with extended Gibbs sampling or Metropolis-Hastings sampling in the discrete text space. Our energy-based formulation with gradient-based Langevin dynamics sampling produces substantially better results than the discrete TSMH $( \\ S 4 . 3 )$ . Sha $\\dot { \\mathbb { B } } \\dot { \\mathbf { 7 } } \\dot { \\mathbb { I } }$ uses gradient information to guide generation, which, however, is specifically designed for lexically constrained generation. ",
|
| 1284 |
+
"bbox": [
|
| 1285 |
+
174,
|
| 1286 |
+
377,
|
| 1287 |
+
825,
|
| 1288 |
+
612
|
| 1289 |
+
],
|
| 1290 |
+
"page_idx": 9
|
| 1291 |
+
},
|
| 1292 |
+
{
|
| 1293 |
+
"type": "text",
|
| 1294 |
+
"text": "Energy-based models (EBMs) have been used for incorporating additional information to train text generation models [7, 23, 41, 21]. In contrast, we focus on the constrained decoding (inference) that can be directly applied to pretrained LMs without fine-tuning. Langevin dynamics is widely used on EBMs of modalities with continuous values, like images [48, 9, 59], 3D shapes $ { \\Vert 5 5 \\Vert }$ , latent features $\\mathbb { \\lVert 3 9 \\rVert }$ , and audio sequences $\\lVert 2 2 \\rVert$ . To our knowledge, we are the first to apply Langevin dynamics for (constrained) discrete text generation (with a continuous approximation) for efficient sampling. ",
|
| 1295 |
+
"bbox": [
|
| 1296 |
+
174,
|
| 1297 |
+
617,
|
| 1298 |
+
825,
|
| 1299 |
+
702
|
| 1300 |
+
],
|
| 1301 |
+
"page_idx": 9
|
| 1302 |
+
},
|
| 1303 |
+
{
|
| 1304 |
+
"type": "text",
|
| 1305 |
+
"text": "6 Conclusion ",
|
| 1306 |
+
"text_level": 1,
|
| 1307 |
+
"bbox": [
|
| 1308 |
+
174,
|
| 1309 |
+
713,
|
| 1310 |
+
299,
|
| 1311 |
+
731
|
| 1312 |
+
],
|
| 1313 |
+
"page_idx": 9
|
| 1314 |
+
},
|
| 1315 |
+
{
|
| 1316 |
+
"type": "text",
|
| 1317 |
+
"text": "We introduce COLD decoding, an energy-based constrained text generation framework that can express various soft/hard constraints through an energy function, and sample using Langevin dynamics. COLD can be applied directly to off-the-shelf LMs without task-specific fine-tuning. We showcase its flexibility and strong performance on three distinct applications of constrained text generation. ",
|
| 1318 |
+
"bbox": [
|
| 1319 |
+
174,
|
| 1320 |
+
738,
|
| 1321 |
+
825,
|
| 1322 |
+
792
|
| 1323 |
+
],
|
| 1324 |
+
"page_idx": 9
|
| 1325 |
+
},
|
| 1326 |
+
{
|
| 1327 |
+
"type": "text",
|
| 1328 |
+
"text": "Acknowledgements ",
|
| 1329 |
+
"text_level": 1,
|
| 1330 |
+
"bbox": [
|
| 1331 |
+
176,
|
| 1332 |
+
811,
|
| 1333 |
+
338,
|
| 1334 |
+
829
|
| 1335 |
+
],
|
| 1336 |
+
"page_idx": 9
|
| 1337 |
+
},
|
| 1338 |
+
{
|
| 1339 |
+
"type": "text",
|
| 1340 |
+
"text": "This work was funded in part by the Natural Sciences and Engineering Research Council of Canada (NSERC) (funding reference number 401233309), DARPA MCS program through NIWC Pacific (N66001-19-2-4031), the Allen Institute for AI, and Microsoft Research PhD Fellowship. We thank the XLab research group, and our anonymous reviewers for their feedback on this work. We also acknowledge the Beaker team (https://beaker.org) for their support with experiments. ",
|
| 1341 |
+
"bbox": [
|
| 1342 |
+
174,
|
| 1343 |
+
842,
|
| 1344 |
+
825,
|
| 1345 |
+
911
|
| 1346 |
+
],
|
| 1347 |
+
"page_idx": 9
|
| 1348 |
+
},
|
| 1349 |
+
{
|
| 1350 |
+
"type": "text",
|
| 1351 |
+
"text": "References \n[1] C. Bhagavatula, R. Le Bras, C. Malaviya, K. Sakaguchi, A. Holtzman, H. Rashkin, D. Downey, W.-t. Yih, and Y. Choi. Abductive commonsense reasoning. In International Conference on Learning Representations (ICLR), 2019. URL https://openreview.net/forum?id=Byg1v1HKDB. \n[2] C. M. Bishop and N. M. Nasrabadi. Pattern recognition and machine learning, volume 4. Springer, 2006. \n[3] T. B. Brown, B. Mann, N. Ryder, M. Subbiah, J. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell, S. Agarwal, and et al. Language models are few-shot learners. In Advances in Neural Information Processing Systems (NourIPS), 2020. URL https://papers.nips.cc/paper/2020/hash/ 1457c0d6bfcb4967418bfb8ac142f64a-Abstract.html. \n[4] M. Chen, J. Tworek, H. Jun, Q. Yuan, H. P. de Oliveira Pinto, J. Kaplan, H. Edwards, Y. Burda, N. Joseph, G. Brockman, A. Ray, R. Puri, G. Krueger, and M. P. et al. Evaluating large language models trained on code, 2021. URL https://arxiv.org/abs/2107.03374. \n[5] R. Coulom. Efficient selectivity and backup operators in monte-carlo tree search. In International Conference on Computers and Games (ICCG), pages 72–83. Springer, 2006. URL https://hal. inria.fr/file/index/docid/116992/filename/CG2006.pdf. \n[6] S. Dathathri, A. Madotto, J. Lan, J. Hung, E. Frank, P. Molino, J. Yosinski, and R. Liu. Plug and play language models: A simple approach to controlled text generation. In International Conference on Learning Representations (ICLR), 2019. URL https://openreview.net/forum?id=H1edEyBKDS. \n[7] Y. Deng, A. Bakhtin, M. Ott, A. Szlam, and M. Ranzato. Residual energy-based models for text generation. In International Conference on Learning Representations, 2020. URL https://openreview.net/ forum?id=B1l4SgHKDH. \n[8] C. Donahue, M. Lee, and P. Liang. Enabling language models to fill in the blanks. In Annual Meeting of the Association for Computational Linguistics (ACL), 2020. URL https://aclanthology.org/ 2020.acl-main.225/ \n[9] Y. Du and I. Mordatch. Implicit generation and modeling with energy based models. Advances in Neural Information Processing Systems (NourIPS), 32, 2019. URL https://papers.nips.cc/paper/ 2019/hash/378a063b8fdb1db941e34f4bde584c7d-Abstract.html. \n[10] D. Duvenaud, J. Kelly, K. Swersky, M. Hashemi, M. Norouzi, and W. Grathwohl. No MCMC for me: Amortized samplers for fast and stable training of energy-based models. In International Conference on Learning Representations (ICLR), 2021. URL https://openreview.net/forum?id=ixpSxO9flk3. \n[11] B. Eikema and W. Aziz. Sampling-based minimum bayes risk decoding for neural machine translation, 2021. URL https://arxiv.org/abs/2108.04718. \n[12] A. Fan, M. Lewis, and Y. Dauphin. Hierarchical neural story generation. In Annual Meeting of the Association for Computational Linguistics (ACL), pages 889–898, 2018. URL https://aclanthology. org/P18-1082.pdf. \n[13] N. Goodman. The problem of counterfactual conditionals. The Journal of Philosophy, 44(5):113– 128, 1947. URL https://www.pdcnet.org/jphil/content/jphil_1947_0044_0005_ 0113_0128. \n[14] K. Goyal, C. Dyer, and T. Berg-Kirkpatrick. Exposing the implicit energy networks behind masked language models via metropolis–hastings. arXiv preprint arXiv:2106.02736, 2021. \n[15] K. Guu, T. B. Hashimoto, Y. Oren, and P. Liang. Generating sentences by editing prototypes. Transactions of the Association for Computational Linguistics (TACL), 6:437–450, 2018. URL https: //aclanthology.org/Q18-1031.pdf. \n[16] G. E. Hinton. Training products of experts by minimizing contrastive divergence. Neural Computation, 2002. URL https://www.cs.toronto.edu/\\~hinton/absps/tr00-004.pdf. \n[17] C. D. V. Hoang, G. Haffari, and T. Cohn. Towards decoding as continuous optimisation in neural machine translation. In Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 146–156, 2017. URL https://aclanthology.org/D17-1014/. \n[18] C. Hokamp and Q. Liu. Lexically constrained decoding for sequence generation using grid beam search. In Annual Meeting of the Association for Computational Linguistics (ACL), pages 1535–1546, 2017. URL https://aclanthology.org/P17-1141.pdf. \n[19] A. Holtzman, J. Buys, L. Du, M. Forbes, and Y. Choi. The curious case of neural text degeneration. In International Conference on Learning Representations, 2019. URL https://openreview.net/ forum?id=rygGQyrFvH. \n[20] Z. Hu, Z. Yang, X. Liang, R. Salakhutdinov, and E. P. Xing. Toward controlled generation of text. In International Conference on Machine Learning (ICML), pages 1587–1596, 2017. URL http:// proceedings.mlr.press/v70/hu17e/hu17e.pdf. \n[21] Z. Hu, Z. Yang, R. R. Salakhutdinov, L. Qin, X. Liang, H. Dong, and E. P. Xing. Deep generative models with learnable knowledge constraints. Advances in Neural Information Processing Systems, 31, 2018. \n[22] V. Jayaram and J. Thickstun. Parallel and flexible sampling from autoregressive models via Langevin dynamics. In International Conference on Machine Learning (ICML), pages 4807–4818. PMLR, 2021. URL https://proceedings.mlr.press/v139/jayaram21b.html. \n[23] M. Khalifa, H. Elsahar, and M. Dymetman. A distributional approach to controlled text generation. In International Conference on Learning Representations, 2020. \n[24] B. Krause, A. D. Gotmare, B. McCann, N. S. Keskar, S. Joty, R. Socher, and N. F. Rajani. GeDi: Generative discriminator guided sequence generation. In Conference on Empirical Methods in Natural Language Processing (EMNLP) - Findings, pages 4929–4952, 2021. URL https://aclanthology.org/ 2021.findings-emnlp.424/. \n[25] K. Krippendorff. Computing krippendorff’s alpha reliability. Departmental papers (ASC), page 43, 2007. URL https://repository.upenn.edu/asc_papers/43/. \n[26] S. Kumar, E. Malmi, A. Severyn, and Y. Tsvetkov. Controlled text generation as continuous optimization with multiple constraints. Advances in Neural Information Processing Systems (NourIPS), 34, 2021. URL https://openreview.net/forum?id=kTy7bbm-4I4. \n[27] Y. LeCun, S. Chopra, R. Hadsell, M. Ranzato, and F. J. Huang. A Tutorial on Energy-Based Learning. Predicting Structured Data, 2006. ISSN <null>. doi: 10.1198/tech.2008.s913. URL http://yann. lecun.com/exdb/publis/pdf/lecun-06.pdf. \n[28] A. Lee, M. Auli, and M. Ranzato. Discriminative reranking for neural machine translation. In Annual Meeting of the Association for Computational Linguistics (ACL), pages 7250–7264, Online, Aug. 2021. URL https://aclanthology.org/2021.acl-long.563. \n[29] B. Y. Lin, W. Zhou, M. Shen, P. Zhou, C. Bhagavatula, Y. Choi, and X. Ren. CommonGen: A constrained text generation challenge for generative commonsense reasoning. In Conference on Empirical Methods in Natural Language Processing (EMNLP) - Findings, 2020. URL https://aclanthology.org/ 2020.findings-emnlp.165.pdf. \n[30] C.-Y. Lin. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out, pages 74–81, 2004. URL https://aclanthology.org/W04-1013.pdf. \n[31] S. Lin, W. Wang, Z. Yang, X. Liang, F. F. Xu, E. Xing, and Z. Hu. Record-to-text generation with style imitation. In Conference on Empirical Methods in Natural Language Processing (EMNLP) - Findings, pages 1589–1598, 2020. URL https://aclanthology.org/2020.findings-emnlp.144. pdf. \n[32] G. Liu, Z. Yang, T. Tao, X. Liang, Z. Li, B. Zhou, S. Cui, and Z. Hu. Don’t take it literally: An edit-invariant sequence loss for text generation. arXiv preprint arXiv:2106.15078, 2021. URL https: //arxiv.org/abs/2106.15078. \n[33] X. Lu, P. West, R. Zellers, R. Le Bras, C. Bhagavatula, and Y. Choi. Neurologic decoding:(un) supervised neural text generation with predicate logic constraints. In Conference of the North American Chapter of the Association for Computational Linguistics (NAACL), pages 4288–4299, 2021. URL https: //aclanthology.org/2021.naacl-main.339.pdf. \n[34] Y.-A. Ma, Y. Chen, C. Jin, N. Flammarion, and M. I. Jordan. Sampling can be faster than optimization. Proceedings of the National Academy of Sciences (PNAS), 116(42):20881–20885, 2019. URL https: //www.pnas.org/content/116/42/20881. \n[35] N. Miao, H. Zhou, L. Mou, R. Yan, and L. Li. CGMH: Constrained sentence generation by metropolishastings sampling. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 6834–6842, 2019. ",
|
| 1352 |
+
"bbox": [
|
| 1353 |
+
173,
|
| 1354 |
+
70,
|
| 1355 |
+
828,
|
| 1356 |
+
920
|
| 1357 |
+
],
|
| 1358 |
+
"page_idx": 10
|
| 1359 |
+
},
|
| 1360 |
+
{
|
| 1361 |
+
"type": "text",
|
| 1362 |
+
"text": "",
|
| 1363 |
+
"bbox": [
|
| 1364 |
+
169,
|
| 1365 |
+
25,
|
| 1366 |
+
828,
|
| 1367 |
+
916
|
| 1368 |
+
],
|
| 1369 |
+
"page_idx": 11
|
| 1370 |
+
},
|
| 1371 |
+
{
|
| 1372 |
+
"type": "text",
|
| 1373 |
+
"text": "[36] F. Mireshghallah, K. Goyal, and T. Berg-Kirkpatrick. Mix and match: Learning-free controllable text generation using energy language models. arXiv preprint arXiv:2203.13299, 2022. ",
|
| 1374 |
+
"bbox": [
|
| 1375 |
+
171,
|
| 1376 |
+
92,
|
| 1377 |
+
823,
|
| 1378 |
+
118
|
| 1379 |
+
],
|
| 1380 |
+
"page_idx": 12
|
| 1381 |
+
},
|
| 1382 |
+
{
|
| 1383 |
+
"type": "text",
|
| 1384 |
+
"text": "[37] R. M. Neal et al. MCMC using hamiltonian dynamics. Handbook of markov chain monte carlo, 2(11):2, 2011. URL https://arxiv.org/abs/1206.1901. ",
|
| 1385 |
+
"bbox": [
|
| 1386 |
+
173,
|
| 1387 |
+
128,
|
| 1388 |
+
823,
|
| 1389 |
+
156
|
| 1390 |
+
],
|
| 1391 |
+
"page_idx": 12
|
| 1392 |
+
},
|
| 1393 |
+
{
|
| 1394 |
+
"type": "text",
|
| 1395 |
+
"text": "[38] E. Nijkamp, M. Hill, T. Han, S.-C. Zhu, and Y. N. Wu. On the anatomy of MCMC-based maximum likelihood learning of energy-based models. In Conference on Artificial Intelligence (AAAI), volume 34, pages 5272–5280, 2020. URL https://ojs.aaai.org/index.php/AAAI/article/view/ 5973. ",
|
| 1396 |
+
"bbox": [
|
| 1397 |
+
174,
|
| 1398 |
+
165,
|
| 1399 |
+
826,
|
| 1400 |
+
217
|
| 1401 |
+
],
|
| 1402 |
+
"page_idx": 12
|
| 1403 |
+
},
|
| 1404 |
+
{
|
| 1405 |
+
"type": "text",
|
| 1406 |
+
"text": "[39] B. Pang, T. Han, E. Nijkamp, S.-C. Zhu, and Y. N. Wu. Learning latent space energy-based prior model. Advances in Neural Information Processing Systems, 33:21994–22008, 2020. ",
|
| 1407 |
+
"bbox": [
|
| 1408 |
+
169,
|
| 1409 |
+
228,
|
| 1410 |
+
825,
|
| 1411 |
+
256
|
| 1412 |
+
],
|
| 1413 |
+
"page_idx": 12
|
| 1414 |
+
},
|
| 1415 |
+
{
|
| 1416 |
+
"type": "text",
|
| 1417 |
+
"text": "[40] K. Papineni, S. Roukos, T. Ward, and W.-J. Zhu. Bleu: a method for automatic evaluation of machine translation. In Annual Meeting of the Association for Computational Linguistics (ACL), pages 311–318, 2002. URL https://aclanthology.org/P02-1040.pdf. ",
|
| 1418 |
+
"bbox": [
|
| 1419 |
+
173,
|
| 1420 |
+
265,
|
| 1421 |
+
825,
|
| 1422 |
+
305
|
| 1423 |
+
],
|
| 1424 |
+
"page_idx": 12
|
| 1425 |
+
},
|
| 1426 |
+
{
|
| 1427 |
+
"type": "text",
|
| 1428 |
+
"text": "[41] T. Parshakova, J.-M. Andreoli, and M. Dymetman. Global autoregressive models for data-efficient sequence learning. In Proceedings of the 23rd Conference on Computational Natural Language Learning (CoNLL), pages 900–909, 2019. ",
|
| 1429 |
+
"bbox": [
|
| 1430 |
+
173,
|
| 1431 |
+
314,
|
| 1432 |
+
825,
|
| 1433 |
+
354
|
| 1434 |
+
],
|
| 1435 |
+
"page_idx": 12
|
| 1436 |
+
},
|
| 1437 |
+
{
|
| 1438 |
+
"type": "text",
|
| 1439 |
+
"text": "[42] D. Pascual, B. Egressy, F. Bolli, and R. Wattenhofer. Directed beam search: Plug-and-play lexically constrained language generation. arXiv preprint arXiv:2012.15416, 2020. URL https://arxiv. org/abs/2012.15416. ",
|
| 1440 |
+
"bbox": [
|
| 1441 |
+
173,
|
| 1442 |
+
363,
|
| 1443 |
+
823,
|
| 1444 |
+
404
|
| 1445 |
+
],
|
| 1446 |
+
"page_idx": 12
|
| 1447 |
+
},
|
| 1448 |
+
{
|
| 1449 |
+
"type": "text",
|
| 1450 |
+
"text": "[43] C. S. Peirce. Collected papers of charles sanders peirce, volume 2. Harvard University Press, 1974. URL https://www.hup.harvard.edu/catalog.php?isbn $\\overline { { = } }$ 9780674138001. ",
|
| 1451 |
+
"bbox": [
|
| 1452 |
+
171,
|
| 1453 |
+
414,
|
| 1454 |
+
823,
|
| 1455 |
+
440
|
| 1456 |
+
],
|
| 1457 |
+
"page_idx": 12
|
| 1458 |
+
},
|
| 1459 |
+
{
|
| 1460 |
+
"type": "text",
|
| 1461 |
+
"text": "[44] L. Qin, A. Bosselut, A. Holtzman, C. Bhagavatula, E. Clark, and Y. Choi. Counterfactual story reasoning and generation. In Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 5043–5053, 2019. URL https://aclanthology.org/D19-1509.pdf. ",
|
| 1462 |
+
"bbox": [
|
| 1463 |
+
173,
|
| 1464 |
+
450,
|
| 1465 |
+
821,
|
| 1466 |
+
491
|
| 1467 |
+
],
|
| 1468 |
+
"page_idx": 12
|
| 1469 |
+
},
|
| 1470 |
+
{
|
| 1471 |
+
"type": "text",
|
| 1472 |
+
"text": "[45] L. Qin, V. Shwartz, P. West, C. Bhagavatula, J. Hwang, R. L. Bras, A. Bosselut, and Y. Choi. Back to the future: Unsupervised backprop-based decoding for counterfactual and abductive commonsense reasoning. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2020. URL https://aclanthology.org/2020.emnlp-main.58. ",
|
| 1473 |
+
"bbox": [
|
| 1474 |
+
173,
|
| 1475 |
+
500,
|
| 1476 |
+
825,
|
| 1477 |
+
553
|
| 1478 |
+
],
|
| 1479 |
+
"page_idx": 12
|
| 1480 |
+
},
|
| 1481 |
+
{
|
| 1482 |
+
"type": "text",
|
| 1483 |
+
"text": "[46] A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, I. Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019. URL https://openai.com/blog/ better-language-models/. ",
|
| 1484 |
+
"bbox": [
|
| 1485 |
+
173,
|
| 1486 |
+
563,
|
| 1487 |
+
825,
|
| 1488 |
+
602
|
| 1489 |
+
],
|
| 1490 |
+
"page_idx": 12
|
| 1491 |
+
},
|
| 1492 |
+
{
|
| 1493 |
+
"type": "text",
|
| 1494 |
+
"text": "[47] L. Sha. Gradient-guided unsupervised lexically constrained text generation. In Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 8692–8703, 2020. URL https: //aclanthology.org/2020.emnlp-main.701.pdf. ",
|
| 1495 |
+
"bbox": [
|
| 1496 |
+
173,
|
| 1497 |
+
612,
|
| 1498 |
+
825,
|
| 1499 |
+
652
|
| 1500 |
+
],
|
| 1501 |
+
"page_idx": 12
|
| 1502 |
+
},
|
| 1503 |
+
{
|
| 1504 |
+
"type": "text",
|
| 1505 |
+
"text": "[48] Y. Song and S. Ermon. Generative modeling by estimating gradients of the data distribution. Advances in Neural Information Processing Systems (NourIPS), 32, 2019. URL https://proceedings. neurips.cc/paper/2019/hash/3001ef257407d5a371a96dcd947c7d93-Abstract. html. ",
|
| 1506 |
+
"bbox": [
|
| 1507 |
+
173,
|
| 1508 |
+
661,
|
| 1509 |
+
823,
|
| 1510 |
+
713
|
| 1511 |
+
],
|
| 1512 |
+
"page_idx": 12
|
| 1513 |
+
},
|
| 1514 |
+
{
|
| 1515 |
+
"type": "text",
|
| 1516 |
+
"text": "[49] M. Šošic and M. ´ Šikic. Edlib: a´ $\\mathrm { c / c } { + + }$ library for fast, exact sequence alignment using edit distance. Bioinformatics, 33(9):1394–1395, 2017. URL https://pubmed.ncbi.nlm.nih.gov/28453688/. ",
|
| 1517 |
+
"bbox": [
|
| 1518 |
+
171,
|
| 1519 |
+
723,
|
| 1520 |
+
825,
|
| 1521 |
+
751
|
| 1522 |
+
],
|
| 1523 |
+
"page_idx": 12
|
| 1524 |
+
},
|
| 1525 |
+
{
|
| 1526 |
+
"type": "text",
|
| 1527 |
+
"text": "[50] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems (NourIPS), 2017. URL https://proceedings.neurips.cc/paper/2017/hash/ 3f5ee243547dee91fbd053c1c4a845aa-Abstract.html. ",
|
| 1528 |
+
"bbox": [
|
| 1529 |
+
173,
|
| 1530 |
+
761,
|
| 1531 |
+
826,
|
| 1532 |
+
813
|
| 1533 |
+
],
|
| 1534 |
+
"page_idx": 12
|
| 1535 |
+
},
|
| 1536 |
+
{
|
| 1537 |
+
"type": "text",
|
| 1538 |
+
"text": "[51] R. Vedantam, C. Lawrence Zitnick, and D. Parikh. Cider: Consensus-based image description evaluation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4566–4575, 2015. URL https://arxiv.org/abs/1411.5726. ",
|
| 1539 |
+
"bbox": [
|
| 1540 |
+
171,
|
| 1541 |
+
823,
|
| 1542 |
+
823,
|
| 1543 |
+
863
|
| 1544 |
+
],
|
| 1545 |
+
"page_idx": 12
|
| 1546 |
+
},
|
| 1547 |
+
{
|
| 1548 |
+
"type": "text",
|
| 1549 |
+
"text": "[52] S. Welleck, J. Liu, J. M. Han, and Y. Choi. Towards grounded natural language proof generation. MathAI4Ed Workshop at NeurIPS, 2021. URL https://mathai4ed.github.io/papers/ papers/paper_10.pdf. ",
|
| 1550 |
+
"bbox": [
|
| 1551 |
+
173,
|
| 1552 |
+
872,
|
| 1553 |
+
826,
|
| 1554 |
+
912
|
| 1555 |
+
],
|
| 1556 |
+
"page_idx": 12
|
| 1557 |
+
},
|
| 1558 |
+
{
|
| 1559 |
+
"type": "text",
|
| 1560 |
+
"text": "[53] M. Welling and Y. W. Teh. Bayesian learning via stochastic gradient langevin dynamics. In International Conference on Machine Learning (ICML), pages 681–688, 2011. URL https://icml.cc/2011/ papers/398_icmlpaper.pdf. ",
|
| 1561 |
+
"bbox": [
|
| 1562 |
+
171,
|
| 1563 |
+
92,
|
| 1564 |
+
825,
|
| 1565 |
+
132
|
| 1566 |
+
],
|
| 1567 |
+
"page_idx": 13
|
| 1568 |
+
},
|
| 1569 |
+
{
|
| 1570 |
+
"type": "text",
|
| 1571 |
+
"text": "[54] P. West, X. Lu, A. Holtzman, C. Bhagavatula, J. D. Hwang, and Y. Choi. Reflective decoding: Beyond unidirectional generation with off-the-shelf language models. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 1435–1450, Online, Aug. 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.acl-long.114. URL https://aclanthology. org/2021.acl-long.114. ",
|
| 1572 |
+
"bbox": [
|
| 1573 |
+
173,
|
| 1574 |
+
140,
|
| 1575 |
+
825,
|
| 1576 |
+
217
|
| 1577 |
+
],
|
| 1578 |
+
"page_idx": 13
|
| 1579 |
+
},
|
| 1580 |
+
{
|
| 1581 |
+
"type": "text",
|
| 1582 |
+
"text": "[55] J. Xie, Y. Xu, Z. Zheng, S.-C. Zhu, and Y. N. Wu. Generative pointnet: Deep energy-based learning on unordered point sets for 3D generation, reconstruction and classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14976–14985, 2021. ",
|
| 1583 |
+
"bbox": [
|
| 1584 |
+
171,
|
| 1585 |
+
224,
|
| 1586 |
+
823,
|
| 1587 |
+
263
|
| 1588 |
+
],
|
| 1589 |
+
"page_idx": 13
|
| 1590 |
+
},
|
| 1591 |
+
{
|
| 1592 |
+
"type": "text",
|
| 1593 |
+
"text": "[56] K. Yang and D. Klein. FUDGE: Controlled text generation with future discriminators. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 3511–3535, Online, June 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.naacl-main.276. URL https://aclanthology.org/2021. naacl-main.276. ",
|
| 1594 |
+
"bbox": [
|
| 1595 |
+
173,
|
| 1596 |
+
272,
|
| 1597 |
+
828,
|
| 1598 |
+
338
|
| 1599 |
+
],
|
| 1600 |
+
"page_idx": 13
|
| 1601 |
+
},
|
| 1602 |
+
{
|
| 1603 |
+
"type": "text",
|
| 1604 |
+
"text": "[57] M. Zhang, N. Jiang, L. Li, and Y. Xue. Language generation via combinatorial constraint satisfaction: A tree search enhanced monte-carlo approach. In Learning Meets Combinatorial Algorithms at NeurIPS2020, 2020. URL https://openreview.net/forum?id=TZPfhZunXOb. ",
|
| 1605 |
+
"bbox": [
|
| 1606 |
+
173,
|
| 1607 |
+
347,
|
| 1608 |
+
825,
|
| 1609 |
+
386
|
| 1610 |
+
],
|
| 1611 |
+
"page_idx": 13
|
| 1612 |
+
},
|
| 1613 |
+
{
|
| 1614 |
+
"type": "text",
|
| 1615 |
+
"text": "[58] T. Zhang, V. Kishore, F. Wu, K. Q. Weinberger, and Y. Artzi. Bertscore: Evaluating text generation with bert. In International Conference on Learning Representations (ICLR), 2019. URL https: //openreview.net/forum?id=SkeHuCVFDr. ",
|
| 1616 |
+
"bbox": [
|
| 1617 |
+
173,
|
| 1618 |
+
393,
|
| 1619 |
+
825,
|
| 1620 |
+
434
|
| 1621 |
+
],
|
| 1622 |
+
"page_idx": 13
|
| 1623 |
+
},
|
| 1624 |
+
{
|
| 1625 |
+
"type": "text",
|
| 1626 |
+
"text": "[59] Y. Zhao, J. Xie, and P. Li. Learning energy-based generative models via coarse-to-fine expanding and sampling. In International Conference on Learning Representations, 2021. ",
|
| 1627 |
+
"bbox": [
|
| 1628 |
+
169,
|
| 1629 |
+
441,
|
| 1630 |
+
823,
|
| 1631 |
+
468
|
| 1632 |
+
],
|
| 1633 |
+
"page_idx": 13
|
| 1634 |
+
},
|
| 1635 |
+
{
|
| 1636 |
+
"type": "text",
|
| 1637 |
+
"text": "[60] W. Zhu, Z. Hu, and E. Xing. Text infilling. arXiv preprint arXiv:1901.00158, 2019. URL https: //arxiv.org/abs/1901.00158. ",
|
| 1638 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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# REVEALING SINGLE FRAME BIASFOR VIDEO-AND-LANGUAGE LEARNING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Training an effective video-and-language model intuitively requires multiple frames as model inputs. However, it is unclear whether using multiple frames is beneficial to downstream tasks, and if yes, whether the performance gain is worth the drastically-increased computation and memory costs resulting from using more frames. In this work, we explore single-frame models for video-andlanguage learning. On a diverse set of video-and-language tasks (including textto-video retrieval and video question answering), we show the surprising result that, with large-scale pre-training and a proper frame ensemble strategy at inference time, a single-frame trained model that does not consider temporal information can achieve better performance than existing methods that use multiple frames for training. This result reveals the existence of a strong “static appearance bias” in popular video-and-language datasets. Therefore, to allow for a more comprehensive evaluation of video-and-language models, we propose two new retrieval tasks based on existing fine-grained action recognition datasets that encourage temporal modeling. Code and models will be released upon acceptance.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Video and language are the two primary signals that constitute much of the world we perceive every day – we observe our surrounding environment with our eyes in the form of continuous visual input (video), and communicate with others via language. Intuitively, this leads one to assume that training an effective video-and-language model should require multiple video frames as input. Standard methods Zhu & Yang (2020); Xu et al. (2021); Li et al. (2020a); Luo et al. (2021) in this area typically use multiple densely sampled frames for training. Recent work Lei et al. (2021) proposes sparse sampling for video-and-language understanding, where it claims that a few sparsely sampled clips are sufficient for learning due to the high redundancy in videos. This technique has shown Lei et al. (2021); Zellers et al. (2021) to be successful in various video-language benchmarks Jang et al. (2017); Xu et al. (2016); Anne Hendricks et al. (2017); Krishna et al. (2017a); Xu et al. (2017); Yu et al. (2018); Lei et al. (2018). However, as demonstrated in Bain et al. (2021); Luo et al. (2021); Lei et al. (2021), training with fewer frames (e.g., a single frame) leads to significantly worse performance compared to their multi-frame counterparts. In contrast, in this work, we show that with proper modeling, single-frame models could achieve competitive performance, hence also revealing “static appearance bias” in popular video-and-language datasets.
|
| 12 |
+
|
| 13 |
+
We start by building a standard image-language model, with a vision encoder and a language encoder for image and text encoding, followed by a multi-modal encoder with cross-attention for cross-modal fusion. We pre-train the model on large-scale image-text and video-text datasets Chen et al. (2015); Krishna et al. (2017b); Ordonez et al. (2011); Sharma et al. (2018); Changpinyo et al. (2021); Bain et al. (2021). For fine-tuning, we randomly sample a single frame for training, and ensemble multiple uniformly sampled frames per video for making a video-level prediction at inference.
|
| 14 |
+
|
| 15 |
+
Single-frame predictions are often noisy and inaccurate, as they are made from incomplete information from single-frames without any context (see examples in Figure 5). Due to this issue, singleframe training typically performs significantly worse than multi-frame training Lei et al. (2021); Bain et al. (2021); Luo et al. (2021). Previous work Hendrycks et al. (2019) suggests that pretraining improves model robustness in the face of label corruption for image recognition. Inspired by this, we hypothesize that large-scale pre-training helps mitigate noise from single-frame training. Our analyses in Section 5 agree with our hypothesis, showing that as we increase pre-training data size, the performance of our single-frame model improves drastically and its gap with a similarly trained multi-frame model is largely eliminated. Besides training, these noisy single-frame predictions also render simple late fusion (e.g., mean-pooling in ClipBERT Lei et al. (2021)) less effective at inference time. To deal with this issue, we propose an early fusion strategy, which takes all frames as model inputs for directly making a more informative video-level prediction. Our analyses show that this early fusion ensemble method outperforms late fusion strategies and also delivers consistently improved performance when more frames are used.
|
| 16 |
+
|
| 17 |
+
We compare our approach with existing methods on six datasets across two video-language tasks, including text-to-video retrieval (MSRVTT Xu et al. (2016), DiDeMo Anne Hendricks et al. (2017), and ActivityNet Captions Krishna et al. (2017a)) and video question answering (MSRVTT-QA Xu et al. (2017), ActivityNet-QA Yu et al. (2019), and MSRVTT-MC Yu et al. (2018)). Results show that our approach achieves competitive (mostly better) performance than existing methods that use more training frames and more pre-training data, setting new state-of-the-art for multiple tasks. This conclusion holds for short 15-second videos in MSRVTT to 180-second videos in ActivityNet, demonstrating the effectiveness of our single-frame approach in various scenarios.
|
| 18 |
+
|
| 19 |
+
More importantly, this strong single-frame performance reveals that the current evaluation is biased towards still objects, scenes, etc., while the temporal dynamics seem negligible, which in fact should be important for “true” video-language understanding. To address this issue, we next propose two new tasks that are designed to test models’ true temporal modeling ability. Based on the videos and annotations from the find-grained action recognition dataset Something-Something v2 (SSv2) Goyal et al. (2017a), we create two text-to-video retrieval tasks, one that use SSv2’s action template as text queries, e.g., “Throwing [something] in the air and catching it”, and another that uses its annotated label as text queries, e.g., “Throwing keys in the air and catching it”. See examples in Figure 2. This template task removes the objects and only keeps the actions, enabling an evaluation that focuses almost solely on temporal modeling. The label task, on the other hand, contains both actions and objects, requiring an understanding of both still objects and their motion. Lastly, we present several baselines on these new tasks and show that temporal modeling is essential in achieving high scores.
|
| 20 |
+
|
| 21 |
+
In summary, our contributions are three-fold: (i) We explore single-frame training for video-andlanguage tasks. While simple, our approach can achieve state-of-the-art performance on a range of datasets, including both text-to-video retrieval and video question answering. Importantly, this result reveals the surprising static appearance bias in these existing datasets. (ii) We conduct careful analyses, which show that large-scale pre-training and a proper multi-frame ensemble strategy at inference are the core for single-frame trained models to be successful. (iii) We propose two new tasks specifically designed for testing models’ ability for find-grained temporal modeling. These two new tasks complement existing benchmarks for a more comprehensive evaluation.
|
| 22 |
+
|
| 23 |
+
# 2 RELATED WORK
|
| 24 |
+
|
| 25 |
+
Vision and Language. Vision and language learning considers the problem of learning from both visual and textual signals. Depending on their visual input type, methods in this area can be roughly categorized into two types, one with image Anderson et al. (2018); Tan & Bansal (2019); Lu et al. (2019); Chen et al. (2020); Li et al. (2019; 2020b; 2021b; 2022); Radford et al. (2021) and another with video Anne Hendricks et al. (2017); Sun et al. (2019); Zhu & Yang (2020); Xu et al. (2021); Li et al. (2020a); Lei et al. (2021); Zellers et al. (2021); Bain et al. (2021); Lin et al. (2021). Standard video-and-language methods Zhu & Yang (2020); Xu et al. (2021); Li et al. (2020a); Lei et al. (2021); Zellers et al. (2021); Luo et al. (2021) are typically trained with multiple video frames. This multi-frame training strategy has been the norm and is shown to work well across various datasets $\mathrm { X u }$ et al. (2016); Anne Hendricks et al. (2017); Krishna et al. (2017a); Jang et al. (2017); Xu et al. (2017); Lei et al. (2018; 2020). Unlike previous work that uses multiple frames for training, we explore single-frame training (i.e., similar to training an image-text model) and show it achieves strong performance on existing video-text benchmarks. Concurrent work Buch et al. (2022) proposes a new module, atemporal probe, for selecting the best single-frame as inputs to a trained image-text model during inference; whereas we utilize multiple uniformly sampled frames and study more effective ways of ensembling information from multiple frames.
|
| 26 |
+
|
| 27 |
+

|
| 28 |
+
Figure 1: SINGULARITY model overview. During training, we randomly sample a single frame as input, and make a video level prediction based on the information from this single frame along with its paired text input. During inference, we uniformly sample multiple frames, and early fuse their encoded image-level representations as input to the multi-modal encoder. See details in Section 3.
|
| 29 |
+
|
| 30 |
+
Dataset Bias. Biases are prevalent in datasets Goyal et al. (2017b); Gururangan et al. (2018); Li et al. (2018); Escorcia et al. (2019); Zellers et al. (2019); Lei et al. (2020). For example, Zhang et al. Zhang et al. (2016) pointed out that blindly answering “yes” to yes/no questions in VQA Antol et al. (2015) without looking at their corresponding images results in an accuracy of $87 \%$ ; Li et al. Li et al. (2018) discovered that many video action recognition datasets, such as Kinetics Kay et al. (2017) and UCF-101 Soomro et al. (2012), have a strong static representation, where a linear classifier trained on static appearance (e.g., object, scene, and people) representations achieves much higher performance than chance. In this work, we find similar static appearance bias exists in popular video-language datasets Xu et al. (2016); Anne Hendricks et al. (2017); Krishna et al. (2017a); $\mathrm { X u }$ et al. (2017); Yu et al. (2018; 2019), in which our models trained with single frames could achieve surprisingly good performance, even compared to models that perform explicit temporal modeling. When datasets are biased, they provide incorrect indications of the models’ ability. To allow for a more comprehensive evaluation, we propose two new tasks based on an existing action recognition dataset SSv2 Goyal et al. (2017a) to test the true temporal modeling ability of models.
|
| 31 |
+
|
| 32 |
+
# 3 METHODS
|
| 33 |
+
|
| 34 |
+
Model Architecture. Figure 1 shows an overview of our model (dubbed SINGULARITY). It consists of 3 main components, a vision encoder $\mathcal { F } _ { v }$ , a language encoder $\mathcal { F } _ { l }$ , and a multi-modal encoder $\mathcal { H }$ . The vision encoder is an image-level visual backbone model, such as ViT Dosovitskiy et al. (2020). The language encoder is an arbitrary language model such as BERT Devlin et al. (2019). For the multi-modal encoder, we use a transformer encoder Vaswani et al. (2017), in which each layer contains a self-attention, a cross-attention, and a feed-forward network (FFN). The cross-attention layer is used to gather information from encoded visual representations using the text as key, similar to recent work Jaegle et al. (2021; 2022); Li et al. (2021b; 2022).
|
| 35 |
+
|
| 36 |
+
We denote a video $V$ contains $T$ frames as $V { = } [ f _ { 1 } , f _ { 2 } , . . . , f _ { T } ]$ , its paired text as $S$ . During training, we randomly sample a single frame $f _ { t }$ from $V$ as model input , where $t \in \{ 1 , . . . , T \}$ . Its encoded representation can be written as $\mathcal { F } _ { v } ( \bar { f } _ { t } ) \in \mathbb { R } ^ { L _ { v } \times D }$ . For text, the encoded representation is $\mathcal { F } _ { l } ( S ) \in$ $\mathbb { R } ^ { \hat { L } _ { l } \times D }$ . $L _ { v }$ and $L _ { l }$ are encoded sequence lengths, $D$ is hidden size. We next make a prediction $p$ as:
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
\begin{array} { r l r } & { } & { { \boldsymbol { p } } = \mathcal { H } ( \ \mathcal { F } _ { l } ( S ) \ , \ \mathcal { F } _ { v } ( f _ { t } ) \ ) , } \\ & { } & { \mathsf { \boldsymbol { Q } } , \mathsf { K } , \mathsf { V } \ \mathrm { f o r \ s e l f - a t t } ; \mathsf { Q } \ \mathrm { f o r \ c r o s s - a t t } \ \uparrow \qquad \mathsf { \langle K , V \ f o r \ c r o s s - a t t \ \hat { \Pi } \ } } \end{array}
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
where Q, K, V denote the query, key, and value matrices of self- and cross-attention Vaswani et al. (2017). We calculate loss based on this prediction. During inference, we uniformly sample $T _ { t e s t }$ frames $\{ f _ { \tau _ { i } } \} _ { i = 1 } ^ { T _ { t e s t } }$ . Each frame is encoded separately, and their encoded representations are concate
|
| 43 |
+
|
| 44 |
+
nated as inputs to the multi-modal encoder to get a video-level prediction score:
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
p = \mathcal { H } ( \mathcal { F } _ { l } ( S ) \mathrm { ~ , ~ } [ \mathcal { F } _ { v } ( f _ { \tau _ { 1 } } ) ; . . . ; \mathcal { F } _ { v } ( f _ { \tau _ { T _ { t e s t } } } ) ] \mathrm { ~ ) , ~ }
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
where $[ ; ]$ denotes concatenation, and $[ \mathcal { F } _ { v } ( f _ { \tau _ { 1 } } ) ; . . . ; \mathcal { F } _ { v } ( f _ { \tau _ { T _ { t e s t } } } ) ] \in \mathbb { R } ^ { ( T _ { t e s t } \times L _ { v } ) \times D }$ . This early fusion design allows our model to make an informed prediction given full context. In ClipBERT Lei et al. (2021), an alternative late fusion design is used: scores are computed for each frame separately, and video-level score is obtained via a manually designed aggregation function $\mathcal { G }$ (e.g., mean-pooling):
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
p = \mathcal { G } ( p _ { \tau _ { 1 } } , p _ { \tau _ { 2 } } , p _ { \tau _ { T _ { t e s t } } } ) ; p _ { \tau _ { i } } = \mathcal { H } ( \mathcal { F } _ { l } ( S ) \ , \ \mathcal { F } _ { v } ( f _ { \tau _ { i } } ) \ ) .
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
Since the predictions in late fusion are made with incomplete information from individual frames, they can be quite noisy. In Section 5, we provide a detailed comparison w.r.t. these different frame ensemble methods and show that early fusion consistently outperforms late fusion.
|
| 57 |
+
|
| 58 |
+
Pre-Training Objectives. The model is trained with 3 losses: (i) Vision-Text Contrastive: a contrastive loss that aligns the pooled vision and text representations from the vision and language encoders. (ii) Masked Language Modeling (MLM) Devlin et al. (2019): predicting masked tokens from their text and visual context, with multi-modal encoder. (iii) Vision-Text Matching: predicting the matching score of a vision-text pair with multi-modal encoder. These losses have shown to be effective in learning multi-modal representations Tan & Bansal (2019); Chen et al. (2020); Li et al. (2021a;b); Lei et al. (2021); Radford et al. (2021). More details are in Appendix.
|
| 59 |
+
|
| 60 |
+
Implementation Details. As our model trains with single frames, in addition to video-text data, it can also utilize image-text data for pre-training. For image-text data, we use a combination of COCO Chen et al. (2015), Visual Genome (VG) Krishna et al. (2017b), SBU Captions Ordonez et al. (2011), CC3M Sharma et al. (2018), and CC12M Changpinyo et al. (2021). For video-text data, we use WebVid Bain et al. (2021). Note that, even for video-text data, we only sample a single frame from the whole video for training. We pre-train the model on two different subsets of the datasets: (i) 5M corpus that contains 5.44M images and videos from CC3M+WebVid, and (ii) 17M corpus that contains 17.28M images and videos from all the datasets above.
|
| 61 |
+
|
| 62 |
+
Our model is implemented in PyTorch Paszke et al. (2019). The vision encoder is initialized using the BEiTBASE Bao et al. (2021) model pre-trained on ImageNet-21K Deng et al. (2009). The text encoder is initialized from the first 9 layers of BERTBASE Devlin et al. (2019). The multi-modal encoder is initialized from the last 3 layers of the same BERTBASE model, though its cross-attention layers are randomly initialized. We optimize the model for 10 epochs using AdamW Loshchilov & Hutter (2019) optimizer with an initial learning rate of 1e-4. We warm up the learning rate in the first epoch followed by cosine decay Loshchilov & Hutter (2017) to 1e-6 during the rest of the training. Mixed precision is used for faster training. The batch size is set to 128 per GPU, and we train the model on 3 NVIDIA A100 GPUs with input image size $2 2 4 \times 2 2 4$ . We perform basic augmentations: random resize, crop, and flip to the frames/images during training. This pre-training takes around 1 day on the 5M corpus, and 4 days on the 17M corpus. Our pre-training is quite efficient compared to other similar work, e.g., 10 epochs’ pre-training in AlignPrompt Li et al. (2021a) takes 3 days on the same 5M corpus using 16 A100 GPUs, this amounts to $1 6 \times$ computation cost of our pre-training.
|
| 63 |
+
|
| 64 |
+
# 4 EXPERIMENTS AND RESULTS ON EXISTING DATASETS
|
| 65 |
+
|
| 66 |
+
# 4.1 DOWNSTREAM TASK SETUP
|
| 67 |
+
|
| 68 |
+
Text-to-Video Retrieval. Given a text query, the goal of this task is to retrieve relevant videos from a large collection of videos. We evaluate our model on the following datasets: (i) MSRVTT Xu et al. (2016) contains 10K YouTube videos, each paired with 20 captions. We follow Yu et al. (2018); Lei et al. (2021) to use the 7K train+val videos for training, and report results on the 1K test set. (ii) DiDeMo Anne Hendricks et al. (2017) contains 10K Flickr videos with 41K captions. We use standard train/val/test splits. (iii) ActivityNet Captions Krishna et al. (2017a) contains 20K YouTube videos with 100K captions. We use the train split with 10K videos for training, and we report results on the widely used val1 split, with 4.9K videos. For MSRVTT, we evaluate standard text-to-video retrieval. For DiDeMo and ActivityNet Captions, we evaluate paragraph-tovideo retrieval Liu et al. (2020); Lei et al. (2021); Luo et al. (2021), where the text captions in the same video are concatenated as a single paragraph-level text for retrieval. We report performance using recall at K $( \mathbb { R } ^ { \ @ \mathrm { K } } )$ .
|
| 69 |
+
|
| 70 |
+
Table 1: Comparison to existing methods on text-to-video retrieval. #PT denotes the number of images and or videos used in cross-modal pre-training. #Train Frame denotes the number of frames used at each training step during fine-tuning. For models that use different number of frames for different datasets, we list them together with a separator $" / "$ . We gray out methods that use significantly more pre-training data for a fair comparison. The 136M corpus is from HowTo100M Miech et al. (2019), 0.2M refers to $_ \mathrm { C O C O + V G }$ data, 138M is the combination of HowTo100M and WebVid, 400M is the private image-text data used in CLIP Radford et al. (2021).
|
| 71 |
+
|
| 72 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">#PT</td><td rowspan="2">#Train</td><td colspan="3">MSRVTT</td><td colspan="3">DiDeMo</td><td colspan="3">ActivityNet Cap</td></tr><tr><td>Frame</td><td>R1 </td><td></td><td></td><td></td><td></td><td></td><td></td><td>R5 R10 R1 R5 R10 R1 R5 R10</td></tr><tr><td>HERO (Li et al., 2020a)</td><td>136M</td><td>310</td><td>20.5 47.6 60.9</td><td></td><td></td><td>=</td><td>-</td><td></td><td>=</td><td>-</td><td>-</td></tr><tr><td>ClipBERT (Lei et al., 2021)</td><td>0.2M</td><td>16/16/8</td><td></td><td></td><td></td><td>22.0 46.8 59.9 20.4 48.0 60.8 21.3 49.0 63.5</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td> VideoCLIP (Xu et al., 2021)</td><td>136M</td><td>960</td><td>30.9 55.4 66.8</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Frozen (Bain et al., 2021)</td><td>5M</td><td>4</td><td></td><td></td><td></td><td>31.0 59.5 70.5 31.0 59.8 72.4</td><td></td><td></td><td></td><td>1</td><td>-</td></tr><tr><td>AlignPrompt (Li et al., 2021a)</td><td>5M</td><td>8</td><td></td><td></td><td></td><td>33.9 60.7 73.2 35.9 67.5 78.8</td><td></td><td></td><td></td><td>1</td><td>1</td></tr><tr><td>All-in-one (Wang et al., 2022) 138M</td><td></td><td>9</td><td></td><td></td><td></td><td>34.4 65.4 75.8 32.7 61.4 73.5 22.4 53.7 67.7</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>CLIP4Clip (Lu0 et al., 2021) 400M</td><td></td><td></td><td></td><td></td><td></td><td>12/64/64 42.0 68.6 78.7 42.8 68.5 79.2 40.5 72.4 98.2</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SINGULARITY</td><td>5M</td><td>1</td><td></td><td></td><td></td><td>36.8 65.9 75.5 47.4 75.2 84.0 43.0 70.6 81.3</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SINGULARITY</td><td>17M</td><td>1</td><td></td><td></td><td></td><td>41.5 68.7 77.0 53.9 79.4 86.9 47.1 75.5 85.5</td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 73 |
+
|
| 74 |
+
For fine-tuning, we use the same architecture as pre-training, except that MLM loss is removed. We use an initial learning rate of 1e-5 with cosine decay to 1e-6. We use a batch size of 32, and train the model for 5 epochs for MSRVTT, 10 epochs for DiDeMo and ActivityNet Captions. During training, we use a single frame per video. During testing, we use 12 frames per video for MSRVTT and DiDeMo, and 32 frames for ActivityNet Captions since it has longer videos. On a single A100, this fine-tuning takes around 1.5 hours for MSRVTT, 0.5 hours for ActivityNet Captions or DiDeMo.
|
| 75 |
+
|
| 76 |
+
Video Question Answering. Given a video (often with a text question), this task requires generating an answer to the question or selecting the most suitable answer from a set of candidates. (i) MSRVTT-QA Xu et al. (2017) contains 244K open-ended questions on 10K MSRVTT videos. (ii) ActivityNet-QA Yu et al. (2019) contains 58K open-ended questions on 5.8K sampled videos from ActivityNet Caba Heilbron et al. (2015). (iii) MSRVTT-MC Yu et al. (2018) is a multiple-choice task that requires selecting the matched caption from a set of 5 candidate captions for each video (3K videos from MSRVTT). We use standard train/val/test splits for the three tasks, and report accuracy.
|
| 77 |
+
|
| 78 |
+
For open-ended QA, we add an extra multi-modal decoder (initialized from pre-trained multi-modal encoder) that takes in multi-modal encoder outputs as cross-attention inputs, and decodes answer text with “[CLS]” as the start token (see details in Appendix). We use an initial learning rate of 1e-5, and warm up the learning rate in the first half epoch, followed by cosine decay to 1e-6. We use a batch size of 32, and train the model for 10 epochs. On a single A100 GPU, this fine-tuning takes around 4 hours for MSRVTT-QA, and 1 hour for ActivityNet-QA. We use a single frame per video for training, 12 frames for testing. For MSRVTT-MC, we follow Lei et al. (2021) to use the model trained on MSRVTT retrieval, and select the option with the highest retrieval score as the prediction.
|
| 79 |
+
|
| 80 |
+
For all downstream tasks, we use the same input image size $2 2 4 \times 2 2 4$ and image augmentations as in pre-training. During inference, we resize the input video frames to $2 2 4 \times 2 2 4$ .
|
| 81 |
+
|
| 82 |
+
# 4.2 COMPARISON TO STATE-OF-THE-ART ON EXISTING DATASETS
|
| 83 |
+
|
| 84 |
+
Text-to-Video Retrieval Results. In Table 1, we compare SINGULARITY with existing methods on text-to-video retrieval. Across all the datasets, SINGULARITY (5M) achieves better performance compared to methods trained on similar amounts of data, while using only single frames for training. On DiDeMo and ActivityNet Captions, SINGULARITY (5M) outperforms all previous work, including many that pre-train on significantly larger amounts of data, e.g., 400M image-text pairs
|
| 85 |
+
|
| 86 |
+
Table 2: Comparison to existing methods on video question answering. The 69M corpus is the 69M video questions in Yang et al. (2021), 180M refers to the 180M YouTube clip-text pairs in YT-Temporal-180M Zellers et al. (2021).
|
| 87 |
+
|
| 88 |
+
<table><tr><td>Method</td><td>#PT</td><td>#Train Frame MSRVTT-QA ActivityNet-QA MSRVTT-MC</td><td></td><td></td><td></td></tr><tr><td>ClipBERT (Lei et al., 2021)</td><td>0.2M</td><td>16</td><td>37.4</td><td></td><td>88.2</td></tr><tr><td>AlignPrompt (Li et al., 2021a)</td><td>5M</td><td>16</td><td>42.1</td><td></td><td>1</td></tr><tr><td>JustAsk (Yang et al., 2021)</td><td>69M</td><td>640</td><td>41.5</td><td>38.9</td><td>-</td></tr><tr><td>MERLOT (Zellers et al., 2021)</td><td>180M</td><td>5</td><td>43.1</td><td>41.4</td><td>90.9</td></tr><tr><td>VideoCLIP (Xu et al., 2021)</td><td>136M</td><td>960</td><td>-</td><td>-</td><td>92.1</td></tr><tr><td>All-in-one (Wang et al., 2022)</td><td>138M</td><td>9</td><td>44.3</td><td>-</td><td>92.0</td></tr><tr><td>SINGULARITY</td><td>5M</td><td>1</td><td>42.7</td><td>41.8</td><td>92.0</td></tr><tr><td>SINGULARITY</td><td>17M</td><td>1</td><td>43.5</td><td>43.1</td><td>92.1</td></tr></table>
|
| 89 |
+
|
| 90 |
+

|
| 91 |
+
template: Throwing [something] in the air and catching it. label: Throwing keys in the air and catching it.
|
| 92 |
+
|
| 93 |
+

|
| 94 |
+
template: Throwing [something] in the air and letting it fall. label: Throwing keys in the air and letting it fall.
|
| 95 |
+
|
| 96 |
+
Figure 2: SSv2 examples. For each video, we show 3 temporally-ordered frames with their template and label annotations. Based on these annotations, we propose two new retrieval tasks, using “template” and “label” as text queries, respectively.
|
| 97 |
+
|
| 98 |
+
in CLIP4Clip Luo et al. (2021), or 136M video-text pairs in VideoCLIP Xu et al. (2021) compared to 5M image-text and video-text pairs in SINGULARITY. We also note that our model is trained with single frames, while previous work uses many more frames, e.g., 64 frames in CLIP4Clip or 8 frames in AlignPrompt Li et al. (2021a). When trained with a larger amount of data (17M), we notice a further performance boost for our model, demonstrating that SINGULARITY benefits from large-scale pre-training.
|
| 99 |
+
|
| 100 |
+
Video QA Results. Table 2 compares SINGULARITY with existing methods on video question answering. We notice SINGULARITY (5M) achieves competitive performance with previous work even when using two orders of magnitude smaller pre-training data, e.g., 180M video-text pairs in MERLOT Zellers et al. (2021) vs. 5M image-text and video-text pairs. Our method also surpasses the strong video QA model JustAsk Yang et al. (2021), which is specifically designed for video QA and is pre-trained on 69M video QA pairs. When pre-trained with more data, our model performance further improves. These comparisons show the effectiveness of our single-frame approach.
|
| 101 |
+
|
| 102 |
+
Beyond what are present in the main text, we also provide additional results in Appendix: (i) SINGULARITY-temporal (introduced in Section 4.3) results on retrieval and QA; (ii) zero-shot retrieval; (iii) image-text retrieval; $( i v )$ VQA Antol et al. (2015), etc.
|
| 103 |
+
|
| 104 |
+
# 4.3 NEW TASKS THAT REQUIRE TEMPORAL MODELING
|
| 105 |
+
|
| 106 |
+
In the previous section, we revealed the interesting observation that popular video-language datasets have strong static appearance biases – enabling our model that uses only a single frame per video at each training step to achieve competitive performance compared to state-of-the-art models that digest multiple temporally-ordered frames. The biased evaluation on these datasets favors models that are strong in recognizing static concepts, and does not provide a good indicator of whether these models are capable of recognizing fine-grained temporal relationships between neighboring frames.
|
| 107 |
+
|
| 108 |
+
Hence, to address this issue, we propose two new datasets that complement existing datasets for a more comprehensive evaluation of video-and-language methods. We draw inspiration from the video action recognition community, and transform the temporally-heavy action recognition dataset Something-Something v2 (SSv2) Goyal et al. (2017a) into video-and-language datasets. In Figure 2, we show SSv2 examples. A unique property of the SSv2 dataset is that the videos often require finegrained temporal modeling to correctly predict their action classes. For example, to match the videos and their action classes (template) in Figure 2(a-b), one has to look at multiple temporally ordered frames. Based on SSv2 videos and annotations, we define two text-to-video retrieval tasks:
|
| 109 |
+
|
| 110 |
+
Table 3: Comparison to existing methods on SSv2 tasks. \* The training of Frozen on the SSv2-label retrieval task fails to converge despite our best efforts in tuning the model.
|
| 111 |
+
|
| 112 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">#PT</td><td rowspan="2">#Train Frame</td><td colspan="3">SSv2-label</td><td colspan="3">SSv2-template</td></tr><tr><td>R1</td><td>R5</td><td>R10</td><td>R1</td><td>R5</td><td>R10</td></tr><tr><td>Frozen (Bain et al., 2021)*</td><td>5M</td><td>4</td><td>1</td><td>1</td><td>1</td><td>52.9</td><td>94.8</td><td>99.4</td></tr><tr><td>CLIP4Clip (Luo et al., 2021)</td><td>400M</td><td>12</td><td>43.1</td><td>71.4</td><td>80.7</td><td>77.0</td><td>96.6</td><td>98.3</td></tr><tr><td>SINGULARITY</td><td>5M</td><td>1</td><td>36.4</td><td>64.9</td><td>75.4</td><td>42.0</td><td>86.2</td><td>94.3</td></tr><tr><td>SINGULARITY-temporal</td><td>5M</td><td>4</td><td>44.1</td><td>73.5</td><td>82.2</td><td>77.0</td><td>98.9</td><td>99.4</td></tr><tr><td>SINGULARITY-temporal</td><td>17M</td><td>4</td><td>47.4</td><td>75.9</td><td>84.0</td><td>77.6</td><td>96.0</td><td>98.9</td></tr></table>
|
| 113 |
+
|
| 114 |
+
• SSv2-Template Retrieval: We use the 174 templates (e.g., “Throwing [something] in the air and catching it”) in SSv2 as the text queries to retrieve videos. We use 168,913 SSv2 training videos for training. As ground-truth annotations for test videos are not available, we use validation videos: we sample 12 videos for each template, with a total of 2,088 videos for testing.
|
| 115 |
+
|
| 116 |
+
• SSv2-Label Retrieval: We use the annotated labels (e.g., “Throwing keys in the air and catching it”) in SSv2 as text queries to retrieve videos. We follow the same split in the template retrieval task, with 168,913 videos for training, and 2,088 videos for testing.
|
| 117 |
+
|
| 118 |
+
Since no objects are present in the text queries of the template retrieval task, it requires a deeper understanding of the actions than in the label retrieval task, while the label retrieval task provides a more comprehensive evaluation of both static and temporal understanding.
|
| 119 |
+
|
| 120 |
+
Experiments. We use Frozen Bain et al. (2021) and CLIP4Clip (seqTransf version) Luo et al. (2021) as baselines. Frozen uses a space-time transformer, CLIP4Clip is an extension based on the CLIP Radford et al. (2021) with an extra 4-layer temporal transformer encoder. We report performance using standard text-to-video retrieval metrics ${ \mathrm { R @ K } }$ . For our model, in addition to the single-frame version, we build a multi-frame variant, SINGULARITY-temporal. Specifically, we add a two-layer temporal transformer encoder following the vision encoder, and use its outputs as inputs to the multi-modal encoder (see details in Appendix). From a single-frame pre-trained checkpoint (5M or 17M), we perform a 2nd stage video pre-training with 4 frames using WebVid videos for SINGULARITY-temporal. We use an initial learning rate of 5e-5, and train the model for 5 epochs.
|
| 121 |
+
|
| 122 |
+
The results are shown in Table 3. Compared to Frozen and CLIP4Clip, while SINGULARITY shows competitive performance on existing benchmarks (see Table 1), it underperforms these methods on the two temporally-heavy tasks by a large margin. For example, SINGULARITY (5M) underperforms the 4-frame Frozen model by 10.9 for SSv2-template retrieval R1, though it shows a 16.4 improvement for DiDeMo R1, and 5.8 for MSRVTT R1. This is a good sign as it shows that the new tasks cannot be solved by models exploiting static appearance biases. On the other hand, after adding the 2-layer temporal encoder, the 4-frame SINGULARITY-temporal model gets a significant performance boost from the single-frame model, surpassing the baseline methods. When using more pre-training data $5 \mathrm { M } \to 1 7 \mathrm { M }$ ), we notice a good performance gain for SSv2-label, while the performance on SSv2-template stays similar. These observations indicate that the SSv2-label task requires both static and temporal modeling, and enhancing either will improve the task performance. For SSv2-template, as no objects exist in its text queries, it requires mostly temporal modeling.
|
| 123 |
+
|
| 124 |
+
# 5 ANALYSIS
|
| 125 |
+
|
| 126 |
+
Frames Ensemble Strategy. Our model is trained with a single-frame regime, and it uses multiple frames covering the full video at inference. As shown in Figure 3a (concat), encoded video frames are concatenated as input to the multi-modal encoder’s cross-attention layer for making a videolevel prediction. A naive alternative is to compute the prediction score for each frame separately (Figure 3b), and then aggregate these frame-level scores together to get a video-level score using an aggregation function, such as LogSumExp (lse), max-pooling and mean-pooling. This simple late fusion strategy has shown to be successful for video-and-language Lei et al. (2021) and video action recognition methods Bertasius et al. (2021); Carreira & Zisserman (2017); Wang et al. (2016).
|
| 127 |
+
|
| 128 |
+

|
| 129 |
+
Figure 4: Impact of frame ensemble strategy. Retrieval performance is shown as avg recall, i.e., average of $\mathbb { R } \ @ \{ 1 , 5 , 1 0 \}$ . We use the same finetuned checkpoint for each task, thus the results difference only comes from inference strategies.
|
| 130 |
+
|
| 131 |
+

|
| 132 |
+
|
| 133 |
+

|
| 134 |
+
Figure 3: Comparison of frame ensemble strategies at inference. concat is our early fusion strategy, lse, max, mean are the late fusion strategies studied in ClipBERT Lei et al. (2021).
|
| 135 |
+
Figure 5: Prediction score distribution for a MSRVTT-MC example. We show frame-level score distribution for each frame, and video-level score distribution for late fusion (we use mean as an example) and our early fusion (concat). The highest score for each prediction is indicated by $\checkmark$ , the correct answer is highlighted in green. Single-frame predictions are often inaccurate, unstable and they fluctuate across the frames. Late fusion can be biased by inaccurate but high confidence frame predictions, e.g., the late fusion prediction is biased towards the 4th frame prediction.
|
| 136 |
+
|
| 137 |
+
In Figure 4, we compare these different frame ensemble strategies, with varying number of frames at inference. From the comparison, we can draw the following conclusions: (i) Our early fusion strategy (concat) shows a significant gain over the three late fusion strategies (lse, max, mean) for both MSRVTT retrieval and ActivityNet-QA, demonstrating the importance of considering the whole video when making the predictions. (ii) In general, for all ensemble strategies, using more frames at inference improves model performance. However, for the late fusion strategies, sometimes using more frames hurts performance, e.g., for ActivityNet-QA, inference with over 4 frames underperforms that with 4 frames for max-pooling. This observation agrees with the MSRVTT-QA results in ClipBERT Lei et al. (2021). In contrast, early fusion delivers consistently improved performance when more frames are used. Overall, we hypothesize that the low and unstable performance of late fusion is because its video-level prediction is obtained via aggregating frame-level predictions, while these frame-level predictions can be inaccurate and unstable (see example in Figure 5) – as they are separately predicted using incomplete information within each frame, ignoring their context.
|
| 138 |
+
|
| 139 |
+
Pre-Training Data Size. In Figure 6, we study the effect of cross-modal pre-training data size for both the single-frame and the multi-frame model. We show downstream fine-tuning performance under 4 different pre-training data setups: no cross-modal pre-training (0M), pre-train on WebVid (2.49M videos), on 5M corpus (5.44M images+videos), or on 17M corpus (17.28M images+videos).
|
| 140 |
+
|
| 141 |
+
We obsereve that both 1-frame and 4-frame model greatly benefit from large-scale pre-training. When comparing the two models, an interesting observation is that, as the pre-training data size increases, the performance gap between the 1-frame and the 4-frame model decreases almost monotonically. This phenomenon suggests that, when pre-trained on a sufficient amount of data, the performance of models trained with single frames might be very close to models trained with multiple frames. Though there can be exceptions for tasks that require fine-grained temporal modeling, such as SSv2-label retrieval, where multi-frame modeling is necessary.
|
| 142 |
+
|
| 143 |
+

|
| 144 |
+
Figure 6: Model performance as a function of pre-training data size, for SINGULARITY (1-frame) and SINGULARITY-temporal (4-frame). The performance differences between the two models in each pre-training setup is also annotated, e.g., the average recall on MSRVTT retrieval for the two models without pre-training are 37.9 and 44.0, respectively, with $\cdot$ . In general, as pre-training data size increases, the performance gap between the two models decreases.
|
| 145 |
+
|
| 146 |
+
One possible explanation is that single-frame training is noisier than multi-frame training – due to incomplete context and random sampling, single-frame predictions are often inaccurate and less stable than multi-frame predictions, and pre-training is helpful Hendrycks et al. (2019) in this case. Meanwhile, single-frame training requires the model to extract all information from a single frame while a multi-frame model could rely on rich sources from multiple frames. Therefore, for downstream tasks, it is essential for the single-frame model to initialize from a strong pre-trained model.
|
| 147 |
+
|
| 148 |
+
Training Efficiency. A core advantage of single-frame training is its training efficiency. In Section 3, we discussed our pre-training cost is only 1/16 of a recent video-language model Li et al. (2021a). In Figure 7 we compare the training time and task performance of various models. We note our model (1- frame, SINGULARITY, 17M) trains much faster than the baselines $2 . 8 \times$ for 4-frame Frozen, $8 . 5 \times$ for 64-frame CLIP4Clip) while showing significantly better performance. Besides, it is also more memory efficient, i.e., its maximum allowed batch size on a single GPU is 190 while only 50 for Frozen. Experiments conducted on a single RTX A6000 GPU with 48GB memory, training time is averaged over 8,394 DiDeMo training examples. In Appendix, we show additional comparisons of various retrieval methods in terms of inference GFLOPs and the number of model parameters.
|
| 149 |
+
|
| 150 |
+

|
| 151 |
+
Figure 7: Comparison of training time and downstream task performance. The maximum allowed batch size is labeled besides each model as a reference.
|
| 152 |
+
|
| 153 |
+
# 6 CONCLUSION
|
| 154 |
+
|
| 155 |
+
In this work, we explore single-frame training for video-and-language learning. We find that, with sufficient pre-training data and a proper frame ensemble strategy at inference, our model trained with a single frame achieves surprisingly good performance on various video-text tasks, including text-to-video retrieval and video question answering. While these results show the potential of using single-frame training for various video-text tasks, it also reveals that current benchmarks are biased towards static objects and scenes, etc. To address this issue, we propose two new tasks designed to test models’ true temporal modeling ability and build several baseline methods for these new tasks. We hope these new tasks can complement existing benchmarks for a more comprehensive video-and-language understanding.
|
| 156 |
+
|
| 157 |
+
Societal Impact. Similar to many data-driven methods, the predictions from our system reflect the distribution of data on which it is trained on, and these predictions can be inaccurate and biased by the data. Therefore, users should not completely rely on the system for making real-world decisions.
|
| 158 |
+
|
| 159 |
+
# REFERENCES
|
| 160 |
+
|
| 161 |
+
Peter Anderson, Xiaodong He, Chris Buehler, Damien Teney, Mark Johnson, Stephen Gould, and Lei Zhang. Bottom-up and top-down attention for image captioning and visual question answering. In CVPR, 2018.
|
| 162 |
+
|
| 163 |
+
Lisa Anne Hendricks, Oliver Wang, Eli Shechtman, Josef Sivic, Trevor Darrell, and Bryan Russell. Localizing moments in video with natural language. In ICCV, 2017.
|
| 164 |
+
|
| 165 |
+
Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. Vqa: Visual question answering. In ICCV, 2015.
|
| 166 |
+
|
| 167 |
+
Max Bain, Arsha Nagrani, Gul Varol, and Andrew Zisserman. Frozen in time: A joint video and ¨ image encoder for end-to-end retrieval. In ICCV, 2021.
|
| 168 |
+
|
| 169 |
+
Hangbo Bao, Li Dong, and Furu Wei. Beit: Bert pre-training of image transformers. In ICLR, 2021.
|
| 170 |
+
|
| 171 |
+
Gedas Bertasius, Heng Wang, and Lorenzo Torresani. Is space-time attention all you need for video understanding. In ICML, 2021.
|
| 172 |
+
|
| 173 |
+
Shyamal Buch, Cristobal Eyzaguirre, Adrien Gaidon, Jiajun Wu, Li Fei-Fei, and Juan Carlos Niebles. Revisiting the “video” in video-language understanding. arXiv preprint arXiv:2206.01720, 2022.
|
| 174 |
+
|
| 175 |
+
Fabian Caba Heilbron, Victor Escorcia, Bernard Ghanem, and Juan Carlos Niebles. Activitynet: A large-scale video benchmark for human activity understanding. In CVPR, 2015.
|
| 176 |
+
|
| 177 |
+
Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In CVPR, 2017.
|
| 178 |
+
|
| 179 |
+
Soravit Changpinyo, Piyush Sharma, Nan Ding, and Radu Soricut. Conceptual $1 2 \mathrm { m }$ : Pushing webscale image-text pre-training to recognize long-tail visual concepts. In CVPR, 2021.
|
| 180 |
+
|
| 181 |
+
Xinlei Chen, Hao Fang, Tsung-Yi Lin, Ramakrishna Vedantam, Saurabh Gupta, Piotr Dollar, and ´ C Lawrence Zitnick. Microsoft coco captions: Data collection and evaluation server. arXiv, 2015.
|
| 182 |
+
|
| 183 |
+
Yen-Chun Chen, Linjie Li, Licheng Yu, Ahmed El Kholy, Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu. Uniter: Learning universal image-text representations. In ECCV, 2020.
|
| 184 |
+
|
| 185 |
+
Jaemin Cho, Jie Lei, Hao Tan, and Mohit Bansal. Unifying vision-and-language tasks via text generation. arXiv, 2021.
|
| 186 |
+
|
| 187 |
+
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009.
|
| 188 |
+
|
| 189 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In NAACL, 2019.
|
| 190 |
+
|
| 191 |
+
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 16x16 words: Transformers for image recognition at scale. In ICLR, 2020.
|
| 192 |
+
|
| 193 |
+
Victor Escorcia, Mattia Soldan, Josef Sivic, Bernard Ghanem, and Bryan Russell. Temporal localization of moments in video collections with natural language. arXiv, 2019.
|
| 194 |
+
|
| 195 |
+
Valentin Gabeur, Chen Sun, Karteek Alahari, and Cordelia Schmid. Multi-modal transformer for video retrieval. In ECCV, 2020.
|
| 196 |
+
|
| 197 |
+
Raghav Goyal, Samira Ebrahimi Kahou, Vincent Michalski, Joanna Materzynska, Susanne Westphal, Heuna Kim, Valentin Haenel, Ingo Fruend, Peter Yianilos, Moritz Mueller-Freitag, et al. The” something something” video database for learning and evaluating visual common sense. In ICCV, 2017a.
|
| 198 |
+
|
| 199 |
+
Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Batra, and Devi Parikh. Making the v in vqa matter: Elevating the role of image understanding in visual question answering. In CVPR, 2017b.
|
| 200 |
+
|
| 201 |
+
Suchin Gururangan, Swabha Swayamdipta, Omer Levy, Roy Schwartz, Samuel R Bowman, and Noah A Smith. Annotation artifacts in natural language inference data. In NAACL, 2018.
|
| 202 |
+
|
| 203 |
+
Dan Hendrycks, Kimin Lee, and Mantas Mazeika. Using pre-training can improve model robustness and uncertainty. In ICML, 2019.
|
| 204 |
+
|
| 205 |
+
Andrew Jaegle, Felix Gimeno, Andrew Brock, Andrew Zisserman, Oriol Vinyals, and Joao Carreira. Perceiver: General perception with iterative attention. In ICML, 2021.
|
| 206 |
+
|
| 207 |
+
Andrew Jaegle, Sebastian Borgeaud, Jean-Baptiste Alayrac, Carl Doersch, Catalin Ionescu, David Ding, Skanda Koppula, Daniel Zoran, Andrew Brock, Evan Shelhamer, et al. Perceiver io: A general architecture for structured inputs & outputs. In ICLR, 2022.
|
| 208 |
+
|
| 209 |
+
Yunseok Jang, Yale Song, Youngjae Yu, Youngjin Kim, and Gunhee Kim. Tgif-qa: Toward spatiotemporal reasoning in visual question answering. In CVPR, 2017.
|
| 210 |
+
|
| 211 |
+
Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc V Le, Yunhsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. arXiv, 2021.
|
| 212 |
+
|
| 213 |
+
Will Kay, Joao Carreira, Karen Simonyan, Brian Zhang, Chloe Hillier, Sudheendra Vijayanarasimhan, Fabio Viola, Tim Green, Trevor Back, Paul Natsev, et al. The kinetics human action video dataset. arXiv, 2017.
|
| 214 |
+
|
| 215 |
+
Wonjae Kim, Bokyung Son, and Ildoo Kim. Vilt: Vision-and-language transformer without convolution or region supervision. In ICML, 2021.
|
| 216 |
+
|
| 217 |
+
Ranjay Krishna, Kenji Hata, Frederic Ren, Li Fei-Fei, and Juan Carlos Niebles. Dense-captioning events in videos. In ICCV, 2017a.
|
| 218 |
+
|
| 219 |
+
Ranjay Krishna, Yuke Zhu, Oliver Groth, Justin Johnson, Kenji Hata, Joshua Kravitz, Stephanie Chen, Yannis Kalantidis, Li-Jia Li, David A Shamma, et al. Visual genome: Connecting language and vision using crowdsourced dense image annotations. IJCV, 2017b.
|
| 220 |
+
|
| 221 |
+
Jie Lei, Licheng Yu, Mohit Bansal, and Tamara L Berg. Tvqa: Localized, compositional video question answering. In EMNLP, 2018.
|
| 222 |
+
|
| 223 |
+
Jie Lei, Licheng Yu, Tamara L Berg, and Mohit Bansal. What is more likely to happen next? videoand-language future event prediction. In EMNLP, 2020.
|
| 224 |
+
|
| 225 |
+
Jie Lei, Linjie Li, Luowei Zhou, Zhe Gan, Tamara L Berg, Mohit Bansal, and Jingjing Liu. Less is more: Clipbert for video-and-language learning via sparse sampling. In CVPR, 2021.
|
| 226 |
+
|
| 227 |
+
Dongxu Li, Junnan Li, Hongdong Li, Juan Carlos Niebles, and Steven CH Hoi. Align and prompt: Video-and-language pre-training with entity prompts. arXiv, 2021a.
|
| 228 |
+
|
| 229 |
+
Junnan Li, Ramprasaath R Selvaraju, Akhilesh Deepak Gotmare, Shafiq Joty, Caiming Xiong, and Steven Hoi. Align before fuse: Vision and language representation learning with momentum distillation. In NeurIPS, 2021b.
|
| 230 |
+
|
| 231 |
+
Junnan Li, Dongxu Li, Caiming Xiong, and Steven Hoi. Blip: Bootstrapping languageimage pre-training for unified vision-language understanding and generation. arXiv preprint arXiv:2201.12086, 2022.
|
| 232 |
+
|
| 233 |
+
Linjie Li, Yen-Chun Chen, Yu Cheng, Zhe Gan, Licheng Yu, and Jingjing Liu. Hero: Hierarchical encoder for video $^ +$ language omni-representation pre-training. In EMNLP, 2020a.
|
| 234 |
+
|
| 235 |
+
Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, and Kai-Wei Chang. Visualbert: A simple and performant baseline for vision and language. arXiv, 2019.
|
| 236 |
+
|
| 237 |
+
Wei Li, Can Gao, Guocheng Niu, Xinyan Xiao, Hao Liu, Jiachen Liu, Hua Wu, and Haifeng Wang. Unimo: Towards unified-modal understanding and generation via cross-modal contrastive learning. In ACL, 2021c.
|
| 238 |
+
|
| 239 |
+
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 ECCV, 2020b.
|
| 240 |
+
|
| 241 |
+
Yingwei Li, Yi Li, and Nuno Vasconcelos. Resound: Towards action recognition without representation bias. In ECCV, 2018.
|
| 242 |
+
|
| 243 |
+
Xudong Lin, Gedas Bertasius, Jue Wang, Shih-Fu Chang, Devi Parikh, and Lorenzo Torresani. Vx2text: End-to-end learning of video-based text generation from multimodal inputs. In CVPR, 2021.
|
| 244 |
+
|
| 245 |
+
Yang Liu, Samuel Albanie, Arsha Nagrani, and Andrew Zisserman. Use what you have: Video retrieval using representations from collaborative experts. In BMVC, 2020.
|
| 246 |
+
|
| 247 |
+
Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. In ICLR, 2017.
|
| 248 |
+
|
| 249 |
+
Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In ICLR, 2019.
|
| 250 |
+
|
| 251 |
+
Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. Vilbert: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. In NeurIPS, 2019.
|
| 252 |
+
|
| 253 |
+
Huaishao Luo, Lei Ji, Ming Zhong, Yang Chen, Wen Lei, Nan Duan, and Tianrui Li. Clip4clip: An empirical study of clip for end to end video clip retrieval. arXiv preprint arXiv:2104.08860, 2021.
|
| 254 |
+
|
| 255 |
+
Antoine Miech, Dimitri Zhukov, Jean-Baptiste Alayrac, Makarand Tapaswi, Ivan Laptev, and Josef Sivic. Howto $1 0 0 \mathrm { m }$ : Learning a text-video embedding by watching hundred million narrated video clips. In ICCV, 2019.
|
| 256 |
+
|
| 257 |
+
Vicente Ordonez, Girish Kulkarni, and Tamara Berg. Im2text: Describing images using 1 million captioned photographs. NeurIPS, 2011.
|
| 258 |
+
|
| 259 |
+
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. In NeurIPS, 2019.
|
| 260 |
+
|
| 261 |
+
Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. arXiv, 2021.
|
| 262 |
+
|
| 263 |
+
Piyush Sharma, Nan Ding, Sebastian Goodman, and Radu Soricut. Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning. In ACL, 2018.
|
| 264 |
+
|
| 265 |
+
Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv, 2012.
|
| 266 |
+
|
| 267 |
+
Chen Sun, Austin Myers, Carl Vondrick, Kevin Murphy, and Cordelia Schmid. Videobert: A joint model for video and language representation learning. In ICCV, 2019.
|
| 268 |
+
|
| 269 |
+
Hao Tan and Mohit Bansal. Lxmert: Learning cross-modality encoder representations from transformers. In EMNLP, 2019.
|
| 270 |
+
|
| 271 |
+
Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Herve J ´ egou. Training data-efficient image transformers & distillation through attention. In ´ ICML, 2021.
|
| 272 |
+
|
| 273 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017.
|
| 274 |
+
|
| 275 |
+
Alex Jinpeng Wang, Yixiao Ge, Rui Yan, Yuying Ge, Xudong Lin, Guanyu Cai, Jianping Wu, Ying Shan, Xiaohu Qie, and Mike Zheng Shou. All in one: Exploring unified video-language pretraining. arXiv, 2022.
|
| 276 |
+
|
| 277 |
+
Limin Wang, Yuanjun Xiong, Zhe Wang, Yu Qiao, Dahua Lin, Xiaoou Tang, and Luc Van Gool. Temporal segment networks: Towards good practices for deep action recognition. In ECCV, 2016.
|
| 278 |
+
|
| 279 |
+
Dejing Xu, Zhou Zhao, Jun Xiao, Fei Wu, Hanwang Zhang, Xiangnan He, and Yueting Zhuang. Video question answering via gradually refined attention over appearance and motion. In ACM MM, 2017.
|
| 280 |
+
|
| 281 |
+
Hu Xu, Gargi Ghosh, Po-Yao Huang, Dmytro Okhonko, Armen Aghajanyan, Florian Metze, Luke Zettlemoyer, and Christoph Feichtenhofer. Videoclip: Contrastive pre-training for zero-shot video-text understanding. In EMNLP, 2021.
|
| 282 |
+
|
| 283 |
+
Jun Xu, Tao Mei, Ting Yao, and Yong Rui. Msr-vtt: A large video description dataset for bridging video and language. In CVPR, 2016.
|
| 284 |
+
|
| 285 |
+
Antoine Yang, Antoine Miech, Josef Sivic, Ivan Laptev, and Cordelia Schmid. Just ask: Learning to answer questions from millions of narrated videos. In ICCV, 2021.
|
| 286 |
+
|
| 287 |
+
Peter Young, Alice Lai, Micah Hodosh, and Julia Hockenmaier. From image descriptions to visual denotations: New similarity metrics for semantic inference over event descriptions. TACL, 2014.
|
| 288 |
+
|
| 289 |
+
Youngjae Yu, Jongseok Kim, and Gunhee Kim. A joint sequence fusion model for video question answering and retrieval. In ECCV, 2018.
|
| 290 |
+
|
| 291 |
+
Zhou Yu, Dejing Xu, Jun Yu, Ting Yu, Zhou Zhao, Yueting Zhuang, and Dacheng Tao. Activitynetqa: A dataset for understanding complex web videos via question answering. In AAAI, 2019.
|
| 292 |
+
|
| 293 |
+
Rowan Zellers, Yonatan Bisk, Ali Farhadi, and Yejin Choi. From recognition to cognition: Visual commonsense reasoning. In CVPR, 2019.
|
| 294 |
+
|
| 295 |
+
Rowan Zellers, Ximing Lu, Jack Hessel, Youngjae Yu, Jae Sung Park, Jize Cao, Ali Farhadi, and Yejin Choi. Merlot: Multimodal neural script knowledge models. NeurIPS, 2021.
|
| 296 |
+
|
| 297 |
+
Peng Zhang, Yash Goyal, Douglas Summers-Stay, Dhruv Batra, and Devi Parikh. Yin and yang: Balancing and answering binary visual questions. In CVPR, 2016.
|
| 298 |
+
|
| 299 |
+
Linchao Zhu and Yi Yang. Actbert: Learning global-local video-text representations. In CVPR, 2020.
|
| 300 |
+
|
| 301 |
+
# A APPENDIX
|
| 302 |
+
|
| 303 |
+
In Section A.2, we show details of our open-ended QA model and SINGULARITY-temporal model, as well as pre-training objectives. In Section A.3, we show more experimental details, such as SINGULARITY-temporal results on existing datasets, SINGULARITY zero-shot results, impact of image size, and results on image-text tasks such as text-to-image retrieval tasks Flickr30K Young et al. (2014), COCO Chen et al. (2015) and image question answering task VQA Antol et al. (2015). In addition, we also show hyper-parameters and more experimental setups in this section. In Section A.4, we show more dataset details.
|
| 304 |
+
|
| 305 |
+
# A.1 AUTHOR RESPONSE
|
| 306 |
+
|
| 307 |
+
Memory and Time Cost of Frame Ensemble Strategies. In Sec.5, we discussed that our simple early fusion based frame ensemble strategy (concat) achieves the best performance for both MSRVTT retrieval and ActivityNet-QA tasks across different number of inference frames. In this section, we continue to compare its memory and computation time cost w.r.t. other frame ensemble strategies. For both tasks, our early fusion strategy (concat) achieves the better performance than late fusion strategies (lse, max, mean) while also runs faster. For memory cost, concat uses more memory for MSRVTT retrieval, but fewer memory for the ANet-QA. Overall, the early fusion approach is preferred in most cases due to its better accuracy and faster run time.
|
| 308 |
+
|
| 309 |
+

|
| 310 |
+
Figure 8: Impact of frame ensemble strategy. Retrieval performance is shown as avg recall, i.e., average of $\mathbb { R } \ @ \{ 1 , 5 , 1 0 \}$ . Top row shows the performance, time and memory comparisons for MSRVTT retrieval task, while bottom shows the same comparisons for ActivityNet-QA (ANet-QA). We use the same fine-tuned checkpoint for each task, thus the results difference only comes from inference strategies. We measure time and memory cost by running the models on the task-specific test splits. Since the three late fusion strategies (lse, max, mean) have similar memory and time costs, we only keep lse in the figures.
|
| 311 |
+
|
| 312 |
+
# A.2 ADDITIONAL MODELING DETAILS
|
| 313 |
+
|
| 314 |
+
Open-ended QA model. Figure 9a shows a graphic overview of the model architecture for openended video question answering. Following previous work Cho et al. (2021); Li et al. (2021b), we formulate this task as text generation instead of classification. Based on the base model described in main text, we add an extra multi-modal decoder that takes in multi-modal encoder outputs as crossattention inputs, and decodes answer text with “[CLS]” as the start token. This decoder has the exact same architecture as the multi-modal encoder. We initialize its weight using the pre-trained multi-modal encoder.
|
| 315 |
+
|
| 316 |
+

|
| 317 |
+
Figure 9: SINGULARITY model variants for video question answering and temporal modeling (i.e., SINGULARITY-temporal). The horizontal arrows indicate cross-attention inputs, while the vertical arrows indicate self-attention inputs.
|
| 318 |
+
|
| 319 |
+
SINGULARITY-temporal. Figure 9b shows a graphic overview of the model architecture for temporal modeling, this model is also referred to as SINGULARITY-temporal. Given multiple video frames {fτi }Ttrai=1 as input, the model firstly encode each frame into their visual representations $\{ \mathcal { F } _ { v } ( f _ { \tau _ { i } } ) \}$ with the vision encoder $\mathcal { F } _ { v }$ , where $\mathcal { F } _ { v } ( f _ { \tau _ { i } } ) \in \mathbb { R } ^ { L _ { v } \times D }$ . Next, we add temporal position encoding to each frame to indicate their temporal order. This temporal position encoding is learned from scratch and is initialized as zeros. For brevity, we omit this encoding in the formulation. These frame-level representations are concatenated together as input to the temporal encoder $\tau$ , and we feed temporal encoder outputs to the multi-modal encoder’s cross-attention layer for making a prediction $p$ :
|
| 320 |
+
|
| 321 |
+
$$
|
| 322 |
+
p = \mathcal { H } ( \mathcal { F } _ { l } ( S ) \ : , \ : T ( [ \mathcal { F } _ { v } ( f _ { \tau _ { 1 } } ) ; . . . ; \mathcal { F } _ { v } ( f _ { \tau _ { T _ { t r a i n } } } ) ] ) \ : ) ,
|
| 323 |
+
$$
|
| 324 |
+
|
| 325 |
+
# Q, K, V for self-att; Q for cross-att
|
| 326 |
+
|
| 327 |
+
where $[ ; ]$ denotes concatenation, and $[ \mathcal { F } _ { v } ( f _ { \tau _ { 1 } } ) ; . . . ; \mathcal { F } _ { v } ( f _ { \tau _ { T _ { t r a i n } } } ) ] \in \mathbb { R } ^ { ( T _ { t r a i n } \times L _ { v } ) \times D }$ . During inference, when $T _ { t e s t }$ trainframes are used as inputs to the model and $T _ { t e s t } > T _ { t r a i n }$ , we interpolate the temporal position encoding to allow for extended temporal length. This is similar to spatial position encoding interpolation in Touvron et al. (2021).
|
| 328 |
+
|
| 329 |
+
Pre-Training Objectives. During pre-training, we optimize the model with three standard visionand-language objectives, Vision-Text Contrastive (VTC), Masked Language Modeling (MLM) Devlin et al. (2019), and Vision-Text Matching. We explain them in detail below.
|
| 330 |
+
|
| 331 |
+
(i) Vision-Text Contrastive (VTC) loss aims to aligns paired vision and language embeddings. Given the encoded vision embedding $\mathcal { F } _ { v } ( f _ { i , t } )$ , we use a projection head (with pooling) $\phi _ { v }$ to project the embedding sequence into a vector representation $\phi _ { v } ( \mathcal { F } _ { v } ( f _ { i , t } ) ) \in \mathbb { R } ^ { D }$ . Here $f _ { i , t }$ is the $t$ -th frame in the $i$ -th video in the training set, and $t$ is randomly sampled from all available frames in this video. For brevity, we omit the subscript $t$ and use $f _ { i }$ to denote a randomly sampled frame from the $i$ -th video during the rest of the discussion. Similarly, we have $\phi _ { l } ( \mathcal { F } _ { l } ( S _ { j } ) ) \in \dot { \mathbb { R } } ^ { D }$ for the $j$ -th sentence. The similarity score $s _ { i , j }$ of the video and text pair is defined as their dot product:
|
| 332 |
+
|
| 333 |
+
$$
|
| 334 |
+
s _ { i , j } = \phi _ { v } ( \mathcal { F } _ { v } ( f _ { i } ) ) ^ { T } \phi _ { l } ( \mathcal { F } _ { l } ( S _ { j } ) )
|
| 335 |
+
$$
|
| 336 |
+
|
| 337 |
+
We apply a contrastive loss to encourage the alignment between paired vision-language embeddings:
|
| 338 |
+
|
| 339 |
+
$$
|
| 340 |
+
p _ { i } ^ { v } = \frac { \exp ( s _ { i , i } / \tau ) } { \sum _ { j } \exp ( s _ { i , j } / \tau ) } , ~ p _ { i } ^ { l } = \frac { \exp ( s _ { i , i } / \tau ) } { \sum _ { j } \exp ( s _ { j , i } / \tau ) } , \mathcal { L } _ { v t c } = - \sum _ { i = 1 } ^ { n } ( \log p _ { i } ^ { v } + \log p _ { i } ^ { l } ) ,
|
| 341 |
+
$$
|
| 342 |
+
|
| 343 |
+
where $\tau$ is a learned temperature parameter, and it is initialized as 0.07 following CLIP Radford et al. (2021). $n$ is the total number of examples in the training set.
|
| 344 |
+
|
| 345 |
+
$( i i )$ Masked Language Modeling (MLM) loss, or more precisely, Vision Conditioned Masked Language Modeling loss, aims to predict masked text tokens from their (masked) textual context as well as the visual context. This loss is applied at the last layer of the multi-modal encoder, and we follow the exact formulation in BERT Devlin et al. (2019), except that we add additional vision inputs and use a higher mask ratio of $50 \%$ .
|
| 346 |
+
|
| 347 |
+
(iii) Vision-Text Matching (VTM) loss works towards the same goal as the VTC loss – encouraging the alignment between paired vision and language inputs. It uses the [CLS] output from the multimodal encoder for binary classification – whether the input vision and language pair match or not. To make the training more effective, we also leverage hard negative sampling Li et al. (2021b); Chen et al. (2020) to sample more informative negatives within the batch for VTM.
|
| 348 |
+
|
| 349 |
+
# A.3 ADDITIONAL EXPERIMENTS
|
| 350 |
+
|
| 351 |
+
Analysis Setup. For all ablation studies, we report results on validation splits for the datasets if available. For example, we use validation splits for DiDeMo retrieval and ActivityNet-QA, and we use the test split for MSRVTT retrieval, val1 split for ActivityNet Captions retrieval, and test split for SSv2-label. For retrieval tasks, we use the average recall, which is the average score of $\mathbb { R } \ @ \{ 1 , 5 , 1 0 \} )$ ) to more holistically compare the model performance. For QA tasks, we use accuracy.
|
| 352 |
+
|
| 353 |
+
SINGULARITY-temporal Results on Existing Datasets. In Table 4 and Table 5 we show results of SINGULARITY-temporal on existing text-to-video retrieval and video question answering datasets. In general, the 4-frame model SINGULARITY-temporal improves upon the 1-frame model SINGULARITY, but the performance gap is relatively small, especially considering the greatly increased memory and computation cost (discussed in main text) of using 4 frames.
|
| 354 |
+
|
| 355 |
+
Table 4: SINGULARITY-temporal results on text-to-video retrieval.
|
| 356 |
+
Table 5: SINGULARITY-temporal results on video question answering.
|
| 357 |
+
|
| 358 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">#PT</td><td rowspan="2">#Train</td><td colspan="3">MSRVTT</td><td colspan="3">DiDeMo</td><td colspan="3">ActivityNet Cap</td></tr><tr><td>Frame</td><td>R1 R5 R10</td><td></td><td>R1</td><td></td><td></td><td></td><td></td><td>R5 R10 R1 R5 R10</td></tr><tr><td>HERO (Li et al., 2020a)</td><td>136M</td><td>310</td><td>20.5 47.6 60.9</td><td></td><td></td><td>-</td><td>=</td><td></td><td></td><td></td><td>-</td></tr><tr><td>MMT (Gabeur et al., 2020)</td><td>136M 1K/-/3K 26.6 57.1 69.6</td><td></td><td></td><td></td><td></td><td></td><td>=</td><td></td><td></td><td></td><td>28.7 61.4 94.5</td></tr><tr><td>ClipBERT (Lei et al., 2021)</td><td>0.2M 16/16/8 22.0 46.8 59.9 20.4 48.0 60.8 21.3 49.0 63.5</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>VideoCLIP (Xu et al., 2021)</td><td>136M</td><td>960</td><td>30.9 55.4 66.8</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Frozen (Bain et al., 2021)</td><td>5M</td><td>4</td><td>31.0 59.5 70.5 31.0 59.8 72.4</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>=</td></tr><tr><td>AlignPrompt (Li et al., 2021a)</td><td>5M</td><td>8</td><td>33.9 60.7 73.2 35.9 67.5 78.8</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>CLIP4Clip (Lu0 et al.,2021) 400M 12/64/64 42.0 68.6 78.7 42.8 68.5 79.2 40.5 72.4 98.2</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>SINGULARITY</td><td>5M</td><td>1</td><td>36.8 65.9 75.5 47.4 75.2 84.0 43.0 70.6</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>81.3</td></tr><tr><td>SINGULARITY-temporal</td><td>5M</td><td>4</td><td>39.9 67.3 76.0 49.2 77.5 85.4 45.9 73.3</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>83.8</td></tr><tr><td>SINGULARITY</td><td>17M</td><td>1</td><td>41.5 68.7</td><td></td><td>77</td><td> 53.9 79.4 86.9 47.1 75.5</td><td></td><td></td><td></td><td></td><td>85.5</td></tr><tr><td>SINGULARITY-temporal</td><td>17M</td><td>4</td><td></td><td>42.7 69.5 78.1</td><td></td><td>53.1 79.9 88.1 48.9 77.0</td><td></td><td></td><td></td><td></td><td>86.3</td></tr></table>
|
| 359 |
+
|
| 360 |
+
<table><tr><td>Method</td><td>#PT</td><td> #Train Frame MSRVTT-QA ActivityNet-QA MSRVTT-MC</td><td></td><td></td><td></td></tr><tr><td>ClipBERT (Lei et al., 2021)</td><td>0.2M</td><td>16</td><td>37.4</td><td></td><td>88.2</td></tr><tr><td>AlignPrompt (Li et al., 2021a)</td><td>5M</td><td>16</td><td>42.1</td><td></td><td>=</td></tr><tr><td>JustAsk (Yang et al., 2021)</td><td>69M</td><td>640</td><td>41.5</td><td>38.9</td><td>-</td></tr><tr><td>MERLOT (Zellers et al., 2021) </td><td>)180M</td><td>5</td><td>43.1</td><td>41.4</td><td>90.9</td></tr><tr><td>VideoCLIP (Xu et al., 2021)</td><td>136M</td><td>960</td><td>-</td><td>-</td><td>92.1</td></tr><tr><td>SINGULARITY</td><td>5M</td><td>1</td><td>42.7</td><td>41.8</td><td>92.0</td></tr><tr><td>SINGULARITY-temporal</td><td>5M</td><td>4</td><td>43.3</td><td>43.4</td><td>92.0</td></tr><tr><td>SINGULARITY</td><td>17M</td><td>1</td><td>43.5</td><td>43.1</td><td>92.1</td></tr><tr><td>SINGULARITY-temporal</td><td>17M</td><td>4</td><td>43.9</td><td>44.1</td><td>93.7</td></tr></table>
|
| 361 |
+
|
| 362 |
+
Zero-Shot Results. In Table 6 we show zero-shot results of SINGULARITY for text-to-video retrieval. SINGULARITY achieves significantly better results compared to existing methods with a similar amount of pre-training data.
|
| 363 |
+
|
| 364 |
+
Performance of Multiple Runs. In Table 7 we show mean and standard deviation of 5 random runs, for text-to-video retrieval.
|
| 365 |
+
|
| 366 |
+
Comparison on Inference Cost. In Table 8, we compare the cost of various retrieval methods in terms of inference GFLOPs and the number of model parameters. Overall, SINGULARITY models have a similar amount of parameters and lower inference GFLOPs, with higher performance.
|
| 367 |
+
|
| 368 |
+
Ablation Study on Training Objectives. In Table 9, we study the effect of using different training objectives. We notice that using all objectives achieves the best performance. One interesting note is that, compared to $\mathbf { ( I T M + M L M }$ ), adding ITC loss $\mathrm { I T M + M L M + I T C } )$ greatly improves retrieval performance on MSRVTT, but not ActivityNet QA. This makes sense as ITC is not applied on the multi-modal encoder which QA tasks may heavily rely on.
|
| 369 |
+
|
| 370 |
+
Impact of Image Size. In Figure 10 we study the impact of image size for downstream tasks. In general, a larger image size helps improve model performance, but the performance saturates at a certain size, e.g., the model performance saturates at around $3 3 6 \times 3 3 6$ for the 3 tasks. Note that our model performance with larger image sizes might suffer from the low resolution of the raw videos we have. For example, we are only able to get videos of resolution $3 2 0 \times 2 4 0$ for MSRVTT.
|
| 371 |
+
|
| 372 |
+
Comparison on Image-Text tasks. Since our model is pre-trained with single frames, it can be directly used for image-text tasks. In Table 11 we show image-text retrieval results on
|
| 373 |
+
|
| 374 |
+
Table 6: SINGULARITY zero-shot results on text-to-video retrieval.
|
| 375 |
+
Table 7: SINGULARITY results on text-to-video retrieval, with mean/std over 5 random runs. We show the results for the model pre-trained on the 17M corpus.
|
| 376 |
+
|
| 377 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">#PT</td><td rowspan="2">#Train</td><td colspan="3">MSRVTT</td><td colspan="3">DiDeMo</td><td colspan="3"> ActivityNet Cap</td></tr><tr><td>Frame1</td><td>R1 R5 R10 R1 R5 R10 R1 R5 R10</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>VideoCLIP (Xu et al., 2021)</td><td>137M</td><td>1K</td><td></td><td>10.4 22.2 30.0 16.6 46.9</td><td></td><td></td><td></td><td>=</td><td></td><td></td><td>-</td></tr><tr><td>Frozen (Bain et al., 2021)</td><td>5M</td><td>4</td><td></td><td>18.7 39.5 51.6 21.1 46.0 56.2</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>AlignPrompt (Li et al., 2021a)</td><td>5M</td><td>8</td><td></td><td>24.1 44.7 55.4 23.8 47.3 57.9</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td> CLIP-straight</td><td>400M</td><td>1</td><td></td><td>31.2 53.7 64.2</td><td></td><td>-</td><td>=</td><td>=</td><td>-</td><td>-</td><td></td></tr><tr><td>BLIP</td><td>130M</td><td>1</td><td></td><td> 43.3 65.6 74.7</td><td></td><td></td><td></td><td>=</td><td></td><td></td><td>-</td></tr><tr><td>SINGULARITY</td><td>5M</td><td>1</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>28.4 50.2 59.5 36.9 61.1 69.3 30.8 55.9 66.3</td></tr><tr><td>SINGULARITY</td><td>17M</td><td>1</td><td></td><td>34.0 56.7 66.7 37.1 61.7 69.9 30.6 55.6 66.9</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 378 |
+
|
| 379 |
+
<table><tr><td rowspan="3">Method</td><td colspan="3">MSRVTT</td><td colspan="3">DiDeMo</td><td colspan="3">ActivityNet</td></tr><tr><td>R1</td><td>R5</td><td>R10</td><td>R1</td><td>R5</td><td>R10</td><td>R1</td><td>R5</td><td>R10</td></tr><tr><td>SINGULARITY</td><td>42.1±0.5</td><td>69.3±0.4</td><td>78.1±0.7</td><td>53.3±1.0</td><td>78.7±1.3</td><td>86.3±1.5</td><td>47.0±0.5</td><td>75.7±0.3</td><td>85.3±0.3</td></tr></table>
|
| 380 |
+
|
| 381 |
+
Flickr30K Young et al. (2014) and COCO Chen et al. (2015). In Table 12 we show image question answering results on VQA Antol et al. (2015). We observe that SINGULARITY demonstrates competitive performance on the image-text tasks. As we still see a gap with state-of-the-art imagetext models such as Li et al. (2022), one future direction is to adopt improved designs in these methods to further improve video-text task performance.
|
| 382 |
+
|
| 383 |
+
Hyper-Parameters. The hyper-parameters for our pre-training and downstream task fine-tuning are listed in Table 13 and Table 14. Note that we did not do an extensive hyper-parameter search, but mostly use the same hyper-parameters for different datasets under the same task, it is possible that better results can be achieved with more tuning.
|
| 384 |
+
|
| 385 |
+
# A.4 ADDITIONAL DATA DETAILS
|
| 386 |
+
|
| 387 |
+
Statistics. We show statistics of pre-training datasets in Table 15, and downstream datasets in Table 16.
|
| 388 |
+
|
| 389 |
+
License. We show dataset licenses in Table 17.
|
| 390 |
+
|
| 391 |
+
Table 8: Comparison of recent retrieval methods on inference GLOPs and #params. For brevity, we show DiDeMo retrieval performance with Average Recall (AvgR) – the average of $\mathbb { R } \{ 1 , 5 , 1 0 \}$ .
|
| 392 |
+
|
| 393 |
+
<table><tr><td>Method</td><td>#PT</td><td>Inference GFLOPs #params DiDeMo AvgR</td><td></td><td></td></tr><tr><td>Frozen (Bain et al.,2021)</td><td>5M</td><td>542</td><td>181M</td><td>54.4</td></tr><tr><td>AlignPrompt (Li et al., 2021a)</td><td>5M</td><td>-</td><td>231M</td><td>60.7</td></tr><tr><td> CLIP4Clip (Radford et al., 2021) 400M</td><td></td><td>1,121</td><td>164M</td><td>63.5</td></tr><tr><td>SINGULARITY</td><td>5M</td><td>451</td><td>202M</td><td>68.9</td></tr><tr><td>SINGULARITY-temporal</td><td>5M</td><td>485</td><td>209M</td><td>70.7</td></tr></table>
|
| 394 |
+
|
| 395 |
+
Table 9: Ablation study on training objectives. The models are pre-trained on 2.5M WebVid videotext pairs for 10 epochs and are then fine-tuned.
|
| 396 |
+
|
| 397 |
+
<table><tr><td>Objectives</td><td>MSRVTTRetrieval AvgR ActivityNet-QA</td><td></td></tr><tr><td>ITM</td><td>32.4</td><td>40.2</td></tr><tr><td>ITM+MLM</td><td>52.5</td><td>47.0</td></tr><tr><td>ITM+ ITC</td><td>54.3</td><td>44.1</td></tr><tr><td>ITM +MLM+ITC</td><td>55.7</td><td>46.4</td></tr></table>
|
| 398 |
+
|
| 399 |
+
Table 10: Impact of Image Size. We fine-tune models from the same checkpoint, pre-trained with input image size $2 2 4 \times 2 2 4$ . We show average recall (average of $\mathbb { R } \ @ \{ 1 , 5 , 1 0 \} )$ ) for retrieval tasks, and accuracy for the QA task.
|
| 400 |
+
|
| 401 |
+
<table><tr><td>Image size</td><td>MSRVTT retrieval</td><td>DiDeMo retrieval</td><td>ActivityNet QA</td></tr><tr><td>112</td><td>58.7</td><td>65.9</td><td>46.6</td></tr><tr><td>224</td><td>62.4</td><td>73.4</td><td>49.2</td></tr><tr><td>336</td><td>65.5</td><td>73.4</td><td>49.6</td></tr><tr><td>448</td><td>64.2</td><td>72.9</td><td>49.8</td></tr></table>
|
| 402 |
+
|
| 403 |
+
Table 11: Comparison to existing methods on image-text retrieval. We show results for both text retrieval (image-to-text retrieval, TR) and image retrieval (IR).
|
| 404 |
+
|
| 405 |
+
<table><tr><td rowspan="3">Method</td><td rowspan="3">#PT</td><td colspan="4">COCO (5K test)</td><td colspan="5">Flickr30K (1K test)</td></tr><tr><td colspan="2">TR</td><td colspan="3">IR</td><td colspan="2">TR</td><td colspan="2">IR</td></tr><tr><td>R1</td><td>R5</td><td>R10 R1</td><td>R5</td><td>R10 R1</td><td></td><td>R5</td><td>R10 R1</td><td>R5</td><td>R10</td></tr><tr><td>ViLT (Kim et al., 2021)</td><td>4M 61.5 86.3 92.7 42.7 72.9 83.1 83.5 96.7</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>98.6 64.4 88.7 93.8</td><td></td><td></td></tr><tr><td>UNITER (Chen et al., 2020)</td><td></td><td></td><td></td><td>4M 65.7 88.6 93.8 52.9 79.9 88.0 87.3 98.0 99.2 75.6 94.1 96.8</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>OSCAR (Li et al., 2020b)</td><td></td><td></td><td></td><td>4M 70.0 91.1 95.5 54.0 80.8 88.5</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Frozen (Bain et al., 2021)</td><td>5M</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>61.0 87.5 92.7</td><td></td></tr><tr><td>ALBEF (Li et al., 2021b)</td><td></td><td></td><td></td><td>4M 73.1 91.4 96.0 56.8 81.5 89.2 94.3 99.4 99.8 82.8 96.7 98.4</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>ALBEF (Li et al., 2021b)</td><td></td><td></td><td></td><td>14M 77.6 94.3 97.2 60.7 84.3 90.5 95.9 99.8 100.0 85.6 97.5 98.9</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>BLIP (Li et al., 2022)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>14M 80.6 95.2 97.6 63.1 85.3 91.1 96.6 99.8 100.0 87.2 97.5 98.8</td><td></td></tr><tr><td>BLIP (Li et al., 2022)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>129M 81.9 95.4 97.8 64.3 85.7 91.5 97.3 99.9 100.0 87.3 97.6 98.9</td><td></td></tr><tr><td>ALIGN (Jia et al., 2021)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>1.2B 77.0 93.5 96.9 59.9 83.3 89.8 95.3 99.8 100.0 84.9 97.4 98.6</td><td></td></tr><tr><td>SINGULARITY</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>5M 71.9 90.8 95.4 54.6 80.0 87.8 93.3 99.4 99.8 81.4 95.8 97.9</td><td></td></tr><tr><td>SINGULARITY</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>17M 77.0 93.7 96.8 59.6 83.4 90.0 96.1 99.8 99.9 84.7 96.8 98.3</td><td></td></tr></table>
|
| 406 |
+
|
| 407 |
+
Table 12: Comparison to existing methods on VQA.
|
| 408 |
+
|
| 409 |
+
<table><tr><td>Method</td><td>#PT</td><td>test-dev</td><td>test-std</td></tr><tr><td>ClipBERT (Lei et al., 2021)</td><td>0.2M</td><td>69.08</td><td>69.43</td></tr><tr><td>ViLT (Kim et al., 2021)</td><td>4M</td><td>70.94</td><td>=</td></tr><tr><td>VL-BART (Cho et al., 2021)</td><td>0.2M</td><td>1</td><td>71.30</td></tr><tr><td>LXMERT(Tan & Bansal,2019)</td><td>4M</td><td>72.42</td><td>72.54</td></tr><tr><td>UNITER (Chen et al., 2020)</td><td>4M</td><td>72.70</td><td>72.91</td></tr><tr><td>UNIMO (Li et al., 2021c)</td><td>4M</td><td>73.79</td><td>74.02</td></tr><tr><td>OSCAR (Li et al., 2020b)</td><td>4M</td><td>73.16</td><td>73.44</td></tr><tr><td>ALBEF (Li et al., 2021b)</td><td>4M</td><td>74.54</td><td>74.70</td></tr><tr><td>ALBEF (Li et al., 2021b)</td><td>14M</td><td>75.84</td><td>76.04</td></tr><tr><td>BLIP (Li et al., 2022)</td><td>14M</td><td>77.54</td><td>77.62</td></tr><tr><td>BLIP (Li et al., 2022)</td><td>129M</td><td>78.24</td><td>78.17</td></tr><tr><td>SINGULARITY</td><td>5M</td><td>70.30</td><td>70.53</td></tr><tr><td>SINGULARITY</td><td>17M</td><td>73.13</td><td>73.27</td></tr></table>
|
| 410 |
+
|
| 411 |
+
Table 13: SINGULARITY hyper-parameters for pre-training, video QA, image QA and text-to-image retrieval. We only list a single value if all tasks share the same value. For SINGULARITY-temporal, we train with a similar setup, except that we set #training frames to be 4. In addition, for SINGULARITY-temporal 2nd stage pre-training, we also use a smaller batch size of 32 per GPU.
|
| 412 |
+
|
| 413 |
+
<table><tr><td>config</td><td>pre-training</td><td>video QA image QA</td><td></td><td>text-to-image retrieval</td></tr><tr><td>optimizer</td><td colspan="4">AdamW (Loshchilov & Hutter,2019)</td></tr><tr><td>optimizer momentum</td><td colspan="4">β1, β2=0.9,0.999</td></tr><tr><td>base learning rate</td><td>1e-4</td><td>1e-5</td><td>1e-5</td><td>1e-5</td></tr><tr><td>min learning rate</td><td>1e-5</td><td>1e-6</td><td>1e-6</td><td>1e-6</td></tr><tr><td>weight decay</td><td></td><td></td><td>0.02</td><td></td></tr><tr><td>learning rate schedule</td><td colspan="4">cosine decay (Loshchilov & Hutter,2017)</td></tr><tr><td>image size</td><td>224</td><td>224</td><td>336</td><td>336</td></tr><tr><td>image augmentation</td><td colspan="4">random resize,crop,horizontal flip</td></tr><tr><td>#training epochs</td><td>10</td><td>10</td><td>5</td><td>10 (Flickr30K),5 (COCO)</td></tr><tr><td>#warmup epochs</td><td>1</td><td>0.5</td><td>0.5</td><td>0</td></tr><tr><td>batch size x #GPUs</td><td>128×3</td><td>32×1</td><td>64×4</td><td>64×2</td></tr><tr><td>#training frames</td><td></td><td></td><td>1</td><td></td></tr><tr><td>#inference frames</td><td>1</td><td>12</td><td>1</td><td>1</td></tr></table>
|
| 414 |
+
|
| 415 |
+
Table 14: SINGULARITY hyper-parameters for text-to-video retrieval tasks. We only list a single value if all tasks share the same value. For SINGULARITY-temporal, we train it with a similar setup, except that we set #training frames to be 4.
|
| 416 |
+
|
| 417 |
+
<table><tr><td>config</td><td>MSRVTT</td><td>DiDeMo</td><td>ActivityNet Captions</td><td>SSv2-template/label</td></tr><tr><td>optimizer</td><td></td><td colspan="3">AdamWLoshchilov & Hutter (2019)</td></tr><tr><td>optimizer momentum</td><td></td><td></td><td>β1,β2=0.9,0.999</td><td></td></tr><tr><td>base learning rate</td><td>1e-5</td><td>1e-5</td><td>1e-5</td><td>1e-4</td></tr><tr><td> min learning rate</td><td>1e-6</td><td>1e-6</td><td>1e-6</td><td>1e-5</td></tr><tr><td>weight decay</td><td></td><td></td><td>0.02</td><td></td></tr><tr><td>learning rate schedule</td><td></td><td>cosine decay Loshchilov & Hutter (2017)</td><td></td><td></td></tr><tr><td>image size</td><td></td><td></td><td>224</td><td></td></tr><tr><td>image augmentation</td><td></td><td></td><td>random resize,crop,horizontal flip</td><td></td></tr><tr><td>#training epochs</td><td>5</td><td>10</td><td>10</td><td>10</td></tr><tr><td>#warmup epochs</td><td></td><td></td><td>0</td><td></td></tr><tr><td>batch size x #GPUs</td><td>32x1</td><td>32x1</td><td>32x1</td><td>32x2</td></tr><tr><td>#training frames</td><td></td><td></td><td>1</td><td></td></tr><tr><td>#inference frames</td><td>12</td><td>12</td><td>32</td><td>12</td></tr></table>
|
| 418 |
+
|
| 419 |
+
Table 15: Statistics of pre-training datasets. The average video length of WebVid is 18 seconds.
|
| 420 |
+
Table 16: Statistics of downstream datasets.
|
| 421 |
+
|
| 422 |
+
<table><tr><td>Dataset</td><td>#image/video</td><td>#text</td><td>Type</td></tr><tr><td>COCO (Chen et al., 2015)</td><td>113K</td><td>567K</td><td>image</td></tr><tr><td>VG (Krishna et al., 2017b)</td><td>100K</td><td>768K</td><td>image</td></tr><tr><td>SBU (Ordonez et al., 2011)</td><td>860K</td><td>860K</td><td>image</td></tr><tr><td>CC3M (Sharma et al., 2018)</td><td>2.95M</td><td>2.95M</td><td>image</td></tr><tr><td>CC12M (Changpinyo et al., 2021)</td><td>10.77M</td><td>10.77M</td><td>image</td></tr><tr><td>WebVid (Bain et al., 2021)</td><td>2.49M</td><td>2.49M</td><td>video</td></tr><tr><td>5M corpus = CC3M+WebVid</td><td>5.44M</td><td>5.44M</td><td>video+image</td></tr><tr><td>17M corpus = 5M+COCO+VG+SBU+CC12M</td><td>17.28M</td><td>18.41M</td><td>video+image</td></tr></table>
|
| 423 |
+
|
| 424 |
+
<table><tr><td rowspan="2">Dataset</td><td colspan="3">#video</td><td colspan="3">#text</td><td rowspan="2">Avg Video</td></tr><tr><td>Train</td><td>Val</td><td>Test</td><td>Train</td><td>Val</td><td>Test Length (s)</td></tr><tr><td>Text-to-Video Retrieval</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>ActivityNet Cap (Krishna et al., 2017a)</td><td>10,009</td><td></td><td>- 4,917</td><td>10,009</td><td></td><td>4,917</td><td>180</td></tr><tr><td>DiDeMo (Anne Hendricks et al., 2017)</td><td></td><td></td><td>8,394 1,065 1,003</td><td>8,394</td><td>1,065</td><td>1,003</td><td>29.3</td></tr><tr><td>MSRVTT (Xu et al., 2016)</td><td>7,010</td><td></td><td>- 1,000</td><td>140,200</td><td></td><td>1,000</td><td>15</td></tr><tr><td>SSV2-Template (Goyal et al.,2017a)</td><td>168,913</td><td></td><td>- 2,088</td><td>174</td><td></td><td>174</td><td>4</td></tr><tr><td>SSV2-Label (Goyal et al., 2017a)</td><td>168,913</td><td></td><td>-2,088</td><td>109,968</td><td></td><td>1,989</td><td>4</td></tr><tr><td>Video Question Answering</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>MSRVTT-QA (Xu et al., 2017)</td><td>6,513</td><td></td><td></td><td>497 2,990 158,581 12,278 72,821</td><td></td><td></td><td>15</td></tr><tr><td>ActivityNet-QA (Yu et al.,2019)</td><td>3,200 1,800</td><td></td><td>800</td><td>32,000 18,000</td><td></td><td>8.000</td><td>180</td></tr><tr><td>MSRVTT-MC (Yu et al., 2018)</td><td>7,010</td><td></td><td>- 2,990</td><td>140,200</td><td></td><td>14,950</td><td>15</td></tr></table>
|
| 425 |
+
|
| 426 |
+
Table 17: Dataset licenses.
|
| 427 |
+
|
| 428 |
+
<table><tr><td>Dataset</td><td>License</td></tr><tr><td>COCO (Chen et al., 2015)</td><td>CC BY 4.0, Flickr Terms of Use</td></tr><tr><td>VG (Krishna et al., 2017b)</td><td>CC BY 4.0</td></tr><tr><td>SBU (Ordonez et al., 2011)</td><td>Flickr Terms of Use</td></tr><tr><td>CC3M (Sharma et al.,2018)</td><td>CC3MLicense</td></tr><tr><td>CC12M (Changpinyo et al., 2021)</td><td>CC12MLicense</td></tr><tr><td>WebVid (Bain et al.,2021)</td><td>Exceptions to Copyright</td></tr><tr><td>ActivityNet Captions (Krishna et al.,2017a)</td><td>Fair Use</td></tr><tr><td>DiDeMo (Anne Hendricks et al., 2017)</td><td>BSD-2-Clause, Creative Commons</td></tr><tr><td>MSRVTT (Xu et al., 2016)</td><td>unknown</td></tr><tr><td>SSV2-Template (Goyal et al., 2017a)</td><td>SSv2 License</td></tr><tr><td>SSV2-Label (Goyal et al., 2017a)</td><td>SSv2License</td></tr><tr><td>MSRVTT-QA (Xu et al., 2017)</td><td>MIT</td></tr><tr><td>ActivityNet-QA (Yu et al., 2019)</td><td>Apache</td></tr><tr><td>MSRVTT-MC (Yu et al., 2018)</td><td>unknown</td></tr></table>
|
parse/dev/UhEJz3wgLnG/UhEJz3wgLnG_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/UhEJz3wgLnG/UhEJz3wgLnG_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/krI-ahhgN2/krI-ahhgN2.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/krI-ahhgN2/krI-ahhgN2_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/krI-ahhgN2/krI-ahhgN2_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/krI-ahhgN2/krI-ahhgN2_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/nJfylDvgzlq/nJfylDvgzlq_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/zSkYVeX7bC4/zSkYVeX7bC4.md
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Exploring Length Generalization in Large Language Models
|
| 2 |
+
|
| 3 |
+
Cem Anil ∗1, 3, Yuhuai $\mathbf { W } \mathbf { u } ^ { 2 }$ , Anders Andreassen1, Aitor Lewkowycz1 Vedant Misra1, Vinay Ramasesh1, Ambrose Slone1, Guy Gur-Ari1, Ethan Dyer1, Behnam Neyshabur1
|
| 4 |
+
|
| 5 |
+
1 Google Research, Blueshift Team 2 Google Research 3 University of Toronto, Vector Institute
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
The ability to extrapolate from short problem instances to longer ones is an important form of out-of-distribution generalization in reasoning tasks, and is crucial when learning from datasets where longer problem instances are rare. These include theorem proving, solving quantitative mathematics problems, and reading/- summarizing novels. In this paper, we run careful empirical studies exploring the length generalization capabilities of transformer-based language models. We first establish that naively finetuning transformers on length generalization tasks shows significant generalization deficiencies independent of model scale. We then show that combining pretrained large language models’ in-context learning abilities with scratchpad prompting (asking the model to output solution steps before producing an answer) results in a dramatic improvement in length generalization. We run careful failure analyses on each of the learning modalities and identify common sources of mistakes that highlight opportunities in equipping language models with the ability to generalize to longer problems.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Many natural problems, such as theorem proving and program synthesis, have a notion of length that strongly correlates with the difficulty of the task. However, in these domains, the number of available problems typically drops rapidly as a function of problem length (e.g. Figure 2). Hence, it is desirable to learn from examples of shorter lengths to generalize to longer ones or at least reduce the number of samples required for longer examples. We refer to this type of problem as length generalization.
|
| 14 |
+
|
| 15 |
+
Recent work on large language models (LLMs) has shown consistent improvement in their performance by scaling model and dataset size. However, such models are still incapable of length generalization. For example, [1] shows that even though scale helps with solving arithmetic problems, scale alone is likely insufficient for learning to solve instances of arbitrary lengths. This implies that models fail to learn the general algorithms that would enable this kind of generalization. Indeed, Razeghi et al. [2] showed that the performance of LLMs on mathematical calculations correlates with term frequency in the training data. This suggests that LLMs might have gained their current performance from surface-level memorization instead of learning to apply the correct algorithm.
|
| 16 |
+
|
| 17 |
+
A recent line of work proposes to use a scratchpad, or chain-of-thought reasoning, when prompting LLMs [3, 4, 5] on multi-step tasks. Breaking down tasks into multiple small steps and presenting these steps to the model leads to improved performance across a variety of reasoning tasks including word problems, arithmetic, and code execution.
|
| 18 |
+
|
| 19 |
+
We perform a systematic study of length generalization with transformer-based large language models. We consider problems in which learning an algorithm can in principle enable a model to extrapolate from short examples to problems of arbitrary length. In particular, we focus on two simple algorithmic tasks, parity and variable assignment, in which the model needs to keep track of a state in order to extrapolate to longer lengths (see Figure 1). These problems are illuminating because their simplicity allows us to probe the failure modes as well as contrast the learned solutions with the ground truth algorithm. They provide us with a setting to study how/when these large language models start to fail.
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
Figure 1: Examples of variable assignment problems: Can transformer language models learn from short instances of the Variable Assignment task (left) to extrapolate to much longer instances (right)? Length generalization is the ability to learn from shorter/easier instances of a problem to handle longer/harder instances.
|
| 23 |
+
Table 1: Performance on length generalization tasks of three techniques that language models admit: (1) Finetuning, (2) Prompting (or in-context few-shot learning) and (3) Scratchpad (Chain-of-Thought reasoning). We find that each technique (and the combinations thereof) have different modes of failure and present different trade-offs regarding in and out-of-distribution coverage. $x$ signifies poor $\checkmark$ signifies nontrivial, $\checkmark$ signifies near-perfect performance. $( ^ { * } )$ Refers to task-dependency.
|
| 24 |
+
|
| 25 |
+
<table><tr><td>Techniques</td><td>In-distribution</td><td></td><td>Out-of-distributionImproves with scale</td></tr><tr><td>Fine-tune</td><td></td><td></td><td>xxxx/</td></tr><tr><td>Prompting</td><td></td><td></td><td></td></tr><tr><td>Fine-tune + Prompting</td><td></td><td></td><td></td></tr><tr><td>Fine-tune + Scratchpad</td><td></td><td>xxxx'</td><td></td></tr><tr><td>Prompting + Scratchpad</td><td></td><td></td><td></td></tr><tr><td>Fine-tune + Prompting + Scratchpad</td><td></td><td></td><td></td></tr></table>
|
| 26 |
+
|
| 27 |
+
We study combinations of three kinds of techniques for LLMs: finetuning, few shot prompting (also referred to as in-context learning), and use of a scratchpad (also referred to as chain-of-thought), to understand the role of each method and the interplay among the three in length generalization. Interestingly, we observe non-trivial interactions among the three techniques; see Table 1.
|
| 28 |
+
|
| 29 |
+
Contributions Our main contributions are as follows:
|
| 30 |
+
|
| 31 |
+
• We define and characterize the problem of length generalization using notions such as state tracking, execution depth, and per-step error rate. We study and carefully design two tasks, parity and variable assignment, that measure length generalization (Section 2). • We find that in the finetuning regime, scaling data, model sizes, and compute does not improve length generalization (Section 3.1). We also observe that even when the model attains perfect in-distribution accuracy, it performs poorly in out-of-distribution domains. Surprisingly, different hyperparameter choices for finetuning have a large effect on length generalization performance, while having minimal effect on the final in-distribution performance (Section 3.3). • We establish finetuning with scratchpad also fails to generalize to longer problems, in contrast to what is suggested by previous works [3]. We look into three potential failure cases: positional encoding, the presence of distractors, and end of token prediction, and conclude that distractors are the main culprit of failures for length generalization (Section 4). We show that in the in-context learning regime, use of a scratchpad shows a qualitatively different behavior and significantly alleviates the decay of performance on longer problems. This capability is significant, as it implies that for LLMs, there are certain skills, like length generalization, that can be learned through in-context learning rather than through finetuning even in the presence of infinite data. This is in stark contrast to the common norms of machine learning (Section 5).
|
| 32 |
+
|
| 33 |
+

|
| 34 |
+
Figure 2: Real world datasets have heavy tails in length: (left) Histogram of lengths for proofs presented in the Archive of Formal Proofs (right) Histogram of the number of tokens for solutions in the MATH dataset. [6]
|
| 35 |
+
|
| 36 |
+
# 2 Length Generalization
|
| 37 |
+
|
| 38 |
+
Many sequence tasks—especially ones that require reasoning capabilities—have problem instances that differ in terms of their lengths. Shorter instances are often easier to state, process, and handle, and require less compute to find the answer. By contrast, longer instances are more challenging to parse and require more compute to solve. Tasks that have a reasoning component are especially well represented in this category — multi-hop reasoning [7], program execution [8], deductive reasoning [9] and theorem proving [10], to name a few. Note that having to deal with differing problem lengths poses two significant challenges. First, it is often the case that one encounters longer problem instances than the ones ever encountered during training, and is required to extrapolate. Second, even though longer problem instances have much more variety, real-world datasets often contain few long instances (see Figure 2). Both of these challenges are exacerbated if learning agents are not able to generalize across and beyond the lengths they learn from during training. This paper is about investigating to what extent transformer based language models are able to observe short problem instances and extrapolate to longer ones.
|
| 39 |
+
|
| 40 |
+
Instance Length as Number of Steps in a Markov Process It is possible to define problem length in many different ways to capture different aspects of problem difficulty. Does there exist a notion of length that would expose the same length-generalization-related problem structure observed in qualitatively very different settings? Such a framing would enable researchers to design algorithms and interventions that have the potential to generalize across a broad range of tasks. To this end, we take the approach of characterizing length in the context of a deterministic Markov process. From this perspective, length is simply the number of state transitions experienced by an initial world state. In other words, the data-generation process can be described as sampling an (1) initial state and a (2) variable number of state transformations to be applied sequentially on the initial state. The agent is provided both the initial state and the transformations, and is asked to predict the final state. This framing applies to a wide range of sequence problems, if not all of them—ranging from more mechanical tasks such as code and algorithm execution and theorem proving, to less structured tasks, such as solving math problems and summarizing novels.
|
| 41 |
+
|
| 42 |
+
In our empirical investigation we focus on two synthetic tasks: parity and variable assignment. These tasks avoid problem-specific subtleties that could mislead our analyses, while strongly capturing the deterministic Markov process structure.
|
| 43 |
+
|
| 44 |
+
# 2.1 Tasks
|
| 45 |
+
|
| 46 |
+
Parity: The parity task is an age-old learning problem that requires the trained agent to predict whether a bit-string has an even or odd number of ones in it. For example, the parity of the bitstring $[ 0 , 1 , 1 , 0 , 1 ]$ is “odd" (or 1) as opposed to “even" (or 0), because there is an odd number of 1s in the bit-string. The parity task admits a sequential solution that enables length generalization in a straightforward way: simply process the bits left-to-right and record the parity of the bits processed so far as the state. The default notion of length in the parity task is the number of bits in the input. However, we also experiment with a version where the number of bits is kept constant, and the number of 1s (i.e. the parity flipping bit) is systematically varied. The number of 1s stands for the number of state changes contained in the input bit-string, and actually appears to capture a more relevant notion of length for transformer models (see Section 3.1).
|
| 47 |
+
|
| 48 |
+

|
| 49 |
+
Figure 3: Finetuned Length Generalization performance doesn’t improve with scale: Models of vastly different scales fail at length generalization on both Parity and Variable Assignment tasks, displaying identical generalization pathologies. The $\mathbf { X } ^ { \prime }$ -axis represents problem length and the y-axis represents the accuracy attained at that problem length. The training lengths are highlighted in grey.
|
| 50 |
+
|
| 51 |
+
Boolean Variable Assignment Task: The Boolean Variable Assignment task is designed to capture arbitrarily long, potentially branching unidirectional execution flows. An instance of this task can be seen in Figure 1. The inputs consist of semantically correct (i.e. bug-free) Python programs in which each line contains a boolean variable assignment operation. The output is simply the value of the variable presented in the final line of the program. The sequential solution to this task is to simply execute the program line by line while keeping track of the state of all variables.
|
| 52 |
+
|
| 53 |
+
The data generation procedure involves randomly generating execution flows that involve Boolean operations; see Supplementary Material (SM) for details.
|
| 54 |
+
|
| 55 |
+
We focus our evaluations on two variants of this dataset. (1) The diverse variable assignment split consists of a wide range of boolean operators available and is intended to contain maximally diverse programs. (2) The chain-like variable assignment split consists only of operations that compose the values of already defined variables. This results in long chains of dependencies between the initial values of the variables and the queried one, ensuring that there are almost no redundant operations in the program (i.e. operations that can be removed without affecting the output of the program). This split emphasizes the sequential nature of the variable assignment problem.
|
| 56 |
+
|
| 57 |
+
# 3 Standard Finetuning Fails at Length Generalization
|
| 58 |
+
|
| 59 |
+
We begin by demonstrating that finetuning transformer models on length-generalization tasks results in poor out-of-distribution performance. In experiments we use LaMDA 2 decoder-only models. These checkpoints were trained using general natural language data. We use the AdaFactor optimizer [11] during finetuning, and tune the learning rate, batch size and dropout. We trained the networks until the in-distribution validation accuracy settles (20000 gradient steps for parity and 18000 gradient steps for variable assignment). The loss was only computed on the target tokens (i.e. the model wasn’t trained to model the input questions).
|
| 60 |
+
|
| 61 |
+
# 3.1 Scale Doesn’t Improve Length Generalization
|
| 62 |
+
|
| 63 |
+
Parity: We finetuned four pretrained LaMDA models with $2 4 4 \mathrm { m }$ , $4 2 2 \mathrm { m }$ , 1b and 64b parameters on the parity task, where the training distribution included randomly sampled bitstrings of length 10 to 21. We then evaluated the performance on bitstrings of length 3 to 40; see Figure 3. We find that model scale has a little effect on length generalization.
|
| 64 |
+
|
| 65 |
+
Variable Assignment: We finetuned the same models on the chain-like Variable Assignment Task, described in Section 2. We kept the in-distribution lengths at 3 to 8, and evaluated the test performance on lengths 3 to 19. The results can be seen in Figure 3. Just like in the parity task, while the indistribution performance is (near) perfect, out-of-distribution performance degrades rapidly as length increases. To get a sense of just how weak the out-of-distribution performance is, we also trained a $4 2 2 \mathrm { m }$ model on the same dataset, except we shuffled the operations before feeding it to the model. This removes the sequential dependency between the operations, and helps us establish a strong baseline that only predicts the answers based on non-sequential, spurious correlations. The accuracy-length curves for the baseline can be found in SM.
|
| 66 |
+
|
| 67 |
+

|
| 68 |
+
Figure 4: Scratchpad finetuning displays poor length generalization: Scratchpad finetuning displays qualitatively similar length generalization pathologies as vanilla finetuning. The $\mathbf { X }$ -axis represents problem length and the $\mathsf { y }$ -axis represents the accuracy attained at that problem length. The training lengths are highlighted in grey.
|
| 69 |
+
|
| 70 |
+
# 3.2 Transformers Prefer Parallel Strategies over Sequential Ones
|
| 71 |
+
|
| 72 |
+
The results presented in Section 3.1 establish that, when presented with sequential length generalization problems, transformers are biased toward learning non-sequential “shortcut” solutions that fail at longer problem instances. We ran additional experiments to gain a better understanding of the nature of this generalization pattern.
|
| 73 |
+
|
| 74 |
+
On parity, we ran finetuning on a different distribution of bit-strings: Instead of first randomly sampling the number of bits in the input bit-string, then sampling the values of the bits, we fixed the total number of bits in the input, and only varied the number of ones in the bit-string uniformly. We trained with 10 to 20 ones in the input distribution and tested on an interval containing 1 to 30 ones. This makes sure that the number of tokens (now fixed at 30) is now disambiguated from number of state changes, which for parity is equal to the number of ones. The difference between in and out-ofdistribution performance is even starker for this data distribution (Figure 5): while in-distribution performance was $100 \%$ , OOD performance was roughly equivalent to random prediction3. This suggests that the transformers are learning a non-sequential solution that involves counting the number of ones in the input, and then thresholding the output. This is not surprising, given that self-attention is an equivariant transformation capable of performing pooling operations like max-pooling [12]. This strategy doesn’t allow for knowledge transfer between problems of different lengths. Note that this bottom-up counting behaviour is complementary to the left-to-right counting behaviour displayed by recurrent models Suzgun et al. [13]. On the variable assignment dataset, we finetuned a $2 5 5 \mathrm { m }$ LaMDA model on the diverse split of the variable assignment dataset of programs up to 16 lines, and evaluated on the same data generating distribution up to 32 lines. We measured the evolution of the model’s accuracy with respect to training iterations on different program lengths (quantified by number of lines). The results are in SM.
|
| 75 |
+
|
| 76 |
+
We again observed that a different notion of length (which we call computational graph depth) captures the difficulty of problem instances better than number of program operations. A variable assignment program can be represented as a computational graph where each node corresponds to a variable, and each edge corresponds to an operation. Computational graph depth is the length of the longest dependency chain that connects to the queried variable node. This notion of length corresponds to the highly parallelizable strategy of executing programs by iteratively resolving computational graph dependencies. We present two results that suggest that computational graph depth is a more relevant notion of length for transformers. (1) Inspecting the order of problem instances in which the trained transformer correctly solves this task, we find that performance is strongest on examples with small computational graph depth, even if these examples are long in terms of number of operations. (2) The transformer does a good job of handling programs with an out-of-distribution number of operations, but for which computational graph depth is in-distribution.
|
| 77 |
+
|
| 78 |
+

|
| 79 |
+
Figure 5: (left) Complete lack of length generalization: Transformers trained on the parity task have difficulty generalizing to bit-strings that have a different number of 1s. (right) Sensitivity to hyperparameters: Trained networks sharing architecture, data and in-distribution loss can have very different length generalization performances. $l r$ stands “learning rate" and $b s$ stands for “batch size".
|
| 80 |
+
|
| 81 |
+
# 3.3 In-Distribution Generalization Doesn’t Predict OOD Generalization on Length Generalization Tasks
|
| 82 |
+
|
| 83 |
+
Prior work on out-of-distribution generalization establishes that in many tasks, in-distribution loss is a strong predictor of out-of-distribution generalization [14]. Our experiments on the parity task indicate that the distribution shift induced by changing problem lengths falls outside of the this category. Figure 5 shows how the same model trained on the same data achieving roughly the same in-distribution cross entropy loss behaves on OOD data, where the difference is solely induced by the choice of different hyperparameters.
|
| 84 |
+
|
| 85 |
+
# 4 Scratchpad Finetuning Still Fails at Length Generalization
|
| 86 |
+
|
| 87 |
+
It has been shown in prior work that it’s possible to get pretrained LLMs to solve a given task by not only outputting the answer, but also the solution steps behind it. Nye et al. [15] use scratchpad finetuning to achieve strong in-distribution performance on execution based tasks such as code execution and computing polynomials. While they also report modest length generalization results on integer arithmetic, we find that scratchpad finetuning suffers from similar length generalization pathologies than vanilla finetuning does. The results on parity and variable assignment tasks can be seen in Figure 4. The precise scratchpad strategies used for these tasks are described in detail in SM.
|
| 88 |
+
|
| 89 |
+
Error analysis: To understand the causes of failure in training scratchpad strategies, we focused on two architectural choices that could account for the poor performance: (1) how transformers encode position information, and (2) whether the transformers are trained to predict an end-of-sequence (EOS) token. LaMDA models use T5 position biases [16] to handle position information. If the network is only trained with short instances, position biases that handle longer positional distances might not be trained, explaining poor length generalization. Similarly, Newman et al. [17] report that networks trained with EOS token prediction often suffer from generalizing to longer problem instances, because of the models’ tendency to emit EOS tokens prematurely, as well as the EOS tokens’ effect on the representations that get learned.
|
| 90 |
+
|
| 91 |
+
We tested the extent to which these effects can explain lack of length generalization as follows. We padded both the input bit-strings and the scratchpad content with dummy padding tokens to make the token count the same. We also augmented the input and scratchpad targets with the same number of padding tokens on the left and right so that the relevant bit to attend to when executing the sequential scratchpad strategy corresponds to the same T5 position bias bin. Examples of the updated input-target pairs can be seen in SM. While this intervention helps, the trained models still display significant length generalization issues.
|
| 92 |
+
|
| 93 |
+
To gain further insight about the source of the problem, we plotted how the scratchpad target prediction error rates change as a function of (1) how far along one is in constructing the scratchpad, and (2) the length of the input bit-string. The results can be seen in Figure 6. The fact that the model makes mistakes in in-distribution scratchpad steps when the input has an OOD length implies that the attention mechanism isn’t capturing the relevant part of the input to form the scratchpad output. See SM for additional analysis.
|
| 94 |
+
|
| 95 |
+

|
| 96 |
+
Figure 6: (left) Effect of input length on per-step scratchpad accuracy: Points corresponds to the accuracy (y-axis) of the first $x$ scratchpad steps $\mathbf { \widetilde { x } }$ -axis) on parity instances of variable length (color). If the input length is out-of-distribution, even in-distribution scratchpad steps are inaccurate, implying the model hasn’t learned an attention pattern that generalizes to longer bit-strings. (right) Roughly constant per-step error rate: The per-step error rates of the LaMDA 128b model, few-shot finetuned on the coin-flip version of the parity task remain roughly constant across the scratchpad steps. This is in stark contrast with zero-shot scratchpad finetuned models, where the per-step error rates increase abruptly when the model is evaluated on OOD lengths.
|
| 97 |
+
|
| 98 |
+
# 5 Scratchpad Prompting Significantly Improves Length Generalization
|
| 99 |
+
|
| 100 |
+
Wei et al. [4], Nye et al. [15] and Lewkowycz et al. [5] showed that combining prompting (i.e. in-context learning) with scratchpad strategies present a powerful combination. They demonstrate that pretrained LLMs, without the help of any finetuning, can solve grade school math word problems and execute pieces of code with nontrivial correctness [15], when prompted with the right scratchpad strategy. We corroborate these findings, and report that scratchpad prompting endows pretrained LLMs with the capability of variable length template matching (see Figure 8). That is, in-context learning enables the model to “learn" solution steps from a small number of short instances, and apply the same template on significantly longer instances with a high degree of accuracy.
|
| 101 |
+
|
| 102 |
+
# 5.1 Few-shot scratchpad
|
| 103 |
+
|
| 104 |
+
Contrary to vanilla and scratchpad finetuning, we find that under the right conditions, few-shot scratchpad strategies sometimes significantly improves LLMs’ capability to extrapolate to lengths much further than what pretraining weights grant them.
|
| 105 |
+
|
| 106 |
+
To evaluate the performance of few-shot conditioning with scratchpad inputs without any finetuning, we phrase the parity problem in natural language as a coin flipping task. An example for the few-shot prompts we used can be seen in Figure 8. Wei et al. [4] also report results on the coin-flip task: the scratchpad format we used differs from theirs in that while ours respects the sequential nature of the task (i.e. each coin flip corresponds to a step in the scratchpad solution), Wei et al. [4]’s scratchpad strategy involves summing up the number of coin flips, then deciding on the final output based on the evenness/oddness of the sum. Also, while they only test up to 4 flips, we go up to 20 flips while still attaining highly nontrivial accuracy levels.
|
| 107 |
+
|
| 108 |
+
For the variable assignment task, our scratchpad strategy involves copying over the program that’s being executed, with comments added in between lines specifying the value of the variable that was assigned in the line above. Instances of this scratchpad strategy can be seen in SM.
|
| 109 |
+
|
| 110 |
+
Figure 7 shows the performance of the pretrained LaMDA 128b model on the coin-flip version of the parity task. Figure 8 shows an instance of how a length 3 prompt can induce the model to correctly output a 20 step scratchpad. We find that with the right scratchpad prompt, LLMs are able to generate correct scratchpad solutions. This reduces the problem to simply filling in the content of the generation correctly by inferring the right state transitions without having to figure out how to extrapolate the solution template.
|
| 111 |
+
|
| 112 |
+

|
| 113 |
+
Figure 7: Few-shot finetuning with scratchpad displays qualitatively different behaviour on parity and variable assignment tasks. On parity, where the non-finetuned model already performs very well, few-shotfinetuning with scratchpad leads to a significant performance boost over zero-shot finetuning with scratchpad. On variable assignment, where the base model doesn’t perform poorly, there’s not a significant gap between few-shot finetuning and zero-shot finetuning with scrathpad. The performance of OpenAI’s Codex model [18] on the variable assignment task is also provided.
|
| 114 |
+
|
| 115 |
+

|
| 116 |
+
Figure 8: Few-shot length generalization: The largest LaMDA model is able to map the scratchpad solution template from a few short exemplars onto much longer queries.
|
| 117 |
+
|
| 118 |
+
Few-Shot Finetuning with Scratchpad Strategies: Does combining finetuning, few-shot prompt ing, and scratchpad strategies improve length generalization?
|
| 119 |
+
|
| 120 |
+
We find that the answer is yes in the case of parity. As seen in Figure 7, few-shot finetuning performs significantly better than the baseline model, both on in- and out-of-distribution lengths. Note that the vanilla (i.e. no shot) finetuning baseline also outperforms the no-finetuning baseline, it actually does worse on the larger lengths — a pathology that doesn’t appear with few-shot finetuning.
|
| 121 |
+
|
| 122 |
+
The results point to a qualitatively different picture for the variable assignment task. Both few-shot finetuning and vanilla finetuning result in similar length generalization behavior (Figure 7). We hypothesize that this distinction is caused by the different pretrained performances that the model displays on these tasks: while length generalization is already strong with no finetuning on parity, that’s not the case for variable assignment. In the latter case, the model is forced to acquire a new skill via finetuning, which displays the same pathologies as zero-shot finetuning with scratchpad. As a sanity check, we evaluated the (few-shot) finetuned performance of the pretrained model on an alternative, synthetic prompt style that yields poor performance without any pretraining: As expected by the aforementioned hypothesis, we observed that the few-shot finetuned model on this task also shows significant length generalization pathologies. The results can be found in SM. We leave a more rigorous evaluation of this hypothesis as future work.
|
| 123 |
+
|
| 124 |
+
# 6 Related Works
|
| 125 |
+
|
| 126 |
+
There have been many attempts to study generalization from shorter/easier to longer/harder examples.
|
| 127 |
+
|
| 128 |
+
Challenges in length generalization: Several existing works have investigated pathologies that arise when models are asked to generalize to processing and generating longer (measured by number of tokens) sequences. Newman et al. [17] find that sequence models trained with and in the absence of the end-of-sequence token display qualitatively different length extrapolation behaviour and learn different representations. Dubois et al. [19] proposes modifications to the commonly used dot-product attention to improve the models’ ability to extrapolate to longer sequences. Murray and Chiang [20] demonstrate that neural machine translation models tend to have a bias towards generating shorterthan-desired translations. Yehudai et al. [21] show that length generalization issues are also present in training graph neural networks, where extrapolating across graph size presents a challenge. Ju et al. [22] propose a new attention mechanism to facilitate recurrent processing in transformer models. Press et al. [23] propose modifying transformer attention biases to facilitate generalization beyond the training context length. Concurrent work [24] propose a synthetic dataset named LEGO (Learning Equality and Group Operations), an instantiation of which resembles our variable assignment task where the only boolean operations allowed are assign and negate and assign, and overriding the values of variables is not allowed. Their analyses on OOD generalization largely complement ours: while we focus on decoder-only architectures and scratchpad strategies as a way of carrying over state, they focus on encoder-only architectures, and investigate the effect of weight-sharing.
|
| 129 |
+
|
| 130 |
+
Easy-to-Hard generalization: Schwarzschild et al. [25] and Bansal et al. [26] use weight-tied neural networks to generalize from easy to hard examples. Schwarzschild et al. [25] also provide three tasks to benchmark easy-to-hard generalization. Dehghani et al. [27] and Kaiser and Sutskever [28] assess the capabilities of their proposed architectures on easy-to-hard generalization problems.
|
| 131 |
+
|
| 132 |
+
Inductive Biases Related to Lenght Generalization: McCoy et al. [29] study the inductive bias of seq-to-seq learners on English question formation and English tense reinflection tasks and find that LSTM and GRU networks often display differing strategies, caused by the use of differing activation functions. Suzgun et al. [13] find that recurrent networks can perform dynamical counting, and encode hierarchical representations, which enables them to solve nontrivial Dyck tasks using $\mathbf { k }$ -counters. Kharitonov and Chaabouni [30] also study the inductive bias of different architectures, and conclude that transformer and LSTM architectural have a tendency to learn hierarchical strategies, whereas CNN based strategies display more linear structure. He et al. [31] propose a method to learn natural inference models that are not biased on spurious correlations. McCoy et al. [32] show that transformer models that display strong performance in natural language inference can have superficial biases that fool them in systematic ways and proposes a framework to think about these biases.
|
| 133 |
+
|
| 134 |
+
# 7 Conclusion
|
| 135 |
+
|
| 136 |
+
The ability to learn from shorter/easier problem instances to generalize to longer/harder ones is a key capability in a large number of tasks, especially ones requiring reasoning. We defined the concept of length generalization and measured language models’ length generalization capabilities. After conducting careful experiments using finetuning, scratchpads, and few-shot prompting, we reached the following conclusions: (1) Generalizing in length is a challenge for language models at least up to the 100B parameter scale. Both vanilla finetuning and finetuning with scratchpads suffer from a lack of length generalization caused by models’ tendency to pick up non-sequential pattern that don’t apply to longer problem instances. (2) Few-shot scratchpad prompting enables pretrained large language models to pick up scratchpad-templates that extrapolate to arbitrary lengths, leading to dramatic improvements on longer problem instances. Unlike raw finetuning, this approach does scale with model size [4]. (3) Trying to further enhance the performance of few-shot scratchpad prompted LLMs via finetuning yields mixed results, depending on the non-finetuned performance of the base model at the target task. We emphasize that the aforementioned few-shot variable length pattern matching capability — something that doesn’t require changing model architecture — offers a qualitatively different approach to handle length generalization in contrast to prior art that introduced architectural modifications to achieve the same goal. This capability is also significant in that it implies that for LLMs, there are certain skills, like length generalization, that can be learned better through in-context learning rather than through finetuning, even in the presence of infinite data.
|
| 137 |
+
|
| 138 |
+
References
|
| 139 |
+
[1] Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901, 2020.
|
| 140 |
+
[2] Yasaman Razeghi, Robert L Logan IV, Matt Gardner, and Sameer Singh. Impact of pretraining term frequencies on few-shot reasoning. arXiv preprint arXiv:2202.07206, 2022.
|
| 141 |
+
[3] Maxwell Nye, Anders Johan Andreassen, Guy Gur-Ari, Henryk Michalewski, Jacob Austin, David Bieber, David Dohan, Aitor Lewkowycz, Maarten Bosma, David Luan, et al. Show your work: Scratchpads for intermediate computation with language models. arXiv preprint arXiv:2112.00114, 2021.
|
| 142 |
+
[4] Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Ed Chi, Quoc Le, and Denny Zhou. Chain of thought prompting elicits reasoning in large language models, 2022. URL https://arxiv.org/abs/2201.11903.
|
| 143 |
+
[5] Aitor Lewkowycz, Anders Andreassen, David Dohan, Ethan Dyer, Henryk Michalewski, Vinay Ramasesh, Ambrose Slone, Cem Anil, Imanol Schlag, Theo Gutman-Solo, et al. Solving quantitative reasoning problems with language models. arXiv preprint arXiv:2206.14858, 2022.
|
| 144 |
+
[6] Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. Measuring mathematical problem solving with the math dataset. arXiv preprint arXiv:2103.03874, 2021.
|
| 145 |
+
[7] Haoyu Wang, Mo Yu, Xiaoxiao Guo, Rajarshi Das, Wenhan Xiong, and Tian Gao. Do multi-hop readers dream of reasoning chains? arXiv preprint arXiv:1910.14520, 2019.
|
| 146 |
+
[8] Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021.
|
| 147 |
+
[9] Peter Clark, Oyvind Tafjord, and Kyle Richardson. Transformers as soft reasoners over language. arXiv preprint arXiv:2002.05867, 2020.
|
| 148 |
+
[10] Yuhuai Wu, Albert Qiaochu Jiang, Jimmy Ba, and Roger Grosse. Int: An inequality benchmark for evaluating generalization in theorem proving. arXiv preprint arXiv:2007.02924, 2020.
|
| 149 |
+
[11] Noam Shazeer and Mitchell Stern. Adafactor: Adaptive learning rates with sublinear memory cost. In International Conference on Machine Learning, pages 4596–4604. PMLR, 2018.
|
| 150 |
+
[12] Juho Lee, Yoonho Lee, Jungtaek Kim, Adam Kosiorek, Seungjin Choi, and Yee Whye Teh. Set transformer: A framework for attention-based permutation-invariant neural networks. In International Conference on Machine Learning, pages 3744–3753. PMLR, 2019.
|
| 151 |
+
[13] Mirac Suzgun, Sebastian Gehrmann, Yonatan Belinkov, and Stuart M Shieber. Lstm networks can perform dynamic counting. arXiv preprint arXiv:1906.03648, 2019.
|
| 152 |
+
[14] Vaishnavh Nagarajan, Anders Andreassen, and Behnam Neyshabur. Understanding the failure modes of out-of-distribution generalization. arXiv preprint arXiv:2010.15775, 2020.
|
| 153 |
+
[15] Maxwell Nye, Anders Johan Andreassen, Guy Gur-Ari, Henryk Michalewski, Jacob Austin, David Bieber, David Dohan, Aitor Lewkowycz, Maarten Bosma, David Luan, et al. Show your work: Scratchpads for intermediate computation with language models. arXiv preprint arXiv:2112.00114, 2021.
|
| 154 |
+
[16] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv preprint arXiv:1910.10683, 2019.
|
| 155 |
+
[17] Benjamin Newman, John Hewitt, Percy Liang, and Christopher D Manning. The eos decision and length extrapolation. arXiv preprint arXiv:2010.07174, 2020.
|
| 156 |
+
[18] Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021.
|
| 157 |
+
[19] Yann Dubois, Gautier Dagan, Dieuwke Hupkes, and Elia Bruni. Location attention for extrapolation to longer sequences. arXiv preprint arXiv:1911.03872, 2019.
|
| 158 |
+
[20] Kenton Murray and David Chiang. Correcting length bias in neural machine translation. arXiv preprint arXiv:1808.10006, 2018.
|
| 159 |
+
[21] Gilad Yehudai, Ethan Fetaya, Eli Meirom, Gal Chechik, and Haggai Maron. From local structures to size generalization in graph neural networks. In International Conference on Machine Learning, pages 11975–11986. PMLR, 2021.
|
| 160 |
+
[22] Da Ju, Stephen Roller, Sainbayar Sukhbaatar, and Jason Weston. Staircase attention for recurrent processing of sequences. arXiv preprint arXiv:2106.04279, 2021.
|
| 161 |
+
[23] Ofir Press, Noah Smith, and Mike Lewis. Train short, test long: Attention with linear biases enables input length extrapolation. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id $\bar { }$ R8sQPpGCv0.
|
| 162 |
+
[24] Yi Zhang, Arturs Backurs, Sébastien Bubeck, Ronen Eldan, Suriya Gunasekar, and Tal Wagner. Unveiling transformers with lego: a synthetic reasoning task. arXiv preprint arXiv:2206.04301, 2022.
|
| 163 |
+
[25] Avi Schwarzschild, Eitan Borgnia, Arjun Gupta, Furong Huang, Uzi Vishkin, Micah Goldblum, and Tom Goldstein. Can you learn an algorithm? generalizing from easy to hard problems with recurrent networks. Advances in Neural Information Processing Systems, 34, 2021.
|
| 164 |
+
[26] Arpit Bansal, Avi Schwarzschild, Eitan Borgnia, Zeyad Emam, Furong Huang, Micah Goldblum, and Tom Goldstein. End-to-end algorithm synthesis with recurrent networks: Logical extrapolation without overthinking. arXiv preprint arXiv:2202.05826, 2022.
|
| 165 |
+
[27] Mostafa Dehghani, Stephan Gouws, Oriol Vinyals, Jakob Uszkoreit, and Łukasz Kaiser. Universal transformers. arXiv preprint arXiv:1807.03819, 2018.
|
| 166 |
+
[28] Łukasz Kaiser and Ilya Sutskever. Neural gpus learn algorithms. arXiv preprint arXiv:1511.08228, 2015.
|
| 167 |
+
[29] R Thomas McCoy, Robert Frank, and Tal Linzen. Does syntax need to grow on trees? sources of hierarchical inductive bias in sequence-to-sequence networks. Transactions of the Association for Computational Linguistics, 8:125–140, 2020.
|
| 168 |
+
[30] Eugene Kharitonov and Rahma Chaabouni. What they do when in doubt: a study of inductive biases in seq2seq learners. arXiv preprint arXiv:2006.14953, 2020.
|
| 169 |
+
[31] He He, Sheng Zha, and Haohan Wang. Unlearn dataset bias in natural language inference by fitting the residual. arXiv preprint arXiv:1908.10763, 2019.
|
| 170 |
+
[32] R Thomas McCoy, Ellie Pavlick, and Tal Linzen. Right for the wrong reasons: Diagnosing syntactic heuristics in natural language inference. arXiv preprint arXiv:1902.01007, 2019.
|
| 171 |
+
[33] Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. The journal of machine learning research, 15(1):1929–1958, 2014.
|
parse/dev/zSkYVeX7bC4/zSkYVeX7bC4_content_list.json
ADDED
|
@@ -0,0 +1,833 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "Exploring Length Generalization in Large Language Models ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
179,
|
| 8 |
+
122,
|
| 9 |
+
816,
|
| 10 |
+
146
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Cem Anil ∗1, 3, Yuhuai $\\mathbf { W } \\mathbf { u } ^ { 2 }$ , Anders Andreassen1, Aitor Lewkowycz1 Vedant Misra1, Vinay Ramasesh1, Ambrose Slone1, Guy Gur-Ari1, Ethan Dyer1, Behnam Neyshabur1 ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
256,
|
| 19 |
+
195,
|
| 20 |
+
738,
|
| 21 |
+
242
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "1 Google Research, Blueshift Team 2 Google Research 3 University of Toronto, Vector Institute ",
|
| 28 |
+
"bbox": [
|
| 29 |
+
369,
|
| 30 |
+
243,
|
| 31 |
+
630,
|
| 32 |
+
286
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "Abstract ",
|
| 39 |
+
"text_level": 1,
|
| 40 |
+
"bbox": [
|
| 41 |
+
462,
|
| 42 |
+
313,
|
| 43 |
+
535,
|
| 44 |
+
329
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "The ability to extrapolate from short problem instances to longer ones is an important form of out-of-distribution generalization in reasoning tasks, and is crucial when learning from datasets where longer problem instances are rare. These include theorem proving, solving quantitative mathematics problems, and reading/- summarizing novels. In this paper, we run careful empirical studies exploring the length generalization capabilities of transformer-based language models. We first establish that naively finetuning transformers on length generalization tasks shows significant generalization deficiencies independent of model scale. We then show that combining pretrained large language models’ in-context learning abilities with scratchpad prompting (asking the model to output solution steps before producing an answer) results in a dramatic improvement in length generalization. We run careful failure analyses on each of the learning modalities and identify common sources of mistakes that highlight opportunities in equipping language models with the ability to generalize to longer problems. ",
|
| 51 |
+
"bbox": [
|
| 52 |
+
233,
|
| 53 |
+
343,
|
| 54 |
+
766,
|
| 55 |
+
536
|
| 56 |
+
],
|
| 57 |
+
"page_idx": 0
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "1 Introduction ",
|
| 62 |
+
"text_level": 1,
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
555,
|
| 66 |
+
310,
|
| 67 |
+
573
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "Many natural problems, such as theorem proving and program synthesis, have a notion of length that strongly correlates with the difficulty of the task. However, in these domains, the number of available problems typically drops rapidly as a function of problem length (e.g. Figure 2). Hence, it is desirable to learn from examples of shorter lengths to generalize to longer ones or at least reduce the number of samples required for longer examples. We refer to this type of problem as length generalization. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
587,
|
| 77 |
+
825,
|
| 78 |
+
656
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "Recent work on large language models (LLMs) has shown consistent improvement in their performance by scaling model and dataset size. However, such models are still incapable of length generalization. For example, [1] shows that even though scale helps with solving arithmetic problems, scale alone is likely insufficient for learning to solve instances of arbitrary lengths. This implies that models fail to learn the general algorithms that would enable this kind of generalization. Indeed, Razeghi et al. [2] showed that the performance of LLMs on mathematical calculations correlates with term frequency in the training data. This suggests that LLMs might have gained their current performance from surface-level memorization instead of learning to apply the correct algorithm. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
661,
|
| 88 |
+
825,
|
| 89 |
+
773
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "A recent line of work proposes to use a scratchpad, or chain-of-thought reasoning, when prompting LLMs [3, 4, 5] on multi-step tasks. Breaking down tasks into multiple small steps and presenting these steps to the model leads to improved performance across a variety of reasoning tasks including word problems, arithmetic, and code execution. ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
779,
|
| 99 |
+
825,
|
| 100 |
+
834
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "We perform a systematic study of length generalization with transformer-based large language models. We consider problems in which learning an algorithm can in principle enable a model to extrapolate from short examples to problems of arbitrary length. In particular, we focus on two simple algorithmic tasks, parity and variable assignment, in which the model needs to keep track of a state in order to extrapolate to longer lengths (see Figure 1). These problems are illuminating because their simplicity allows us to probe the failure modes as well as contrast the learned solutions with the ground truth algorithm. They provide us with a setting to study how/when these large language models start to fail. ",
|
| 107 |
+
"bbox": [
|
| 108 |
+
174,
|
| 109 |
+
842,
|
| 110 |
+
823,
|
| 111 |
+
869
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 0
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "image",
|
| 117 |
+
"img_path": "images/28daa2131939cc297f4c5ca2606a07e7cb03e4ce2403875ba77120b0adcd546e.jpg",
|
| 118 |
+
"image_caption": [
|
| 119 |
+
"Figure 1: Examples of variable assignment problems: Can transformer language models learn from short instances of the Variable Assignment task (left) to extrapolate to much longer instances (right)? Length generalization is the ability to learn from shorter/easier instances of a problem to handle longer/harder instances. ",
|
| 120 |
+
"Table 1: Performance on length generalization tasks of three techniques that language models admit: (1) Finetuning, (2) Prompting (or in-context few-shot learning) and (3) Scratchpad (Chain-of-Thought reasoning). We find that each technique (and the combinations thereof) have different modes of failure and present different trade-offs regarding in and out-of-distribution coverage. $x$ signifies poor $\\checkmark$ signifies nontrivial, $\\checkmark$ signifies near-perfect performance. $( ^ { * } )$ Refers to task-dependency. "
|
| 121 |
+
],
|
| 122 |
+
"image_footnote": [],
|
| 123 |
+
"bbox": [
|
| 124 |
+
250,
|
| 125 |
+
89,
|
| 126 |
+
741,
|
| 127 |
+
257
|
| 128 |
+
],
|
| 129 |
+
"page_idx": 1
|
| 130 |
+
},
|
| 131 |
+
{
|
| 132 |
+
"type": "table",
|
| 133 |
+
"img_path": "images/389d27bc0318e52552f9dc6dfbeb9c676b94b25f5908603882b7a72fa80a7072.jpg",
|
| 134 |
+
"table_caption": [],
|
| 135 |
+
"table_footnote": [],
|
| 136 |
+
"table_body": "<table><tr><td>Techniques</td><td>In-distribution</td><td></td><td>Out-of-distributionImproves with scale</td></tr><tr><td>Fine-tune</td><td></td><td></td><td>xxxx/</td></tr><tr><td>Prompting</td><td></td><td></td><td></td></tr><tr><td>Fine-tune + Prompting</td><td></td><td></td><td></td></tr><tr><td>Fine-tune + Scratchpad</td><td></td><td>xxxx'</td><td></td></tr><tr><td>Prompting + Scratchpad</td><td></td><td></td><td></td></tr><tr><td>Fine-tune + Prompting + Scratchpad</td><td></td><td></td><td></td></tr></table>",
|
| 137 |
+
"bbox": [
|
| 138 |
+
173,
|
| 139 |
+
320,
|
| 140 |
+
823,
|
| 141 |
+
426
|
| 142 |
+
],
|
| 143 |
+
"page_idx": 1
|
| 144 |
+
},
|
| 145 |
+
{
|
| 146 |
+
"type": "text",
|
| 147 |
+
"text": "",
|
| 148 |
+
"bbox": [
|
| 149 |
+
174,
|
| 150 |
+
512,
|
| 151 |
+
825,
|
| 152 |
+
583
|
| 153 |
+
],
|
| 154 |
+
"page_idx": 1
|
| 155 |
+
},
|
| 156 |
+
{
|
| 157 |
+
"type": "text",
|
| 158 |
+
"text": "We study combinations of three kinds of techniques for LLMs: finetuning, few shot prompting (also referred to as in-context learning), and use of a scratchpad (also referred to as chain-of-thought), to understand the role of each method and the interplay among the three in length generalization. Interestingly, we observe non-trivial interactions among the three techniques; see Table 1. ",
|
| 159 |
+
"bbox": [
|
| 160 |
+
174,
|
| 161 |
+
588,
|
| 162 |
+
825,
|
| 163 |
+
643
|
| 164 |
+
],
|
| 165 |
+
"page_idx": 1
|
| 166 |
+
},
|
| 167 |
+
{
|
| 168 |
+
"type": "text",
|
| 169 |
+
"text": "Contributions Our main contributions are as follows: ",
|
| 170 |
+
"bbox": [
|
| 171 |
+
174,
|
| 172 |
+
650,
|
| 173 |
+
527,
|
| 174 |
+
664
|
| 175 |
+
],
|
| 176 |
+
"page_idx": 1
|
| 177 |
+
},
|
| 178 |
+
{
|
| 179 |
+
"type": "text",
|
| 180 |
+
"text": "• We define and characterize the problem of length generalization using notions such as state tracking, execution depth, and per-step error rate. We study and carefully design two tasks, parity and variable assignment, that measure length generalization (Section 2). • We find that in the finetuning regime, scaling data, model sizes, and compute does not improve length generalization (Section 3.1). We also observe that even when the model attains perfect in-distribution accuracy, it performs poorly in out-of-distribution domains. Surprisingly, different hyperparameter choices for finetuning have a large effect on length generalization performance, while having minimal effect on the final in-distribution performance (Section 3.3). • We establish finetuning with scratchpad also fails to generalize to longer problems, in contrast to what is suggested by previous works [3]. We look into three potential failure cases: positional encoding, the presence of distractors, and end of token prediction, and conclude that distractors are the main culprit of failures for length generalization (Section 4). We show that in the in-context learning regime, use of a scratchpad shows a qualitatively different behavior and significantly alleviates the decay of performance on longer problems. This capability is significant, as it implies that for LLMs, there are certain skills, like length generalization, that can be learned through in-context learning rather than through finetuning even in the presence of infinite data. This is in stark contrast to the common norms of machine learning (Section 5). ",
|
| 181 |
+
"bbox": [
|
| 182 |
+
179,
|
| 183 |
+
667,
|
| 184 |
+
826,
|
| 185 |
+
911
|
| 186 |
+
],
|
| 187 |
+
"page_idx": 1
|
| 188 |
+
},
|
| 189 |
+
{
|
| 190 |
+
"type": "image",
|
| 191 |
+
"img_path": "images/341f141d4eb2c4e980dd2e4d564dd0d857a30fc17592091e4b6b86ac60c6908b.jpg",
|
| 192 |
+
"image_caption": [
|
| 193 |
+
"Figure 2: Real world datasets have heavy tails in length: (left) Histogram of lengths for proofs presented in the Archive of Formal Proofs (right) Histogram of the number of tokens for solutions in the MATH dataset. [6] "
|
| 194 |
+
],
|
| 195 |
+
"image_footnote": [],
|
| 196 |
+
"bbox": [
|
| 197 |
+
233,
|
| 198 |
+
88,
|
| 199 |
+
763,
|
| 200 |
+
238
|
| 201 |
+
],
|
| 202 |
+
"page_idx": 2
|
| 203 |
+
},
|
| 204 |
+
{
|
| 205 |
+
"type": "text",
|
| 206 |
+
"text": "2 Length Generalization ",
|
| 207 |
+
"text_level": 1,
|
| 208 |
+
"bbox": [
|
| 209 |
+
174,
|
| 210 |
+
286,
|
| 211 |
+
393,
|
| 212 |
+
304
|
| 213 |
+
],
|
| 214 |
+
"page_idx": 2
|
| 215 |
+
},
|
| 216 |
+
{
|
| 217 |
+
"type": "text",
|
| 218 |
+
"text": "Many sequence tasks—especially ones that require reasoning capabilities—have problem instances that differ in terms of their lengths. Shorter instances are often easier to state, process, and handle, and require less compute to find the answer. By contrast, longer instances are more challenging to parse and require more compute to solve. Tasks that have a reasoning component are especially well represented in this category — multi-hop reasoning [7], program execution [8], deductive reasoning [9] and theorem proving [10], to name a few. Note that having to deal with differing problem lengths poses two significant challenges. First, it is often the case that one encounters longer problem instances than the ones ever encountered during training, and is required to extrapolate. Second, even though longer problem instances have much more variety, real-world datasets often contain few long instances (see Figure 2). Both of these challenges are exacerbated if learning agents are not able to generalize across and beyond the lengths they learn from during training. This paper is about investigating to what extent transformer based language models are able to observe short problem instances and extrapolate to longer ones. ",
|
| 219 |
+
"bbox": [
|
| 220 |
+
174,
|
| 221 |
+
318,
|
| 222 |
+
825,
|
| 223 |
+
497
|
| 224 |
+
],
|
| 225 |
+
"page_idx": 2
|
| 226 |
+
},
|
| 227 |
+
{
|
| 228 |
+
"type": "text",
|
| 229 |
+
"text": "Instance Length as Number of Steps in a Markov Process It is possible to define problem length in many different ways to capture different aspects of problem difficulty. Does there exist a notion of length that would expose the same length-generalization-related problem structure observed in qualitatively very different settings? Such a framing would enable researchers to design algorithms and interventions that have the potential to generalize across a broad range of tasks. To this end, we take the approach of characterizing length in the context of a deterministic Markov process. From this perspective, length is simply the number of state transitions experienced by an initial world state. In other words, the data-generation process can be described as sampling an (1) initial state and a (2) variable number of state transformations to be applied sequentially on the initial state. The agent is provided both the initial state and the transformations, and is asked to predict the final state. This framing applies to a wide range of sequence problems, if not all of them—ranging from more mechanical tasks such as code and algorithm execution and theorem proving, to less structured tasks, such as solving math problems and summarizing novels. ",
|
| 230 |
+
"bbox": [
|
| 231 |
+
174,
|
| 232 |
+
503,
|
| 233 |
+
825,
|
| 234 |
+
683
|
| 235 |
+
],
|
| 236 |
+
"page_idx": 2
|
| 237 |
+
},
|
| 238 |
+
{
|
| 239 |
+
"type": "text",
|
| 240 |
+
"text": "In our empirical investigation we focus on two synthetic tasks: parity and variable assignment. These tasks avoid problem-specific subtleties that could mislead our analyses, while strongly capturing the deterministic Markov process structure. ",
|
| 241 |
+
"bbox": [
|
| 242 |
+
176,
|
| 243 |
+
689,
|
| 244 |
+
821,
|
| 245 |
+
731
|
| 246 |
+
],
|
| 247 |
+
"page_idx": 2
|
| 248 |
+
},
|
| 249 |
+
{
|
| 250 |
+
"type": "text",
|
| 251 |
+
"text": "2.1 Tasks ",
|
| 252 |
+
"text_level": 1,
|
| 253 |
+
"bbox": [
|
| 254 |
+
174,
|
| 255 |
+
747,
|
| 256 |
+
251,
|
| 257 |
+
762
|
| 258 |
+
],
|
| 259 |
+
"page_idx": 2
|
| 260 |
+
},
|
| 261 |
+
{
|
| 262 |
+
"type": "text",
|
| 263 |
+
"text": "Parity: The parity task is an age-old learning problem that requires the trained agent to predict whether a bit-string has an even or odd number of ones in it. For example, the parity of the bitstring $[ 0 , 1 , 1 , 0 , 1 ]$ is “odd\" (or 1) as opposed to “even\" (or 0), because there is an odd number of 1s in the bit-string. The parity task admits a sequential solution that enables length generalization in a straightforward way: simply process the bits left-to-right and record the parity of the bits processed so far as the state. The default notion of length in the parity task is the number of bits in the input. However, we also experiment with a version where the number of bits is kept constant, and the number of 1s (i.e. the parity flipping bit) is systematically varied. The number of 1s stands for the number of state changes contained in the input bit-string, and actually appears to capture a more relevant notion of length for transformer models (see Section 3.1). ",
|
| 264 |
+
"bbox": [
|
| 265 |
+
174,
|
| 266 |
+
772,
|
| 267 |
+
825,
|
| 268 |
+
911
|
| 269 |
+
],
|
| 270 |
+
"page_idx": 2
|
| 271 |
+
},
|
| 272 |
+
{
|
| 273 |
+
"type": "image",
|
| 274 |
+
"img_path": "images/a00a76c9b7ed86ac918039a7be451907d3a6fd102c4ffc7274ceb559bef1d8d8.jpg",
|
| 275 |
+
"image_caption": [
|
| 276 |
+
"Figure 3: Finetuned Length Generalization performance doesn’t improve with scale: Models of vastly different scales fail at length generalization on both Parity and Variable Assignment tasks, displaying identical generalization pathologies. The $\\mathbf { X } ^ { \\prime }$ -axis represents problem length and the y-axis represents the accuracy attained at that problem length. The training lengths are highlighted in grey. "
|
| 277 |
+
],
|
| 278 |
+
"image_footnote": [],
|
| 279 |
+
"bbox": [
|
| 280 |
+
178,
|
| 281 |
+
92,
|
| 282 |
+
813,
|
| 283 |
+
262
|
| 284 |
+
],
|
| 285 |
+
"page_idx": 3
|
| 286 |
+
},
|
| 287 |
+
{
|
| 288 |
+
"type": "text",
|
| 289 |
+
"text": "Boolean Variable Assignment Task: The Boolean Variable Assignment task is designed to capture arbitrarily long, potentially branching unidirectional execution flows. An instance of this task can be seen in Figure 1. The inputs consist of semantically correct (i.e. bug-free) Python programs in which each line contains a boolean variable assignment operation. The output is simply the value of the variable presented in the final line of the program. The sequential solution to this task is to simply execute the program line by line while keeping track of the state of all variables. ",
|
| 290 |
+
"bbox": [
|
| 291 |
+
174,
|
| 292 |
+
328,
|
| 293 |
+
823,
|
| 294 |
+
411
|
| 295 |
+
],
|
| 296 |
+
"page_idx": 3
|
| 297 |
+
},
|
| 298 |
+
{
|
| 299 |
+
"type": "text",
|
| 300 |
+
"text": "The data generation procedure involves randomly generating execution flows that involve Boolean operations; see Supplementary Material (SM) for details. ",
|
| 301 |
+
"bbox": [
|
| 302 |
+
174,
|
| 303 |
+
417,
|
| 304 |
+
823,
|
| 305 |
+
445
|
| 306 |
+
],
|
| 307 |
+
"page_idx": 3
|
| 308 |
+
},
|
| 309 |
+
{
|
| 310 |
+
"type": "text",
|
| 311 |
+
"text": "We focus our evaluations on two variants of this dataset. (1) The diverse variable assignment split consists of a wide range of boolean operators available and is intended to contain maximally diverse programs. (2) The chain-like variable assignment split consists only of operations that compose the values of already defined variables. This results in long chains of dependencies between the initial values of the variables and the queried one, ensuring that there are almost no redundant operations in the program (i.e. operations that can be removed without affecting the output of the program). This split emphasizes the sequential nature of the variable assignment problem. ",
|
| 312 |
+
"bbox": [
|
| 313 |
+
174,
|
| 314 |
+
450,
|
| 315 |
+
825,
|
| 316 |
+
549
|
| 317 |
+
],
|
| 318 |
+
"page_idx": 3
|
| 319 |
+
},
|
| 320 |
+
{
|
| 321 |
+
"type": "text",
|
| 322 |
+
"text": "3 Standard Finetuning Fails at Length Generalization ",
|
| 323 |
+
"text_level": 1,
|
| 324 |
+
"bbox": [
|
| 325 |
+
174,
|
| 326 |
+
558,
|
| 327 |
+
638,
|
| 328 |
+
577
|
| 329 |
+
],
|
| 330 |
+
"page_idx": 3
|
| 331 |
+
},
|
| 332 |
+
{
|
| 333 |
+
"type": "text",
|
| 334 |
+
"text": "We begin by demonstrating that finetuning transformer models on length-generalization tasks results in poor out-of-distribution performance. In experiments we use LaMDA 2 decoder-only models. These checkpoints were trained using general natural language data. We use the AdaFactor optimizer [11] during finetuning, and tune the learning rate, batch size and dropout. We trained the networks until the in-distribution validation accuracy settles (20000 gradient steps for parity and 18000 gradient steps for variable assignment). The loss was only computed on the target tokens (i.e. the model wasn’t trained to model the input questions). ",
|
| 335 |
+
"bbox": [
|
| 336 |
+
174,
|
| 337 |
+
590,
|
| 338 |
+
825,
|
| 339 |
+
688
|
| 340 |
+
],
|
| 341 |
+
"page_idx": 3
|
| 342 |
+
},
|
| 343 |
+
{
|
| 344 |
+
"type": "text",
|
| 345 |
+
"text": "3.1 Scale Doesn’t Improve Length Generalization ",
|
| 346 |
+
"text_level": 1,
|
| 347 |
+
"bbox": [
|
| 348 |
+
174,
|
| 349 |
+
703,
|
| 350 |
+
531,
|
| 351 |
+
718
|
| 352 |
+
],
|
| 353 |
+
"page_idx": 3
|
| 354 |
+
},
|
| 355 |
+
{
|
| 356 |
+
"type": "text",
|
| 357 |
+
"text": "Parity: We finetuned four pretrained LaMDA models with $2 4 4 \\mathrm { m }$ , $4 2 2 \\mathrm { m }$ , 1b and 64b parameters on the parity task, where the training distribution included randomly sampled bitstrings of length 10 to 21. We then evaluated the performance on bitstrings of length 3 to 40; see Figure 3. We find that model scale has a little effect on length generalization. ",
|
| 358 |
+
"bbox": [
|
| 359 |
+
174,
|
| 360 |
+
728,
|
| 361 |
+
825,
|
| 362 |
+
785
|
| 363 |
+
],
|
| 364 |
+
"page_idx": 3
|
| 365 |
+
},
|
| 366 |
+
{
|
| 367 |
+
"type": "text",
|
| 368 |
+
"text": "Variable Assignment: We finetuned the same models on the chain-like Variable Assignment Task, described in Section 2. We kept the in-distribution lengths at 3 to 8, and evaluated the test performance on lengths 3 to 19. The results can be seen in Figure 3. Just like in the parity task, while the indistribution performance is (near) perfect, out-of-distribution performance degrades rapidly as length increases. To get a sense of just how weak the out-of-distribution performance is, we also trained a $4 2 2 \\mathrm { m }$ model on the same dataset, except we shuffled the operations before feeding it to the model. This removes the sequential dependency between the operations, and helps us establish a strong baseline that only predicts the answers based on non-sequential, spurious correlations. The accuracy-length curves for the baseline can be found in SM. ",
|
| 369 |
+
"bbox": [
|
| 370 |
+
174,
|
| 371 |
+
790,
|
| 372 |
+
825,
|
| 373 |
+
888
|
| 374 |
+
],
|
| 375 |
+
"page_idx": 3
|
| 376 |
+
},
|
| 377 |
+
{
|
| 378 |
+
"type": "image",
|
| 379 |
+
"img_path": "images/a6427a7a862407611aa2ed9be897b85a75bffdd9a641bb9e0039eb197af469ee.jpg",
|
| 380 |
+
"image_caption": [
|
| 381 |
+
"Figure 4: Scratchpad finetuning displays poor length generalization: Scratchpad finetuning displays qualitatively similar length generalization pathologies as vanilla finetuning. The $\\mathbf { X }$ -axis represents problem length and the $\\mathsf { y }$ -axis represents the accuracy attained at that problem length. The training lengths are highlighted in grey. "
|
| 382 |
+
],
|
| 383 |
+
"image_footnote": [],
|
| 384 |
+
"bbox": [
|
| 385 |
+
176,
|
| 386 |
+
92,
|
| 387 |
+
813,
|
| 388 |
+
262
|
| 389 |
+
],
|
| 390 |
+
"page_idx": 4
|
| 391 |
+
},
|
| 392 |
+
{
|
| 393 |
+
"type": "text",
|
| 394 |
+
"text": "",
|
| 395 |
+
"bbox": [
|
| 396 |
+
174,
|
| 397 |
+
325,
|
| 398 |
+
823,
|
| 399 |
+
353
|
| 400 |
+
],
|
| 401 |
+
"page_idx": 4
|
| 402 |
+
},
|
| 403 |
+
{
|
| 404 |
+
"type": "text",
|
| 405 |
+
"text": "3.2 Transformers Prefer Parallel Strategies over Sequential Ones ",
|
| 406 |
+
"text_level": 1,
|
| 407 |
+
"bbox": [
|
| 408 |
+
174,
|
| 409 |
+
368,
|
| 410 |
+
638,
|
| 411 |
+
383
|
| 412 |
+
],
|
| 413 |
+
"page_idx": 4
|
| 414 |
+
},
|
| 415 |
+
{
|
| 416 |
+
"type": "text",
|
| 417 |
+
"text": "The results presented in Section 3.1 establish that, when presented with sequential length generalization problems, transformers are biased toward learning non-sequential “shortcut” solutions that fail at longer problem instances. We ran additional experiments to gain a better understanding of the nature of this generalization pattern. ",
|
| 418 |
+
"bbox": [
|
| 419 |
+
174,
|
| 420 |
+
396,
|
| 421 |
+
825,
|
| 422 |
+
452
|
| 423 |
+
],
|
| 424 |
+
"page_idx": 4
|
| 425 |
+
},
|
| 426 |
+
{
|
| 427 |
+
"type": "text",
|
| 428 |
+
"text": "On parity, we ran finetuning on a different distribution of bit-strings: Instead of first randomly sampling the number of bits in the input bit-string, then sampling the values of the bits, we fixed the total number of bits in the input, and only varied the number of ones in the bit-string uniformly. We trained with 10 to 20 ones in the input distribution and tested on an interval containing 1 to 30 ones. This makes sure that the number of tokens (now fixed at 30) is now disambiguated from number of state changes, which for parity is equal to the number of ones. The difference between in and out-ofdistribution performance is even starker for this data distribution (Figure 5): while in-distribution performance was $100 \\%$ , OOD performance was roughly equivalent to random prediction3. This suggests that the transformers are learning a non-sequential solution that involves counting the number of ones in the input, and then thresholding the output. This is not surprising, given that self-attention is an equivariant transformation capable of performing pooling operations like max-pooling [12]. This strategy doesn’t allow for knowledge transfer between problems of different lengths. Note that this bottom-up counting behaviour is complementary to the left-to-right counting behaviour displayed by recurrent models Suzgun et al. [13]. On the variable assignment dataset, we finetuned a $2 5 5 \\mathrm { m }$ LaMDA model on the diverse split of the variable assignment dataset of programs up to 16 lines, and evaluated on the same data generating distribution up to 32 lines. We measured the evolution of the model’s accuracy with respect to training iterations on different program lengths (quantified by number of lines). The results are in SM. ",
|
| 429 |
+
"bbox": [
|
| 430 |
+
174,
|
| 431 |
+
458,
|
| 432 |
+
825,
|
| 433 |
+
707
|
| 434 |
+
],
|
| 435 |
+
"page_idx": 4
|
| 436 |
+
},
|
| 437 |
+
{
|
| 438 |
+
"type": "text",
|
| 439 |
+
"text": "We again observed that a different notion of length (which we call computational graph depth) captures the difficulty of problem instances better than number of program operations. A variable assignment program can be represented as a computational graph where each node corresponds to a variable, and each edge corresponds to an operation. Computational graph depth is the length of the longest dependency chain that connects to the queried variable node. This notion of length corresponds to the highly parallelizable strategy of executing programs by iteratively resolving computational graph dependencies. We present two results that suggest that computational graph depth is a more relevant notion of length for transformers. (1) Inspecting the order of problem instances in which the trained transformer correctly solves this task, we find that performance is strongest on examples with small computational graph depth, even if these examples are long in terms of number of operations. (2) The transformer does a good job of handling programs with an out-of-distribution number of operations, but for which computational graph depth is in-distribution. ",
|
| 440 |
+
"bbox": [
|
| 441 |
+
174,
|
| 442 |
+
713,
|
| 443 |
+
825,
|
| 444 |
+
852
|
| 445 |
+
],
|
| 446 |
+
"page_idx": 4
|
| 447 |
+
},
|
| 448 |
+
{
|
| 449 |
+
"type": "image",
|
| 450 |
+
"img_path": "images/9fcc406712f400af127fa3c74bdebd2d08b77a770dbc837be05d086127f84fb0.jpg",
|
| 451 |
+
"image_caption": [
|
| 452 |
+
"Figure 5: (left) Complete lack of length generalization: Transformers trained on the parity task have difficulty generalizing to bit-strings that have a different number of 1s. (right) Sensitivity to hyperparameters: Trained networks sharing architecture, data and in-distribution loss can have very different length generalization performances. $l r$ stands “learning rate\" and $b s$ stands for “batch size\". "
|
| 453 |
+
],
|
| 454 |
+
"image_footnote": [],
|
| 455 |
+
"bbox": [
|
| 456 |
+
178,
|
| 457 |
+
89,
|
| 458 |
+
818,
|
| 459 |
+
244
|
| 460 |
+
],
|
| 461 |
+
"page_idx": 5
|
| 462 |
+
},
|
| 463 |
+
{
|
| 464 |
+
"type": "text",
|
| 465 |
+
"text": "",
|
| 466 |
+
"bbox": [
|
| 467 |
+
174,
|
| 468 |
+
320,
|
| 469 |
+
823,
|
| 470 |
+
348
|
| 471 |
+
],
|
| 472 |
+
"page_idx": 5
|
| 473 |
+
},
|
| 474 |
+
{
|
| 475 |
+
"type": "text",
|
| 476 |
+
"text": "3.3 In-Distribution Generalization Doesn’t Predict OOD Generalization on Length Generalization Tasks ",
|
| 477 |
+
"text_level": 1,
|
| 478 |
+
"bbox": [
|
| 479 |
+
174,
|
| 480 |
+
364,
|
| 481 |
+
761,
|
| 482 |
+
393
|
| 483 |
+
],
|
| 484 |
+
"page_idx": 5
|
| 485 |
+
},
|
| 486 |
+
{
|
| 487 |
+
"type": "text",
|
| 488 |
+
"text": "Prior work on out-of-distribution generalization establishes that in many tasks, in-distribution loss is a strong predictor of out-of-distribution generalization [14]. Our experiments on the parity task indicate that the distribution shift induced by changing problem lengths falls outside of the this category. Figure 5 shows how the same model trained on the same data achieving roughly the same in-distribution cross entropy loss behaves on OOD data, where the difference is solely induced by the choice of different hyperparameters. ",
|
| 489 |
+
"bbox": [
|
| 490 |
+
174,
|
| 491 |
+
405,
|
| 492 |
+
825,
|
| 493 |
+
489
|
| 494 |
+
],
|
| 495 |
+
"page_idx": 5
|
| 496 |
+
},
|
| 497 |
+
{
|
| 498 |
+
"type": "text",
|
| 499 |
+
"text": "4 Scratchpad Finetuning Still Fails at Length Generalization ",
|
| 500 |
+
"text_level": 1,
|
| 501 |
+
"bbox": [
|
| 502 |
+
174,
|
| 503 |
+
500,
|
| 504 |
+
694,
|
| 505 |
+
517
|
| 506 |
+
],
|
| 507 |
+
"page_idx": 5
|
| 508 |
+
},
|
| 509 |
+
{
|
| 510 |
+
"type": "text",
|
| 511 |
+
"text": "It has been shown in prior work that it’s possible to get pretrained LLMs to solve a given task by not only outputting the answer, but also the solution steps behind it. Nye et al. [15] use scratchpad finetuning to achieve strong in-distribution performance on execution based tasks such as code execution and computing polynomials. While they also report modest length generalization results on integer arithmetic, we find that scratchpad finetuning suffers from similar length generalization pathologies than vanilla finetuning does. The results on parity and variable assignment tasks can be seen in Figure 4. The precise scratchpad strategies used for these tasks are described in detail in SM. ",
|
| 512 |
+
"bbox": [
|
| 513 |
+
174,
|
| 514 |
+
531,
|
| 515 |
+
825,
|
| 516 |
+
628
|
| 517 |
+
],
|
| 518 |
+
"page_idx": 5
|
| 519 |
+
},
|
| 520 |
+
{
|
| 521 |
+
"type": "text",
|
| 522 |
+
"text": "Error analysis: To understand the causes of failure in training scratchpad strategies, we focused on two architectural choices that could account for the poor performance: (1) how transformers encode position information, and (2) whether the transformers are trained to predict an end-of-sequence (EOS) token. LaMDA models use T5 position biases [16] to handle position information. If the network is only trained with short instances, position biases that handle longer positional distances might not be trained, explaining poor length generalization. Similarly, Newman et al. [17] report that networks trained with EOS token prediction often suffer from generalizing to longer problem instances, because of the models’ tendency to emit EOS tokens prematurely, as well as the EOS tokens’ effect on the representations that get learned. ",
|
| 523 |
+
"bbox": [
|
| 524 |
+
174,
|
| 525 |
+
635,
|
| 526 |
+
825,
|
| 527 |
+
760
|
| 528 |
+
],
|
| 529 |
+
"page_idx": 5
|
| 530 |
+
},
|
| 531 |
+
{
|
| 532 |
+
"type": "text",
|
| 533 |
+
"text": "We tested the extent to which these effects can explain lack of length generalization as follows. We padded both the input bit-strings and the scratchpad content with dummy padding tokens to make the token count the same. We also augmented the input and scratchpad targets with the same number of padding tokens on the left and right so that the relevant bit to attend to when executing the sequential scratchpad strategy corresponds to the same T5 position bias bin. Examples of the updated input-target pairs can be seen in SM. While this intervention helps, the trained models still display significant length generalization issues. ",
|
| 534 |
+
"bbox": [
|
| 535 |
+
174,
|
| 536 |
+
766,
|
| 537 |
+
825,
|
| 538 |
+
863
|
| 539 |
+
],
|
| 540 |
+
"page_idx": 5
|
| 541 |
+
},
|
| 542 |
+
{
|
| 543 |
+
"type": "text",
|
| 544 |
+
"text": "To gain further insight about the source of the problem, we plotted how the scratchpad target prediction error rates change as a function of (1) how far along one is in constructing the scratchpad, and (2) the length of the input bit-string. The results can be seen in Figure 6. The fact that the model makes mistakes in in-distribution scratchpad steps when the input has an OOD length implies that the attention mechanism isn’t capturing the relevant part of the input to form the scratchpad output. See SM for additional analysis. ",
|
| 545 |
+
"bbox": [
|
| 546 |
+
176,
|
| 547 |
+
869,
|
| 548 |
+
825,
|
| 549 |
+
911
|
| 550 |
+
],
|
| 551 |
+
"page_idx": 5
|
| 552 |
+
},
|
| 553 |
+
{
|
| 554 |
+
"type": "image",
|
| 555 |
+
"img_path": "images/6e63661cfa055e90e350e585395817ab7fcab3a41a4618fa3af03a9948034bd9.jpg",
|
| 556 |
+
"image_caption": [
|
| 557 |
+
"Figure 6: (left) Effect of input length on per-step scratchpad accuracy: Points corresponds to the accuracy (y-axis) of the first $x$ scratchpad steps $\\mathbf { \\widetilde { x } }$ -axis) on parity instances of variable length (color). If the input length is out-of-distribution, even in-distribution scratchpad steps are inaccurate, implying the model hasn’t learned an attention pattern that generalizes to longer bit-strings. (right) Roughly constant per-step error rate: The per-step error rates of the LaMDA 128b model, few-shot finetuned on the coin-flip version of the parity task remain roughly constant across the scratchpad steps. This is in stark contrast with zero-shot scratchpad finetuned models, where the per-step error rates increase abruptly when the model is evaluated on OOD lengths. "
|
| 558 |
+
],
|
| 559 |
+
"image_footnote": [],
|
| 560 |
+
"bbox": [
|
| 561 |
+
176,
|
| 562 |
+
90,
|
| 563 |
+
821,
|
| 564 |
+
284
|
| 565 |
+
],
|
| 566 |
+
"page_idx": 6
|
| 567 |
+
},
|
| 568 |
+
{
|
| 569 |
+
"type": "text",
|
| 570 |
+
"text": "",
|
| 571 |
+
"bbox": [
|
| 572 |
+
176,
|
| 573 |
+
406,
|
| 574 |
+
825,
|
| 575 |
+
449
|
| 576 |
+
],
|
| 577 |
+
"page_idx": 6
|
| 578 |
+
},
|
| 579 |
+
{
|
| 580 |
+
"type": "text",
|
| 581 |
+
"text": "5 Scratchpad Prompting Significantly Improves Length Generalization ",
|
| 582 |
+
"text_level": 1,
|
| 583 |
+
"bbox": [
|
| 584 |
+
173,
|
| 585 |
+
460,
|
| 586 |
+
781,
|
| 587 |
+
479
|
| 588 |
+
],
|
| 589 |
+
"page_idx": 6
|
| 590 |
+
},
|
| 591 |
+
{
|
| 592 |
+
"type": "text",
|
| 593 |
+
"text": "Wei et al. [4], Nye et al. [15] and Lewkowycz et al. [5] showed that combining prompting (i.e. in-context learning) with scratchpad strategies present a powerful combination. They demonstrate that pretrained LLMs, without the help of any finetuning, can solve grade school math word problems and execute pieces of code with nontrivial correctness [15], when prompted with the right scratchpad strategy. We corroborate these findings, and report that scratchpad prompting endows pretrained LLMs with the capability of variable length template matching (see Figure 8). That is, in-context learning enables the model to “learn\" solution steps from a small number of short instances, and apply the same template on significantly longer instances with a high degree of accuracy. ",
|
| 594 |
+
"bbox": [
|
| 595 |
+
173,
|
| 596 |
+
493,
|
| 597 |
+
825,
|
| 598 |
+
604
|
| 599 |
+
],
|
| 600 |
+
"page_idx": 6
|
| 601 |
+
},
|
| 602 |
+
{
|
| 603 |
+
"type": "text",
|
| 604 |
+
"text": "5.1 Few-shot scratchpad ",
|
| 605 |
+
"text_level": 1,
|
| 606 |
+
"bbox": [
|
| 607 |
+
174,
|
| 608 |
+
616,
|
| 609 |
+
356,
|
| 610 |
+
631
|
| 611 |
+
],
|
| 612 |
+
"page_idx": 6
|
| 613 |
+
},
|
| 614 |
+
{
|
| 615 |
+
"type": "text",
|
| 616 |
+
"text": "Contrary to vanilla and scratchpad finetuning, we find that under the right conditions, few-shot scratchpad strategies sometimes significantly improves LLMs’ capability to extrapolate to lengths much further than what pretraining weights grant them. ",
|
| 617 |
+
"bbox": [
|
| 618 |
+
176,
|
| 619 |
+
641,
|
| 620 |
+
825,
|
| 621 |
+
684
|
| 622 |
+
],
|
| 623 |
+
"page_idx": 6
|
| 624 |
+
},
|
| 625 |
+
{
|
| 626 |
+
"type": "text",
|
| 627 |
+
"text": "To evaluate the performance of few-shot conditioning with scratchpad inputs without any finetuning, we phrase the parity problem in natural language as a coin flipping task. An example for the few-shot prompts we used can be seen in Figure 8. Wei et al. [4] also report results on the coin-flip task: the scratchpad format we used differs from theirs in that while ours respects the sequential nature of the task (i.e. each coin flip corresponds to a step in the scratchpad solution), Wei et al. [4]’s scratchpad strategy involves summing up the number of coin flips, then deciding on the final output based on the evenness/oddness of the sum. Also, while they only test up to 4 flips, we go up to 20 flips while still attaining highly nontrivial accuracy levels. ",
|
| 628 |
+
"bbox": [
|
| 629 |
+
174,
|
| 630 |
+
690,
|
| 631 |
+
825,
|
| 632 |
+
801
|
| 633 |
+
],
|
| 634 |
+
"page_idx": 6
|
| 635 |
+
},
|
| 636 |
+
{
|
| 637 |
+
"type": "text",
|
| 638 |
+
"text": "For the variable assignment task, our scratchpad strategy involves copying over the program that’s being executed, with comments added in between lines specifying the value of the variable that was assigned in the line above. Instances of this scratchpad strategy can be seen in SM. ",
|
| 639 |
+
"bbox": [
|
| 640 |
+
176,
|
| 641 |
+
808,
|
| 642 |
+
825,
|
| 643 |
+
849
|
| 644 |
+
],
|
| 645 |
+
"page_idx": 6
|
| 646 |
+
},
|
| 647 |
+
{
|
| 648 |
+
"type": "text",
|
| 649 |
+
"text": "Figure 7 shows the performance of the pretrained LaMDA 128b model on the coin-flip version of the parity task. Figure 8 shows an instance of how a length 3 prompt can induce the model to correctly output a 20 step scratchpad. We find that with the right scratchpad prompt, LLMs are able to generate correct scratchpad solutions. This reduces the problem to simply filling in the content of the generation correctly by inferring the right state transitions without having to figure out how to extrapolate the solution template. ",
|
| 650 |
+
"bbox": [
|
| 651 |
+
174,
|
| 652 |
+
856,
|
| 653 |
+
825,
|
| 654 |
+
911
|
| 655 |
+
],
|
| 656 |
+
"page_idx": 6
|
| 657 |
+
},
|
| 658 |
+
{
|
| 659 |
+
"type": "image",
|
| 660 |
+
"img_path": "images/62ee08c172d1a29393ede332bc6b0b0ef421e8bf90420876aca112016272bd0f.jpg",
|
| 661 |
+
"image_caption": [
|
| 662 |
+
"Figure 7: Few-shot finetuning with scratchpad displays qualitatively different behaviour on parity and variable assignment tasks. On parity, where the non-finetuned model already performs very well, few-shotfinetuning with scratchpad leads to a significant performance boost over zero-shot finetuning with scratchpad. On variable assignment, where the base model doesn’t perform poorly, there’s not a significant gap between few-shot finetuning and zero-shot finetuning with scrathpad. The performance of OpenAI’s Codex model [18] on the variable assignment task is also provided. "
|
| 663 |
+
],
|
| 664 |
+
"image_footnote": [],
|
| 665 |
+
"bbox": [
|
| 666 |
+
186,
|
| 667 |
+
90,
|
| 668 |
+
812,
|
| 669 |
+
275
|
| 670 |
+
],
|
| 671 |
+
"page_idx": 7
|
| 672 |
+
},
|
| 673 |
+
{
|
| 674 |
+
"type": "image",
|
| 675 |
+
"img_path": "images/9ed0e6954ceb226e9507364402e122b470eb3395b0778bf394076ebe4539ff47.jpg",
|
| 676 |
+
"image_caption": [
|
| 677 |
+
"Figure 8: Few-shot length generalization: The largest LaMDA model is able to map the scratchpad solution template from a few short exemplars onto much longer queries. "
|
| 678 |
+
],
|
| 679 |
+
"image_footnote": [],
|
| 680 |
+
"bbox": [
|
| 681 |
+
251,
|
| 682 |
+
371,
|
| 683 |
+
740,
|
| 684 |
+
574
|
| 685 |
+
],
|
| 686 |
+
"page_idx": 7
|
| 687 |
+
},
|
| 688 |
+
{
|
| 689 |
+
"type": "text",
|
| 690 |
+
"text": "",
|
| 691 |
+
"bbox": [
|
| 692 |
+
174,
|
| 693 |
+
636,
|
| 694 |
+
821,
|
| 695 |
+
665
|
| 696 |
+
],
|
| 697 |
+
"page_idx": 7
|
| 698 |
+
},
|
| 699 |
+
{
|
| 700 |
+
"type": "text",
|
| 701 |
+
"text": "Few-Shot Finetuning with Scratchpad Strategies: Does combining finetuning, few-shot prompt ing, and scratchpad strategies improve length generalization? ",
|
| 702 |
+
"bbox": [
|
| 703 |
+
174,
|
| 704 |
+
670,
|
| 705 |
+
820,
|
| 706 |
+
699
|
| 707 |
+
],
|
| 708 |
+
"page_idx": 7
|
| 709 |
+
},
|
| 710 |
+
{
|
| 711 |
+
"type": "text",
|
| 712 |
+
"text": "We find that the answer is yes in the case of parity. As seen in Figure 7, few-shot finetuning performs significantly better than the baseline model, both on in- and out-of-distribution lengths. Note that the vanilla (i.e. no shot) finetuning baseline also outperforms the no-finetuning baseline, it actually does worse on the larger lengths — a pathology that doesn’t appear with few-shot finetuning. ",
|
| 713 |
+
"bbox": [
|
| 714 |
+
174,
|
| 715 |
+
705,
|
| 716 |
+
825,
|
| 717 |
+
761
|
| 718 |
+
],
|
| 719 |
+
"page_idx": 7
|
| 720 |
+
},
|
| 721 |
+
{
|
| 722 |
+
"type": "text",
|
| 723 |
+
"text": "The results point to a qualitatively different picture for the variable assignment task. Both few-shot finetuning and vanilla finetuning result in similar length generalization behavior (Figure 7). We hypothesize that this distinction is caused by the different pretrained performances that the model displays on these tasks: while length generalization is already strong with no finetuning on parity, that’s not the case for variable assignment. In the latter case, the model is forced to acquire a new skill via finetuning, which displays the same pathologies as zero-shot finetuning with scratchpad. As a sanity check, we evaluated the (few-shot) finetuned performance of the pretrained model on an alternative, synthetic prompt style that yields poor performance without any pretraining: As expected by the aforementioned hypothesis, we observed that the few-shot finetuned model on this task also shows significant length generalization pathologies. The results can be found in SM. We leave a more rigorous evaluation of this hypothesis as future work. ",
|
| 724 |
+
"bbox": [
|
| 725 |
+
174,
|
| 726 |
+
767,
|
| 727 |
+
825,
|
| 728 |
+
919
|
| 729 |
+
],
|
| 730 |
+
"page_idx": 7
|
| 731 |
+
},
|
| 732 |
+
{
|
| 733 |
+
"type": "text",
|
| 734 |
+
"text": "6 Related Works ",
|
| 735 |
+
"text_level": 1,
|
| 736 |
+
"bbox": [
|
| 737 |
+
174,
|
| 738 |
+
89,
|
| 739 |
+
330,
|
| 740 |
+
106
|
| 741 |
+
],
|
| 742 |
+
"page_idx": 8
|
| 743 |
+
},
|
| 744 |
+
{
|
| 745 |
+
"type": "text",
|
| 746 |
+
"text": "There have been many attempts to study generalization from shorter/easier to longer/harder examples. ",
|
| 747 |
+
"bbox": [
|
| 748 |
+
174,
|
| 749 |
+
126,
|
| 750 |
+
823,
|
| 751 |
+
140
|
| 752 |
+
],
|
| 753 |
+
"page_idx": 8
|
| 754 |
+
},
|
| 755 |
+
{
|
| 756 |
+
"type": "text",
|
| 757 |
+
"text": "Challenges in length generalization: Several existing works have investigated pathologies that arise when models are asked to generalize to processing and generating longer (measured by number of tokens) sequences. Newman et al. [17] find that sequence models trained with and in the absence of the end-of-sequence token display qualitatively different length extrapolation behaviour and learn different representations. Dubois et al. [19] proposes modifications to the commonly used dot-product attention to improve the models’ ability to extrapolate to longer sequences. Murray and Chiang [20] demonstrate that neural machine translation models tend to have a bias towards generating shorterthan-desired translations. Yehudai et al. [21] show that length generalization issues are also present in training graph neural networks, where extrapolating across graph size presents a challenge. Ju et al. [22] propose a new attention mechanism to facilitate recurrent processing in transformer models. Press et al. [23] propose modifying transformer attention biases to facilitate generalization beyond the training context length. Concurrent work [24] propose a synthetic dataset named LEGO (Learning Equality and Group Operations), an instantiation of which resembles our variable assignment task where the only boolean operations allowed are assign and negate and assign, and overriding the values of variables is not allowed. Their analyses on OOD generalization largely complement ours: while we focus on decoder-only architectures and scratchpad strategies as a way of carrying over state, they focus on encoder-only architectures, and investigate the effect of weight-sharing. ",
|
| 758 |
+
"bbox": [
|
| 759 |
+
174,
|
| 760 |
+
147,
|
| 761 |
+
826,
|
| 762 |
+
381
|
| 763 |
+
],
|
| 764 |
+
"page_idx": 8
|
| 765 |
+
},
|
| 766 |
+
{
|
| 767 |
+
"type": "text",
|
| 768 |
+
"text": "Easy-to-Hard generalization: Schwarzschild et al. [25] and Bansal et al. [26] use weight-tied neural networks to generalize from easy to hard examples. Schwarzschild et al. [25] also provide three tasks to benchmark easy-to-hard generalization. Dehghani et al. [27] and Kaiser and Sutskever [28] assess the capabilities of their proposed architectures on easy-to-hard generalization problems. ",
|
| 769 |
+
"bbox": [
|
| 770 |
+
174,
|
| 771 |
+
387,
|
| 772 |
+
825,
|
| 773 |
+
443
|
| 774 |
+
],
|
| 775 |
+
"page_idx": 8
|
| 776 |
+
},
|
| 777 |
+
{
|
| 778 |
+
"type": "text",
|
| 779 |
+
"text": "Inductive Biases Related to Lenght Generalization: McCoy et al. [29] study the inductive bias of seq-to-seq learners on English question formation and English tense reinflection tasks and find that LSTM and GRU networks often display differing strategies, caused by the use of differing activation functions. Suzgun et al. [13] find that recurrent networks can perform dynamical counting, and encode hierarchical representations, which enables them to solve nontrivial Dyck tasks using $\\mathbf { k }$ -counters. Kharitonov and Chaabouni [30] also study the inductive bias of different architectures, and conclude that transformer and LSTM architectural have a tendency to learn hierarchical strategies, whereas CNN based strategies display more linear structure. He et al. [31] propose a method to learn natural inference models that are not biased on spurious correlations. McCoy et al. [32] show that transformer models that display strong performance in natural language inference can have superficial biases that fool them in systematic ways and proposes a framework to think about these biases. ",
|
| 780 |
+
"bbox": [
|
| 781 |
+
174,
|
| 782 |
+
449,
|
| 783 |
+
825,
|
| 784 |
+
602
|
| 785 |
+
],
|
| 786 |
+
"page_idx": 8
|
| 787 |
+
},
|
| 788 |
+
{
|
| 789 |
+
"type": "text",
|
| 790 |
+
"text": "7 Conclusion ",
|
| 791 |
+
"text_level": 1,
|
| 792 |
+
"bbox": [
|
| 793 |
+
174,
|
| 794 |
+
626,
|
| 795 |
+
297,
|
| 796 |
+
642
|
| 797 |
+
],
|
| 798 |
+
"page_idx": 8
|
| 799 |
+
},
|
| 800 |
+
{
|
| 801 |
+
"type": "text",
|
| 802 |
+
"text": "The ability to learn from shorter/easier problem instances to generalize to longer/harder ones is a key capability in a large number of tasks, especially ones requiring reasoning. We defined the concept of length generalization and measured language models’ length generalization capabilities. After conducting careful experiments using finetuning, scratchpads, and few-shot prompting, we reached the following conclusions: (1) Generalizing in length is a challenge for language models at least up to the 100B parameter scale. Both vanilla finetuning and finetuning with scratchpads suffer from a lack of length generalization caused by models’ tendency to pick up non-sequential pattern that don’t apply to longer problem instances. (2) Few-shot scratchpad prompting enables pretrained large language models to pick up scratchpad-templates that extrapolate to arbitrary lengths, leading to dramatic improvements on longer problem instances. Unlike raw finetuning, this approach does scale with model size [4]. (3) Trying to further enhance the performance of few-shot scratchpad prompted LLMs via finetuning yields mixed results, depending on the non-finetuned performance of the base model at the target task. We emphasize that the aforementioned few-shot variable length pattern matching capability — something that doesn’t require changing model architecture — offers a qualitatively different approach to handle length generalization in contrast to prior art that introduced architectural modifications to achieve the same goal. This capability is also significant in that it implies that for LLMs, there are certain skills, like length generalization, that can be learned better through in-context learning rather than through finetuning, even in the presence of infinite data. ",
|
| 803 |
+
"bbox": [
|
| 804 |
+
174,
|
| 805 |
+
661,
|
| 806 |
+
825,
|
| 807 |
+
911
|
| 808 |
+
],
|
| 809 |
+
"page_idx": 8
|
| 810 |
+
},
|
| 811 |
+
{
|
| 812 |
+
"type": "text",
|
| 813 |
+
"text": "References \n[1] Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901, 2020. \n[2] Yasaman Razeghi, Robert L Logan IV, Matt Gardner, and Sameer Singh. Impact of pretraining term frequencies on few-shot reasoning. arXiv preprint arXiv:2202.07206, 2022. \n[3] Maxwell Nye, Anders Johan Andreassen, Guy Gur-Ari, Henryk Michalewski, Jacob Austin, David Bieber, David Dohan, Aitor Lewkowycz, Maarten Bosma, David Luan, et al. Show your work: Scratchpads for intermediate computation with language models. arXiv preprint arXiv:2112.00114, 2021. \n[4] Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Ed Chi, Quoc Le, and Denny Zhou. Chain of thought prompting elicits reasoning in large language models, 2022. URL https://arxiv.org/abs/2201.11903. \n[5] Aitor Lewkowycz, Anders Andreassen, David Dohan, Ethan Dyer, Henryk Michalewski, Vinay Ramasesh, Ambrose Slone, Cem Anil, Imanol Schlag, Theo Gutman-Solo, et al. Solving quantitative reasoning problems with language models. arXiv preprint arXiv:2206.14858, 2022. \n[6] Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. Measuring mathematical problem solving with the math dataset. arXiv preprint arXiv:2103.03874, 2021. \n[7] Haoyu Wang, Mo Yu, Xiaoxiao Guo, Rajarshi Das, Wenhan Xiong, and Tian Gao. Do multi-hop readers dream of reasoning chains? arXiv preprint arXiv:1910.14520, 2019. \n[8] Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021. \n[9] Peter Clark, Oyvind Tafjord, and Kyle Richardson. Transformers as soft reasoners over language. arXiv preprint arXiv:2002.05867, 2020. \n[10] Yuhuai Wu, Albert Qiaochu Jiang, Jimmy Ba, and Roger Grosse. Int: An inequality benchmark for evaluating generalization in theorem proving. arXiv preprint arXiv:2007.02924, 2020. \n[11] Noam Shazeer and Mitchell Stern. Adafactor: Adaptive learning rates with sublinear memory cost. In International Conference on Machine Learning, pages 4596–4604. PMLR, 2018. \n[12] Juho Lee, Yoonho Lee, Jungtaek Kim, Adam Kosiorek, Seungjin Choi, and Yee Whye Teh. Set transformer: A framework for attention-based permutation-invariant neural networks. In International Conference on Machine Learning, pages 3744–3753. PMLR, 2019. \n[13] Mirac Suzgun, Sebastian Gehrmann, Yonatan Belinkov, and Stuart M Shieber. Lstm networks can perform dynamic counting. arXiv preprint arXiv:1906.03648, 2019. \n[14] Vaishnavh Nagarajan, Anders Andreassen, and Behnam Neyshabur. Understanding the failure modes of out-of-distribution generalization. arXiv preprint arXiv:2010.15775, 2020. \n[15] Maxwell Nye, Anders Johan Andreassen, Guy Gur-Ari, Henryk Michalewski, Jacob Austin, David Bieber, David Dohan, Aitor Lewkowycz, Maarten Bosma, David Luan, et al. Show your work: Scratchpads for intermediate computation with language models. arXiv preprint arXiv:2112.00114, 2021. \n[16] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv preprint arXiv:1910.10683, 2019. \n[17] Benjamin Newman, John Hewitt, Percy Liang, and Christopher D Manning. The eos decision and length extrapolation. arXiv preprint arXiv:2010.07174, 2020. \n[18] Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021. \n[19] Yann Dubois, Gautier Dagan, Dieuwke Hupkes, and Elia Bruni. Location attention for extrapolation to longer sequences. arXiv preprint arXiv:1911.03872, 2019. \n[20] Kenton Murray and David Chiang. Correcting length bias in neural machine translation. arXiv preprint arXiv:1808.10006, 2018. \n[21] Gilad Yehudai, Ethan Fetaya, Eli Meirom, Gal Chechik, and Haggai Maron. From local structures to size generalization in graph neural networks. In International Conference on Machine Learning, pages 11975–11986. PMLR, 2021. \n[22] Da Ju, Stephen Roller, Sainbayar Sukhbaatar, and Jason Weston. Staircase attention for recurrent processing of sequences. arXiv preprint arXiv:2106.04279, 2021. \n[23] Ofir Press, Noah Smith, and Mike Lewis. Train short, test long: Attention with linear biases enables input length extrapolation. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id $\\bar { }$ R8sQPpGCv0. \n[24] Yi Zhang, Arturs Backurs, Sébastien Bubeck, Ronen Eldan, Suriya Gunasekar, and Tal Wagner. Unveiling transformers with lego: a synthetic reasoning task. arXiv preprint arXiv:2206.04301, 2022. \n[25] Avi Schwarzschild, Eitan Borgnia, Arjun Gupta, Furong Huang, Uzi Vishkin, Micah Goldblum, and Tom Goldstein. Can you learn an algorithm? generalizing from easy to hard problems with recurrent networks. Advances in Neural Information Processing Systems, 34, 2021. \n[26] Arpit Bansal, Avi Schwarzschild, Eitan Borgnia, Zeyad Emam, Furong Huang, Micah Goldblum, and Tom Goldstein. End-to-end algorithm synthesis with recurrent networks: Logical extrapolation without overthinking. arXiv preprint arXiv:2202.05826, 2022. \n[27] Mostafa Dehghani, Stephan Gouws, Oriol Vinyals, Jakob Uszkoreit, and Łukasz Kaiser. Universal transformers. arXiv preprint arXiv:1807.03819, 2018. \n[28] Łukasz Kaiser and Ilya Sutskever. Neural gpus learn algorithms. arXiv preprint arXiv:1511.08228, 2015. \n[29] R Thomas McCoy, Robert Frank, and Tal Linzen. Does syntax need to grow on trees? sources of hierarchical inductive bias in sequence-to-sequence networks. Transactions of the Association for Computational Linguistics, 8:125–140, 2020. \n[30] Eugene Kharitonov and Rahma Chaabouni. What they do when in doubt: a study of inductive biases in seq2seq learners. arXiv preprint arXiv:2006.14953, 2020. \n[31] He He, Sheng Zha, and Haohan Wang. Unlearn dataset bias in natural language inference by fitting the residual. arXiv preprint arXiv:1908.10763, 2019. \n[32] R Thomas McCoy, Ellie Pavlick, and Tal Linzen. Right for the wrong reasons: Diagnosing syntactic heuristics in natural language inference. arXiv preprint arXiv:1902.01007, 2019. \n[33] Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. The journal of machine learning research, 15(1):1929–1958, 2014. ",
|
| 814 |
+
"bbox": [
|
| 815 |
+
173,
|
| 816 |
+
78,
|
| 817 |
+
828,
|
| 818 |
+
917
|
| 819 |
+
],
|
| 820 |
+
"page_idx": 9
|
| 821 |
+
},
|
| 822 |
+
{
|
| 823 |
+
"type": "text",
|
| 824 |
+
"text": "",
|
| 825 |
+
"bbox": [
|
| 826 |
+
171,
|
| 827 |
+
90,
|
| 828 |
+
828,
|
| 829 |
+
796
|
| 830 |
+
],
|
| 831 |
+
"page_idx": 10
|
| 832 |
+
}
|
| 833 |
+
]
|
parse/dev/zSkYVeX7bC4/zSkYVeX7bC4_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/zSkYVeX7bC4/zSkYVeX7bC4_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|