ZHANGYUXUAN-zR commited on
Commit
6c9c360
·
verified ·
1 Parent(s): 64848d8

Add files using upload-large-folder tool

Browse files
parse/train/9DlCh34E1bN/9DlCh34E1bN.md ADDED
@@ -0,0 +1,296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # On the Expressivity of Markov Reward
2
+
3
+ David Abel DeepMind dmabel@deepmind.com
4
+
5
+ Will Dabney DeepMind wdabney@deepmind.com
6
+
7
+ Anna Harutyunyan DeepMind harutyunyan@deepmind.com
8
+
9
+ Mark K. Ho Department of Computer Science Princeton University mho@princeton.edu
10
+
11
+ Michael L. Littman Department of Computer Science Brown University mlittman@cs.brown.edu
12
+
13
+ Doina Precup DeepMind doinap@deepmind.com
14
+
15
+ Satinder Singh DeepMind baveja@deepmind.com
16
+
17
+ # Abstract
18
+
19
+ Reward is the driving force for reinforcement-learning agents. This paper is dedicated to understanding the expressivity of reward as a way to capture tasks that we would want an agent to perform. We frame this study around three new abstract notions of “task” that might be desirable: (1) a set of acceptable behaviors, (2) a partial ordering over behaviors, or (3) a partial ordering over trajectories. Our main results prove that while reward can express many of these tasks, there exist instances of each task type that no Markov reward function can capture. We then provide a set of polynomial-time algorithms that construct a Markov reward function that allows an agent to optimize tasks of each of these three types, and correctly determine when no such reward function exists. We conclude with an empirical study that corroborates and illustrates our theoretical findings.
20
+
21
+ # 1 Introduction
22
+
23
+ How are we to use algorithms for reinforcement learning (RL) to solve problems of relevance in the world? Reward plays a significant role as a general purpose signal: For any desired behavior, task, or other characteristic of agency, there must exist a reward signal that can incentivize an agent to learn to realize these desires. Indeed, the expressivity of reward is taken as a backdrop assumption that frames RL, sometimes called the reward hypothesis: “...all of what we mean by goals and purposes can be well thought of as maximization of the expected value of the cumulative sum of a received scalar signal (reward)” [53, 29, 6]. In this paper, we establish first steps toward a systematic study of the reward hypothesis by examining the expressivity of reward as a signal. We proceed in three steps.
24
+
25
+ 1. An Account of “Task”. As rewards encode tasks, goals, or desires, we first ask, “what is a task?”. We frame our study around a thought experiment (Figure 1) involving the interactions between a designer, Alice, and a learning agent, Bob, drawing inspiration from Ackley and Littman [2], Sorg [50], and Singh et al. [46]. In this thought experiment, we draw a distinction between how Alice thinks of a task (TASKQ) and the means by which Alice incentivizes Bob to pursue this task (EXPRESSIONQ). This distinction allows us to analyze the expressivity of reward as an answer to the latter question, conditioned on how we answer the former. Concretely, we study three answers to the TASKQ in the context of finite Markov Decision Processes (MDPs): A task is either (1) a set of acceptable behaviors (policies), (2) a partial ordering over behaviors, or (3) a partial ordering over trajectories. Further detail and motivation for these task types is provided in Section 3, but broadly they can be viewed as generalizations of typical notions of task such as a choice of goal or optimal behavior. Given these three answers to the TASKQ, we then examine the expressivity of reward.
26
+
27
+ ![](images/e8e8abd164d3f79d4a7a8a028af7674de12a1b7ef923da00922c85226e319ab2.jpg)
28
+ Figure 1: Alice, Bob, and the artifacts of task definition (blue) and task expression (purple).
29
+
30
+ 2. Expressivity of Markov Reward. The core of our study asks whether there are tasks Alice would like to convey—as captured by the answers to the TASKQ—that admit no characterization in terms of a Markov reward function. Our emphasis on Markov reward functions, as opposed to arbitrary history-based reward functions, is motivated by several factors. First, disciplines such as computer science, psychology, biology, and economics typically rely on a notion of reward as a numerical proxy for the immediate worth of states of affairs (such as the financial cost of buying a solar panel or the fitness benefits of a phenotype). Given an appropriate way to describe states of affairs, Markov reward functions can represent immediate worth in an intuitive manner that also allows for reasoning about combinations, sequences, or re-occurrences of such states of affairs. Second, it is not clear that general history-based rewards are a reasonable target for learning as they suffer from the curse of dimensionality in the length of the history. Lastly, Markov reward functions are the standard in RL. A rigorous analysis of which tasks they can and cannot convey may provide guidance into when it is necessary to draw on alternative formulations of a problem. Given our focus on Markov rewards, we treat a reward function as accurately expressing a task just when the value function it induces in an environment adheres to the constraints of a given task.
31
+
32
+ 3. Main Results. We find that, for all three task types, there are environment��task pairs for which there is no Markov reward function that realizes the task (Theorem 4.1). In light of this finding, we design polynomial-time algorithms that can determine, for any given task and environment, whether a reward function exists in the environment that captures the task (Theorem 4.3). When such a reward function does exist, the algorithms also return it. Finally, we conduct simple experiments with these procedures to provide empirical insight into the expressivity of reward (Section 5).
33
+
34
+ Collectively, our results demonstrate that there are tasks that cannot be expressed by Markov reward in a rigorous sense, but we can efficiently construct such reward functions when they do exist (and determine when they do not). We take these findings to shed light on the nature of reward maximization as a principle, and highlight many pathways for further investigation.
35
+
36
+ # 2 Background
37
+
38
+ RL defines the problem facing an agent that learns to improve its behavior over time by interacting with its environment. We make the typical assumption that the RL problem is well modeled by an agent interacting with a finite Markov Decision Process (MDP), defined by the tuple $( S , \mathcal { A } , R , T , \gamma , s _ { 0 } )$ . An MDP gives rise to deterministic behavioral policies, $\pi : { \mathcal { S } } A$ , and the value, $V ^ { \pi } : { \mathcal { S } } \mathbb { R }$ , and action–value, $Q ^ { \pi } : S \times \mathcal { A } \mathbb { R }$ , functions that measure their quality. We will refer to a Controlled Markov Process (CMP) as an MDP without a reward function, which we denote $E$ for environment. We assume that all reward functions are deterministic, and may be a function of either state, stateaction pairs, or state-action-state triples, but not history. Henceforth, we simply use “reward function” to refer to a deterministic Markov reward function for brevity, but note that more sophisticated settings beyond MDPs and deterministic Markov reward functions are important directions for future work. For more on MDPs or RL, see the books by Puterman [41] and Sutton and Barto [54] respectively.
39
+
40
+ # 2.1 Other Perspectives on Reward
41
+
42
+ We here briefly summarize relevant literature that provides distinct perspectives on reward.
43
+
44
+ Two Roles of Reward. As Sorg [50] identifies (Chapter 2), reward can both define the task the agent learns to solve, and define the “bread crumbs” that allow agents to efficiently learn to solve the task. This distinction has been raised elsewhere [2, 46, 47], and is similar to the extrinsic-intrinsic reward divide [45, 66]. Tools such as reward design [34, 51] or reward shaping [36] focus on offering more efficient learning in a variety of environments, so as to avoid issues of sparsity and long-term credit assignment. We concentrate primarily on reward’s capacity to express a task, and defer learning dynamics to an (important) stage of future work.
45
+
46
+ Discounts, Expectations, and Rationality. Another important facet of reward is how it is used in producing behavior. The classical view offered by the Bellman equation (and the reward hypothesis) is that the quantity of interest to maximize is expected, discounted, cumulative reward. Yet it is possible to disentangle reward from the expectation [5], to attend only to ordinal [60] or maximal rewards [26], or to adopt different forms of discounting [61, 11]. In this work, we take the standard view that agents will seek to maximize value for a particular discount factor $\gamma$ , but recognize that there are interesting directions beyond these commitments, such as inspecting the limits of reward in constrained MDPs as studied by Szepesvári [56]. We also note the particular importance of work by Pitis [40], who examines the relationship between classical decision theory [59] and MDPs by incorporating additional axioms that account for stochastic processes with discounting [24, 35, 48, 49]. Drawing inspiration from Pitis [40] and Sunehag and Hutter [52], we foresee valuable pathways for future work that further makes contact between RL and various axioms of rationality.
47
+
48
+ Preferences. In place of numerical rewards, preferences of different kinds may be used to evaluate an agent’s behaviors, drawing from the literature on preference-learning [25] and ordinal dynamic programming [8, 35, 48]. This premise gives rise to preference-based reinforcement learning (PbRL) in which an agent interacts with a CMP and receives evaluative signals in the form of preferences over states, actions, or trajectories. This kind of feedback inspires and closely parallels the task types we propose in this work. A comprehensive survey of PbRL by Wirth et al. [64] identifies critical differences in this setup from traditional RL, categorizes recent algorithmic approaches, and highlights important open questions. Recent work focuses on analysing the sample efficiency of such methods [65, 38] with close connections to learning from human feedback in real time [23, 32, 7].
49
+
50
+ Teaching and Inverse RL. The inverse RL (IRL) and apprenticeship learning literature examine the problem of learning directly from behavior [37, 1]. The classical problem of IRL is to identify which reward function (often up to an equivalence class) a given demonstrator is optimizing. We emphasize the relevance of two approaches: First, work by Syed et al. [55], who first illustrate the applicability of linear programming [22] to apprenticeship learning; and second, work by Amin et al. [4], who examine the repeated form of IRL. The methods of IRL have recently been expanded to include variations of cooperative IRL [14], and assistive learning [43], which offer different perspectives on how to frame interactive learning problems.
51
+
52
+ Reward Misspecification. Reward is also notoriously hard to specify. As pointed out by Littman et al. [30], “putting a meaningful dollar figure on scuffing a wall or dropping a clean fork is challenging.” Along these lines, Hadfield-Menell et al. [16] identify cases in which well-intentioned designers create reward functions that produce unintended behavior [39]. MacGlashan et al. [33] find that human-provided rewards tend to depend on a learning agent’s entire policy, rather than just the current state. Further, work by Hadfield-Menell et al. [15] and Kumar et al. [27] suggest that there are problems with reward as a learning mechanism due to misspecification and reward tampering [10]. These problems have given rise to approaches to reward learning, in which a reward function is inferred from some evidence such as behavior or comparisons thereof [20].
53
+
54
+ Other Notions of Task. As a final note, we highlight alternative approaches to task specification. Building on the Free Energy Principle [13, 12], Hafner et al. [17] consider a variety of task types in terms of minimization of distance to a desired target distribution [3]. Alternatively, Littman et al. [30] and Li et al. [28] propose variations of linear temporal logic (LTL) as a mechanism for specifying a task to RL agents, with related literature extending LTL to the multi-task [58] and multi-agent [18] settings, or using reward machines for capturing task structure [19]. Jothimurugan et al. [21] take a similar approach and propose a task specification language for RL based on logical formulas that evaluate whether trajectories satisfy the task, similar in spirit to the logical task compositions framework developed by Tasse et al. [57]. Many of these notions of task are more general than those we consider. A natural direction for future work broadens our analysis to include these kinds of task.
55
+
56
+ # 3 An Account of Reward’s Expressivity: The TASKQ and EXPRESSIONQ
57
+
58
+ Consider an onlooker, Alice, and an earnest learning agent, Bob, engaged in the interaction pictured in Figure 1. Suppose that Alice has a particular task in mind that she would like Bob to learn to solve, and that Alice constructs a reward function to incentivize Bob to pursue this task. Here, Alice is playing the role of “all of what we mean by goals and purposes” for Bob to pursue, with Bob playing the role of the standard reward-maximizing RL agent.
59
+
60
+ Two Questions About Task. To give us leverage to study the expressivity of reward, it is useful to draw a distinction between two stages of this process: 1) Alice thinks of a task that she would like Bob to learn to solve, and 2) Alice creates a reward function (and perhaps chooses $\gamma$ ) that conveys the chosen task to Bob. We inspect these two separately, framed by the following two questions. The first we call the task-definition question (TASKQ) which asks: What is a task? The second we call the task-expression question (EXPRESSIONQ) which asks: Which learning signal can be used as a mechanism for expressing any task to Bob?
61
+
62
+ Reward Answers The EXPRESSIONQ. We suggest that it may be useful to treat reward as an answer to the EXPRESSIONQ rather than the TASKQ. On this view, reward is treated as an expressive language for incentivizing reward-maximizing agents: Alice may attempt to translate any task into a reward function that incentivizes Bob to pursue the task, no matter which environment Bob inhabits, which task Alice has chosen, or how she has represented the task to herself. Indeed, it might be the case that Alice’s knowledge of the task far exceeds Bob’s representational or perceptual capacity. Alice may know every detail of the environment and define the task based on this holistic vantage, while Bob must learn to solve the task through interaction alone, relying only on a restricted class of functions for modeling and decision making.
63
+
64
+ Under this view, we can assess the expressivity of reward as an answer to the EXPRESSIONQ conditioned on how we answer the TASKQ. For example, if the TASKQ is answered in terms of natural language descriptions of desired states of affairs, then reward may fail to convey the chosen task due to the apparent mismatch in abstraction between natural language and reward (though some work has studied such a proposal [31, 62]).
65
+
66
+ # 3.1 Answers to the TASKQ: What is a Task?
67
+
68
+ In RL, tasks are often associated with a choice of goal, reward function $( R )$ , reward-discount pair $( R , \gamma )$ , or perhaps a choice of optimal policy (alongside those task types surveyed previously, such as LTL). However, it is unclear whether these constructs capture the entirety of what we mean by “task”.
69
+
70
+ For example, consider the Russell and Norvig [42] grid world: A $4 \times 3$ grid with one wall, one terminal fire state, and one terminal goal state (pictured with a particular reward function in Figure 4a). In such an environment, how might we think about tasks? A standard view is that the task is to reach the goal as quickly as possible. This account, however, fails to distinguish between the non-optimal behaviors, such as the costly behavior of the agent moving directly into the fire and the neutral behavior of the agent spending its existence in the start state. Indeed, characterizing a task in terms of choice of $\pi ^ { * }$ or goal fails to capture these distinctions. Our view is that a suitably rich account of task should allow for the characterization of this sort of preference, offering the flexibility to scale from specifying only the desirable behavior (or outcomes) to an arbitrary ordering over behaviors (or outcomes).
71
+
72
+ In light of these considerations, we propose three answers to the TASKQ that can convey general preferences over behavior or outcome: 1) A set of acceptable policies, 2) A partial ordering over policies, or 3) A partial ordering over trajectories. We adopt these three as they can capture many kinds of task while also allowing a great deal of flexibility in the level of detail of the specification.
73
+
74
+ <table><tr><td></td><td></td><td></td><td>NameNotation GeneralizesConstraints Induced by F</td></tr><tr><td>SOAPIIG</td><td></td><td>task-as-π*</td><td>equal: V&quot;g(so)= V&quot;g&#x27;(s0)&gt; Vπb(s0),∀πg,πg∈IIG,πb∈IIB range: Vπg (so) &gt; Vπb(so),∀πg∈llg,πb∈IIB</td></tr><tr><td>PO</td><td>LI</td><td>SOAP</td><td>(π1④π2)∈LI =→V1(so)④V″²(s0)</td></tr><tr><td>TO</td><td>LT,N</td><td></td><td>task-as-g0al (T1 ④ T2) ∈ LT,N =→ G(T1; So) ④ G(T2; S0)</td></tr></table>
75
+
76
+ Table 1: A summary of the three proposed task types. We further list the constraints that determine whether a reward function realizes each task type in an MDP, where we take $\oplus$ to be one of $\cdot _ { < } , \cdot >$ , or $" = "$ , and $G$ is the discounted return of the trajectory.
77
+
78
+ # 3.2 SOAPs, POs, and TOs
79
+
80
+ (SOAP) Set Of Acceptable Policies. A classical view of the equivalence of two reward functions is based on the optimal policies they induce. For instance, $\mathrm { N g }$ et al. [36] develop potential-based reward shaping by inspecting which shaped reward signals will ensure that the optimal policy is unchanged. Extrapolating, it is natural to say that for any environment $E$ , two reward functions are equivalent if the optimal policies they induce in $E$ are the same. In this way, a task is viewed as a choice of optimal policy. As discussed in the grid world example above, this notion of task fails to allow for the specification of the quality of other behaviors. For this reason, we generalize task-as-optimal-policy to a set of acceptable policies, defined as follows.
81
+
82
+ Definition 3.1. A set of acceptable policies $( S O A P )$ is a non-empty subset of the deterministic policies, $\Pi _ { G } \subseteq \Pi$ , with Π the set of all deterministic mappings from $s$ to $\mathcal { A }$ for a given $E$ .
83
+
84
+ With one task type defined, it is important to address what it means for a reward function to properly realize, express, or capture a task in a given environment. We offer the following account.
85
+
86
+ Definition 3.2. A reward function is said to realize a task $\mathcal { T }$ in an environment $E$ just when the start-state value (or return) induced by the reward function exactly adheres to the constraints of $\mathcal { T }$
87
+
88
+ Precise conditions for the realization of each task type are provided alongside each task definition, with a summary presented in column four of Table 1.
89
+
90
+ For SOAPs, we take the start-state value $V ^ { \pi } ( s _ { 0 } )$ to be the mechanism by which a reward function realizes a SOAP. That is, for a given $E$ and $\Pi _ { G }$ , a reward function $R$ is said to realize the $\Pi _ { G }$ in $E$ when the start-state value function is optimal for all good policies, and strictly higher than the start-state value of all other policies. It is clear that SOAP strictly generalizes a task in terms of a choice of optimal policy, as captured by the SOAP $\Pi _ { G } = \{ \pi ^ { * } \}$ .
91
+
92
+ We note that there are two natural ways for a reward function to realize a SOAP: First, each $\pi _ { g } \in \Pi _ { G }$ has optimal start-state value and all other policies are sub-optimal. We call this type equal-SOAP, or just SOAP for brevity. Alternatively, we might only require that the acceptable policies are each near-optimal, but are allowed to differ in start-state value so long as they are all better than every bad policy $\pi _ { b } \in \Pi _ { B }$ . That is, in this second kind, there exists an $\epsilon \geq 0$ such that every $\pi _ { g } \in \Pi _ { G }$ is $\epsilon$ -optimal in start-state value, $V ^ { \ast } ( s _ { 0 } ) - V ^ { \pi _ { g } } ( s _ { 0 } ) \leq \epsilon$ , while all other policies are worse. We call this second realization condition range-SOAP. We note that the range realization generalizes the equal one: Every equal-SOAP is a range-SOAP (by letting $\epsilon = 0$ ). However, there exist range-SOAPs that are expressible by Markov rewards that are not realizable as an equal-SOAP. We illustrate this fact with the following proposition. All proofs are presented in Appendix B.
93
+
94
+ Proposition 3.1. There exists a CMP, $E$ , and choice of $\Pi _ { G }$ such that $\Pi _ { G }$ can be realized under the range-SOAP criterion, but cannot be realized under the equal-SOAP criterion.
95
+
96
+ One such CMP is pictured Figure 2b. Consider the SOAP $\Pi _ { G } = \left\{ \pi _ { 1 1 } , \pi _ { 1 2 } , \pi _ { 2 1 } \right\}$ : Under the equalSOAP criterion, if each of these three policies are made optimal, any reward function will also make $\pi _ { 2 2 }$ (the only bad policy) optimal as well. In contrast, for the range criterion, we can choose a reward function that assigns lower rewards to $a _ { 2 }$ than $a _ { 1 }$ in both states. In general, we take the equal-SOAP realization as canonical, as it is naturally subsumed by our next task type.
97
+
98
+ (PO) Partial Ordering on Policies. Next, we suppose that Alice chooses a partial ordering on the deterministic policy space. That is, Alice might identify a some great policies, some good, and some bad policies to strictly avoid, and remain indifferent to the rest. POs strictly generalize equal SOAPs, as any such SOAP is a special choice of PO with only two equivalence classes. We offer the following definition of a PO.
99
+
100
+ Definition 3.3. A policy order $( P O )$ of the deterministic policies $\Pi$ is a partial order, denoted $L _ { \Pi }$
101
+
102
+ As with SOAPs, we take the start-state value $V ^ { \pi } ( s _ { 0 } )$ induced by a reward function $R$ as the mechanism by which policies are ordered. That is, given $E$ and $L _ { \Pi }$ , we say that a reward function $R$ realizes $L _ { \Pi }$ in $E$ if and only if the resulting MDP, $M = ( E , R )$ , produces a start-state value function that orders $\Pi$ according to $L _ { \Pi }$ .
103
+
104
+ (TO) Partial Ordering on Trajectories. A natural generalization of goal specification enriches a notion of task to include the details of how a goal is satisfied—that is, for Alice to relay some preference over trajectory space [63], as is done in preference based RL [64]. Concretely, we suppose Alice specifies a partial ordering on length $N$ trajectories of $( s , a )$ pairs, defined as follows.
105
+
106
+ Definition 3.4. A trajectory ordering $( T O )$ of length $N \in { \mathbb { N } }$ is a partial ordering $L _ { \tau , N }$ , with each trajectory $\tau$ consisting of $N$ state–action pairs, $\left\{ ( s _ { 0 } , a _ { 0 } ) , \ldots , ( a _ { N - 1 } , s _ { N - 1 } ) \right\}$ , with $s _ { 0 }$ the start state.
107
+
108
+ As with PO, we say that a reward function realizes a trajectory ordering $L _ { \tau , N }$ if the ordering determined by each trajectory’s cumulative discounted $N$ -step return from $s _ { 0 }$ , denoted $G ( \tau ; s _ { 0 } )$ , matches that of the given $L _ { \tau , N }$ . We note that trajectory orderings can generalize goal-based tasks at the expense of a larger specification. For instance, a TO can convey the task, “Safely reach the goal in less than thirty steps, or just get to the subgoal in less than twenty steps.”
109
+
110
+ Recap. We propose to assess the expressivity of reward by first answering the TASKQ in terms of SOAPs, POs, or TOs, as summarized by Table 1. We say that a task $\mathcal { T }$ is realized in an environment $E$ under reward function $R$ if the start-state value function (or return) produced by $R$ imposes the constraints specified by $\mathcal { T }$ , and are interested in whether reward can always realize a given task in any choice of $E$ . We make a number of assumptions along the way, including: (1) Reward functions are Markov and deterministic, (2) Policies of interest are deterministic, (3) The environment is a finite CMP, (4) $\gamma$ is part of the environment, (5) We ignore reward’s role in shaping the learning process, (6) Start-state value or return is the appropriate mechanism to determine if a reward function realizes a given task. Relaxation of these assumptions is a critical direction for future work.
111
+
112
+ # 4 Analysis: The Expressivity of Markov Reward
113
+
114
+ With our definitions and objectives in place, we now present our main results.
115
+
116
+ # 4.1 Express SOAPs, POs, and TOs
117
+
118
+ We first ask whether reward can always realize a given SOAP, PO, or TO, for an arbitrary $E$ . Our first result states that the answer is “no”—there are tasks that cannot be realized by any reward function.
119
+
120
+ Theorem 4.1. For each of SOAP, PO, and $T O$ , there exist $( E , \mathcal { T } )$ pairs for which no Markow reward function realizes $\mathcal { T }$ in $E$ .
121
+
122
+ Thus, reward is incapable of capturing certain tasks. What tasks are they, precisely? Intuitively, inexpressible tasks involve policies or trajectories that must be correlated in value in an MDP. That is, if two policies are nearly identical in behavior, it is unlikely that reward can capture the PO that places them at opposite ends of the ordering. A simple example is the “always move the same direction” task in a grid world, with state defined as an $( x , y )$ pair. The SOAP $\Pi _ { G } = \{ \pi _ { \left. } , \pi _ { \uparrow } , \pi _ { \right. } , \pi _ { \downarrow } \}$ conveys this task, but no Markov reward function can make these policies strictly higher in value than all others.
123
+
124
+ Example: Inexpressible SOAPs. Observe the two CMPs pictured in Figure 2, depicting two kinds of inexpressible SOAPs. On the left, we consider the SOAP $\bar { \Pi } _ { G } = \{ \pi _ { 2 1 } \}$ , containing only the policy that executes $a _ { 2 }$ in the left state $( s _ { 0 } )$ , and $a _ { 1 }$ in the right $( s _ { 1 } )$ . This SOAP is inexpressible through reward, but only because reward cannot distinguish the start-state value of $\pi _ { 2 1 }$ and $\pi _ { 2 2 }$ since the policies differ only in an unreachable state. This is reminiscent of Axiom 5 from Pitis [40], which explicitly excludes preferences of this sort. On the right, we find a more interesting case: The chosen SOAP is similar to the XOR function, $\Pi _ { G } = \{ \pi _ { 1 2 } , \pi _ { 2 1 } \}$ . Here, the task requires that the agent choose each action in exactly one state. However, there cannot exist a reward function that makes only these policies optimal, as by consequence, both policies $\pi _ { 1 1 }$ and $\pi _ { 2 2 }$ must be optimal as well.
125
+
126
+ ![](images/7e2521434653bc359042031494792030a541697f55fdd0726f183527d25b6f71.jpg)
127
+ Figure 2: Two CMPs in which there is a SOAP that is not expressible under any Markov reward function. On the left, $\Pi _ { G } = \{ \pi _ { 2 1 } \}$ is not realizable, as $\pi _ { 2 1 }$ can not be made better than $\pi _ { 2 2 }$ because $s _ { 1 }$ is never reached. On the right, the XOR-like-SOAP, $\Pi _ { G } = \{ \pi _ { 1 2 } , \pi _ { 2 1 } \}$ is not realizable: To make these two policies optimal, it is entailed that $\pi _ { 2 2 }$ and $\pi _ { 1 1 }$ must be optimal, too.
128
+
129
+ Next, we show that Theorem 4.1 is not limited to a particular choice of transition function or $\gamma$
130
+
131
+ Proposition 4.2. There exist choices of $E _ { \neg T } = ( S , A , \gamma , s _ { 0 } )$ or $E _ { \neg \gamma } = ( S , A , T , s _ { 0 } )$ , together with a task $\mathcal { T }$ , such that there is no $( T , R )$ pair that realizes $\mathcal { T }$ in $E _ { \neg T }$ or $( R , \gamma )$ in $E _ { \neg \gamma }$ .
132
+
133
+ This result suggests that the scope of Theorem 4.1 is actually quite broad—even if the transition function or $\gamma$ are taken as part of the reward specification, there are tasks that cannot be expressed. We suspect there are ways to give a precise characterization of all inexpressible tasks from an axiomatic perspective, which we hope to study in future work.
134
+
135
+ # 4.2 Constructive Algorithms: Task to Reward
136
+
137
+ We now analyze how to determine whether an appropriate reward function can be constructed for any $( E , \mathcal { T } )$ pair. We pose a general form of the reward-design problem [34, 51, 9] as follows.
138
+
139
+ Definition 4.1. The REWARDDESIGN problem is: Given $E = ( \mathcal { S } , \mathcal { A } , T , \gamma , s _ { 0 } )$ , and a $\mathcal { T }$ , output a reward function $R _ { a l i c e }$ that ensures $\mathcal { T }$ is realized in $M = \left( E , R _ { a l i c e } \right)$ .
140
+
141
+ Indeed, for all three task types, there is an efficient algorithm for solving the reward-design problem. Theorem 4.3. The REWARDDESIGN problem can be solved in polynomial time, for any finite $E$ , and any $\mathcal { T }$ , so long as reward functions with infinitely many outputs are considered.
142
+
143
+ Therefore, for any choice of finite CMP, $E$ , and a SOAP, PO, or TO, we can find a reward function that perfectly realizes the task in the given environment, if such a reward function exists. Each of the three algorithms are based on forming a linear program that matches the constraints of the given task type, which is why reward functions with infinitely many outputs are required. Pseudo-code for SOAP-based reward design is presented in Algorithm 1. Intuitively, the algorithms compute the discounted expected-state visitation distribution for a collection of policies; in the case of SOAP, for instance, these policies include $\Pi _ { G }$ and what we call the “fringe”, the set of policies that differ from a $\pi _ { g } \in \Pi _ { G }$ by exactly one action. Then, we use these distributions to describe linear inequality constraints ensuring that the start-state value of the good policies are better than those of the fringe.
144
+
145
+ As highlighted by Theorem 4.1 there are SOAPs, POs, and TOs that are not realizable. Thus, it is important to determine how the algorithms mentioned in Theorem 4.3 will handle such cases. Our next corollary illustrates that the desirable outcome is achieved: For any $E$ and $\mathcal { T }$ , the algorithms will output a reward function that realizes $\mathcal { T }$ in $E$ , or output $_ { \perp } ,$ when no such function exists.
146
+
147
+ Corollary 4.4. For any task $\mathcal { T }$ and environment $E$ , deciding whether $\mathcal { T }$ is expressible in $E$ is solvable in polynomial time.
148
+
149
+ Together, Theorem 4.1 and Theorem 4.3 constitute our main results: There are environment–task pairs in which Markov reward cannot express the chosen task for each of SOAPs, POs, and TOs. However, there are efficient algorithms for deciding whether a task is expressible, and for constructing the realizing reward function when it exists. We will study the use of one of these algorithms in Section 5, but first attend to other aspects of reward’s expressivity.
150
+
151
+ # Algorithm 1 SOAP Reward Design
152
+
153
+ INPUT: $E = ( { \mathcal { S } } , A , T , \gamma , s _ { 0 } ) , \Pi _ { G }$ .
154
+ OUTPUT: $R$ , or $\perp$ .
155
+ 1: Πfringe = compute_fringe $\left( \Pi _ { G } \right)$
156
+ 2: for $\bar { \pi } _ { g , i } \in \Pi _ { G }$ do . Compute state-visitation distributions. 3: $\rho _ { g , i } =$ compute_exp_visit $( \pi _ { g , i } , E )$
157
+ 4: for $\pi _ { f , i } \in \Pi _ { \mathrm { f r i n g e } }$ do
158
+ 5: $\rho _ { f , i } =$ compute_exp_visit $( \pi _ { f , i } , E )$
159
+ 6: $C _ { \mathrm { { e q } } } = \{ \}$ . Make Equality Constraints. 7: for $\pi _ { g , i } \in \Pi _ { G }$ do
160
+ 8: $C _ { \mathrm { e q . } } \mathsf { a d d } ( \rho _ { g , 0 } ( s _ { 0 } ) \cdot X = \rho _ { g , i } ( s _ { 0 } ) \cdot X )$
161
+ 9: $C _ { \mathrm { i n e q } } = \{ \}$ . Make Inequality Constraints. 10: for $\bar { \pi } _ { f , j } \in \Pi _ { \mathrm { f r i n g e } }$ do
162
+ 11: $\begin{array} { r } { \check { C } _ { \mathrm { i n e q . } } \mathsf { a d d } ( \check { \rho _ { f , j } } ( s _ { 0 } ) \cdot X + \epsilon \le \rho _ { g , 0 } ( s _ { 0 } ) \cdot X ) } \end{array}$
163
+ 12: $R _ { \mathrm { o u t } }$ , $\epsilon _ { \mathrm { o u t } } =$ linear_programming(obj. $= { \mathrm { m a x } } \epsilon$ , constraints $= C _ { \mathrm { i n e q } } , C _ { \mathrm { e q } } )$ . Solve LP. 13: if $\epsilon _ { \mathrm { o u t } } > 0$ then $\triangleright$ Check if successful. return $R _ { \mathrm { o u t } }$
164
+ 14: else
165
+ return ⊥
166
+
167
+ # 4.3 Other Aspects of Reward’s Expressivity
168
+
169
+ We next briefly summarize other considerations about the expressivity of reward. As noted, Theorem 4.3 requires the use of a reward function that can produce infinitely many outputs. Our next result proves this requirement is strict for efficient reward design.
170
+
171
+ Theorem 4.5. A variant of the REWARDDESIGN problem with finite reward outputs is NP-hard.
172
+
173
+ We provide further details about the precise problem studied in Appendix B. Beyond reward functions with finitely-many outputs, we are also interested in extensions of our results to multiple environments. We next present a positive result indicating our algorithms can extend to the case where Alice would like to design a reward function for a single task across multiple environments.
174
+
175
+ Proposition 4.6. For any SOAP, PO, or TO, given a finite set of CMPs, $\mathcal { E } = \{ E _ { 1 } , \ldots , E _ { n } \}$ , with shared state–action space, there exists a polynomial time algorithm that outputs one reward function that realizes the task (when possible) in all CMPs in $\mathcal { E }$ .
176
+
177
+ A natural follow up question to the above result asks whether task realization is closed under a set of CMPs. Our next result answers this question in the negative.
178
+
179
+ Theorem 4.7. Task realization is not closed under sets of CMPs with shared state-action space. That is, there exist choices of $\mathcal { T }$ and $\mathcal { E } = \{ E _ { 1 } , \ldots , E _ { n } \}$ such that $\mathcal { T }$ is realizable in each $E _ { i } \in \mathcal { E }$ independently, but there is not a single reward function that realizes $\mathcal { T }$ in all $E _ { i } \in \mathcal { E }$ simultaneously.
180
+
181
+ Intuitively, this shows that Alice must know precisely which environment Bob will inhabit if she is to design an appropriate reward function. Otherwise, her uncertainty over $E$ may prevent her from designing a realizing reward function. We foresee iterative extensions of our algorithms in which Alice and Bob can react to one another, drawing inspiration from repeated IRL by Amin et al. [4].
182
+
183
+ # 5 Experiments
184
+
185
+ We next conduct experiments to shed further light on the findings of our analysis. Our focus is on SOAPs, though we anticipate the insights extend to POs and TOs as well with little complication. In the first experiment, we study the fraction of SOAPs that are expressible in small CMPs as we vary aspects of the environment or task (Figure 3). In the second, we use one algorithm from Theorem 4.3 to design a reward function, and contrast learning curves under a SOAP-designed reward function compared to standard rewards. Full details about the experiments are found in Appendix C.
186
+
187
+ ![](images/5005b54dfa05ba36af75a15b9ecb041099a770578c98353866ee22a5d1d671a8.jpg)
188
+ Figure 3: The approximate fraction of SOAPs that are expressible by reward in CMPs with a handful of states and actions, with $9 5 \%$ confidence intervals. In each plot, we vary a different parameter of the environment or task to illustrate how this change impacts the expressivity of reward, showing both equal (color) and range (grey) realization of SOAP.
189
+
190
+ SOAP Expressivity. First, we estimate the fraction of SOAPs that are expressible in small environments. For each data point, we sample 200 random SOAPs and run Algorithm 1 described by Theorem 4.3 to determine whether each SOAP is realizable in the given CMP. We ask this question for both the equal (color) variant of SOAP realization and the range (grey) variant. We inspect SOAP expressivity as we vary six different characteristics of $E$ or $\Pi _ { G }$ : The number of actions, the number of states, the discount $\gamma$ , the number of good policies in each SOAP, the Shannon entropy of $T$ at each $( s , a )$ pair, and the “spread” of each SOAP. The spread approximates average edit distance among policies in $\Pi _ { G }$ determined by randomly permuting actions of a reference policy by a coin weighted according to the value on the $\mathbf { X }$ -axis. We use the same set of CMPs for each environment up to any deviations explicitly made by the varied parameter (such as $\gamma$ or entropy). Unless otherwise stated, each CMP has four states and three actions, with a fixed but randomly chosen transition function.
191
+
192
+ Results are presented in Figure 3. We find that our theory is borne out in a number of ways. First, as Theorem 4.1 suggests, we find SOAP expressivity is strictly less than one in nearly all cases. This is evidence that inexpressible tasks are not only found in manufactured corner cases, but rather that expressivity is a spectrum. We further observe—as predicted by Proposition 3.1—clear separation between the expressivity of range-SOAP (grey) vs. equal-SOAP (color); there are many cases where we can find a reward function that makes the good policies near optimal and better than the bad, but cannot make those good policies all exactly optimal. Additionally, several trends emerge as we vary the parameter of environment or task, though we note that such trends are likely specific to the choice of CMP and may not hold in general. Perhaps the most striking trend is in Figure 3f, which shows a decrease in expressivity as the SOAPs become more spread out. This is quite sensible: A more spread out SOAP is likely to lead to more entailments of the kind discussed in Figure 2b.
193
+
194
+ Learning with SOAP-designed Rewards. Next, we contrast the learning performance of Qlearning under a SOAP-designed reward function (visualized in Figure 4a) with that of the regular goal-based reward in the Russell and Norvig [42] grid world. In this domain, there is 0.35 slip probability such that, on a ‘slip’ event, the agent randomly applies one of the two orthogonal action effects. The regular goal-based reward function provides $+ 1$ when the agent enters the terminal flag cell, and $- 1$ when the agent enters the terminal fire cell. The bottom left state is the start-state, and the black cell is an impassable wall.
195
+
196
+ ![](images/5d021953e8f8f26210e83664393ef931c7293318456b15ff88a24ede527d7e3a.jpg)
197
+ Figure 4: A SOAP-designed reward function (left) and the resulting learning curves (right) for Qlearning compared to the traditional reward function for the Russell and Norvig [42] grid world. Each series presents average performance over 50 runs of the experiment with $9 5 \%$ confidence intervals.
198
+
199
+ Results are presented in Figure 4. On the right, we present a particular kind of learning curve contrasting the performance of Q-learning with the SOAP reward (blue) and regular reward (green). The y-axis measures, at the end of each episode, the average (inverse) minimum edit distance between Q-learning’s greedy policy and any policy in the SOAP. Thus, when the series reaches 1.0, Q-learning’s greedy policy is identical to one of the two SOAP policies. We first find that Q-learning is able to quickly learn a $\pi _ { g } \in \Pi _ { G }$ under the designed reward function. We further observe that the typical reward does not induce a perfect match in policy—at convergence, the green curve hovers slightly below the blue, indicating that the default reward function is incentivizing different policies to be optimal. This is entirely sensible, as the two SOAP policies are extremely cautious around the fire; they choose the orthogonal (and thus, safe) action in fire-adjacent states, relying on slip probability to progress. Lastly, as expected given the amount of knowledge contained in the SOAP, the SOAP reward function allows Q-learning to rapidly identify a good policy compared to the typical reward.
200
+
201
+ # 6 Conclusion
202
+
203
+ We have here investigated the expressivity of Markov reward, framed around three new accounts of task. Our main results show that there exist choices of task and environment in which Markov reward cannot express the chosen task, but there are efficient algorithms that decide whether a task is expressible and construct a reward function that captures the task when such a function exists. We conclude with an empirical examination of our analysis, corroborating the findings of our theory. We take these to be first steps toward understanding the full scope of the reward hypothesis.
204
+
205
+ There are many routes forward. A key direction moves beyond the task types we study here, and relaxes our core assumptions—the environment might not be a finite CMP, Alice may not know the environment precisely, reward may be a function of history, or Alice may not know how Bob represents state. Along similar lines, a critical direction incorporates how reward impacts Bob’s learning dynamics rather than start-state value. Further, we note the potential relevance to the recent reward-is-enough hypothesis proposed by Silver et al. [44]; we foresee pathways to extend our analysis to examine this newer hypothesis, too. For instance, in future work, it is important to assess whether reward is capable of inducing the right kinds of attributes of cognition, not just behavior.
206
+
207
+ # Acknowledgments and Disclosure of Funding
208
+
209
+ The authors would like to thank André Barreto, Diana Borsa, Michael Bowling, Wilka Carvalho, Brian Christian, Jess Hamrick, Steven Hansen, Zac Kenton, Ramana Kumar, Katrina McKinney, Rémi Munos, Matt Overlan, Hado van Hasselt, and Ben Van Roy for helpful discussions. We would also like to thank the anonymous reviewers for their thoughtful feedback, and Brendan O’Donoghue for catching a typo in the appendix. Michael Littman was supported in part by funding from DARPA L2M, ONR MURI, NSF FMitF, and NSF RI.
210
+
211
+ References
212
+ [1] Pieter Abbeel and Andrew Y. Ng. Apprenticeship learning via inverse reinforcement learning. In Proceedings of the International Conference on Machine learning, 2004.
213
+ [2] David Ackley and Michael L. Littman. Interactions between learning and evolution. Artificial Life II, 1992.
214
+ [3] Sundararaman Akshay, Nathalie Bertrand, Serge Haddad, and Loic Helouet. The steady-state control problem for Markov decision processes. In Proceedings of the International Conference on Quantitative Evaluation of Systems, 2013.
215
+ [4] Kareem Amin, Nan Jiang, and Satinder Singh. Repeated inverse reinforcement learning. In Advances in Neural Information Processing Systems, 2017.
216
+ [5] Marc G. Bellemare, Will Dabney, and Rémi Munos. A distributional perspective on reinforcement learning. In Proceedings of the International Conference on Machine Learning, 2017.
217
+ [6] Brian Christian. The Alignment Problem: Machine Learning and Human Values, pages 130–131. Atlantic Books, 2021.
218
+ [7] Paul F. Christiano, Jan Leike, Tom B. Brown, Miljan Martic, Shane Legg, and Dario Amodei. Deep reinforcement learning from human preferences. In Advances in Neural Information Processing Systems, 2017.
219
+ [8] Gerard Debreu. Representation of a preference ordering by a numerical function. Decision Processes, 3:159–165, 1954.
220
+ [9] Daniel Dewey. Reinforcement learning and the reward engineering principle. In Proceedings of the AAAI Spring Symposium Series, 2014.
221
+ [10] Tom Everitt, Victoria Krakovna, Laurent Orseau, Marcus Hutter, and Shane Legg. Reinforcement learning with a corrupted reward channel. In Proceedings of the International Joint Conference on Artificial Intelligence, 2017.
222
+ [11] William Fedus, Carles Gelada, Yoshua Bengio, Marc G. Bellemare, and Hugo Larochelle. Hyperbolic discounting and learning over multiple horizons. arXiv preprint arXiv:1902.06865, 2019.
223
+ [12] Karl J. Friston. The free-energy principle: a unified brain theory? Nature reviews neuroscience, 11(2):127–138, 2010.
224
+ [13] Karl J. Friston, Jean Daunizeau, and Stefan J. Kiebel. Reinforcement learning or active inference? PloS One, 4(7):e6421, 2009.
225
+ [14] Dylan Hadfield-Menell, Anca Dragan, Pieter Abbeel, and Stuart Russell. Cooperative inverse reinforcement learning. In Advances in Neural Information Processing Systems, 2016.
226
+ [15] Dylan Hadfield-Menell, Anca Dragan, Pieter Abbeel, and Stuart Russell. The off-switch game. In Proceedings of the International Joint Conference on Artificial Intelligence, 2017.
227
+ [16] Dylan Hadfield-Menell, Smitha Milli, Pieter Abbeel, Stuart Russell, and Anca Dragan. Inverse reward design. In Advances in Neural Information Processing Systems, 2017.
228
+ [17] Danijar Hafner, Pedro A. Ortega, Jimmy Ba, Thomas Parr, Karl J. Friston, and Nicolas Heess. Action and perception as divergence minimization. arXiv preprint arXiv:2009.01791, 2020.
229
+ [18] Lewis Hammond, Alessandro Abate, Julian Gutierrez, and Michael Wooldridge. Multi-agent reinforcement learning with temporal logic specifications. In Proceedings of the International Conference on Autonomous Agents and Multiagent Systems, 2021.
230
+ [19] Rodrigo Toro Icarte, Toryn Klassen, Richard Valenzano, and Sheila McIlraith. Using reward machines for high-level task specification and decomposition in reinforcement learning. In Proceedings of the International Conference on Machine Learning, 2018.
231
+
232
+ [20] Hong Jun Jeon, Smitha Milli, and Anca Dragan. Reward-rational (implicit) choice: A unifying formalism for reward learning. In Advances in Neural Information Processing Systems, 2020.
233
+
234
+ [21] Kishor Jothimurugan, Rajeev Alur, and Osbert Bastani. A composable specification language for reinforcement learning tasks. In Advances in Neural Information Processing Systems, 2020.
235
+
236
+ [22] Narendra Karmarkar. A new polynomial-time algorithm for linear programming. In Proceedings of the Annual ACM Symposium on Theory of Computing, 1984.
237
+
238
+ [23] W. Bradley Knox and Peter Stone. Interactively shaping agents via human reinforcement: The TAMER framework. In Proceedings of the International Conference on Knowledge Capture, 2009.
239
+
240
+ [24] Tjalling C. Koopmans. Stationary ordinal utility and impatience. Econometrica: Journal of the Econometric Society, pages 287–309, 1960.
241
+
242
+ [25] David Kreps. Notes on the Theory of Choice. Westview Press, 1988.
243
+
244
+ [26] Sai Krishna Gottipati, Yashaswi Pathak, Rohan Nuttall, Raviteja Chunduru, Ahmed Touati, Sriram Ganapathi Subramanian, Matthew E. Taylor, and Sarath Chandar. Maximum reward formulation in reinforcement learning. In NeurIPS Workshop on Deep Reinforcement Learning, 2020.
245
+
246
+ [27] Ramana Kumar, Jonathan Uesato, Richard Ngo, Tom Everitt, Victoria Krakovna, and Shane Legg. REALab: An embedded perspective on tampering. arXiv preprint arXiv:2011.08820, 2020.
247
+
248
+ [28] Xiao Li, Cristian-Ioan Vasile, and Calin Belta. Reinforcement learning with temporal logic rewards. In Proceedings of the International Conference on Intelligent Robots and Systems, 2017.
249
+
250
+ [29] Michael L. Littman. The reward hypothesis, 2017. URL https:// www.coursera.org/lecture/fundamentals-of-reinforcement-learning/ michael-littman-the-reward-hypothesis-q6x0e.
251
+
252
+ [30] Michael L. Littman, Ufuk Topcu, Jie Fu, Charles Isbell, Min Wen, and James MacGlashan. Environment-independent task specifications via GLTL. arXiv preprint arXiv:1704.04341, 2017.
253
+
254
+ [31] James MacGlashan, Monica Babes-Vroman, Marie desJardins, Michael L. Littman, Smaranda Muresan, Shawn Squire, Stefanie Tellex, Dilip Arumugam, and Lei Yang. Grounding English commands to reward functions. In Proceedings of Robotics: Science and Systems, 2015.
255
+
256
+ [32] James MacGlashan, Michael L. Littman, David L. Roberts, Robert Loftin, Bei Peng, and Matthew E. Taylor. Convergent actor critic by humans. In Proceedings of the International Conference on Intelligent Robots and Systems, 2016.
257
+
258
+ [33] James MacGlashan, Mark K. Ho, Robert Loftin, Bei Peng, Guan Wang, David L. Roberts, Matthew E. Taylor, and Michael L. Littman. Interactive learning from policy-dependent human feedback. In Proceedings of the International Conference on Machine Learning. PMLR, 2017.
259
+
260
+ [34] Maja J. Mataric. Reward functions for accelerated learning. In Proceedings of the International Conference on Machine Learning, 1994.
261
+
262
+ [35] L. G. Mitten. Preference order dynamic programming. Management Science, 21(1):43–46, 1974.
263
+
264
+ [36] Andrew Y. Ng, Daishi Harada, and Stuart Russell. Policy invariance under reward transformations: Theory and application to reward shaping. In Proceedings of the International Conference on Machine Learning, 1999.
265
+
266
+ [37] Andrew Y. Ng, Stuart J. Russell, et al. Algorithms for inverse reinforcement learning. In Proceedings of the International Conference on Machine Learning, 2000.
267
+
268
+ [38] Ellen Novoseller, Yibing Wei, Yanan Sui, Yisong Yue, and Joel Burdick. Dueling posterior sampling for preference-based reinforcement learning. In Proceedings of the Conference on Uncertainty in Artificial Intelligence, 2020.
269
+ [39] Pedro A. Ortega, Vishal Maini, and the DeepMind Safety Team. Building safe artificial intelligence: specification, robustness, and assurance, 2018. URL https://medium.com/@deepmindsafetyresearch/ building-safe-artificial-intelligence-52f5f75058f1.
270
+ [40] Silviu Pitis. Rethinking the discount factor in reinforcement learning: A decision theoretic approach. In Proceedings of the AAAI Conference on Artificial Intelligence, 2019.
271
+ [41] Martin L. Puterman. Markov Decision Processes: Discrete Stochastic Dynamic Programming. John Wiley & Sons, 2014.
272
+ [42] Stuart J. Russell and Peter Norvig. Artificial Intelligence: A Modern Approach. Prentice-Hall, Englewood Cliffs, NJ, 1994. ISBN 0-13-103805-2.
273
+ [43] Rohin Shah, Pedro Freire, Neel Alex, Rachel Freedman, Dmitrii Krasheninnikov, Lawrence Chan, Michael D. Dennis, Pieter Abbeel, Anca Dragan, and Stuart Russell. Benefits of assistance over reward learning, 2021. URL https://openreview.net/forum?id $\ c =$ DFIoGDZejIB.
274
+ [44] David Silver, Satinder Singh, Doina Precup, and Richard S. Sutton. Reward is enough. Artificial Intelligence, page 103535, 2021.
275
+ [45] Satinder Singh, Andrew G. Barto, and Nuttapong Chentanez. Intrinsically motivated reinforcement learning. Technical report, University of Massachusetts at Amherst Department of Computer Science, 2005.
276
+ [46] Satinder Singh, Richard L Lewis, and Andrew G Barto. Where do rewards come from? In Proceedings of the Annual Conference of the Cognitive Science Society, 2009.
277
+ [47] Satinder Singh, Richard L. Lewis, Jonathan Sorg, Andrew G. Barto, and Akram Helou. On separating agent designer goals from agent goals: Breaking the preferences–parameters confound, 2010.
278
+ [48] Matthew J. Sobel. Ordinal dynamic programming. Management science, 21(9):967–975, 1975.
279
+ [49] Matthew J. Sobel. Discounting axioms imply risk neutrality. Annals of Operations Research, 208(1):417–432, 2013.
280
+ [50] Jonathan Sorg. The Optimal Reward Problem: Designing Effective Reward for Bounded Agents. PhD thesis, University of Michigan, 2011.
281
+ [51] Jonathan Sorg, Richard L. Lewis, and Satinder Singh. Reward design via online gradient ascent. Advances in Neural Information Processing Systems, 2010.
282
+ [52] Peter Sunehag and Marcus Hutter. Axioms for rational reinforcement learning. In Proceedings of the International Conference on Algorithmic Learning Theory, 2011.
283
+ [53] Richard S. Sutton. The reward hypothesis, 2004. URL http://incompleteideas.net/ rlai.cs.ualberta.ca/RLAI/rewardhypothesis.html.
284
+ [54] Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction. MIT Press, 2018.
285
+ [55] Umar Syed, Michael Bowling, and Robert E. Schapire. Apprenticeship learning using linear programming. In Proceedings of the International Conference on Machine Learning, 2008.
286
+ [56] Csaba Szepesvári. Constrained MDPs and the reward hypothesis, 2020. URL http:// readingsml.blogspot.com/2020/03/constrained-mdps-and-reward-hypothesis. html.
287
+ [57] Geraud Nangue Tasse, Steven James, and Benjamin Rosman. A Boolean task algebra for reinforcement learning. In Advances in Neural Information Processing Systems, 2020.
288
+ [58] Rodrigo Toro Icarte, Toryn Q. Klassen, Richard Valenzano, and Sheila A. McIlraith. Teaching multiple tasks to an RL agent using LTL. In Proceedings of the International Conference on Autonomous Agents and Multiagent Systems, 2018.
289
+ [59] John von Neumann and Oskar Morgenstern. Theory of Games and Economic Behavior. Princeton University Press, 1953.
290
+ [60] Paul Weng. Markov decision processes with ordinal rewards: Reference point-based preferences. In Proceedings of the International Conference on Automated Planning and Scheduling, 2011.
291
+ [61] Martha White. Unifying task specification in reinforcement learning. In Proceedings of the International Conference on Machine Learning, 2017.
292
+ [62] Edward C. Williams, Nakul Gopalan, Mine Rhee, and Stefanie Tellex. Learning to parse natural language to grounded reward functions with weak supervision. In Proceedings of the International Conference on Robotics and Automation, 2018.
293
+ [63] Aaron Wilson, Alan Fern, and Prasad Tadepalli. A Bayesian approach for policy learning from trajectory preference queries. In Advances in Neural Information Processing Systems, 2012.
294
+ [64] Christian Wirth, Riad Akrour, Gerhard Neumann, and Johannes Fürnkranz. A survey of preference-based reinforcement learning methods. The Journal of Machine Learning Research, 18(1):4945–4990, 2017.
295
+ [65] Yichong Xu, Ruosong Wang, Lin Yang, Aarti Singh, and Artur Dubrawski. Preference-based reinforcement learning with finite-time guarantees. Advances in Neural Information Processing Systems, 33, 2020.
296
+ [66] Zeyu Zheng, Junhyuk Oh, Matteo Hessel, Zhongwen Xu, Manuel Kroiss, Hado van Hasselt, David Silver, and Satinder Singh. What can learned intrinsic rewards capture? In Proceedings of the International Conference on Machine Learning, 2020.
parse/train/9DlCh34E1bN/9DlCh34E1bN_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/CMsvjAnW1zE/CMsvjAnW1zE.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/CMsvjAnW1zE/CMsvjAnW1zE_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/CMsvjAnW1zE/CMsvjAnW1zE_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/CMsvjAnW1zE/CMsvjAnW1zE_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/EQbyD_KG6w-1h/EQbyD_KG6w-1h.md ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Self-Supervised Bug Detection and Repair
2
+
3
+ Miltiadis Allamanis, Henry Jackson-Flux∗, Marc Brockschmidt Microsoft Research, Cambridge, UK {miallama, mabrocks}@microsoft.com
4
+
5
+ # Abstract
6
+
7
+ Machine learning-based program analyses have recently shown the promise of integrating formal and probabilistic reasoning towards aiding software development. However, in the absence of large annotated corpora, training these analyses is challenging. Towards addressing this, we present BUGLAB, an approach for selfsupervised learning of bug detection and repair. BUGLAB co-trains two models: (1) a detector model that learns to detect and repair bugs in code, (2) a selector model that learns to create buggy code for the detector to use as training data. A Python implementation of BUGLAB improves by up to $30 \%$ upon baseline methods on a test dataset of 2374 real-life bugs and finds 19 previously unknown bugs in open-source software.
8
+
9
+ # 1 Introduction
10
+
11
+ Detecting and repairing bugs in source code requires strong reasoning skills over formal structures (e.g. data and control flow) and ambiguous information (e.g. identifier names, coding idioms, and comments). Traditional program analyses are able to detect critical bugs through formal reasoning and combinatorial search, but need to be manually coded by experts. That is a lengthy and costly process, which misses the opportunity to use ambiguous information pervasive within code.
12
+
13
+ Towards broadening the applicability of such methods, and utilizing ambiguous information, deep learning-based bug detection methods are being investigated [22, 3, 13]. These methods have the potential to further improve the engineering of software we rely on every day. However, many challenges in the area remain open, such as creating robust bug detection and repair methods that cover a wide range of common bugs in the absence of large supervised training corpora. Existing work focuses on randomly inserted bugs [22, 13], Cloze test proxy tasks [3], corpora of small code edits that may contain bugs [9] or build errors [28]. All these approaches rely on datasets of very limited size or ones known not to be representative of the characteristics of bugs found in real code.
14
+
15
+ In this work, we propose BUGLAB, a self-supervised approach that trains robust bug detectors by co-training a bug selector that learns to create hard-to-detect bugs (Sec. 2). For example, for a given code snippet with two well-named variables, a variable misuse bug may be easy to detect and repair, whereas an incorrect comparison operator might be significantly harder to identify. We propose a neural architecture for BUGLAB (Sec. 3) and implement it for Python (Sec. 4). Our implementation considers four broad classes of seemingly simple, yet hard-to-detect bugs and shows improved performance over training with randomly-inserted bugs on PYPIBUGS, a new, manually curated test set of 2374 real-life bugs (Sec. 5). Furthermore, we tested our trained models on popular open-source Python packages and identified 19 previously unreported bugs, though false positive rates of $\sim 9 8 \%$ remain impractical. We hope that creating machine learning methods that can detect these bugs early and assist developers will speed up software development and allow engineers to deliver more robust software. We release PyPIBugs and our code at https://github.com/ microsoft/neurips21-self-supervised-bug-detection-and-repair.
16
+
17
+ # 2 Self-Supervised Bug Detection
18
+
19
+ In this section, we first introduce the concept of code rewriting, and then use it to define BUGLAB as a framework for self-supervised learning of bug detection and repair.
20
+
21
+ Code Rewriting Rewriting is common within compilers and their optimizations, test-driven searchbased bug repair tools, mutation testing, and refactoring tools. Rewrites can be semantics-preserving (e.g. renamings of local variables), or semantics-altering (e.g. replacing $> = \log ~ ! = )$ .
22
+
23
+ Let $s$ denote the set of all syntax trees (not necessarily rooted in the start symbol of the language grammar). Syntax tree locations $\ell \in \{ \epsilon \} \cup \mathbb { N } ^ { * }$ in a syntax tree $\mathrm { s } \in { \mathcal { S } }$ are recursively defined, where $\mathrm { s } _ { \vert \epsilon } = \mathrm { s }$ and $\mathrm { s } _ { | \ell }$ for $\ell = \ell ^ { \prime } \circ i$ is the $i$ -th child of $\mathrm { s } _ { \vert \ell ^ { \prime } }$ (i.e. s|(2,3) denotes the third child of the second child of s). We define a rewrite rule $\rho = ( \mathrm { m } _ { \rho } , \mathrm { t } _ { \rho } )$ as a pair of a matching function $\operatorname { m } _ { \rho } : S \{ t r u e , f a l s e \}$ and a transformation function $\mathrm { t } _ { \rho } : { \mathcal { S } } { \mathcal { S } }$ . The matching function $\mathrm { m } _ { \rho } ( \mathrm { s } )$ yields true iff the rule $\rho$ is applicable at the root of a subtree s. The transformation function can be applied to obtain a transformed syntax tree. For convenience, we define $\mathrm { t } _ { \rho } ( \mathrm { s } ) = \mathrm { s }$ iff $\mathrm { m } _ { \rho } ( \mathrm { s } ) = f a l s e$ . We then write $\rho ( \mathrm { s } )$ to indicate the modification of a syntax tree s using $\rho$ when possible, and otherwise the identity function. For reversible rewrite rules $\rho$ , we denote the inverse rule as $\rho ^ { - 1 }$ such that $\rho ^ { - 1 } ( \rho ( \mathrm { s } ) ) = \mathbf { \dot { s } }$ holds. We discuss concrete rewrite rules $\rho$ in Sec. 4.
24
+
25
+ Given a set of rewrite rules $\mathcal { R }$ we define the set of “potential rewrites” in a syntax tree s as $R _ { \mathrm { s } } ^ { \mathcal { R } } =$ $\{ \langle \ell , \rho \rangle \mid \rho \in { \mathcal { R } } , \ell$ location in s, $, \mathbf { m } _ { \rho } ( \mathbf { s } _ { | \ell } ) = t r u e \}$ . For each tuple $\langle \ell , \rho \rangle \in R _ { \mathrm { s } } ^ { \mathcal { R } }$ , we use $\mathrm { s } ^ { \prime } = \mathrm { s } [ \rho ] \varrho$ to denote the new syntax tree obtained by applying $\rho$ at location $\ell$ of s. In BUGLAB, we train models that use rewrites from $R _ { \mathrm { s } } ^ { \mathcal { R } }$ to insert and repair bugs. We will discuss such neural models in Sec. 3.
26
+
27
+ BUGLAB In BUGLAB, we are interested in selfsupervised training of a robust bug detector model $D _ { \theta }$ with parameters $\theta$ on an unannotated codebase $C$ . Let $\mathcal { R }$ be a set of rewrite rules2 that allows to insert and repair bugs. We train $D _ { \theta }$ to be able to recognize the “hardest” possible rewrites that could be applied on our codebase $C$ For this, we consider the loss $\mathcal { L } _ { D _ { \theta } }$ of $D _ { \theta }$ on a rewritten code snippet $\mathrm { s } [ \rho ] _ { \ell }$ , for which the model needs to predict the repairing rewrite $\langle \ell , \rho ^ { - 1 } \rangle$ . Formally, we want to minimize the objective
28
+
29
+ $$
30
+ E _ { \mathrm { s } \sim C } \left[ \operatorname* { m a x } _ { \langle \ell , \rho \rangle \in R _ { \mathrm { s } } ^ { \mathcal { R } } } \mathcal { L } _ { D _ { \theta } } \left( \mathrm { s } [ \rho ] _ { \ell } , \left. \ell , \rho ^ { - 1 } \right. \right) \right] .
31
+ $$
32
+
33
+ ![](images/6a90afa1a44c13ced3e725f045bc326e6741157b1e8e404cd0b3127444e41f05.jpg)
34
+ Figure 1: BUGLAB overview: a selector model $S _ { \phi }$ decides which (bugintroducing) rewrite to apply to an input code snippet. Then a bug detector $D _ { \theta }$ tries to locate and repair the inserted bug (if one was inserted).
35
+
36
+ However, for any useful detector the set of rewrites $R _ { \mathrm { s } } ^ { \mathcal { R } }$ is commonly very large or unbounded and computing the maximum over all $\langle \bar { \ell , } \rho \rangle \in R _ { \mathrm { s } } ^ { \mathcal { R } }$ is practically intractable. To address this, BUGLAB introduces a bug selector model $S _ { \phi }$ (with parameters $\phi _ { , }$ ), whose goal is to approximate the intractable $\mathrm { m a x } _ { \langle \ell , \rho \rangle \in R _ { \mathrm { s } } ^ { \mathcal { R } } } \mathcal { L } _ { D _ { \theta } } \left( \cdot \right)$ . We can then sample rewrites from $S _ { \phi }$ instead of computing the maximum. We denote this as $\langle \ell , \rho \rangle \sim S _ { \phi } ( s )$ and the overall BUGLAB training objective can be written as a min-max optimization problem:
37
+
38
+ $$
39
+ \operatorname* { m a x } _ { \phi } \operatorname* { m i n } _ { \theta } E _ { \mathrm { s } \sim C } \left[ E _ { \langle \ell , \rho \rangle \sim S _ { \phi } ( \mathrm { s } ) } \left[ \mathcal { L } _ { D _ { \theta } } \left( \mathrm { s } [ \rho ] _ { \ell } , \langle \ell , \rho ^ { - 1 } \rangle \right) \right] \right] .
40
+ $$
41
+
42
+ The two models $S$ and $D$ in BUGLAB are “symmetric” in the sense that they both predict rewrites on code snippets, and only differ in their objectives — one aiming to introduce bugs and one aiming to repair them. In practice, we can and do use the same architecture to model both $S$ and $D$ , which we will discuss in the next section. At test time, we discard $S$ and only use the trained detector $D$ to locate and repair bugs.
43
+
44
+ # 3 Neural Models
45
+
46
+ In this section, we discuss how we represent code in BUGLAB and the neural models we use to learn how to rewrite code in the selector and detector models.
47
+
48
+ Code Representation We consider source code as a set of entities $v _ { i } ~ \in ~ V$ which relate to each other with a set of typed relations $e _ { k } \in E$ , where a relation $e _ { k } = ( v _ { i } , r , v _ { j } )$ denotes a relationship between entities $v _ { i }$ and $v _ { j }$ with type $r$ . The entities and relations can be thought as a heterogeneous graph $G = ( V , E )$ . The choice of code entities and their relationships is a form of high-level feature extraction. We discuss concrete entities and relationships for Python in Sec. 4. We also define a projection function $\mathbb { P } _ { t o k }$ that accepts $V$ and $E$ and returns a sequence $V _ { t o k }$ of the token entities in $V$ with the nodes appearing in relations in $E$ deterministically mapped to elements of $V _ { t o k }$ , i.e. $E _ { t o k } = \{ ( p ( v _ { i } ) , r , p ( \hat { v _ { j } } ) ) \}$ , where $p$ maps the entities in $V$ to $V _ { t o k } . \mathbb { P } _ { t o k }$ will be used for relational transformer models.
49
+
50
+ To learn a neural representation of the code entities $v _ { i }$ , first we define an embedding function $e ( v _ { i } )$ which maps the content of each entity to an initial $D$ -dimensional representation. Throughout this work — similar to Allamanis et al. [4] and other previous work — we deterministically split the string representation of each node into subtokens (e.g., fooBar is split into foo and bar), embed them through a learned embedding matrix, and use max pooling to get a single vector. We then “contextualize” the entity representations within $G$ using one of two models: a MLP-based GNN model with max message aggregation and the GREAT relational transformer of Hellendoorn et al. [13] over the token sequence and relations $V _ { t o k } , E _ { t o k } = \mathbb { P } _ { t o k } ( V , E )$ . GREAT uses both positional encodings and the projected relations in $E _ { t o k }$ . See Appx. A for detailed architecture descriptions. Other models to compute entity representations can be used, but were not explored in this work.
51
+
52
+ We use $\mathbfit { \Delta } \mathbf { r } _ { \ell }$ to denote the computed vector representation of the entity at location $\ell$ , independent of the model used to produce it. We use these representations to define our code rewriting models.
53
+
54
+ Probabilistic Code Rewriting Models Both bug selection and bug detection require to model the probability of applying a specific rewrite at a location in a code snippet s, either to introduce or repair a bug. For this, we factorize this task into localization and rewrite-given-location models, i.e.
55
+
56
+ $$
57
+ p \left( \langle \ell , \rho \rangle \mid \mathrm { s } , R _ { \mathrm { s } } ^ { \mathcal { R } } \right) = p _ { l o c } { \big ( } \ell \mid \mathrm { s } , R _ { \mathrm { s } } ^ { \mathcal { R } } { \big ) } p _ { r e w } { \big ( } \rho \mid \ell , \mathrm { s } , R _ { \mathrm { s } } ^ { \mathcal { R } } { \big ) } .
58
+ $$
59
+
60
+ We model $p _ { l o c }$ as a probability distribution over the relevant locations $\{ \ell \mid \langle \ell , \rho \rangle \in R _ { \mathrm { s } } ^ { \mathcal { R } } \} \cup \{ \mathrm { N o B U G } \}$ , where NoBug is a special location used to indicate that the code is not buggy. In practice, we implement this similar to a pointer net [19] using the representations $\mathbfit { \Delta } \mathbf { r } _ { \ell }$ (see Appx. A for details).
61
+
62
+ To select rewrites, we use rewrite type-specific learnable rule score functions $w _ { \rho } \left( r _ { \ell } , \mathcal { M } _ { \rho } ( \mathrm { s } , \ell ) \right)$ . This function maps a vector representation of an entity $\mathbf { \Delta } _ { \mathbf { \lambda } ^ { \mathbf { r } } \ell }$ and potential additional metadata onto a scalar score. The rule-specific metadata $\mathcal { M } _ { \rho } ( \mathrm { s } , \ell )$ is defined for some rewrites, e.g. containing representations of other entities that could be used in the location $\ell$ . We will discuss three concrete rule score functions in Sec. 4. The rewrite probability distribution $p _ { r e w }$ is then modeled by a softmax over the scores of all applicable rewrites at a target location $\ell$ , i.e.
63
+
64
+ $$
65
+ p _ { r e w } \left( \rho \mid \ell , \mathbf { s } , R _ { \mathbf { s } } ^ { \mathcal { R } } \right) = \operatorname * { s o f t m a x } _ { \langle \ell , \rho ^ { \prime } \rangle \in R _ { \mathbf { s } } ^ { \mathcal { R } } } \left( w _ { \rho ^ { \prime } } \left( r _ { \ell } , \mathcal { M } _ { \rho ^ { \prime } } ( \mathbf { s } , \ell ) \right) \right) .
66
+ $$
67
+
68
+ # 4 A Python Implementation
69
+
70
+ This section presents an implementation of BUGLAB for Python called PYBUGLAB. PYBUGLAB currently tackles a large subset of “stupid simple bugs” [16]. Fixing these bugs requires small changes to the code, but commonly has significant impact on code correctness. Such bugs may be thought as a form of a typographical mistake or a copy-paste error, and are often relatively hard to locate by humans but obvious after the fact. They are also quite common, as observed in the empirical statistics of Karampatsis and Sutton [16] and Just et al. [14]. Future work may focus on a broader set of rewrite rules or even learnable rewrites, but as we will observe in Sec. 5 more work is needed towards this. Almost all ideas in PYBUGLAB transfer straightforwardly to other programming languages other than Python, but would require some engineering effort to implement.
71
+
72
+ PYBUGLAB Code Entities and Relations In this work, we follow related literature (see Sec. 6 for more) and extract entities and relationships that are readily available by tokenizers, parsers, existing simple program analyses, or other Python-specific program analysis tools. The complete list of entities and relationships can be found in Appx. B and include syntactic entities and relations, relations about the intraprocedural data and control flow, types, and documentation. Some notable entities include SyntaxNodes, Tokens, and Symbols (references to variables and functions). Fig. 4 in Appx. B shows a graph of the entities and relationships of the snippet in Fig. 2.
73
+
74
+ ![](images/6fa04aa00a25535c0128e4a64746beb8ef02776ba155a61e8b37f97000e3c308.jpg)
75
+ Figure 2: Code snippet and rewrites available to PYBUGLAB.
76
+
77
+ # 4.1 Bug-Inducing PYBUGLAB Rewrite Rules
78
+
79
+ PYBUGLAB focuses on four common kinds of bugs. Fig. 2 shows a code snippet and the rewrites allowed for each location, which number 63 even for this small example.
80
+
81
+ Variable Misuse Originally defined by Allamanis et al. [3] as a Cloze test for source code, Vasic et al. [30] and Hellendoorn et al. [13] reformulated the task to localizing a variable misuse bug (if any) within a snippet and repairing it. PYBUGLAB uses the latter representation. Variable misuse bugs are common, with $1 2 . 8 \AA - 1 4 . 8 \%$ found in the ManySStuBs4J corpus [16] and about $6 \%$ of them caught during Java compilation in the Google build system [28]. To insert and repair variable misuse bugs, PYBUGLAB supports variable-swapping rewrites, such as in locations $l _ { 1 }$ , $l _ { 3 }$ and $l _ { 4 }$ (amongst others) in Fig. 2. To score a variable-swapping rewrite, we use the representation of the rewrite location $\mathbfit { \Delta } \mathbf { r } _ { \ell }$ along with the representation $\mathbf { \Delta } _ { r _ { \sigma } }$ of a variable Symbol $\sigma$ that could replace the current variable, i.e. is in-scope and has been defined before $\ell$ . The rule score function $w _ { \rho }$ for replacing the variable at $\ell$ with the symbol $\sigma$ is then computed as the inner product $\boldsymbol { r } _ { \ell } ^ { \top } \boldsymbol { r } _ { \sigma }$ .
82
+
83
+ Argument Swapping (or Argument Selection) First coined by Rice et al. [26], it refers to swapping the arguments of a function invocation, e.g. in $l _ { 6 }$ of Fig. 2. Rice et al. [26] and DeepBugs [22] tackled this problem when all arguments are single identifiers. PYBUGLAB extends this to swapping arbitrary argument expressions. The rule score function $w _ { \rho }$ for an argument swapping rewrite is a two-layer MLP applied to the concatenation of the output representations of the representation of the parameter and the to-be-swapped arguments arg1, and arg2: MLP $\left( [ r _ { \mathrm { p a r a m s } } , r _ { \mathrm { a r g 1 } } , r _ { \mathrm { a r g 2 } } ] \right)$ .
84
+
85
+ Wrong Operator Corrupting operators has a long history in mutation testing [14]. Detecting incorrect operators with deep learning was first tackled by DeepBugs [22] by using learnable embeddings of operators, operands and literals for arithmetic and comparison operators. DeepBugs focused only on binary operators. In PYBUGLAB we tackle all binary operators, including Boolean, arithmetic and comparison operators and two unary operators: logical and arithmetic negation. Locations $l _ { 1 1 }$ , $l _ { 1 4 }$ , $l _ { 1 6 }$ , and $l _ { 2 0 }$ in Fig. 2 are rewrites related to wrong operators. The rule score function $w _ { \rho }$ for an operator rewrite again uses an inner product, $\boldsymbol { r } _ { \ell } ^ { \top } \boldsymbol { r } _ { \mathtt { \diamond p } }$ , where $\pmb { r } _ { \tt o p }$ is a learned embedding for operator op. Note that we rewrite operators only to compatible operators (e.g. $<$ to $>$ but not $^ +$ ).
86
+
87
+ Wrong Literal Corrupting operands, and specifically, literals appearing in the source code, is also a common strategy in mutation testing. As in mutation testing, PYBUGLAB handles a limited number of commonly used literals, allowing rewrites to replace integer literals within the set of $- 2 , - 1 , 0 , 1 , 2$ and swapping the Boolean literal True with False and vice versa. The scoring function is identical to the operator rewrite, using a learnable embedding ${ \bf { r } } _ { \mathrm { { 1 i t } } }$ for each literal lit.
88
+
89
+ # 4.2 PYBUGLAB Rewrite Rules for Data Augmentation
90
+
91
+ We additionally consider more rewrite rules that are not meant to change the program semantics, using them as a form of data augmentation. This is in spirit similar to ideas in computer vision where images are transformed (e.g. rotated, cropped) but maintain their original content. Such rewrites
92
+
93
+ Require: Code dataset $C$ , initial detector/selector model parameters $\theta ^ { ( 0 ) }$ , $\phi ^ { ( 0 ) }$
94
+
95
+ 1: for meta-epoch $i = 0$ to $I$ do
96
+ 2: // Create dataset of buggy programs:
97
+ 3: $C _ { D } ^ { ( i ) } \gets \left\{ \left( \mathrm { s } [ \rho ] _ { \ell } , \left. \ell , \rho ^ { - 1 } \right. \right) \mid \mathrm { s } \in C , k \mathrm { \ s a m p l e s \ } \left. \ell , \rho \right. \sim S _ { \phi ^ { ( i ) } } ( \mathrm { s } ) \right\}$
98
+ 4: $\theta ^ { ( i + 1 ) } $ update $\theta ^ { ( i ) }$ by training $D$ on $C _ { D } ^ { ( i ) }$
99
+ 5: // Create dataset of hard-to-detect bugs:
100
+ 6: $\begin{array} { r } { C _ { S } ^ { ( i ) } \gets \left\{ \left( \mathrm { s } , \mathrm { a r g } \operatorname* { m a x } _ { \langle \ell , \rho \rangle \in R _ { \mathrm { s } } ^ { \mathcal { R } } } \left( \mathcal { L } _ { D _ { \theta ^ { ( i + 1 ) } } } \left( \mathrm { s } [ \rho ] _ { \ell } , \langle \ell , \rho ^ { - 1 } \rangle \right) \right) \right) \mid \mathrm { s } \in C \right\} } \end{array}$
101
+ 7: $\phi ^ { ( i + 1 ) } $ update $\phi ^ { ( i ) }$ by training $S$ on $C _ { S } ^ { ( i ) }$
102
+
103
+ have been shown to yield adversarially robust models of code [23]. Although our goal is not to provide adversarial robustness, we believe that such rewrites can help generalization. PYBUGLAB implements the following rewrites for this purpose:
104
+
105
+ • Variable Renaming renames a local variable to a random name not already in scope. • Comment Deletion removes code comments, including docstrings and inline comments. Such comments commonly contain natural language information that is useful for code comprehension, but usually do not affect program semantics. • Comparison Expression Mirroring swaps the two sides of a comparison operator and changes it appropriately. For example, $\mathtt { a } < \mathtt { b }$ is transformed to $\mathtt { b } > \mathtt { a }$ . Note that in cases such as $\mathbf { f } \circ \circ ( ) \ < \ \mathsf { b a r } ( )$ , this will change the order of execution of foo and bar, possibly altering program semantics. • If-Else Branch Swapping negates the test condition of an if-else statement or a ternary expressions using DeMorgan’s law and swaps the then body with the else body.
106
+
107
+ # 4.3 Implementation Details
108
+
109
+ To make the training computationally tractable we approximate Eq. 1. A simplified, sequential version of our training procedure is shown in Alg. 1. Intuitively, we alternate between training the two models, as the (discrete) sampling of rewrite rules in the selector models precludes direct endto-end training. We first use the current state of the selector model to generate “hard” samples and train the detector model on these samples (we always include the unmodified (i.e., NoBug case) as a sample). Then, we use the loss of the detector model to identify those generated samples that were hardest to detect and train the selector model to produce such samples.
110
+
111
+ In practice, we implemented the training procedure as a system of asynchronously communi$C _ { D / S } ^ { ( 0 ) } , \bar { C } _ { D / S } ^ { ( 1 ) } , \dots$ , and all of the described steps happen in parallel. We do not use “generations”of datasets, but instead use two constantly updated “pools” of training data, one state of the corresponding data pool. We remove samples from the data pool once they have been sampled $\nu$ times for use in training, in spirit similar to replay buffers in reinforcement learning. In our experiments, $\nu$ was set to 4. We regularly (in separate, concurrent processes) take snapshots of the the current state of the $D$ and $S$ models to generate new elements that are updated to the data pools, matching the procedure described in Alg. 1. We approximate the arg max in line 6 by only considering the $k$ samples chosen in line 3 for each input program. During training of $S$ , we then mask out the unobserved choices before computing the loss.
112
+
113
+ # 5 Evaluation
114
+
115
+ We now discuss our new dataset and evaluate PYBUGLAB. We $\divideontimes$ . . . . . . . . . .highlight. . . . .key . . . . . . . .results.
116
+
117
+ Datasets To train PYBUGLAB we retrieve the 4k most downloaded packages in the Python package index (PyPI) and take $3 . 4 \mathrm { k }$ of them as training packages, using the rest for test purposes. During training, PYBUGLAB installs each package along with all its dependencies. Installing all the dependencies is important for extracting the entities and the relations beyond local syntactic ones (e.g. type inference, method resolution). For each file, PYBUGLAB checks if it is a duplicate of a file that has already been seen in the training following the method of Allamanis [1] and runs all the relevant program analyses to extract the entities and relationships in each function. When we use additional rewrites for data augmentation, these are applied at the input of the PYBUGLAB pipeline as a form of pre-processing. Following Alg. 1, the bug selector $S$ selects $k = 5$ bugs to introduce, rewrites the source code text, and then the program analyses extract the new entities and relationships for the rewritten code snippets. The initial and rewritten code snippets are then used to create the training data for the detector and selector models.
118
+
119
+ We use two testsets to measure performance. First, we create RANDOMBUGS, a testset of 761 445 snippets derived from functions from the $6 0 0 \mathrm { P y P I }$ test packages (not seen during training). For each function we find within these packages we add it to the dataset along with 9 rewritten functions with a randomly inserted bug. On average graphs have 260 nodes, 601 edges, 25 rewrite locations, and 130 possible rewrites. We also collect a testset of real bugs. Although we conjecture that, in practice, the vast majority of bugs like those discussed in Sec. 4.1 are fixed when developers locally test their software, a few of those slip and then are fixed across different revisions checked into a version control systems. We have crawled the accessible repositories of all $2 8 5 \mathrm { k }$ packages in the Python Package Index (PyPI), collected and manually filtered bugs captured by the rewrites from Sec. 4.1. $\divideontimes$ . . . . .This. . . . . .new . . . . . . . . .dataset, . . . . . . . . . . . . . . .PYPIBUGS,. . . . . . . . . .contains. . . . . . .2374 . . . . . . . . . . . . .real-world,. . . . . . .small . . . . . . .bugs. We describe the data collection process in detail in Appx. D. In addition, we consider PYPIBUGS-PostFix: the examples from PYPIBUGS after a bug was fixed - we believe these samples are very likely to not contain any bugs anymore. We publish the dataset at https://www.microsoft.com/en-us/download/103554 and include it in the supplementary material.
120
+
121
+ # 5.1 Quantitative Evaluation
122
+
123
+ Our first experiment aims to evaluate whether the BUGLAB training framework yields more precise bug detectors. We consider two model architectures, using either GNNs or the GREAT transformer to compute embeddings of code entities (architecture details and hyperparameter choices can be found in Appx. A). We use four different training strategies: “supervised” is training only a bug detector on a fixed dataset of 1 million functions from the $3 . 4 \mathrm { k }$ training packages with randomly inserted bugs. “Random Selector” refers to a variant of PYBUGLAB using a bug selector model that uniformly at random picks a rewrite to insert bugs. Finally, PYBUGLAB and PYBUGLAB $+ \mathrm { A u g }$ use our framework from Sec. 2, with the latter also using additional rewrites to augment our code corpus. For the fully supervised model, we train with early stopping over a validation set; the other models are trained for a fixed number of 300 epochs (with $2 0 0 \mathrm { k }$ training samples per epoch) for the bug detector3 and the last detector model is used for evaluation.
124
+
125
+ Table 1: Accuracies $( \% )$ for different training strategies and model architectures on RANDOMBUGS.
126
+
127
+ <table><tr><td rowspan="3"></td><td colspan="6">RANDOMBUGS</td></tr><tr><td></td><td>GNN</td><td></td><td></td><td>GREAT</td><td></td></tr><tr><td>Joint</td><td>Loc</td><td>Repair</td><td>Joint</td><td>Loc</td><td>Repair</td></tr><tr><td>Supervised</td><td>62.4</td><td>73.6</td><td>81.2</td><td>51.0</td><td>61.9</td><td>76.3</td></tr><tr><td>Random Selector</td><td>69.4</td><td>79.6</td><td>84.0</td><td>63.9</td><td>73.6</td><td>82.0</td></tr><tr><td>PYBUGLAB</td><td>69.6</td><td>80.4</td><td>84.2</td><td>64.0</td><td>74.3</td><td>82.3</td></tr><tr><td>PYBUGLAB +Aug</td><td>70.3</td><td>81.1</td><td>84.5</td><td>65.3</td><td>75.3</td><td>82.5</td></tr></table>
128
+
129
+ Effectiveness of BUGLAB Training We first consider the performance of different models on the synthetic RANDOMBUGS dataset. Tbl. 1 shows the accuracy of predicting a full bug repair correctly (“Joint”) and analogous to Eq. 2 break this up into a localization accuracy (“Loc”) of predicting the correct location (or NoBug for correct examples) and a repair accuracy (“Repair”) for selecting the correct rewrite given the buggy location.
130
+
131
+ We observe that $\divideontimes$ . . . . . . . . . . . . . . . . . . . . .BUGLAB-training. . . . . . .leads. . . .to . . . . . . .more. . . . . . . .robust. . . . . .bug . . . . . . . . . . .detectors. . . . . . . . . . . . .compared. . .to. . . . . . . .other methods .......... for both GNNs and GREAT. Random selector models — a form of data augmentation — improve performance over supervised methods but mostly on in-distribution RANDOMBUGS samples. As expected, $\divideontimes$ . . . . . . . . . . . . .augmenting. . . . .the . . . . . .code. . . . . . . . .dataset. . . . . . .helps . . . . . . . . . . . . . . . . .generalization, but does not make a substantial difference. Expanding the kinds of rewrites used to augment the data and learning to select them may improve performance in the future.
132
+
133
+ Table 2: Results for different training strategies and model architectures on PYPIBUGS.
134
+
135
+ <table><tr><td></td><td colspan="6">PYPIBUGS</td><td colspan="4">PYPIBUGS-PostFix</td></tr><tr><td></td><td colspan="3">GNN</td><td colspan="3">GREAT</td><td colspan="2">GNN</td><td colspan="2">GREAT</td></tr><tr><td></td><td>Joint</td><td>Loc</td><td>Repair</td><td>Joint</td><td>Loc</td><td>Repair</td><td>Loc</td><td>Joint AUC</td><td>Loc</td><td>Joint AUC</td></tr><tr><td>Supervised</td><td>20.0</td><td>28.4</td><td>61.8</td><td>16.8</td><td>25.8</td><td>58.6</td><td>17.8</td><td>0.087</td><td>20.7</td><td>0.044</td></tr><tr><td>Random Selector</td><td>21.2</td><td>27.0</td><td>69.2</td><td>20.6</td><td>26.8</td><td>67.2</td><td>47.5</td><td>0.108</td><td>52.5</td><td>0.117</td></tr><tr><td>PYBUGLAB</td><td>24.2</td><td>31.3</td><td>70.7</td><td>24.0</td><td>32.8</td><td>67.9</td><td>32.9</td><td>0.160</td><td>28.6</td><td>0.140</td></tr><tr><td>PYBUGLAB +Aug</td><td>26.4</td><td>33.5</td><td>72.0</td><td>23.2</td><td>29.7</td><td>68.8</td><td>32.6</td><td>0.187</td><td>48.2</td><td>0.129</td></tr></table>
136
+
137
+ Table 3: Localization and Repair Accuracy $( \% )$ per bug kind for the PYBUGLAB +Aug model.
138
+
139
+ <table><tr><td rowspan="3">Bug Type</td><td colspan="4">RANDOMBUGS</td><td colspan="4">PYPIBUGS</td></tr><tr><td colspan="2">GNN</td><td colspan="2">GREAT</td><td colspan="2">GNN</td><td colspan="2">GREAT</td></tr><tr><td>Loc</td><td>Repair</td><td>Loc</td><td>Repair</td><td>Loc</td><td>Repair</td><td>Loc</td><td>Repair</td></tr><tr><td>Argument Swapping</td><td>85.0</td><td>57.3</td><td>65.5</td><td>57.2</td><td>33.2</td><td>73.9</td><td>24.3</td><td>72.7</td></tr><tr><td>Wrong Assign Op</td><td>96.1</td><td>99.1</td><td>94.5</td><td>98.6</td><td>20.0</td><td>68.9</td><td>14.0</td><td>58.1</td></tr><tr><td>Wrong Binary Op</td><td>83.0</td><td>85.2</td><td>77.3</td><td>81.4</td><td>27.2</td><td>54.3</td><td>36.6</td><td>43.7</td></tr><tr><td>Wrong Boolean Op</td><td>71.8</td><td>99.5</td><td>43.6</td><td>99.5</td><td>27.6</td><td>96.9</td><td>15.7</td><td>97.2</td></tr><tr><td>Wrong Comparison Op</td><td>83.9</td><td>79.3</td><td>80.0</td><td>76.4</td><td>33.7</td><td>66.1</td><td>31.1</td><td>53.5</td></tr><tr><td>Wrong Literal</td><td>71.7</td><td>74.7</td><td>66.6</td><td>71.6</td><td>21.6</td><td>78.4</td><td>17.9</td><td>79.5</td></tr><tr><td>Variable Misuse</td><td>84.9</td><td>88.4</td><td>78.2</td><td>86.3</td><td>35.3</td><td>70.5</td><td>34.0</td><td>69.4</td></tr><tr><td>NoBUG</td><td>53.8</td><td></td><td>62.5</td><td></td><td></td><td></td><td></td><td></td></tr></table>
140
+
141
+ Furthermore, $\ast { \mathrm { l o u g } } .$ . . . . . . . . . . . . . .localization . . .is . . . . . . .much . . . . . . . .harder. . . . . .than . . . . . . . .repair . . .at . .a . . . . . . .given . . . . . . . . . .location. This is somewhat expected: there are many more candidate locations compared to potential repairs at a given location. However, this suggests that research should focus on the localization problem rather than repair.
142
+
143
+ We now turn to the results on PYPIBUGS, shown in Tbl. 2, which also includes the accuracy of choosing the special NoBug location on the PYPIBUGS-PostFix dataset, as well as the area under the precision recall curve for the results on both PYPIBUGS and PYPIBUGS-PostFix.
144
+
145
+ We find that $\divideontimes$ . . . . . . . . . .detecting. . . . .and. . . . . . . . . . . .repairing . . . . . . . . .real-life. . . . . . .bugs . .is. . . . . . . . . . . . . . .significantly. . . . . . . .harder. . . . . .than. . . . . . . . . . .handling . . . . . . . . . . . .randomly . . . . . . . . .inserted. . . . . .bugs. As PYBUGLAB models trained using a learned bug selector outperform those using a “Random Selector”, we speculate that the learned selector avoids generating easy-to-detect bugs, focusing the detector model on recognizing deeper semantic patterns. Despite this, improvements in RANDOMBUGS often correlate with improvements in PYPIBUGS. This is encouraging: collecting PYPIBUGS-like datasets is costly; corpora with random bugs can help measure relative improvements to some extent. Finally, we find that $\divideontimes$ . . . . . . . . . . . . . .recognizing . . . . . . . . . . . . .non-buggy . . . . . . . . . .samples. . .is . . . . . .very . . . . . .hard, and in particular, does not always profit from training in PYBUGLAB.
146
+
147
+ In our qualitative analysis (Sec. 5.2), we observed that the models raised some confident but incorrect warnings at very “odd” locations. However, these warnings were different across models. We have tested an ensembling strategy averaging the output probabilities of five separately trained GNN models. This results in localization and repair accuracies of $8 3 . 0 \%$ and $8 5 . 4 \%$ on RANDOMBUGS (vs. $8 1 . 1 \%$ and $8 4 . 5 \%$ ) and $3 4 . 4 \%$ and $7 2 . 2 \%$ on PYPIBUGS (vs. $3 3 . 5 \%$ and $7 2 . 0 \%$ ). As we discuss in Sec. 5.2 finding the cause of the “spurious” warnings is important future work.
148
+
149
+ Per-Bug Evaluation To better understand which bugs are hard to detect, we break down the results the best-performing PYBUGLAB $+ \mathrm { A u g }$ models on RANDOMBUGS by type of bug in Tbl. 3. We observe that incorrect literals are some of the hardest bugs to detect. Incorrect assignment operators $( e . g . = \mathrm { a n d } + = )$ ) are easy to detect in RANDOMBUGS, but significantly harder in PYPIBUGS. This may be attributed to class imbalance, with simple assignment $( = )$ being the majority class. $\divideontimes$ Detecting . . . . . . . . . . . . . .if .a. . . . . . . . .snippet. . . . .has . .a . . . . .bug . . .or . . . .not. . . . . . . .seems . . .to . . .be. . . .the. . . . . . . . .hardest. . . . . .task:. . . .no. . . . . . . .model . . . . . . . . . .achieves. . . . . . . . . . .accuracy. . . . . . . . .beyond. $6 3 \%$ .
150
+
151
+ We note that in our experiments, GNNs-based models seem to often outperform GREAT, somewhat contradicting the results of Hellendoorn et al. [13]. We have performed substantial additional experiments to investigate and verify these results, cf. Sec. A.2. This may have to do with the performance of these models on long sequences or that the GNN has access to more fine-grained information, instead of relations over the projected token sequences. For example, this could be attributed to the lack of syntax and symbol nodes in the representation used in GREAT. Nevertheless, GREAT is noticeably better ( $6 2 . 5 \%$ vs. $5 3 . 8 \%$ ) at detecting NoBug and locating wrong binary operators in PYPIBUGS.
152
+
153
+ Table 5: Bug distribution $( \% )$ in different datasets
154
+
155
+ <table><tr><td>Bug Kind</td><td>PYPIBUGS</td><td>RANDOMBUGS</td><td>Selector Samples</td></tr><tr><td>Argument Swapping</td><td>11.9</td><td>8.4</td><td>23.8</td></tr><tr><td>Wrong Assignment</td><td>1.9</td><td>8.5</td><td>5.3</td></tr><tr><td>Wrong Binary Operator</td><td>3.4</td><td>2.4</td><td>2.3</td></tr><tr><td>Wrong Boolean Operator</td><td>8.1</td><td>2.2</td><td>6.4</td></tr><tr><td>Wrong Comparison Operator</td><td>17.1</td><td>8.2</td><td>7.4</td></tr><tr><td>Wrong Literal</td><td>3.7</td><td>11.6</td><td>12.4</td></tr><tr><td>Variable Misuse</td><td>53.8</td><td>58.6</td><td>42.5</td></tr></table>
156
+
157
+ Bug Selector Performance To understand how training of the bug selector proceeds, we perform two experiments. In our first experiment, we take a snapshot of the selector model during training of the PYBUGLAB $+ \mathrm { A u g }$ (GNN) model every 24 hours, after an initial burn-in phase of 12 hours. We then generate 10000 buggy samples using each of these snapshots and then test a fixed model on each of these snapshots. The results of this are shown in Tbl. 4, using a fully trained PYBUGLAB $+ \mathrm { A u g }$ (GNN) model from another training run as a fixed model. We conclude that . . . . . . . . . . . . . . . . . . . . . . . . .PYBUGLAB succeeds. . . .in . . . . . . . . . .learning . . .to . . . . . . . . . .generate. . . . . . . .harder. . .to find ..........bugs, though we can observe the selector model trading off “harder-to-localize” and “harder-tofix” properties. Tests on other models show similar trends, confirming the robustness of this result.
158
+
159
+ Table 4: Development of Performance on Bug Selector Samples
160
+
161
+ <table><tr><td>Training&#x27; Time</td><td>Joint</td><td>Loc</td><td>Repair</td></tr><tr><td>0.5 days</td><td>64.2</td><td>83.8</td><td>72.1</td></tr><tr><td>1.5 days</td><td>62.5</td><td>80.7</td><td>72.9</td></tr><tr><td>2.5 days</td><td>62.0</td><td>83.0</td><td>69.8</td></tr><tr><td>3.5 days</td><td>61.7</td><td>82.5</td><td>69.8</td></tr><tr><td>4.5 days</td><td>61.9</td><td>83.0</td><td>69.5</td></tr><tr><td>5.5 days</td><td>61.1</td><td>83.0</td><td>68.6</td></tr><tr><td>6.5 days</td><td>60.5</td><td>78.7</td><td>72.4</td></tr></table>
162
+
163
+ In a second experiment, we compare the distribution of different bug kinds in PYPIBUGS and RANDOMBUGS with the distribution of bugs sampled from the final snapshot of our selector model from above. The results are shown in Tbl. 5, where we can see that a number of bugs (argument swapping, use of wrong literals and of assignment operators) are substantially over-represented, whereas mistakes in comparison operators and variable misuse are under-represented. This indicates that . . . . . . . . . . . . . . . . . . . . . . . . . .PYBUGLAB generates. . . . . .hard . . .to . . . . . .find, . . . .but. . . .not. . . . . . . . . . . . . .necessarily . . . . . . . . . .realistic . . . . . .bugs.
164
+
165
+ Comparison to CuBERT Finally, we compare our models to CuBERT [15], which uses a masked language modeling objective to pre-train a BERT-like model and then learns bug detectors specific to a class of bugs (e.g., wrong binary operators) on top of this pre-trained model. Note that CuBERT detects $i f$ a bug exists but does not localize it. For the comparison, we create two sub-datasets of PYPIBUGS: PYPIBUGS-WrongOp contains the 501 samples that involve the binary operators supported by CuBERT, and PYPIBUGS-VarMisuse, which contains the 1278 bugs that involve variable misuses. We complete both of these datasets with 501 (resp. 1278) random NoBug code samples from our RANDOMBUGS, to match the 1:1 buggy/non-buggy distribution used in CuBERT’s training. Since CuBERT classification models focus on a single bug type, to compare to PYBUGLAB we mask out all code locations that do not correspond to a bug that could be detected by the corresponding CuBERT model. We then treat the prediction of the NoBug location as a “non-buggy” prediction and all other locations as a “buggy” prediction. For example, for the snippet in Fig. 2, only the locations $l _ { 2 }$ , $l _ { 1 1 }$ , $l _ { 1 4 }$ , $l _ { 1 6 }$ , and $l _ { 2 0 }$ and their corresponding rewrites are considered by PYBUGLAB for the comparison on PYPIBUGS-WrongOp.
166
+
167
+ Tbl. 6 shows the results of comparing the released CuBERT snapshots with the PYBUGLAB +Aug GNN model. We observe that $\divideontimes$ . . . .the . . . . . . . . . . . . . . . . . . . . . . . . .PYBUGLAB models
168
+
169
+ Table 6: Comparison with CuBERT [15]
170
+
171
+ <table><tr><td rowspan="2"></td><td colspan="3">CuBERT</td><td colspan="3">PYBUGLAB (GNN)</td></tr><tr><td>Prec</td><td>Recall</td><td>F1</td><td>Prec</td><td>Recall</td><td>F1</td></tr><tr><td>PYPIBUGs-WrongOp</td><td>0.764</td><td>0.251</td><td>0.378</td><td>0.730</td><td>0.764</td><td>0.746</td></tr><tr><td>PYPIBUGS-VarMisuse</td><td>0.632</td><td>0.403</td><td>0.493</td><td>0.740</td><td>0.840</td><td>0.787</td></tr></table>
172
+
173
+ . . . . .have. . . . . . . . . . . . . . . .substantially . . . . . . .better. . . . . . .recall. . . . . .than. . . . . . . . . . . . . . . . . . .CuBERT-based . . . . . . . . .models, even though they were trained to detect more bug types. When calibrating the CuBERT models to have a recall equal to PYBUGLAB, heir precision drops substantially. In particular, on PYPIBUGS-WrongOp, it is reduced to 0.609, and
174
+
175
+ 1 def make_id(name):
176
+ 2 $\mathbf { r } \ =$ get_rand_string(12)
177
+ 3 if len(name) <= 22:
178
+ 4 name $=$ name[:22]
179
+ 5 return name $\textrm { + } \textrm { -- } \textrm { + } \textrm { \pmb { r } }$ (a) A wrong comparison operator bug (red box) in PYPIBUGS detected and repaired by the GNN PYBUGLAB +Aug models.
180
+
181
+ 1 def update(self, roomId,
182
+ 2 title, \*\*request_params):
183
+ 3 check_type(roomId, basestring)
184
+ 4 check_type(roomId, basestring)
185
+ 5 [...]
186
+
187
+ (b) A variable misuse (red box) caught in an open-source project. GNN PYBUGLAB $+ \mathrm { A u g }$ suggests to rewrite roomId to title. The fixing pull request is found here.
188
+
189
+ Figure 3: Bugs found by PYBUGLAB. Snippets reformatted and abbreviated to fit figure.
190
+
191
+ on PYPIBUGS-VarMisuse, it is reduced to 0.613; in both cases, PYBUGLAB outperforms CuBERT substantially.
192
+
193
+ # 5.2 Qualitative Inspection of Raised Warnings
194
+
195
+ We now take a qualitative look at the raised warnings raised by PYBUGLAB. As example, Fig. 3a shows a sample of PYPIBUGS where the developer used an incorrect comparison operator. Once pointed to it, it is clear to a human that the truncation statement in line 4 has no effect (under the reasonable assumption that name is a string), and that a different comparison operator $( > )$ is necessary.
196
+
197
+ To gain an understanding of the performance of PYBUGLAB on realistic data, we performed an indepth analysis of the cases flagged as bugs by our best-performing model on the code found within the 4k top PyPI packages. We observed a mixture of false positives with few previously unseen real-life bugs, matching the quantitative results in Tbl. 3. First, we find that the majority of the false positives are “incorrect literal” detections. This suggests that learning to detect such bugs is a hard problem. Furthermore, many literals serve as default “configurations” (e.g. the number of retries for a network request) and different values are not bugs. We posit that a large percentage of literal replacements the selector learns to make fall in this category.
198
+
199
+ We also found that some repairs suggested by the model actually produce semantically equivalent code. For example, the model lacks knowledge that two variables refer to the same object in memory (aliasing), and so attempts to “repair” variable misuse bugs by switching between these. Other examples includes checking the return values of standard functions such as Python’s str.find, which returns $^ { - 1 }$ if the query string is not found. In such cases, PYBUGLAB often suggested to rewrite an if $\mathbf { x } \lrcorner \mathbf { f i n d } ( \mathbf { y } ) \ \ll \ - 1$ to if $\mathbf { x } \lrcorner \mathbf { f i n d } ( \mathbf { y } ) \ = - 1$ , which makes no difference in practice. These false negatives can be attributed to the fact that the bug selector model considers such changes as introducing bugs, even though they are not actually changing behavior. This suggests that for better results, the rewrite rules need to ensure that the rewrites are not semantics-preserving and represent bugs.
200
+
201
+ Finally, some reported issues were sufficiently complex that it took us (the human authors) a couple of minutes of thought to conclude that a warning is spurious. Simultaneously, there are some warnings that are “obviously” incorrect to us, but the reasons why the neural models raise them is unclear. This highlights the importance of research on explainability techniques along with better ways to calibrate model confidence. The fact that selectors may introduce spurious “bugs” may also be affecting how the detector model learns. Ideas that have appeared in reinforcement learning, such as the one of Dennis et al. [8], may allow models to improve their performance in spite of spurious bugs.
202
+
203
+ Overall, $\yen 123,456,7$ . . .of. . . . .the . . . . . .1000. . . . . . . . . . .reported . . . . . . . . . . .warnings . . . . . .were. . . . . . . .found . . .to . . .be. . . . . . . . . .real-life. . . . . . .bugs. Of these 19, we reported 11 on GitHub (6 already merged, 5 pending approval). See Appx. G for details. 3 other bugs had already been fixed between the version PYBUGLAB processed and the current version or the project was deprecated, whereas another 5 bugs are minor and we decided not to report them. One of the detected bugs is shown in Fig. 3b. Overall, most of the detected bugs appear within unit tests, logging, or exception handling, possibly because bugs there do not impact the core functionality of a project. However, given the number of such bugs we collected in PYPIBUGS, we believe that such bugs arise equally often in other code, but that they are detected and fixed more quickly.
204
+
205
+ Although our analysis only forms a lower bound on the precision of PYBUGLAB and related methods, it suggests that there is still ample room for future improvements towards making machine learningbased bug detection and repair practically useful.
206
+
207
+ # 6 Related Work
208
+
209
+ Detecting bugs in source code has been researched since the early days of computing. Traditionally, bug detection is tackled as a formal task, where any code that cannot be proved to satisfy some correctness property may contain a bug. This is essential for security- and safety-critical bugs, but not for other — equally common — bugs. In the last decade, software engineering and programming language research have increasingly realized ambiguous information within code (e.g. variable names, comments) contains valuable information and using this information can yield valuable results [2]. The main premise is that patterns in source code, such as patterns in names, control, and data flow can be informative. This information can also be exploited to detect some bugs. For example, Ray et al. [24] noted that even simple language models tend to assign lower probability to buggy code.
210
+
211
+ Multiple static analysis methods have been researched that combine some form of data-oriented bug detection. This ranges from language model-based tools, such as the early work of Wang et al. [32] to specification-mining tools such as the work of Eberhardt et al. [10]. BUGLAB is related to DeepBugs [22] which uses an MLP over a limited window of code tokens and train separate models to detect wrong operators, operands, and argument swappings. BUGLAB opts for a more structured representation of code and a single model. Allamanis et al. [3], Vasic et al. [30], Hellendoorn et al. [13] tackle variable misuse bugs (one of the kinds of bugs included in PYBUGLAB) but either by randomly introducing the bugs in code or using a Cloze-like test. Instead, BUGLAB opts for a selfsupervised approach and tackles a broader range of bugs. Concurrently to this work, Patra and Pradel [21] showed an alternative method for learning to generate realistic bugs. Dinella et al. [9] learn a supervised sequential model that performs graph transformations that replicate small edits in code (refactoring, introducing functionality, bug fixing, etc.). Their model — Hoppity — could serve as a learnable rewrite operation in BUGLAB in future work. Dynamic analysis methods have also been researched with promising results [31], but collecting representative dynamic traces over a diverse set of programs at scale (e.g. from the top Python packages used in this work) is practically impossible.
212
+
213
+ BUGLAB is related to ideas around self-supervised learning recently explored in deep learning, computer vision, and NLP. In our case, we aim to train a bug detection model without using training data from real-life bugs. BUGLAB resembles ELECTRA [6], with the important difference that the rewrites to the input code go beyond single token replacement that need to respect strict constraints of programming languages (syntax, variable scopes) and the model is directly used for bug detection, rather than for pre-training. The main BUGLAB objective Eq. 1 also resembles GANs [12] with the exception that the objective is non-differentiable (introducing a bug alters the discrete data representation), the selector is a structured probabilistic code rewriting model, and that we are mainly interested in the bug detector (analogous to the discriminator) rather than the selector.
214
+
215
+ # 7 Discussion and Conclusions
216
+
217
+ Learned program analyses offer the promise to improve how we develop software. They also offer a great opportunity to study machine learning models that combine formal and probabilistic reasoning. Towards achieving these we presented BUGLAB, a self-supervised approach for learning program analyses, that improves upon baseline methods and detects bugs in real-life code. We also empirically show the limitations of existing bug-detecting machine learning methods, which suffer from impractical false-positive rates. Importantly, we show the large gap of performance of existing methods on corpora of randomly inserted bugs — commonly used in prior work — and real-life bugs.
218
+
219
+ # Acknowledgements
220
+
221
+ We want to thank Sebastian Nowozin and Marwin Segler for helpful discussions, Marwin Segler for comments on a draft of this work, and the anonymous reviewers for useful questions and suggestions. Finally, we would like to thank the contributors to the following open-source tools used: PyTorch [20], PyDriller [27], MessagePack, LibCST, Jedi, Kubernetes, Helm.
222
+
223
+ References
224
+ [1] M. Allamanis. The adverse effects of code duplication in machine learning models of code. In Proceedings of the 2019 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software, pages 143–153, 2019.
225
+ [2] M. Allamanis, E. T. Barr, P. Devanbu, and C. Sutton. A survey of machine learning for big code and naturalness. ACM Computing Surveys (CSUR), 51(4):1–37, 2018.
226
+ [3] M. Allamanis, M. Brockschmidt, and M. Khademi. Learning to represent programs with graphs. In International Conference on Learning Representations (ICLR), 2018.
227
+ [4] M. Allamanis, E. Barr, S. Ducousso, and Z. Gao. Typilus: Neural type hints. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 91–105. Association for Computing Machinery (ACM), 2020.
228
+ [5] T. Bachlechner, B. P. Majumder, H. H. Mao, G. W. Cottrell, and J. McAuley. Rezero is all you need: Fast convergence at large depth. arXiv preprint arXiv:2003.04887, 2020.
229
+ [6] K. Clark, M.-T. Luong, Q. V. Le, and C. D. Manning. ELECTRA: Pre-training text encoders as discriminators rather than generators. arXiv preprint arXiv:2003.10555, 2020.
230
+ [7] M. Cvitkovic, B. Singh, and A. Anandkumar. Deep learning on code with an unbounded vocabulary. In Machine Learning 4 Programming, 2018.
231
+ [8] M. Dennis, N. Jaques, E. Vinitsky, A. Bayen, S. Russell, A. Critch, and S. Levine. Emergent complexity and zero-shot transfer via unsupervised environment design. arXiv preprint arXiv:2012.02096, 2020.
232
+ [9] E. Dinella, H. Dai, Z. Li, M. Naik, L. Song, and K. Wang. Hoppity: Learning graph transformations to detect and fix bugs in programs. In International Conference on Learning Representations, 2019.
233
+ [10] J. Eberhardt, S. Steffen, V. Raychev, and M. Vechev. Unsupervised learning of API aliasing specifications. In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 745–759, 2019.
234
+ [11] J. Gilmer, S. S. Schoenholz, P. F. Riley, O. Vinyals, and G. E. Dahl. Neural message passing for quantum chemistry. In International Conference on Machine Learning, pages 1263–1272, 2017.
235
+ [12] I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial networks. arXiv preprint arXiv:1406.2661, 2014.
236
+ [13] V. J. Hellendoorn, C. Sutton, R. Singh, P. Maniatis, and D. Bieber. Global relational models of source code. In International Conference on Learning Representations, 2020.
237
+ [14] R. Just, D. Jalali, L. Inozemtseva, M. D. Ernst, R. Holmes, and G. Fraser. Are mutants a valid substitute for real faults in software testing? In Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, pages 654–665, 2014.
238
+ [15] A. Kanade, P. Maniatis, G. Balakrishnan, and K. Shi. Learning and evaluating contextual embedding of source code. In International Conference on Machine Learning (ICML), 2020.
239
+ [16] R.-M. Karampatsis and C. Sutton. How often do single-statement bugs occur? the ManySStuBs4J dataset. In Proceedings of the 17th International Conference on Mining Software Repositories, pages 573–577, 2020.
240
+ [17] J. Katz. Libraries.io Open Source Repository and Dependency Metadata, Jan. 2020. URL https://doi.org/10.5281/zenodo.3626071.
241
+ [18] Y. Li, D. Tarlow, M. Brockschmidt, and R. Zemel. Gated graph sequence neural networks. In International Conference on Learning Representations (ICLR), 2016.
242
+
243
+ [19] S. Merity, C. Xiong, J. Bradbury, and R. Socher. Pointer sentinel mixture models. In International Conference on Learning Representations (ICLR), 2017.
244
+
245
+ [20] A. Paszke, S. Gross, S. Chintala, G. Chanan, E. Yang, Z. DeVito, Z. Lin, A. Desmaison, L. Antiga, and A. Lerer. Automatic differentiation in PyTorch. 2017.
246
+ [21] J. Patra and M. Pradel. Semantic bug seeding: a learning-based approach for creating realistic bugs. In Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, pages 906–918, 2021.
247
+ [22] M. Pradel and K. Sen. DeepBugs: A learning approach to name-based bug detection. Proceedings of the ACM on Programming Languages, 2(OOPSLA):1–25, 2018.
248
+ [23] G. Ramakrishnan, J. Henkel, Z. Wang, A. Albarghouthi, S. Jha, and T. Reps. Semantic robustness of models of source code. arXiv preprint arXiv:2002.03043, 2020.
249
+ [24] B. Ray, V. Hellendoorn, S. Godhane, Z. Tu, A. Bacchelli, and P. Devanbu. On the ”naturalness” of buggy code. In 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE), pages 428–439. IEEE, 2016.
250
+ [25] V. Raychev, M. Vechev, and A. Krause. Predicting program properties from Big Code. In Principles of Programming Languages (POPL), 2015.
251
+ [26] A. Rice, E. Aftandilian, C. Jaspan, E. Johnston, M. Pradel, and Y. Arroyo-Paredes. Detecting argument selection defects. Proceedings of the ACM on Programming Languages, 1(OOPSLA): 1–22, 2017.
252
+ [27] D. Spadini, M. Aniche, and A. Bacchelli. PyDriller: Python framework for mining software repositories. In Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering - ESEC/FSE 2018, pages 908–911, New York, New York, USA, 2018. ACM Press. ISBN 9781450355735. doi: 10.1145/3236024.3264598. URL http://dl.acm.org/citation. cfm?doid $\equiv$ 3236024.3264598.
253
+ [28] D. Tarlow, S. Moitra, A. Rice, Z. Chen, P.-A. Manzagol, C. Sutton, and E. Aftandilian. Learning to fix build errors with Graph2Diff neural networks. In Proceedings of the IEEE/ACM 42nd International Conference on Software Engineering Workshops, pages 19–20, 2020.
254
+ [29] H. Touvron, M. Cord, A. Sablayrolles, G. Synnaeve, and H. Jegou. Going deeper with image ´ transformers. arXiv preprint arXiv:2103.17239, 2021.
255
+ [30] M. Vasic, A. Kanade, P. Maniatis, D. Bieber, and R. Singh. Neural program repair by jointly learning to localize and repair. arXiv preprint arXiv:1904.01720, 2019.
256
+ [31] K. Wang and Z. Su. Blended, precise semantic program embeddings. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 121–134, 2020.
257
+ [32] S. Wang, D. Chollak, D. Movshovitz-Attias, and L. Tan. Bugram: bug detection with n-gram language models. In Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering, pages 708–719, 2016.
258
+ [33] J. Wei, M. Goyal, G. Durrett, and I. Dillig. LambdaNet: Probabilistic type inference using graph neural networks. arXiv preprint arXiv:2005.02161, 2020.
parse/train/EQbyD_KG6w-1h/EQbyD_KG6w-1h_content_list.json ADDED
@@ -0,0 +1,1185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Self-Supervised Bug Detection and Repair ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 240,
8
+ 122,
9
+ 756,
10
+ 148
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Miltiadis Allamanis, Henry Jackson-Flux∗, Marc Brockschmidt Microsoft Research, Cambridge, UK {miallama, mabrocks}@microsoft.com ",
17
+ "bbox": [
18
+ 281,
19
+ 200,
20
+ 717,
21
+ 243
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 462,
31
+ 279,
32
+ 535,
33
+ 295
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Machine learning-based program analyses have recently shown the promise of integrating formal and probabilistic reasoning towards aiding software development. However, in the absence of large annotated corpora, training these analyses is challenging. Towards addressing this, we present BUGLAB, an approach for selfsupervised learning of bug detection and repair. BUGLAB co-trains two models: (1) a detector model that learns to detect and repair bugs in code, (2) a selector model that learns to create buggy code for the detector to use as training data. A Python implementation of BUGLAB improves by up to $30 \\%$ upon baseline methods on a test dataset of 2374 real-life bugs and finds 19 previously unknown bugs in open-source software. ",
40
+ "bbox": [
41
+ 233,
42
+ 310,
43
+ 767,
44
+ 448
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 174,
54
+ 473,
55
+ 310,
56
+ 491
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Detecting and repairing bugs in source code requires strong reasoning skills over formal structures (e.g. data and control flow) and ambiguous information (e.g. identifier names, coding idioms, and comments). Traditional program analyses are able to detect critical bugs through formal reasoning and combinatorial search, but need to be manually coded by experts. That is a lengthy and costly process, which misses the opportunity to use ambiguous information pervasive within code. ",
63
+ "bbox": [
64
+ 174,
65
+ 505,
66
+ 825,
67
+ 574
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Towards broadening the applicability of such methods, and utilizing ambiguous information, deep learning-based bug detection methods are being investigated [22, 3, 13]. These methods have the potential to further improve the engineering of software we rely on every day. However, many challenges in the area remain open, such as creating robust bug detection and repair methods that cover a wide range of common bugs in the absence of large supervised training corpora. Existing work focuses on randomly inserted bugs [22, 13], Cloze test proxy tasks [3], corpora of small code edits that may contain bugs [9] or build errors [28]. All these approaches rely on datasets of very limited size or ones known not to be representative of the characteristics of bugs found in real code. ",
74
+ "bbox": [
75
+ 174,
76
+ 580,
77
+ 825,
78
+ 691
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "In this work, we propose BUGLAB, a self-supervised approach that trains robust bug detectors by co-training a bug selector that learns to create hard-to-detect bugs (Sec. 2). For example, for a given code snippet with two well-named variables, a variable misuse bug may be easy to detect and repair, whereas an incorrect comparison operator might be significantly harder to identify. We propose a neural architecture for BUGLAB (Sec. 3) and implement it for Python (Sec. 4). Our implementation considers four broad classes of seemingly simple, yet hard-to-detect bugs and shows improved performance over training with randomly-inserted bugs on PYPIBUGS, a new, manually curated test set of 2374 real-life bugs (Sec. 5). Furthermore, we tested our trained models on popular open-source Python packages and identified 19 previously unreported bugs, though false positive rates of $\\sim 9 8 \\%$ remain impractical. We hope that creating machine learning methods that can detect these bugs early and assist developers will speed up software development and allow engineers to deliver more robust software. We release PyPIBugs and our code at https://github.com/ microsoft/neurips21-self-supervised-bug-detection-and-repair. ",
85
+ "bbox": [
86
+ 174,
87
+ 698,
88
+ 825,
89
+ 877
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "2 Self-Supervised Bug Detection ",
96
+ "text_level": 1,
97
+ "bbox": [
98
+ 174,
99
+ 89,
100
+ 457,
101
+ 107
102
+ ],
103
+ "page_idx": 1
104
+ },
105
+ {
106
+ "type": "text",
107
+ "text": "In this section, we first introduce the concept of code rewriting, and then use it to define BUGLAB as a framework for self-supervised learning of bug detection and repair. ",
108
+ "bbox": [
109
+ 174,
110
+ 123,
111
+ 825,
112
+ 151
113
+ ],
114
+ "page_idx": 1
115
+ },
116
+ {
117
+ "type": "text",
118
+ "text": "Code Rewriting Rewriting is common within compilers and their optimizations, test-driven searchbased bug repair tools, mutation testing, and refactoring tools. Rewrites can be semantics-preserving (e.g. renamings of local variables), or semantics-altering (e.g. replacing $> = \\log ~ ! = )$ . ",
119
+ "bbox": [
120
+ 174,
121
+ 170,
122
+ 826,
123
+ 212
124
+ ],
125
+ "page_idx": 1
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "Let $s$ denote the set of all syntax trees (not necessarily rooted in the start symbol of the language grammar). Syntax tree locations $\\ell \\in \\{ \\epsilon \\} \\cup \\mathbb { N } ^ { * }$ in a syntax tree $\\mathrm { s } \\in { \\mathcal { S } }$ are recursively defined, where $\\mathrm { s } _ { \\vert \\epsilon } = \\mathrm { s }$ and $\\mathrm { s } _ { | \\ell }$ for $\\ell = \\ell ^ { \\prime } \\circ i$ is the $i$ -th child of $\\mathrm { s } _ { \\vert \\ell ^ { \\prime } }$ (i.e. s|(2,3) denotes the third child of the second child of s). We define a rewrite rule $\\rho = ( \\mathrm { m } _ { \\rho } , \\mathrm { t } _ { \\rho } )$ as a pair of a matching function $\\operatorname { m } _ { \\rho } : S \\{ t r u e , f a l s e \\}$ and a transformation function $\\mathrm { t } _ { \\rho } : { \\mathcal { S } } { \\mathcal { S } }$ . The matching function $\\mathrm { m } _ { \\rho } ( \\mathrm { s } )$ yields true iff the rule $\\rho$ is applicable at the root of a subtree s. The transformation function can be applied to obtain a transformed syntax tree. For convenience, we define $\\mathrm { t } _ { \\rho } ( \\mathrm { s } ) = \\mathrm { s }$ iff $\\mathrm { m } _ { \\rho } ( \\mathrm { s } ) = f a l s e$ . We then write $\\rho ( \\mathrm { s } )$ to indicate the modification of a syntax tree s using $\\rho$ when possible, and otherwise the identity function. For reversible rewrite rules $\\rho$ , we denote the inverse rule as $\\rho ^ { - 1 }$ such that $\\rho ^ { - 1 } ( \\rho ( \\mathrm { s } ) ) = \\mathbf { \\dot { s } }$ holds. We discuss concrete rewrite rules $\\rho$ in Sec. 4. ",
130
+ "bbox": [
131
+ 173,
132
+ 218,
133
+ 825,
134
+ 358
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "Given a set of rewrite rules $\\mathcal { R }$ we define the set of “potential rewrites” in a syntax tree s as $R _ { \\mathrm { s } } ^ { \\mathcal { R } } =$ $\\{ \\langle \\ell , \\rho \\rangle \\mid \\rho \\in { \\mathcal { R } } , \\ell$ location in s, $, \\mathbf { m } _ { \\rho } ( \\mathbf { s } _ { | \\ell } ) = t r u e \\}$ . For each tuple $\\langle \\ell , \\rho \\rangle \\in R _ { \\mathrm { s } } ^ { \\mathcal { R } }$ , we use $\\mathrm { s } ^ { \\prime } = \\mathrm { s } [ \\rho ] \\varrho$ to denote the new syntax tree obtained by applying $\\rho$ at location $\\ell$ of s. In BUGLAB, we train models that use rewrites from $R _ { \\mathrm { s } } ^ { \\mathcal { R } }$ to insert and repair bugs. We will discuss such neural models in Sec. 3. ",
141
+ "bbox": [
142
+ 173,
143
+ 364,
144
+ 825,
145
+ 422
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "BUGLAB In BUGLAB, we are interested in selfsupervised training of a robust bug detector model $D _ { \\theta }$ with parameters $\\theta$ on an unannotated codebase $C$ . Let $\\mathcal { R }$ be a set of rewrite rules2 that allows to insert and repair bugs. We train $D _ { \\theta }$ to be able to recognize the “hardest” possible rewrites that could be applied on our codebase $C$ For this, we consider the loss $\\mathcal { L } _ { D _ { \\theta } }$ of $D _ { \\theta }$ on a rewritten code snippet $\\mathrm { s } [ \\rho ] _ { \\ell }$ , for which the model needs to predict the repairing rewrite $\\langle \\ell , \\rho ^ { - 1 } \\rangle$ . Formally, we want to minimize the objective ",
152
+ "bbox": [
153
+ 173,
154
+ 440,
155
+ 550,
156
+ 580
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "equation",
162
+ "img_path": "images/597426b766af16b530c3086ca1c3bf9cfa4fa1541fefff8ff73eda53f624e93e.jpg",
163
+ "text": "$$\nE _ { \\mathrm { s } \\sim C } \\left[ \\operatorname* { m a x } _ { \\langle \\ell , \\rho \\rangle \\in R _ { \\mathrm { s } } ^ { \\mathcal { R } } } \\mathcal { L } _ { D _ { \\theta } } \\left( \\mathrm { s } [ \\rho ] _ { \\ell } , \\left. \\ell , \\rho ^ { - 1 } \\right. \\right) \\right] .\n$$",
164
+ "text_format": "latex",
165
+ "bbox": [
166
+ 228,
167
+ 590,
168
+ 495,
169
+ 626
170
+ ],
171
+ "page_idx": 1
172
+ },
173
+ {
174
+ "type": "image",
175
+ "img_path": "images/6a90afa1a44c13ced3e725f045bc326e6741157b1e8e404cd0b3127444e41f05.jpg",
176
+ "image_caption": [
177
+ "Figure 1: BUGLAB overview: a selector model $S _ { \\phi }$ decides which (bugintroducing) rewrite to apply to an input code snippet. Then a bug detector $D _ { \\theta }$ tries to locate and repair the inserted bug (if one was inserted). "
178
+ ],
179
+ "image_footnote": [],
180
+ "bbox": [
181
+ 563,
182
+ 434,
183
+ 823,
184
+ 618
185
+ ],
186
+ "page_idx": 1
187
+ },
188
+ {
189
+ "type": "text",
190
+ "text": "However, for any useful detector the set of rewrites $R _ { \\mathrm { s } } ^ { \\mathcal { R } }$ is commonly very large or unbounded and computing the maximum over all $\\langle \\bar { \\ell , } \\rho \\rangle \\in R _ { \\mathrm { s } } ^ { \\mathcal { R } }$ is practically intractable. To address this, BUGLAB introduces a bug selector model $S _ { \\phi }$ (with parameters $\\phi _ { , }$ ), whose goal is to approximate the intractable $\\mathrm { m a x } _ { \\langle \\ell , \\rho \\rangle \\in R _ { \\mathrm { s } } ^ { \\mathcal { R } } } \\mathcal { L } _ { D _ { \\theta } } \\left( \\cdot \\right)$ . We can then sample rewrites from $S _ { \\phi }$ instead of computing the maximum. We denote this as $\\langle \\ell , \\rho \\rangle \\sim S _ { \\phi } ( s )$ and the overall BUGLAB training objective can be written as a min-max optimization problem: ",
191
+ "bbox": [
192
+ 173,
193
+ 645,
194
+ 550,
195
+ 714
196
+ ],
197
+ "page_idx": 1
198
+ },
199
+ {
200
+ "type": "text",
201
+ "text": "",
202
+ "bbox": [
203
+ 176,
204
+ 714,
205
+ 825,
206
+ 757
207
+ ],
208
+ "page_idx": 1
209
+ },
210
+ {
211
+ "type": "equation",
212
+ "img_path": "images/e53606b879b4d2a39b079f53ba9fb551d00be5442d4142c61a4ee1789a5f3c7d.jpg",
213
+ "text": "$$\n\\operatorname* { m a x } _ { \\phi } \\operatorname* { m i n } _ { \\theta } E _ { \\mathrm { s } \\sim C } \\left[ E _ { \\langle \\ell , \\rho \\rangle \\sim S _ { \\phi } ( \\mathrm { s } ) } \\left[ \\mathcal { L } _ { D _ { \\theta } } \\left( \\mathrm { s } [ \\rho ] _ { \\ell } , \\langle \\ell , \\rho ^ { - 1 } \\rangle \\right) \\right] \\right] .\n$$",
214
+ "text_format": "latex",
215
+ "bbox": [
216
+ 315,
217
+ 767,
218
+ 681,
219
+ 792
220
+ ],
221
+ "page_idx": 1
222
+ },
223
+ {
224
+ "type": "text",
225
+ "text": "The two models $S$ and $D$ in BUGLAB are “symmetric” in the sense that they both predict rewrites on code snippets, and only differ in their objectives — one aiming to introduce bugs and one aiming to repair them. In practice, we can and do use the same architecture to model both $S$ and $D$ , which we will discuss in the next section. At test time, we discard $S$ and only use the trained detector $D$ to locate and repair bugs. ",
226
+ "bbox": [
227
+ 174,
228
+ 809,
229
+ 825,
230
+ 880
231
+ ],
232
+ "page_idx": 1
233
+ },
234
+ {
235
+ "type": "text",
236
+ "text": "3 Neural Models ",
237
+ "text_level": 1,
238
+ "bbox": [
239
+ 174,
240
+ 89,
241
+ 328,
242
+ 106
243
+ ],
244
+ "page_idx": 2
245
+ },
246
+ {
247
+ "type": "text",
248
+ "text": "In this section, we discuss how we represent code in BUGLAB and the neural models we use to learn how to rewrite code in the selector and detector models. ",
249
+ "bbox": [
250
+ 174,
251
+ 121,
252
+ 823,
253
+ 148
254
+ ],
255
+ "page_idx": 2
256
+ },
257
+ {
258
+ "type": "text",
259
+ "text": "Code Representation We consider source code as a set of entities $v _ { i } ~ \\in ~ V$ which relate to each other with a set of typed relations $e _ { k } \\in E$ , where a relation $e _ { k } = ( v _ { i } , r , v _ { j } )$ denotes a relationship between entities $v _ { i }$ and $v _ { j }$ with type $r$ . The entities and relations can be thought as a heterogeneous graph $G = ( V , E )$ . The choice of code entities and their relationships is a form of high-level feature extraction. We discuss concrete entities and relationships for Python in Sec. 4. We also define a projection function $\\mathbb { P } _ { t o k }$ that accepts $V$ and $E$ and returns a sequence $V _ { t o k }$ of the token entities in $V$ with the nodes appearing in relations in $E$ deterministically mapped to elements of $V _ { t o k }$ , i.e. $E _ { t o k } = \\{ ( p ( v _ { i } ) , r , p ( \\hat { v _ { j } } ) ) \\}$ , where $p$ maps the entities in $V$ to $V _ { t o k } . \\mathbb { P } _ { t o k }$ will be used for relational transformer models. ",
260
+ "bbox": [
261
+ 173,
262
+ 154,
263
+ 825,
264
+ 280
265
+ ],
266
+ "page_idx": 2
267
+ },
268
+ {
269
+ "type": "text",
270
+ "text": "To learn a neural representation of the code entities $v _ { i }$ , first we define an embedding function $e ( v _ { i } )$ which maps the content of each entity to an initial $D$ -dimensional representation. Throughout this work — similar to Allamanis et al. [4] and other previous work — we deterministically split the string representation of each node into subtokens (e.g., fooBar is split into foo and bar), embed them through a learned embedding matrix, and use max pooling to get a single vector. We then “contextualize” the entity representations within $G$ using one of two models: a MLP-based GNN model with max message aggregation and the GREAT relational transformer of Hellendoorn et al. [13] over the token sequence and relations $V _ { t o k } , E _ { t o k } = \\mathbb { P } _ { t o k } ( V , E )$ . GREAT uses both positional encodings and the projected relations in $E _ { t o k }$ . See Appx. A for detailed architecture descriptions. Other models to compute entity representations can be used, but were not explored in this work. ",
271
+ "bbox": [
272
+ 173,
273
+ 285,
274
+ 826,
275
+ 424
276
+ ],
277
+ "page_idx": 2
278
+ },
279
+ {
280
+ "type": "text",
281
+ "text": "We use $\\mathbfit { \\Delta } \\mathbf { r } _ { \\ell }$ to denote the computed vector representation of the entity at location $\\ell$ , independent of the model used to produce it. We use these representations to define our code rewriting models. ",
282
+ "bbox": [
283
+ 173,
284
+ 430,
285
+ 823,
286
+ 458
287
+ ],
288
+ "page_idx": 2
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "Probabilistic Code Rewriting Models Both bug selection and bug detection require to model the probability of applying a specific rewrite at a location in a code snippet s, either to introduce or repair a bug. For this, we factorize this task into localization and rewrite-given-location models, i.e. ",
293
+ "bbox": [
294
+ 174,
295
+ 464,
296
+ 823,
297
+ 507
298
+ ],
299
+ "page_idx": 2
300
+ },
301
+ {
302
+ "type": "equation",
303
+ "img_path": "images/e13f1434c8e948af685abaf2f16c7854cbf7b41c33f14f6c15af31b5c452dc11.jpg",
304
+ "text": "$$\np \\left( \\langle \\ell , \\rho \\rangle \\mid \\mathrm { s } , R _ { \\mathrm { s } } ^ { \\mathcal { R } } \\right) = p _ { l o c } { \\big ( } \\ell \\mid \\mathrm { s } , R _ { \\mathrm { s } } ^ { \\mathcal { R } } { \\big ) } p _ { r e w } { \\big ( } \\rho \\mid \\ell , \\mathrm { s } , R _ { \\mathrm { s } } ^ { \\mathcal { R } } { \\big ) } .\n$$",
305
+ "text_format": "latex",
306
+ "bbox": [
307
+ 315,
308
+ 512,
309
+ 681,
310
+ 532
311
+ ],
312
+ "page_idx": 2
313
+ },
314
+ {
315
+ "type": "text",
316
+ "text": "We model $p _ { l o c }$ as a probability distribution over the relevant locations $\\{ \\ell \\mid \\langle \\ell , \\rho \\rangle \\in R _ { \\mathrm { s } } ^ { \\mathcal { R } } \\} \\cup \\{ \\mathrm { N o B U G } \\}$ , where NoBug is a special location used to indicate that the code is not buggy. In practice, we implement this similar to a pointer net [19] using the representations $\\mathbfit { \\Delta } \\mathbf { r } _ { \\ell }$ (see Appx. A for details). ",
317
+ "bbox": [
318
+ 173,
319
+ 540,
320
+ 828,
321
+ 583
322
+ ],
323
+ "page_idx": 2
324
+ },
325
+ {
326
+ "type": "text",
327
+ "text": "To select rewrites, we use rewrite type-specific learnable rule score functions $w _ { \\rho } \\left( r _ { \\ell } , \\mathcal { M } _ { \\rho } ( \\mathrm { s } , \\ell ) \\right)$ . This function maps a vector representation of an entity $\\mathbf { \\Delta } _ { \\mathbf { \\lambda } ^ { \\mathbf { r } } \\ell }$ and potential additional metadata onto a scalar score. The rule-specific metadata $\\mathcal { M } _ { \\rho } ( \\mathrm { s } , \\ell )$ is defined for some rewrites, e.g. containing representations of other entities that could be used in the location $\\ell$ . We will discuss three concrete rule score functions in Sec. 4. The rewrite probability distribution $p _ { r e w }$ is then modeled by a softmax over the scores of all applicable rewrites at a target location $\\ell$ , i.e. ",
328
+ "bbox": [
329
+ 173,
330
+ 588,
331
+ 826,
332
+ 671
333
+ ],
334
+ "page_idx": 2
335
+ },
336
+ {
337
+ "type": "equation",
338
+ "img_path": "images/20ddd4085466fb2b98456820b56190ab15c90e6176666923f57291d6acdddecb.jpg",
339
+ "text": "$$\np _ { r e w } \\left( \\rho \\mid \\ell , \\mathbf { s } , R _ { \\mathbf { s } } ^ { \\mathcal { R } } \\right) = \\operatorname * { s o f t m a x } _ { \\langle \\ell , \\rho ^ { \\prime } \\rangle \\in R _ { \\mathbf { s } } ^ { \\mathcal { R } } } \\left( w _ { \\rho ^ { \\prime } } \\left( r _ { \\ell } , \\mathcal { M } _ { \\rho ^ { \\prime } } ( \\mathbf { s } , \\ell ) \\right) \\right) .\n$$",
340
+ "text_format": "latex",
341
+ "bbox": [
342
+ 320,
343
+ 678,
344
+ 678,
345
+ 704
346
+ ],
347
+ "page_idx": 2
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "4 A Python Implementation ",
352
+ "text_level": 1,
353
+ "bbox": [
354
+ 174,
355
+ 720,
356
+ 423,
357
+ 738
358
+ ],
359
+ "page_idx": 2
360
+ },
361
+ {
362
+ "type": "text",
363
+ "text": "This section presents an implementation of BUGLAB for Python called PYBUGLAB. PYBUGLAB currently tackles a large subset of “stupid simple bugs” [16]. Fixing these bugs requires small changes to the code, but commonly has significant impact on code correctness. Such bugs may be thought as a form of a typographical mistake or a copy-paste error, and are often relatively hard to locate by humans but obvious after the fact. They are also quite common, as observed in the empirical statistics of Karampatsis and Sutton [16] and Just et al. [14]. Future work may focus on a broader set of rewrite rules or even learnable rewrites, but as we will observe in Sec. 5 more work is needed towards this. Almost all ideas in PYBUGLAB transfer straightforwardly to other programming languages other than Python, but would require some engineering effort to implement. ",
364
+ "bbox": [
365
+ 173,
366
+ 751,
367
+ 825,
368
+ 877
369
+ ],
370
+ "page_idx": 2
371
+ },
372
+ {
373
+ "type": "text",
374
+ "text": "PYBUGLAB Code Entities and Relations In this work, we follow related literature (see Sec. 6 for more) and extract entities and relationships that are readily available by tokenizers, parsers, existing simple program analyses, or other Python-specific program analysis tools. The complete list of entities and relationships can be found in Appx. B and include syntactic entities and relations, relations about the intraprocedural data and control flow, types, and documentation. Some notable entities include SyntaxNodes, Tokens, and Symbols (references to variables and functions). Fig. 4 in Appx. B shows a graph of the entities and relationships of the snippet in Fig. 2. ",
375
+ "bbox": [
376
+ 173,
377
+ 882,
378
+ 821,
379
+ 911
380
+ ],
381
+ "page_idx": 2
382
+ },
383
+ {
384
+ "type": "image",
385
+ "img_path": "images/6fa04aa00a25535c0128e4a64746beb8ef02776ba155a61e8b37f97000e3c308.jpg",
386
+ "image_caption": [
387
+ "Figure 2: Code snippet and rewrites available to PYBUGLAB. "
388
+ ],
389
+ "image_footnote": [],
390
+ "bbox": [
391
+ 158,
392
+ 94,
393
+ 831,
394
+ 212
395
+ ],
396
+ "page_idx": 3
397
+ },
398
+ {
399
+ "type": "text",
400
+ "text": "",
401
+ "bbox": [
402
+ 173,
403
+ 258,
404
+ 825,
405
+ 328
406
+ ],
407
+ "page_idx": 3
408
+ },
409
+ {
410
+ "type": "text",
411
+ "text": "4.1 Bug-Inducing PYBUGLAB Rewrite Rules ",
412
+ "text_level": 1,
413
+ "bbox": [
414
+ 173,
415
+ 343,
416
+ 501,
417
+ 358
418
+ ],
419
+ "page_idx": 3
420
+ },
421
+ {
422
+ "type": "text",
423
+ "text": "PYBUGLAB focuses on four common kinds of bugs. Fig. 2 shows a code snippet and the rewrites allowed for each location, which number 63 even for this small example. ",
424
+ "bbox": [
425
+ 174,
426
+ 369,
427
+ 823,
428
+ 397
429
+ ],
430
+ "page_idx": 3
431
+ },
432
+ {
433
+ "type": "text",
434
+ "text": "Variable Misuse Originally defined by Allamanis et al. [3] as a Cloze test for source code, Vasic et al. [30] and Hellendoorn et al. [13] reformulated the task to localizing a variable misuse bug (if any) within a snippet and repairing it. PYBUGLAB uses the latter representation. Variable misuse bugs are common, with $1 2 . 8 \\AA - 1 4 . 8 \\%$ found in the ManySStuBs4J corpus [16] and about $6 \\%$ of them caught during Java compilation in the Google build system [28]. To insert and repair variable misuse bugs, PYBUGLAB supports variable-swapping rewrites, such as in locations $l _ { 1 }$ , $l _ { 3 }$ and $l _ { 4 }$ (amongst others) in Fig. 2. To score a variable-swapping rewrite, we use the representation of the rewrite location $\\mathbfit { \\Delta } \\mathbf { r } _ { \\ell }$ along with the representation $\\mathbf { \\Delta } _ { r _ { \\sigma } }$ of a variable Symbol $\\sigma$ that could replace the current variable, i.e. is in-scope and has been defined before $\\ell$ . The rule score function $w _ { \\rho }$ for replacing the variable at $\\ell$ with the symbol $\\sigma$ is then computed as the inner product $\\boldsymbol { r } _ { \\ell } ^ { \\top } \\boldsymbol { r } _ { \\sigma }$ . ",
435
+ "bbox": [
436
+ 173,
437
+ 404,
438
+ 826,
439
+ 544
440
+ ],
441
+ "page_idx": 3
442
+ },
443
+ {
444
+ "type": "text",
445
+ "text": "Argument Swapping (or Argument Selection) First coined by Rice et al. [26], it refers to swapping the arguments of a function invocation, e.g. in $l _ { 6 }$ of Fig. 2. Rice et al. [26] and DeepBugs [22] tackled this problem when all arguments are single identifiers. PYBUGLAB extends this to swapping arbitrary argument expressions. The rule score function $w _ { \\rho }$ for an argument swapping rewrite is a two-layer MLP applied to the concatenation of the output representations of the representation of the parameter and the to-be-swapped arguments arg1, and arg2: MLP $\\left( [ r _ { \\mathrm { p a r a m s } } , r _ { \\mathrm { a r g 1 } } , r _ { \\mathrm { a r g 2 } } ] \\right)$ . ",
446
+ "bbox": [
447
+ 173,
448
+ 550,
449
+ 825,
450
+ 635
451
+ ],
452
+ "page_idx": 3
453
+ },
454
+ {
455
+ "type": "text",
456
+ "text": "Wrong Operator Corrupting operators has a long history in mutation testing [14]. Detecting incorrect operators with deep learning was first tackled by DeepBugs [22] by using learnable embeddings of operators, operands and literals for arithmetic and comparison operators. DeepBugs focused only on binary operators. In PYBUGLAB we tackle all binary operators, including Boolean, arithmetic and comparison operators and two unary operators: logical and arithmetic negation. Locations $l _ { 1 1 }$ , $l _ { 1 4 }$ , $l _ { 1 6 }$ , and $l _ { 2 0 }$ in Fig. 2 are rewrites related to wrong operators. The rule score function $w _ { \\rho }$ for an operator rewrite again uses an inner product, $\\boldsymbol { r } _ { \\ell } ^ { \\top } \\boldsymbol { r } _ { \\mathtt { \\diamond p } }$ , where $\\pmb { r } _ { \\tt o p }$ is a learned embedding for operator op. Note that we rewrite operators only to compatible operators (e.g. $<$ to $>$ but not $^ +$ ). ",
457
+ "bbox": [
458
+ 173,
459
+ 640,
460
+ 825,
461
+ 752
462
+ ],
463
+ "page_idx": 3
464
+ },
465
+ {
466
+ "type": "text",
467
+ "text": "Wrong Literal Corrupting operands, and specifically, literals appearing in the source code, is also a common strategy in mutation testing. As in mutation testing, PYBUGLAB handles a limited number of commonly used literals, allowing rewrites to replace integer literals within the set of $- 2 , - 1 , 0 , 1 , 2$ and swapping the Boolean literal True with False and vice versa. The scoring function is identical to the operator rewrite, using a learnable embedding ${ \\bf { r } } _ { \\mathrm { { 1 i t } } }$ for each literal lit. ",
468
+ "bbox": [
469
+ 174,
470
+ 758,
471
+ 825,
472
+ 828
473
+ ],
474
+ "page_idx": 3
475
+ },
476
+ {
477
+ "type": "text",
478
+ "text": "4.2 PYBUGLAB Rewrite Rules for Data Augmentation ",
479
+ "text_level": 1,
480
+ "bbox": [
481
+ 173,
482
+ 843,
483
+ 565,
484
+ 858
485
+ ],
486
+ "page_idx": 3
487
+ },
488
+ {
489
+ "type": "text",
490
+ "text": "We additionally consider more rewrite rules that are not meant to change the program semantics, using them as a form of data augmentation. This is in spirit similar to ideas in computer vision where images are transformed (e.g. rotated, cropped) but maintain their original content. Such rewrites ",
491
+ "bbox": [
492
+ 174,
493
+ 869,
494
+ 825,
495
+ 911
496
+ ],
497
+ "page_idx": 3
498
+ },
499
+ {
500
+ "type": "text",
501
+ "text": "Require: Code dataset $C$ , initial detector/selector model parameters $\\theta ^ { ( 0 ) }$ , $\\phi ^ { ( 0 ) }$ ",
502
+ "bbox": [
503
+ 173,
504
+ 112,
505
+ 686,
506
+ 127
507
+ ],
508
+ "page_idx": 4
509
+ },
510
+ {
511
+ "type": "text",
512
+ "text": "1: for meta-epoch $i = 0$ to $I$ do \n2: // Create dataset of buggy programs: \n3: $C _ { D } ^ { ( i ) } \\gets \\left\\{ \\left( \\mathrm { s } [ \\rho ] _ { \\ell } , \\left. \\ell , \\rho ^ { - 1 } \\right. \\right) \\mid \\mathrm { s } \\in C , k \\mathrm { \\ s a m p l e s \\ } \\left. \\ell , \\rho \\right. \\sim S _ { \\phi ^ { ( i ) } } ( \\mathrm { s } ) \\right\\}$ \n4: $\\theta ^ { ( i + 1 ) } $ update $\\theta ^ { ( i ) }$ by training $D$ on $C _ { D } ^ { ( i ) }$ \n5: // Create dataset of hard-to-detect bugs: \n6: $\\begin{array} { r } { C _ { S } ^ { ( i ) } \\gets \\left\\{ \\left( \\mathrm { s } , \\mathrm { a r g } \\operatorname* { m a x } _ { \\langle \\ell , \\rho \\rangle \\in R _ { \\mathrm { s } } ^ { \\mathcal { R } } } \\left( \\mathcal { L } _ { D _ { \\theta ^ { ( i + 1 ) } } } \\left( \\mathrm { s } [ \\rho ] _ { \\ell } , \\langle \\ell , \\rho ^ { - 1 } \\rangle \\right) \\right) \\right) \\mid \\mathrm { s } \\in C \\right\\} } \\end{array}$ \n7: $\\phi ^ { ( i + 1 ) } $ update $\\phi ^ { ( i ) }$ by training $S$ on $C _ { S } ^ { ( i ) }$ ",
513
+ "bbox": [
514
+ 178,
515
+ 118,
516
+ 686,
517
+ 251
518
+ ],
519
+ "page_idx": 4
520
+ },
521
+ {
522
+ "type": "text",
523
+ "text": "have been shown to yield adversarially robust models of code [23]. Although our goal is not to provide adversarial robustness, we believe that such rewrites can help generalization. PYBUGLAB implements the following rewrites for this purpose: ",
524
+ "bbox": [
525
+ 174,
526
+ 279,
527
+ 825,
528
+ 321
529
+ ],
530
+ "page_idx": 4
531
+ },
532
+ {
533
+ "type": "text",
534
+ "text": "• Variable Renaming renames a local variable to a random name not already in scope. • Comment Deletion removes code comments, including docstrings and inline comments. Such comments commonly contain natural language information that is useful for code comprehension, but usually do not affect program semantics. • Comparison Expression Mirroring swaps the two sides of a comparison operator and changes it appropriately. For example, $\\mathtt { a } < \\mathtt { b }$ is transformed to $\\mathtt { b } > \\mathtt { a }$ . Note that in cases such as $\\mathbf { f } \\circ \\circ ( ) \\ < \\ \\mathsf { b a r } ( )$ , this will change the order of execution of foo and bar, possibly altering program semantics. • If-Else Branch Swapping negates the test condition of an if-else statement or a ternary expressions using DeMorgan’s law and swaps the then body with the else body. ",
535
+ "bbox": [
536
+ 173,
537
+ 332,
538
+ 828,
539
+ 473
540
+ ],
541
+ "page_idx": 4
542
+ },
543
+ {
544
+ "type": "text",
545
+ "text": "4.3 Implementation Details ",
546
+ "text_level": 1,
547
+ "bbox": [
548
+ 174,
549
+ 494,
550
+ 377,
551
+ 510
552
+ ],
553
+ "page_idx": 4
554
+ },
555
+ {
556
+ "type": "text",
557
+ "text": "To make the training computationally tractable we approximate Eq. 1. A simplified, sequential version of our training procedure is shown in Alg. 1. Intuitively, we alternate between training the two models, as the (discrete) sampling of rewrite rules in the selector models precludes direct endto-end training. We first use the current state of the selector model to generate “hard” samples and train the detector model on these samples (we always include the unmodified (i.e., NoBug case) as a sample). Then, we use the loss of the detector model to identify those generated samples that were hardest to detect and train the selector model to produce such samples. ",
558
+ "bbox": [
559
+ 174,
560
+ 520,
561
+ 825,
562
+ 617
563
+ ],
564
+ "page_idx": 4
565
+ },
566
+ {
567
+ "type": "text",
568
+ "text": "In practice, we implemented the training procedure as a system of asynchronously communi$C _ { D / S } ^ { ( 0 ) } , \\bar { C } _ { D / S } ^ { ( 1 ) } , \\dots$ , and all of the described steps happen in parallel. We do not use “generations”of datasets, but instead use two constantly updated “pools” of training data, one state of the corresponding data pool. We remove samples from the data pool once they have been sampled $\\nu$ times for use in training, in spirit similar to replay buffers in reinforcement learning. In our experiments, $\\nu$ was set to 4. We regularly (in separate, concurrent processes) take snapshots of the the current state of the $D$ and $S$ models to generate new elements that are updated to the data pools, matching the procedure described in Alg. 1. We approximate the arg max in line 6 by only considering the $k$ samples chosen in line 3 for each input program. During training of $S$ , we then mask out the unobserved choices before computing the loss. ",
569
+ "bbox": [
570
+ 174,
571
+ 623,
572
+ 826,
573
+ 782
574
+ ],
575
+ "page_idx": 4
576
+ },
577
+ {
578
+ "type": "text",
579
+ "text": "5 Evaluation ",
580
+ "text_level": 1,
581
+ "bbox": [
582
+ 174,
583
+ 801,
584
+ 295,
585
+ 819
586
+ ],
587
+ "page_idx": 4
588
+ },
589
+ {
590
+ "type": "text",
591
+ "text": "We now discuss our new dataset and evaluate PYBUGLAB. We $\\divideontimes$ . . . . . . . . . .highlight. . . . .key . . . . . . . .results. ",
592
+ "bbox": [
593
+ 174,
594
+ 833,
595
+ 738,
596
+ 849
597
+ ],
598
+ "page_idx": 4
599
+ },
600
+ {
601
+ "type": "text",
602
+ "text": "Datasets To train PYBUGLAB we retrieve the 4k most downloaded packages in the Python package index (PyPI) and take $3 . 4 \\mathrm { k }$ of them as training packages, using the rest for test purposes. During training, PYBUGLAB installs each package along with all its dependencies. Installing all the dependencies is important for extracting the entities and the relations beyond local syntactic ones (e.g. type inference, method resolution). For each file, PYBUGLAB checks if it is a duplicate of a file that has already been seen in the training following the method of Allamanis [1] and runs all the relevant program analyses to extract the entities and relationships in each function. When we use additional rewrites for data augmentation, these are applied at the input of the PYBUGLAB pipeline as a form of pre-processing. Following Alg. 1, the bug selector $S$ selects $k = 5$ bugs to introduce, rewrites the source code text, and then the program analyses extract the new entities and relationships for the rewritten code snippets. The initial and rewritten code snippets are then used to create the training data for the detector and selector models. ",
603
+ "bbox": [
604
+ 174,
605
+ 856,
606
+ 825,
607
+ 911
608
+ ],
609
+ "page_idx": 4
610
+ },
611
+ {
612
+ "type": "text",
613
+ "text": "",
614
+ "bbox": [
615
+ 174,
616
+ 90,
617
+ 825,
618
+ 202
619
+ ],
620
+ "page_idx": 5
621
+ },
622
+ {
623
+ "type": "text",
624
+ "text": "We use two testsets to measure performance. First, we create RANDOMBUGS, a testset of 761 445 snippets derived from functions from the $6 0 0 \\mathrm { P y P I }$ test packages (not seen during training). For each function we find within these packages we add it to the dataset along with 9 rewritten functions with a randomly inserted bug. On average graphs have 260 nodes, 601 edges, 25 rewrite locations, and 130 possible rewrites. We also collect a testset of real bugs. Although we conjecture that, in practice, the vast majority of bugs like those discussed in Sec. 4.1 are fixed when developers locally test their software, a few of those slip and then are fixed across different revisions checked into a version control systems. We have crawled the accessible repositories of all $2 8 5 \\mathrm { k }$ packages in the Python Package Index (PyPI), collected and manually filtered bugs captured by the rewrites from Sec. 4.1. $\\divideontimes$ . . . . .This. . . . . .new . . . . . . . . .dataset, . . . . . . . . . . . . . . .PYPIBUGS,. . . . . . . . . .contains. . . . . . .2374 . . . . . . . . . . . . .real-world,. . . . . . .small . . . . . . .bugs. We describe the data collection process in detail in Appx. D. In addition, we consider PYPIBUGS-PostFix: the examples from PYPIBUGS after a bug was fixed - we believe these samples are very likely to not contain any bugs anymore. We publish the dataset at https://www.microsoft.com/en-us/download/103554 and include it in the supplementary material. ",
625
+ "bbox": [
626
+ 173,
627
+ 208,
628
+ 825,
629
+ 402
630
+ ],
631
+ "page_idx": 5
632
+ },
633
+ {
634
+ "type": "text",
635
+ "text": "5.1 Quantitative Evaluation ",
636
+ "text_level": 1,
637
+ "bbox": [
638
+ 174,
639
+ 428,
640
+ 380,
641
+ 443
642
+ ],
643
+ "page_idx": 5
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "Our first experiment aims to evaluate whether the BUGLAB training framework yields more precise bug detectors. We consider two model architectures, using either GNNs or the GREAT transformer to compute embeddings of code entities (architecture details and hyperparameter choices can be found in Appx. A). We use four different training strategies: “supervised” is training only a bug detector on a fixed dataset of 1 million functions from the $3 . 4 \\mathrm { k }$ training packages with randomly inserted bugs. “Random Selector” refers to a variant of PYBUGLAB using a bug selector model that uniformly at random picks a rewrite to insert bugs. Finally, PYBUGLAB and PYBUGLAB $+ \\mathrm { A u g }$ use our framework from Sec. 2, with the latter also using additional rewrites to augment our code corpus. For the fully supervised model, we train with early stopping over a validation set; the other models are trained for a fixed number of 300 epochs (with $2 0 0 \\mathrm { k }$ training samples per epoch) for the bug detector3 and the last detector model is used for evaluation. ",
648
+ "bbox": [
649
+ 174,
650
+ 457,
651
+ 825,
652
+ 608
653
+ ],
654
+ "page_idx": 5
655
+ },
656
+ {
657
+ "type": "table",
658
+ "img_path": "images/9a6ef7f5e2c7b5670ec7841f26aeaf6731accd922bc485b255de9a3c978fbd12.jpg",
659
+ "table_caption": [
660
+ "Table 1: Accuracies $( \\% )$ for different training strategies and model architectures on RANDOMBUGS. "
661
+ ],
662
+ "table_footnote": [],
663
+ "table_body": "<table><tr><td rowspan=\"3\"></td><td colspan=\"6\">RANDOMBUGS</td></tr><tr><td></td><td>GNN</td><td></td><td></td><td>GREAT</td><td></td></tr><tr><td>Joint</td><td>Loc</td><td>Repair</td><td>Joint</td><td>Loc</td><td>Repair</td></tr><tr><td>Supervised</td><td>62.4</td><td>73.6</td><td>81.2</td><td>51.0</td><td>61.9</td><td>76.3</td></tr><tr><td>Random Selector</td><td>69.4</td><td>79.6</td><td>84.0</td><td>63.9</td><td>73.6</td><td>82.0</td></tr><tr><td>PYBUGLAB</td><td>69.6</td><td>80.4</td><td>84.2</td><td>64.0</td><td>74.3</td><td>82.3</td></tr><tr><td>PYBUGLAB +Aug</td><td>70.3</td><td>81.1</td><td>84.5</td><td>65.3</td><td>75.3</td><td>82.5</td></tr></table>",
664
+ "bbox": [
665
+ 433,
666
+ 646,
667
+ 821,
668
+ 751
669
+ ],
670
+ "page_idx": 5
671
+ },
672
+ {
673
+ "type": "text",
674
+ "text": "Effectiveness of BUGLAB Training We first consider the performance of different models on the synthetic RANDOMBUGS dataset. Tbl. 1 shows the accuracy of predicting a full bug repair correctly (“Joint”) and analogous to Eq. 2 break this up into a localization accuracy (“Loc”) of predicting the correct location (or NoBug for correct examples) and a repair accuracy (“Repair”) for selecting the correct rewrite given the buggy location. ",
675
+ "bbox": [
676
+ 174,
677
+ 616,
678
+ 419,
679
+ 753
680
+ ],
681
+ "page_idx": 5
682
+ },
683
+ {
684
+ "type": "text",
685
+ "text": "",
686
+ "bbox": [
687
+ 179,
688
+ 753,
689
+ 617,
690
+ 767
691
+ ],
692
+ "page_idx": 5
693
+ },
694
+ {
695
+ "type": "text",
696
+ "text": "We observe that $\\divideontimes$ . . . . . . . . . . . . . . . . . . . . .BUGLAB-training. . . . . . .leads. . . .to . . . . . . .more. . . . . . . .robust. . . . . .bug . . . . . . . . . . .detectors. . . . . . . . . . . . .compared. . .to. . . . . . . .other methods .......... for both GNNs and GREAT. Random selector models — a form of data augmentation — improve performance over supervised methods but mostly on in-distribution RANDOMBUGS samples. As expected, $\\divideontimes$ . . . . . . . . . . . . .augmenting. . . . .the . . . . . .code. . . . . . . . .dataset. . . . . . .helps . . . . . . . . . . . . . . . . .generalization, but does not make a substantial difference. Expanding the kinds of rewrites used to augment the data and learning to select them may improve performance in the future. ",
697
+ "bbox": [
698
+ 173,
699
+ 773,
700
+ 825,
701
+ 859
702
+ ],
703
+ "page_idx": 5
704
+ },
705
+ {
706
+ "type": "table",
707
+ "img_path": "images/45931fde220989a07d0269fc66c433e7865bbe57c0647970de9be2941d785c74.jpg",
708
+ "table_caption": [
709
+ "Table 2: Results for different training strategies and model architectures on PYPIBUGS. "
710
+ ],
711
+ "table_footnote": [],
712
+ "table_body": "<table><tr><td></td><td colspan=\"6\">PYPIBUGS</td><td colspan=\"4\">PYPIBUGS-PostFix</td></tr><tr><td></td><td colspan=\"3\">GNN</td><td colspan=\"3\">GREAT</td><td colspan=\"2\">GNN</td><td colspan=\"2\">GREAT</td></tr><tr><td></td><td>Joint</td><td>Loc</td><td>Repair</td><td>Joint</td><td>Loc</td><td>Repair</td><td>Loc</td><td>Joint AUC</td><td>Loc</td><td>Joint AUC</td></tr><tr><td>Supervised</td><td>20.0</td><td>28.4</td><td>61.8</td><td>16.8</td><td>25.8</td><td>58.6</td><td>17.8</td><td>0.087</td><td>20.7</td><td>0.044</td></tr><tr><td>Random Selector</td><td>21.2</td><td>27.0</td><td>69.2</td><td>20.6</td><td>26.8</td><td>67.2</td><td>47.5</td><td>0.108</td><td>52.5</td><td>0.117</td></tr><tr><td>PYBUGLAB</td><td>24.2</td><td>31.3</td><td>70.7</td><td>24.0</td><td>32.8</td><td>67.9</td><td>32.9</td><td>0.160</td><td>28.6</td><td>0.140</td></tr><tr><td>PYBUGLAB +Aug</td><td>26.4</td><td>33.5</td><td>72.0</td><td>23.2</td><td>29.7</td><td>68.8</td><td>32.6</td><td>0.187</td><td>48.2</td><td>0.129</td></tr></table>",
713
+ "bbox": [
714
+ 173,
715
+ 103,
716
+ 820,
717
+ 205
718
+ ],
719
+ "page_idx": 6
720
+ },
721
+ {
722
+ "type": "table",
723
+ "img_path": "images/bd939f82906d67d424796b5296bcfff95df172b83ccdaf77a3cbb3c270dc7c2c.jpg",
724
+ "table_caption": [
725
+ "Table 3: Localization and Repair Accuracy $( \\% )$ per bug kind for the PYBUGLAB +Aug model. "
726
+ ],
727
+ "table_footnote": [],
728
+ "table_body": "<table><tr><td rowspan=\"3\">Bug Type</td><td colspan=\"4\">RANDOMBUGS</td><td colspan=\"4\">PYPIBUGS</td></tr><tr><td colspan=\"2\">GNN</td><td colspan=\"2\">GREAT</td><td colspan=\"2\">GNN</td><td colspan=\"2\">GREAT</td></tr><tr><td>Loc</td><td>Repair</td><td>Loc</td><td>Repair</td><td>Loc</td><td>Repair</td><td>Loc</td><td>Repair</td></tr><tr><td>Argument Swapping</td><td>85.0</td><td>57.3</td><td>65.5</td><td>57.2</td><td>33.2</td><td>73.9</td><td>24.3</td><td>72.7</td></tr><tr><td>Wrong Assign Op</td><td>96.1</td><td>99.1</td><td>94.5</td><td>98.6</td><td>20.0</td><td>68.9</td><td>14.0</td><td>58.1</td></tr><tr><td>Wrong Binary Op</td><td>83.0</td><td>85.2</td><td>77.3</td><td>81.4</td><td>27.2</td><td>54.3</td><td>36.6</td><td>43.7</td></tr><tr><td>Wrong Boolean Op</td><td>71.8</td><td>99.5</td><td>43.6</td><td>99.5</td><td>27.6</td><td>96.9</td><td>15.7</td><td>97.2</td></tr><tr><td>Wrong Comparison Op</td><td>83.9</td><td>79.3</td><td>80.0</td><td>76.4</td><td>33.7</td><td>66.1</td><td>31.1</td><td>53.5</td></tr><tr><td>Wrong Literal</td><td>71.7</td><td>74.7</td><td>66.6</td><td>71.6</td><td>21.6</td><td>78.4</td><td>17.9</td><td>79.5</td></tr><tr><td>Variable Misuse</td><td>84.9</td><td>88.4</td><td>78.2</td><td>86.3</td><td>35.3</td><td>70.5</td><td>34.0</td><td>69.4</td></tr><tr><td>NoBUG</td><td>53.8</td><td></td><td>62.5</td><td></td><td></td><td></td><td></td><td></td></tr></table>",
729
+ "bbox": [
730
+ 173,
731
+ 234,
732
+ 823,
733
+ 404
734
+ ],
735
+ "page_idx": 6
736
+ },
737
+ {
738
+ "type": "text",
739
+ "text": "Furthermore, $\\ast { \\mathrm { l o u g } } .$ . . . . . . . . . . . . . .localization . . .is . . . . . . .much . . . . . . . .harder. . . . . .than . . . . . . . .repair . . .at . .a . . . . . . .given . . . . . . . . . .location. This is somewhat expected: there are many more candidate locations compared to potential repairs at a given location. However, this suggests that research should focus on the localization problem rather than repair. ",
740
+ "bbox": [
741
+ 174,
742
+ 429,
743
+ 825,
744
+ 473
745
+ ],
746
+ "page_idx": 6
747
+ },
748
+ {
749
+ "type": "text",
750
+ "text": "We now turn to the results on PYPIBUGS, shown in Tbl. 2, which also includes the accuracy of choosing the special NoBug location on the PYPIBUGS-PostFix dataset, as well as the area under the precision recall curve for the results on both PYPIBUGS and PYPIBUGS-PostFix. ",
751
+ "bbox": [
752
+ 176,
753
+ 478,
754
+ 821,
755
+ 521
756
+ ],
757
+ "page_idx": 6
758
+ },
759
+ {
760
+ "type": "text",
761
+ "text": "We find that $\\divideontimes$ . . . . . . . . . .detecting. . . . .and. . . . . . . . . . . .repairing . . . . . . . . .real-life. . . . . . .bugs . .is. . . . . . . . . . . . . . .significantly. . . . . . . .harder. . . . . .than. . . . . . . . . . .handling . . . . . . . . . . . .randomly . . . . . . . . .inserted. . . . . .bugs. As PYBUGLAB models trained using a learned bug selector outperform those using a “Random Selector”, we speculate that the learned selector avoids generating easy-to-detect bugs, focusing the detector model on recognizing deeper semantic patterns. Despite this, improvements in RANDOMBUGS often correlate with improvements in PYPIBUGS. This is encouraging: collecting PYPIBUGS-like datasets is costly; corpora with random bugs can help measure relative improvements to some extent. Finally, we find that $\\divideontimes$ . . . . . . . . . . . . . .recognizing . . . . . . . . . . . . .non-buggy . . . . . . . . . .samples. . .is . . . . . .very . . . . . .hard, and in particular, does not always profit from training in PYBUGLAB. ",
762
+ "bbox": [
763
+ 173,
764
+ 526,
765
+ 826,
766
+ 641
767
+ ],
768
+ "page_idx": 6
769
+ },
770
+ {
771
+ "type": "text",
772
+ "text": "In our qualitative analysis (Sec. 5.2), we observed that the models raised some confident but incorrect warnings at very “odd” locations. However, these warnings were different across models. We have tested an ensembling strategy averaging the output probabilities of five separately trained GNN models. This results in localization and repair accuracies of $8 3 . 0 \\%$ and $8 5 . 4 \\%$ on RANDOMBUGS (vs. $8 1 . 1 \\%$ and $8 4 . 5 \\%$ ) and $3 4 . 4 \\%$ and $7 2 . 2 \\%$ on PYPIBUGS (vs. $3 3 . 5 \\%$ and $7 2 . 0 \\%$ ). As we discuss in Sec. 5.2 finding the cause of the “spurious” warnings is important future work. ",
773
+ "bbox": [
774
+ 174,
775
+ 647,
776
+ 825,
777
+ 731
778
+ ],
779
+ "page_idx": 6
780
+ },
781
+ {
782
+ "type": "text",
783
+ "text": "Per-Bug Evaluation To better understand which bugs are hard to detect, we break down the results the best-performing PYBUGLAB $+ \\mathrm { A u g }$ models on RANDOMBUGS by type of bug in Tbl. 3. We observe that incorrect literals are some of the hardest bugs to detect. Incorrect assignment operators $( e . g . = \\mathrm { a n d } + = )$ ) are easy to detect in RANDOMBUGS, but significantly harder in PYPIBUGS. This may be attributed to class imbalance, with simple assignment $( = )$ being the majority class. $\\divideontimes$ Detecting . . . . . . . . . . . . . .if .a. . . . . . . . .snippet. . . . .has . .a . . . . .bug . . .or . . . .not. . . . . . . .seems . . .to . . .be. . . .the. . . . . . . . .hardest. . . . . .task:. . . .no. . . . . . . .model . . . . . . . . . .achieves. . . . . . . . . . .accuracy. . . . . . . . .beyond. $6 3 \\%$ . ",
784
+ "bbox": [
785
+ 173,
786
+ 737,
787
+ 825,
788
+ 824
789
+ ],
790
+ "page_idx": 6
791
+ },
792
+ {
793
+ "type": "text",
794
+ "text": "We note that in our experiments, GNNs-based models seem to often outperform GREAT, somewhat contradicting the results of Hellendoorn et al. [13]. We have performed substantial additional experiments to investigate and verify these results, cf. Sec. A.2. This may have to do with the performance of these models on long sequences or that the GNN has access to more fine-grained information, instead of relations over the projected token sequences. For example, this could be attributed to the lack of syntax and symbol nodes in the representation used in GREAT. Nevertheless, GREAT is noticeably better ( $6 2 . 5 \\%$ vs. $5 3 . 8 \\%$ ) at detecting NoBug and locating wrong binary operators in PYPIBUGS. ",
795
+ "bbox": [
796
+ 174,
797
+ 827,
798
+ 825,
799
+ 911
800
+ ],
801
+ "page_idx": 6
802
+ },
803
+ {
804
+ "type": "table",
805
+ "img_path": "images/8037918e569bcf21bec36b8e0c64c703d98d376bc99408953d5a9a1d383a3d17.jpg",
806
+ "table_caption": [
807
+ "Table 5: Bug distribution $( \\% )$ in different datasets "
808
+ ],
809
+ "table_footnote": [],
810
+ "table_body": "<table><tr><td>Bug Kind</td><td>PYPIBUGS</td><td>RANDOMBUGS</td><td>Selector Samples</td></tr><tr><td>Argument Swapping</td><td>11.9</td><td>8.4</td><td>23.8</td></tr><tr><td>Wrong Assignment</td><td>1.9</td><td>8.5</td><td>5.3</td></tr><tr><td>Wrong Binary Operator</td><td>3.4</td><td>2.4</td><td>2.3</td></tr><tr><td>Wrong Boolean Operator</td><td>8.1</td><td>2.2</td><td>6.4</td></tr><tr><td>Wrong Comparison Operator</td><td>17.1</td><td>8.2</td><td>7.4</td></tr><tr><td>Wrong Literal</td><td>3.7</td><td>11.6</td><td>12.4</td></tr><tr><td>Variable Misuse</td><td>53.8</td><td>58.6</td><td>42.5</td></tr></table>",
811
+ "bbox": [
812
+ 215,
813
+ 103,
814
+ 782,
815
+ 229
816
+ ],
817
+ "page_idx": 7
818
+ },
819
+ {
820
+ "type": "text",
821
+ "text": "",
822
+ "bbox": [
823
+ 174,
824
+ 272,
825
+ 823,
826
+ 300
827
+ ],
828
+ "page_idx": 7
829
+ },
830
+ {
831
+ "type": "text",
832
+ "text": "Bug Selector Performance To understand how training of the bug selector proceeds, we perform two experiments. In our first experiment, we take a snapshot of the selector model during training of the PYBUGLAB $+ \\mathrm { A u g }$ (GNN) model every 24 hours, after an initial burn-in phase of 12 hours. We then generate 10000 buggy samples using each of these snapshots and then test a fixed model on each of these snapshots. The results of this are shown in Tbl. 4, using a fully trained PYBUGLAB $+ \\mathrm { A u g }$ (GNN) model from another training run as a fixed model. We conclude that . . . . . . . . . . . . . . . . . . . . . . . . .PYBUGLAB succeeds. . . .in . . . . . . . . . .learning . . .to . . . . . . . . . .generate. . . . . . . .harder. . .to find ..........bugs, though we can observe the selector model trading off “harder-to-localize” and “harder-tofix” properties. Tests on other models show similar trends, confirming the robustness of this result. ",
833
+ "bbox": [
834
+ 174,
835
+ 306,
836
+ 549,
837
+ 460
838
+ ],
839
+ "page_idx": 7
840
+ },
841
+ {
842
+ "type": "text",
843
+ "text": "",
844
+ "bbox": [
845
+ 176,
846
+ 462,
847
+ 825,
848
+ 488
849
+ ],
850
+ "page_idx": 7
851
+ },
852
+ {
853
+ "type": "table",
854
+ "img_path": "images/c3149cb1f9f5d33fffe426f0377edd65043e8b7a01d9e6d5a8af81a8671b2daa.jpg",
855
+ "table_caption": [
856
+ "Table 4: Development of Performance on Bug Selector Samples "
857
+ ],
858
+ "table_footnote": [],
859
+ "table_body": "<table><tr><td>Training&#x27; Time</td><td>Joint</td><td>Loc</td><td>Repair</td></tr><tr><td>0.5 days</td><td>64.2</td><td>83.8</td><td>72.1</td></tr><tr><td>1.5 days</td><td>62.5</td><td>80.7</td><td>72.9</td></tr><tr><td>2.5 days</td><td>62.0</td><td>83.0</td><td>69.8</td></tr><tr><td>3.5 days</td><td>61.7</td><td>82.5</td><td>69.8</td></tr><tr><td>4.5 days</td><td>61.9</td><td>83.0</td><td>69.5</td></tr><tr><td>5.5 days</td><td>61.1</td><td>83.0</td><td>68.6</td></tr><tr><td>6.5 days</td><td>60.5</td><td>78.7</td><td>72.4</td></tr></table>",
860
+ "bbox": [
861
+ 560,
862
+ 332,
863
+ 823,
864
+ 459
865
+ ],
866
+ "page_idx": 7
867
+ },
868
+ {
869
+ "type": "text",
870
+ "text": "In a second experiment, we compare the distribution of different bug kinds in PYPIBUGS and RANDOMBUGS with the distribution of bugs sampled from the final snapshot of our selector model from above. The results are shown in Tbl. 5, where we can see that a number of bugs (argument swapping, use of wrong literals and of assignment operators) are substantially over-represented, whereas mistakes in comparison operators and variable misuse are under-represented. This indicates that . . . . . . . . . . . . . . . . . . . . . . . . . .PYBUGLAB generates. . . . . .hard . . .to . . . . . .find, . . . .but. . . .not. . . . . . . . . . . . . .necessarily . . . . . . . . . .realistic . . . . . .bugs. ",
871
+ "bbox": [
872
+ 174,
873
+ 494,
874
+ 826,
875
+ 579
876
+ ],
877
+ "page_idx": 7
878
+ },
879
+ {
880
+ "type": "text",
881
+ "text": "Comparison to CuBERT Finally, we compare our models to CuBERT [15], which uses a masked language modeling objective to pre-train a BERT-like model and then learns bug detectors specific to a class of bugs (e.g., wrong binary operators) on top of this pre-trained model. Note that CuBERT detects $i f$ a bug exists but does not localize it. For the comparison, we create two sub-datasets of PYPIBUGS: PYPIBUGS-WrongOp contains the 501 samples that involve the binary operators supported by CuBERT, and PYPIBUGS-VarMisuse, which contains the 1278 bugs that involve variable misuses. We complete both of these datasets with 501 (resp. 1278) random NoBug code samples from our RANDOMBUGS, to match the 1:1 buggy/non-buggy distribution used in CuBERT’s training. Since CuBERT classification models focus on a single bug type, to compare to PYBUGLAB we mask out all code locations that do not correspond to a bug that could be detected by the corresponding CuBERT model. We then treat the prediction of the NoBug location as a “non-buggy” prediction and all other locations as a “buggy” prediction. For example, for the snippet in Fig. 2, only the locations $l _ { 2 }$ , $l _ { 1 1 }$ , $l _ { 1 4 }$ , $l _ { 1 6 }$ , and $l _ { 2 0 }$ and their corresponding rewrites are considered by PYBUGLAB for the comparison on PYPIBUGS-WrongOp. ",
882
+ "bbox": [
883
+ 173,
884
+ 585,
885
+ 826,
886
+ 779
887
+ ],
888
+ "page_idx": 7
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "Tbl. 6 shows the results of comparing the released CuBERT snapshots with the PYBUGLAB +Aug GNN model. We observe that $\\divideontimes$ . . . .the . . . . . . . . . . . . . . . . . . . . . . . . .PYBUGLAB models ",
893
+ "bbox": [
894
+ 173,
895
+ 785,
896
+ 356,
897
+ 871
898
+ ],
899
+ "page_idx": 7
900
+ },
901
+ {
902
+ "type": "table",
903
+ "img_path": "images/55b3364d400dfb104c428ee8540f8da946936e41c3e3c9c9a4e40abf08959203.jpg",
904
+ "table_caption": [
905
+ "Table 6: Comparison with CuBERT [15] "
906
+ ],
907
+ "table_footnote": [],
908
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">CuBERT</td><td colspan=\"3\">PYBUGLAB (GNN)</td></tr><tr><td>Prec</td><td>Recall</td><td>F1</td><td>Prec</td><td>Recall</td><td>F1</td></tr><tr><td>PYPIBUGs-WrongOp</td><td>0.764</td><td>0.251</td><td>0.378</td><td>0.730</td><td>0.764</td><td>0.746</td></tr><tr><td>PYPIBUGS-VarMisuse</td><td>0.632</td><td>0.403</td><td>0.493</td><td>0.740</td><td>0.840</td><td>0.787</td></tr></table>",
909
+ "bbox": [
910
+ 364,
911
+ 796,
912
+ 823,
913
+ 864
914
+ ],
915
+ "page_idx": 7
916
+ },
917
+ {
918
+ "type": "text",
919
+ "text": ". . . . .have. . . . . . . . . . . . . . . .substantially . . . . . . .better. . . . . . .recall. . . . . .than. . . . . . . . . . . . . . . . . . .CuBERT-based . . . . . . . . .models, even though they were trained to detect more bug types. When calibrating the CuBERT models to have a recall equal to PYBUGLAB, heir precision drops substantially. In particular, on PYPIBUGS-WrongOp, it is reduced to 0.609, and ",
920
+ "bbox": [
921
+ 181,
922
+ 869,
923
+ 826,
924
+ 911
925
+ ],
926
+ "page_idx": 7
927
+ },
928
+ {
929
+ "type": "text",
930
+ "text": "1 def make_id(name): \n2 $\\mathbf { r } \\ =$ get_rand_string(12) \n3 if len(name) <= 22: \n4 name $=$ name[:22] \n5 return name $\\textrm { + } \\textrm { -- } \\textrm { + } \\textrm { \\pmb { r } }$ (a) A wrong comparison operator bug (red box) in PYPIBUGS detected and repaired by the GNN PYBUGLAB +Aug models. ",
931
+ "bbox": [
932
+ 163,
933
+ 108,
934
+ 468,
935
+ 213
936
+ ],
937
+ "page_idx": 8
938
+ },
939
+ {
940
+ "type": "text",
941
+ "text": "1 def update(self, roomId, \n2 title, \\*\\*request_params): \n3 check_type(roomId, basestring) \n4 check_type(roomId, basestring) \n5 [...] ",
942
+ "bbox": [
943
+ 486,
944
+ 97,
945
+ 774,
946
+ 160
947
+ ],
948
+ "page_idx": 8
949
+ },
950
+ {
951
+ "type": "text",
952
+ "text": "(b) A variable misuse (red box) caught in an open-source project. GNN PYBUGLAB $+ \\mathrm { A u g }$ suggests to rewrite roomId to title. The fixing pull request is found here. ",
953
+ "bbox": [
954
+ 496,
955
+ 174,
956
+ 825,
957
+ 213
958
+ ],
959
+ "page_idx": 8
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "Figure 3: Bugs found by PYBUGLAB. Snippets reformatted and abbreviated to fit figure. ",
964
+ "bbox": [
965
+ 207,
966
+ 220,
967
+ 789,
968
+ 236
969
+ ],
970
+ "page_idx": 8
971
+ },
972
+ {
973
+ "type": "text",
974
+ "text": "on PYPIBUGS-VarMisuse, it is reduced to 0.613; in both cases, PYBUGLAB outperforms CuBERT substantially. ",
975
+ "bbox": [
976
+ 173,
977
+ 277,
978
+ 825,
979
+ 306
980
+ ],
981
+ "page_idx": 8
982
+ },
983
+ {
984
+ "type": "text",
985
+ "text": "5.2 Qualitative Inspection of Raised Warnings ",
986
+ "text_level": 1,
987
+ "bbox": [
988
+ 174,
989
+ 338,
990
+ 508,
991
+ 354
992
+ ],
993
+ "page_idx": 8
994
+ },
995
+ {
996
+ "type": "text",
997
+ "text": "We now take a qualitative look at the raised warnings raised by PYBUGLAB. As example, Fig. 3a shows a sample of PYPIBUGS where the developer used an incorrect comparison operator. Once pointed to it, it is clear to a human that the truncation statement in line 4 has no effect (under the reasonable assumption that name is a string), and that a different comparison operator $( > )$ is necessary. ",
998
+ "bbox": [
999
+ 174,
1000
+ 372,
1001
+ 825,
1002
+ 428
1003
+ ],
1004
+ "page_idx": 8
1005
+ },
1006
+ {
1007
+ "type": "text",
1008
+ "text": "To gain an understanding of the performance of PYBUGLAB on realistic data, we performed an indepth analysis of the cases flagged as bugs by our best-performing model on the code found within the 4k top PyPI packages. We observed a mixture of false positives with few previously unseen real-life bugs, matching the quantitative results in Tbl. 3. First, we find that the majority of the false positives are “incorrect literal” detections. This suggests that learning to detect such bugs is a hard problem. Furthermore, many literals serve as default “configurations” (e.g. the number of retries for a network request) and different values are not bugs. We posit that a large percentage of literal replacements the selector learns to make fall in this category. ",
1009
+ "bbox": [
1010
+ 174,
1011
+ 434,
1012
+ 825,
1013
+ 545
1014
+ ],
1015
+ "page_idx": 8
1016
+ },
1017
+ {
1018
+ "type": "text",
1019
+ "text": "We also found that some repairs suggested by the model actually produce semantically equivalent code. For example, the model lacks knowledge that two variables refer to the same object in memory (aliasing), and so attempts to “repair” variable misuse bugs by switching between these. Other examples includes checking the return values of standard functions such as Python’s str.find, which returns $^ { - 1 }$ if the query string is not found. In such cases, PYBUGLAB often suggested to rewrite an if $\\mathbf { x } \\lrcorner \\mathbf { f i n d } ( \\mathbf { y } ) \\ \\ll \\ - 1$ to if $\\mathbf { x } \\lrcorner \\mathbf { f i n d } ( \\mathbf { y } ) \\ = - 1$ , which makes no difference in practice. These false negatives can be attributed to the fact that the bug selector model considers such changes as introducing bugs, even though they are not actually changing behavior. This suggests that for better results, the rewrite rules need to ensure that the rewrites are not semantics-preserving and represent bugs. ",
1020
+ "bbox": [
1021
+ 173,
1022
+ 551,
1023
+ 825,
1024
+ 689
1025
+ ],
1026
+ "page_idx": 8
1027
+ },
1028
+ {
1029
+ "type": "text",
1030
+ "text": "Finally, some reported issues were sufficiently complex that it took us (the human authors) a couple of minutes of thought to conclude that a warning is spurious. Simultaneously, there are some warnings that are “obviously” incorrect to us, but the reasons why the neural models raise them is unclear. This highlights the importance of research on explainability techniques along with better ways to calibrate model confidence. The fact that selectors may introduce spurious “bugs” may also be affecting how the detector model learns. Ideas that have appeared in reinforcement learning, such as the one of Dennis et al. [8], may allow models to improve their performance in spite of spurious bugs. ",
1031
+ "bbox": [
1032
+ 174,
1033
+ 695,
1034
+ 825,
1035
+ 792
1036
+ ],
1037
+ "page_idx": 8
1038
+ },
1039
+ {
1040
+ "type": "text",
1041
+ "text": "Overall, $\\yen 123,456,7$ . . .of. . . . .the . . . . . .1000. . . . . . . . . . .reported . . . . . . . . . . .warnings . . . . . .were. . . . . . . .found . . .to . . .be. . . . . . . . . .real-life. . . . . . .bugs. Of these 19, we reported 11 on GitHub (6 already merged, 5 pending approval). See Appx. G for details. 3 other bugs had already been fixed between the version PYBUGLAB processed and the current version or the project was deprecated, whereas another 5 bugs are minor and we decided not to report them. One of the detected bugs is shown in Fig. 3b. Overall, most of the detected bugs appear within unit tests, logging, or exception handling, possibly because bugs there do not impact the core functionality of a project. However, given the number of such bugs we collected in PYPIBUGS, we believe that such bugs arise equally often in other code, but that they are detected and fixed more quickly. ",
1042
+ "bbox": [
1043
+ 174,
1044
+ 799,
1045
+ 825,
1046
+ 911
1047
+ ],
1048
+ "page_idx": 8
1049
+ },
1050
+ {
1051
+ "type": "text",
1052
+ "text": "Although our analysis only forms a lower bound on the precision of PYBUGLAB and related methods, it suggests that there is still ample room for future improvements towards making machine learningbased bug detection and repair practically useful. ",
1053
+ "bbox": [
1054
+ 174,
1055
+ 90,
1056
+ 825,
1057
+ 133
1058
+ ],
1059
+ "page_idx": 9
1060
+ },
1061
+ {
1062
+ "type": "text",
1063
+ "text": "6 Related Work ",
1064
+ "text_level": 1,
1065
+ "bbox": [
1066
+ 174,
1067
+ 152,
1068
+ 321,
1069
+ 170
1070
+ ],
1071
+ "page_idx": 9
1072
+ },
1073
+ {
1074
+ "type": "text",
1075
+ "text": "Detecting bugs in source code has been researched since the early days of computing. Traditionally, bug detection is tackled as a formal task, where any code that cannot be proved to satisfy some correctness property may contain a bug. This is essential for security- and safety-critical bugs, but not for other — equally common — bugs. In the last decade, software engineering and programming language research have increasingly realized ambiguous information within code (e.g. variable names, comments) contains valuable information and using this information can yield valuable results [2]. The main premise is that patterns in source code, such as patterns in names, control, and data flow can be informative. This information can also be exploited to detect some bugs. For example, Ray et al. [24] noted that even simple language models tend to assign lower probability to buggy code. ",
1076
+ "bbox": [
1077
+ 174,
1078
+ 185,
1079
+ 825,
1080
+ 310
1081
+ ],
1082
+ "page_idx": 9
1083
+ },
1084
+ {
1085
+ "type": "text",
1086
+ "text": "Multiple static analysis methods have been researched that combine some form of data-oriented bug detection. This ranges from language model-based tools, such as the early work of Wang et al. [32] to specification-mining tools such as the work of Eberhardt et al. [10]. BUGLAB is related to DeepBugs [22] which uses an MLP over a limited window of code tokens and train separate models to detect wrong operators, operands, and argument swappings. BUGLAB opts for a more structured representation of code and a single model. Allamanis et al. [3], Vasic et al. [30], Hellendoorn et al. [13] tackle variable misuse bugs (one of the kinds of bugs included in PYBUGLAB) but either by randomly introducing the bugs in code or using a Cloze-like test. Instead, BUGLAB opts for a selfsupervised approach and tackles a broader range of bugs. Concurrently to this work, Patra and Pradel [21] showed an alternative method for learning to generate realistic bugs. Dinella et al. [9] learn a supervised sequential model that performs graph transformations that replicate small edits in code (refactoring, introducing functionality, bug fixing, etc.). Their model — Hoppity — could serve as a learnable rewrite operation in BUGLAB in future work. Dynamic analysis methods have also been researched with promising results [31], but collecting representative dynamic traces over a diverse set of programs at scale (e.g. from the top Python packages used in this work) is practically impossible. ",
1087
+ "bbox": [
1088
+ 174,
1089
+ 316,
1090
+ 826,
1091
+ 523
1092
+ ],
1093
+ "page_idx": 9
1094
+ },
1095
+ {
1096
+ "type": "text",
1097
+ "text": "BUGLAB is related to ideas around self-supervised learning recently explored in deep learning, computer vision, and NLP. In our case, we aim to train a bug detection model without using training data from real-life bugs. BUGLAB resembles ELECTRA [6], with the important difference that the rewrites to the input code go beyond single token replacement that need to respect strict constraints of programming languages (syntax, variable scopes) and the model is directly used for bug detection, rather than for pre-training. The main BUGLAB objective Eq. 1 also resembles GANs [12] with the exception that the objective is non-differentiable (introducing a bug alters the discrete data representation), the selector is a structured probabilistic code rewriting model, and that we are mainly interested in the bug detector (analogous to the discriminator) rather than the selector. ",
1098
+ "bbox": [
1099
+ 174,
1100
+ 529,
1101
+ 825,
1102
+ 655
1103
+ ],
1104
+ "page_idx": 9
1105
+ },
1106
+ {
1107
+ "type": "text",
1108
+ "text": "7 Discussion and Conclusions ",
1109
+ "text_level": 1,
1110
+ "bbox": [
1111
+ 176,
1112
+ 674,
1113
+ 434,
1114
+ 691
1115
+ ],
1116
+ "page_idx": 9
1117
+ },
1118
+ {
1119
+ "type": "text",
1120
+ "text": "Learned program analyses offer the promise to improve how we develop software. They also offer a great opportunity to study machine learning models that combine formal and probabilistic reasoning. Towards achieving these we presented BUGLAB, a self-supervised approach for learning program analyses, that improves upon baseline methods and detects bugs in real-life code. We also empirically show the limitations of existing bug-detecting machine learning methods, which suffer from impractical false-positive rates. Importantly, we show the large gap of performance of existing methods on corpora of randomly inserted bugs — commonly used in prior work — and real-life bugs. ",
1121
+ "bbox": [
1122
+ 174,
1123
+ 705,
1124
+ 826,
1125
+ 804
1126
+ ],
1127
+ "page_idx": 9
1128
+ },
1129
+ {
1130
+ "type": "text",
1131
+ "text": "Acknowledgements ",
1132
+ "text_level": 1,
1133
+ "bbox": [
1134
+ 176,
1135
+ 824,
1136
+ 338,
1137
+ 840
1138
+ ],
1139
+ "page_idx": 9
1140
+ },
1141
+ {
1142
+ "type": "text",
1143
+ "text": "We want to thank Sebastian Nowozin and Marwin Segler for helpful discussions, Marwin Segler for comments on a draft of this work, and the anonymous reviewers for useful questions and suggestions. Finally, we would like to thank the contributors to the following open-source tools used: PyTorch [20], PyDriller [27], MessagePack, LibCST, Jedi, Kubernetes, Helm. ",
1144
+ "bbox": [
1145
+ 176,
1146
+ 856,
1147
+ 826,
1148
+ 911
1149
+ ],
1150
+ "page_idx": 9
1151
+ },
1152
+ {
1153
+ "type": "text",
1154
+ "text": "References \n[1] M. Allamanis. The adverse effects of code duplication in machine learning models of code. In Proceedings of the 2019 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software, pages 143–153, 2019. \n[2] M. Allamanis, E. T. Barr, P. Devanbu, and C. Sutton. A survey of machine learning for big code and naturalness. ACM Computing Surveys (CSUR), 51(4):1–37, 2018. \n[3] M. Allamanis, M. Brockschmidt, and M. Khademi. Learning to represent programs with graphs. In International Conference on Learning Representations (ICLR), 2018. \n[4] M. Allamanis, E. Barr, S. Ducousso, and Z. Gao. Typilus: Neural type hints. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 91–105. Association for Computing Machinery (ACM), 2020. \n[5] T. Bachlechner, B. P. Majumder, H. H. Mao, G. W. Cottrell, and J. McAuley. Rezero is all you need: Fast convergence at large depth. arXiv preprint arXiv:2003.04887, 2020. \n[6] K. Clark, M.-T. Luong, Q. V. Le, and C. D. Manning. ELECTRA: Pre-training text encoders as discriminators rather than generators. arXiv preprint arXiv:2003.10555, 2020. \n[7] M. Cvitkovic, B. Singh, and A. Anandkumar. Deep learning on code with an unbounded vocabulary. In Machine Learning 4 Programming, 2018. \n[8] M. Dennis, N. Jaques, E. Vinitsky, A. Bayen, S. Russell, A. Critch, and S. Levine. Emergent complexity and zero-shot transfer via unsupervised environment design. arXiv preprint arXiv:2012.02096, 2020. \n[9] E. Dinella, H. Dai, Z. Li, M. Naik, L. Song, and K. Wang. Hoppity: Learning graph transformations to detect and fix bugs in programs. In International Conference on Learning Representations, 2019. \n[10] J. Eberhardt, S. Steffen, V. Raychev, and M. Vechev. Unsupervised learning of API aliasing specifications. In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 745–759, 2019. \n[11] J. Gilmer, S. S. Schoenholz, P. F. Riley, O. Vinyals, and G. E. Dahl. Neural message passing for quantum chemistry. In International Conference on Machine Learning, pages 1263–1272, 2017. \n[12] I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial networks. arXiv preprint arXiv:1406.2661, 2014. \n[13] V. J. Hellendoorn, C. Sutton, R. Singh, P. Maniatis, and D. Bieber. Global relational models of source code. In International Conference on Learning Representations, 2020. \n[14] R. Just, D. Jalali, L. Inozemtseva, M. D. Ernst, R. Holmes, and G. Fraser. Are mutants a valid substitute for real faults in software testing? In Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, pages 654–665, 2014. \n[15] A. Kanade, P. Maniatis, G. Balakrishnan, and K. Shi. Learning and evaluating contextual embedding of source code. In International Conference on Machine Learning (ICML), 2020. \n[16] R.-M. Karampatsis and C. Sutton. How often do single-statement bugs occur? the ManySStuBs4J dataset. In Proceedings of the 17th International Conference on Mining Software Repositories, pages 573–577, 2020. \n[17] J. Katz. Libraries.io Open Source Repository and Dependency Metadata, Jan. 2020. URL https://doi.org/10.5281/zenodo.3626071. \n[18] Y. Li, D. Tarlow, M. Brockschmidt, and R. Zemel. Gated graph sequence neural networks. In International Conference on Learning Representations (ICLR), 2016. ",
1155
+ "bbox": [
1156
+ 171,
1157
+ 87,
1158
+ 830,
1159
+ 922
1160
+ ],
1161
+ "page_idx": 10
1162
+ },
1163
+ {
1164
+ "type": "text",
1165
+ "text": "[19] S. Merity, C. Xiong, J. Bradbury, and R. Socher. Pointer sentinel mixture models. In International Conference on Learning Representations (ICLR), 2017. ",
1166
+ "bbox": [
1167
+ 171,
1168
+ 90,
1169
+ 826,
1170
+ 121
1171
+ ],
1172
+ "page_idx": 11
1173
+ },
1174
+ {
1175
+ "type": "text",
1176
+ "text": "[20] A. Paszke, S. Gross, S. Chintala, G. Chanan, E. Yang, Z. DeVito, Z. Lin, A. Desmaison, L. Antiga, and A. Lerer. Automatic differentiation in PyTorch. 2017. \n[21] J. Patra and M. Pradel. Semantic bug seeding: a learning-based approach for creating realistic bugs. In Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, pages 906–918, 2021. \n[22] M. Pradel and K. Sen. DeepBugs: A learning approach to name-based bug detection. Proceedings of the ACM on Programming Languages, 2(OOPSLA):1–25, 2018. \n[23] G. Ramakrishnan, J. Henkel, Z. Wang, A. Albarghouthi, S. Jha, and T. Reps. Semantic robustness of models of source code. arXiv preprint arXiv:2002.03043, 2020. \n[24] B. Ray, V. Hellendoorn, S. Godhane, Z. Tu, A. Bacchelli, and P. Devanbu. On the ”naturalness” of buggy code. In 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE), pages 428–439. IEEE, 2016. \n[25] V. Raychev, M. Vechev, and A. Krause. Predicting program properties from Big Code. In Principles of Programming Languages (POPL), 2015. \n[26] A. Rice, E. Aftandilian, C. Jaspan, E. Johnston, M. Pradel, and Y. Arroyo-Paredes. Detecting argument selection defects. Proceedings of the ACM on Programming Languages, 1(OOPSLA): 1–22, 2017. \n[27] D. Spadini, M. Aniche, and A. Bacchelli. PyDriller: Python framework for mining software repositories. In Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering - ESEC/FSE 2018, pages 908–911, New York, New York, USA, 2018. ACM Press. ISBN 9781450355735. doi: 10.1145/3236024.3264598. URL http://dl.acm.org/citation. cfm?doid $\\equiv$ 3236024.3264598. \n[28] D. Tarlow, S. Moitra, A. Rice, Z. Chen, P.-A. Manzagol, C. Sutton, and E. Aftandilian. Learning to fix build errors with Graph2Diff neural networks. In Proceedings of the IEEE/ACM 42nd International Conference on Software Engineering Workshops, pages 19–20, 2020. \n[29] H. Touvron, M. Cord, A. Sablayrolles, G. Synnaeve, and H. Jegou. Going deeper with image ´ transformers. arXiv preprint arXiv:2103.17239, 2021. \n[30] M. Vasic, A. Kanade, P. Maniatis, D. Bieber, and R. Singh. Neural program repair by jointly learning to localize and repair. arXiv preprint arXiv:1904.01720, 2019. \n[31] K. Wang and Z. Su. Blended, precise semantic program embeddings. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 121–134, 2020. \n[32] S. Wang, D. Chollak, D. Movshovitz-Attias, and L. Tan. Bugram: bug detection with n-gram language models. In Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering, pages 708–719, 2016. \n[33] J. Wei, M. Goyal, G. Durrett, and I. Dillig. LambdaNet: Probabilistic type inference using graph neural networks. arXiv preprint arXiv:2005.02161, 2020. ",
1177
+ "bbox": [
1178
+ 169,
1179
+ 98,
1180
+ 828,
1181
+ 785
1182
+ ],
1183
+ "page_idx": 11
1184
+ }
1185
+ ]
parse/train/EQbyD_KG6w-1h/EQbyD_KG6w-1h_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/EQbyD_KG6w-1h/EQbyD_KG6w-1h_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hk91SGWR-/Hk91SGWR-.md ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # INVESTIGATING HUMAN PRIORS FOR PLAYING VIDEO GAMES
2
+
3
+ Rachit Dubey, Pulkit Agrawal, Deepak Pathak, Thomas L. Griffiths, and Alexei A. Efros
4
+
5
+ University of California, Berkeley
6
+
7
+ # ABSTRACT
8
+
9
+ What makes humans so good at solving seemingly complex video games? Unlike computers, humans bring in a great deal of prior knowledge about the world, enabling efficient decision making. This paper investigates the role of human priors for solving video games. Given a sample game, we conduct a series of ablation studies to quantify the importance of various priors. We do this by modifying the video game environment to systematically mask different types of visual information that could be used by humans as priors. We find that removal of some prior knowledge causes a drastic degradation in the speed with which human players solve the game, e.g. from 2 minutes to over 20 minutes. Furthermore, our results indicate that general priors, such as the importance of objects and visual consistency, are critical for efficient game-play.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ While deep Reinforcement Learning (RL) methods have shown impressive performance on a variety of video games (Mnih et al., 2015), they remain woefully inefficient compared to human players, taking millions of action inputs to solve even the simplest Atari games. Much research is currently focused on improving sample efficiency of RL algorithms (Oh et al., 2017; Gu et al., 2016). However, there is an orthogonal issue that is often overlooked: RL agents attack each problem tabula rasa, whereas humans come in with a wealth of prior knowledge about the world, from physics to semantics to affordances.
14
+
15
+ Consider the following motivating example: you are tasked with playing an unfamiliar computer game shown in Figure 1(a). No manual or instructions are provided; you don’t even know which game sprite is controlled by you. Indeed, the only feedback you are ever given is “terminal”, i.e. once you successfully finish the game. Would you be able to successfully finish this game? How long would it take? We recruited forty human subjects to play this game and found that subjects finished it quite easily, taking just under 1 minute of game-play or 3000 action inputs. This is not overly surprising as one could easily guess that the game’s goal is to move the robot sprite towards the princess by stepping on the brick-like objects and using ladders to reach the higher platforms while avoiding the angry pink and the fire objects.
16
+
17
+ Now consider a second scenario in which this same simple game is re-rendered with new textures, getting rid of semantic and affordance (Gibson, 2014) cues, as shown in Figure 1(b). How would human performance change? We recruited another forty subjects to play this game and found that, on average, it took the players more than twice the time (2 minutes) and action inputs ( 6500) to complete the game. The second game is clearly much harder for humans, likely because it is now more difficult to guess the game structure and goal, as well as to spot obstacles.
18
+
19
+ For comparison, we can also examine how modern RL algorithms perform on these games. This is not so simple, as most standard RL approaches expect very dense rewards (e.g. continuously updated game-score (Mnih et al., 2015)), whereas we provide only a terminal reward, to mimic how most humans play video games. In such sparse reward scenarios, standard methods like A3C (Mnih et al., 2016) are too sample-inefficient and were too slow to finish the games. Hence, we used a curiosity-based RL algorithm specifically tailored to sparse-reward settings (Pathak et al., 2017), which was able to solve both games. Unlike humans, RL did not show much difference between the two games, taking about 4 million action inputs to solve each one. This should not be surprising: since RL did not have any prior knowledge about the world, both these games carried roughly the same amount of information from the perspective of the agent.
20
+
21
+ ![](images/c37716b0322148eb37283fbdf8219c7d957917a639ec67d4635058d95679c3ed.jpg)
22
+ Figure 1: Motivating example. (a) A simple platformer game. (b) The same game modified by re-rendering the textures. Despite the two games being structurally the same, human players took twice as long to finish the second game as the first one. In comparison, the performance of an RL agent was approximately the same for the two games.
23
+
24
+ This simple motivating experiment highlights the importance of prior knowledge that humans draw upon to quickly solve tasks given to them (Lake et al., 2016; Tsividis et al., 2017). Developmental psychologists have begun documenting the prior knowledge that children draw upon in learning about the world (Spelke & Kinzler, 2007; Carey, 2009). However, these studies have not explicitly quantified the relative importance of the various priors for problem-solving.
25
+
26
+ In this work, we systematically quantify the importance of different types of priors humans bring to bear while solving one particular kind of problem – video games. We chose video games as the task for our investigation because it is relatively easy to methodically change the game to include or mask different kinds of knowledge and run large-scale human studies. Furthermore, video games, such as ATARI, are a popular choice in the reinforcement learning community.
27
+
28
+ The paper consists of a series of ablation studies on a specially-designed game environment, systematically masking out various types of visual information that could be used by humans as priors. The full game (unlike the motivating example above) was designed to be sufficiently complex and difficult for humans to easily measure changes in performance between different testing conditions.
29
+
30
+ We find that removal of some prior knowledge causes a drastic degradation in the performance of human players from 1 minute to over 20 minutes. Another key finding of our investigation is that while specific knowledge, such as “ladders are to be climbed”, “keys are used to open doors”, “jumping on spikes is dangerous”, is important for humans to quickly solve games, more general priors about the importance of objects and visual consistency are even more critical.
31
+
32
+ # 2 METHOD
33
+
34
+ To investigate the aspects of visual information that enable humans to efficiently solve video games, we designed a browser-based platform game consisting of an agent sprite, platforms, ladders, angry pink object that kills the agent, spikes that are dangerous to jump on, a key, and a door (see Figure 2 (a)). The agent sprite can be moved with the help of arrow keys. A terminal reward of $+ 1$ is provided when the agent reaches the door after having to taken the key, thereby terminating the game. The game is reset whenever the agent touches the enemy, jumps on the spike, or falls below the lowest platform. We made this game to resemble the exploration problems faced in the classic ATARI game of Montezuma’s Revenge that has proven to be very challenging for deep reinforcement learning techniques (Bellemare et al., 2016; Mnih et al., 2015). Unlike the motivating example, this game is too large-scale to be solved by RL agents, but provides the complexity we need to run a wide range of human experiments.
35
+
36
+ We created different versions of the video game by re-rendering various entities such as ladders, enemies, keys, platforms etc. using alternate textures (Figure 2). These textures were chosen to mask various forms of prior knowledge that are described in the experiments section. We also changed various physical properties of the game, such as the effect of gravity, and the way the agent interacts with its environment. Note that all the games were exactly the same in their underlying structure and reward, as well as the shortest path to reach the goal, thereby ensuring that the change in human performance (if any) is only due to masking of the priors.
37
+
38
+ ![](images/0edfda630ee4b64a7d02dba3086235177d1ca7f3981e18e046692df1d3a36ac7.jpg)
39
+ Figure 2: Various game manipulations. (a) Original version of the game. (b) Game with masked objects to ablate semantics prior. (c) Game with reversed associations as an alternate way to ablate semantics prior. (d) Game with masked objects and distractor objects to ablate the concept of object. (e) Game with background textures to ablate affordance prior. (f) Game with background textures and different colors for all platforms to ablate similarity prior. (g) Game with modified ladder to hinder participant’s prior about ladder interactions. (h) Rotated game to change participant’s prior about gravity.
40
+
41
+ We quantified human performance on each version of the game by recruiting 120 participants from Amazon Mechanical Turk. Each participant was instructed to finish the game as quickly as possible using the arrow keys as controls, but no information about the goals or the reward structure of the game was communicated. Each participant was paid $\$ 1$ for successfully completing the game. The maximum time allowed for playing the game was set to 30 minutes. For each participant, we recorded the $( x , y )$ position of the player at every step of the game, the total time taken by the participant to finish the game and the total number of deaths before finishing the game. We used this data to quantify the performance of each participant. Note that each participant was only allowed to complete a game once, and could not participate again (i.e. different 120 participants played each version of the game).
42
+
43
+ # 3 QUANTIFYING THE IMPORTANCE OF OBJECT PRIORS
44
+
45
+ The original game (available to play at this link) is shown in Figure 2(a). A single glance at this game is enough to inform human players that the agent sprite has to reach the key to open the door while avoiding the dangerous objects like spikes and angry pink slime. Unsurprisingly, humans quickly solve this game. Figure 3(a) shows that the average time taken to complete the game is 1.8 minutes (blue bar) and the average number of deaths (3.3, orange bar) and unique game states visited (3011, yellow bar) are all quite small.
46
+
47
+ # 3.1 SEMANTICS
48
+
49
+ To study the importance of prior knowledge about object semantics, we rendered objects and ladders with blocks of uniform color as shown in Figure 2(b). This game can be played at this link. In this version, the visual appearance of objects conveys no information about their semantics. Results in Figure 3(b) show that human players take more than twice the time (4.3 minutes), have higher number of deaths (11.1), and explore significantly larger number of states (7205) as compared to the original game (p-value: $p < 0 . 0 1 $ ). This clearly demonstrates that masking semantics hurts human performance.
50
+
51
+ A natural question is how do humans make use of semantic information? One hypothesis is that knowledge of semantics enables humans to infer the latent reward structure of the game. If this indeed is the case, then in the original game, where the key and the door are both visible, players should first visit the key and then go to the door, while in the version of the game without semantics, players should not exhibit such bias. We found that in the original game, nearly all participants reached the key first, while in the version with masked semantics only 42 out of 120 participants reached the key before the door (see Figure 4(a)). Moreover, human players took significantly longer to reach the door after taking the key as compared to the original game (see Figure 4(b)). This result provides further evidence that in the absence of semantics, humans are unable to infer the reward structure and consequently significantly increase their exploration. To rule out the possibility that increase in time is simply due to the fact players take longer to finish the game without semantics, the time to reach the door after taking the key was normalized by the total amount of time spent by the player to complete the game.
52
+
53
+ ![](images/b7b5614824f7092dba875b8d09480f3580dd53a369b9377a42930d1fd7f689b1.jpg)
54
+ Figure 3: Quantifying the influence of various object priors. The blue bar shows average time taken by humans (in minutes), orange bar shows the average number of deaths, and yellow bar shows the number of unique states visited by players to solve the various games. For visualization purposes, the number of deaths is divided by 2, and the number of states is divided by 1000 respectively.
55
+
56
+ To further quantify the importance of semantics, instead of simply masking, we manipulated the semantic prior by swapping the semantics between different entities. As seen on Figure 4(c), we replaced the pink enemy and spikes by coins and ice-cream objects respectively which have a positive connotation; the ladder by fire, the key and the door by spikes and enemies which have negative connotations (see game link). As shown in Figure 3(c), the participants took longer to solve this game (6.1 minutes, $p < 0 . 0 1 $ ). The average number of deaths (13.7) was also significantly more and the participants explored more states (9400) compared to the original version $\mathit { p } < 0 . 0 1$ for both). Interestingly, the participants also took longer compared to the masked semantics version $( p < 0 . 0 5 )$ implying that when we reverse semantic information, humans find the game even tougher.
57
+
58
+ # 3.2 OBJECTS AS SUB-GOALS FOR EXPLORATION
59
+
60
+ While blocks of uniform color in the game shown in Figure 2(b) convey no semantics, they are distinct from the background and seem to attract human attention. It is possible that humans infer these distinct entities (or objects) as sub-goals, which results in more efficient exploration than random search. That is, there is something special about objects that draws human attention compared to any random piece of texture. To test this, we modified the game to cover each space on the platform with a block of different color to hide where the objects are (see Figure 2(d), game link). Most colored blocks are placebos and do not correspond to any object and the actual objects have the same color and form as in the previous version of the game with masked semantics (i.e., Figure 2(b)). If the prior knowledge that visibly distinct entities are interesting to explore is critical, this game manipulation should lead to a significant drop in human performance.
61
+
62
+ Results in Figure 3(d) show that masking the concept of objects leads to drastic deterioration in performance. The average time taken by human players to solve the game is nearly four times longer (7.7 minutes), the number of deaths is nearly six times greater (20.2), and humans explore four times as many game states (12, 232) as compared to the original game. When compared to the game version in which only semantic information was removed (Figure 3(b)), the time taken, number of deaths and number of states are all significantly greater $( p < 0 . 0 1 )$ ). When only semantics are removed, after encountering one object, human players become aware of what possible locations might be interesting to explore next. However, when concept of objects is also masked, it is unclear what to explore next. This effect can be seen by the increase in normalized time taken to reach the door from the key as compared to the game where only semantics are masked (Figure 4(b)). All these results suggest that concept of objects i.e. knowing that visibly distinct entities are interesting and can be used as sub-goals for exploration, is a critical prior and perhaps more important than knowledge of semantics.
63
+
64
+ ![](images/0b81effaaea534ff6de8b5e18ac2414c448284af2a794dc4f6a5cfee58825bf9.jpg)
65
+ Figure 4: Change in behavior upon ablation of various priors. (a) Graph comparing number of participants that reached the key before the door in the original version, game without semantics, and game without object prior. (b) Amount of time taken by participants to reach the door once they obtained the key. (c) Average number of steps taken by participants to reach various vertical levels in original version, game without affordance, and game without similarity.
66
+
67
+ # 3.3 AFFORDANCES
68
+
69
+ Until now, we manipulated objects in ways that made inferring the underlying reward structure of the game non-trivial. However, in these games it was obvious for humans that platforms can support agent sprites, ladders could be climbed to reach different platforms (even when the ladders were colored in uniform red in games shown in Figure 2(b,c), the connectivity pattern revealed where the ladders were) and black parts of the game constitute free space. Here, the platforms and ladders afford the actions of walking and climbing (Gibson, 2014), irrespective of their appearance. In the next set of experiments, we manipulated the game to mask the affordance prior.
70
+
71
+ One way to mask affordances is to fill free space with random textures, which are visually similar to textures used for rendering ladders and platforms (see Figure 2(e), game link). Note that in this game manipulation, objects and their semantics are clearly observable. When tasked to play this game, as shown in Figure 3(e), humans require significantly more time (4.7 minutes), die more often (10.7), and visit more states (7031) compared to the original game $\mathit { p } < 0 . 0 1 )$ ). On the other hand, there is no significant difference in performance compared to the game without semantics, i.e., Figure 2(b), implying that the affordance prior is as important as the semantics prior in our setup.
72
+
73
+ # 3.4 THINGS THAT LOOK SIMILARLY, BEHAVE SIMILARLY
74
+
75
+ In the previous game, although we masked affordance information, once the player realizes that it is possible to stand on a particular texture and climb a specific texture, it is easy to use color/texture similarity to identify other platforms and ladders in the game. Similarly, in the game with masked semantics (Figure 2(b)), visual similarity can be used to identify other enemies and spikes. These considerations suggest that a general prior of the form that things that look the same act the same might help humans efficiently explore environments where semantics or affordances are hidden.
76
+
77
+ We tested this hypothesis by modifying the masked affordance game in a way that none of the platforms and ladders had the same visual signature (Figure 2(f), game link). Such rendering prevented human players from using the similarity prior. Figure 3(f)) shows that performance of humans was significantly worse in comparison to the original game (Figure 2(a)), the game with masked semantics (Figure 2(b)) and the game with masked affordances (Figure 2(e)) $\mathit { p } < 0 . 0 1 )$ . When compared to the game with no object information (Figure 2(d)), the time to complete the game (7.6 minutes) and the number of states explored by players were similar (11, 715), but the number of deaths (14.8) was significantly lower $( p < 0 . 0 1 )$ ). These results suggest that visual similarity is the second most important prior used by humans in gameplay after the knowledge of directing exploration towards objects.
78
+
79
+ ![](images/38ddc00fb1a334f8127e4ef21d154734c36f992907b627e310e8e117fba43637.jpg)
80
+ Figure 5: Masking all object priors drastically affects human performance. (a) Original game. (b) Version without any object priors. (c) Graph depicting difference in participant’s performance for both the games. (d) Exploration trajectory for original version and (e) for no object prior version.
81
+
82
+ In order to gain insight into how this prior knowledge affects humans, we investigated the exploration pattern of human players. In the game when all information is visible we expected that the progress of humans would be uniform in time. In the case when affordances are removed, the human players would initially take some time to figure out what visual pattern corresponds to what entity and then quickly make progress in the game. Finally, in the case when the similarity prior is removed, we would expect human players to be unable to generalize any knowledge across the game and to take large amounts of time exploring the environment even towards the end. We investigated if this indeed was true by computing the time taken by each player to reach different vertical distances in the game for the first time. Note that the door is on the top of the game, so the moving up corresponds to getting closer to solving the game. The results of this analysis are shown in Figure 4(c). The horizontal-axis shows the height reached by the player and the vertical-axis show the average time taken by the players. As the figure shows, the results confirm our hypothesis.
83
+
84
+ # 3.5 HOW TO INTERACT WITH OBJECTS
85
+
86
+ Until now we have analyzed the prior knowledge used by humans to interpret the visual structure in the game. However, interpretation of visual structure is only useful if the player understands what to do with the interpretation. Humans seem to possess prior knowledge about how to interact with different objects. For example, monsters can be avoided by jumping over them, ladders can be climbed by pressing the up key repeatedly etc. Deep reinforcement learning agents, on the other hand, do not possess such priors and must learn how to interact with objects by mere trial and error.
87
+
88
+ To test how critical such prior knowledge is, we created a version of the game in which the ladders couldn’t be climbed by simply pressing the up key. Instead, the ladders were zigzag in nature and in order to climb the ladder players had to press the up key, followed by alternating presses between the right and left key. Note that the ladders in this version looked like normal ladders, so players couldn’t infer the properties of the ladder by simply looking at them (see Figure $2 ( \mathbf { g } )$ , game link). As shown in Figure $3 ( \mathbf { g } )$ , changing the property of the ladder increases the time taken (3.6 minutes), number of deaths (6), and states explored (5942) when compared to the original game $( p < 0 . 0 1 )$ ).
89
+
90
+ # 4 TAXONOMY OF OBJECT PRIORS
91
+
92
+ In previous sections, we studied how different priors about objects affect human performance one at a time. To quantify human performance when all object priors investigated so far are simultaneously masked, we created the game shown in Figure 5(b) that hid all information about objects, semantics, affordance, and similarity(game link). Results in Figure 5(c) show that humans found it extremely hard to play this game. The average time taken to solve the game increased to 20 minutes and the average number of deaths rose sharply to 40. Remarkably, the exploration trajectory of humans is now almost completely random as shown in Figure 5(e) with the number of unique states visited by the human players increasing by a factor of 9 as compared to the original game. Due to difficulty in completing this game, we noticed a high dropout of human participants before they finished the game. We had to increase the pay to $\$ 2.25$ to encourage participants not to quit. Many participants noted that they could solve the game only by memorizing it.
93
+
94
+ Even though we preserved priors related to physics (e.g., objects fall down) and motor control (e.g., pressing left key moves the agent sprite to the left), just by rendering the game in a way that makes it impossible to use prior knowledge about how to visually interpret the game screen makes the game extremely hard to play. To further test the limits of human ability, we designed a harder game where we also reversed gravity and randomly re-mapped the key presses to how it affect’s the motion of agent’s sprite. We, the creators of the game, having played a previous version of the game hundreds of times had an extremely hard time trying to complete this version of the game. This game placed us in the shoes of reinforcement learning (RL) agents that start off without the immense prior knowledge that humans possess. While improvements in the performance of RL agents with better algorithms and better computational resources is inevitable, our results make a strong case for developing algorithms that incorporate prior knowledge as a way to improve the performance of artificial agents.
95
+
96
+ ![](images/c6de54deff9ffc6f81218d7fddc60a2fd4a31716a09d2a617bcdb3bec17213fc.jpg)
97
+ Figure 6: Taxonomy of object priors. The earlier an object prior is obtained during childhood, the more critical that object prior is in human problem solving in video games.
98
+
99
+ While there are many possible directions on how to incorporate priors in RL and more generally AI agents, it is informative to study how humans acquire such priors. Studies in developmental psychology suggest that human infants as young as 2 months old possess a primitive notion of objects and expect them to move as connected and bounded wholes that allows them to perceive object boundaries and therefore possibly distinguish them from the background (Spelke, 1990; Spelke & Kinzler, 2007). At this stage, infants do not reason about object categories. By the age of 3-5 months, infants start exhibiting categorization behavior based on similarity and familiarity (Mandler, 1998; Mareschal & Quinn, 2001). The ability to recognize individual objects rapidly and accurately emerges comparatively late in development (usually by the time babies are 18-24 months old (Pereira & Smith, 2009)). Similarly, while young infants exhibit some knowledge about affordances early during development, the ability to distinguish a walkable step from a cliff emerges only by the time they are 18 months old (Kretch & Adolph, 2013).
100
+
101
+ These results in infant development suggest that starting with a primitive notion of objects, infants gradually learn about visual similarity and eventually about object semantics and affordances. It is quite interesting to note that the order in which infants increase their knowledge matches the importance of different object priors such as the existence of objects as sub-goals for exploration, visual similarity, object semantics, and affordances. Based on these results, we suggest a possible taxonomy and ranking of object priors in Figure 6. We put ‘object interaction’ at the bottom as in the context of our problem, knowledge about how to interact with specific objects can be only learned once recognition is performed.
102
+
103
+ # 5 PHYSICS AND MOTOR CONTROL PRIORS
104
+
105
+ In addition to prior knowledge about objects, humans also bring in rich prior knowledge about intuitive physics and strong motor control priors when they approach a new task (Hespos et al., 2009; Baillargeon, 2004; 1994; Wolpert & Ghahramani, 2000). Here, we have taken some initial steps to explore the importance of such priors in context of human gameplay.
106
+
107
+ # 5.1 GRAVITY
108
+
109
+ One of the most obvious forms of knowledge that we have about the physical world is with regards to gravity, i.e., things fall from up to down. To mask this prior, we created a version of the game in which the whole game window was rotated $9 0 ^ { \circ }$ (refer to Figure $2 ( \mathrm { h } ) _ { \cdot }$ ). In this way, the gravity was reversed from left to right (as opposed to up to down). As shown in Figure 7, participants spent more time to solve this game compared to the original version with average time taken close to 3 minutes $( p < 0 . 0 1 )$ . The average number of deaths and number of states explored was also significantly larger than the original version $( p < 0 . 0 1 )$ .
110
+
111
+ ![](images/fe57c9bff923118ead29402503f9e21af64cc76837b8dca3ee63c45ab9747c73.jpg)
112
+ Figure 7: Quantifying physics and motor control priors. Graph shows performance of participants in original version, game with gravity reversed, and game with key controls reversed. Number of deaths is divided by 2 and number of states is divided by 1000.
113
+
114
+ # 5.2 MUSCLE MEMORY
115
+
116
+ Human players also come with knowledge about the consequences of actions such as pressing arrow keys moves the agent sprite in the corresponding directions (i.e., pressing up makes the agent sprite jump, pressing left makes the agent sprite go left and so forth). We created a version of the game in which we reversed the arrow key controls. Thus, pressing the left arrow key made the agent sprite go right, pressing the right key moved the sprite left, pressing the down key made the player jump (or go up the stairs), and pressing the up key made the player go down the stairs. Participants again took longer to solve this game compared to the original version with average time taken close to 3 minutes (refer to Figure 7). The average number of deaths and number of states explored was also significantly larger than the original version $( p \ < \ 0 . 0 1 )$ . Interestingly, the performance of players when the gravity was reversed, and key controls were reversed is similar, with no significant difference between the two conditions.
117
+
118
+ # 6 CONTROLLING FOR CHANGE IN COMPLEXITY
119
+
120
+ So far in this paper, we have manipulated various visual priors while keeping the underlying game and reward structure exactly the same. We have assumed that this will influence human performance while keeping RL agent performance unchanged, since RL does not have any priors to begin with. However, one possible confound is that the visual complexity of the modified games might have changed from the original game version, because masking out priors without changing visual complexity is extremely difficult.
121
+
122
+ To control for this confound, we investigated the performance of an RL agent on the various game manipulations. If RL agents are not affected by the game manipulations, then it would suggest that prior knowledge and not visual complexity is the main reason behind the change in human performance. Note that this confound is not present in the physics and motor control experiments as the visual input stays the same as the original game.
123
+
124
+ To this end, we systematically created different versions of the game in Figure 1(a) to ablate semantics, the concept of object, affordance, and similarity as shown in Figure 8. Note that the game used for human experiments shown in Figure 2 is more complex than the game used for RL experiments in Figure 8. This is because the larger game was simply too hard for state-of-the-art RL agents to solve. Apart from the difference in the game size, we tried to make the games as similar as possible. Even though this version of the game is simpler (regarding size, number of objects etc.), we note that this game is still non-trivial for an RL agent. For instance, due to the sparse reward structure of the game, both A3C (Mnih et al., 2016) and breadth-first search didn’t come close to solving the game even after 10 million steps. Hence, for our purpose, we used an RL algorithm augmented with a curiosity based exploration strategy (Pathak et al., 2017). For each game version, we report the mean performance of five random seeds that succeeded.
125
+
126
+ As shown in Figure 8(e), the RL agent was unaffected by the removal of semantics, the concept of objects, as well as affordances – there is no significant difference between the mean score of the RL agent on these games when compared to the performance on the original game $( p > 0 . 0 5 )$ . This suggests that the drop in human performance in these game manipulations is not due to the change in visual complexity, but it is rather due to the masking of the various priors. On the other hand, the performance of the RL agent does worsen when visual similarity is masked as it takes nearly twice as many interactions to complete the game compared to the original version. We believe this is due to to the use of convolutional neural networks that implicitly impose the prior of visual similarity rather than simply due to the change in visual complexity.
127
+
128
+ ![](images/7df00ec37565f947b2632b34158d12258e7b7bacb8dbd404173302b2ddc64feb.jpg)
129
+ Figure 8: Quantifying the performance of RL agent. (a) Game without semantic information. (b) Game with masked and distractor objects to ablate concept of objects. (c) Game without affordance information. (d) Game without similarity information. (e) Performance of RL agent on various game manipulations (steps shown in order of million). Error bars indicate standard error of mean for the 5 random seeds. The RL agent performs similarly on all games except for the one without visual similarity.
130
+
131
+ # 7 DISCUSSION
132
+
133
+ While there is no doubt that the performance of deep RL algorithms is impressive, there is much to be learned from human cognition if our goal is to enable RL agents to solve sparse reward tasks with human-like efficiency. Humans have the amazing ability to use their past knowledge (i.e., priors) to solve new tasks quickly. Success in such scenarios critically depends on the agent’s ability to explore its environment and then promptly learn from its successes (Daw et al., 2006; Cohen et al., 2007). In this vein, our results demonstrate the importance of prior knowledge in helping humans explore efficiently in these sparse reward environments (Knox et al., 2012; Gershman & Niv, 2015).
134
+
135
+ However, being equipped with strong prior knowledge can sometimes lead to constrained exploration that might not be optimal in all environments (Lucas et al., 2014; Bonawitz et al., 2011). For instance, consider the game shown in Figure 9 consisting of a robot and a princess object. The game environment also includes rewards in hidden locations (shown as dashed yellow boxes only for illustration). When tasked to play this game, human participants $\mathrm { ( n { = } 3 0 } ) _ { , }$ ) immediately assume that princess is the goal and do not explore the free space containing hidden rewards. They directly reach the princess and thereby terminate the game with sub-optimal rewards. In contrast, a random agent (30 seeds) ends up obtaining almost four times more reward than human players as shown in Figure 9. Thus, while incorporating prior knowledge in RL agents has many potential benefits, future work should also consider challenges regarding under-constrained exploration in certain kinds of settings.
136
+
137
+ While our paper primarily investigated object priors (and physics priors to some extent), humans also possess rich prior knowledge about the world in the form of intuitive psychology and also bring in various priors about general video game playing such as that moving up and to the right in games is generally correlated with progress, games have goals, etc. Studying the importance of such priors will be an interesting future direction of research.
138
+
139
+ Building RL algorithms that require fewer interactions to reach the goal (i.e., sample efficient algorithms) is an active area of research, and further progress is inevitable. In addition to developing better optimization methods, we believe that instead of always initializing learning from scratch, either incorporating prior knowledge directly or constructing mechanisms for condensing experience into reusable knowledge (i.e., learning priors through continual learning) might be critical for building RL agents with human-like efficiency. Our work takes first steps toward quantifying the importance of various priors that humans employ in solving video games and in understanding how prior knowledge makes humans good at such complex tasks. We believe that our results will inspire researchers to think about different mechanisms of incorporating prior knowledge in the design of RL agents. We also hope that our experimental platform of video games, available in open-source, will fuel more detailed studies investigating human priors and a benchmark for quantifying the efficacy of different mechanisms of incorporating prior knowledge into RL agents.
140
+
141
+ ![](images/545251162cf99cc4a4b04eb7881fad9852398bb62b8a09c2d2f92a2e484ab430.jpg)
142
+ Figure 9: Prior information constrains human exploration. (Left) A very simple game with hidden rewards (shown in dashed yellow). (Right) Average rewards accumulated by human players vs a random agent.
143
+
144
+ # ACKNOWLEDGEMENT
145
+
146
+ We thank Jordan Suchow, Michael Chang, Shubham Tulsiani, Alison Gopnik, and other members of the BAIR community for helpful discussions and comments. This work has been supported, in part, by Google, ONR MURI N00014-14-1-0671, Berkeley DeepDrive, NVIDIA Graduate Fellowship to DP, and the Valrhona Reinforcement Learning Fellowship.
147
+
148
+ # REFERENCES
149
+
150
+ Renee Baillargeon. How do infants learn about the physical world? Current Directions in Psychological Science, 3(5):133–140, 1994.
151
+
152
+ Renee Baillargeon. Infants’ physical world. ´ Current directions in psychological science, 13(3): 89–94, 2004.
153
+
154
+ Marc Bellemare, Sriram Srinivasan, Georg Ostrovski, Tom Schaul, David Saxton, and Remi Munos. Unifying count-based exploration and intrinsic motivation. In NIPS, 2016.
155
+
156
+ Elizabeth Bonawitz, Patrick Shafto, Hyowon Gweon, Noah D Goodman, Elizabeth Spelke, and Laura Schulz. The double-edged sword of pedagogy: Instruction limits spontaneous exploration and discovery. Cognition, 120(3):322–330, 2011.
157
+
158
+ Susan Carey. The origin of concepts. Oxford University Press, 2009.
159
+
160
+ Jonathan D Cohen, Samuel M McClure, and J Yu Angela. Should i stay or should i go? how the human brain manages the trade-off between exploitation and exploration. Philosophical Transactions of the Royal Society B: Biological Sciences, 362(1481):933–942, 2007.
161
+
162
+ Nathaniel D Daw, John P O’Doherty, Peter Dayan, Ben Seymour, and Raymond J Dolan. Cortical substrates for exploratory decisions in humans. Nature, 441(7095):876–879, 2006.
163
+
164
+ Samuel J Gershman and Yael Niv. Novelty and inductive generalization in human reinforcement learning. Topics in cognitive science, 7(3):391–415, 2015.
165
+
166
+ James J Gibson. The ecological approach to visual perception: classic edition. Psychology Press, 2014.
167
+
168
+ Shixiang Gu, Timothy Lillicrap, Ilya Sutskever, and Sergey Levine. Continuous deep q-learning with model-based acceleration. In ICML, 2016.
169
+
170
+ Susan J Hespos, Alissa L Ferry, and Lance J Rips. Five-month-old infants have different expectations for solids and liquids. Psychological Science, 20(5):603–611, 2009.
171
+
172
+ W Bradley Knox, A Ross Otto, Peter Stone, and Bradley Love. The nature of belief-directed exploratory choice in human decision-making. Frontiers in psychology, 2:398, 2012.
173
+
174
+ Kari S Kretch and Karen E Adolph. Cliff or step? posture-specific learning at the edge of a drop-off. Child Development, 84(1):226–240, 2013.
175
+
176
+ Brenden M Lake, Tomer D Ullman, Joshua B Tenenbaum, and Samuel J Gershman. Building machines that learn and think like people. Behavioral and Brain Sciences, pp. 1–101, 2016.
177
+
178
+ Christopher G Lucas, Sophie Bridgers, Thomas L Griffiths, and Alison Gopnik. When children are better (or at least more open-minded) learners than adults: Developmental differences in learning the forms of causal relationships. Cognition, 131(2):284–299, 2014.
179
+
180
+ Jean M. Mandler. Representation. In Cognition, perception, and language: Handbook of child psychology. John Wiley & Sons Inc, 1998.
181
+
182
+ Denis Mareschal and Paul C Quinn. Categorization in infancy. Trends in cognitive sciences, 5(10): 443–450, 2001.
183
+
184
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 2015.
185
+
186
+ Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy P Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In ICML, 2016.
187
+
188
+ Junhyuk Oh, Satinder Singh, and Honglak Lee. Value prediction network. In NIPS, 2017.
189
+
190
+ Deepak Pathak, Pulkit Agrawal, Alexei A Efros, and Trevor Darrell. Curiosity-driven exploration by self-supervised prediction. arXiv preprint arXiv:1705.05363, 2017.
191
+
192
+ Alfredo F Pereira and Linda B Smith. Developmental changes in visual object recognition between 18 and 24 months of age. Developmental science, 12(1):67–80, 2009.
193
+
194
+ Elizabeth S Spelke. Principles of object perception. Cognitive science, 14(1):29–56, 1990.
195
+
196
+ Elizabeth S Spelke and Katherine D Kinzler. Core knowledge. Developmental science, 10(1):89–96, 2007.
197
+
198
+ Pedro A Tsividis, Thomas Pouncy, Jacqueline L Xu, Joshua B Tenenbaum, and Samuel J Gershman. Human learning in atari. In The AAAI 2017 Spring Symposium on Science of Intelligence: Computational Principles of Natural and Artificial Intelligence, 2017.
199
+
200
+ Daniel M Wolpert and Zoubin Ghahramani. Computational principles of movement neuroscience. Nature neuroscience, 3:1212–1217, 2000.
parse/train/Hk91SGWR-/Hk91SGWR-_content_list.json ADDED
@@ -0,0 +1,1189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "INVESTIGATING HUMAN PRIORS FOR PLAYING VIDEO GAMES ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 821,
10
+ 145
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Rachit Dubey, Pulkit Agrawal, Deepak Pathak, Thomas L. Griffiths, and Alexei A. Efros ",
17
+ "bbox": [
18
+ 186,
19
+ 175,
20
+ 805,
21
+ 190
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "University of California, Berkeley ",
28
+ "bbox": [
29
+ 388,
30
+ 203,
31
+ 609,
32
+ 217
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 258,
43
+ 544,
44
+ 273
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "What makes humans so good at solving seemingly complex video games? Unlike computers, humans bring in a great deal of prior knowledge about the world, enabling efficient decision making. This paper investigates the role of human priors for solving video games. Given a sample game, we conduct a series of ablation studies to quantify the importance of various priors. We do this by modifying the video game environment to systematically mask different types of visual information that could be used by humans as priors. We find that removal of some prior knowledge causes a drastic degradation in the speed with which human players solve the game, e.g. from 2 minutes to over 20 minutes. Furthermore, our results indicate that general priors, such as the importance of objects and visual consistency, are critical for efficient game-play. ",
51
+ "bbox": [
52
+ 233,
53
+ 290,
54
+ 764,
55
+ 443
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 474,
66
+ 336,
67
+ 489
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "While deep Reinforcement Learning (RL) methods have shown impressive performance on a variety of video games (Mnih et al., 2015), they remain woefully inefficient compared to human players, taking millions of action inputs to solve even the simplest Atari games. Much research is currently focused on improving sample efficiency of RL algorithms (Oh et al., 2017; Gu et al., 2016). However, there is an orthogonal issue that is often overlooked: RL agents attack each problem tabula rasa, whereas humans come in with a wealth of prior knowledge about the world, from physics to semantics to affordances. ",
74
+ "bbox": [
75
+ 174,
76
+ 498,
77
+ 825,
78
+ 595
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Consider the following motivating example: you are tasked with playing an unfamiliar computer game shown in Figure 1(a). No manual or instructions are provided; you don’t even know which game sprite is controlled by you. Indeed, the only feedback you are ever given is “terminal”, i.e. once you successfully finish the game. Would you be able to successfully finish this game? How long would it take? We recruited forty human subjects to play this game and found that subjects finished it quite easily, taking just under 1 minute of game-play or 3000 action inputs. This is not overly surprising as one could easily guess that the game’s goal is to move the robot sprite towards the princess by stepping on the brick-like objects and using ladders to reach the higher platforms while avoiding the angry pink and the fire objects. ",
85
+ "bbox": [
86
+ 174,
87
+ 603,
88
+ 825,
89
+ 728
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Now consider a second scenario in which this same simple game is re-rendered with new textures, getting rid of semantic and affordance (Gibson, 2014) cues, as shown in Figure 1(b). How would human performance change? We recruited another forty subjects to play this game and found that, on average, it took the players more than twice the time (2 minutes) and action inputs ( 6500) to complete the game. The second game is clearly much harder for humans, likely because it is now more difficult to guess the game structure and goal, as well as to spot obstacles. ",
96
+ "bbox": [
97
+ 174,
98
+ 736,
99
+ 823,
100
+ 819
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "For comparison, we can also examine how modern RL algorithms perform on these games. This is not so simple, as most standard RL approaches expect very dense rewards (e.g. continuously updated game-score (Mnih et al., 2015)), whereas we provide only a terminal reward, to mimic how most humans play video games. In such sparse reward scenarios, standard methods like A3C (Mnih et al., 2016) are too sample-inefficient and were too slow to finish the games. Hence, we used a curiosity-based RL algorithm specifically tailored to sparse-reward settings (Pathak et al., 2017), which was able to solve both games. Unlike humans, RL did not show much difference between the two games, taking about 4 million action inputs to solve each one. This should not be surprising: since RL did not have any prior knowledge about the world, both these games carried roughly the same amount of information from the perspective of the agent. ",
107
+ "bbox": [
108
+ 174,
109
+ 827,
110
+ 823,
111
+ 922
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "image",
117
+ "img_path": "images/c37716b0322148eb37283fbdf8219c7d957917a639ec67d4635058d95679c3ed.jpg",
118
+ "image_caption": [
119
+ "Figure 1: Motivating example. (a) A simple platformer game. (b) The same game modified by re-rendering the textures. Despite the two games being structurally the same, human players took twice as long to finish the second game as the first one. In comparison, the performance of an RL agent was approximately the same for the two games. "
120
+ ],
121
+ "image_footnote": [],
122
+ "bbox": [
123
+ 334,
124
+ 101,
125
+ 660,
126
+ 234
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "",
133
+ "bbox": [
134
+ 176,
135
+ 303,
136
+ 821,
137
+ 344
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "This simple motivating experiment highlights the importance of prior knowledge that humans draw upon to quickly solve tasks given to them (Lake et al., 2016; Tsividis et al., 2017). Developmental psychologists have begun documenting the prior knowledge that children draw upon in learning about the world (Spelke & Kinzler, 2007; Carey, 2009). However, these studies have not explicitly quantified the relative importance of the various priors for problem-solving. ",
144
+ "bbox": [
145
+ 174,
146
+ 351,
147
+ 825,
148
+ 421
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "In this work, we systematically quantify the importance of different types of priors humans bring to bear while solving one particular kind of problem – video games. We chose video games as the task for our investigation because it is relatively easy to methodically change the game to include or mask different kinds of knowledge and run large-scale human studies. Furthermore, video games, such as ATARI, are a popular choice in the reinforcement learning community. ",
155
+ "bbox": [
156
+ 174,
157
+ 428,
158
+ 825,
159
+ 498
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "The paper consists of a series of ablation studies on a specially-designed game environment, systematically masking out various types of visual information that could be used by humans as priors. The full game (unlike the motivating example above) was designed to be sufficiently complex and difficult for humans to easily measure changes in performance between different testing conditions. ",
166
+ "bbox": [
167
+ 174,
168
+ 505,
169
+ 823,
170
+ 560
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "We find that removal of some prior knowledge causes a drastic degradation in the performance of human players from 1 minute to over 20 minutes. Another key finding of our investigation is that while specific knowledge, such as “ladders are to be climbed”, “keys are used to open doors”, “jumping on spikes is dangerous”, is important for humans to quickly solve games, more general priors about the importance of objects and visual consistency are even more critical. ",
177
+ "bbox": [
178
+ 174,
179
+ 568,
180
+ 825,
181
+ 637
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "2 METHOD ",
188
+ "text_level": 1,
189
+ "bbox": [
190
+ 174,
191
+ 665,
192
+ 282,
193
+ 681
194
+ ],
195
+ "page_idx": 1
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "To investigate the aspects of visual information that enable humans to efficiently solve video games, we designed a browser-based platform game consisting of an agent sprite, platforms, ladders, angry pink object that kills the agent, spikes that are dangerous to jump on, a key, and a door (see Figure 2 (a)). The agent sprite can be moved with the help of arrow keys. A terminal reward of $+ 1$ is provided when the agent reaches the door after having to taken the key, thereby terminating the game. The game is reset whenever the agent touches the enemy, jumps on the spike, or falls below the lowest platform. We made this game to resemble the exploration problems faced in the classic ATARI game of Montezuma’s Revenge that has proven to be very challenging for deep reinforcement learning techniques (Bellemare et al., 2016; Mnih et al., 2015). Unlike the motivating example, this game is too large-scale to be solved by RL agents, but provides the complexity we need to run a wide range of human experiments. ",
200
+ "bbox": [
201
+ 174,
202
+ 694,
203
+ 825,
204
+ 847
205
+ ],
206
+ "page_idx": 1
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "We created different versions of the video game by re-rendering various entities such as ladders, enemies, keys, platforms etc. using alternate textures (Figure 2). These textures were chosen to mask various forms of prior knowledge that are described in the experiments section. We also changed various physical properties of the game, such as the effect of gravity, and the way the agent interacts with its environment. Note that all the games were exactly the same in their underlying structure and reward, as well as the shortest path to reach the goal, thereby ensuring that the change in human performance (if any) is only due to masking of the priors. ",
211
+ "bbox": [
212
+ 174,
213
+ 854,
214
+ 823,
215
+ 924
216
+ ],
217
+ "page_idx": 1
218
+ },
219
+ {
220
+ "type": "image",
221
+ "img_path": "images/0edfda630ee4b64a7d02dba3086235177d1ca7f3981e18e046692df1d3a36ac7.jpg",
222
+ "image_caption": [
223
+ "Figure 2: Various game manipulations. (a) Original version of the game. (b) Game with masked objects to ablate semantics prior. (c) Game with reversed associations as an alternate way to ablate semantics prior. (d) Game with masked objects and distractor objects to ablate the concept of object. (e) Game with background textures to ablate affordance prior. (f) Game with background textures and different colors for all platforms to ablate similarity prior. (g) Game with modified ladder to hinder participant’s prior about ladder interactions. (h) Rotated game to change participant’s prior about gravity. "
224
+ ],
225
+ "image_footnote": [],
226
+ "bbox": [
227
+ 173,
228
+ 101,
229
+ 823,
230
+ 319
231
+ ],
232
+ "page_idx": 2
233
+ },
234
+ {
235
+ "type": "text",
236
+ "text": "",
237
+ "bbox": [
238
+ 176,
239
+ 449,
240
+ 821,
241
+ 478
242
+ ],
243
+ "page_idx": 2
244
+ },
245
+ {
246
+ "type": "text",
247
+ "text": "We quantified human performance on each version of the game by recruiting 120 participants from Amazon Mechanical Turk. Each participant was instructed to finish the game as quickly as possible using the arrow keys as controls, but no information about the goals or the reward structure of the game was communicated. Each participant was paid $\\$ 1$ for successfully completing the game. The maximum time allowed for playing the game was set to 30 minutes. For each participant, we recorded the $( x , y )$ position of the player at every step of the game, the total time taken by the participant to finish the game and the total number of deaths before finishing the game. We used this data to quantify the performance of each participant. Note that each participant was only allowed to complete a game once, and could not participate again (i.e. different 120 participants played each version of the game). ",
248
+ "bbox": [
249
+ 174,
250
+ 484,
251
+ 825,
252
+ 623
253
+ ],
254
+ "page_idx": 2
255
+ },
256
+ {
257
+ "type": "text",
258
+ "text": "3 QUANTIFYING THE IMPORTANCE OF OBJECT PRIORS ",
259
+ "text_level": 1,
260
+ "bbox": [
261
+ 176,
262
+ 647,
263
+ 638,
264
+ 661
265
+ ],
266
+ "page_idx": 2
267
+ },
268
+ {
269
+ "type": "text",
270
+ "text": "The original game (available to play at this link) is shown in Figure 2(a). A single glance at this game is enough to inform human players that the agent sprite has to reach the key to open the door while avoiding the dangerous objects like spikes and angry pink slime. Unsurprisingly, humans quickly solve this game. Figure 3(a) shows that the average time taken to complete the game is 1.8 minutes (blue bar) and the average number of deaths (3.3, orange bar) and unique game states visited (3011, yellow bar) are all quite small. ",
271
+ "bbox": [
272
+ 174,
273
+ 667,
274
+ 825,
275
+ 752
276
+ ],
277
+ "page_idx": 2
278
+ },
279
+ {
280
+ "type": "text",
281
+ "text": "3.1 SEMANTICS ",
282
+ "text_level": 1,
283
+ "bbox": [
284
+ 174,
285
+ 772,
286
+ 297,
287
+ 786
288
+ ],
289
+ "page_idx": 2
290
+ },
291
+ {
292
+ "type": "text",
293
+ "text": "To study the importance of prior knowledge about object semantics, we rendered objects and ladders with blocks of uniform color as shown in Figure 2(b). This game can be played at this link. In this version, the visual appearance of objects conveys no information about their semantics. Results in Figure 3(b) show that human players take more than twice the time (4.3 minutes), have higher number of deaths (11.1), and explore significantly larger number of states (7205) as compared to the original game (p-value: $p < 0 . 0 1 $ ). This clearly demonstrates that masking semantics hurts human performance. ",
294
+ "bbox": [
295
+ 174,
296
+ 791,
297
+ 825,
298
+ 888
299
+ ],
300
+ "page_idx": 2
301
+ },
302
+ {
303
+ "type": "text",
304
+ "text": "A natural question is how do humans make use of semantic information? One hypothesis is that knowledge of semantics enables humans to infer the latent reward structure of the game. If this indeed is the case, then in the original game, where the key and the door are both visible, players should first visit the key and then go to the door, while in the version of the game without semantics, players should not exhibit such bias. We found that in the original game, nearly all participants reached the key first, while in the version with masked semantics only 42 out of 120 participants reached the key before the door (see Figure 4(a)). Moreover, human players took significantly longer to reach the door after taking the key as compared to the original game (see Figure 4(b)). This result provides further evidence that in the absence of semantics, humans are unable to infer the reward structure and consequently significantly increase their exploration. To rule out the possibility that increase in time is simply due to the fact players take longer to finish the game without semantics, the time to reach the door after taking the key was normalized by the total amount of time spent by the player to complete the game. ",
305
+ "bbox": [
306
+ 173,
307
+ 895,
308
+ 821,
309
+ 922
310
+ ],
311
+ "page_idx": 2
312
+ },
313
+ {
314
+ "type": "image",
315
+ "img_path": "images/b7b5614824f7092dba875b8d09480f3580dd53a369b9377a42930d1fd7f689b1.jpg",
316
+ "image_caption": [
317
+ "Figure 3: Quantifying the influence of various object priors. The blue bar shows average time taken by humans (in minutes), orange bar shows the average number of deaths, and yellow bar shows the number of unique states visited by players to solve the various games. For visualization purposes, the number of deaths is divided by 2, and the number of states is divided by 1000 respectively. "
318
+ ],
319
+ "image_footnote": [],
320
+ "bbox": [
321
+ 171,
322
+ 97,
323
+ 826,
324
+ 262
325
+ ],
326
+ "page_idx": 3
327
+ },
328
+ {
329
+ "type": "text",
330
+ "text": "",
331
+ "bbox": [
332
+ 174,
333
+ 351,
334
+ 825,
335
+ 503
336
+ ],
337
+ "page_idx": 3
338
+ },
339
+ {
340
+ "type": "text",
341
+ "text": "To further quantify the importance of semantics, instead of simply masking, we manipulated the semantic prior by swapping the semantics between different entities. As seen on Figure 4(c), we replaced the pink enemy and spikes by coins and ice-cream objects respectively which have a positive connotation; the ladder by fire, the key and the door by spikes and enemies which have negative connotations (see game link). As shown in Figure 3(c), the participants took longer to solve this game (6.1 minutes, $p < 0 . 0 1 $ ). The average number of deaths (13.7) was also significantly more and the participants explored more states (9400) compared to the original version $\\mathit { p } < 0 . 0 1$ for both). Interestingly, the participants also took longer compared to the masked semantics version $( p < 0 . 0 5 )$ implying that when we reverse semantic information, humans find the game even tougher. ",
342
+ "bbox": [
343
+ 174,
344
+ 511,
345
+ 825,
346
+ 636
347
+ ],
348
+ "page_idx": 3
349
+ },
350
+ {
351
+ "type": "text",
352
+ "text": "3.2 OBJECTS AS SUB-GOALS FOR EXPLORATION",
353
+ "text_level": 1,
354
+ "bbox": [
355
+ 174,
356
+ 657,
357
+ 524,
358
+ 671
359
+ ],
360
+ "page_idx": 3
361
+ },
362
+ {
363
+ "type": "text",
364
+ "text": "While blocks of uniform color in the game shown in Figure 2(b) convey no semantics, they are distinct from the background and seem to attract human attention. It is possible that humans infer these distinct entities (or objects) as sub-goals, which results in more efficient exploration than random search. That is, there is something special about objects that draws human attention compared to any random piece of texture. To test this, we modified the game to cover each space on the platform with a block of different color to hide where the objects are (see Figure 2(d), game link). Most colored blocks are placebos and do not correspond to any object and the actual objects have the same color and form as in the previous version of the game with masked semantics (i.e., Figure 2(b)). If the prior knowledge that visibly distinct entities are interesting to explore is critical, this game manipulation should lead to a significant drop in human performance. ",
365
+ "bbox": [
366
+ 174,
367
+ 679,
368
+ 825,
369
+ 818
370
+ ],
371
+ "page_idx": 3
372
+ },
373
+ {
374
+ "type": "text",
375
+ "text": "Results in Figure 3(d) show that masking the concept of objects leads to drastic deterioration in performance. The average time taken by human players to solve the game is nearly four times longer (7.7 minutes), the number of deaths is nearly six times greater (20.2), and humans explore four times as many game states (12, 232) as compared to the original game. When compared to the game version in which only semantic information was removed (Figure 3(b)), the time taken, number of deaths and number of states are all significantly greater $( p < 0 . 0 1 )$ ). When only semantics are removed, after encountering one object, human players become aware of what possible locations might be interesting to explore next. However, when concept of objects is also masked, it is unclear what to explore next. This effect can be seen by the increase in normalized time taken to reach the door from the key as compared to the game where only semantics are masked (Figure 4(b)). All these results suggest that concept of objects i.e. knowing that visibly distinct entities are interesting and can be used as sub-goals for exploration, is a critical prior and perhaps more important than knowledge of semantics. ",
376
+ "bbox": [
377
+ 174,
378
+ 825,
379
+ 823,
380
+ 922
381
+ ],
382
+ "page_idx": 3
383
+ },
384
+ {
385
+ "type": "image",
386
+ "img_path": "images/0b81effaaea534ff6de8b5e18ac2414c448284af2a794dc4f6a5cfee58825bf9.jpg",
387
+ "image_caption": [
388
+ "Figure 4: Change in behavior upon ablation of various priors. (a) Graph comparing number of participants that reached the key before the door in the original version, game without semantics, and game without object prior. (b) Amount of time taken by participants to reach the door once they obtained the key. (c) Average number of steps taken by participants to reach various vertical levels in original version, game without affordance, and game without similarity. "
389
+ ],
390
+ "image_footnote": [],
391
+ "bbox": [
392
+ 236,
393
+ 98,
394
+ 763,
395
+ 236
396
+ ],
397
+ "page_idx": 4
398
+ },
399
+ {
400
+ "type": "text",
401
+ "text": "",
402
+ "bbox": [
403
+ 174,
404
+ 332,
405
+ 825,
406
+ 415
407
+ ],
408
+ "page_idx": 4
409
+ },
410
+ {
411
+ "type": "text",
412
+ "text": "3.3 AFFORDANCES ",
413
+ "text_level": 1,
414
+ "bbox": [
415
+ 174,
416
+ 434,
417
+ 318,
418
+ 449
419
+ ],
420
+ "page_idx": 4
421
+ },
422
+ {
423
+ "type": "text",
424
+ "text": "Until now, we manipulated objects in ways that made inferring the underlying reward structure of the game non-trivial. However, in these games it was obvious for humans that platforms can support agent sprites, ladders could be climbed to reach different platforms (even when the ladders were colored in uniform red in games shown in Figure 2(b,c), the connectivity pattern revealed where the ladders were) and black parts of the game constitute free space. Here, the platforms and ladders afford the actions of walking and climbing (Gibson, 2014), irrespective of their appearance. In the next set of experiments, we manipulated the game to mask the affordance prior. ",
425
+ "bbox": [
426
+ 174,
427
+ 454,
428
+ 825,
429
+ 551
430
+ ],
431
+ "page_idx": 4
432
+ },
433
+ {
434
+ "type": "text",
435
+ "text": "One way to mask affordances is to fill free space with random textures, which are visually similar to textures used for rendering ladders and platforms (see Figure 2(e), game link). Note that in this game manipulation, objects and their semantics are clearly observable. When tasked to play this game, as shown in Figure 3(e), humans require significantly more time (4.7 minutes), die more often (10.7), and visit more states (7031) compared to the original game $\\mathit { p } < 0 . 0 1 )$ ). On the other hand, there is no significant difference in performance compared to the game without semantics, i.e., Figure 2(b), implying that the affordance prior is as important as the semantics prior in our setup. ",
436
+ "bbox": [
437
+ 174,
438
+ 558,
439
+ 825,
440
+ 655
441
+ ],
442
+ "page_idx": 4
443
+ },
444
+ {
445
+ "type": "text",
446
+ "text": "3.4 THINGS THAT LOOK SIMILARLY, BEHAVE SIMILARLY ",
447
+ "text_level": 1,
448
+ "bbox": [
449
+ 173,
450
+ 676,
451
+ 578,
452
+ 689
453
+ ],
454
+ "page_idx": 4
455
+ },
456
+ {
457
+ "type": "text",
458
+ "text": "In the previous game, although we masked affordance information, once the player realizes that it is possible to stand on a particular texture and climb a specific texture, it is easy to use color/texture similarity to identify other platforms and ladders in the game. Similarly, in the game with masked semantics (Figure 2(b)), visual similarity can be used to identify other enemies and spikes. These considerations suggest that a general prior of the form that things that look the same act the same might help humans efficiently explore environments where semantics or affordances are hidden. ",
459
+ "bbox": [
460
+ 174,
461
+ 694,
462
+ 825,
463
+ 777
464
+ ],
465
+ "page_idx": 4
466
+ },
467
+ {
468
+ "type": "text",
469
+ "text": "We tested this hypothesis by modifying the masked affordance game in a way that none of the platforms and ladders had the same visual signature (Figure 2(f), game link). Such rendering prevented human players from using the similarity prior. Figure 3(f)) shows that performance of humans was significantly worse in comparison to the original game (Figure 2(a)), the game with masked semantics (Figure 2(b)) and the game with masked affordances (Figure 2(e)) $\\mathit { p } < 0 . 0 1 )$ . When compared to the game with no object information (Figure 2(d)), the time to complete the game (7.6 minutes) and the number of states explored by players were similar (11, 715), but the number of deaths (14.8) was significantly lower $( p < 0 . 0 1 )$ ). These results suggest that visual similarity is the second most important prior used by humans in gameplay after the knowledge of directing exploration towards objects. ",
470
+ "bbox": [
471
+ 174,
472
+ 785,
473
+ 825,
474
+ 924
475
+ ],
476
+ "page_idx": 4
477
+ },
478
+ {
479
+ "type": "image",
480
+ "img_path": "images/38ddc00fb1a334f8127e4ef21d154734c36f992907b627e310e8e117fba43637.jpg",
481
+ "image_caption": [
482
+ "Figure 5: Masking all object priors drastically affects human performance. (a) Original game. (b) Version without any object priors. (c) Graph depicting difference in participant’s performance for both the games. (d) Exploration trajectory for original version and (e) for no object prior version. "
483
+ ],
484
+ "image_footnote": [],
485
+ "bbox": [
486
+ 173,
487
+ 99,
488
+ 823,
489
+ 199
490
+ ],
491
+ "page_idx": 5
492
+ },
493
+ {
494
+ "type": "text",
495
+ "text": "In order to gain insight into how this prior knowledge affects humans, we investigated the exploration pattern of human players. In the game when all information is visible we expected that the progress of humans would be uniform in time. In the case when affordances are removed, the human players would initially take some time to figure out what visual pattern corresponds to what entity and then quickly make progress in the game. Finally, in the case when the similarity prior is removed, we would expect human players to be unable to generalize any knowledge across the game and to take large amounts of time exploring the environment even towards the end. We investigated if this indeed was true by computing the time taken by each player to reach different vertical distances in the game for the first time. Note that the door is on the top of the game, so the moving up corresponds to getting closer to solving the game. The results of this analysis are shown in Figure 4(c). The horizontal-axis shows the height reached by the player and the vertical-axis show the average time taken by the players. As the figure shows, the results confirm our hypothesis. ",
496
+ "bbox": [
497
+ 174,
498
+ 267,
499
+ 825,
500
+ 434
501
+ ],
502
+ "page_idx": 5
503
+ },
504
+ {
505
+ "type": "text",
506
+ "text": "3.5 HOW TO INTERACT WITH OBJECTS ",
507
+ "text_level": 1,
508
+ "bbox": [
509
+ 176,
510
+ 455,
511
+ 452,
512
+ 468
513
+ ],
514
+ "page_idx": 5
515
+ },
516
+ {
517
+ "type": "text",
518
+ "text": "Until now we have analyzed the prior knowledge used by humans to interpret the visual structure in the game. However, interpretation of visual structure is only useful if the player understands what to do with the interpretation. Humans seem to possess prior knowledge about how to interact with different objects. For example, monsters can be avoided by jumping over them, ladders can be climbed by pressing the up key repeatedly etc. Deep reinforcement learning agents, on the other hand, do not possess such priors and must learn how to interact with objects by mere trial and error. ",
519
+ "bbox": [
520
+ 174,
521
+ 474,
522
+ 825,
523
+ 558
524
+ ],
525
+ "page_idx": 5
526
+ },
527
+ {
528
+ "type": "text",
529
+ "text": "To test how critical such prior knowledge is, we created a version of the game in which the ladders couldn’t be climbed by simply pressing the up key. Instead, the ladders were zigzag in nature and in order to climb the ladder players had to press the up key, followed by alternating presses between the right and left key. Note that the ladders in this version looked like normal ladders, so players couldn’t infer the properties of the ladder by simply looking at them (see Figure $2 ( \\mathbf { g } )$ , game link). As shown in Figure $3 ( \\mathbf { g } )$ , changing the property of the ladder increases the time taken (3.6 minutes), number of deaths (6), and states explored (5942) when compared to the original game $( p < 0 . 0 1 )$ ). ",
530
+ "bbox": [
531
+ 174,
532
+ 565,
533
+ 825,
534
+ 662
535
+ ],
536
+ "page_idx": 5
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "4 TAXONOMY OF OBJECT PRIORS ",
541
+ "text_level": 1,
542
+ "bbox": [
543
+ 178,
544
+ 685,
545
+ 465,
546
+ 700
547
+ ],
548
+ "page_idx": 5
549
+ },
550
+ {
551
+ "type": "text",
552
+ "text": "In previous sections, we studied how different priors about objects affect human performance one at a time. To quantify human performance when all object priors investigated so far are simultaneously masked, we created the game shown in Figure 5(b) that hid all information about objects, semantics, affordance, and similarity(game link). Results in Figure 5(c) show that humans found it extremely hard to play this game. The average time taken to solve the game increased to 20 minutes and the average number of deaths rose sharply to 40. Remarkably, the exploration trajectory of humans is now almost completely random as shown in Figure 5(e) with the number of unique states visited by the human players increasing by a factor of 9 as compared to the original game. Due to difficulty in completing this game, we noticed a high dropout of human participants before they finished the game. We had to increase the pay to $\\$ 2.25$ to encourage participants not to quit. Many participants noted that they could solve the game only by memorizing it. ",
553
+ "bbox": [
554
+ 174,
555
+ 708,
556
+ 825,
557
+ 861
558
+ ],
559
+ "page_idx": 5
560
+ },
561
+ {
562
+ "type": "text",
563
+ "text": "Even though we preserved priors related to physics (e.g., objects fall down) and motor control (e.g., pressing left key moves the agent sprite to the left), just by rendering the game in a way that makes it impossible to use prior knowledge about how to visually interpret the game screen makes the game extremely hard to play. To further test the limits of human ability, we designed a harder game where we also reversed gravity and randomly re-mapped the key presses to how it affect’s the motion of agent’s sprite. We, the creators of the game, having played a previous version of the game hundreds of times had an extremely hard time trying to complete this version of the game. This game placed us in the shoes of reinforcement learning (RL) agents that start off without the immense prior knowledge that humans possess. While improvements in the performance of RL agents with better algorithms and better computational resources is inevitable, our results make a strong case for developing algorithms that incorporate prior knowledge as a way to improve the performance of artificial agents. ",
564
+ "bbox": [
565
+ 174,
566
+ 868,
567
+ 823,
568
+ 924
569
+ ],
570
+ "page_idx": 5
571
+ },
572
+ {
573
+ "type": "image",
574
+ "img_path": "images/c6de54deff9ffc6f81218d7fddc60a2fd4a31716a09d2a617bcdb3bec17213fc.jpg",
575
+ "image_caption": [
576
+ "Figure 6: Taxonomy of object priors. The earlier an object prior is obtained during childhood, the more critical that object prior is in human problem solving in video games. "
577
+ ],
578
+ "image_footnote": [],
579
+ "bbox": [
580
+ 375,
581
+ 104,
582
+ 619,
583
+ 219
584
+ ],
585
+ "page_idx": 6
586
+ },
587
+ {
588
+ "type": "text",
589
+ "text": "",
590
+ "bbox": [
591
+ 174,
592
+ 276,
593
+ 825,
594
+ 387
595
+ ],
596
+ "page_idx": 6
597
+ },
598
+ {
599
+ "type": "text",
600
+ "text": "While there are many possible directions on how to incorporate priors in RL and more generally AI agents, it is informative to study how humans acquire such priors. Studies in developmental psychology suggest that human infants as young as 2 months old possess a primitive notion of objects and expect them to move as connected and bounded wholes that allows them to perceive object boundaries and therefore possibly distinguish them from the background (Spelke, 1990; Spelke & Kinzler, 2007). At this stage, infants do not reason about object categories. By the age of 3-5 months, infants start exhibiting categorization behavior based on similarity and familiarity (Mandler, 1998; Mareschal & Quinn, 2001). The ability to recognize individual objects rapidly and accurately emerges comparatively late in development (usually by the time babies are 18-24 months old (Pereira & Smith, 2009)). Similarly, while young infants exhibit some knowledge about affordances early during development, the ability to distinguish a walkable step from a cliff emerges only by the time they are 18 months old (Kretch & Adolph, 2013). ",
601
+ "bbox": [
602
+ 174,
603
+ 395,
604
+ 825,
605
+ 561
606
+ ],
607
+ "page_idx": 6
608
+ },
609
+ {
610
+ "type": "text",
611
+ "text": "These results in infant development suggest that starting with a primitive notion of objects, infants gradually learn about visual similarity and eventually about object semantics and affordances. It is quite interesting to note that the order in which infants increase their knowledge matches the importance of different object priors such as the existence of objects as sub-goals for exploration, visual similarity, object semantics, and affordances. Based on these results, we suggest a possible taxonomy and ranking of object priors in Figure 6. We put ‘object interaction’ at the bottom as in the context of our problem, knowledge about how to interact with specific objects can be only learned once recognition is performed. ",
612
+ "bbox": [
613
+ 174,
614
+ 569,
615
+ 825,
616
+ 680
617
+ ],
618
+ "page_idx": 6
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "5 PHYSICS AND MOTOR CONTROL PRIORS ",
623
+ "text_level": 1,
624
+ "bbox": [
625
+ 174,
626
+ 705,
627
+ 537,
628
+ 719
629
+ ],
630
+ "page_idx": 6
631
+ },
632
+ {
633
+ "type": "text",
634
+ "text": "In addition to prior knowledge about objects, humans also bring in rich prior knowledge about intuitive physics and strong motor control priors when they approach a new task (Hespos et al., 2009; Baillargeon, 2004; 1994; Wolpert & Ghahramani, 2000). Here, we have taken some initial steps to explore the importance of such priors in context of human gameplay. ",
635
+ "bbox": [
636
+ 174,
637
+ 728,
638
+ 825,
639
+ 784
640
+ ],
641
+ "page_idx": 6
642
+ },
643
+ {
644
+ "type": "text",
645
+ "text": "5.1 GRAVITY ",
646
+ "text_level": 1,
647
+ "bbox": [
648
+ 174,
649
+ 805,
650
+ 279,
651
+ 819
652
+ ],
653
+ "page_idx": 6
654
+ },
655
+ {
656
+ "type": "text",
657
+ "text": "One of the most obvious forms of knowledge that we have about the physical world is with regards to gravity, i.e., things fall from up to down. To mask this prior, we created a version of the game in which the whole game window was rotated $9 0 ^ { \\circ }$ (refer to Figure $2 ( \\mathrm { h } ) _ { \\cdot }$ ). In this way, the gravity was reversed from left to right (as opposed to up to down). As shown in Figure 7, participants spent more time to solve this game compared to the original version with average time taken close to 3 minutes $( p < 0 . 0 1 )$ . The average number of deaths and number of states explored was also significantly larger than the original version $( p < 0 . 0 1 )$ . ",
658
+ "bbox": [
659
+ 174,
660
+ 827,
661
+ 825,
662
+ 924
663
+ ],
664
+ "page_idx": 6
665
+ },
666
+ {
667
+ "type": "image",
668
+ "img_path": "images/fe57c9bff923118ead29402503f9e21af64cc76837b8dca3ee63c45ab9747c73.jpg",
669
+ "image_caption": [
670
+ "Figure 7: Quantifying physics and motor control priors. Graph shows performance of participants in original version, game with gravity reversed, and game with key controls reversed. Number of deaths is divided by 2 and number of states is divided by 1000. "
671
+ ],
672
+ "image_footnote": [],
673
+ "bbox": [
674
+ 364,
675
+ 99,
676
+ 629,
677
+ 222
678
+ ],
679
+ "page_idx": 7
680
+ },
681
+ {
682
+ "type": "text",
683
+ "text": "5.2 MUSCLE MEMORY ",
684
+ "text_level": 1,
685
+ "bbox": [
686
+ 174,
687
+ 280,
688
+ 341,
689
+ 292
690
+ ],
691
+ "page_idx": 7
692
+ },
693
+ {
694
+ "type": "text",
695
+ "text": "Human players also come with knowledge about the consequences of actions such as pressing arrow keys moves the agent sprite in the corresponding directions (i.e., pressing up makes the agent sprite jump, pressing left makes the agent sprite go left and so forth). We created a version of the game in which we reversed the arrow key controls. Thus, pressing the left arrow key made the agent sprite go right, pressing the right key moved the sprite left, pressing the down key made the player jump (or go up the stairs), and pressing the up key made the player go down the stairs. Participants again took longer to solve this game compared to the original version with average time taken close to 3 minutes (refer to Figure 7). The average number of deaths and number of states explored was also significantly larger than the original version $( p \\ < \\ 0 . 0 1 )$ . Interestingly, the performance of players when the gravity was reversed, and key controls were reversed is similar, with no significant difference between the two conditions. ",
696
+ "bbox": [
697
+ 173,
698
+ 299,
699
+ 825,
700
+ 452
701
+ ],
702
+ "page_idx": 7
703
+ },
704
+ {
705
+ "type": "text",
706
+ "text": "6 CONTROLLING FOR CHANGE IN COMPLEXITY ",
707
+ "text_level": 1,
708
+ "bbox": [
709
+ 174,
710
+ 477,
711
+ 581,
712
+ 492
713
+ ],
714
+ "page_idx": 7
715
+ },
716
+ {
717
+ "type": "text",
718
+ "text": "So far in this paper, we have manipulated various visual priors while keeping the underlying game and reward structure exactly the same. We have assumed that this will influence human performance while keeping RL agent performance unchanged, since RL does not have any priors to begin with. However, one possible confound is that the visual complexity of the modified games might have changed from the original game version, because masking out priors without changing visual complexity is extremely difficult. ",
719
+ "bbox": [
720
+ 174,
721
+ 500,
722
+ 825,
723
+ 583
724
+ ],
725
+ "page_idx": 7
726
+ },
727
+ {
728
+ "type": "text",
729
+ "text": "To control for this confound, we investigated the performance of an RL agent on the various game manipulations. If RL agents are not affected by the game manipulations, then it would suggest that prior knowledge and not visual complexity is the main reason behind the change in human performance. Note that this confound is not present in the physics and motor control experiments as the visual input stays the same as the original game. ",
730
+ "bbox": [
731
+ 174,
732
+ 589,
733
+ 825,
734
+ 660
735
+ ],
736
+ "page_idx": 7
737
+ },
738
+ {
739
+ "type": "text",
740
+ "text": "To this end, we systematically created different versions of the game in Figure 1(a) to ablate semantics, the concept of object, affordance, and similarity as shown in Figure 8. Note that the game used for human experiments shown in Figure 2 is more complex than the game used for RL experiments in Figure 8. This is because the larger game was simply too hard for state-of-the-art RL agents to solve. Apart from the difference in the game size, we tried to make the games as similar as possible. Even though this version of the game is simpler (regarding size, number of objects etc.), we note that this game is still non-trivial for an RL agent. For instance, due to the sparse reward structure of the game, both A3C (Mnih et al., 2016) and breadth-first search didn’t come close to solving the game even after 10 million steps. Hence, for our purpose, we used an RL algorithm augmented with a curiosity based exploration strategy (Pathak et al., 2017). For each game version, we report the mean performance of five random seeds that succeeded. ",
741
+ "bbox": [
742
+ 174,
743
+ 666,
744
+ 825,
745
+ 819
746
+ ],
747
+ "page_idx": 7
748
+ },
749
+ {
750
+ "type": "text",
751
+ "text": "As shown in Figure 8(e), the RL agent was unaffected by the removal of semantics, the concept of objects, as well as affordances – there is no significant difference between the mean score of the RL agent on these games when compared to the performance on the original game $( p > 0 . 0 5 )$ . This suggests that the drop in human performance in these game manipulations is not due to the change in visual complexity, but it is rather due to the masking of the various priors. On the other hand, the performance of the RL agent does worsen when visual similarity is masked as it takes nearly twice as many interactions to complete the game compared to the original version. We believe this is due to to the use of convolutional neural networks that implicitly impose the prior of visual similarity rather than simply due to the change in visual complexity. ",
752
+ "bbox": [
753
+ 174,
754
+ 827,
755
+ 825,
756
+ 924
757
+ ],
758
+ "page_idx": 7
759
+ },
760
+ {
761
+ "type": "image",
762
+ "img_path": "images/7df00ec37565f947b2632b34158d12258e7b7bacb8dbd404173302b2ddc64feb.jpg",
763
+ "image_caption": [
764
+ "Figure 8: Quantifying the performance of RL agent. (a) Game without semantic information. (b) Game with masked and distractor objects to ablate concept of objects. (c) Game without affordance information. (d) Game without similarity information. (e) Performance of RL agent on various game manipulations (steps shown in order of million). Error bars indicate standard error of mean for the 5 random seeds. The RL agent performs similarly on all games except for the one without visual similarity. "
765
+ ],
766
+ "image_footnote": [],
767
+ "bbox": [
768
+ 174,
769
+ 99,
770
+ 825,
771
+ 193
772
+ ],
773
+ "page_idx": 8
774
+ },
775
+ {
776
+ "type": "text",
777
+ "text": "",
778
+ "bbox": [
779
+ 173,
780
+ 296,
781
+ 823,
782
+ 325
783
+ ],
784
+ "page_idx": 8
785
+ },
786
+ {
787
+ "type": "text",
788
+ "text": "7 DISCUSSION ",
789
+ "text_level": 1,
790
+ "bbox": [
791
+ 174,
792
+ 352,
793
+ 310,
794
+ 367
795
+ ],
796
+ "page_idx": 8
797
+ },
798
+ {
799
+ "type": "text",
800
+ "text": "While there is no doubt that the performance of deep RL algorithms is impressive, there is much to be learned from human cognition if our goal is to enable RL agents to solve sparse reward tasks with human-like efficiency. Humans have the amazing ability to use their past knowledge (i.e., priors) to solve new tasks quickly. Success in such scenarios critically depends on the agent’s ability to explore its environment and then promptly learn from its successes (Daw et al., 2006; Cohen et al., 2007). In this vein, our results demonstrate the importance of prior knowledge in helping humans explore efficiently in these sparse reward environments (Knox et al., 2012; Gershman & Niv, 2015). ",
801
+ "bbox": [
802
+ 173,
803
+ 377,
804
+ 825,
805
+ 476
806
+ ],
807
+ "page_idx": 8
808
+ },
809
+ {
810
+ "type": "text",
811
+ "text": "However, being equipped with strong prior knowledge can sometimes lead to constrained exploration that might not be optimal in all environments (Lucas et al., 2014; Bonawitz et al., 2011). For instance, consider the game shown in Figure 9 consisting of a robot and a princess object. The game environment also includes rewards in hidden locations (shown as dashed yellow boxes only for illustration). When tasked to play this game, human participants $\\mathrm { ( n { = } 3 0 } ) _ { , }$ ) immediately assume that princess is the goal and do not explore the free space containing hidden rewards. They directly reach the princess and thereby terminate the game with sub-optimal rewards. In contrast, a random agent (30 seeds) ends up obtaining almost four times more reward than human players as shown in Figure 9. Thus, while incorporating prior knowledge in RL agents has many potential benefits, future work should also consider challenges regarding under-constrained exploration in certain kinds of settings. ",
812
+ "bbox": [
813
+ 173,
814
+ 482,
815
+ 825,
816
+ 635
817
+ ],
818
+ "page_idx": 8
819
+ },
820
+ {
821
+ "type": "text",
822
+ "text": "While our paper primarily investigated object priors (and physics priors to some extent), humans also possess rich prior knowledge about the world in the form of intuitive psychology and also bring in various priors about general video game playing such as that moving up and to the right in games is generally correlated with progress, games have goals, etc. Studying the importance of such priors will be an interesting future direction of research. ",
823
+ "bbox": [
824
+ 174,
825
+ 642,
826
+ 825,
827
+ 712
828
+ ],
829
+ "page_idx": 8
830
+ },
831
+ {
832
+ "type": "text",
833
+ "text": "Building RL algorithms that require fewer interactions to reach the goal (i.e., sample efficient algorithms) is an active area of research, and further progress is inevitable. In addition to developing better optimization methods, we believe that instead of always initializing learning from scratch, either incorporating prior knowledge directly or constructing mechanisms for condensing experience into reusable knowledge (i.e., learning priors through continual learning) might be critical for building RL agents with human-like efficiency. Our work takes first steps toward quantifying the importance of various priors that humans employ in solving video games and in understanding how prior knowledge makes humans good at such complex tasks. We believe that our results will inspire researchers to think about different mechanisms of incorporating prior knowledge in the design of RL agents. We also hope that our experimental platform of video games, available in open-source, will fuel more detailed studies investigating human priors and a benchmark for quantifying the efficacy of different mechanisms of incorporating prior knowledge into RL agents. ",
834
+ "bbox": [
835
+ 173,
836
+ 719,
837
+ 825,
838
+ 803
839
+ ],
840
+ "page_idx": 8
841
+ },
842
+ {
843
+ "type": "image",
844
+ "img_path": "images/545251162cf99cc4a4b04eb7881fad9852398bb62b8a09c2d2f92a2e484ab430.jpg",
845
+ "image_caption": [
846
+ "Figure 9: Prior information constrains human exploration. (Left) A very simple game with hidden rewards (shown in dashed yellow). (Right) Average rewards accumulated by human players vs a random agent. "
847
+ ],
848
+ "image_footnote": [],
849
+ "bbox": [
850
+ 334,
851
+ 815,
852
+ 655,
853
+ 882
854
+ ],
855
+ "page_idx": 8
856
+ },
857
+ {
858
+ "type": "text",
859
+ "text": "",
860
+ "bbox": [
861
+ 174,
862
+ 103,
863
+ 825,
864
+ 188
865
+ ],
866
+ "page_idx": 9
867
+ },
868
+ {
869
+ "type": "text",
870
+ "text": "ACKNOWLEDGEMENT ",
871
+ "text_level": 1,
872
+ "bbox": [
873
+ 176,
874
+ 213,
875
+ 357,
876
+ 227
877
+ ],
878
+ "page_idx": 9
879
+ },
880
+ {
881
+ "type": "text",
882
+ "text": "We thank Jordan Suchow, Michael Chang, Shubham Tulsiani, Alison Gopnik, and other members of the BAIR community for helpful discussions and comments. This work has been supported, in part, by Google, ONR MURI N00014-14-1-0671, Berkeley DeepDrive, NVIDIA Graduate Fellowship to DP, and the Valrhona Reinforcement Learning Fellowship. ",
883
+ "bbox": [
884
+ 176,
885
+ 236,
886
+ 825,
887
+ 291
888
+ ],
889
+ "page_idx": 9
890
+ },
891
+ {
892
+ "type": "text",
893
+ "text": "REFERENCES ",
894
+ "text_level": 1,
895
+ "bbox": [
896
+ 174,
897
+ 316,
898
+ 285,
899
+ 332
900
+ ],
901
+ "page_idx": 9
902
+ },
903
+ {
904
+ "type": "text",
905
+ "text": "Renee Baillargeon. How do infants learn about the physical world? Current Directions in Psychological Science, 3(5):133–140, 1994. ",
906
+ "bbox": [
907
+ 173,
908
+ 340,
909
+ 821,
910
+ 368
911
+ ],
912
+ "page_idx": 9
913
+ },
914
+ {
915
+ "type": "text",
916
+ "text": "Renee Baillargeon. Infants’ physical world. ´ Current directions in psychological science, 13(3): 89–94, 2004. ",
917
+ "bbox": [
918
+ 173,
919
+ 377,
920
+ 821,
921
+ 406
922
+ ],
923
+ "page_idx": 9
924
+ },
925
+ {
926
+ "type": "text",
927
+ "text": "Marc Bellemare, Sriram Srinivasan, Georg Ostrovski, Tom Schaul, David Saxton, and Remi Munos. Unifying count-based exploration and intrinsic motivation. In NIPS, 2016. ",
928
+ "bbox": [
929
+ 171,
930
+ 415,
931
+ 821,
932
+ 444
933
+ ],
934
+ "page_idx": 9
935
+ },
936
+ {
937
+ "type": "text",
938
+ "text": "Elizabeth Bonawitz, Patrick Shafto, Hyowon Gweon, Noah D Goodman, Elizabeth Spelke, and Laura Schulz. The double-edged sword of pedagogy: Instruction limits spontaneous exploration and discovery. Cognition, 120(3):322–330, 2011. ",
939
+ "bbox": [
940
+ 176,
941
+ 453,
942
+ 823,
943
+ 496
944
+ ],
945
+ "page_idx": 9
946
+ },
947
+ {
948
+ "type": "text",
949
+ "text": "Susan Carey. The origin of concepts. Oxford University Press, 2009. ",
950
+ "bbox": [
951
+ 173,
952
+ 503,
953
+ 625,
954
+ 520
955
+ ],
956
+ "page_idx": 9
957
+ },
958
+ {
959
+ "type": "text",
960
+ "text": "Jonathan D Cohen, Samuel M McClure, and J Yu Angela. Should i stay or should i go? how the human brain manages the trade-off between exploitation and exploration. Philosophical Transactions of the Royal Society B: Biological Sciences, 362(1481):933–942, 2007. ",
961
+ "bbox": [
962
+ 176,
963
+ 527,
964
+ 820,
965
+ 571
966
+ ],
967
+ "page_idx": 9
968
+ },
969
+ {
970
+ "type": "text",
971
+ "text": "Nathaniel D Daw, John P O’Doherty, Peter Dayan, Ben Seymour, and Raymond J Dolan. Cortical substrates for exploratory decisions in humans. Nature, 441(7095):876–879, 2006. ",
972
+ "bbox": [
973
+ 173,
974
+ 579,
975
+ 823,
976
+ 609
977
+ ],
978
+ "page_idx": 9
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "Samuel J Gershman and Yael Niv. Novelty and inductive generalization in human reinforcement learning. Topics in cognitive science, 7(3):391–415, 2015. ",
983
+ "bbox": [
984
+ 171,
985
+ 617,
986
+ 823,
987
+ 646
988
+ ],
989
+ "page_idx": 9
990
+ },
991
+ {
992
+ "type": "text",
993
+ "text": "James J Gibson. The ecological approach to visual perception: classic edition. Psychology Press, 2014. ",
994
+ "bbox": [
995
+ 171,
996
+ 655,
997
+ 823,
998
+ 684
999
+ ],
1000
+ "page_idx": 9
1001
+ },
1002
+ {
1003
+ "type": "text",
1004
+ "text": "Shixiang Gu, Timothy Lillicrap, Ilya Sutskever, and Sergey Levine. Continuous deep q-learning with model-based acceleration. In ICML, 2016. ",
1005
+ "bbox": [
1006
+ 171,
1007
+ 693,
1008
+ 823,
1009
+ 722
1010
+ ],
1011
+ "page_idx": 9
1012
+ },
1013
+ {
1014
+ "type": "text",
1015
+ "text": "Susan J Hespos, Alissa L Ferry, and Lance J Rips. Five-month-old infants have different expectations for solids and liquids. Psychological Science, 20(5):603–611, 2009. ",
1016
+ "bbox": [
1017
+ 171,
1018
+ 729,
1019
+ 823,
1020
+ 760
1021
+ ],
1022
+ "page_idx": 9
1023
+ },
1024
+ {
1025
+ "type": "text",
1026
+ "text": "W Bradley Knox, A Ross Otto, Peter Stone, and Bradley Love. The nature of belief-directed exploratory choice in human decision-making. Frontiers in psychology, 2:398, 2012. ",
1027
+ "bbox": [
1028
+ 171,
1029
+ 768,
1030
+ 823,
1031
+ 797
1032
+ ],
1033
+ "page_idx": 9
1034
+ },
1035
+ {
1036
+ "type": "text",
1037
+ "text": "Kari S Kretch and Karen E Adolph. Cliff or step? posture-specific learning at the edge of a drop-off. Child Development, 84(1):226–240, 2013. ",
1038
+ "bbox": [
1039
+ 174,
1040
+ 806,
1041
+ 823,
1042
+ 835
1043
+ ],
1044
+ "page_idx": 9
1045
+ },
1046
+ {
1047
+ "type": "text",
1048
+ "text": "Brenden M Lake, Tomer D Ullman, Joshua B Tenenbaum, and Samuel J Gershman. Building machines that learn and think like people. Behavioral and Brain Sciences, pp. 1–101, 2016. ",
1049
+ "bbox": [
1050
+ 169,
1051
+ 843,
1052
+ 825,
1053
+ 872
1054
+ ],
1055
+ "page_idx": 9
1056
+ },
1057
+ {
1058
+ "type": "text",
1059
+ "text": "Christopher G Lucas, Sophie Bridgers, Thomas L Griffiths, and Alison Gopnik. When children are better (or at least more open-minded) learners than adults: Developmental differences in learning the forms of causal relationships. Cognition, 131(2):284–299, 2014. ",
1060
+ "bbox": [
1061
+ 176,
1062
+ 882,
1063
+ 825,
1064
+ 924
1065
+ ],
1066
+ "page_idx": 9
1067
+ },
1068
+ {
1069
+ "type": "text",
1070
+ "text": "Jean M. Mandler. Representation. In Cognition, perception, and language: Handbook of child psychology. John Wiley & Sons Inc, 1998. ",
1071
+ "bbox": [
1072
+ 169,
1073
+ 103,
1074
+ 825,
1075
+ 132
1076
+ ],
1077
+ "page_idx": 10
1078
+ },
1079
+ {
1080
+ "type": "text",
1081
+ "text": "Denis Mareschal and Paul C Quinn. Categorization in infancy. Trends in cognitive sciences, 5(10): 443–450, 2001. ",
1082
+ "bbox": [
1083
+ 173,
1084
+ 140,
1085
+ 823,
1086
+ 170
1087
+ ],
1088
+ "page_idx": 10
1089
+ },
1090
+ {
1091
+ "type": "text",
1092
+ "text": "Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 2015. ",
1093
+ "bbox": [
1094
+ 176,
1095
+ 178,
1096
+ 823,
1097
+ 222
1098
+ ],
1099
+ "page_idx": 10
1100
+ },
1101
+ {
1102
+ "type": "text",
1103
+ "text": "Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy P Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In ICML, 2016. ",
1104
+ "bbox": [
1105
+ 176,
1106
+ 231,
1107
+ 825,
1108
+ 273
1109
+ ],
1110
+ "page_idx": 10
1111
+ },
1112
+ {
1113
+ "type": "text",
1114
+ "text": "Junhyuk Oh, Satinder Singh, and Honglak Lee. Value prediction network. In NIPS, 2017. ",
1115
+ "bbox": [
1116
+ 169,
1117
+ 281,
1118
+ 763,
1119
+ 297
1120
+ ],
1121
+ "page_idx": 10
1122
+ },
1123
+ {
1124
+ "type": "text",
1125
+ "text": "Deepak Pathak, Pulkit Agrawal, Alexei A Efros, and Trevor Darrell. Curiosity-driven exploration by self-supervised prediction. arXiv preprint arXiv:1705.05363, 2017. ",
1126
+ "bbox": [
1127
+ 171,
1128
+ 306,
1129
+ 823,
1130
+ 335
1131
+ ],
1132
+ "page_idx": 10
1133
+ },
1134
+ {
1135
+ "type": "text",
1136
+ "text": "Alfredo F Pereira and Linda B Smith. Developmental changes in visual object recognition between 18 and 24 months of age. Developmental science, 12(1):67–80, 2009. ",
1137
+ "bbox": [
1138
+ 173,
1139
+ 343,
1140
+ 823,
1141
+ 372
1142
+ ],
1143
+ "page_idx": 10
1144
+ },
1145
+ {
1146
+ "type": "text",
1147
+ "text": "Elizabeth S Spelke. Principles of object perception. Cognitive science, 14(1):29–56, 1990. ",
1148
+ "bbox": [
1149
+ 171,
1150
+ 381,
1151
+ 767,
1152
+ 397
1153
+ ],
1154
+ "page_idx": 10
1155
+ },
1156
+ {
1157
+ "type": "text",
1158
+ "text": "Elizabeth S Spelke and Katherine D Kinzler. Core knowledge. Developmental science, 10(1):89–96, 2007. ",
1159
+ "bbox": [
1160
+ 171,
1161
+ 405,
1162
+ 823,
1163
+ 434
1164
+ ],
1165
+ "page_idx": 10
1166
+ },
1167
+ {
1168
+ "type": "text",
1169
+ "text": "Pedro A Tsividis, Thomas Pouncy, Jacqueline L Xu, Joshua B Tenenbaum, and Samuel J Gershman. Human learning in atari. In The AAAI 2017 Spring Symposium on Science of Intelligence: Computational Principles of Natural and Artificial Intelligence, 2017. ",
1170
+ "bbox": [
1171
+ 173,
1172
+ 443,
1173
+ 821,
1174
+ 486
1175
+ ],
1176
+ "page_idx": 10
1177
+ },
1178
+ {
1179
+ "type": "text",
1180
+ "text": "Daniel M Wolpert and Zoubin Ghahramani. Computational principles of movement neuroscience. Nature neuroscience, 3:1212–1217, 2000. ",
1181
+ "bbox": [
1182
+ 174,
1183
+ 494,
1184
+ 821,
1185
+ 523
1186
+ ],
1187
+ "page_idx": 10
1188
+ }
1189
+ ]
parse/train/Hk91SGWR-/Hk91SGWR-_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hk91SGWR-/Hk91SGWR-_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/jtrQswOMLrd/jtrQswOMLrd.md ADDED
@@ -0,0 +1,505 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Parameter-free Statistically Consistent Interpolation: Dimension-independent Convergence Rates for Hilbert kernel regression
2
+
3
+ Anonymous Author(s)
4
+ Affiliation
5
+ Address
6
+ email
7
+
8
+ # Abstract
9
+
10
+ Previously, statistical textbook wisdom has held that interpolation of noisy training data will lead to poor generalization. However, recent work has shown that this is not true and that good generalization can be obtained with function fits that interpolate training data. This could explain why overparameterized deep nets with zero or small training error do not necessarily overfit and could generalize well. Data interpolation schemes have been exhibited that are provably Bayes optimal in the large sample limit and achieve the theoretical lower bounds for excess risk (Statistically Consistent Interpolation) in any dimension. These interpolation schemes are non-parametric Nadaraya-Watson style estimators with singular kernels, which exhibit statistical consistency in any data dimension for large sample sizes. The recently proposed weighted interpolating nearest neighbors scheme (wiNN) is in this class, as is the previously studied Hilbert kernel interpolation scheme. In the Hilbert scheme, the regression function estimator for a set of labelled data pairs, $( x _ { i } , y _ { i } ) \in \mathbb { R } ^ { d } \times \mathbb { R }$ , $i = 0 , . . . , n$ , has the form $\begin{array} { r } { \hat { f } ( x ) = \sum _ { i } y _ { i } w _ { i } ( x ) } \end{array}$ , where $\begin{array} { r } { w _ { i } ( x ) = \| x - x _ { i } \| ^ { - d } / \sum _ { j } \| x - x _ { j } \| ^ { - d } } \end{array}$ . This interpolating function estimator is unique in being entirely free of parameters and does not require bandwidth selection. While statistical consistency was previously proven for this scheme, the precise convergence rates for the finite sample risk were not established. Here, we carry out a comprehensive study of the asymptotic finite sample behavior of the Hilbert kernel regression scheme and prove a number of relevant theorems. We prove under broad conditions that the excess risk of the Hilbert regression estimator is asymptotically equivalent pointwise to $\sigma ^ { 2 } ( x ) / \ln ( n )$ where $\scriptstyle { \bar { \sigma } } ^ { 2 } ( x )$ is the noise variance. We also show that the excess risk of the plugin classifier is upper bounded by $2 | f ( x ) - 1 / 2 | ^ { 1 - \alpha } ( 1 + \varepsilon ) ^ { \alpha } \sigma ^ { \alpha } ( x ) ( \ln ( n ) ) ^ { - { \frac { \alpha } { 2 } } }$ , for any $0 < \alpha < 1$ , where $f$ is the regression function $x \mapsto \mathbb { E } [ y | x ]$ . Our proofs proceed by deriving asymptotic equivalents of the moments of the weight functions $w _ { i } ( x )$ for large $n$ , for instance for $\beta > 1$ , $\mathbb { E } [ w _ { i } ^ { \beta } ( x ) ] \sim _ { n \infty }$ ((β − 1)n ln(n))−1. We further derive an asymptotic equivalent for the Lagrange function and explicitly exhibit the nontrivial extrapolation properties of this estimator. Notably, the convergence rates are independent of data dimension and the excess risk is dominated by the noise variance. The bias term, for which we also give precise asymptotic estimates, is always subleading when the density of data at the considered point is strictly positive. If this local density is zero, we show that the bias term does not vanish in the limit of a large data set and we compute its limit explicitly. Finally, we present heuristic arguments for a universal $w ^ { - 2 }$ power-law behavior of the probability density of the weights in the large $n$ limit.
11
+
12
+ 38 Data interpolation and statistical regression of noisy data are both classical subjects but their domain
13
+ 39 of application have been disjoint until recently. Scattered data interpolation techniques [1] are
14
+ 40 generally used for clean data. On the other hand, when supervised learning or statistical regression
15
+ 41 techniques are applied to noisy data, in general smoothing or regularization methods are applied
16
+ 42 to prevent training data interpolation, as the latter is believed to lead to poor generalization [2].
17
+ 43 However, accumulating empirical evidence from overparameterized deep networks has shown that
18
+ 44 data interpolation (equivalently, zero error on the training set) does not automatically imply poor
19
+ 45 generalization [3, 4]. This has in turn given rise to a rapidly growing body of theoretical work to
20
+ 46 understand how and why noisy data interpolation can still lead to good generalization [5, 6, 7, 8, 9,
21
+ 47 10, 11, 12, 13, 14, 15].
22
+ 48 A key observations in this regard is the phenomenon of Statistically Consistent Interpolation [16],
23
+ 49 i.e., regression function estimation that interpolates training data but also generalizes as well as
24
+ 50 possible by achieving the Bayes limit for expected generalization error (risk) when the sample size
25
+ 51 becomes large. This hints at a rich set of theoretical questions at the interface between the disciplines
26
+ 52 of scattered data interpolation and supervised learning, that have only begun to be addressed. In
27
+ 53 particular, there has been comparatively little study of the generalization error or risk of interpolating
28
+ 54 learners. Computation of generalization error bounds in machine learning often relies on the capacity
29
+ 55 of the class of fitting functions [17], however such model complexity based bounds are not tight
30
+ 56 enough to be useful for interpolating learners [4]. For nonparametric interpolation approaches such as
31
+ 57 that considered here, it is also not clear what model complexity means. Thus, there is a need for other
32
+ 58 approaches to understanding the generalization behavior of nonparametric interpolating learners,
33
+ 59 including more direct treatments of the generalization error for specific interpolation schemes so as
34
+ 60 to gain better theoretical understanding. The current paper addresses this need.
35
+ 61 We present a detailed analysis of the finite-sample risk of an interpolating learner with intriguing
36
+ 62 theoretical properties, the Hilbert kernel estimator (Devroye et. al. [18]). A unique property of
37
+ 63 this Nadaraya-Watson (NW) style estimator [19, 20] is that it is fully parameter-free and does not
38
+ 64 have any bandwidth or scale parameter. It is global and uses all data points for each estimate: the
39
+ 65 associated kernel is a power law and thus scale-free. Although statistical consistency of this estimator
40
+ 66 was proven [18] when it was proposed, there has been no systematic analysis of the associated
41
+ 67 convergence rates and asymptotic finite sample behavior. We provide this analysis in the present
42
+ 68 study.
43
+ 69 Related work The only other interpolation scheme we are aware of, that is proven to be statistically
44
+ 70 consistent in arbitrary dimensions under general conditions, is the recently proposed weighted
45
+ 71 interpolating nearest neighbors method (wiNN) [7], which is also a NW estimator utilizing a singular
46
+ 72 power law kernel of a very similar form but with two important differences: a finite number of
47
+ 73 neighbors $k$ is utilized (rather than all data points), and the power law exponent $\delta$ of the NW kernel
48
+ 74 satisfies $0 < \delta < d / 2$ rather than $\delta = d$ . To achieve consistency $k$ has to scale appropriately with
49
+ 75 sample size. Despite the superficial resemblance, the wiNN and Hilbert Kernel estimators have quite
50
+ 76 different convergence rates, as we will see from the results of this paper. Also worth mentioning is the
51
+ 77 Shepard interpolation scheme [21] originally proposed for interpolation of 2D geospatial data sets,
52
+ 78 also a NW style interpolating estimator, though used in the context of scattered data interpolation.
53
+ 79 In scattered data interpolation [1], the focus is generally on the approximation error (corresponding
54
+ 80 to the “bias” term in our analysis below). The approximation error of the Shepard scheme has been
55
+ 81 analyzed [22] but as we will see below the risk for Hilbert kernel interpolation is dominated by the
56
+ 82 noise or “variance” term. In contrast with wiNN or Hilbert kernel interpolation, other interpolating
57
+ 83 learning methods such as simplex interpolation [7] or ridgeless kernel regression [11] are generally
58
+ 84 not statistically consistent in fixed finite dimension [8].
59
+ 85 Summary of results of this paper Notation and assumptions pertaining to this summary are defined
60
+ 86 in the problem setup section below. We prove under broad conditions that the excess risk of the
61
+ 87 Hilbert regression estimator is asymptotically equivalent pointwise to $\sigma ^ { 2 } ( x ) / \ln ( n )$ where $\sigma ^ { 2 } ( x )$ is
62
+ 88 the noise variance. We also show that the excess risk of the plugin classifier is upper bounded by
63
+ 89 $2 | f ( x ) - 1 / 2 | ^ { 1 - \alpha } ( 1 + \varepsilon ) ^ { \alpha } \sigma ^ { \alpha } ( x ) ( \ln ( n ) ) ^ { - { \frac { \alpha } { 2 } } }$ , for any $0 < \alpha < 1$ , where $f$ is the regression function
64
+ 90 $x \mapsto \mathbb { E } [ y | x ]$ . Our proofs proceed by deriving asymptotic equivalents of the moments of the weight
65
+ 91 functions $w _ { i } ( x )$ for large $n$ , for instance for $\beta > 1$ $> 1 , \mathbb { E } [ w _ { i } ^ { \beta } ( x ) ] \sim _ { n \infty } ( ( \beta - 1 ) n \ln ( n ) ) ^ { - 1 }$ . We
66
+ 92 further derive an asymptotic equivalent for the Lagrange function and explicitly exhibit the nontrivial
67
+ 93 extrapolation properties of this estimator. Notably, the convergence rates are independent of data
68
+ 94 dimension and the excess risk is dominated by the noise variance. The bias term, for which we also
69
+ 95 give precise asymptotic estimates, is always subleading when the density of data at the considered
70
+ 96 point is strictly positive. If this local density is zero, we show that the bias term does not vanish in the
71
+ 97 limit of a large data set and we compute its limit explicitly. Finally, we present heuristic arguments
72
+ 98 for a universal $w ^ { - 2 }$ power-law behavior of the probability density of the weights in the large $n$ limit.
73
+
74
+ # 99 2 Problem setup
75
+
76
+ 100 Notation, Definitions, Statistical Model We model the labelled training data set
77
+ 101 $( x _ { 0 } , y _ { 0 } ) , \ldots , ( x _ { n } , y _ { n } )$ as $n + 1$ i.i.d. observations of a random vector $( X , Y )$ with values in
78
+ 102 $\mathbb { R } ^ { d } \times \mathbb { R }$ for regression, and with values in $\mathbb { R } ^ { d } \times \{ 0 , 1 \}$ for binary classification. Due to the indepen
79
+ 103 dence property, the collection $X _ { 0 } , \ldots , X _ { n }$ has the product density $\textstyle \prod _ { i = 0 } ^ { n } \rho ( x _ { i } )$ . We will denote by $\mathbb { E }$
80
+ 104 an expectation over the collection of $n + 1$ random vectors and by $\mathbb { E } _ { X }$ the expectation over the col
81
+ 105 lection $X _ { 0 } , \ldots , X _ { n }$ . An expectation over the same collection while holding $X _ { i } = x _ { i }$ will be denoted
82
+ 106 $\mathbb { E } _ { X \mid x _ { i } }$ . The regression function $f \colon { \mathbb { R } ^ { d } } \to { \mathbb { R } }$ is defined as the conditional mean of $Y$ given $X = x$
83
+ 107 $f ( x ) : = \mathbb { E } [ Y \mid X = x ]$ and the conditional variance function is $\sigma ^ { 2 } ( x ) : = \mathbb { E } [ | Y - f ( X ) | ^ { 2 } | X = x ]$ .
84
+ 108 $f$ minimizes the expected value of the mean squared prediction error (risk under squared loss),
85
+ 109 $f = \arg \operatorname* { m i n } \mathcal { R } _ { \mathrm { s q } } ( h )$ where $\mathcal { R } _ { \mathrm { s q } } ( h ) : = \mathbb { E } [ ( h ( X ) - Y ) ^ { 2 } ]$ . Given any regression estimator ${ \hat { f } } ( x )$ the
86
+ 110 corresponding risk can be decomposed as $\mathbb { E } [ \mathcal { R } _ { \mathrm { s q } } ( \hat { f } ( X ) ) ] = \mathcal { R } _ { \mathrm { s q } } ( f ) + \mathbb { E } [ ( \hat { f } ( X ) - f ( X ) ^ { 2 } ]$ . The
87
+ 111 excess risk is given by $\mathcal { R } _ { \mathrm { s q } } ( \hat { f } ) - \mathcal { R } _ { \mathrm { s q } } ( f ) = \mathbb { E } [ ( \hat { f } ( X ) - f ( X ) ) ^ { 2 } ]$ . For a consistent estimator this
88
+ 112 excess risk goes to zero as $n \to \infty$ and we are interested in characterizing the rate at which it goes to
89
+ 113 zero with increasing $n$ (note our sample size is $n + 1$ for notational simplicity but for large $n$ this
90
+ 114 does not change the rate).
91
+ 115 In the case of binary classification, $Y \in \{ 0 , 1 \}$ and $f ( x ) = \mathbb { P } [ Y = 1 \mid X = x ) ]$ . Let $F \colon { \mathbb { R } } ^ { d } \to \{ 0 , 1 \}$
92
+ 116 denote the Bayes optimal classifier, defined by $F ( x ) : = \theta ( f ( x ) - 1 / 2 )$ where $\theta ( \cdot )$ is the Heaviside
93
+ 117 theta function. This classifier minimizes the risk $\mathscr { R } _ { 0 / 1 } ( h ) : = \mathbb { E } \big [ \mathbb { 1 } _ { \{ h ( X ) \neq Y \} } \big ] = \mathbb { P } ( h ( X ) \neq Y )$ under
94
+ 118 zero-one loss. Given the regression estimator $\hat { f }$ , we consider the plugin classifier ${ \hat { F } } ( x ) = \theta ( { \hat { f } } ( x ) - { \textstyle \frac { 1 } { 2 } } )$
95
+ 119 The classification risk for the plugin classifier $\hat { F }$ is bounded as $\begin{array} { r } { \mathbb { E } [ \mathcal { R } _ { 0 / 1 } ( \hat { F } ( x ) ) ] - \mathcal { R } _ { 0 / 1 } ( F ( x ) ) \leq } \end{array}$
96
+ 120 $2 \mathbb { E } [ | \hat { f } ( x ) - f ( x ) | ] \leq 2 \sqrt { \mathbb { E } [ ( \hat { f } ( x ) - f ( x ) ) ^ { 2 } ] } .$ .
97
+
98
+ Finally, we define two sequences $a _ { n } , b _ { n } > 0$ , $n \in \mathbb { N }$ , to be asymptotically equivalent for $n + \infty$ denoted $a _ { n } \sim _ { n \to + \infty } b _ { n }$ , if the limit of their ratio exists and $\scriptstyle \operatorname* { l i m } _ { n \to \infty } a _ { n } / b _ { n } = 1$ .
99
+
100
+ 123 In summary, our work will focus on the estimation of asymptotic equivalents for $\mathbb { E } [ ( \hat { f } ( x ) - f ( x ) ) ^ { 2 } ]$
101
+ 124 and other relevant quantities as this determines the rate at which the excess risk goes to zero for
102
+ 125 regression, and bounds the rate at which the excess risk goes to zero for classification.
103
+ 126 Assumptions. We define the support $\Omega$ of the density $\rho$ as $\Omega = \{ x \in \mathbb { R } ^ { d } / \rho ( x ) > 0 \}$ , the closed
104
+ 127 support $\bar { \Omega }$ as the closure of $\Omega$ , and $\Omega ^ { \circ }$ as the interior of $\Omega$ . Our results will not assume any compactness
105
+ 128 condition on $\Omega$ or $\bar { \Omega }$ . The boundary of $\Omega$ is then defined as $\partial \Omega = \bar { \Omega } \setminus \Omega ^ { \circ }$ . We assume that $\rho$ has a
106
+ 129 finite variance $\sigma _ { \rho } ^ { 2 }$ . In addition, we will most of the time assume that the density $\rho$ is continuous at the
107
+ 130 considered point $x \in \Omega ^ { \circ }$ , and in some cases, $x \in \partial \Omega \cap \Omega$ .
108
+
109
+ 131 For the regression function $f$ , we will obtain results assuming either of the following conditions
110
+
111
+ $C _ { \mathrm { C o n t } } ^ { f } \colon f$ is continuous at the considered $x$ ,
112
+ • $C _ { \mathrm { H o l d e r } } ^ { f }$ : fo $x \in \Omega ^ { \circ }$ $\alpha _ { x } > 0$ $K _ { x } > 0$ $\delta _ { x } > 0$ , such thatαx
113
+ $x ^ { \prime } \in \Omega$ $\begin{array} { r } { \| \boldsymbol { x } - \boldsymbol { x } ^ { \prime } \| \le \delta _ { x } \implies | f ( \boldsymbol { x } ) - f ( \boldsymbol { x } ^ { \prime } ) | \le K _ { x } \| \boldsymbol { x } - \boldsymbol { \mathrm { \widehat { x } } } } \end{array}$
114
+ (local Hölder smoothness condition),
115
+
116
+ 36 where condition $C _ { \mathrm { H o l d e r } } ^ { f }$ r is obviously stronger than CfCont . In addition, we will always assume a
117
+ 37 growth condition for the regression function $f$ :
118
+
119
+ $$
120
+ \begin{array} { r } { \bullet C _ { \mathrm { G r o w t h } } ^ { f } \colon \int \rho ( y ) \frac { f ^ { 2 } ( y ) } { 1 + \| y \| ^ { 2 d } } d ^ { d } y < \infty . } \end{array}
121
+ $$
122
+
123
+ 139 As for the variance function $\sigma$ , we will obtain results assuming either that $\sigma$ is bounded or satisfies a
124
+ 140 growth condition similar to the one above
125
+
126
+ $$
127
+ \begin{array} { r } { \bullet C _ { \mathrm { G r o w t h } } ^ { \sigma } \colon \int \rho ( y ) \frac { \sigma ^ { 2 } ( y ) } { 1 + \| y \| ^ { 2 d } } d ^ { d } y < \infty . } \end{array}
128
+ $$
129
+
130
+ When we will assume condition 143 $C _ { \mathrm { G r o w t h } } ^ { \sigma }$ (obviously satisfied when $\sigma ^ { 2 }$ is bounded), we will also assume a continuity condition 144 $C _ { \mathrm { { C o n t } } } ^ { \sigma }$ for $\sigma$ at the considered $x$ .
131
+
132
+ 145 Note that all our results can be readily extended in the case where $x \in \partial \Omega = \bar { \Omega } \backslash \Omega ^ { \circ }$ but keeping
133
+ 146 the condition $\rho ( x ) > 0$ (i.e., $x \in \partial \Omega \cap \Omega )$ , and assuming the continuity at $x$ of $\rho$ as seen as a
134
+ 147 function restricted to $\Omega$ , i.e., ${ \mathrm { l i m } } _ { y \in \Omega \to x } \rho ( y ) = \rho ( x )$ . Useful examples are when the support $\Omega$ of
135
+ 148 $\rho$ is a $d$ -dimensional sphere or hypercube and $x$ is on the surface of $\Omega$ (but still with $\rho ( x ) > 0 ,$ ). To
136
+ 149 guarantee these results for $x \in \partial \Omega \cap \Omega$ , we need also to assume the continuity at $x$ of $f$ , and assume
137
+ 150 that $\Omega$ is smooth enough near $x$ , so that there exists a strictly positive local solid angle $\omega _ { x }$ defined by
138
+
139
+ $$
140
+ \omega _ { x } = \operatorname* { l i m } _ { r \to 0 } \frac { 1 } { V _ { d } \rho ( x ) r ^ { d } } \int _ { \lVert x - y \rVert \leq r } \rho ( y ) d ^ { d } y = \operatorname* { l i m } _ { r \to 0 } \frac { 1 } { V _ { d } r ^ { d } } \int _ { y \in \Omega / \lVert x - y \rVert \leq r } d ^ { d } y ,
141
+ $$
142
+
143
+ 151 where $V _ { d } = S _ { d } / d = \pi ^ { d / 2 } / \Gamma ( d / 2 + 1 )$ is the volume of the unit ball in $d$ dimensions, and the second
144
+ 152 inequality results from the continuity of $\rho$ at $x$ . If $x \in \Omega ^ { \circ }$ , we have $\omega _ { x } = 1$ , while for $x \in \partial \Omega$ , we
145
+ 153 have $0 \leq \omega _ { x } \leq 1$ . For instance, if $x$ is on the surface of a sphere or on the interior of a face of a
146
+ 154 hypercube (and in general, when the boundary near $x$ is locally an hyperplane), we have $\begin{array} { r } { \omega _ { x } = \frac { 1 } { 2 } } \end{array}$ . If $x$
147
+ 155 is a corner of a hypercube, we have $\begin{array} { r } { \omega _ { x } = \frac { 1 } { 2 ^ { d } } } \end{array}$ . From our methods of proof presented in the appendix,
148
+ 156 it should be clear that all our results for $x \in \Omega ^ { \circ }$ perfectly generalize to any $x \in \partial \Omega \cap \Omega$ for which
149
+ 157 $\omega _ { x } > 0$ , by simply replacing $V _ { d }$ whenever it appears in our different results by $\omega _ { x } V _ { d }$ .
150
+
151
+ 158 Hilbert kernel interpolating estimator and Bias-Variance decomposition. The Hilbert kernel regression estimator 159 ${ \hat { f } } ( x )$ is a Nadaraya-Watson style estimator employing a singular kernel:
152
+
153
+ $$
154
+ \begin{array} { r c l } { { w _ { i } ( x ) } } & { { = } } & { { \displaystyle \frac { \| x - x _ { i } \| ^ { - d } } { \sum _ { j = 0 } ^ { n } \| x - x _ { j } \| ^ { - d } } , } } \\ { { \hat { f } ( x ) } } & { { = } } & { { \displaystyle \sum _ { i = 0 } ^ { n } w _ { i } ( x ) y _ { i } . } } \end{array}
155
+ $$
156
+
157
+ 160 The weights $w _ { i } ( x )$ are also called Lagrange functions in the interpolation literature and satisfy the
158
+ 161 interpolation property $w _ { i } ( x _ { j } ) = \delta _ { i j }$ , where $\delta _ { i j } = 1$ , if $i = j$ , and 0 otherwise. At any given point
159
+ 162 $x$ , they provide a partition of unity so that $\textstyle \sum _ { i = 0 } ^ { \tilde { n } } w _ { i } ( x ) = 1$ . The mean squared error between the
160
+ 163 Hilbert estimator and the true regression function has a bias-variance decomposition (using the i.i.d
161
+ 164 condition and the earlier definitions)
162
+
163
+ $$
164
+ \begin{array} { r c l } { { \hat { f } ( x ) - f ( x ) } } & { { = } } & { { \displaystyle \sum _ { i = 0 } ^ { n } w _ { i } ( x ) [ f ( x _ { i } ) - f ( x ) ] + \sum _ { i = 0 } ^ { n } w _ { i } ( x ) [ y _ { i } - f ( x _ { i } ) ] , } } \\ { { \mathbb { E } [ ( \hat { f } ( x ) - f ( x ) ) ^ { 2 } ] } } & { { = } } & { { \displaystyle B ( x ) + \mathcal { V } ( x ) , } } \\ { { ( B i a s ) \mathcal { B } ( x ) } } & { { = } } & { { \displaystyle \mathbb { E } _ { X } \left[ \left( \sum _ { i = 0 } ^ { n } w _ { i } ( x ) [ f ( x _ { i } ) - f ( x ) ] \right) ^ { 2 } \right] , } } \\ { { ( V a r i a n c e ) \mathcal { V } ( x ) } } & { { = } } & { { \displaystyle \mathbb { E } \left[ \sum _ { i = 0 } ^ { n } w _ { i } ^ { 2 } ( x ) [ y _ { i } - f ( x _ { i } ) ] ^ { 2 } \right] = \mathbb { E } _ { X } \left[ \sum _ { i = 0 } ^ { n } w _ { i } ^ { 2 } ( x ) \sigma ^ { 2 } ( x _ { i } ) \right] . } } \end{array}
165
+ $$
166
+
167
+ 165 The present work derives asymptotic behaviors and bounds for the regression and classification risk
168
+ 166 of the Hilbert estimator for large sample size $n$ . These results are derived by analyzing the large $n$
169
+ 167 behaviors of the bias and variance terms, which in turn depend on the behavior of the moments of the
170
+ 168 weights or the Lagrange functions $w _ { i } ( x )$ . For all these quantities, asymptotically equivalent forms
171
+ 169 are derived. The proofs exploit a simple integral form of the weight function and details are provided
172
+ 170 in the appendix, while the body of the paper provides the results and associated discussions.
173
+
174
+ # 3 Results
175
+
176
+ # 3.1 The weights, variance and bias terms
177
+
178
+ # 3.1.1 Moments of the weights: large $n$ behavior
179
+
180
+ 4 In this section, we consider the moments and the distribution of the weights $w _ { i } ( x )$ at a given point $x$ .
181
+ 75 The first moment is simple to compute. Since the weights sum to 1 and $X _ { i }$ are i.i.d, it follows that
182
+ 76 $\mathbb { E } _ { X \mid x _ { i } } [ w _ { i } ( x ) ]$ are all equal and thus $\mathbb { E } _ { X | x _ { i } } [ w _ { i } ( x ) ] = ( \overline { { n } } + 1 ) ^ { - 1 }$ . The other moments are much less
183
+ 77 trivial to compute and we prove the following theorem in the appendix A.2:
184
+ 78 Theorem 3.1. For $x \in \Omega ^ { \circ }$ (so that $\rho ( x ) > 0 ,$ ), we assume $\rho$ continuous at $x$ . Then, the moments of
185
+ 179 the weight $w _ { 0 } ( x )$ satisfy the following properties:
186
+
187
+ 180
188
+
189
+ • For $\beta > 1$ :
190
+
191
+ $$
192
+ \mathbb { E } [ w _ { 0 } ^ { \beta } ( x ) ] \underset { n + \infty } { \sim } \frac { 1 } { ( \beta - 1 ) n \ln ( n ) } .
193
+ $$
194
+
195
+ • For $0 < \beta < 1$ : defining $\begin{array} { r } { \kappa _ { \beta } ( x ) : = \int \frac { \rho ( x + y ) } { | | y | | ^ { \beta d } } d ^ { d } y < \infty } \end{array}$ , we have
196
+
197
+ $$
198
+ \mathbb { E } [ w _ { 0 } ^ { \beta } ( x ) ] \underset { n + \infty } { \sim } \frac { \kappa _ { \beta } ( x ) } { ( V _ { d } \rho ( x ) n \ln ( n ) ) ^ { \beta } } .
199
+ $$
200
+
201
+ • For $\beta < 0$ : all moments for $\beta \leq - 1$ are infinite, and the moments of order $- 1 < \beta < 0$ satisfy
202
+
203
+ $$
204
+ \mathbb { E } \left[ w _ { 0 } ^ { \beta } ( x ) \right] \leq 1 + n \kappa _ { | \beta | } ( x ) \kappa _ { \beta } ( x ) ,
205
+ $$
206
+
207
+ 184
208
+
209
+ so that a sufficient condition for its existence is $\begin{array} { r } { \kappa _ { \beta } ( x ) = \int \rho ( x + y ) \lvert | y \rvert | ^ { \lvert \beta \rvert d } d ^ { d } y < \infty . } \end{array}$ .
210
+
211
+ 185 Heuristically, the behavior of these moments are consistent with the random variable $W = w _ { 0 } ( x )$
212
+ 186 having a probability distribution satisfying a scaling relation $\begin{array} { r } { P ( W ) = \frac { 1 } { W _ { n } } p \left( \frac { W } { W _ { n } } \right) } \end{array}$ , with the scaling
213
+ 187 function $p$ having the universal tail (i.e., independent of $x$ and $\rho \mathrm { \hbar }$ ), $p ( w ) \sim w ^ { - 2 }$ , and a scale $W _ { n }$
214
+ 188 expected to vanish with $n$ , when $n + \infty$ . With this assumption, we can determine the scale $W _ { n }$ by
215
+ 189 imposing the exact condition $\mathbb { E } [ W ] = 1 / ( n + 1 ) \sim 1 / n$ :
216
+
217
+ $$
218
+ \begin{array} { r c l } { \mathbb { E } [ W ] } & { = } & { \displaystyle \frac { 1 } { W _ { n } } \int _ { 0 } ^ { 1 } p \left( \frac { W } { W _ { n } } \right) W d W = W _ { n } \int _ { 0 } ^ { \frac { 1 } { W _ { n } } } p ( w ) w d w } \\ & { \sim } & { W _ { n } \int _ { 1 } ^ { \frac { 1 } { W _ { n } } } \displaystyle \frac { d w } { w } \sim - W _ { n } \ln ( W _ { n } ) \sim \frac { 1 } { n } , } \end{array}
219
+ $$
220
+
221
+ $\begin{array} { r } { W _ { n } \sim \frac { 1 } { n \ln ( n ) } } \end{array}$ . Then, the moment of order $\beta > 1$
222
+
223
+ $$
224
+ \mathbb { E } [ W ^ { \beta } ] = \frac { 1 } { W _ { n } } \int _ { 0 } ^ { 1 } p \left( \frac { W } { W _ { n } } \right) W ^ { \beta } d W \sim W _ { n } \int _ { 0 } ^ { 1 } W ^ { \beta - 2 } d W \underset { n \to + \infty } { \sim } \frac { 1 } { ( \beta - 1 ) n \ln ( n ) } ,
225
+ $$
226
+
227
+ 191 which indeed coincides with the first result of Theorem 3.1. Our heuristic argument also suggests
228
+ 192 that in the case $0 < \beta < 1$ , we have
229
+
230
+ $$
231
+ \mathbb { E } [ W ] = \frac { 1 } { W _ { n } } \int _ { 0 } ^ { 1 } p ( \frac { W } { W _ { n } } ) W ^ { \beta } d W \quad \underset { n + \infty } { \sim } \quad \frac { \int _ { 0 } ^ { + \infty } p ( w ) w ^ { \beta } d w } { ( n \ln ( n ) ) ^ { \beta } } ,
232
+ $$
233
+
234
+ 193 where the last integral converges since $p ( w ) \underset { w + \infty } { \sim } w ^ { - 2 }$ and $\beta < 1$ . This result is perfectly consistent
235
+ 194 with Eq. (9) in Theorem 3.1, and suggests that $\begin{array} { r } { \int _ { 0 } ^ { + \infty } p \left( w \right) w ^ { \beta } d w = \frac { \kappa _ { \beta } \left( x \right) } { \left( V _ { d } \rho \left( x \right) \right) ^ { \beta } } } \end{array}$ κβ(x)(Vdρ(x)) β . Interestingly, for
236
+ 195 $0 < \beta < 1$ , and contrary to the case $\beta > 1$ , we find that the large $n$ equivalent of the moment is not
237
+ 196 universal and depends explicitly on $x$ and the density $\rho$ . As for moments of order $- 1 < \beta < 0$ , we
238
+ 197 conjecture that they are still given by Eq. (9) (and equivalently, by Eq. (14)) provided they exist, and
239
+ 198 that the sufficient condition for their existence $\kappa _ { \beta } ( x ) < \infty$ is hence also necessary, since $\kappa _ { \beta } ( x )$ also
240
+ 199 appears in Eq. (9). The fact that moments for $\beta \leq - 1$ do not exist strongly suggests that $p ( 0 ) > 0$ .
241
+ 200 In fact, Eq. (14)) also suggests that all moments for $- 1 < \beta < 0$ exist if and only if $0 < p ( 0 ) < \infty$ .
242
+ 201 In the Fig. 2 of the appendix, we present numerical simulations confirming our scaling ansatz, the
243
+ 202 fact that $\overline { { p } } ( w ) \underset { w + \infty } { \sim } w ^ { - 2 }$ , and the quantitative prediction for $W _ { n }$ .
244
+ 203 It is shown in Devroye et al. [18] that the Hilbert kernel regression estimate does not converge
245
+ 204 almost surely (a.s.) by giving a specific example. Insight can be gained into this lack of almost sure
246
+ 205 convergence by considering the weight function $w _ { 0 } ( x )$ , for a sequence of independent training sample
247
+ 206 sets of increasing size $n + 1$ . Let the corresponding sequence of weights be denoted as $\omega _ { n } \in [ 0 , 1 ]$ .
248
+ 207 From Theorem 3.1, it is clear that $\omega _ { n }$ converges to zero in probability, since the following Chebyshev
249
+ 208 bound holds (analogous to the bound on the regression risk):
250
+
251
+ $$
252
+ \mathbb { P } ( \omega _ { n } > \varepsilon ) \leq \frac { 1 + \delta } { \varepsilon ^ { 2 } n \ln ( n ) } ,
253
+ $$
254
+
255
+ 209 for arbitrary $\varepsilon > 0$ and $\delta > 0$ , and for $n$ larger than some constant $N _ { x , \delta }$ . Alternatively, one can
256
+ 210 exploit the fact that $\begin{array} { r } { \mathbb { E } [ \omega _ { n } ] = \frac { 1 } { n + 1 } } \end{array}$ , leading to $\begin{array} { r } { \mathbb { P } ( \omega _ { n } > \varepsilon ) \le \frac { 1 } { \varepsilon n } } \end{array}$ , which is less stringent than Eq. (15)
257
+ 211 as far as the $n$ -dependence is concerned, but is more stringent for the $\varepsilon$ -dependence of the bounds.
258
+ 212 Let us show heuristically that $\omega _ { n }$ does not converge a.s. to zero. Consider the infinite sequence of
259
+ 213 events ${ \mathcal { E } } _ { n } \equiv \{ \omega _ { n } > \varepsilon \}$ , $n \in \mathbb N$ , and the corresponding infinite sum $\begin{array} { r } { \sum _ { n } \mathbb { P } ( \mathcal { E } _ { n } ) = \sum _ { n } \mathbb { P } ( \omega _ { n } > \varepsilon ) } \end{array}$ .
260
+ 214 Exploiting our previous heuristic argument for the scaling form of the distribution of weights, we
261
+ 215 obtain
262
+
263
+ $$
264
+ \mathbb { P } ( \omega _ { n } > \varepsilon ) = \int _ { \varepsilon } ^ { 1 } { \frac { 1 } { W _ { n } } } p \left( { \frac { W } { W _ { n } } } \right) d W \sim \int _ { \varepsilon n \ln n } ^ { n \ln n } { \frac { d w } { w ^ { 2 } } } \sim { \frac { 1 - \varepsilon } { \varepsilon n \ln ( n ) } } .
265
+ $$
266
+
267
+ 216 Since PNn=2 1n ln(n) $\begin{array} { r } { \sum _ { n = 2 } ^ { N } { \frac { 1 } { n \ln ( n ) } } \sim \ln ( \ln ( N ) ) } \end{array}$ is a divergent series, a Borel-Cantelli argument suggests that an
268
+ 217 infinite number of the events ${ \mathcal { E } } _ { n }$ (i.e., $\omega _ { n } > \varepsilon$ ) must occur, which implies that $\omega _ { n }$ does not converge
269
+ 218 a.s. to 0. Note that the weights are equal to 1 at the data points due to the interpolation condition, so
270
+ 219 that large weights occasionally occur, causing the lack of a.s. convergence.
271
+
272
+ # 3.1.2 Lagrange function: scaling limit
273
+
274
+ The expected value of the Lagrange functions $w _ { i } ( x )$ have a simple form in the large $n$ limit. Due to the i.i.d. condition the indices $i$ are exchangeable and we set $i = 0$ for the computation of the expected Lagrange function $L _ { 0 } ( x ) = \mathbb { E } _ { X \mid x _ { 0 } } [ w \overline { { 0 } } ( x ) ]$ . Thus, one of the sample points (denoted $x _ { 0 }$ ) is held fixed and the other ones are averaged over in computing the expected Lagrange function. For $x _ { 0 } \neq x$ kept fixed, we have $\begin{array} { r } { \operatorname* { l i m } _ { n \infty } L _ { 0 } ( x ) = 0 } \end{array}$ . However, we show in the appendix A.3 that $L _ { 0 } ( x )$ takes a very simple form when taking a specific scaling limit:
275
+
276
+ Theorem 3.2. For $x \in \Omega ^ { \circ }$ , we assume $\rho$ continuous at $x$ . Then, in the limit (denoted by $\operatorname { l i m } _ { Z }$ ), $n $ $+ \infty ,$ , $\lVert \boldsymbol { x } - \boldsymbol { x } _ { 0 } \rVert ^ { - d } \to + \infty$ (i.e., $x _ { 0 } \to x _ { , }$ ), and such that $z _ { x } ( n , x _ { 0 } ) = V _ { d } \rho ( x ) \| x - x _ { 0 } \| ^ { d } n \log ( n ) \to Z$ the Lagrange function $L _ { 0 } ( x ) = \mathbb { E } _ { X \mid x _ { 0 } } [ w _ { 0 } ( x ) ]$ converges to a proper limit,
277
+
278
+ $$
279
+ \operatorname* { l i m } _ { Z } L _ { 0 } ( x ) = \frac { 1 } { 1 + Z } .
280
+ $$
281
+
282
+ The proof of this theorem shows that the relative error between 230 $L _ { 0 } ( x )$ and $\frac { 1 } { 1 { + } Z }$ for finite but large $n$ and large 231 $\lVert x - x _ { 0 } \rVert ^ { - d }$ , such that $z _ { x } ( n , x _ { 0 } )$ remains close to $Z$ , is $O ( 1 / \ln ( n ) )$ .
283
+
284
+ 232 Exploiting Theorem 3.2, we can use a simple heuristic argument to estimate the tail of the distribution
285
+ 233 of the random variable $W = w _ { 0 } ( x )$ . Indeed, approximating $L _ { 0 } ( x )$ for finite but large $n$ by its
286
+ 234 asymptotic for m 11+z (n,x ) , with zx(n, x0) = Vdρ(x)n log(n)kx − x0kd, we obtain
287
+
288
+ $$
289
+ \begin{array} { r c l } { \displaystyle \int _ { W } ^ { 1 } P ( W ^ { \prime } ) d W ^ { \prime } } & { \sim } & { \displaystyle \int \rho ( x _ { 0 } ) \theta \left( \frac { 1 } { 1 + V _ { d } \rho ( x ) n \log ( n ) \| x - x _ { 0 } \| ^ { d } } - W \right) d ^ { d } x _ { 0 } , } \\ & { \sim } & { \displaystyle V _ { d } \rho ( x ) \int _ { 0 } ^ { + \infty } \theta \left( \frac { 1 } { 1 + V _ { d } \rho ( x ) n \log ( n ) u } - W \right) d u , } \\ & { \sim } & { \displaystyle \frac { 1 } { n \ln ( n ) W } \quad \Longrightarrow \ P ( W ) \sim \frac { 1 } { n \ln ( n ) W ^ { 2 } } , } \end{array}
290
+ $$
291
+
292
+ 235 where $\theta ( . )$ is the Heaviside function. This heuristic result is again perfectly consistent with our guess of the previous section that 236 $\begin{array} { r } { P ( W ) = \frac { 1 } { W _ { n } } p \left( \frac { W } { W _ { n } } \right) } \end{array}$ , with the scaling function $p$ having the universal
293
+
294
+ tail, $p ( w ) \underset { w + \infty } { \sim } w ^ { - 2 }$ , and a scale $\begin{array} { r } { W _ { n } \sim \frac { 1 } { n \ln ( n ) } } \end{array}$ . Indeed, in this case and in the limit $n + \infty$ , we obtain that $\begin{array} { r } { P ( W ) \sim \frac { 1 } { W _ { n } } \left( \frac { W _ { n } } { W } \right) ^ { 2 } \sim \frac { W _ { n } } { W ^ { 2 } } \sim \frac { 1 } { n \ln ( n ) W ^ { 2 } } } \end{array}$ , which is identical to the result of Eq. (20).
295
+
296
+ # 3.1.3 The variance term
297
+
298
+ A simple application of the result of Theorem 3.1 for $\beta = 2$ (see appendix A.4) allows us to bound the variance term $\begin{array} { r } { \mathcal { V } ( x ) = \mathbb { E } \left[ \sum _ { i = 0 } ^ { n } w _ { i } ^ { 2 } ( x ) [ y _ { i } - f ( x _ { i } ) ] ^ { 2 } \right] } \end{array}$ for a bounded variance function $\sigma ^ { 2 }$ :
299
+
300
+ Theorem 3.3. For $x \in \Omega ^ { \circ }$ , $\rho$ continuous at $x$ , $\sigma ^ { 2 } \le \sigma _ { 0 } ^ { 2 }$ , and for any $\varepsilon > 0$ , there exists a constant $N _ { x , \varepsilon }$ such that for $n \geq N _ { x , \varepsilon }$ , we have
301
+
302
+ $$
303
+ \mathcal { V } ( x ) \leq ( 1 + \varepsilon ) \frac { \sigma _ { 0 } ^ { 2 } } { \ln ( n ) } .
304
+ $$
305
+
306
+ 244 Relaxing the boundedness condition for $\sigma$ , but assuming the continuity of $\sigma ^ { 2 }$ at $x$ along with a growth
307
+ 245 condition, allows us to obtain a precise asymptotic equivalent of $\mathcal { V } ( x )$ , when $n + \infty$ :
308
+
309
+ Theorem 3.4. For 246 $x \in \Omega ^ { \circ }$ , $\sigma ( x ) > 0$ , $\rho \sigma ^ { 2 }$ continuous at $x$ , and assuming the condition $C _ { \mathrm { G r o w t h } } ^ { \sigma }$ , i.e., 247 $\begin{array} { r } { \int \rho ( y ) \frac { \sigma ^ { 2 } ( y ) } { 1 + \| y \| ^ { 2 d } } d ^ { d } y < \infty } \end{array}$ , we have
310
+
311
+ $$
312
+ \mathcal { V } ( x ) \underset { n \to + \infty } { \sim } \frac { \sigma ^ { 2 } ( x ) } { \ln ( n ) } .
313
+ $$
314
+
315
+ 48 Note that if the mean variance $\begin{array} { r } { \int \rho ( y ) \sigma ^ { 2 } ( y ) d ^ { d } y < \infty } \end{array}$ , which is in particular the case when $\sigma ^ { 2 }$ is
316
+ 49 bounded over $\Omega$ , then the condition $C _ { \mathrm { G r o w t h } } ^ { \sigma }$ is in fact automatically satisfied.
317
+
318
+ # 3.1.4 The bias term
319
+
320
+ In appendix A.5, we prove the following three theorems for the bias term.
321
+
322
+ Theorem 3.5. For 52 $x \in \Omega ^ { \circ }$ (so that $\rho ( x ) > 0 .$ ), we assume that $\rho$ is continuous at $x$ , and the conditions
323
+
324
+ $$
325
+ \begin{array} { r } { \bullet _ { \mathbf { \phi } } C _ { \mathrm { G r o w t h } } ^ { f } \colon \int _ { \mathbf { \phi } } ( y ) \frac { f ^ { 2 } ( y ) } { 1 + \| y \| ^ { 2 d } } d ^ { d } y < \infty , } \end{array}
326
+ $$
327
+
328
+ Moreover, we define 257 $\begin{array} { r } { \kappa ( x ) = \int \rho ( x + y ) \frac { f ( x + y ) - f ( x ) } { \vert \vert y \vert \vert ^ { d } } d ^ { d } y . } \end{array}$ , where we have $| \kappa ( x ) | < \infty$
329
+
330
+ Then, for 258 $\kappa ( x ) \neq 0 ,$ , the bias term $\begin{array} { r } { \mathcal { B } ( x ) = \mathbb { E } _ { X } \Big [ \Big ( \sum _ { i = 0 } ^ { n } w _ { i } ( x ) [ f ( x _ { i } ) - f ( x ) ] \Big ) ^ { 2 } \Big ] } \end{array}$ satisfies
331
+
332
+ $$
333
+ \mathcal { B } ( x ) \underset { n + \infty } { \sim } ( \mathbb { E } [ \hat { f } ( x ) ] - f ( x ) ) ^ { 2 } , \qquad \mathrm { w i t h } \quad \mathbb { E } [ \hat { f } ( x ) ] - f ( x ) \underset { n + \infty } { \sim } \frac { \kappa ( x ) } { V _ { d } \rho ( x ) \ln ( n ) } .
334
+ $$
335
+
336
+ 259 In the non generic case $\kappa ( \boldsymbol { x } ) = 0$ , we have the weaker result
337
+
338
+ $$
339
+ \begin{array} { r } { B ( x ) = \left\{ \begin{array} { l l } { O \left( n ^ { - \frac { 2 \alpha _ { x } } { d } } ( \ln ( n ) ) ^ { - 1 - \frac { 2 \alpha _ { x } } { d } } \right) , } & { f o r \ d > 2 \alpha _ { x } } \\ { O \left( n ^ { - 1 } ( \ln ( n ) ) ^ { - 1 } \right) , } & { f o r \ d = 2 \alpha _ { x } } \\ { O \left( n ^ { - 1 } ( \ln ( n ) ) ^ { - 2 } \right) , } & { f o r \ d < 2 \alpha _ { x } } \end{array} \right. } \end{array}
340
+ $$
341
+
342
+ 260 Note that $\kappa ( \boldsymbol { x } ) = 0$ is non generic but can still happen, even if $f$ is not constant. For instance, if $\Omega$ is a
343
+ 261 sphere centered at $x$ or $\Omega = \mathbb { R } ^ { d }$ , if $\rho ( x + y ) = \hat { \rho } ( | | y | | )$ is isotropic around $x$ , and if $f _ { x } : y \mapsto f ( x + y )$
344
+ 262 is an odd function of $y$ , then we indeed have $\kappa ( \boldsymbol { x } ) = 0$ at this symmetric point $x$ .
345
+
346
+ Interestingly, for $\kappa ( \boldsymbol { x } ) \neq 0$ , Eq. (23) shows that the bias $B ( x )$ is asymptotically dominated by the square of $\mathbb { E } \left[ { \hat { f } } ( x ) \right] - f ( x )$ , showing that the fluctuations of $\begin{array} { r } { \mathbb { E } \left[ \hat { f } ( x ) \right] - \sum _ { i = 0 } ^ { n } w _ { i } ( x ) f ( x _ { i } ) } \end{array}$ are negligible compared to $\mathbb { E } \left[ { \hat { f } } ( x ) \right] - f ( x )$ , in the limit $n + \infty$ and for $\kappa ( x ) \neq 0$ .
347
+
348
+ One can relax the local Hölder condition, but at the price of a weaker estimate for $B ( x )$ which will however be enough to obtain strong results for the regression and classification risks (see below):
349
+
350
+ Theorem 3.6. For $x \in \Omega ^ { \circ }$ , we assume $\rho$ and $f$ continuous at $x$ , and the growth condition $C _ { \mathrm { G r o w t h } } ^ { f }$ $\begin{array} { r } { \int \rho ( y ) \frac { f ^ { 2 } ( y ) } { 1 + \| y \| ^ { 2 d } } d ^ { d } y < \infty . } \end{array}$ . Then, the bias term satisfies
351
+
352
+ $$
353
+ { \cal B } ( x ) = o \left( \frac { 1 } { \ln ( n ) } \right) ,
354
+ $$
355
+
356
+ 270 or equivalently, for any $\varepsilon > 0$ , there exists $N _ { x , \varepsilon }$ , such that for $n \geq N _ { x , \varepsilon }$
357
+
358
+ $$
359
+ B ( x ) \leq { \frac { \varepsilon } { \ln ( n ) } } .
360
+ $$
361
+
362
+ 271 Let us now consider a point $x \in \partial \Omega$ for which we have $\rho ( { \boldsymbol { x } } ) = 0$ (note that $x \in \partial \Omega$ does not 272 necessarily imply $\rho ( x ) = 0 ,$ ). In appendix A.5, we show the following theorem for the expectation value of the estimator 273 ${ \hat { f } } ( x )$ in the limit $n \to + \infty$ :
363
+
364
+ 274 Theorem 3.7. For $x \in \partial \Omega$ such that $\rho ( x ) = 0$ , we assume that $f$ and $\rho$ satisfy the conditions
365
+
366
+ $\begin{array} { r } { \bullet \ C _ { \mathrm { G r o w t h } } ^ { f } \cdot \int \rho ( y ) \frac { | f ( y ) | } { 1 + \| y \| ^ { d } } \ d ^ { d } y < \infty , } \end{array}$
367
+ • $C _ { \mathrm { H o l d e r } } ^ { \rho }$ : thand $\alpha _ { x } > 0$ $K _ { x } > 0$ $\delta _ { x } > 0$
368
+ $x ^ { \prime } \in \Omega$ $\| x - x ^ { \prime } \| \leq \delta _ { x } \implies | \rho ( x ^ { \prime } ) | \leq K _ { x } \| x - x ^ { \prime } \| ^ { \alpha _ { x } }$ (local Hölder condition for $\rho$ ).
369
+
370
+ Mor279 and 280 $\begin{array} { r } { \kappa ( x ) = \int \rho ( x + y ) \frac { f ( x + y ) - f ( x ) } { | | y | | ^ { d } } d ^ { d } y ( | \kappa ( x ) | < \infty } \end{array}$ under condition en, $C _ { \mathrm { G r o w t h } } ^ { f } )$ $\begin{array} { r } { \lambda ( x ) = \int \frac { \rho ( x + y ) } { | | y | | ^ { d } } d ^ { d } y } \end{array}$ $( 0 < \lambda ( x ) < \infty$ $C _ { \mathrm { H o l d e r } } ^ { \sigma }$
371
+
372
+ $$
373
+ \operatorname* { l i m } _ { n + \infty } \mathbb { E } [ \hat { f } ( x ) ] - f ( x ) = \frac { \kappa ( x ) } { \lambda ( x ) } .
374
+ $$
375
+
376
+ 281 Hence, in the generic case $\kappa ( \boldsymbol { x } ) \neq 0$ (see Theorem 3.5 and the discussion below it) and under
377
+ 282 condition $C _ { \mathrm { H o l d e r } } ^ { \rho }$ , we find that the bias does not vanish when $\rho ( x ) = 0$ , and that the estimator $\hat { f } ( x )$
378
+ 283 does not converge to $f ( x )$ . When $\rho ( x ) = 0$ , the scarcity of data near the point $x$ indeed prevents the
379
+ 284 285 $\rho$ stimator to concontinuous at $x$ rge to the actuand such that $\rho ( x ) = 0$ f , $f ( x )$ . In appendix A.5, we shownot satisfying the condition $C _ { \mathrm { H o l d e r } } ^ { \rho }$ ple of a density, and for which
380
+ 286 $\begin{array} { r } { \operatorname* { l i m } _ { n + \infty } \mathbb { E } [ \hat { f } ( x ) ] = f ( x ) } \end{array}$ , even if $\kappa ( x ) \neq 0$ .
381
+
382
+ # 3.2 Asymptotic equivalent for the regression risk
383
+
384
+ In appendix A.6, we prove the following theorem establishing the asymptotic rate at which the excess risk goes to zero with large sample size $n$ for Hilbert kernel regression, under mild conditions that do not require $f$ or $\sigma$ to be bounded, but only to satisfy some growth conditions:
385
+
386
+ Theorem 3.8. For $x \in \Omega ^ { \circ }$ , we assume $\sigma ( x ) > 0$ , ρ, σ, and $f$ continuous at $x$ , and the growth conditions $\begin{array} { r } { C _ { \mathrm { G r o w t h } } ^ { \sigma } \colon \int \rho ( y ) \frac { \sigma ^ { 2 } ( y ) } { 1 + \| y \| ^ { 2 d } } d ^ { d } y < \infty } \end{array}$ and $\begin{array} { r } { C _ { \mathrm { G r o w t h } } ^ { f } \colon \int \rho ( y ) \frac { f ^ { 2 } ( y ) } { 1 + \| y \| ^ { 2 d } } d ^ { d } y < \infty } \end{array}$ .
387
+
388
+ 93 Then the following statements are true:
389
+
390
+ • The excess regression risk at the point $x$ satisfies
391
+
392
+ $$
393
+ \mathbb { E } [ ( \hat { f } ( x ) - f ( x ) ) ^ { 2 } ] \underset { n + \infty } { \sim } \frac { \sigma ^ { 2 } ( x ) } { \ln ( n ) } .
394
+ $$
395
+
396
+ • The Hilbert kernel estimate converges pointwise to the regression function in probability. More specifically, for any $\delta > 0$ , there exists a constant $N _ { x , \delta }$ , such that for any $\varepsilon > 0$ , we have the following Chebyshev bound, valid for $n \geq N _ { x , \delta }$
397
+
398
+ $$
399
+ \mathbb { P } [ | \hat { f } ( x ) - f ( x ) | \geq \varepsilon ] \leq \frac { 1 + \delta } { \varepsilon ^ { 2 } } \frac { \sigma ^ { 2 } ( x ) } { \ln ( n ) } .
400
+ $$
401
+
402
+ 8 This theorem is a consequence of the corresponding asymptotically equivalent forms of the variance
403
+ 9 and bias terms presented above. Note that as long as $\rho ( x ) > 0$ , the variance term dominates over the
404
+ 00 bias term and the regression risk has the same form as the variance term.
405
+
406
+ # 3.3 Rates for the plugin classifier
407
+
408
+ In appendix A.7, we prove the following theorem establishing the asymptotic rate at which the classification risk goes to zero with large sample size $n$ for Hilbert kernel regression:
409
+
410
+ Theorem 3.9. For $x \in \Omega ^ { \circ }$ , we assume $\sigma ( x ) > 0$ , $\rho , \sigma$ , and $f$ continuous at $x$ . Then, the classification risk $\mathbb { E } [ \mathcal { R } _ { 0 / 1 } ( \hat { F } ( x ) ) ] - \mathcal { R } _ { 0 / 1 } ( F ( x ) )$ vanishes for $n + \infty$ .
411
+
412
+ 306 More precisely, for any $\varepsilon > 0$ , there exists $N _ { x , \varepsilon }$ , such that for any $n \geq N _ { x , \varepsilon }$ ,
413
+
414
+ $$
415
+ 0 \leq \mathbb { E } [ \mathcal { R } _ { 0 / 1 } ( \hat { F } ( x ) ) ] - \mathcal { R } _ { 0 / 1 } ( F ( x ) ) \leq 2 ( 1 + \varepsilon ) \frac { \sigma ( x ) } { \sqrt { \ln ( n ) } } ,
416
+ $$
417
+
418
+ 307 In addition, for any $0 < \alpha < 1$ , the general inequality
419
+
420
+ $$
421
+ \begin{array} { r } { \mathbb { E } [ \mathcal { R } _ { 0 / 1 } ( \hat { F } ( x ) ) ] - \mathcal { R } _ { 0 / 1 } ( F ( x ) ) \leq 2 | f ( x ) - 1 / 2 | ^ { 1 - \alpha } \mathbb { E } \left[ | \hat { f } ( x ) - f ( x ) | ^ { 2 } \right] ^ { \frac { \alpha } { 2 } } , } \end{array}
422
+ $$
423
+
424
+ 308 holds unconditionally and, for $n \geq N _ { x , \varepsilon }$ , leads to
425
+
426
+ $$
427
+ 0 \leq \mathbb { E } [ \mathcal { R } _ { 0 / 1 } ( \hat { F } ( x ) ) ] - \mathcal { R } _ { 0 / 1 } ( F ( x ) ) \leq 2 | f ( x ) - 1 / 2 | ^ { 1 - \alpha } \left( 1 + \varepsilon \right) ^ { \alpha } \frac { \sigma ^ { \alpha } ( x ) } { \left( \ln ( n ) \right) ^ { \frac { \alpha } { 2 } } } .
428
+ $$
429
+
430
+ 309 For $0 < \alpha < 1$ , Eq. (32) is weaker than Eq. (30) in terms of its dependence on $n$ , but explicitly
431
+ 310 shows that the classification risk vanishes for $f ( x ) = 1 / 2$ . This theorem does not require any growth
432
+ 311 condition for $f$ or $\sigma$ , since both functions takes values in $[ 0 , 1 ]$ in the classification context.
433
+
434
+ # 3.4 Extrapolation behavior outside the support of $\rho$
435
+
436
+ We now take the point $x$ outside the closed support $\bar { \Omega }$ of the distribution $\rho$ (which excludes the case $\Omega = \mathbb { R } ^ { d }$ ). We are interested in the behavior of $\mathbb { E } \left[ \hat { f } ( x ) \right]$ as $n + \infty$ . In appendix A.8 we prove:
437
+
438
+ Theorem 3.10. For 315 $x \notin \bar { \Omega }$ , we assume the growth condition $\begin{array} { r } { \int \rho ( y ) \frac { | f ( y ) | } { 1 + \| y \| ^ { d } } d ^ { d } y < \infty } \end{array}$
439
+
440
+ $$
441
+ \hat { f } _ { \infty } ( x ) : = \operatorname* { l i m } _ { n \to + \infty } \mathbb { E } \left[ \hat { f } ( x ) \right] = \frac { \int \rho ( y ) f ( y ) \| x - y \| ^ { - d } d ^ { d } y } { \int \rho ( y ) \| x - y \| ^ { - d } d ^ { d } y } ,
442
+ $$
443
+
444
+ and 316 $\hat { f } _ { \infty }$ is continuous at all $x \notin \bar { \Omega }$ .
445
+
446
+ In addition, i317 $\begin{array} { r } { f \int \rho ( y ) | f ( y ) | d ^ { d } y < \infty } \end{array}$ , and defining $d ( x , \Omega ) > 0$ as the distance between $x$ and $\Omega$ , we 318 have
447
+
448
+ $$
449
+ \operatorname* { l i m } _ { d ( x , \Omega ) \to + \infty } \hat { f } _ { \infty } ( x ) = \int \rho ( y ) f ( y ) d ^ { d } y .
450
+ $$
451
+
452
+ 319 Finally, we consider $x _ { 0 } ~ \in ~ \partial \Omega$ such that $\rho ( x _ { 0 } ) ~ > ~ 0$ (i.e., $x _ { 0 } ~ \in ~ \partial \Omega \cap \Omega \}$ , and assume
453
+ 320 that $f$ and $\rho$ seen as functions restricted to $\Omega$ are continuous at $x _ { 0 }$ , i.e. $\quad \operatorname* { l i m } _ { y \in \Omega \to x _ { 0 } } \rho ( y ) \ =$
454
+ 321 $\rho ( x _ { 0 } )$ and $\begin{array} { l } { \operatorname* { l i m } _ { y \in \Omega \to x _ { 0 } } { \overline { { f ( y ) } } } } & { = } \end{array} f ( x _ { 0 } )$ . We also assume that the local solid angle $\begin{array} { r l } { \omega _ { 0 } } & { { } = } \end{array}$
455
+ 322 $\begin{array} { r } { \operatorname* { l i m } _ { r \to 0 } \frac { 1 } { V _ { d } \rho ( x _ { 0 } ) r ^ { d } } \int _ { \| x _ { 0 } - y \| \leq r } \rho ( y ) d ^ { d } y } \end{array}$ exists and satisfies $\omega _ { 0 } > 0$ . Then,
456
+
457
+ $$
458
+ \operatorname * { l i m } _ { x \notin \bar { \Omega } x _ { 0 } } \hat { f } _ { \infty } ( x ) = f ( x _ { 0 } ) .
459
+ $$
460
+
461
+ 323 Eq. (34) shows that far away from $\Omega$ (which is possible to realize, for instance, when $\Omega$ is bounded),
462
+ 324 $\hat { f } _ { \infty } ( x )$ goes smoothly to the $\rho$ -mean of $f$ . Moreover, Eq. (35) establishes a continuity property for
463
+ 325 the extrapolation $\hat { f } _ { \infty }$ at $x _ { 0 } \in \partial \Omega \cap \Omega$ under the stated conditions (remember that for $x \in \Omega ^ { \circ }$ , we
464
+ 326 have $\begin{array} { r } { \operatorname* { l i m } _ { n + \infty } \mathbb { E } [ \hat { f } ( x ) ] = f ( x ) } \end{array}$ ; see Theorem 3.5, and in particular Eq. (23)).
465
+
466
+ References [1] Holger Wendland. Scattered data approximation, volume 17. Cambridge university press, 2004. [2] Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani. An introduction to statistical learning, volume 112. Springer, 2013. [3] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In International Conference on Learning Representations, 2017. [4] Mikhail Belkin, Siyuan Ma, and Soumik Mandal. To understand deep learning we need to understand kernel learning. In Proceedings of the 35th International Conference on Machine Learning, pages 541–549, 2018. [5] Adele Cutler and Guohua Zhao. Pert-perfect random tree ensembles. Computing Science and Statistics, 33:490–497, 2001. [6] Abraham J Wyner, Matthew Olson, Justin Bleich, and David Mease. Explaining the success of adaboost and random forests as interpolating classifiers. Journal of Machine Learning Research, 18(48):1–33, 2017. [7] Mikhail Belkin, Daniel Hsu, and Partha Mitra. Overfitting or perfect fitting? risk bounds for classification and regression rules that interpolate. arXiv preprint arXiv:1806.05161, 2018. [8] Alexander Rakhlin and Xiyu Zhai. Consistency of interpolation with laplace kernels is a high-dimensional phenomenon. arXiv preprint arXiv:1812.11167, 2018. [9] Greg Ongie, Rebecca Willett, Daniel Soudry, and Nathan Srebro. A function space view of bounded norm infinite width relu nets: The multivariate case. arXiv preprint arXiv:1910.01635, 2019. [10] Mikhail Belkin, Daniel Hsu, Siyuan Ma, and Soumik Mandal. Reconciling modern machinelearning practice and the classical bias–variance trade-off. Proceedings of the National Academy of Sciences, 116(32):15849–15854, 2019. [11] Tengyuan Liang and Alexander Rakhlin. Just interpolate: Kernel" ridgeless" regression can generalize. arXiv preprint arXiv:1808.00387, 2018. 354 [12] Peter L Bartlett, Philip M Long, Gábor Lugosi, and Alexander Tsigler. Benign overfitting in linear regression. arXiv preprint arXiv:1906.11300, 2019. 356 [13] Andrea Montanari, Feng Ruan, Youngtak Sohn, and Jun Yan. The generalization error of max-margin linear classifiers: High-dimensional asymptotics in the overparametrized regime. arXiv preprint arXiv:1911.01544, 2019. 359 [14] Mina Karzand and Robert D Nowak. Active learning in the overparameterized and interpolating regime. arXiv preprint arXiv:1905.12782, 2019. [15] Yue Xing, Qifan Song, and Guang Cheng. Statistical optimality of interpolated nearest neighbor algorithms. arXiv preprint arXiv:1810.02814, 2018. 363 [16] Partha P. Mitra. Fitting elephants in modern machine learning by statistically consistent interpolation. Nature Machine Intelligence, 3(5):378–386, May 2021. [17] Martin Anthony and Peter L Bartlett. Neural Network Learning: Theoretical Foundations. Cambridge University Press, 1999. [18] Luc Devroye, Laszlo Györfi, and Adam Krzyzak. The hilbert kernel regression estimate. ˙ Journal of Multivariate Analysis, 65(2):209–227, 1998. [19] Elizbar A Nadaraya. On estimating regression. Theory of Probability & Its Applications, 9(1):141–142, 1964. 371 [20] GS Watson. Smooth regression analysis. Sankhya A: 26: 359-372, (50), 1964.
467
+
468
+ [21] Donald Shepard. A two-dimensional interpolation function for irregularly-spaced data. In Proceedings of the 1968 23rd ACM national conference, pages 517–524. ACM, 1968.
469
+
470
+ [22] Reinhard Farwig. Rate of convergence of shepard’s global interpolation formula. Mathematics of Computation, 46(174):577–590, 1986.
471
+
472
+ # 376 Checklist
473
+
474
+ 1. For all authors...
475
+
476
+ (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] Brief statement of the primary theorems are included in the abstract together with verbal descriptions of the principal results.
477
+ (b) Did you describe the limitations of your work? [Yes] Theorems include limiting conditions.
478
+ (c) Did you discuss any potential negative societal impacts of your work? [No] The paper consists of theorems and proofs about the convergence rates of an interpolation scheme and it is hard to conceive any negative social impact of this mathematical exercise. If anything it might have a positive impact by shedding theoretical light on the interpolation of noisy data in modern ML.
479
+ (d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] We have read the guidelines.
480
+
481
+ 2. If you are including theoretical results...
482
+
483
+ (a) Did you state the full set of assumptions of all theoretical results? [Yes] We state the conditions for the theorems proven.
484
+ (b) Did you include complete proofs of all theoretical results? [Yes] Proofs of all theorems are provided in the appendix. The relevant appendix section is noted in the corresponding sections containing the theorems.
485
+
486
+ 3. If you ran experiments...
487
+
488
+ (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)? [N/A] The paper is directed to proving a number of theorems.
489
+ (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [N/A] We do not rely on numerical experiments for the results presented in the paper.
490
+ (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [N/A]
491
+ (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)? [N/A]
492
+
493
+ 06 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
494
+
495
+ (a) If your work uses existing assets, did you cite the creators? [N/A]
496
+ (b) Did you mention the license of the assets? [N/A]
497
+ (c) Did you include any new assets either in the supplemental material or as a URL? [N/A]
498
+ (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
499
+ (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
500
+
501
+ 5. If you used crowdsourcing or conducted research with human subjects...
502
+
503
+ (a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] There are no human subjects.
504
+ (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
505
+ (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
parse/train/jtrQswOMLrd/jtrQswOMLrd_content_list.json ADDED
@@ -0,0 +1,1628 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Parameter-free Statistically Consistent Interpolation: Dimension-independent Convergence Rates for Hilbert kernel regression ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 179,
8
+ 122,
9
+ 821,
10
+ 198
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous Author(s) \nAffiliation \nAddress \nemail ",
17
+ "bbox": [
18
+ 423,
19
+ 251,
20
+ 578,
21
+ 306
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 462,
31
+ 343,
32
+ 535,
33
+ 359
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Previously, statistical textbook wisdom has held that interpolation of noisy training data will lead to poor generalization. However, recent work has shown that this is not true and that good generalization can be obtained with function fits that interpolate training data. This could explain why overparameterized deep nets with zero or small training error do not necessarily overfit and could generalize well. Data interpolation schemes have been exhibited that are provably Bayes optimal in the large sample limit and achieve the theoretical lower bounds for excess risk (Statistically Consistent Interpolation) in any dimension. These interpolation schemes are non-parametric Nadaraya-Watson style estimators with singular kernels, which exhibit statistical consistency in any data dimension for large sample sizes. The recently proposed weighted interpolating nearest neighbors scheme (wiNN) is in this class, as is the previously studied Hilbert kernel interpolation scheme. In the Hilbert scheme, the regression function estimator for a set of labelled data pairs, $( x _ { i } , y _ { i } ) \\in \\mathbb { R } ^ { d } \\times \\mathbb { R }$ , $i = 0 , . . . , n$ , has the form $\\begin{array} { r } { \\hat { f } ( x ) = \\sum _ { i } y _ { i } w _ { i } ( x ) } \\end{array}$ , where $\\begin{array} { r } { w _ { i } ( x ) = \\| x - x _ { i } \\| ^ { - d } / \\sum _ { j } \\| x - x _ { j } \\| ^ { - d } } \\end{array}$ . This interpolating function estimator is unique in being entirely free of parameters and does not require bandwidth selection. While statistical consistency was previously proven for this scheme, the precise convergence rates for the finite sample risk were not established. Here, we carry out a comprehensive study of the asymptotic finite sample behavior of the Hilbert kernel regression scheme and prove a number of relevant theorems. We prove under broad conditions that the excess risk of the Hilbert regression estimator is asymptotically equivalent pointwise to $\\sigma ^ { 2 } ( x ) / \\ln ( n )$ where $\\scriptstyle { \\bar { \\sigma } } ^ { 2 } ( x )$ is the noise variance. We also show that the excess risk of the plugin classifier is upper bounded by $2 | f ( x ) - 1 / 2 | ^ { 1 - \\alpha } ( 1 + \\varepsilon ) ^ { \\alpha } \\sigma ^ { \\alpha } ( x ) ( \\ln ( n ) ) ^ { - { \\frac { \\alpha } { 2 } } }$ , for any $0 < \\alpha < 1$ , where $f$ is the regression function $x \\mapsto \\mathbb { E } [ y | x ]$ . Our proofs proceed by deriving asymptotic equivalents of the moments of the weight functions $w _ { i } ( x )$ for large $n$ , for instance for $\\beta > 1$ , $\\mathbb { E } [ w _ { i } ^ { \\beta } ( x ) ] \\sim _ { n \\infty }$ ((β − 1)n ln(n))−1. We further derive an asymptotic equivalent for the Lagrange function and explicitly exhibit the nontrivial extrapolation properties of this estimator. Notably, the convergence rates are independent of data dimension and the excess risk is dominated by the noise variance. The bias term, for which we also give precise asymptotic estimates, is always subleading when the density of data at the considered point is strictly positive. If this local density is zero, we show that the bias term does not vanish in the limit of a large data set and we compute its limit explicitly. Finally, we present heuristic arguments for a universal $w ^ { - 2 }$ power-law behavior of the probability density of the weights in the large $n$ limit. ",
40
+ "bbox": [
41
+ 217,
42
+ 376,
43
+ 766,
44
+ 886
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "38 Data interpolation and statistical regression of noisy data are both classical subjects but their domain \n39 of application have been disjoint until recently. Scattered data interpolation techniques [1] are \n40 generally used for clean data. On the other hand, when supervised learning or statistical regression \n41 techniques are applied to noisy data, in general smoothing or regularization methods are applied \n42 to prevent training data interpolation, as the latter is believed to lead to poor generalization [2]. \n43 However, accumulating empirical evidence from overparameterized deep networks has shown that \n44 data interpolation (equivalently, zero error on the training set) does not automatically imply poor \n45 generalization [3, 4]. This has in turn given rise to a rapidly growing body of theoretical work to \n46 understand how and why noisy data interpolation can still lead to good generalization [5, 6, 7, 8, 9, \n47 10, 11, 12, 13, 14, 15]. \n48 A key observations in this regard is the phenomenon of Statistically Consistent Interpolation [16], \n49 i.e., regression function estimation that interpolates training data but also generalizes as well as \n50 possible by achieving the Bayes limit for expected generalization error (risk) when the sample size \n51 becomes large. This hints at a rich set of theoretical questions at the interface between the disciplines \n52 of scattered data interpolation and supervised learning, that have only begun to be addressed. In \n53 particular, there has been comparatively little study of the generalization error or risk of interpolating \n54 learners. Computation of generalization error bounds in machine learning often relies on the capacity \n55 of the class of fitting functions [17], however such model complexity based bounds are not tight \n56 enough to be useful for interpolating learners [4]. For nonparametric interpolation approaches such as \n57 that considered here, it is also not clear what model complexity means. Thus, there is a need for other \n58 approaches to understanding the generalization behavior of nonparametric interpolating learners, \n59 including more direct treatments of the generalization error for specific interpolation schemes so as \n60 to gain better theoretical understanding. The current paper addresses this need. \n61 We present a detailed analysis of the finite-sample risk of an interpolating learner with intriguing \n62 theoretical properties, the Hilbert kernel estimator (Devroye et. al. [18]). A unique property of \n63 this Nadaraya-Watson (NW) style estimator [19, 20] is that it is fully parameter-free and does not \n64 have any bandwidth or scale parameter. It is global and uses all data points for each estimate: the \n65 associated kernel is a power law and thus scale-free. Although statistical consistency of this estimator \n66 was proven [18] when it was proposed, there has been no systematic analysis of the associated \n67 convergence rates and asymptotic finite sample behavior. We provide this analysis in the present \n68 study. \n69 Related work The only other interpolation scheme we are aware of, that is proven to be statistically \n70 consistent in arbitrary dimensions under general conditions, is the recently proposed weighted \n71 interpolating nearest neighbors method (wiNN) [7], which is also a NW estimator utilizing a singular \n72 power law kernel of a very similar form but with two important differences: a finite number of \n73 neighbors $k$ is utilized (rather than all data points), and the power law exponent $\\delta$ of the NW kernel \n74 satisfies $0 < \\delta < d / 2$ rather than $\\delta = d$ . To achieve consistency $k$ has to scale appropriately with \n75 sample size. Despite the superficial resemblance, the wiNN and Hilbert Kernel estimators have quite \n76 different convergence rates, as we will see from the results of this paper. Also worth mentioning is the \n77 Shepard interpolation scheme [21] originally proposed for interpolation of 2D geospatial data sets, \n78 also a NW style interpolating estimator, though used in the context of scattered data interpolation. \n79 In scattered data interpolation [1], the focus is generally on the approximation error (corresponding \n80 to the “bias” term in our analysis below). The approximation error of the Shepard scheme has been \n81 analyzed [22] but as we will see below the risk for Hilbert kernel interpolation is dominated by the \n82 noise or “variance” term. In contrast with wiNN or Hilbert kernel interpolation, other interpolating \n83 learning methods such as simplex interpolation [7] or ridgeless kernel regression [11] are generally \n84 not statistically consistent in fixed finite dimension [8]. \n85 Summary of results of this paper Notation and assumptions pertaining to this summary are defined \n86 in the problem setup section below. We prove under broad conditions that the excess risk of the \n87 Hilbert regression estimator is asymptotically equivalent pointwise to $\\sigma ^ { 2 } ( x ) / \\ln ( n )$ where $\\sigma ^ { 2 } ( x )$ is \n88 the noise variance. We also show that the excess risk of the plugin classifier is upper bounded by \n89 $2 | f ( x ) - 1 / 2 | ^ { 1 - \\alpha } ( 1 + \\varepsilon ) ^ { \\alpha } \\sigma ^ { \\alpha } ( x ) ( \\ln ( n ) ) ^ { - { \\frac { \\alpha } { 2 } } }$ , for any $0 < \\alpha < 1$ , where $f$ is the regression function \n90 $x \\mapsto \\mathbb { E } [ y | x ]$ . Our proofs proceed by deriving asymptotic equivalents of the moments of the weight \n91 functions $w _ { i } ( x )$ for large $n$ , for instance for $\\beta > 1$ $> 1 , \\mathbb { E } [ w _ { i } ^ { \\beta } ( x ) ] \\sim _ { n \\infty } ( ( \\beta - 1 ) n \\ln ( n ) ) ^ { - 1 }$ . We \n92 further derive an asymptotic equivalent for the Lagrange function and explicitly exhibit the nontrivial \n93 extrapolation properties of this estimator. Notably, the convergence rates are independent of data \n94 dimension and the excess risk is dominated by the noise variance. The bias term, for which we also \n95 give precise asymptotic estimates, is always subleading when the density of data at the considered \n96 point is strictly positive. If this local density is zero, we show that the bias term does not vanish in the \n97 limit of a large data set and we compute its limit explicitly. Finally, we present heuristic arguments \n98 for a universal $w ^ { - 2 }$ power-law behavior of the probability density of the weights in the large $n$ limit. ",
51
+ "bbox": [
52
+ 145,
53
+ 122,
54
+ 825,
55
+ 261
56
+ ],
57
+ "page_idx": 1
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "",
62
+ "bbox": [
63
+ 145,
64
+ 267,
65
+ 825,
66
+ 446
67
+ ],
68
+ "page_idx": 1
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "",
73
+ "bbox": [
74
+ 147,
75
+ 453,
76
+ 825,
77
+ 564
78
+ ],
79
+ "page_idx": 1
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "",
84
+ "bbox": [
85
+ 147,
86
+ 570,
87
+ 825,
88
+ 791
89
+ ],
90
+ "page_idx": 1
91
+ },
92
+ {
93
+ "type": "text",
94
+ "text": "",
95
+ "bbox": [
96
+ 145,
97
+ 797,
98
+ 825,
99
+ 912
100
+ ],
101
+ "page_idx": 1
102
+ },
103
+ {
104
+ "type": "text",
105
+ "text": "",
106
+ "bbox": [
107
+ 145,
108
+ 90,
109
+ 825,
110
+ 175
111
+ ],
112
+ "page_idx": 2
113
+ },
114
+ {
115
+ "type": "text",
116
+ "text": "99 2 Problem setup ",
117
+ "text_level": 1,
118
+ "bbox": [
119
+ 147,
120
+ 200,
121
+ 326,
122
+ 218
123
+ ],
124
+ "page_idx": 2
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "100 Notation, Definitions, Statistical Model We model the labelled training data set \n101 $( x _ { 0 } , y _ { 0 } ) , \\ldots , ( x _ { n } , y _ { n } )$ as $n + 1$ i.i.d. observations of a random vector $( X , Y )$ with values in \n102 $\\mathbb { R } ^ { d } \\times \\mathbb { R }$ for regression, and with values in $\\mathbb { R } ^ { d } \\times \\{ 0 , 1 \\}$ for binary classification. Due to the indepen \n103 dence property, the collection $X _ { 0 } , \\ldots , X _ { n }$ has the product density $\\textstyle \\prod _ { i = 0 } ^ { n } \\rho ( x _ { i } )$ . We will denote by $\\mathbb { E }$ \n104 an expectation over the collection of $n + 1$ random vectors and by $\\mathbb { E } _ { X }$ the expectation over the col \n105 lection $X _ { 0 } , \\ldots , X _ { n }$ . An expectation over the same collection while holding $X _ { i } = x _ { i }$ will be denoted \n106 $\\mathbb { E } _ { X \\mid x _ { i } }$ . The regression function $f \\colon { \\mathbb { R } ^ { d } } \\to { \\mathbb { R } }$ is defined as the conditional mean of $Y$ given $X = x$ \n107 $f ( x ) : = \\mathbb { E } [ Y \\mid X = x ]$ and the conditional variance function is $\\sigma ^ { 2 } ( x ) : = \\mathbb { E } [ | Y - f ( X ) | ^ { 2 } | X = x ]$ . \n108 $f$ minimizes the expected value of the mean squared prediction error (risk under squared loss), \n109 $f = \\arg \\operatorname* { m i n } \\mathcal { R } _ { \\mathrm { s q } } ( h )$ where $\\mathcal { R } _ { \\mathrm { s q } } ( h ) : = \\mathbb { E } [ ( h ( X ) - Y ) ^ { 2 } ]$ . Given any regression estimator ${ \\hat { f } } ( x )$ the \n110 corresponding risk can be decomposed as $\\mathbb { E } [ \\mathcal { R } _ { \\mathrm { s q } } ( \\hat { f } ( X ) ) ] = \\mathcal { R } _ { \\mathrm { s q } } ( f ) + \\mathbb { E } [ ( \\hat { f } ( X ) - f ( X ) ^ { 2 } ]$ . The \n111 excess risk is given by $\\mathcal { R } _ { \\mathrm { s q } } ( \\hat { f } ) - \\mathcal { R } _ { \\mathrm { s q } } ( f ) = \\mathbb { E } [ ( \\hat { f } ( X ) - f ( X ) ) ^ { 2 } ]$ . For a consistent estimator this \n112 excess risk goes to zero as $n \\to \\infty$ and we are interested in characterizing the rate at which it goes to \n113 zero with increasing $n$ (note our sample size is $n + 1$ for notational simplicity but for large $n$ this \n114 does not change the rate). \n115 In the case of binary classification, $Y \\in \\{ 0 , 1 \\}$ and $f ( x ) = \\mathbb { P } [ Y = 1 \\mid X = x ) ]$ . Let $F \\colon { \\mathbb { R } } ^ { d } \\to \\{ 0 , 1 \\}$ \n116 denote the Bayes optimal classifier, defined by $F ( x ) : = \\theta ( f ( x ) - 1 / 2 )$ where $\\theta ( \\cdot )$ is the Heaviside \n117 theta function. This classifier minimizes the risk $\\mathscr { R } _ { 0 / 1 } ( h ) : = \\mathbb { E } \\big [ \\mathbb { 1 } _ { \\{ h ( X ) \\neq Y \\} } \\big ] = \\mathbb { P } ( h ( X ) \\neq Y )$ under \n118 zero-one loss. Given the regression estimator $\\hat { f }$ , we consider the plugin classifier ${ \\hat { F } } ( x ) = \\theta ( { \\hat { f } } ( x ) - { \\textstyle \\frac { 1 } { 2 } } )$ \n119 The classification risk for the plugin classifier $\\hat { F }$ is bounded as $\\begin{array} { r } { \\mathbb { E } [ \\mathcal { R } _ { 0 / 1 } ( \\hat { F } ( x ) ) ] - \\mathcal { R } _ { 0 / 1 } ( F ( x ) ) \\leq } \\end{array}$ \n120 $2 \\mathbb { E } [ | \\hat { f } ( x ) - f ( x ) | ] \\leq 2 \\sqrt { \\mathbb { E } [ ( \\hat { f } ( x ) - f ( x ) ) ^ { 2 } ] } .$ . ",
129
+ "bbox": [
130
+ 138,
131
+ 236,
132
+ 826,
133
+ 457
134
+ ],
135
+ "page_idx": 2
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "",
140
+ "bbox": [
141
+ 140,
142
+ 460,
143
+ 825,
144
+ 565
145
+ ],
146
+ "page_idx": 2
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "Finally, we define two sequences $a _ { n } , b _ { n } > 0$ , $n \\in \\mathbb { N }$ , to be asymptotically equivalent for $n + \\infty$ denoted $a _ { n } \\sim _ { n \\to + \\infty } b _ { n }$ , if the limit of their ratio exists and $\\scriptstyle \\operatorname* { l i m } _ { n \\to \\infty } a _ { n } / b _ { n } = 1$ . ",
151
+ "bbox": [
152
+ 165,
153
+ 570,
154
+ 823,
155
+ 601
156
+ ],
157
+ "page_idx": 2
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "123 In summary, our work will focus on the estimation of asymptotic equivalents for $\\mathbb { E } [ ( \\hat { f } ( x ) - f ( x ) ) ^ { 2 } ]$ \n124 and other relevant quantities as this determines the rate at which the excess risk goes to zero for \n125 regression, and bounds the rate at which the excess risk goes to zero for classification. \n126 Assumptions. We define the support $\\Omega$ of the density $\\rho$ as $\\Omega = \\{ x \\in \\mathbb { R } ^ { d } / \\rho ( x ) > 0 \\}$ , the closed \n127 support $\\bar { \\Omega }$ as the closure of $\\Omega$ , and $\\Omega ^ { \\circ }$ as the interior of $\\Omega$ . Our results will not assume any compactness \n128 condition on $\\Omega$ or $\\bar { \\Omega }$ . The boundary of $\\Omega$ is then defined as $\\partial \\Omega = \\bar { \\Omega } \\setminus \\Omega ^ { \\circ }$ . We assume that $\\rho$ has a \n129 finite variance $\\sigma _ { \\rho } ^ { 2 }$ . In addition, we will most of the time assume that the density $\\rho$ is continuous at the \n130 considered point $x \\in \\Omega ^ { \\circ }$ , and in some cases, $x \\in \\partial \\Omega \\cap \\Omega$ . ",
162
+ "bbox": [
163
+ 142,
164
+ 607,
165
+ 826,
166
+ 650
167
+ ],
168
+ "page_idx": 2
169
+ },
170
+ {
171
+ "type": "text",
172
+ "text": "",
173
+ "bbox": [
174
+ 142,
175
+ 655,
176
+ 825,
177
+ 726
178
+ ],
179
+ "page_idx": 2
180
+ },
181
+ {
182
+ "type": "text",
183
+ "text": "131 For the regression function $f$ , we will obtain results assuming either of the following conditions ",
184
+ "bbox": [
185
+ 147,
186
+ 731,
187
+ 802,
188
+ 747
189
+ ],
190
+ "page_idx": 2
191
+ },
192
+ {
193
+ "type": "text",
194
+ "text": "$C _ { \\mathrm { C o n t } } ^ { f } \\colon f$ is continuous at the considered $x$ , \n• $C _ { \\mathrm { H o l d e r } } ^ { f }$ : fo $x \\in \\Omega ^ { \\circ }$ $\\alpha _ { x } > 0$ $K _ { x } > 0$ $\\delta _ { x } > 0$ , such thatαx \n$x ^ { \\prime } \\in \\Omega$ $\\begin{array} { r } { \\| \\boldsymbol { x } - \\boldsymbol { x } ^ { \\prime } \\| \\le \\delta _ { x } \\implies | f ( \\boldsymbol { x } ) - f ( \\boldsymbol { x } ^ { \\prime } ) | \\le K _ { x } \\| \\boldsymbol { x } - \\boldsymbol { \\mathrm { \\widehat { x } } } } \\end{array}$ \n(local Hölder smoothness condition), ",
195
+ "bbox": [
196
+ 217,
197
+ 760,
198
+ 725,
199
+ 834
200
+ ],
201
+ "page_idx": 2
202
+ },
203
+ {
204
+ "type": "text",
205
+ "text": "36 where condition $C _ { \\mathrm { H o l d e r } } ^ { f }$ r is obviously stronger than CfCont . In addition, we will always assume a \n37 growth condition for the regression function $f$ : ",
206
+ "bbox": [
207
+ 151,
208
+ 847,
209
+ 828,
210
+ 878
211
+ ],
212
+ "page_idx": 2
213
+ },
214
+ {
215
+ "type": "equation",
216
+ "img_path": "images/f45b50f10a66e236f87de25ce1d91a32e05b5a63ff7eb9395e95bb996d3bacf0.jpg",
217
+ "text": "$$\n\\begin{array} { r } { \\bullet C _ { \\mathrm { G r o w t h } } ^ { f } \\colon \\int \\rho ( y ) \\frac { f ^ { 2 } ( y ) } { 1 + \\| y \\| ^ { 2 d } } d ^ { d } y < \\infty . } \\end{array}\n$$",
218
+ "text_format": "latex",
219
+ "bbox": [
220
+ 215,
221
+ 891,
222
+ 465,
223
+ 916
224
+ ],
225
+ "page_idx": 2
226
+ },
227
+ {
228
+ "type": "text",
229
+ "text": "139 As for the variance function $\\sigma$ , we will obtain results assuming either that $\\sigma$ is bounded or satisfies a \n140 growth condition similar to the one above ",
230
+ "bbox": [
231
+ 143,
232
+ 90,
233
+ 825,
234
+ 119
235
+ ],
236
+ "page_idx": 3
237
+ },
238
+ {
239
+ "type": "equation",
240
+ "img_path": "images/715a2315108b0dd488c03e9c3d7c98941769d24313a62a5a0e3d0054db1595b0.jpg",
241
+ "text": "$$\n\\begin{array} { r } { \\bullet C _ { \\mathrm { G r o w t h } } ^ { \\sigma } \\colon \\int \\rho ( y ) \\frac { \\sigma ^ { 2 } ( y ) } { 1 + \\| y \\| ^ { 2 d } } d ^ { d } y < \\infty . } \\end{array}\n$$",
242
+ "text_format": "latex",
243
+ "bbox": [
244
+ 217,
245
+ 148,
246
+ 465,
247
+ 174
248
+ ],
249
+ "page_idx": 3
250
+ },
251
+ {
252
+ "type": "text",
253
+ "text": "When we will assume condition 143 $C _ { \\mathrm { G r o w t h } } ^ { \\sigma }$ (obviously satisfied when $\\sigma ^ { 2 }$ is bounded), we will also assume a continuity condition 144 $C _ { \\mathrm { { C o n t } } } ^ { \\sigma }$ for $\\sigma$ at the considered $x$ . ",
254
+ "bbox": [
255
+ 147,
256
+ 183,
257
+ 825,
258
+ 213
259
+ ],
260
+ "page_idx": 3
261
+ },
262
+ {
263
+ "type": "text",
264
+ "text": "145 Note that all our results can be readily extended in the case where $x \\in \\partial \\Omega = \\bar { \\Omega } \\backslash \\Omega ^ { \\circ }$ but keeping \n146 the condition $\\rho ( x ) > 0$ (i.e., $x \\in \\partial \\Omega \\cap \\Omega )$ , and assuming the continuity at $x$ of $\\rho$ as seen as a \n147 function restricted to $\\Omega$ , i.e., ${ \\mathrm { l i m } } _ { y \\in \\Omega \\to x } \\rho ( y ) = \\rho ( x )$ . Useful examples are when the support $\\Omega$ of \n148 $\\rho$ is a $d$ -dimensional sphere or hypercube and $x$ is on the surface of $\\Omega$ (but still with $\\rho ( x ) > 0 ,$ ). To \n149 guarantee these results for $x \\in \\partial \\Omega \\cap \\Omega$ , we need also to assume the continuity at $x$ of $f$ , and assume \n150 that $\\Omega$ is smooth enough near $x$ , so that there exists a strictly positive local solid angle $\\omega _ { x }$ defined by ",
265
+ "bbox": [
266
+ 140,
267
+ 219,
268
+ 825,
269
+ 304
270
+ ],
271
+ "page_idx": 3
272
+ },
273
+ {
274
+ "type": "equation",
275
+ "img_path": "images/7f88489e5f2d1f177867b5d26990fd65b38ed74a7dcadd6eafcb41ef280d4ff7.jpg",
276
+ "text": "$$\n\\omega _ { x } = \\operatorname* { l i m } _ { r \\to 0 } \\frac { 1 } { V _ { d } \\rho ( x ) r ^ { d } } \\int _ { \\lVert x - y \\rVert \\leq r } \\rho ( y ) d ^ { d } y = \\operatorname* { l i m } _ { r \\to 0 } \\frac { 1 } { V _ { d } r ^ { d } } \\int _ { y \\in \\Omega / \\lVert x - y \\rVert \\leq r } d ^ { d } y ,\n$$",
277
+ "text_format": "latex",
278
+ "bbox": [
279
+ 254,
280
+ 308,
281
+ 740,
282
+ 344
283
+ ],
284
+ "page_idx": 3
285
+ },
286
+ {
287
+ "type": "text",
288
+ "text": "151 where $V _ { d } = S _ { d } / d = \\pi ^ { d / 2 } / \\Gamma ( d / 2 + 1 )$ is the volume of the unit ball in $d$ dimensions, and the second \n152 inequality results from the continuity of $\\rho$ at $x$ . If $x \\in \\Omega ^ { \\circ }$ , we have $\\omega _ { x } = 1$ , while for $x \\in \\partial \\Omega$ , we \n153 have $0 \\leq \\omega _ { x } \\leq 1$ . For instance, if $x$ is on the surface of a sphere or on the interior of a face of a \n154 hypercube (and in general, when the boundary near $x$ is locally an hyperplane), we have $\\begin{array} { r } { \\omega _ { x } = \\frac { 1 } { 2 } } \\end{array}$ . If $x$ \n155 is a corner of a hypercube, we have $\\begin{array} { r } { \\omega _ { x } = \\frac { 1 } { 2 ^ { d } } } \\end{array}$ . From our methods of proof presented in the appendix, \n156 it should be clear that all our results for $x \\in \\Omega ^ { \\circ }$ perfectly generalize to any $x \\in \\partial \\Omega \\cap \\Omega$ for which \n157 $\\omega _ { x } > 0$ , by simply replacing $V _ { d }$ whenever it appears in our different results by $\\omega _ { x } V _ { d }$ . ",
289
+ "bbox": [
290
+ 140,
291
+ 349,
292
+ 825,
293
+ 453
294
+ ],
295
+ "page_idx": 3
296
+ },
297
+ {
298
+ "type": "text",
299
+ "text": "158 Hilbert kernel interpolating estimator and Bias-Variance decomposition. The Hilbert kernel regression estimator 159 ${ \\hat { f } } ( x )$ is a Nadaraya-Watson style estimator employing a singular kernel: ",
300
+ "bbox": [
301
+ 147,
302
+ 463,
303
+ 825,
304
+ 496
305
+ ],
306
+ "page_idx": 3
307
+ },
308
+ {
309
+ "type": "equation",
310
+ "img_path": "images/1f48862978b0f9d7a405ba2eadfe3eeb5e66570d3d3e659939e76efe4a0fb4aa.jpg",
311
+ "text": "$$\n\\begin{array} { r c l } { { w _ { i } ( x ) } } & { { = } } & { { \\displaystyle \\frac { \\| x - x _ { i } \\| ^ { - d } } { \\sum _ { j = 0 } ^ { n } \\| x - x _ { j } \\| ^ { - d } } , } } \\\\ { { \\hat { f } ( x ) } } & { { = } } & { { \\displaystyle \\sum _ { i = 0 } ^ { n } w _ { i } ( x ) y _ { i } . } } \\end{array}\n$$",
312
+ "text_format": "latex",
313
+ "bbox": [
314
+ 387,
315
+ 501,
316
+ 606,
317
+ 582
318
+ ],
319
+ "page_idx": 3
320
+ },
321
+ {
322
+ "type": "text",
323
+ "text": "160 The weights $w _ { i } ( x )$ are also called Lagrange functions in the interpolation literature and satisfy the \n161 interpolation property $w _ { i } ( x _ { j } ) = \\delta _ { i j }$ , where $\\delta _ { i j } = 1$ , if $i = j$ , and 0 otherwise. At any given point \n162 $x$ , they provide a partition of unity so that $\\textstyle \\sum _ { i = 0 } ^ { \\tilde { n } } w _ { i } ( x ) = 1$ . The mean squared error between the \n163 Hilbert estimator and the true regression function has a bias-variance decomposition (using the i.i.d \n164 condition and the earlier definitions) ",
324
+ "bbox": [
325
+ 142,
326
+ 585,
327
+ 825,
328
+ 656
329
+ ],
330
+ "page_idx": 3
331
+ },
332
+ {
333
+ "type": "equation",
334
+ "img_path": "images/b7ed7545f8c98e5318866d48d4b660fed12460eaa5c3a3b86db971eb3468f227.jpg",
335
+ "text": "$$\n\\begin{array} { r c l } { { \\hat { f } ( x ) - f ( x ) } } & { { = } } & { { \\displaystyle \\sum _ { i = 0 } ^ { n } w _ { i } ( x ) [ f ( x _ { i } ) - f ( x ) ] + \\sum _ { i = 0 } ^ { n } w _ { i } ( x ) [ y _ { i } - f ( x _ { i } ) ] , } } \\\\ { { \\mathbb { E } [ ( \\hat { f } ( x ) - f ( x ) ) ^ { 2 } ] } } & { { = } } & { { \\displaystyle B ( x ) + \\mathcal { V } ( x ) , } } \\\\ { { ( B i a s ) \\mathcal { B } ( x ) } } & { { = } } & { { \\displaystyle \\mathbb { E } _ { X } \\left[ \\left( \\sum _ { i = 0 } ^ { n } w _ { i } ( x ) [ f ( x _ { i } ) - f ( x ) ] \\right) ^ { 2 } \\right] , } } \\\\ { { ( V a r i a n c e ) \\mathcal { V } ( x ) } } & { { = } } & { { \\displaystyle \\mathbb { E } \\left[ \\sum _ { i = 0 } ^ { n } w _ { i } ^ { 2 } ( x ) [ y _ { i } - f ( x _ { i } ) ] ^ { 2 } \\right] = \\mathbb { E } _ { X } \\left[ \\sum _ { i = 0 } ^ { n } w _ { i } ^ { 2 } ( x ) \\sigma ^ { 2 } ( x _ { i } ) \\right] . } } \\end{array}\n$$",
336
+ "text_format": "latex",
337
+ "bbox": [
338
+ 232,
339
+ 661,
340
+ 764,
341
+ 809
342
+ ],
343
+ "page_idx": 3
344
+ },
345
+ {
346
+ "type": "text",
347
+ "text": "165 The present work derives asymptotic behaviors and bounds for the regression and classification risk \n166 of the Hilbert estimator for large sample size $n$ . These results are derived by analyzing the large $n$ \n167 behaviors of the bias and variance terms, which in turn depend on the behavior of the moments of the \n168 weights or the Lagrange functions $w _ { i } ( x )$ . For all these quantities, asymptotically equivalent forms \n169 are derived. The proofs exploit a simple integral form of the weight function and details are provided \n170 in the appendix, while the body of the paper provides the results and associated discussions. ",
348
+ "bbox": [
349
+ 140,
350
+ 827,
351
+ 825,
352
+ 912
353
+ ],
354
+ "page_idx": 3
355
+ },
356
+ {
357
+ "type": "text",
358
+ "text": "3 Results ",
359
+ "text_level": 1,
360
+ "bbox": [
361
+ 163,
362
+ 89,
363
+ 266,
364
+ 106
365
+ ],
366
+ "page_idx": 4
367
+ },
368
+ {
369
+ "type": "text",
370
+ "text": "3.1 The weights, variance and bias terms ",
371
+ "text_level": 1,
372
+ "bbox": [
373
+ 173,
374
+ 119,
375
+ 472,
376
+ 136
377
+ ],
378
+ "page_idx": 4
379
+ },
380
+ {
381
+ "type": "text",
382
+ "text": "3.1.1 Moments of the weights: large $n$ behavior ",
383
+ "text_level": 1,
384
+ "bbox": [
385
+ 174,
386
+ 145,
387
+ 516,
388
+ 160
389
+ ],
390
+ "page_idx": 4
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "4 In this section, we consider the moments and the distribution of the weights $w _ { i } ( x )$ at a given point $x$ . \n75 The first moment is simple to compute. Since the weights sum to 1 and $X _ { i }$ are i.i.d, it follows that \n76 $\\mathbb { E } _ { X \\mid x _ { i } } [ w _ { i } ( x ) ]$ are all equal and thus $\\mathbb { E } _ { X | x _ { i } } [ w _ { i } ( x ) ] = ( \\overline { { n } } + 1 ) ^ { - 1 }$ . The other moments are much less \n77 trivial to compute and we prove the following theorem in the appendix A.2: \n78 Theorem 3.1. For $x \\in \\Omega ^ { \\circ }$ (so that $\\rho ( x ) > 0 ,$ ), we assume $\\rho$ continuous at $x$ . Then, the moments of \n179 the weight $w _ { 0 } ( x )$ satisfy the following properties: ",
395
+ "bbox": [
396
+ 155,
397
+ 169,
398
+ 826,
399
+ 226
400
+ ],
401
+ "page_idx": 4
402
+ },
403
+ {
404
+ "type": "text",
405
+ "text": "",
406
+ "bbox": [
407
+ 151,
408
+ 228,
409
+ 826,
410
+ 258
411
+ ],
412
+ "page_idx": 4
413
+ },
414
+ {
415
+ "type": "text",
416
+ "text": "180 ",
417
+ "bbox": [
418
+ 142,
419
+ 271,
420
+ 161,
421
+ 282
422
+ ],
423
+ "page_idx": 4
424
+ },
425
+ {
426
+ "type": "text",
427
+ "text": "• For $\\beta > 1$ : ",
428
+ "bbox": [
429
+ 217,
430
+ 267,
431
+ 307,
432
+ 282
433
+ ],
434
+ "page_idx": 4
435
+ },
436
+ {
437
+ "type": "equation",
438
+ "img_path": "images/029627eabb50f0f8443544799cedc883c94bf7c255caf4c1166415202c435b8f.jpg",
439
+ "text": "$$\n\\mathbb { E } [ w _ { 0 } ^ { \\beta } ( x ) ] \\underset { n + \\infty } { \\sim } \\frac { 1 } { ( \\beta - 1 ) n \\ln ( n ) } .\n$$",
440
+ "text_format": "latex",
441
+ "bbox": [
442
+ 408,
443
+ 280,
444
+ 647,
445
+ 313
446
+ ],
447
+ "page_idx": 4
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "• For $0 < \\beta < 1$ : defining $\\begin{array} { r } { \\kappa _ { \\beta } ( x ) : = \\int \\frac { \\rho ( x + y ) } { | | y | | ^ { \\beta d } } d ^ { d } y < \\infty } \\end{array}$ , we have ",
452
+ "bbox": [
453
+ 217,
454
+ 323,
455
+ 656,
456
+ 344
457
+ ],
458
+ "page_idx": 4
459
+ },
460
+ {
461
+ "type": "equation",
462
+ "img_path": "images/e3ee1e909bc8ca6be6e62f067e7afde5ead351b95ad9d9c0a493af8e4cdeeda8.jpg",
463
+ "text": "$$\n\\mathbb { E } [ w _ { 0 } ^ { \\beta } ( x ) ] \\underset { n + \\infty } { \\sim } \\frac { \\kappa _ { \\beta } ( x ) } { ( V _ { d } \\rho ( x ) n \\ln ( n ) ) ^ { \\beta } } .\n$$",
464
+ "text_format": "latex",
465
+ "bbox": [
466
+ 383,
467
+ 349,
468
+ 638,
469
+ 385
470
+ ],
471
+ "page_idx": 4
472
+ },
473
+ {
474
+ "type": "text",
475
+ "text": "• For $\\beta < 0$ : all moments for $\\beta \\leq - 1$ are infinite, and the moments of order $- 1 < \\beta < 0$ satisfy ",
476
+ "bbox": [
477
+ 215,
478
+ 396,
479
+ 826,
480
+ 424
481
+ ],
482
+ "page_idx": 4
483
+ },
484
+ {
485
+ "type": "equation",
486
+ "img_path": "images/c617dc83fd0915b8e79951c3bd0b8a52dec94e931a0b3eb89b801f429bd27bc5.jpg",
487
+ "text": "$$\n\\mathbb { E } \\left[ w _ { 0 } ^ { \\beta } ( x ) \\right] \\leq 1 + n \\kappa _ { | \\beta | } ( x ) \\kappa _ { \\beta } ( x ) ,\n$$",
488
+ "text_format": "latex",
489
+ "bbox": [
490
+ 413,
491
+ 422,
492
+ 642,
493
+ 450
494
+ ],
495
+ "page_idx": 4
496
+ },
497
+ {
498
+ "type": "text",
499
+ "text": "184 ",
500
+ "bbox": [
501
+ 142,
502
+ 457,
503
+ 161,
504
+ 468
505
+ ],
506
+ "page_idx": 4
507
+ },
508
+ {
509
+ "type": "text",
510
+ "text": "so that a sufficient condition for its existence is $\\begin{array} { r } { \\kappa _ { \\beta } ( x ) = \\int \\rho ( x + y ) \\lvert | y \\rvert | ^ { \\lvert \\beta \\rvert d } d ^ { d } y < \\infty . } \\end{array}$ . ",
511
+ "bbox": [
512
+ 228,
513
+ 453,
514
+ 797,
515
+ 470
516
+ ],
517
+ "page_idx": 4
518
+ },
519
+ {
520
+ "type": "text",
521
+ "text": "185 Heuristically, the behavior of these moments are consistent with the random variable $W = w _ { 0 } ( x )$ \n186 having a probability distribution satisfying a scaling relation $\\begin{array} { r } { P ( W ) = \\frac { 1 } { W _ { n } } p \\left( \\frac { W } { W _ { n } } \\right) } \\end{array}$ , with the scaling \n187 function $p$ having the universal tail (i.e., independent of $x$ and $\\rho \\mathrm { \\hbar }$ ), $p ( w ) \\sim w ^ { - 2 }$ , and a scale $W _ { n }$ \n188 expected to vanish with $n$ , when $n + \\infty$ . With this assumption, we can determine the scale $W _ { n }$ by \n189 imposing the exact condition $\\mathbb { E } [ W ] = 1 / ( n + 1 ) \\sim 1 / n$ : ",
522
+ "bbox": [
523
+ 142,
524
+ 478,
525
+ 826,
526
+ 568
527
+ ],
528
+ "page_idx": 4
529
+ },
530
+ {
531
+ "type": "equation",
532
+ "img_path": "images/0c30a8c47d7ef7132e4589b8c6c32899cbc45a653e6964200934a9bf699be76d.jpg",
533
+ "text": "$$\n\\begin{array} { r c l } { \\mathbb { E } [ W ] } & { = } & { \\displaystyle \\frac { 1 } { W _ { n } } \\int _ { 0 } ^ { 1 } p \\left( \\frac { W } { W _ { n } } \\right) W d W = W _ { n } \\int _ { 0 } ^ { \\frac { 1 } { W _ { n } } } p ( w ) w d w } \\\\ & { \\sim } & { W _ { n } \\int _ { 1 } ^ { \\frac { 1 } { W _ { n } } } \\displaystyle \\frac { d w } { w } \\sim - W _ { n } \\ln ( W _ { n } ) \\sim \\frac { 1 } { n } , } \\end{array}\n$$",
534
+ "text_format": "latex",
535
+ "bbox": [
536
+ 289,
537
+ 573,
538
+ 709,
539
+ 651
540
+ ],
541
+ "page_idx": 4
542
+ },
543
+ {
544
+ "type": "text",
545
+ "text": "$\\begin{array} { r } { W _ { n } \\sim \\frac { 1 } { n \\ln ( n ) } } \\end{array}$ . Then, the moment of order $\\beta > 1$ ",
546
+ "bbox": [
547
+ 143,
548
+ 655,
549
+ 638,
550
+ 674
551
+ ],
552
+ "page_idx": 4
553
+ },
554
+ {
555
+ "type": "equation",
556
+ "img_path": "images/f0b6dafafafb21b0751363351a3da579dfc5e37797e37d759df8f3422908491a.jpg",
557
+ "text": "$$\n\\mathbb { E } [ W ^ { \\beta } ] = \\frac { 1 } { W _ { n } } \\int _ { 0 } ^ { 1 } p \\left( \\frac { W } { W _ { n } } \\right) W ^ { \\beta } d W \\sim W _ { n } \\int _ { 0 } ^ { 1 } W ^ { \\beta - 2 } d W \\underset { n \\to + \\infty } { \\sim } \\frac { 1 } { ( \\beta - 1 ) n \\ln ( n ) } ,\n$$",
558
+ "text_format": "latex",
559
+ "bbox": [
560
+ 205,
561
+ 679,
562
+ 764,
563
+ 717
564
+ ],
565
+ "page_idx": 4
566
+ },
567
+ {
568
+ "type": "text",
569
+ "text": "191 which indeed coincides with the first result of Theorem 3.1. Our heuristic argument also suggests \n192 that in the case $0 < \\beta < 1$ , we have ",
570
+ "bbox": [
571
+ 135,
572
+ 722,
573
+ 828,
574
+ 751
575
+ ],
576
+ "page_idx": 4
577
+ },
578
+ {
579
+ "type": "equation",
580
+ "img_path": "images/237f93530eda6975aa50ede0ec2bc483edec865604ec556f1bd22d7950ac0eea.jpg",
581
+ "text": "$$\n\\mathbb { E } [ W ] = \\frac { 1 } { W _ { n } } \\int _ { 0 } ^ { 1 } p ( \\frac { W } { W _ { n } } ) W ^ { \\beta } d W \\quad \\underset { n + \\infty } { \\sim } \\quad \\frac { \\int _ { 0 } ^ { + \\infty } p ( w ) w ^ { \\beta } d w } { ( n \\ln ( n ) ) ^ { \\beta } } ,\n$$",
582
+ "text_format": "latex",
583
+ "bbox": [
584
+ 274,
585
+ 755,
586
+ 722,
587
+ 794
588
+ ],
589
+ "page_idx": 4
590
+ },
591
+ {
592
+ "type": "text",
593
+ "text": "193 where the last integral converges since $p ( w ) \\underset { w + \\infty } { \\sim } w ^ { - 2 }$ and $\\beta < 1$ . This result is perfectly consistent \n194 with Eq. (9) in Theorem 3.1, and suggests that $\\begin{array} { r } { \\int _ { 0 } ^ { + \\infty } p \\left( w \\right) w ^ { \\beta } d w = \\frac { \\kappa _ { \\beta } \\left( x \\right) } { \\left( V _ { d } \\rho \\left( x \\right) \\right) ^ { \\beta } } } \\end{array}$ κβ(x)(Vdρ(x)) β . Interestingly, for \n195 $0 < \\beta < 1$ , and contrary to the case $\\beta > 1$ , we find that the large $n$ equivalent of the moment is not \n196 universal and depends explicitly on $x$ and the density $\\rho$ . As for moments of order $- 1 < \\beta < 0$ , we \n197 conjecture that they are still given by Eq. (9) (and equivalently, by Eq. (14)) provided they exist, and \n198 that the sufficient condition for their existence $\\kappa _ { \\beta } ( x ) < \\infty$ is hence also necessary, since $\\kappa _ { \\beta } ( x )$ also \n199 appears in Eq. (9). The fact that moments for $\\beta \\leq - 1$ do not exist strongly suggests that $p ( 0 ) > 0$ . \n200 In fact, Eq. (14)) also suggests that all moments for $- 1 < \\beta < 0$ exist if and only if $0 < p ( 0 ) < \\infty$ . \n201 In the Fig. 2 of the appendix, we present numerical simulations confirming our scaling ansatz, the \n202 fact that $\\overline { { p } } ( w ) \\underset { w + \\infty } { \\sim } w ^ { - 2 }$ , and the quantitative prediction for $W _ { n }$ . \n203 It is shown in Devroye et al. [18] that the Hilbert kernel regression estimate does not converge \n204 almost surely (a.s.) by giving a specific example. Insight can be gained into this lack of almost sure \n205 convergence by considering the weight function $w _ { 0 } ( x )$ , for a sequence of independent training sample \n206 sets of increasing size $n + 1$ . Let the corresponding sequence of weights be denoted as $\\omega _ { n } \\in [ 0 , 1 ]$ . \n207 From Theorem 3.1, it is clear that $\\omega _ { n }$ converges to zero in probability, since the following Chebyshev \n208 bound holds (analogous to the bound on the regression risk): ",
594
+ "bbox": [
595
+ 140,
596
+ 799,
597
+ 826,
598
+ 912
599
+ ],
600
+ "page_idx": 4
601
+ },
602
+ {
603
+ "type": "text",
604
+ "text": "",
605
+ "bbox": [
606
+ 140,
607
+ 90,
608
+ 826,
609
+ 140
610
+ ],
611
+ "page_idx": 5
612
+ },
613
+ {
614
+ "type": "text",
615
+ "text": "",
616
+ "bbox": [
617
+ 140,
618
+ 145,
619
+ 825,
620
+ 228
621
+ ],
622
+ "page_idx": 5
623
+ },
624
+ {
625
+ "type": "equation",
626
+ "img_path": "images/450fc40d858077f7c51d7fbe9773c7ea3db29605cd7bb93fb3ebfca536ac5bfd.jpg",
627
+ "text": "$$\n\\mathbb { P } ( \\omega _ { n } > \\varepsilon ) \\leq \\frac { 1 + \\delta } { \\varepsilon ^ { 2 } n \\ln ( n ) } ,\n$$",
628
+ "text_format": "latex",
629
+ "bbox": [
630
+ 413,
631
+ 231,
632
+ 583,
633
+ 265
634
+ ],
635
+ "page_idx": 5
636
+ },
637
+ {
638
+ "type": "text",
639
+ "text": "209 for arbitrary $\\varepsilon > 0$ and $\\delta > 0$ , and for $n$ larger than some constant $N _ { x , \\delta }$ . Alternatively, one can \n210 exploit the fact that $\\begin{array} { r } { \\mathbb { E } [ \\omega _ { n } ] = \\frac { 1 } { n + 1 } } \\end{array}$ , leading to $\\begin{array} { r } { \\mathbb { P } ( \\omega _ { n } > \\varepsilon ) \\le \\frac { 1 } { \\varepsilon n } } \\end{array}$ , which is less stringent than Eq. (15) \n211 as far as the $n$ -dependence is concerned, but is more stringent for the $\\varepsilon$ -dependence of the bounds. \n212 Let us show heuristically that $\\omega _ { n }$ does not converge a.s. to zero. Consider the infinite sequence of \n213 events ${ \\mathcal { E } } _ { n } \\equiv \\{ \\omega _ { n } > \\varepsilon \\}$ , $n \\in \\mathbb N$ , and the corresponding infinite sum $\\begin{array} { r } { \\sum _ { n } \\mathbb { P } ( \\mathcal { E } _ { n } ) = \\sum _ { n } \\mathbb { P } ( \\omega _ { n } > \\varepsilon ) } \\end{array}$ . \n214 Exploiting our previous heuristic argument for the scaling form of the distribution of weights, we \n215 obtain ",
640
+ "bbox": [
641
+ 140,
642
+ 267,
643
+ 826,
644
+ 313
645
+ ],
646
+ "page_idx": 5
647
+ },
648
+ {
649
+ "type": "text",
650
+ "text": "",
651
+ "bbox": [
652
+ 138,
653
+ 318,
654
+ 826,
655
+ 372
656
+ ],
657
+ "page_idx": 5
658
+ },
659
+ {
660
+ "type": "equation",
661
+ "img_path": "images/df757726a427f551795ab4b73b6126c75885e757ba78099510898cface8ef5d1.jpg",
662
+ "text": "$$\n\\mathbb { P } ( \\omega _ { n } > \\varepsilon ) = \\int _ { \\varepsilon } ^ { 1 } { \\frac { 1 } { W _ { n } } } p \\left( { \\frac { W } { W _ { n } } } \\right) d W \\sim \\int _ { \\varepsilon n \\ln n } ^ { n \\ln n } { \\frac { d w } { w ^ { 2 } } } \\sim { \\frac { 1 - \\varepsilon } { \\varepsilon n \\ln ( n ) } } .\n$$",
663
+ "text_format": "latex",
664
+ "bbox": [
665
+ 281,
666
+ 369,
667
+ 715,
668
+ 406
669
+ ],
670
+ "page_idx": 5
671
+ },
672
+ {
673
+ "type": "text",
674
+ "text": "216 Since PNn=2 1n ln(n) $\\begin{array} { r } { \\sum _ { n = 2 } ^ { N } { \\frac { 1 } { n \\ln ( n ) } } \\sim \\ln ( \\ln ( N ) ) } \\end{array}$ is a divergent series, a Borel-Cantelli argument suggests that an \n217 infinite number of the events ${ \\mathcal { E } } _ { n }$ (i.e., $\\omega _ { n } > \\varepsilon$ ) must occur, which implies that $\\omega _ { n }$ does not converge \n218 a.s. to 0. Note that the weights are equal to 1 at the data points due to the interpolation condition, so \n219 that large weights occasionally occur, causing the lack of a.s. convergence. ",
675
+ "bbox": [
676
+ 145,
677
+ 409,
678
+ 826,
679
+ 468
680
+ ],
681
+ "page_idx": 5
682
+ },
683
+ {
684
+ "type": "text",
685
+ "text": "3.1.2 Lagrange function: scaling limit ",
686
+ "text_level": 1,
687
+ "bbox": [
688
+ 168,
689
+ 481,
690
+ 449,
691
+ 497
692
+ ],
693
+ "page_idx": 5
694
+ },
695
+ {
696
+ "type": "text",
697
+ "text": "The expected value of the Lagrange functions $w _ { i } ( x )$ have a simple form in the large $n$ limit. Due to the i.i.d. condition the indices $i$ are exchangeable and we set $i = 0$ for the computation of the expected Lagrange function $L _ { 0 } ( x ) = \\mathbb { E } _ { X \\mid x _ { 0 } } [ w \\overline { { 0 } } ( x ) ]$ . Thus, one of the sample points (denoted $x _ { 0 }$ ) is held fixed and the other ones are averaged over in computing the expected Lagrange function. For $x _ { 0 } \\neq x$ kept fixed, we have $\\begin{array} { r } { \\operatorname* { l i m } _ { n \\infty } L _ { 0 } ( x ) = 0 } \\end{array}$ . However, we show in the appendix A.3 that $L _ { 0 } ( x )$ takes a very simple form when taking a specific scaling limit: ",
698
+ "bbox": [
699
+ 166,
700
+ 505,
701
+ 825,
702
+ 589
703
+ ],
704
+ "page_idx": 5
705
+ },
706
+ {
707
+ "type": "text",
708
+ "text": "Theorem 3.2. For $x \\in \\Omega ^ { \\circ }$ , we assume $\\rho$ continuous at $x$ . Then, in the limit (denoted by $\\operatorname { l i m } _ { Z }$ ), $n $ $+ \\infty ,$ , $\\lVert \\boldsymbol { x } - \\boldsymbol { x } _ { 0 } \\rVert ^ { - d } \\to + \\infty$ (i.e., $x _ { 0 } \\to x _ { , }$ ), and such that $z _ { x } ( n , x _ { 0 } ) = V _ { d } \\rho ( x ) \\| x - x _ { 0 } \\| ^ { d } n \\log ( n ) \\to Z$ the Lagrange function $L _ { 0 } ( x ) = \\mathbb { E } _ { X \\mid x _ { 0 } } [ w _ { 0 } ( x ) ]$ converges to a proper limit, ",
709
+ "bbox": [
710
+ 166,
711
+ 592,
712
+ 825,
713
+ 635
714
+ ],
715
+ "page_idx": 5
716
+ },
717
+ {
718
+ "type": "equation",
719
+ "img_path": "images/e6917e76cf39bc3fdf7cfb995013b51157eb4c09809b5968e1775609e355cace.jpg",
720
+ "text": "$$\n\\operatorname* { l i m } _ { Z } L _ { 0 } ( x ) = \\frac { 1 } { 1 + Z } .\n$$",
721
+ "text_format": "latex",
722
+ "bbox": [
723
+ 428,
724
+ 637,
725
+ 568,
726
+ 669
727
+ ],
728
+ "page_idx": 5
729
+ },
730
+ {
731
+ "type": "text",
732
+ "text": "The proof of this theorem shows that the relative error between 230 $L _ { 0 } ( x )$ and $\\frac { 1 } { 1 { + } Z }$ for finite but large $n$ and large 231 $\\lVert x - x _ { 0 } \\rVert ^ { - d }$ , such that $z _ { x } ( n , x _ { 0 } )$ remains close to $Z$ , is $O ( 1 / \\ln ( n ) )$ . ",
733
+ "bbox": [
734
+ 145,
735
+ 679,
736
+ 828,
737
+ 713
738
+ ],
739
+ "page_idx": 5
740
+ },
741
+ {
742
+ "type": "text",
743
+ "text": "232 Exploiting Theorem 3.2, we can use a simple heuristic argument to estimate the tail of the distribution \n233 of the random variable $W = w _ { 0 } ( x )$ . Indeed, approximating $L _ { 0 } ( x )$ for finite but large $n$ by its \n234 asymptotic for m 11+z (n,x ) , with zx(n, x0) = Vdρ(x)n log(n)kx − x0kd, we obtain ",
744
+ "bbox": [
745
+ 142,
746
+ 717,
747
+ 825,
748
+ 763
749
+ ],
750
+ "page_idx": 5
751
+ },
752
+ {
753
+ "type": "equation",
754
+ "img_path": "images/e667a8b33b98aa02050ecddb3cf14c22b1f2cbc508548502def75e58bf606ea4.jpg",
755
+ "text": "$$\n\\begin{array} { r c l } { \\displaystyle \\int _ { W } ^ { 1 } P ( W ^ { \\prime } ) d W ^ { \\prime } } & { \\sim } & { \\displaystyle \\int \\rho ( x _ { 0 } ) \\theta \\left( \\frac { 1 } { 1 + V _ { d } \\rho ( x ) n \\log ( n ) \\| x - x _ { 0 } \\| ^ { d } } - W \\right) d ^ { d } x _ { 0 } , } \\\\ & { \\sim } & { \\displaystyle V _ { d } \\rho ( x ) \\int _ { 0 } ^ { + \\infty } \\theta \\left( \\frac { 1 } { 1 + V _ { d } \\rho ( x ) n \\log ( n ) u } - W \\right) d u , } \\\\ & { \\sim } & { \\displaystyle \\frac { 1 } { n \\ln ( n ) W } \\quad \\Longrightarrow \\ P ( W ) \\sim \\frac { 1 } { n \\ln ( n ) W ^ { 2 } } , } \\end{array}\n$$",
756
+ "text_format": "latex",
757
+ "bbox": [
758
+ 227,
759
+ 767,
760
+ 764,
761
+ 875
762
+ ],
763
+ "page_idx": 5
764
+ },
765
+ {
766
+ "type": "text",
767
+ "text": "235 where $\\theta ( . )$ is the Heaviside function. This heuristic result is again perfectly consistent with our guess of the previous section that 236 $\\begin{array} { r } { P ( W ) = \\frac { 1 } { W _ { n } } p \\left( \\frac { W } { W _ { n } } \\right) } \\end{array}$ , with the scaling function $p$ having the universal ",
768
+ "bbox": [
769
+ 142,
770
+ 876,
771
+ 823,
772
+ 915
773
+ ],
774
+ "page_idx": 5
775
+ },
776
+ {
777
+ "type": "text",
778
+ "text": "tail, $p ( w ) \\underset { w + \\infty } { \\sim } w ^ { - 2 }$ , and a scale $\\begin{array} { r } { W _ { n } \\sim \\frac { 1 } { n \\ln ( n ) } } \\end{array}$ . Indeed, in this case and in the limit $n + \\infty$ , we obtain that $\\begin{array} { r } { P ( W ) \\sim \\frac { 1 } { W _ { n } } \\left( \\frac { W _ { n } } { W } \\right) ^ { 2 } \\sim \\frac { W _ { n } } { W ^ { 2 } } \\sim \\frac { 1 } { n \\ln ( n ) W ^ { 2 } } } \\end{array}$ , which is identical to the result of Eq. (20). ",
779
+ "bbox": [
780
+ 171,
781
+ 89,
782
+ 826,
783
+ 140
784
+ ],
785
+ "page_idx": 6
786
+ },
787
+ {
788
+ "type": "text",
789
+ "text": "3.1.3 The variance term ",
790
+ "text_level": 1,
791
+ "bbox": [
792
+ 176,
793
+ 154,
794
+ 354,
795
+ 170
796
+ ],
797
+ "page_idx": 6
798
+ },
799
+ {
800
+ "type": "text",
801
+ "text": "A simple application of the result of Theorem 3.1 for $\\beta = 2$ (see appendix A.4) allows us to bound the variance term $\\begin{array} { r } { \\mathcal { V } ( x ) = \\mathbb { E } \\left[ \\sum _ { i = 0 } ^ { n } w _ { i } ^ { 2 } ( x ) [ y _ { i } - f ( x _ { i } ) ] ^ { 2 } \\right] } \\end{array}$ for a bounded variance function $\\sigma ^ { 2 }$ : ",
802
+ "bbox": [
803
+ 169,
804
+ 178,
805
+ 823,
806
+ 217
807
+ ],
808
+ "page_idx": 6
809
+ },
810
+ {
811
+ "type": "text",
812
+ "text": "Theorem 3.3. For $x \\in \\Omega ^ { \\circ }$ , $\\rho$ continuous at $x$ , $\\sigma ^ { 2 } \\le \\sigma _ { 0 } ^ { 2 }$ , and for any $\\varepsilon > 0$ , there exists a constant $N _ { x , \\varepsilon }$ such that for $n \\geq N _ { x , \\varepsilon }$ , we have ",
813
+ "bbox": [
814
+ 163,
815
+ 220,
816
+ 825,
817
+ 252
818
+ ],
819
+ "page_idx": 6
820
+ },
821
+ {
822
+ "type": "equation",
823
+ "img_path": "images/a3952beba8eeead103169423ac318435549f322eff3918bedf6eedfdd9082dcc.jpg",
824
+ "text": "$$\n\\mathcal { V } ( x ) \\leq ( 1 + \\varepsilon ) \\frac { \\sigma _ { 0 } ^ { 2 } } { \\ln ( n ) } .\n$$",
825
+ "text_format": "latex",
826
+ "bbox": [
827
+ 421,
828
+ 258,
829
+ 575,
830
+ 294
831
+ ],
832
+ "page_idx": 6
833
+ },
834
+ {
835
+ "type": "text",
836
+ "text": "244 Relaxing the boundedness condition for $\\sigma$ , but assuming the continuity of $\\sigma ^ { 2 }$ at $x$ along with a growth \n245 condition, allows us to obtain a precise asymptotic equivalent of $\\mathcal { V } ( x )$ , when $n + \\infty$ : ",
837
+ "bbox": [
838
+ 143,
839
+ 309,
840
+ 828,
841
+ 339
842
+ ],
843
+ "page_idx": 6
844
+ },
845
+ {
846
+ "type": "text",
847
+ "text": "Theorem 3.4. For 246 $x \\in \\Omega ^ { \\circ }$ , $\\sigma ( x ) > 0$ , $\\rho \\sigma ^ { 2 }$ continuous at $x$ , and assuming the condition $C _ { \\mathrm { G r o w t h } } ^ { \\sigma }$ , i.e., 247 $\\begin{array} { r } { \\int \\rho ( y ) \\frac { \\sigma ^ { 2 } ( y ) } { 1 + \\| y \\| ^ { 2 d } } d ^ { d } y < \\infty } \\end{array}$ , we have ",
848
+ "bbox": [
849
+ 147,
850
+ 342,
851
+ 826,
852
+ 381
853
+ ],
854
+ "page_idx": 6
855
+ },
856
+ {
857
+ "type": "equation",
858
+ "img_path": "images/3706bfdabcd1df9bdca065bb5abf98fdce5d41eaa36897376cfc69f817c44feb.jpg",
859
+ "text": "$$\n\\mathcal { V } ( x ) \\underset { n \\to + \\infty } { \\sim } \\frac { \\sigma ^ { 2 } ( x ) } { \\ln ( n ) } .\n$$",
860
+ "text_format": "latex",
861
+ "bbox": [
862
+ 429,
863
+ 388,
864
+ 568,
865
+ 422
866
+ ],
867
+ "page_idx": 6
868
+ },
869
+ {
870
+ "type": "text",
871
+ "text": "48 Note that if the mean variance $\\begin{array} { r } { \\int \\rho ( y ) \\sigma ^ { 2 } ( y ) d ^ { d } y < \\infty } \\end{array}$ , which is in particular the case when $\\sigma ^ { 2 }$ is \n49 bounded over $\\Omega$ , then the condition $C _ { \\mathrm { G r o w t h } } ^ { \\sigma }$ is in fact automatically satisfied. ",
872
+ "bbox": [
873
+ 153,
874
+ 438,
875
+ 828,
876
+ 469
877
+ ],
878
+ "page_idx": 6
879
+ },
880
+ {
881
+ "type": "text",
882
+ "text": "3.1.4 The bias term ",
883
+ "text_level": 1,
884
+ "bbox": [
885
+ 174,
886
+ 483,
887
+ 323,
888
+ 500
889
+ ],
890
+ "page_idx": 6
891
+ },
892
+ {
893
+ "type": "text",
894
+ "text": "In appendix A.5, we prove the following three theorems for the bias term. ",
895
+ "bbox": [
896
+ 166,
897
+ 507,
898
+ 666,
899
+ 523
900
+ ],
901
+ "page_idx": 6
902
+ },
903
+ {
904
+ "type": "text",
905
+ "text": "Theorem 3.5. For 52 $x \\in \\Omega ^ { \\circ }$ (so that $\\rho ( x ) > 0 .$ ), we assume that $\\rho$ is continuous at $x$ , and the conditions ",
906
+ "bbox": [
907
+ 158,
908
+ 526,
909
+ 820,
910
+ 542
911
+ ],
912
+ "page_idx": 6
913
+ },
914
+ {
915
+ "type": "equation",
916
+ "img_path": "images/f7b392164cada2854b1187b61fd0a06bd49100bfd3fc03d2f4272cc206134367.jpg",
917
+ "text": "$$\n\\begin{array} { r } { \\bullet _ { \\mathbf { \\phi } } C _ { \\mathrm { G r o w t h } } ^ { f } \\colon \\int _ { \\mathbf { \\phi } } ( y ) \\frac { f ^ { 2 } ( y ) } { 1 + \\| y \\| ^ { 2 d } } d ^ { d } y < \\infty , } \\end{array}\n$$",
918
+ "text_format": "latex",
919
+ "bbox": [
920
+ 222,
921
+ 553,
922
+ 465,
923
+ 578
924
+ ],
925
+ "page_idx": 6
926
+ },
927
+ {
928
+ "type": "text",
929
+ "text": "Moreover, we define 257 $\\begin{array} { r } { \\kappa ( x ) = \\int \\rho ( x + y ) \\frac { f ( x + y ) - f ( x ) } { \\vert \\vert y \\vert \\vert ^ { d } } d ^ { d } y . } \\end{array}$ , where we have $| \\kappa ( x ) | < \\infty$ ",
930
+ "bbox": [
931
+ 151,
932
+ 641,
933
+ 736,
934
+ 665
935
+ ],
936
+ "page_idx": 6
937
+ },
938
+ {
939
+ "type": "text",
940
+ "text": "Then, for 258 $\\kappa ( x ) \\neq 0 ,$ , the bias term $\\begin{array} { r } { \\mathcal { B } ( x ) = \\mathbb { E } _ { X } \\Big [ \\Big ( \\sum _ { i = 0 } ^ { n } w _ { i } ( x ) [ f ( x _ { i } ) - f ( x ) ] \\Big ) ^ { 2 } \\Big ] } \\end{array}$ satisfies ",
941
+ "bbox": [
942
+ 142,
943
+ 671,
944
+ 753,
945
+ 698
946
+ ],
947
+ "page_idx": 6
948
+ },
949
+ {
950
+ "type": "equation",
951
+ "img_path": "images/2c42f323eb13a80226c519a8b2474bd78f0be76c78cf72e77927ac7578a90cbe.jpg",
952
+ "text": "$$\n\\mathcal { B } ( x ) \\underset { n + \\infty } { \\sim } ( \\mathbb { E } [ \\hat { f } ( x ) ] - f ( x ) ) ^ { 2 } , \\qquad \\mathrm { w i t h } \\quad \\mathbb { E } [ \\hat { f } ( x ) ] - f ( x ) \\underset { n + \\infty } { \\sim } \\frac { \\kappa ( x ) } { V _ { d } \\rho ( x ) \\ln ( n ) } .\n$$",
953
+ "text_format": "latex",
954
+ "bbox": [
955
+ 189,
956
+ 704,
957
+ 776,
958
+ 742
959
+ ],
960
+ "page_idx": 6
961
+ },
962
+ {
963
+ "type": "text",
964
+ "text": "259 In the non generic case $\\kappa ( \\boldsymbol { x } ) = 0$ , we have the weaker result ",
965
+ "bbox": [
966
+ 140,
967
+ 750,
968
+ 571,
969
+ 766
970
+ ],
971
+ "page_idx": 6
972
+ },
973
+ {
974
+ "type": "equation",
975
+ "img_path": "images/c8b52b765a4de5ca9cae12b69fae63a8c7e6f0a7e26b5862a8a7301df2d2b81f.jpg",
976
+ "text": "$$\n\\begin{array} { r } { B ( x ) = \\left\\{ \\begin{array} { l l } { O \\left( n ^ { - \\frac { 2 \\alpha _ { x } } { d } } ( \\ln ( n ) ) ^ { - 1 - \\frac { 2 \\alpha _ { x } } { d } } \\right) , } & { f o r \\ d > 2 \\alpha _ { x } } \\\\ { O \\left( n ^ { - 1 } ( \\ln ( n ) ) ^ { - 1 } \\right) , } & { f o r \\ d = 2 \\alpha _ { x } } \\\\ { O \\left( n ^ { - 1 } ( \\ln ( n ) ) ^ { - 2 } \\right) , } & { f o r \\ d < 2 \\alpha _ { x } } \\end{array} \\right. } \\end{array}\n$$",
977
+ "text_format": "latex",
978
+ "bbox": [
979
+ 308,
980
+ 772,
981
+ 679,
982
+ 854
983
+ ],
984
+ "page_idx": 6
985
+ },
986
+ {
987
+ "type": "text",
988
+ "text": "260 Note that $\\kappa ( \\boldsymbol { x } ) = 0$ is non generic but can still happen, even if $f$ is not constant. For instance, if $\\Omega$ is a \n261 sphere centered at $x$ or $\\Omega = \\mathbb { R } ^ { d }$ , if $\\rho ( x + y ) = \\hat { \\rho } ( | | y | | )$ is isotropic around $x$ , and if $f _ { x } : y \\mapsto f ( x + y )$ \n262 is an odd function of $y$ , then we indeed have $\\kappa ( \\boldsymbol { x } ) = 0$ at this symmetric point $x$ . ",
989
+ "bbox": [
990
+ 142,
991
+ 867,
992
+ 821,
993
+ 912
994
+ ],
995
+ "page_idx": 6
996
+ },
997
+ {
998
+ "type": "text",
999
+ "text": "Interestingly, for $\\kappa ( \\boldsymbol { x } ) \\neq 0$ , Eq. (23) shows that the bias $B ( x )$ is asymptotically dominated by the square of $\\mathbb { E } \\left[ { \\hat { f } } ( x ) \\right] - f ( x )$ , showing that the fluctuations of $\\begin{array} { r } { \\mathbb { E } \\left[ \\hat { f } ( x ) \\right] - \\sum _ { i = 0 } ^ { n } w _ { i } ( x ) f ( x _ { i } ) } \\end{array}$ are negligible compared to $\\mathbb { E } \\left[ { \\hat { f } } ( x ) \\right] - f ( x )$ , in the limit $n + \\infty$ and for $\\kappa ( x ) \\neq 0$ . ",
1000
+ "bbox": [
1001
+ 166,
1002
+ 90,
1003
+ 826,
1004
+ 155
1005
+ ],
1006
+ "page_idx": 7
1007
+ },
1008
+ {
1009
+ "type": "text",
1010
+ "text": "One can relax the local Hölder condition, but at the price of a weaker estimate for $B ( x )$ which will however be enough to obtain strong results for the regression and classification risks (see below): ",
1011
+ "bbox": [
1012
+ 163,
1013
+ 159,
1014
+ 823,
1015
+ 189
1016
+ ],
1017
+ "page_idx": 7
1018
+ },
1019
+ {
1020
+ "type": "text",
1021
+ "text": "Theorem 3.6. For $x \\in \\Omega ^ { \\circ }$ , we assume $\\rho$ and $f$ continuous at $x$ , and the growth condition $C _ { \\mathrm { G r o w t h } } ^ { f }$ $\\begin{array} { r } { \\int \\rho ( y ) \\frac { f ^ { 2 } ( y ) } { 1 + \\| y \\| ^ { 2 d } } d ^ { d } y < \\infty . } \\end{array}$ . Then, the bias term satisfies ",
1022
+ "bbox": [
1023
+ 163,
1024
+ 194,
1025
+ 825,
1026
+ 232
1027
+ ],
1028
+ "page_idx": 7
1029
+ },
1030
+ {
1031
+ "type": "equation",
1032
+ "img_path": "images/c2df152db867d03c5c5e0128e5ef90fda1455d2353d8fd2003bc698605f6f326.jpg",
1033
+ "text": "$$\n{ \\cal B } ( x ) = o \\left( \\frac { 1 } { \\ln ( n ) } \\right) ,\n$$",
1034
+ "text_format": "latex",
1035
+ "bbox": [
1036
+ 428,
1037
+ 239,
1038
+ 568,
1039
+ 275
1040
+ ],
1041
+ "page_idx": 7
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "270 or equivalently, for any $\\varepsilon > 0$ , there exists $N _ { x , \\varepsilon }$ , such that for $n \\geq N _ { x , \\varepsilon }$ ",
1046
+ "bbox": [
1047
+ 140,
1048
+ 281,
1049
+ 642,
1050
+ 297
1051
+ ],
1052
+ "page_idx": 7
1053
+ },
1054
+ {
1055
+ "type": "equation",
1056
+ "img_path": "images/fe6a46052837c80a4959bc525ac21df1ae77a1ee8ca54338f3f1dece1f81496e.jpg",
1057
+ "text": "$$\nB ( x ) \\leq { \\frac { \\varepsilon } { \\ln ( n ) } } .\n$$",
1058
+ "text_format": "latex",
1059
+ "bbox": [
1060
+ 446,
1061
+ 305,
1062
+ 550,
1063
+ 335
1064
+ ],
1065
+ "page_idx": 7
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "271 Let us now consider a point $x \\in \\partial \\Omega$ for which we have $\\rho ( { \\boldsymbol { x } } ) = 0$ (note that $x \\in \\partial \\Omega$ does not 272 necessarily imply $\\rho ( x ) = 0 ,$ ). In appendix A.5, we show the following theorem for the expectation value of the estimator 273 ${ \\hat { f } } ( x )$ in the limit $n \\to + \\infty$ : ",
1070
+ "bbox": [
1071
+ 140,
1072
+ 349,
1073
+ 825,
1074
+ 396
1075
+ ],
1076
+ "page_idx": 7
1077
+ },
1078
+ {
1079
+ "type": "text",
1080
+ "text": "274 Theorem 3.7. For $x \\in \\partial \\Omega$ such that $\\rho ( x ) = 0$ , we assume that $f$ and $\\rho$ satisfy the conditions ",
1081
+ "bbox": [
1082
+ 148,
1083
+ 400,
1084
+ 785,
1085
+ 416
1086
+ ],
1087
+ "page_idx": 7
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "$\\begin{array} { r } { \\bullet \\ C _ { \\mathrm { G r o w t h } } ^ { f } \\cdot \\int \\rho ( y ) \\frac { | f ( y ) | } { 1 + \\| y \\| ^ { d } } \\ d ^ { d } y < \\infty , } \\end{array}$ \n• $C _ { \\mathrm { H o l d e r } } ^ { \\rho }$ : thand $\\alpha _ { x } > 0$ $K _ { x } > 0$ $\\delta _ { x } > 0$ \n$x ^ { \\prime } \\in \\Omega$ $\\| x - x ^ { \\prime } \\| \\leq \\delta _ { x } \\implies | \\rho ( x ^ { \\prime } ) | \\leq K _ { x } \\| x - x ^ { \\prime } \\| ^ { \\alpha _ { x } }$ (local Hölder condition for $\\rho$ ). ",
1092
+ "bbox": [
1093
+ 217,
1094
+ 425,
1095
+ 624,
1096
+ 501
1097
+ ],
1098
+ "page_idx": 7
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Mor279 and 280 $\\begin{array} { r } { \\kappa ( x ) = \\int \\rho ( x + y ) \\frac { f ( x + y ) - f ( x ) } { | | y | | ^ { d } } d ^ { d } y ( | \\kappa ( x ) | < \\infty } \\end{array}$ under condition en, $C _ { \\mathrm { G r o w t h } } ^ { f } )$ $\\begin{array} { r } { \\lambda ( x ) = \\int \\frac { \\rho ( x + y ) } { | | y | | ^ { d } } d ^ { d } y } \\end{array}$ $( 0 < \\lambda ( x ) < \\infty$ $C _ { \\mathrm { H o l d e r } } ^ { \\sigma }$ ",
1103
+ "bbox": [
1104
+ 140,
1105
+ 511,
1106
+ 823,
1107
+ 554
1108
+ ],
1109
+ "page_idx": 7
1110
+ },
1111
+ {
1112
+ "type": "equation",
1113
+ "img_path": "images/1d141f3551702e23f28b7a43ba37886698332a513a70dd95e814e5ae246287ba.jpg",
1114
+ "text": "$$\n\\operatorname* { l i m } _ { n + \\infty } \\mathbb { E } [ \\hat { f } ( x ) ] - f ( x ) = \\frac { \\kappa ( x ) } { \\lambda ( x ) } .\n$$",
1115
+ "text_format": "latex",
1116
+ "bbox": [
1117
+ 374,
1118
+ 561,
1119
+ 591,
1120
+ 595
1121
+ ],
1122
+ "page_idx": 7
1123
+ },
1124
+ {
1125
+ "type": "text",
1126
+ "text": "281 Hence, in the generic case $\\kappa ( \\boldsymbol { x } ) \\neq 0$ (see Theorem 3.5 and the discussion below it) and under \n282 condition $C _ { \\mathrm { H o l d e r } } ^ { \\rho }$ , we find that the bias does not vanish when $\\rho ( x ) = 0$ , and that the estimator $\\hat { f } ( x )$ \n283 does not converge to $f ( x )$ . When $\\rho ( x ) = 0$ , the scarcity of data near the point $x$ indeed prevents the \n284 285 $\\rho$ stimator to concontinuous at $x$ rge to the actuand such that $\\rho ( x ) = 0$ f , $f ( x )$ . In appendix A.5, we shownot satisfying the condition $C _ { \\mathrm { H o l d e r } } ^ { \\rho }$ ple of a density, and for which \n286 $\\begin{array} { r } { \\operatorname* { l i m } _ { n + \\infty } \\mathbb { E } [ \\hat { f } ( x ) ] = f ( x ) } \\end{array}$ , even if $\\kappa ( x ) \\neq 0$ . ",
1127
+ "bbox": [
1128
+ 142,
1129
+ 609,
1130
+ 825,
1131
+ 702
1132
+ ],
1133
+ "page_idx": 7
1134
+ },
1135
+ {
1136
+ "type": "text",
1137
+ "text": "3.2 Asymptotic equivalent for the regression risk ",
1138
+ "text_level": 1,
1139
+ "bbox": [
1140
+ 171,
1141
+ 717,
1142
+ 526,
1143
+ 733
1144
+ ],
1145
+ "page_idx": 7
1146
+ },
1147
+ {
1148
+ "type": "text",
1149
+ "text": "In appendix A.6, we prove the following theorem establishing the asymptotic rate at which the excess risk goes to zero with large sample size $n$ for Hilbert kernel regression, under mild conditions that do not require $f$ or $\\sigma$ to be bounded, but only to satisfy some growth conditions: ",
1150
+ "bbox": [
1151
+ 171,
1152
+ 743,
1153
+ 825,
1154
+ 786
1155
+ ],
1156
+ "page_idx": 7
1157
+ },
1158
+ {
1159
+ "type": "text",
1160
+ "text": "Theorem 3.8. For $x \\in \\Omega ^ { \\circ }$ , we assume $\\sigma ( x ) > 0$ , ρ, σ, and $f$ continuous at $x$ , and the growth conditions $\\begin{array} { r } { C _ { \\mathrm { G r o w t h } } ^ { \\sigma } \\colon \\int \\rho ( y ) \\frac { \\sigma ^ { 2 } ( y ) } { 1 + \\| y \\| ^ { 2 d } } d ^ { d } y < \\infty } \\end{array}$ and $\\begin{array} { r } { C _ { \\mathrm { G r o w t h } } ^ { f } \\colon \\int \\rho ( y ) \\frac { f ^ { 2 } ( y ) } { 1 + \\| y \\| ^ { 2 d } } d ^ { d } y < \\infty } \\end{array}$ . ",
1161
+ "bbox": [
1162
+ 169,
1163
+ 790,
1164
+ 825,
1165
+ 829
1166
+ ],
1167
+ "page_idx": 7
1168
+ },
1169
+ {
1170
+ "type": "text",
1171
+ "text": "93 Then the following statements are true: ",
1172
+ "bbox": [
1173
+ 156,
1174
+ 832,
1175
+ 431,
1176
+ 847
1177
+ ],
1178
+ "page_idx": 7
1179
+ },
1180
+ {
1181
+ "type": "text",
1182
+ "text": "• The excess regression risk at the point $x$ satisfies ",
1183
+ "bbox": [
1184
+ 217,
1185
+ 858,
1186
+ 553,
1187
+ 875
1188
+ ],
1189
+ "page_idx": 7
1190
+ },
1191
+ {
1192
+ "type": "equation",
1193
+ "img_path": "images/3a0df23cbf8555547567d82f07cc643c25ffb06421216c32466100ded88e2df1.jpg",
1194
+ "text": "$$\n\\mathbb { E } [ ( \\hat { f } ( x ) - f ( x ) ) ^ { 2 } ] \\underset { n + \\infty } { \\sim } \\frac { \\sigma ^ { 2 } ( x ) } { \\ln ( n ) } .\n$$",
1195
+ "text_format": "latex",
1196
+ "bbox": [
1197
+ 413,
1198
+ 881,
1199
+ 642,
1200
+ 916
1201
+ ],
1202
+ "page_idx": 7
1203
+ },
1204
+ {
1205
+ "type": "text",
1206
+ "text": "• The Hilbert kernel estimate converges pointwise to the regression function in probability. More specifically, for any $\\delta > 0$ , there exists a constant $N _ { x , \\delta }$ , such that for any $\\varepsilon > 0$ , we have the following Chebyshev bound, valid for $n \\geq N _ { x , \\delta }$ ",
1207
+ "bbox": [
1208
+ 217,
1209
+ 90,
1210
+ 820,
1211
+ 133
1212
+ ],
1213
+ "page_idx": 8
1214
+ },
1215
+ {
1216
+ "type": "equation",
1217
+ "img_path": "images/2dbbebe98e11af6688d6a91d238394af642981632ad121bf433f4bda8f735cb4.jpg",
1218
+ "text": "$$\n\\mathbb { P } [ | \\hat { f } ( x ) - f ( x ) | \\geq \\varepsilon ] \\leq \\frac { 1 + \\delta } { \\varepsilon ^ { 2 } } \\frac { \\sigma ^ { 2 } ( x ) } { \\ln ( n ) } .\n$$",
1219
+ "text_format": "latex",
1220
+ "bbox": [
1221
+ 400,
1222
+ 136,
1223
+ 656,
1224
+ 170
1225
+ ],
1226
+ "page_idx": 8
1227
+ },
1228
+ {
1229
+ "type": "text",
1230
+ "text": "8 This theorem is a consequence of the corresponding asymptotically equivalent forms of the variance \n9 and bias terms presented above. Note that as long as $\\rho ( x ) > 0$ , the variance term dominates over the \n00 bias term and the regression risk has the same form as the variance term. ",
1231
+ "bbox": [
1232
+ 155,
1233
+ 176,
1234
+ 826,
1235
+ 218
1236
+ ],
1237
+ "page_idx": 8
1238
+ },
1239
+ {
1240
+ "type": "text",
1241
+ "text": "3.3 Rates for the plugin classifier ",
1242
+ "text_level": 1,
1243
+ "bbox": [
1244
+ 171,
1245
+ 233,
1246
+ 415,
1247
+ 248
1248
+ ],
1249
+ "page_idx": 8
1250
+ },
1251
+ {
1252
+ "type": "text",
1253
+ "text": "In appendix A.7, we prove the following theorem establishing the asymptotic rate at which the classification risk goes to zero with large sample size $n$ for Hilbert kernel regression: ",
1254
+ "bbox": [
1255
+ 169,
1256
+ 258,
1257
+ 823,
1258
+ 287
1259
+ ],
1260
+ "page_idx": 8
1261
+ },
1262
+ {
1263
+ "type": "text",
1264
+ "text": "Theorem 3.9. For $x \\in \\Omega ^ { \\circ }$ , we assume $\\sigma ( x ) > 0$ , $\\rho , \\sigma$ , and $f$ continuous at $x$ . Then, the classification risk $\\mathbb { E } [ \\mathcal { R } _ { 0 / 1 } ( \\hat { F } ( x ) ) ] - \\mathcal { R } _ { 0 / 1 } ( F ( x ) )$ vanishes for $n + \\infty$ . ",
1265
+ "bbox": [
1266
+ 160,
1267
+ 289,
1268
+ 823,
1269
+ 320
1270
+ ],
1271
+ "page_idx": 8
1272
+ },
1273
+ {
1274
+ "type": "text",
1275
+ "text": "306 More precisely, for any $\\varepsilon > 0$ , there exists $N _ { x , \\varepsilon }$ , such that for any $n \\geq N _ { x , \\varepsilon }$ , ",
1276
+ "bbox": [
1277
+ 147,
1278
+ 324,
1279
+ 674,
1280
+ 340
1281
+ ],
1282
+ "page_idx": 8
1283
+ },
1284
+ {
1285
+ "type": "equation",
1286
+ "img_path": "images/9a05715b809769eff558d60aedf7d27fa51af21ea83e8a7d5552afc461bca877.jpg",
1287
+ "text": "$$\n0 \\leq \\mathbb { E } [ \\mathcal { R } _ { 0 / 1 } ( \\hat { F } ( x ) ) ] - \\mathcal { R } _ { 0 / 1 } ( F ( x ) ) \\leq 2 ( 1 + \\varepsilon ) \\frac { \\sigma ( x ) } { \\sqrt { \\ln ( n ) } } ,\n$$",
1288
+ "text_format": "latex",
1289
+ "bbox": [
1290
+ 308,
1291
+ 340,
1292
+ 684,
1293
+ 377
1294
+ ],
1295
+ "page_idx": 8
1296
+ },
1297
+ {
1298
+ "type": "text",
1299
+ "text": "307 In addition, for any $0 < \\alpha < 1$ , the general inequality ",
1300
+ "bbox": [
1301
+ 138,
1302
+ 383,
1303
+ 529,
1304
+ 400
1305
+ ],
1306
+ "page_idx": 8
1307
+ },
1308
+ {
1309
+ "type": "equation",
1310
+ "img_path": "images/52ddb230a269f1f792e812b725d62ffd08d20b9f7ca3a941b78ebb02b643c7c5.jpg",
1311
+ "text": "$$\n\\begin{array} { r } { \\mathbb { E } [ \\mathcal { R } _ { 0 / 1 } ( \\hat { F } ( x ) ) ] - \\mathcal { R } _ { 0 / 1 } ( F ( x ) ) \\leq 2 | f ( x ) - 1 / 2 | ^ { 1 - \\alpha } \\mathbb { E } \\left[ | \\hat { f } ( x ) - f ( x ) | ^ { 2 } \\right] ^ { \\frac { \\alpha } { 2 } } , } \\end{array}\n$$",
1312
+ "text_format": "latex",
1313
+ "bbox": [
1314
+ 250,
1315
+ 400,
1316
+ 745,
1317
+ 429
1318
+ ],
1319
+ "page_idx": 8
1320
+ },
1321
+ {
1322
+ "type": "text",
1323
+ "text": "308 holds unconditionally and, for $n \\geq N _ { x , \\varepsilon }$ , leads to ",
1324
+ "bbox": [
1325
+ 142,
1326
+ 429,
1327
+ 501,
1328
+ 444
1329
+ ],
1330
+ "page_idx": 8
1331
+ },
1332
+ {
1333
+ "type": "equation",
1334
+ "img_path": "images/e257221525c91d4ce72ad1befa896ea8a4309dbf38a114952e588b412bd90720.jpg",
1335
+ "text": "$$\n0 \\leq \\mathbb { E } [ \\mathcal { R } _ { 0 / 1 } ( \\hat { F } ( x ) ) ] - \\mathcal { R } _ { 0 / 1 } ( F ( x ) ) \\leq 2 | f ( x ) - 1 / 2 | ^ { 1 - \\alpha } \\left( 1 + \\varepsilon \\right) ^ { \\alpha } \\frac { \\sigma ^ { \\alpha } ( x ) } { \\left( \\ln ( n ) \\right) ^ { \\frac { \\alpha } { 2 } } } .\n$$",
1336
+ "text_format": "latex",
1337
+ "bbox": [
1338
+ 243,
1339
+ 444,
1340
+ 753,
1341
+ 479
1342
+ ],
1343
+ "page_idx": 8
1344
+ },
1345
+ {
1346
+ "type": "text",
1347
+ "text": "309 For $0 < \\alpha < 1$ , Eq. (32) is weaker than Eq. (30) in terms of its dependence on $n$ , but explicitly \n310 shows that the classification risk vanishes for $f ( x ) = 1 / 2$ . This theorem does not require any growth \n311 condition for $f$ or $\\sigma$ , since both functions takes values in $[ 0 , 1 ]$ in the classification context. ",
1348
+ "bbox": [
1349
+ 140,
1350
+ 484,
1351
+ 823,
1352
+ 529
1353
+ ],
1354
+ "page_idx": 8
1355
+ },
1356
+ {
1357
+ "type": "text",
1358
+ "text": "3.4 Extrapolation behavior outside the support of $\\rho$ ",
1359
+ "text_level": 1,
1360
+ "bbox": [
1361
+ 173,
1362
+ 542,
1363
+ 544,
1364
+ 559
1365
+ ],
1366
+ "page_idx": 8
1367
+ },
1368
+ {
1369
+ "type": "text",
1370
+ "text": "We now take the point $x$ outside the closed support $\\bar { \\Omega }$ of the distribution $\\rho$ (which excludes the case $\\Omega = \\mathbb { R } ^ { d }$ ). We are interested in the behavior of $\\mathbb { E } \\left[ \\hat { f } ( x ) \\right]$ as $n + \\infty$ . In appendix A.8 we prove: ",
1371
+ "bbox": [
1372
+ 171,
1373
+ 566,
1374
+ 823,
1375
+ 607
1376
+ ],
1377
+ "page_idx": 8
1378
+ },
1379
+ {
1380
+ "type": "text",
1381
+ "text": "Theorem 3.10. For 315 $x \\notin \\bar { \\Omega }$ , we assume the growth condition $\\begin{array} { r } { \\int \\rho ( y ) \\frac { | f ( y ) | } { 1 + \\| y \\| ^ { d } } d ^ { d } y < \\infty } \\end{array}$ ",
1382
+ "bbox": [
1383
+ 156,
1384
+ 608,
1385
+ 772,
1386
+ 631
1387
+ ],
1388
+ "page_idx": 8
1389
+ },
1390
+ {
1391
+ "type": "equation",
1392
+ "img_path": "images/ab28fe82419cafc03fc6ed8371601dd011c04570e69266e7819207e5c52f39ce.jpg",
1393
+ "text": "$$\n\\hat { f } _ { \\infty } ( x ) : = \\operatorname* { l i m } _ { n \\to + \\infty } \\mathbb { E } \\left[ \\hat { f } ( x ) \\right] = \\frac { \\int \\rho ( y ) f ( y ) \\| x - y \\| ^ { - d } d ^ { d } y } { \\int \\rho ( y ) \\| x - y \\| ^ { - d } d ^ { d } y } ,\n$$",
1394
+ "text_format": "latex",
1395
+ "bbox": [
1396
+ 305,
1397
+ 631,
1398
+ 691,
1399
+ 666
1400
+ ],
1401
+ "page_idx": 8
1402
+ },
1403
+ {
1404
+ "type": "text",
1405
+ "text": "and 316 $\\hat { f } _ { \\infty }$ is continuous at all $x \\notin \\bar { \\Omega }$ . ",
1406
+ "bbox": [
1407
+ 145,
1408
+ 669,
1409
+ 403,
1410
+ 685
1411
+ ],
1412
+ "page_idx": 8
1413
+ },
1414
+ {
1415
+ "type": "text",
1416
+ "text": "In addition, i317 $\\begin{array} { r } { f \\int \\rho ( y ) | f ( y ) | d ^ { d } y < \\infty } \\end{array}$ , and defining $d ( x , \\Omega ) > 0$ as the distance between $x$ and $\\Omega$ , we 318 have ",
1417
+ "bbox": [
1418
+ 147,
1419
+ 689,
1420
+ 823,
1421
+ 718
1422
+ ],
1423
+ "page_idx": 8
1424
+ },
1425
+ {
1426
+ "type": "equation",
1427
+ "img_path": "images/1ce708bc52ea0b8c3906b3b6b1ce64c4b614b8fb780eea46213beef7937ba998.jpg",
1428
+ "text": "$$\n\\operatorname* { l i m } _ { d ( x , \\Omega ) \\to + \\infty } \\hat { f } _ { \\infty } ( x ) = \\int \\rho ( y ) f ( y ) d ^ { d } y .\n$$",
1429
+ "text_format": "latex",
1430
+ "bbox": [
1431
+ 369,
1432
+ 714,
1433
+ 627,
1434
+ 747
1435
+ ],
1436
+ "page_idx": 8
1437
+ },
1438
+ {
1439
+ "type": "text",
1440
+ "text": "319 Finally, we consider $x _ { 0 } ~ \\in ~ \\partial \\Omega$ such that $\\rho ( x _ { 0 } ) ~ > ~ 0$ (i.e., $x _ { 0 } ~ \\in ~ \\partial \\Omega \\cap \\Omega \\}$ , and assume \n320 that $f$ and $\\rho$ seen as functions restricted to $\\Omega$ are continuous at $x _ { 0 }$ , i.e. $\\quad \\operatorname* { l i m } _ { y \\in \\Omega \\to x _ { 0 } } \\rho ( y ) \\ =$ \n321 $\\rho ( x _ { 0 } )$ and $\\begin{array} { l } { \\operatorname* { l i m } _ { y \\in \\Omega \\to x _ { 0 } } { \\overline { { f ( y ) } } } } & { = } \\end{array} f ( x _ { 0 } )$ . We also assume that the local solid angle $\\begin{array} { r l } { \\omega _ { 0 } } & { { } = } \\end{array}$ \n322 $\\begin{array} { r } { \\operatorname* { l i m } _ { r \\to 0 } \\frac { 1 } { V _ { d } \\rho ( x _ { 0 } ) r ^ { d } } \\int _ { \\| x _ { 0 } - y \\| \\leq r } \\rho ( y ) d ^ { d } y } \\end{array}$ exists and satisfies $\\omega _ { 0 } > 0$ . Then, ",
1441
+ "bbox": [
1442
+ 138,
1443
+ 747,
1444
+ 825,
1445
+ 809
1446
+ ],
1447
+ "page_idx": 8
1448
+ },
1449
+ {
1450
+ "type": "equation",
1451
+ "img_path": "images/edb4f0821b3f2446ccd58c3547ea4a235a2a84e45b7801e34a07d813a0cf7628.jpg",
1452
+ "text": "$$\n\\operatorname * { l i m } _ { x \\notin \\bar { \\Omega } x _ { 0 } } \\hat { f } _ { \\infty } ( x ) = f ( x _ { 0 } ) .\n$$",
1453
+ "text_format": "latex",
1454
+ "bbox": [
1455
+ 415,
1456
+ 809,
1457
+ 583,
1458
+ 838
1459
+ ],
1460
+ "page_idx": 8
1461
+ },
1462
+ {
1463
+ "type": "text",
1464
+ "text": "323 Eq. (34) shows that far away from $\\Omega$ (which is possible to realize, for instance, when $\\Omega$ is bounded), \n324 $\\hat { f } _ { \\infty } ( x )$ goes smoothly to the $\\rho$ -mean of $f$ . Moreover, Eq. (35) establishes a continuity property for \n325 the extrapolation $\\hat { f } _ { \\infty }$ at $x _ { 0 } \\in \\partial \\Omega \\cap \\Omega$ under the stated conditions (remember that for $x \\in \\Omega ^ { \\circ }$ , we \n326 have $\\begin{array} { r } { \\operatorname* { l i m } _ { n + \\infty } \\mathbb { E } [ \\hat { f } ( x ) ] = f ( x ) } \\end{array}$ ; see Theorem 3.5, and in particular Eq. (23)). ",
1465
+ "bbox": [
1466
+ 140,
1467
+ 843,
1468
+ 826,
1469
+ 916
1470
+ ],
1471
+ "page_idx": 8
1472
+ },
1473
+ {
1474
+ "type": "text",
1475
+ "text": "References [1] Holger Wendland. Scattered data approximation, volume 17. Cambridge university press, 2004. [2] Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani. An introduction to statistical learning, volume 112. Springer, 2013. [3] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In International Conference on Learning Representations, 2017. [4] Mikhail Belkin, Siyuan Ma, and Soumik Mandal. To understand deep learning we need to understand kernel learning. In Proceedings of the 35th International Conference on Machine Learning, pages 541–549, 2018. [5] Adele Cutler and Guohua Zhao. Pert-perfect random tree ensembles. Computing Science and Statistics, 33:490–497, 2001. [6] Abraham J Wyner, Matthew Olson, Justin Bleich, and David Mease. Explaining the success of adaboost and random forests as interpolating classifiers. Journal of Machine Learning Research, 18(48):1–33, 2017. [7] Mikhail Belkin, Daniel Hsu, and Partha Mitra. Overfitting or perfect fitting? risk bounds for classification and regression rules that interpolate. arXiv preprint arXiv:1806.05161, 2018. [8] Alexander Rakhlin and Xiyu Zhai. Consistency of interpolation with laplace kernels is a high-dimensional phenomenon. arXiv preprint arXiv:1812.11167, 2018. [9] Greg Ongie, Rebecca Willett, Daniel Soudry, and Nathan Srebro. A function space view of bounded norm infinite width relu nets: The multivariate case. arXiv preprint arXiv:1910.01635, 2019. [10] Mikhail Belkin, Daniel Hsu, Siyuan Ma, and Soumik Mandal. Reconciling modern machinelearning practice and the classical bias–variance trade-off. Proceedings of the National Academy of Sciences, 116(32):15849–15854, 2019. [11] Tengyuan Liang and Alexander Rakhlin. Just interpolate: Kernel\" ridgeless\" regression can generalize. arXiv preprint arXiv:1808.00387, 2018. 354 [12] Peter L Bartlett, Philip M Long, Gábor Lugosi, and Alexander Tsigler. Benign overfitting in linear regression. arXiv preprint arXiv:1906.11300, 2019. 356 [13] Andrea Montanari, Feng Ruan, Youngtak Sohn, and Jun Yan. The generalization error of max-margin linear classifiers: High-dimensional asymptotics in the overparametrized regime. arXiv preprint arXiv:1911.01544, 2019. 359 [14] Mina Karzand and Robert D Nowak. Active learning in the overparameterized and interpolating regime. arXiv preprint arXiv:1905.12782, 2019. [15] Yue Xing, Qifan Song, and Guang Cheng. Statistical optimality of interpolated nearest neighbor algorithms. arXiv preprint arXiv:1810.02814, 2018. 363 [16] Partha P. Mitra. Fitting elephants in modern machine learning by statistically consistent interpolation. Nature Machine Intelligence, 3(5):378–386, May 2021. [17] Martin Anthony and Peter L Bartlett. Neural Network Learning: Theoretical Foundations. Cambridge University Press, 1999. [18] Luc Devroye, Laszlo Györfi, and Adam Krzyzak. The hilbert kernel regression estimate. ˙ Journal of Multivariate Analysis, 65(2):209–227, 1998. [19] Elizbar A Nadaraya. On estimating regression. Theory of Probability & Its Applications, 9(1):141–142, 1964. 371 [20] GS Watson. Smooth regression analysis. Sankhya A: 26: 359-372, (50), 1964. ",
1476
+ "bbox": [
1477
+ 145,
1478
+ 55,
1479
+ 828,
1480
+ 915
1481
+ ],
1482
+ "page_idx": 9
1483
+ },
1484
+ {
1485
+ "type": "text",
1486
+ "text": "[21] Donald Shepard. A two-dimensional interpolation function for irregularly-spaced data. In Proceedings of the 1968 23rd ACM national conference, pages 517–524. ACM, 1968. ",
1487
+ "bbox": [
1488
+ 160,
1489
+ 92,
1490
+ 825,
1491
+ 119
1492
+ ],
1493
+ "page_idx": 10
1494
+ },
1495
+ {
1496
+ "type": "text",
1497
+ "text": "[22] Reinhard Farwig. Rate of convergence of shepard’s global interpolation formula. Mathematics of Computation, 46(174):577–590, 1986. ",
1498
+ "bbox": [
1499
+ 165,
1500
+ 128,
1501
+ 823,
1502
+ 157
1503
+ ],
1504
+ "page_idx": 10
1505
+ },
1506
+ {
1507
+ "type": "text",
1508
+ "text": "376 Checklist ",
1509
+ "text_level": 1,
1510
+ "bbox": [
1511
+ 142,
1512
+ 183,
1513
+ 254,
1514
+ 199
1515
+ ],
1516
+ "page_idx": 10
1517
+ },
1518
+ {
1519
+ "type": "text",
1520
+ "text": "1. For all authors... ",
1521
+ "bbox": [
1522
+ 174,
1523
+ 210,
1524
+ 302,
1525
+ 224
1526
+ ],
1527
+ "page_idx": 10
1528
+ },
1529
+ {
1530
+ "type": "text",
1531
+ "text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] Brief statement of the primary theorems are included in the abstract together with verbal descriptions of the principal results. \n(b) Did you describe the limitations of your work? [Yes] Theorems include limiting conditions. \n(c) Did you discuss any potential negative societal impacts of your work? [No] The paper consists of theorems and proofs about the convergence rates of an interpolation scheme and it is hard to conceive any negative social impact of this mathematical exercise. If anything it might have a positive impact by shedding theoretical light on the interpolation of noisy data in modern ML. \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] We have read the guidelines. ",
1532
+ "bbox": [
1533
+ 199,
1534
+ 228,
1535
+ 826,
1536
+ 387
1537
+ ],
1538
+ "page_idx": 10
1539
+ },
1540
+ {
1541
+ "type": "text",
1542
+ "text": "2. If you are including theoretical results... ",
1543
+ "bbox": [
1544
+ 166,
1545
+ 392,
1546
+ 455,
1547
+ 407
1548
+ ],
1549
+ "page_idx": 10
1550
+ },
1551
+ {
1552
+ "type": "text",
1553
+ "text": "(a) Did you state the full set of assumptions of all theoretical results? [Yes] We state the conditions for the theorems proven. \n(b) Did you include complete proofs of all theoretical results? [Yes] Proofs of all theorems are provided in the appendix. The relevant appendix section is noted in the corresponding sections containing the theorems. ",
1554
+ "bbox": [
1555
+ 199,
1556
+ 411,
1557
+ 825,
1558
+ 483
1559
+ ],
1560
+ "page_idx": 10
1561
+ },
1562
+ {
1563
+ "type": "text",
1564
+ "text": "3. If you ran experiments... ",
1565
+ "bbox": [
1566
+ 174,
1567
+ 488,
1568
+ 354,
1569
+ 502
1570
+ ],
1571
+ "page_idx": 10
1572
+ },
1573
+ {
1574
+ "type": "text",
1575
+ "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)? [N/A] The paper is directed to proving a number of theorems. \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [N/A] We do not rely on numerical experiments for the results presented in the paper. \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [N/A] \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)? [N/A] ",
1576
+ "bbox": [
1577
+ 199,
1578
+ 507,
1579
+ 825,
1580
+ 654
1581
+ ],
1582
+ "page_idx": 10
1583
+ },
1584
+ {
1585
+ "type": "text",
1586
+ "text": "06 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
1587
+ "bbox": [
1588
+ 151,
1589
+ 657,
1590
+ 785,
1591
+ 672
1592
+ ],
1593
+ "page_idx": 10
1594
+ },
1595
+ {
1596
+ "type": "text",
1597
+ "text": "(a) If your work uses existing assets, did you cite the creators? [N/A] \n(b) Did you mention the license of the assets? [N/A] \n(c) Did you include any new assets either in the supplemental material or as a URL? [N/A] \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A] \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] ",
1598
+ "bbox": [
1599
+ 197,
1600
+ 675,
1601
+ 825,
1602
+ 784
1603
+ ],
1604
+ "page_idx": 10
1605
+ },
1606
+ {
1607
+ "type": "text",
1608
+ "text": "5. If you used crowdsourcing or conducted research with human subjects... ",
1609
+ "bbox": [
1610
+ 163,
1611
+ 787,
1612
+ 666,
1613
+ 803
1614
+ ],
1615
+ "page_idx": 10
1616
+ },
1617
+ {
1618
+ "type": "text",
1619
+ "text": "(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] There are no human subjects. \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] ",
1620
+ "bbox": [
1621
+ 197,
1622
+ 806,
1623
+ 826,
1624
+ 895
1625
+ ],
1626
+ "page_idx": 10
1627
+ }
1628
+ ]
parse/train/jtrQswOMLrd/jtrQswOMLrd_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/jtrQswOMLrd/jtrQswOMLrd_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rJl8FoRcY7/rJl8FoRcY7.md ADDED
@@ -0,0 +1,296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DEEP GENERATIVE MODELS FOR LEARNING COHERENT LATENT REPRESENTATIONS FROM MULTIMODAL DATA
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ The application of multi-modal generative models by means of a Variational Auto Encoder (VAE) is an upcoming research topic for sensor fusion and bi-directional modality exchange. This contribution gives insights into the learned joint latent representation and shows that expressiveness and coherence are decisive properties for multi-modal datasets. Furthermore, we propose a multi-modal VAE derived from the full joint marginal log-likelihood that is able to learn the most meaningful representation for ambiguous observations. Since the properties of multi-modal sensor setups are essential for our approach but hardly available, we also propose a technique to generate correlated datasets from uni-modal ones.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Auto Encoder (AE), Variational Auto Encoder (VAE), and more recently Disentangled Variational Auto Encoder ( $\beta$ -VAE) have a considerable impact on the field of data-driven leaning of generative models. Furthermore, recent investigations have shown the fruitful applicability to deep reinforcement learning (DRL) as well as bi-directionally exchange of multi-modal data. VAEs tend to encode the data into latent space features that are (ideally) linearly separable as shown by Higgins et al. (2017a). They also allow the discovery of generative joint models (e.g. Suzuki et al. (2017)), as well as zero-shot domain transfer in DRL as shown by Higgins et al. (2017b).
12
+
13
+ However, a good generative model should not just generate good data and achieve a good quantitative score, but also gives a coherent and expressive latent space representation. This property is decisive for multi-modal approaches if the data shows correlation, as it is the case for every sensor setup designed for sensor fusion. With this contribution, we investigate the characteristic of the latent space as well as the quantitative features for existing multi-modal VAEs. Furthermore, we propose a novel approach to build and train a novel multi-modal VAE $( \mathbf { M } ^ { 2 } \mathbf { V } \mathbf { A } \mathbf { E } )$ which comprises the complete marginal joint log-likelihood without simplifying assumptions. As our objective is the consideration of raw multi-modal sensor data, we also propose an approach to generate correlated multi-modal datasets from available uni-modal ones. Lastly, we draw connections to in-place sensor fusion and epistemic (ambiguity-resolving) active-sensing.
14
+
15
+ Section 2 comprises the related work on multi-modal VAEs. Our comprehensive approach (i.e. $\mathbf { M } ^ { 2 } \mathbf { V A E } )$ is given in Sec. 3. Furthermore, we describe multi-modal datasets as well as the generation of correlated sets in Sec. 4 which are evaluated in Sec. 5. Finally, we conclude our work in Sec. 6.
16
+
17
+ # 2 RELATED WORK
18
+
19
+ Variational auto encoder (VAE) combine neural networks with variational inference to allow unsupervised learning of complicated distributions according to the graphical model shown in Figure 1 (left). A $D _ { a }$ -dimensional observation $a$ is modeled in terms of a $D _ { z }$ -dimensional latent vector $z$ using a probabilistic decoder $p _ { \theta _ { \mathrm { a } } } ( z )$ with parameters $\theta$ . To generate the corresponding embedding $z$ from observation $a$ , a probabilistic encoder network with $q _ { \phi _ { \mathrm { a } } } ( z )$ is being provided which parametrizes the posterior distribution from which $z$ is sampled. The encoder and decoder, given by neural networks, are trained jointly to bring $a$ close to an $a ^ { \prime }$ under the constraint that an approximate distribution needs to be close to a prior $p ( z )$ and hence inference is basically learned during training.
20
+
21
+ ![](images/3bdbe14ee048385f34f6f5509401d5d87873c034b014b26b98b4566ce55a17fd.jpg)
22
+ Figure 1: Evolution of full uni-, bi-, and tri-modal VAEs comprising all modality permutations
23
+
24
+ The specific objective of VAEs is the maximization of the marginal distribution $\begin{array} { r l } { p ( a ) } & { { } = } \end{array}$ $\textstyle { \int p _ { \theta } ( { \dot { a } } | z ) p ( z ) \operatorname { d } { \dot { a } } }$ . Because this distribution is intractable, the model is instead trained via stochastic gradient variational Bayes (SGVB) by maximizing the evidence lower bound (ELBO) $\mathcal { L }$ of the marginal log-likelihood $\log p ( a ) : = L _ { \mathrm { a } }$ as
25
+
26
+ $$
27
+ \begin{array} { r } { L _ { \mathrm { a } } \ge \mathcal L = \underbrace { - \mathrm { D } _ { \mathrm { K L } } \big ( q _ { \phi } ( z | a ) \| p ( z ) \big ) } _ { \mathrm { R e g u l a r i z a t i o n } } + \underbrace { { \mathbb E } _ { q _ { \phi } ( z | a ) } \log \bigl ( p _ { \theta } ( a | z ) \bigr ) } _ { \mathrm { R e c o n s t r u c t i o n } } . } \end{array}
28
+ $$
29
+
30
+ This approach proposed by Kingma & Welling (2013) is used in settings where only a single modality $a$ is present in order to find a latent encoding $z$ (c.f. Figure 1 (left)).
31
+
32
+ In the following chapters, we give a briefly comprise related work by means of multi-modal VAEs. Further, we stress the concept of two joint multi-modal approaches to derive the later proposed variational Auto Encoder (VAE).
33
+
34
+ # 2.1 MULTI-MODAL AUTO ENCODER
35
+
36
+ Given a set of modalities $\mathcal { M } = \{ a , b , c , \ldots \}$ , multi-modal variants of Variational Auto Encoders (VAE) have been applied to train generative models for multi-directional reconstruction (i.e. generation of missing data) or feature extraction. Variants are conditional VAEs (CVAE) and conditional multi-modal autoencoders (CMMA), with the lack in bi-directional reconstruction (Sohn et al. (2015); Pandey & Dukkipati (2017)). BiVCCA by Wang et al. (2016) trains two VAEs together with interacting inference networks to facilitate two-way reconstruction with the lack of directly modeling the joint distribution. Models, that are derived from the variation of information (VI) with the objective to estimate the joint distribution with the capabilities of multi-directional reconstruction were recently introduced by Suzuki et al. (2017). Vedantam et al. (2017) introduce another objective for the bi-modal VAE, which they call the triplet ELBO (tVAE). Furthermore, multi-modal stacked Auto Encoders (AE) are a variant of combining the latent spaces of various AEs ( Larochelle et al. (2007); Ranzato et al. (2006)) which can also be applied to the reconstruction of missing modalities (Ngiam et al. (2011); Cadena et al. (2016)). However, while Suzuki et al. (2017) and Vedantam et al. (2017) argue that training of the full multi-modal VAE is intractable, because of the $2 ^ { | { \mathcal { M } } | } - 1$ modality subsets of inference networks, we show that training the full joint model estimates the most expressive latent embeddings.
37
+
38
+ # 2.1.1 JOINT MULTI-MODAL VARIATIONAL AUTO ENCODER
39
+
40
+ When more than one modality is available, e.g. $a$ and $b$ as shown in Figure 1 (mid.), the derivation of the ELBO ${ \mathcal { L } } _ { \mathrm { J } }$ for a marginal joint log-likelihood $\log p ( a ) : = L _ { \mathbf { J } }$ is straight forward:
41
+
42
+ $$
43
+ \begin{array} { r } { L _ { \textup { J } } \geq \mathcal L _ { \textup I } = \underbrace { - \textup D _ { \mathrm { K L } } ( q _ { \phi _ { \Delta } } ( z | a , b ) \| p ( z ) ) } _ { \mathrm { R e g u l a r i z a t i o n } } + \underbrace { \mathbb E _ { q _ { \phi _ { \Delta } } ( z | a , b ) } \log ( p _ { \theta _ { \mathrm { a } } } ( a | z ) ) } _ { \mathrm { R e c o n s t r u c t i o n ~ w r t ~ } , a } + \underbrace { \mathbb E _ { q _ { \phi _ { \Delta } } ( z | a , b ) } \log ( p _ { \theta _ { \mathrm { b } } } ( b | z ) ) } _ { \mathrm { R e c o n s t r u c t i o n ~ w r t ~ } , b } } \end{array}
44
+ $$
45
+
46
+ However, it is not clear how to perform inference if the dataset consists of samples lacking from modalities (e.g. for samples $i$ and $k$ : $( a _ { i } , \boldsymbol { \mathcal { O } } )$ and $( \emptyset , b _ { k } ) )$ ). Ngiam et al. (2011) propose training of a bimodal deep auto encoder using an augmented dataset with additional examples that have only a single-modality as input. We, therefore, name the resulting model of Eq. 2 joint multi-modal VAE-Zero (JMVAE-Zero).
47
+
48
+ 2.1.2 JOINT MULTI-MODAL VARIATIONAL AUTO ENCODER FROM VARIATION OFINFORMATION
49
+
50
+ While the former approach cannot directly be applied to missing modalities, Suzuki et al. (2017) propose a joint multi-modal VAE (JMVAE) that is trained via two uni-modal encoders and a bimodal en-/decoder which share one objective function derived from the variation of information (VI) of the marginal conditional log-likelihoods $\log p ( a | b ) p ( b | a ) = : L _ { \mathrm { M } }$ by optimizing the ELBO ${ \mathcal { L } } _ { \mathrm { M } }$ :
51
+
52
+ $$
53
+ L _ { \mathrm { M } } \ge \mathcal { L } _ { \mathrm { M } } \ge \mathcal { L } _ { \mathrm { J } } - \underbrace { \mathrm { D } _ { \mathrm { K L } } \big ( q _ { \phi _ { \mathrm { a b } } } ( z | a , b ) \| q _ { \phi _ { \mathrm { b } } } ( z | b ) \big ) } _ { \mathrm { U n i m o d a l ~ P D F ~ f u t i n g ~ o f ~ e n c o d e r ~ b } } - \underbrace { \mathrm { D } _ { \mathrm { K L } } \big ( q _ { \phi _ { \mathrm { a b } } } ( z | a , b ) \| q _ { \phi _ { \mathrm { a } } } ( z | a ) \big ) } _ { \mathrm { U n i m o d a l ~ P D F ~ f i t i n g ~ o f ~ e n c o d e r ~ a ~ } }
54
+ $$
55
+
56
+ Therefore, uni-modal encoders are trained, so that their distributions $q _ { \phi _ { a } }$ and $q _ { \phi _ { b } }$ are close to a multimodal encoder $q _ { \phi _ { \mathrm { a b } } }$ in order to build a coherent posterior distribution. The introduced regularization by Suzuki et al. (2017) puts learning pressure on the uni-modal encoders just by the distributions’ shape, disregarding reconstruction capabilities and the prior $p ( z )$ . Furthermore, one can show that deriving the ELBO from the VI for a set of $\mathcal { M }$ observable modalities, always leads to an expression of the ELBO that allows only training of $\widetilde { \mathcal { M } } = \{ m | m \in \mathcal { P } ( \mathcal { M } ) , | m | = | \mathcal { M } | - 1 \}$ modality combinations. This leads to the fact that for instance in a tri-modal setup, as shown in Fig. 1 (right), one can derive three bi-modal encoders from the VI, but no uni-modal ones.
57
+
58
+ # 3 MULTI-MODAL VARIATIONAL AUTO ENCODER APPROACH
59
+
60
+ While the objective of Wang et al. (2016), Ngiam et al. (2011), Suzuki et al. (2017), and Vedantam et al. (2017) is to exchange modalities bi-directionally (e.g. $a b ^ { \prime }$ ), our primary concern is twofold: First, find a meaningful posterior distribution where the sampled statistics of an encoder network allows inference about further actions. Second, find an expression to jointly train all $2 ^ { | { \mathcal { M } } | } { - } 1$ permutations of modality encoders.
61
+
62
+ By successively applying logarithm and Bayes rules, we derive the ELBO for the multi-modal VAE $( \dot { \mathbf { M } } ^ { 2 } \mathbf { V } \mathbf { A } \mathbf { E } )$ as follows: First, given the independent set of observable modalities $\mathcal { M } = \{ a , b , c , \ldots \}$ , its marginal log-likelihood $\dot { \log { p ( \mathcal { M } ) } } = : \dot { L _ { \mathrm { M } ^ { 2 } } }$ is multiplied by the cardinality of the set as the neutral element $1 = | \mathcal { M } | / | \mathcal { M } |$ . Second, applying logarithm multiplication rule, the nominator is written as the argument’s exponent. Third, Bayes rule is applied to each term wrt. the remaining observable modalities to derive their conditionals. Further, we bootstrap the derivation technique in a bi- and tri-modal (c.f. tri-modal case in Sec. 6.1) case to illustrate the advantages. By excessively applying the scheme until convergence of the mathematical expression, it leads for a bi-modal set $\mathcal { M } = \{ a , b \}$ to the following result:
63
+
64
+ $$
65
+ \begin{array} { r l } & { L _ { \mathrm { M } ^ { 2 } } = 2 / 2 \log p ( a , b ) = 1 / 2 \log p ( a , b ) ^ { 2 } = 1 / 2 \log p ( a , b ) p ( a , b ) = 1 / 2 \log p ( b ) p ( a | b ) p ( b | a ) p ( a ) } \\ & { \qquad = 1 / 2 ( \log p ( a ) + \log p ( b | a ) + \log p ( a | b ) + \log p ( b ) ) = 1 / 2 ( L _ { \mathrm { a } } + L _ { \mathrm { M } } + L _ { \mathrm { b } } ) } \end{array}
66
+ $$
67
+
68
+ This term can be written as inequality wrt. each ELBO of the marginals $L _ { \mathrm { a } } , L _ { \mathrm { b } }$ and conditionals $L _ { \mathrm { M } }$ :
69
+
70
+ $$
71
+ \begin{array} { r l } & { 2 L _ { \mathsf { M } ^ { 2 } } \geq 2 \mathcal { L } _ { \mathsf { M } ^ { 2 } } = \mathcal { L } _ { \mathsf { a } } + \mathcal { L } _ { \mathsf { b } } + \mathcal { L } _ { \mathsf { M } } = } \\ & { \ - \beta _ { \mathsf { a } } \mathrm { D } _ { \mathrm { K L } } ( q _ { \phi _ { \mathsf { a } } } ( z | a ) \| p ( z ) ) + \mathbb { E } _ { q _ { \phi _ { \mathsf { a } } } ( z | a ) } \log ( p _ { \theta _ { \mathsf { a } } } ( a | z ) ) } \\ & { \ - \beta _ { \mathsf { b } } \mathrm { D } _ { \mathrm { K L } } ( q _ { \phi _ { \mathsf { b } } } ( z | b ) \| p ( z ) ) + \mathbb { E } _ { q _ { \phi _ { \mathsf { b } } } ( z | b ) } \log ( p _ { \theta _ { \mathsf { b } } } ( b | z ) ) } \\ & { \ + \mathbb { E } _ { q _ { \phi _ { \mathsf { a b } } } ( z | a , b ) } \log ( p _ { \theta _ { \mathsf { a } } } ( a | z ) ) + \mathbb { E } _ { q _ { \phi _ { \mathsf { a b } } } ( z | a , b ) } \log ( p _ { \theta _ { \mathsf { b } } } ( b | z ) ) - \beta _ { \mathsf { a b } } \mathrm { D } _ { \mathrm { K L } } ( q _ { \phi _ { \mathsf { a b } } } ( z | a , b ) \| p ( z ) ) } \\ & { \ - \ \alpha \mathrm { D } _ { \mathrm { K L } } ( q _ { \phi _ { \mathsf { a b } } } ( z | a , b ) \| q _ { \phi _ { \mathsf { a } } } ( z | a ) ) - \alpha \mathrm { D } _ { \mathrm { K L } } ( q _ { \phi _ { \mathsf { a b } } } ( z | a , b ) \| q _ { \phi _ { \mathsf { b } } } ( z | b ) ) . } \end{array}
72
+ $$
73
+
74
+ Equation 6 is substituted by all formerly derived ELBO expressions lead to the combination of the uni-modal VAEs wrt. a and b (c.f. Eq. 7 to 8) and the JMVAE comprising the VAE wrt. the joint modality ab (c.f. Eq. 9) and mutual latent space (c.f. Eq. 10). Equation 7 and 8 have the effect that their regularizers care about the uni-modal distribution to deviate not too much from the common prior while their reconstruction term shapes the underlying embedding of the mutual latent space. We further apply the concept of $\beta$ -VAE (Higgins et al. (2016; 2017a); Burgess et al. (2018)) to the regularizers via $\beta _ { * }$ and adopt the factor $\alpha$ from Suzuki et al. (2017) for the mutual regularizer.
75
+
76
+ However, while $\beta$ -VAE have the property to disentangle the latent space, our main concern is the balance between the input and the latent space using a constant normalized factor $\beta _ { \mathrm { n o r m } } = \beta _ { * } D _ { * } / D _ { z }$ .
77
+
78
+ If the derivation, which we leave out for the sake of brevity, is applied to the log-likelihood LM2M of a set $\mathcal { M }$ , one can show that it results into a recursive form consisting of JMVAEs’ and ${ \bf M } ^ { 2 }$ VAEs’ log-likelihood terms
79
+
80
+ $$
81
+ L _ { \mathrm { M } ^ { 2 } , \mathrm { M } } = \frac { 1 } { | \mathcal { M } | } \left( L _ { \mathrm { M } , \mathrm { M } } + \sum _ { \widetilde { m } \in \widetilde { \mathcal { M } } } L _ { \mathrm { M } ^ { 2 } _ { \widetilde { m } } } \right) \geq \frac { 1 } { | \mathcal { M } | } \left( \mathcal { L } _ { \mathrm { M } , \mathrm { M } } + \sum _ { \widetilde { m } \in \widetilde { \mathcal { M } } } \mathcal { L } _ { \mathrm { M } ^ { 2 } _ { \widetilde { m } } } \right) = : \mathcal { L } _ { \mathrm { M } ^ { 2 } , \mathrm { M } } .
82
+ $$
83
+
84
+ While the derivation of Eq. 11 is given in Sec 6.1.3, the properties are as follows:
85
+
86
+ • the $\mathbf { M } ^ { 2 } \mathbf { V A E }$ consist out of $2 ^ { | { \mathcal { M } } | } - 1$ encoders and $| { \mathcal { M } } |$ decoders comprising all modality combinations
87
+ • while it also allows the bi-directional exchange of modalities, it further allows the setup of arbitrary modality combinations having 1 to $| { \mathcal { M } } |$ modalities
88
+ subsets of minor cardinality are weighted less and have a therefore minor impact in shaping the overall posterior distribution (vice versa, the major subsets dominate the shaping and the minor sets adapt to it)
89
+ • all encoder/decoder networks can jointly be trained using SGVB
90
+
91
+ # 4 DATA SETS
92
+
93
+ It is quite common in the multi-modal VAE community to model a bi-modal dataset as follows (Wang et al. (2016); Ngiam et al. (2011); Suzuki et al. (2017); Vedantam et al. (2017)): The first modality $a$ denotes the raw data and $b$ denotes the label (e.g. the digits’ images and labels as onehot vector wrt. the MNIST dataset). This is a rather artificial assumption and only sufficient when the objective is within a semi-supervised training framework. Real multi-modal data does not show this behavior as there are commonly multiple raw data inputs. Unfortunately, only complex multimodal datasets of heterogeneous sensor setups exist (Ofli et al. (2013); Udacity (2016); Kragh et al. (2017)), which makes a comprehensive evaluation for VAEs futile. On the other hand, creating own multi-modal datasets is exhaustive since training generative models either demand dense sampling or supervised signals to form a consistent latent manifold (Bengio et al. (2012)).
94
+
95
+ While na¨ıve consolidation of non-coherently datasets does not meet the conditions of data continuity, as discussed later, we propose a consolidation technique by sampling from superimposed latent spaces of various uni-modal trained CVAEs in Sec. 4.1. This approach allows the generation of multi-modal datasets from distinct and disconnected uni-modal sets. Second, we propose and bi-modal mixture of Gaussians (MoG) dataset to show particular behaviors of the various VAE approaches in Sec. 4.2.
96
+
97
+ # 4.1 MULTI-MODAL DATA GENERATION
98
+
99
+ Perry et al. (2010) state that Hebbian learning relies on the fact that the same objects are continuously transformed to their nearest neighbor in the observable space. Higgins et al. (2016) adopted this approach to their assumptions, that this notion can be generalized within the latent manifold learning. Further, neither a coherent manifold nor a proper factorization of the latent space can be trained if these assumptions are not fulfilled by the dataset. In summary, this means that observed data has to have the property of continues transformation wrt. to their properties (e.g. position and shape of an object), such that a small deviation of the observations results in proportional deviations in the latent space. We adopt this assumption for multi-modal datasets where observations should correlate if the same quantity is observed, such that a small deviation in the common latent representation between all modalities conducts a proportional impact in all observations. This becomes an actual fundamental requirement for any multi-modal dataset, as correlation and coherence are within the objective of multi-modal sensor fusion. In the following, we propose a technique to generate new multi-modal datasets, given different uni-modal enclosed sets which meet the former conditions.
100
+
101
+ A valuable property of the VAE’s learned posterior distribution is, that it matches the desired prior quite sufficiently if only a single class is observed. This characteristic can be found again in the conditional VAE (CVAE) Kingma et al. (2014); Sohn et al. (2015) as it’s training is supported by the ground truth labels of the observations. Thus, it actually builds non-related posterior distribution for each class label, where every distribution matches a given prior. Furthermore, we adopt the idea of $\beta$ -VAE Higgins et al. (2017b) which learns disentangled and factorized latent representations. Combining the properties of both advantages allows the superimposing of latent manifolds from various uni-modal encoders as shown in Fig. 2 (Top-Right). Now, latent samples can be drawn from the posterior to operate all CVAE encoders, with the desired label, to generate continues multi-modal data.
102
+
103
+ To test the approach we consolidate MNIST (LeCun Yann et al. (1998)) and fashion-MNIST (Xiao et al. (2017)) to an entangled-MNIST (e-MNIST) set by sampling from the prior (i.e. $z \sim \mathcal { N } ( 0 , \mathbf { I } ) )$ to generate observation tuples from the corresponding encoder networks $p _ { \theta _ { a } } ( a | z , C )$ and $p _ { \theta _ { b } } ( b | z , C )$ with class label $C$ . The network architecture is explained in Sec. 3. To avoid artifacts, only samples from within $2 \sigma$ of the prior are obtained.
104
+
105
+ Furthermore, we train a bi-modal JMVAE on the newly generated data to depict properties of the different datasets. We are aware of the fact that consolidation of uni-modal datasets cannot be achieved easily since continuity is hardly measurable. Therefore, na¨ıve consolidation results in a mixed dataset (i.e. mixed-MNIST) as shown in Fig. 2. To mimic this behavior and to achieve a fair comparison of the ELBO, we shuffle the generated fashion-MNIST per class label of e-MNIST to generate an equivalent mixed-e-MNIST (me-MNIST) set.
106
+
107
+ As shown in Fig. 2 (bottom), the JMVAE’s latent space reveals that for m-MNIST single clusters share the same mean as the best representative of a single label, but the variance of any uni-modal trained encoder remains orthogonal. Thus, the continuity in the observations does not correlate with each other by any means. On the other hand, the e-MNIST set with continues samples shows the desired behavior of multi-modal datasets as the JMVAE trains a coherent distribution for all uniand multi-modal encoders. These observations show that our proposed approach for generating new entangled datasets meet the formulated requirements of multi-modal datasets.
108
+
109
+ # 4.2 MOG-EXAMPLE
110
+
111
+ We investigate a Mixture-of-Gaussians (MoG) distribution, as depicted in Fig. 3, as bi-modal observations to mimic the output of e.g. feature extractors or classifiers. While they commonly already provide linear separable observations, we focus on ambiguity resolving properties of the VAE in particular.
112
+
113
+ The bi-modal $( a , b )$ observations of Mixture-of-Gaussians have ten classes $( 0 , \ldots , 9 )$ each. $a$ ’s observations are organized on a grid where (5,6,7) and (0,8) result in ambiguous observations by sharing the same mean. $b$ ’s observations are organized on a circle where (0,9) have ambiguous mean values.
114
+
115
+ This rather artificial experiment has the purpose to depict and evaluate ambiguous resolving properties of the VAEs. However, data of multi-modal sensor setups for complementary fusion show similar behavior, as various modalities are rectified to achieve a complete view of the scene (e.g. vision and grope to rectify objects). In that case, various dependencies of the generative process, given the class labels as factorized latent state representation $\boldsymbol { z } = ( z _ { 0 } , \ldots , z _ { 9 } )$ , are possible. This is mimicked by the MoG-Experiment, in a simplified assumption, as: $p ( a , b | z )$ , $p ( a | z _ { 1 } , \ldots , z _ { 4 } , z _ { 9 } )$ , and $p ( b | z _ { 1 } , \dots , z _ { 8 } )$ .
116
+
117
+ # 5 EXPERIMENTS
118
+
119
+ We apply the datasets explained in Sec. 4 to test and depict the capabilities of the $\mathbf { M } ^ { 2 } \mathbf { V } \mathbf { A } \mathbf { E }$ . First, we investigate the MoG data comprehensively. Second, we evaluate the ELBO of various approaches to the e-MNIST dataset. The VAEs are compared qualitatively, by visualizing the latent space, and quantitatively by performing lower bound tests $\mathcal { L } _ { \widetilde { \mathcal { M } } }$ for every subset ${ \widetilde { \mathcal { M } } } \subseteq { \mathcal { M } }$ wrt. to the decoding
120
+
121
+ ![](images/3fde56fef4ef0e262a8c7a57e4df4fa4876cb81377bafb36d490b67353ceb3bc.jpg)
122
+ Figure 2: Top-Left: Depiction of na¨ıve mixed MNIST (m-MNIST) vs. proposed entangled MNIST (e-MNIST). m-MNIST is pairwise plotted with the closest match of MNIST digits according to the mean-squared-error. The corresponding fashion-MNIST samples show no continuity nor correlation (despite the intended class correlation). e-MNIST shows the desired entanglement for changes of a single latent space factor. Top-Right: Latent space of the CVAE for the modalities $a$ (MNIST) and $b$ (fashion-MNIST). Bottom: Latent space of a trained JMVAE (c.f. Sec. 6.1.4). m-MNIST shows clear orthogonalization between modalities of the same class and segregation between classes (colorization is wrt. the CVAE legend). e-MNIST shows a coherently learned latent space between the uni- and multi-modal encoders. Thus, the JMVAE learns the correlation inside the dataset sufficiently $( \mathcal { L } _ { a , b | \mathrm { m e - M N I S T } } = - 2 0 4 . 4 8$ vs. $\mathcal { L } _ { a , b | \mathrm { e - M N I S T } } = - 1 9 9 . 2 3 )$ .
123
+
124
+ ![](images/a7223c8789eeaabca99004d5056ba2ab10424657bc3719f8d4f7ef0b1004cc14.jpg)
125
+ Figure 3: MoG input signals with for the modalities $a$ and $b$ . The depicted observations are sampled for the corresponding modality for each class.
126
+
127
+ of all modalities $p _ { \theta _ { \mathcal { M } } }$
128
+
129
+ $$
130
+ \mathcal { L } _ { \widetilde { M } } = \mathbb { E } _ { q _ { \phi _ { \widetilde { M } } } ( z | \widetilde { M } ) } \log \frac { p _ { \theta _ { \mathcal { M } } } ( \mathcal { M } | z ) p ( z ) } { q _ { \phi _ { \widetilde { M } } } \Big ( z | \widetilde { \mathcal { M } } \Big ) }
131
+ $$
132
+
133
+ with $p ( z ) = \mathcal { N } ( z ; \mathbf { 0 } , \mathbf { I } )$ . All VAE architectures can be found in Sec. 6.1.4.
134
+
135
+ ![](images/6c7f440aa21a2e2bfe8569e53318502b9458bb7b263a152ca1eb5d56572af077.jpg)
136
+ Figure 4: Latent space embeddings of the bi-modal MoG dataset by the three encoder networks of the $\mathbf { M } ^ { 2 } \mathbf { V } \mathbf { A } \mathbf { E }$ . Classes and ELBO colorization is depicted for various parameter settings of $\beta _ { * }$ and $\alpha$ .
137
+
138
+ # 5.1 MOG-EXPERIMENT
139
+
140
+ We evaluate the latent space with the premise in mind, that a good generative model should not just generate good data but also gives a good latent representation $z$ .
141
+
142
+ # 5.1.1 PARAMETRIZATION
143
+
144
+ We first investigate the impact of the parameter set $( \beta _ { * } , \alpha )$ on the $\mathbf { M } ^ { 2 } \mathbf { V } \mathbf { A } \mathbf { E }$ to find a latent space representation, which suits our needs to learn actions from it.
145
+
146
+ As the $\alpha$ parameter controls the mutual connection of all encoders in latent space, we found that a direct connection (i.e. $\alpha = 1 .$ ) puts too much learning pressure on matching the mutual latent distributions between uni- and multi-modal encoders. Thus, classes which should be separated in the multi-modal latent space collapse to the mean distributions of the uni-modal encoders. For $\alpha \lessapprox 1 0 ^ { - 2 }$ , the encoders are able to find an expressive latent space distribution by means of separable collapsed classes of uni-modal encoders, and expanded classes of multi-modal around it (c.f. Fig. 4 top/left).
147
+
148
+ By the findings of Higgins et al. (2017b), high $\beta$ values result in highly entangled factors in latent space whereas small normalized $\beta _ { \mathrm { n o r m } } \lessapprox 1 0 ^ { - 2 }$ show pretty robust disentanglement in all their test cases. The impact of $\beta$ shows similar behavior on the $\mathbf { M } ^ { 2 } \mathbf { V A E }$ and thus, we chose small $\beta$ values of $\beta _ { \mathrm { { n o r m } } } = 1 0 ^ { - 2 }$ to relax the learning pressure caused by the prior. While the over optimization wrt. to the prior leads to a fuzzy generation of data $p ( \mathcal { M } | z )$ and collapse in latent space, high relaxation $( \beta _ { \mathrm { { n o r m } } } \ll 1 0 ^ { - 3 } ,$ ) causes loss of expressiveness between uni- and multi-modal encoding of a single class by means of the difference in the ELBO.
149
+
150
+ It is worth noticing, that diverging $\beta$ parameters between multi- and uni-modal regularization (e.g. $\beta _ { \mathrm { a b } } \ll \beta _ { \mathrm { a } }$ or vice versa) results in lower ELBOs, but for the sake of expressiveness of latent embedding and the ELBO between encoders’ embeddings. We argue that learning pressure should be applied equally to all encoders so that they experience a similar learning impact.
151
+
152
+ Another observation results from the fact, that the reconstruction loss of the $\mathbf { M } ^ { 2 } \mathbf { V } \mathbf { A } \mathbf { E }$ ’s objective causes learning of mean representatives of classes in the observation space. This causes the artifact, that if for instance three classes exist in the output space, where one represents the overall mean, and an uni-modal encoder only sees the collapse of classes to that particular mean value, the latent encoding of this uni-modal encoder will collapse to the same mean as well. However, while it is not longer separable (not even non-linearly) in latent space by its mean value, the ELBO for the observation drives up and gives, therefore, evidence about the embedding quality. This insight might be fruitful in terms of epistemic (ambiguity-resolving) tasks, where for instance an unsupervised reinforcement learning approach could use the ELBO as a signal to learn epistemic exploration.
153
+
154
+ # 5.1.2 COMPARISION
155
+
156
+ ![](images/3ca44be7de39faa13d9ece6ac3a693d3b122b7582779c1af651ee299e04ecff7.jpg)
157
+ Figure 5: Bi-modal latent space embeddings by the three multi-modal VAEs JMVAE-Zero (left), tVAE (mid.), and ${ \bf M } ^ { 2 }$ VAE (right). The bi-modal input signals are an arrangement of the MoG distributions with ambiguities wrt. their mean values. The ELBO (colorization wrt. Figure 4) is estimated by Eq. 12 and is depicted qualitatively, as it can only be compared between encoders of the same approach.
158
+
159
+ Comparing the three approaches to estimate the multi-modal marginal log-likelihood by maximizing the ELBO, one can see from Fig. 5 that the most coherent latent space distribution was learned by the proposed $\mathbf { M } ^ { 2 } \mathbf { V } \mathbf { A } \mathbf { E }$ .
160
+
161
+ While the JMVAE-Zero learned similarities between $q _ { \phi _ { \mathrm { a b } } }$ and $q _ { \phi _ { \mathrm { a } } }$ , it learned a complete new embedding for the classes (1,2) with $q _ { \phi _ { \mathrm { b } } }$ (denoted by $( \mathbb { S } )$ ). Furthermore, the ELBO per embedding allows no conclusion between the embeddings of the various encoders.
162
+
163
+ The tVAE founds a much more coherent embedding between the encoders. This was achieved by the fact, that first the full multi-modal VAE, consisting out of the encoder $q _ { \phi _ { \mathrm { a b } } }$ and two decoder $p _ { \theta _ { \mathrm { a } } }$ and $p _ { \theta _ { \mathrm { b } } }$ , was trained. Second, the decoder weights are pinned to train the remaining uni-modal networks which enforces coherence. However, the ELBO per embedding also does not allow any direct conclusion between the embeddings of the various encoders. This is depicted by $( \sim )$ , where the multi-modal encoder $q _ { \phi _ { \mathrm { a b } } }$ produces embeddings of higher energy than these of the uni-modal ones. This can happen as there is no regularizer which enforces the variational distribution of the encoders to match each other and thus, the KL-divergence may differ between the models for similar encodings.
164
+
165
+ The $\mathbf { M } ^ { 2 } \mathbf { V } \mathbf { A } \mathbf { E }$ , on the other hand, enforces the encoders inherently to approximate the same posterior distribution which can be seen by the strong coherence between all embeddings. Furthermore, classes which are separated in the multi-modal latent embedding collapse to the mean values in the uni-modal ones as denoted by $( + )$ and $( - )$ . This behavior is also rendered by the ELBO. As the $\mathbf { M } ^ { 2 } \mathbf { V } \mathbf { A } \mathbf { E }$ makes ambiguous embeddings, the reconstruction loss drives up (c.f. $( * )$ and $( / ) ,$ ).
166
+
167
+ The embeddings also show an interesting fact about the class (0): As this class is only ambiguously detectable in the uni-modal case, all VAEs learn a linear separable and therefore unambiguous embedding if both modalities make an observation of this class (denoted by $( - )$ for the $\mathbf { M } ^ { 2 } \mathbf { V } \mathbf { A } \mathbf { E } )$ .
168
+
169
+ # 5.2 IN-PLACE SENSOR FUSION
170
+
171
+ Further, we introduce the concept of in-place sensor fusion using multi-modal VAEs. This approach is applicable in distributed active-sensing tasks where the latent space representation $z$ of observations $\mathcal { M } ^ { \prime }$ (i.e. an object or point of interest was observed by a set of modalities) can be interpreted as inverse sensor model (c.f. Thrun et al. (2005)). This compressed information can be efficiently transmitted between all sensing agents and also be updated as follows: $z$ can be unfolded to the original observation using the VAE’s decoder networks and combined with any new observation $m$ to update the information in-place $z \to z ^ { * }$ via
172
+
173
+ $$
174
+ q _ { \phi _ { m \perp } M ^ { \prime } } ( z ^ { * } | m , \mathcal { M } ^ { \prime } ) \quad \mathrm { { w i t h } } \quad \mathcal { M } ^ { \prime } = \bigcup _ { m ^ { \prime } i n \mathcal { M } ^ { \prime } } p _ { \theta _ { m ^ { \prime } } } ( m ^ { \prime } | z ) .
175
+ $$
176
+
177
+ However, a necessary requirement of Eq. 13 is that auto re-encoding (i.e. $z z$ via $q _ { \phi _ { \mathcal { M ^ { \prime } } } } ( z | \mathcal { M } ^ { \prime } ) )$ does not manipulate the information comprised by $z$ in an unrecoverable way (e.g. label-switching). Thus, we assume that VAEs tend to have a natural denoising characteristic (despite the explicit denoising Auto Encoders) which should re-encode any $z$ in a better version of its own by means of the reconstruction loss wrt. $z$ . This behavior is shown in Fig. 6 where we underlay the latent representation with the reconstruction loss of every particular $z$ . One can see the learned discrimination of the latent space by means of high entropy separating the clusters vicinity. Furthermore, initial $z$ values are auto re-encoded which draw the trajectories along their path in latent space. The observable properties of the VAE are that every seed converges to a fixed-point while performing descending steps on the latent space manifold. However, this statement is only valid in general for the proposed $\mathbf { M } ^ { 2 } \mathrm { V A E }$ , as the JMVAE-Zero and tVAE learn no or only similar coherent latent spaces between the encoder networks. Thus, seeds may be attracted by wrong attractors which makes these approach not sufficient for in-place sensor fusion.
178
+
179
+ ![](images/cd3afdd90f3c152430a31819ed88e5a41c5c82109378a3c0c2f71c49657f00d2.jpg)
180
+ Figure 6: From top to bottom: JMVAE-Zero, tVAE, and ${ \bf M } ^ { 2 }$ VAE. Left: Latent space representation with class colorization. Right: Corresponding colorization of the latent space for every $z$ obtained by auto re-encoding. White dots denote randomly drawn seeds which auto re-encoding steps are represented by the black trajectory. See Fig. 5 for legends.
181
+
182
+ # 5.3 E-MNIST EVALUATION
183
+
184
+ For this experiment, we estimated the ELBO by Eq. 12 to evaluate the performance of models JMVAE-Zero, tVAE, and $\mathbf { M } ^ { 2 } \mathbf { V } \mathbf { A } \mathbf { E }$ . We chose the model wrt. to the evaluation in Fig. 4 with $\beta _ { \mathrm { n o r m } } ~ = ~ 0 . 0 1$ which is $\beta _ { * } \approx 4$ for the given MNIST image dimension of $D _ { a } \ = \ | | \bar { ( 2 8 , 2 8 , 1 ) } | |$ and $D _ { z } = 2$ . However, Tbl. 1 shows quantitatively and Fig. 7 depicts qualitatively that the proposed $\mathbf { M } ^ { 2 } \mathbf { V } \mathbf { A } \mathbf { E }$ reaches the highest ELBO value, as well as it learns the most expressive latent space distribution. Furthermore, by sampling from the latent space for data generation, the $\mathbf { M } ^ { 2 } \mathbf { V } \mathbf { A } \mathbf { E }$ reveals crisp reconstructions in comparison to the other approaches.
185
+
186
+ Table 1: Evidence lower bound test for uni- and multi-modal setups of the VAEs (higher is better).
187
+
188
+ <table><tr><td colspan="3">M²VAE</td><td colspan="3">tVAE</td><td colspan="3">JMVAE-Zero</td></tr><tr><td>La,b</td><td>La</td><td>Lb</td><td>La.b</td><td>La</td><td>Lb</td><td>La,b</td><td>La</td><td>Lb</td></tr><tr><td>-10.75</td><td>-10.91</td><td>-16.01</td><td>-23.6</td><td>-101.28</td><td>-88.75</td><td>-24.19</td><td>-131.05</td><td>-99.71</td></tr></table>
189
+
190
+ ![](images/42bb0c94e113d1a4888761a38cf9b5cf7d34394b3ad721f22fd9ce8a0c19353f.jpg)
191
+ Figure 7: From top to bottom: JMVAE-Zero, tVAE, and $\mathbf { M } ^ { 2 } \mathbf { V } \mathbf { A } \mathbf { E }$ . Left: Latent space representation with class colorization. Right: Reconstruction from latent space by applying the corresponding decoder networks. $z$ is sampled linearly within $2 \sigma$ of the prior for all figures.
192
+
193
+ # 6 CONCLUSION
194
+
195
+ This work presents a novel multi-modal Variational Auto Encoder which is derived from the complete marginal joint log-likelihood. We showed that this expression can jointly be trained on an Mixture-of-Gaussian dataset with ambiguous observations, as well as on a complex dataset derived from MNIST and fashion-MNIST. Furthermore, we formulated requirements and characteristics for multi-modal data for sensor fusion and derived a technique to learn new datasets, namely the proposed entangled-MNIST, which suffice these requirements. Lastly, we developed the idea of in-place sensor fusion in distributed, active sensing scenarios and formulated the requirements, by means of auto re-encoding, to VAEs. This revealed the properties of VAEs, that they tend to denoise the observable data which leads to an attractor behavior in latent space. However, we performed all qualitative evaluations of the latent space with the premise in mind, that a good generative model should not just generate good data but also gives a good latent representation. This does also correlate with the quantitative behaviors, as our proposed model achieved the highest ELBO values. Future work will concentrate on the integration of the ambiguous resolving characteristics to an epistemic-exploration scenario.
196
+
197
+ # ACKNOWLEDGMENTS
198
+
199
+ This research was supported by ’CITEC’ (EXC 277) at Bielefeld University and the Federal Ministry of Education and Research (57388272). The responsibility for the content of this publication lies with the author.
200
+
201
+ # REFERENCES
202
+
203
+ Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation Learning: A Review and New Perspectives. (1993):1–30, 2012. ISSN 15324435. doi: 10.1145/1756006.1756025. URL http://arxiv.org/abs/1206.5538.
204
+ Christopher P. Burgess, Irina Higgins, Arka Pal, Loic Matthey, Nick Watters, Guillaume Desjardins, and Alexander Lerchner. Understanding disentangling in $\beta$ -VAE. (Nips), 2018. URL http: //arxiv.org/abs/1804.03599.
205
+ Cesar Cadena, Anthony Dick, and Ian D Reid. Multi-modal Auto-Encoders as Joint Estimators for Robotics Scene Understanding. In Nancy Amato, Siddhartha Srinivasa, Nora Ayanian, and Scott Kiundersma (eds.), Robotics: Science and System XIII, Cambridge, 2016. MIT Press. doi: 10.15607/RSS.2016.XII.041.
206
+ Irina Higgins, Loic Matthey, Xavier Glorot, Arka Pal, Benigno Uria, Charles Blundell, Shakir Mohamed, and Alexander Lerchner. Early Visual Concept Learning with Unsupervised Deep Learning. 2016. URL http://arxiv.org/abs/1606.05579.
207
+ Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, Alexander Lerchner, and Google Deepmind. beta-VAE: Learning Basic Visual Concepts with a Constrained Variational Framework. Iclr, (July):1–13, 2017a. URL https: //openreview.net/forum?id $=$ Sy2fzU9gl.
208
+ Irina Higgins, Arka Pal, Andrei A. Rusu, Loic Matthey, Christopher P Burgess, Alexander Pritzel, Matthew Botvinick, Charles Blundell, and Alexander Lerchner. DARLA: Improving Zero-Shot Transfer in Reinforcement Learning. 2017b. ISSN 1938-7228. URL http://arxiv.org/ abs/1707.08475.
209
+ Diederik P Kingma and Max Welling. Auto-Encoding Variational Bayes. CoRR, abs/1312.6, 2013. URL http://arxiv.org/abs/1312.6114.
210
+ Diederik P. Kingma, Danilo J. Rezende, Shakir Mohamed, and Max Welling. Semi-Supervised Learning with Deep Generative Models. pp. 1–9, 2014. ISSN 10495258. URL http: //arxiv.org/abs/1406.5298.
211
+ Mikkel Fly Kragh, Peter Christiansen, Morten Stigaard Laursen, Morten Larsen, Kim Arild Steen, Ole Green, Henrik Karstoft, and Rasmus Nyholm Jørgensen. FieldSAFE: Dataset for Obstacle Detection in Agriculture. Sensors, 17(11), 2017.
212
+ Hugo Larochelle, Dumitru Erhan, Aaron Courville, James Bergstra, and Yoshua Bengio. An Empirical Evaluation of Deep Architectures on Problems with Many Factors of Variation. In Proceedings of the 24th International Conference on Machine Learning, ICML ’07, pp. 473–480, New York, NY, USA, 2007. ACM. ISBN 978-1-59593-793-3. doi: 10.1145/1273496.1273556. URL http://doi.acm.org/10.1145/1273496.1273556.
213
+ LeCun Yann, Cortes Corinna, and Burges Christopher. THE MNIST DATABASE of handwritten digits. The Courant Institute of Mathematical Sciences, 1998.
214
+ Jiquan Ngiam, Aditya Khosla, Mingyu Kim, Juhan Nam, Honglak Lee, and Andrew Y Ng. Multimodal Deep Learning. Proceedings of The 28th International Conference on Machine Learning (ICML), 2011. ISSN 9781450306195. doi: 10.1145/2647868.2654931.
215
+
216
+ Ferda Ofli, Rizwan Chaudhry, Gregorij Kurillo, Rene Vidal, and Ruzena Bajcsy. Berkeley MHAD: A comprehensive Multimodal Human Action Database. In Proceedings of IEEE Workshop on Applications of Computer Vision, 2013. ISBN 9781467350532. doi: 10.1109/WACV.2013.6474999.
217
+
218
+ Gaurav Pandey and Ambedkar Dukkipati. Variational methods for conditional multimodal deep learning. Proceedings of the International Joint Conference on Neural Networks, 2017-May: 308–315, 2017. doi: 10.1109/IJCNN.2017.7965870.
219
+
220
+ G. Perry, E. T. Rolls, and S. M. Stringer. Continuous transformation learning of translation invariant representations. Experimental Brain Research, 204(2):255–270, 2010. ISSN 00144819. doi: 10.1007/s00221-010-2309-0.
221
+
222
+ Marc’Aurelio Ranzato, Christopher Poultney, Sumit Chopra, and Yann LeCun. Efficient Learning of Sparse Representations with an Energy-based Model. In Proceedings of the 19th International Conference on Neural Information Processing Systems, NIPS’06, pp. 1137–1144, Cambridge, MA, USA, 2006. MIT Press. URL http://dl.acm.org/citation.cfm?id= 2976456.2976599.
223
+
224
+ Kihyuk Sohn, Honglak Lee, and Xinchen Yan. Learning Structured Output Representation using Deep Conditional Generative Models. In C Cortes, N D Lawrence, D D Lee, M Sugiyama, and R Garnett (eds.), Advances in Neural Information Processing Systems 28, pp. 3483–3491. Curran Associates, Inc., 2015.
225
+
226
+ Masahiro Suzuki, Kotaro Nakayama, and Yutaka Matsuo. Joint multimodal learning with deep generative models. pp. 1–12, 2017.
227
+
228
+ Sebastian Thrun, Wolfram Burgard, and Dieter Fox. Probabilistic Robotics. MIT Press, Cambridge, Mass., 2005. ISBN 9780262201629.
229
+
230
+ Udacity. Self-Driving Car: Annotated Driving Dataset, 2016. URL https://github.com/ udacity/self-driving-car/tree/master/annotations.
231
+
232
+ Ramakrishna Vedantam, Ian Fischer, Jonathan Huang, and Kevin Murphy. Generative Models of Visually Grounded Imagination. pp. 1–21, 2017. URL http://arxiv.org/abs/1705. 10762.
233
+
234
+ Weiran Wang, Xinchen Yan, Honglak Lee, and Karen Livescu. Deep Variational Canonical Correlation Analysis. 1, 2016. URL http://arxiv.org/abs/1610.03454.
235
+
236
+ Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms. pp. 1–6, 2017. URL http://arxiv.org/abs/ 1708.07747.
237
+
238
+ # APPENDIX
239
+
240
+ # 6.1 EXTENSION TO THREE MODALITIES
241
+
242
+ The proposed, as well as approach by Suzuki et al. (2017), can be extended to multiple modalities $\mathcal { M } = \{ a , b , c \}$ . The conditional marginal log-likelihood of $a$ can be written as
243
+
244
+ $$
245
+ \begin{array} { r } { \log p ( a | b , c ) { = } \mathcal { L } _ { \widetilde { \mathrm { M } } _ { \mathrm { a } } } { + } \mathrm { D } _ { \mathrm { K L } } ( q ( z | \mathcal { M } ) \Vert p ( z | \mathcal { M } ) ) { \geq } \mathcal { L } _ { \widetilde { \mathrm { M } } _ { \mathrm { a } } } . } \end{array}
246
+ $$
247
+
248
+ # 6.1.1 JMVAE FOR THREE MODALITIES
249
+
250
+ The VI between a set of distributions $\mathcal { M }$ can be written as $\begin{array} { r } { - \mathbb { E } _ { p ( \mathcal { M } ) } \sum _ { m \in \mathcal { M } } \log p ( m | \mathcal { M } \setminus m ) } \end{array}$ , which leads to an expression of maximizing the ELBO of negative VI (c.f. Suzuki et al. (2017)). Following this approach, the log-likelihood $L _ { 3 \mathrm { M } }$ can be expressed by the ELBOs, by utilizing Eq. 14, of their conditionals and KL divergence:
251
+
252
+ $$
253
+ \begin{array} { r l } & { L _ { \mathrm { 3 M } } = \log p ( a | b , c ) + \log ( p ( b | a , c ) ) + \log ( p ( c | b , c ) ) } \\ & { \qquad \geq \mathcal { L } _ { \widetilde { \mathrm { M } } _ { \mathrm { a } } } + \mathcal { L } _ { \widetilde { \mathrm { M } } _ { \mathrm { b } } } + \mathcal { L } _ { \widetilde { \mathrm { M } } _ { \mathrm { c } } } } \\ & { \qquad \geq \mathcal { L } _ { \widetilde { \mathrm { J } } } - \mathrm { D } _ { \mathrm { K L } } ( q ( z | a , b , c ) \| p ( z | b , c ) ) } \\ & { \qquad - \mathrm { D } _ { \mathrm { K L } } ( q ( z | a , b , c ) \| p ( z | a , c ) ) - \mathrm { D } _ { \mathrm { K L } } ( q ( z | a , b , c ) \| p ( z | b , c ) ) } \end{array}
254
+ $$
255
+
256
+ with $\mathcal { L } _ { \widetilde { \mathrm { J } } }$ being the joint ELBO of a joint probability $p ( \mathcal { M } )$ which expression is analog to Eq. 2.
257
+
258
+ # 6.1.2 $\mathbf { M } ^ { 2 } \mathbf { V } \mathbf { A } \mathbf { E }$ FOR THREE MODALITIES
259
+
260
+ Applying the proposed scheme to the joint log-likelihood of three modalities results in the following expression:
261
+
262
+ $$
263
+ \begin{array} { r l } & { L _ { 3 \mathrm { M } ^ { 2 } } } \\ & { = 3 / 3 \log p ( a , b , c ) = 1 / 3 \log p ( a , b , c ) ^ { 3 } } \\ & { = 3 / 3 \log p ( a , b , c ) p ( a , b , c ) p ( a , b , c ) } \\ & { = 1 / 3 \log p ( a , b ) p ( b , c ) p ( a , c ) p ( a | b , c ) p ( b | a , c ) p ( c | a , b ) } \\ & { = 1 / 3 ( \log ( p ( a , b ) ) + \log ( p ( b , c ) ) + \log ( p ( a , c ) ) } \\ & { \quad + \log p ( a | b , c ) + \log p ( b | a , c ) + \log p ( c | a , b ) ) } \\ & { = 1 / 3 ( 2 / 2 ( \log p ( a , b ) + \log p ( b , c ) + \log p ( a , c ) ) + L _ { 3 \mathrm { M } } ) } \\ & { = 1 / 6 \big ( \log p ( a , b ) ^ { 2 } + \log p ( b , c ) ^ { 2 } + \log p ( a , c ) ^ { 2 } \big ) + L _ { 3 \mathrm { M } / 3 } } \\ & { = 1 / 6 \big ( L _ { \mathrm { M } ^ { 2 } \mathrm { ~ * } } + L _ { \mathrm { M } _ { \mathrm { M } ^ { 2 } \mathrm { s } } } + L _ { \mathrm { M } ^ { 2 } \mathrm { s } } \big ) + 1 / 3 L _ { 3 \mathrm { M } } } \end{array}
264
+ $$
265
+
266
+ From here on, one can substitute all log-likelihoods given the expressions in Sec. 3 and ??, to derive the ELBO L3M2 .
267
+
268
+ # 6.1.3 ${ \bf M } ^ { 2 }$ VAE DERIVATION
269
+
270
+ $$
271
+ \begin{array} { r l } & { L _ { \mathrm { M } ^ { 2 } , \boldsymbol { \mathcal { M } } } = \log p ( \boldsymbol { \mathcal { M } } ) \stackrel { \mathrm { m u l } ~ , 1 } { = } \stackrel { | \mathcal { M } | / | \mathcal { M } | } { | \mathcal { M } | } \log p ( \boldsymbol { \mathcal { M } } ) \stackrel { \log . \mathrm { m u l } . } { = } 1 / | \mathcal { M } | \log p ( \boldsymbol { \mathcal { M } } ) \stackrel { | \mathcal { M } | } { = } } \\ & { \stackrel { \mathrm { B a y e s } ~ } { = } 1 / | \mathcal { M } | \displaystyle \sum _ { m \in \mathcal { M } } \log p ( \boldsymbol { \mathcal { M } } \setminus m ) p ( m | \mathcal { M } \setminus m ) } \\ & { \stackrel { \mathrm { l o g . a d d } } { = } 1 / | \mathcal { M } | \displaystyle \sum _ { m \in \mathcal { M } } \log p ( \boldsymbol { \mathcal { M } } \setminus m ) + \log p ( m | \mathcal { M } \setminus m ) } \end{array}
272
+ $$
273
+
274
+ The expression $\begin{array} { r } { \sum _ { m \in \mathcal { M } } \log p ( m | \mathcal { M } \setminus m ) } \end{array}$ is the general form of the marginal log-likelihood for the variation of information (VI), as introduced by Suzuki et al. (2017) for the JMVAE, for any set $\mathcal { M }$ . Thus, it can be directly substituted with $L _ { \mathrm { M } _ { \mathcal { M } } }$ . The expression $\textstyle \sum _ { m \in { \mathcal { M } } } \log p ( { \mathcal { M } } \setminus m )$ is the combination of all joint log-likelihoods of the subsets of $\mathcal { M }$ which have one less element. Therefore, this term can be rewritten as
275
+
276
+ $$
277
+ \sum _ { m \in \mathcal { M } } \log p ( \mathcal { M } \setminus m ) = \sum _ { \widetilde { m } \in \widetilde { \mathcal { M } } } \log p ( \widetilde { m } )
278
+ $$
279
+
280
+ with $\widetilde { \mathcal { M } } = \{ m | m \in \mathcal { P } ( \mathcal { M } ) , | m | = | \mathcal { M } | - 1 \}$ Finally, $\log p ( \widetilde { m } )$ can be substituted by $L _ { \mathrm { M } ^ { 2 } \widetilde { m } }$ without loss of generality. However, it is worth noticing that substitution stops at the end of recursion and therefore, all final expressions $\log p ( \widetilde { m } ) \forall | \widetilde { m } | \equiv 1$ remain. $\boxed { \begin{array} { r l } \end{array} }$
281
+
282
+ # 6.1.4 NETWORK ARCHITECTURE
283
+
284
+ We designed all VAEs such that the latent space prior is given by a Gaussian with unit variance. Furthermore, all VAEs sample from a Gaussian variational distribution that is parametrized by the encoder networks. A summary of all architectures used in this paper can be seen in Tbl. 2. The reconstruction loss for calculating the evidence lower bound was performed by binary cross-entropy (BCE) for the e-MNIST and root-mean-squared error (RMS) for the MoG experiment.
285
+
286
+ Furthermore, the CVAE for training the e-MNIST dataset is designed as depicted in Tbl. 3.
287
+
288
+ Table 2: Various VAE architectures and optimizers for the e-MNIST and MoG experiments. $\mathrm { { u m / m m } }$ stand for uni- and multi-modal while fc refers to fully-connected layers.
289
+
290
+ <table><tr><td>Issue</td><td>VAE</td><td>Optimizer</td><td colspan="2">VAEarchitecture</td><td></td></tr><tr><td>e-MNIST</td><td>JMVAE-Z.</td><td>adam</td><td>encoder decoder</td><td>fc 2x784-2x128-2x64-concat-64-2 (ReLU) fc 2x64-2x128-2x786 (tanh)</td><td rowspan="3"></td></tr><tr><td>e-MNIST</td><td>tVAE</td><td>adam</td><td>um enc. mm enc. decoder</td><td>fc 784-128-64-2 (ReLU) fc 2x784-2x128-2x64-concat-64-2 (ReLU) fc 2x64-2x128-2x786 (tanh)</td></tr><tr><td>e-MNIST</td><td>M²VAE</td><td>adam</td><td>um enc. mm enc. decoder</td><td>fc 784-128-64-2 (ReLU) fc 2x784-2x128-2x64-concat-64-2 (ReLU) fc 2x64-2x128-2x786 (tanh)</td></tr><tr><td>MoG</td><td>JMVAE-Z.</td><td>rmsprop</td><td>encoder decoder</td><td>fc 2x2-2x128-concat-64-2 (ReLU) fc 2x128-2x2 (tanh)</td><td rowspan="2"></td></tr><tr><td>MoG</td><td>tVAE</td><td>rmsprop</td><td>um enc. mm enc. decoder</td><td>fc 2x2-2x128-2x2 (ReLU) fc 2x2-2x128-concat-64-2 (ReLU) fc 2x128-2x2 (tanh)</td></tr><tr><td>MoG</td><td>M²VAE</td><td>rmsprop</td><td>um enc. mm enc. decoder</td><td></td><td>fc 2-128-2 (ReLU) fc 2x2-2x128-concat-64-2 (ReLU) fc 2x128-2x2 (tanh)</td></tr></table>
291
+
292
+ Table 3: CVAE architecture for each dataset MNIST and fashion-MNIST. The label as one-hotvector is concatenated after the convolution layers and fed into the fully-connected (fc) layers. For convolutional architectures the numbers in parenthesis indicate strides, while padding is always same.
293
+
294
+ <table><tr><td>encoder decoder</td><td>conv1x2x2-64x2x2(2)-64x3x3-64x3x3-concatlabelC-fc 128-2 concat label C-fc 128-deconv reverse of encoder (ReLU)</td></tr></table>
295
+
296
+ # CVAE architecture
parse/train/rJl8FoRcY7/rJl8FoRcY7_content_list.json ADDED
@@ -0,0 +1,1472 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "DEEP GENERATIVE MODELS FOR LEARNING COHERENT LATENT REPRESENTATIONS FROM MULTIMODAL DATA ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 821,
10
+ 171
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 195,
20
+ 398,
21
+ 223
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 261,
32
+ 544,
33
+ 275
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "The application of multi-modal generative models by means of a Variational Auto Encoder (VAE) is an upcoming research topic for sensor fusion and bi-directional modality exchange. This contribution gives insights into the learned joint latent representation and shows that expressiveness and coherence are decisive properties for multi-modal datasets. Furthermore, we propose a multi-modal VAE derived from the full joint marginal log-likelihood that is able to learn the most meaningful representation for ambiguous observations. Since the properties of multi-modal sensor setups are essential for our approach but hardly available, we also propose a technique to generate correlated datasets from uni-modal ones. ",
40
+ "bbox": [
41
+ 233,
42
+ 290,
43
+ 764,
44
+ 415
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 178,
54
+ 438,
55
+ 362,
56
+ 454
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Auto Encoder (AE), Variational Auto Encoder (VAE), and more recently Disentangled Variational Auto Encoder ( $\\beta$ -VAE) have a considerable impact on the field of data-driven leaning of generative models. Furthermore, recent investigations have shown the fruitful applicability to deep reinforcement learning (DRL) as well as bi-directionally exchange of multi-modal data. VAEs tend to encode the data into latent space features that are (ideally) linearly separable as shown by Higgins et al. (2017a). They also allow the discovery of generative joint models (e.g. Suzuki et al. (2017)), as well as zero-shot domain transfer in DRL as shown by Higgins et al. (2017b). ",
63
+ "bbox": [
64
+ 174,
65
+ 469,
66
+ 825,
67
+ 568
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "However, a good generative model should not just generate good data and achieve a good quantitative score, but also gives a coherent and expressive latent space representation. This property is decisive for multi-modal approaches if the data shows correlation, as it is the case for every sensor setup designed for sensor fusion. With this contribution, we investigate the characteristic of the latent space as well as the quantitative features for existing multi-modal VAEs. Furthermore, we propose a novel approach to build and train a novel multi-modal VAE $( \\mathbf { M } ^ { 2 } \\mathbf { V } \\mathbf { A } \\mathbf { E } )$ which comprises the complete marginal joint log-likelihood without simplifying assumptions. As our objective is the consideration of raw multi-modal sensor data, we also propose an approach to generate correlated multi-modal datasets from available uni-modal ones. Lastly, we draw connections to in-place sensor fusion and epistemic (ambiguity-resolving) active-sensing. ",
74
+ "bbox": [
75
+ 174,
76
+ 574,
77
+ 825,
78
+ 713
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Section 2 comprises the related work on multi-modal VAEs. Our comprehensive approach (i.e. $\\mathbf { M } ^ { 2 } \\mathbf { V A E } )$ is given in Sec. 3. Furthermore, we describe multi-modal datasets as well as the generation of correlated sets in Sec. 4 which are evaluated in Sec. 5. Finally, we conclude our work in Sec. 6. ",
85
+ "bbox": [
86
+ 176,
87
+ 719,
88
+ 825,
89
+ 762
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "2 RELATED WORK ",
96
+ "text_level": 1,
97
+ "bbox": [
98
+ 176,
99
+ 780,
100
+ 367,
101
+ 797
102
+ ],
103
+ "page_idx": 0
104
+ },
105
+ {
106
+ "type": "text",
107
+ "text": "Variational auto encoder (VAE) combine neural networks with variational inference to allow unsupervised learning of complicated distributions according to the graphical model shown in Figure 1 (left). A $D _ { a }$ -dimensional observation $a$ is modeled in terms of a $D _ { z }$ -dimensional latent vector $z$ using a probabilistic decoder $p _ { \\theta _ { \\mathrm { a } } } ( z )$ with parameters $\\theta$ . To generate the corresponding embedding $z$ from observation $a$ , a probabilistic encoder network with $q _ { \\phi _ { \\mathrm { a } } } ( z )$ is being provided which parametrizes the posterior distribution from which $z$ is sampled. The encoder and decoder, given by neural networks, are trained jointly to bring $a$ close to an $a ^ { \\prime }$ under the constraint that an approximate distribution needs to be close to a prior $p ( z )$ and hence inference is basically learned during training. ",
108
+ "bbox": [
109
+ 174,
110
+ 811,
111
+ 823,
112
+ 924
113
+ ],
114
+ "page_idx": 0
115
+ },
116
+ {
117
+ "type": "image",
118
+ "img_path": "images/3bdbe14ee048385f34f6f5509401d5d87873c034b014b26b98b4566ce55a17fd.jpg",
119
+ "image_caption": [
120
+ "Figure 1: Evolution of full uni-, bi-, and tri-modal VAEs comprising all modality permutations "
121
+ ],
122
+ "image_footnote": [],
123
+ "bbox": [
124
+ 303,
125
+ 98,
126
+ 683,
127
+ 219
128
+ ],
129
+ "page_idx": 1
130
+ },
131
+ {
132
+ "type": "text",
133
+ "text": "The specific objective of VAEs is the maximization of the marginal distribution $\\begin{array} { r l } { p ( a ) } & { { } = } \\end{array}$ $\\textstyle { \\int p _ { \\theta } ( { \\dot { a } } | z ) p ( z ) \\operatorname { d } { \\dot { a } } }$ . Because this distribution is intractable, the model is instead trained via stochastic gradient variational Bayes (SGVB) by maximizing the evidence lower bound (ELBO) $\\mathcal { L }$ of the marginal log-likelihood $\\log p ( a ) : = L _ { \\mathrm { a } }$ as ",
134
+ "bbox": [
135
+ 173,
136
+ 276,
137
+ 825,
138
+ 333
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "equation",
144
+ "img_path": "images/0206c556226106a1dcf097c4f20848bb9ae28a29a08ef5ea5c825c87ebdb3d1a.jpg",
145
+ "text": "$$\n\\begin{array} { r } { L _ { \\mathrm { a } } \\ge \\mathcal L = \\underbrace { - \\mathrm { D } _ { \\mathrm { K L } } \\big ( q _ { \\phi } ( z | a ) \\| p ( z ) \\big ) } _ { \\mathrm { R e g u l a r i z a t i o n } } + \\underbrace { { \\mathbb E } _ { q _ { \\phi } ( z | a ) } \\log \\bigl ( p _ { \\theta } ( a | z ) \\bigr ) } _ { \\mathrm { R e c o n s t r u c t i o n } } . } \\end{array}\n$$",
146
+ "text_format": "latex",
147
+ "bbox": [
148
+ 310,
149
+ 340,
150
+ 687,
151
+ 378
152
+ ],
153
+ "page_idx": 1
154
+ },
155
+ {
156
+ "type": "text",
157
+ "text": "This approach proposed by Kingma & Welling (2013) is used in settings where only a single modality $a$ is present in order to find a latent encoding $z$ (c.f. Figure 1 (left)). ",
158
+ "bbox": [
159
+ 174,
160
+ 386,
161
+ 823,
162
+ 415
163
+ ],
164
+ "page_idx": 1
165
+ },
166
+ {
167
+ "type": "text",
168
+ "text": "In the following chapters, we give a briefly comprise related work by means of multi-modal VAEs. Further, we stress the concept of two joint multi-modal approaches to derive the later proposed variational Auto Encoder (VAE). ",
169
+ "bbox": [
170
+ 174,
171
+ 420,
172
+ 825,
173
+ 463
174
+ ],
175
+ "page_idx": 1
176
+ },
177
+ {
178
+ "type": "text",
179
+ "text": "2.1 MULTI-MODAL AUTO ENCODER ",
180
+ "text_level": 1,
181
+ "bbox": [
182
+ 176,
183
+ 481,
184
+ 439,
185
+ 496
186
+ ],
187
+ "page_idx": 1
188
+ },
189
+ {
190
+ "type": "text",
191
+ "text": "Given a set of modalities $\\mathcal { M } = \\{ a , b , c , \\ldots \\}$ , multi-modal variants of Variational Auto Encoders (VAE) have been applied to train generative models for multi-directional reconstruction (i.e. generation of missing data) or feature extraction. Variants are conditional VAEs (CVAE) and conditional multi-modal autoencoders (CMMA), with the lack in bi-directional reconstruction (Sohn et al. (2015); Pandey & Dukkipati (2017)). BiVCCA by Wang et al. (2016) trains two VAEs together with interacting inference networks to facilitate two-way reconstruction with the lack of directly modeling the joint distribution. Models, that are derived from the variation of information (VI) with the objective to estimate the joint distribution with the capabilities of multi-directional reconstruction were recently introduced by Suzuki et al. (2017). Vedantam et al. (2017) introduce another objective for the bi-modal VAE, which they call the triplet ELBO (tVAE). Furthermore, multi-modal stacked Auto Encoders (AE) are a variant of combining the latent spaces of various AEs ( Larochelle et al. (2007); Ranzato et al. (2006)) which can also be applied to the reconstruction of missing modalities (Ngiam et al. (2011); Cadena et al. (2016)). However, while Suzuki et al. (2017) and Vedantam et al. (2017) argue that training of the full multi-modal VAE is intractable, because of the $2 ^ { | { \\mathcal { M } } | } - 1$ modality subsets of inference networks, we show that training the full joint model estimates the most expressive latent embeddings. ",
192
+ "bbox": [
193
+ 173,
194
+ 507,
195
+ 825,
196
+ 731
197
+ ],
198
+ "page_idx": 1
199
+ },
200
+ {
201
+ "type": "text",
202
+ "text": "2.1.1 JOINT MULTI-MODAL VARIATIONAL AUTO ENCODER ",
203
+ "text_level": 1,
204
+ "bbox": [
205
+ 173,
206
+ 747,
207
+ 601,
208
+ 762
209
+ ],
210
+ "page_idx": 1
211
+ },
212
+ {
213
+ "type": "text",
214
+ "text": "When more than one modality is available, e.g. $a$ and $b$ as shown in Figure 1 (mid.), the derivation of the ELBO ${ \\mathcal { L } } _ { \\mathrm { J } }$ for a marginal joint log-likelihood $\\log p ( a ) : = L _ { \\mathbf { J } }$ is straight forward: ",
215
+ "bbox": [
216
+ 174,
217
+ 771,
218
+ 825,
219
+ 801
220
+ ],
221
+ "page_idx": 1
222
+ },
223
+ {
224
+ "type": "equation",
225
+ "img_path": "images/b22b4673f7b877219c6fb45c2063b4d8f64ef497b6225a32dc19ebb5adc1ccf2.jpg",
226
+ "text": "$$\n\\begin{array} { r } { L _ { \\textup { J } } \\geq \\mathcal L _ { \\textup I } = \\underbrace { - \\textup D _ { \\mathrm { K L } } ( q _ { \\phi _ { \\Delta } } ( z | a , b ) \\| p ( z ) ) } _ { \\mathrm { R e g u l a r i z a t i o n } } + \\underbrace { \\mathbb E _ { q _ { \\phi _ { \\Delta } } ( z | a , b ) } \\log ( p _ { \\theta _ { \\mathrm { a } } } ( a | z ) ) } _ { \\mathrm { R e c o n s t r u c t i o n ~ w r t ~ } , a } + \\underbrace { \\mathbb E _ { q _ { \\phi _ { \\Delta } } ( z | a , b ) } \\log ( p _ { \\theta _ { \\mathrm { b } } } ( b | z ) ) } _ { \\mathrm { R e c o n s t r u c t i o n ~ w r t ~ } , b } } \\end{array}\n$$",
227
+ "text_format": "latex",
228
+ "bbox": [
229
+ 186,
230
+ 808,
231
+ 792,
232
+ 847
233
+ ],
234
+ "page_idx": 1
235
+ },
236
+ {
237
+ "type": "text",
238
+ "text": "However, it is not clear how to perform inference if the dataset consists of samples lacking from modalities (e.g. for samples $i$ and $k$ : $( a _ { i } , \\boldsymbol { \\mathcal { O } } )$ and $( \\emptyset , b _ { k } ) )$ ). Ngiam et al. (2011) propose training of a bimodal deep auto encoder using an augmented dataset with additional examples that have only a single-modality as input. We, therefore, name the resulting model of Eq. 2 joint multi-modal VAE-Zero (JMVAE-Zero). ",
239
+ "bbox": [
240
+ 174,
241
+ 853,
242
+ 825,
243
+ 924
244
+ ],
245
+ "page_idx": 1
246
+ },
247
+ {
248
+ "type": "text",
249
+ "text": "2.1.2 JOINT MULTI-MODAL VARIATIONAL AUTO ENCODER FROM VARIATION OFINFORMATION",
250
+ "bbox": [
251
+ 174,
252
+ 103,
253
+ 748,
254
+ 132
255
+ ],
256
+ "page_idx": 2
257
+ },
258
+ {
259
+ "type": "text",
260
+ "text": "While the former approach cannot directly be applied to missing modalities, Suzuki et al. (2017) propose a joint multi-modal VAE (JMVAE) that is trained via two uni-modal encoders and a bimodal en-/decoder which share one objective function derived from the variation of information (VI) of the marginal conditional log-likelihoods $\\log p ( a | b ) p ( b | a ) = : L _ { \\mathrm { M } }$ by optimizing the ELBO ${ \\mathcal { L } } _ { \\mathrm { M } }$ : ",
261
+ "bbox": [
262
+ 174,
263
+ 141,
264
+ 825,
265
+ 212
266
+ ],
267
+ "page_idx": 2
268
+ },
269
+ {
270
+ "type": "equation",
271
+ "img_path": "images/22d1fd6251058940551cb7b826a4349f54edc8396cdb0a155432c5baa7fc77a0.jpg",
272
+ "text": "$$\nL _ { \\mathrm { M } } \\ge \\mathcal { L } _ { \\mathrm { M } } \\ge \\mathcal { L } _ { \\mathrm { J } } - \\underbrace { \\mathrm { D } _ { \\mathrm { K L } } \\big ( q _ { \\phi _ { \\mathrm { a b } } } ( z | a , b ) \\| q _ { \\phi _ { \\mathrm { b } } } ( z | b ) \\big ) } _ { \\mathrm { U n i m o d a l ~ P D F ~ f u t i n g ~ o f ~ e n c o d e r ~ b } } - \\underbrace { \\mathrm { D } _ { \\mathrm { K L } } \\big ( q _ { \\phi _ { \\mathrm { a b } } } ( z | a , b ) \\| q _ { \\phi _ { \\mathrm { a } } } ( z | a ) \\big ) } _ { \\mathrm { U n i m o d a l ~ P D F ~ f i t i n g ~ o f ~ e n c o d e r ~ a ~ } }\n$$",
273
+ "text_format": "latex",
274
+ "bbox": [
275
+ 250,
276
+ 218,
277
+ 748,
278
+ 256
279
+ ],
280
+ "page_idx": 2
281
+ },
282
+ {
283
+ "type": "text",
284
+ "text": "Therefore, uni-modal encoders are trained, so that their distributions $q _ { \\phi _ { a } }$ and $q _ { \\phi _ { b } }$ are close to a multimodal encoder $q _ { \\phi _ { \\mathrm { a b } } }$ in order to build a coherent posterior distribution. The introduced regularization by Suzuki et al. (2017) puts learning pressure on the uni-modal encoders just by the distributions’ shape, disregarding reconstruction capabilities and the prior $p ( z )$ . Furthermore, one can show that deriving the ELBO from the VI for a set of $\\mathcal { M }$ observable modalities, always leads to an expression of the ELBO that allows only training of $\\widetilde { \\mathcal { M } } = \\{ m | m \\in \\mathcal { P } ( \\mathcal { M } ) , | m | = | \\mathcal { M } | - 1 \\}$ modality combinations. This leads to the fact that for instance in a tri-modal setup, as shown in Fig. 1 (right), one can derive three bi-modal encoders from the VI, but no uni-modal ones. ",
285
+ "bbox": [
286
+ 173,
287
+ 262,
288
+ 825,
289
+ 377
290
+ ],
291
+ "page_idx": 2
292
+ },
293
+ {
294
+ "type": "text",
295
+ "text": "3 MULTI-MODAL VARIATIONAL AUTO ENCODER APPROACH",
296
+ "text_level": 1,
297
+ "bbox": [
298
+ 174,
299
+ 397,
300
+ 694,
301
+ 414
302
+ ],
303
+ "page_idx": 2
304
+ },
305
+ {
306
+ "type": "text",
307
+ "text": "While the objective of Wang et al. (2016), Ngiam et al. (2011), Suzuki et al. (2017), and Vedantam et al. (2017) is to exchange modalities bi-directionally (e.g. $a b ^ { \\prime }$ ), our primary concern is twofold: First, find a meaningful posterior distribution where the sampled statistics of an encoder network allows inference about further actions. Second, find an expression to jointly train all $2 ^ { | { \\mathcal { M } } | } { - } 1$ permutations of modality encoders. ",
308
+ "bbox": [
309
+ 174,
310
+ 428,
311
+ 825,
312
+ 500
313
+ ],
314
+ "page_idx": 2
315
+ },
316
+ {
317
+ "type": "text",
318
+ "text": "By successively applying logarithm and Bayes rules, we derive the ELBO for the multi-modal VAE $( \\dot { \\mathbf { M } } ^ { 2 } \\mathbf { V } \\mathbf { A } \\mathbf { E } )$ as follows: First, given the independent set of observable modalities $\\mathcal { M } = \\{ a , b , c , \\ldots \\}$ , its marginal log-likelihood $\\dot { \\log { p ( \\mathcal { M } ) } } = : \\dot { L _ { \\mathrm { M } ^ { 2 } } }$ is multiplied by the cardinality of the set as the neutral element $1 = | \\mathcal { M } | / | \\mathcal { M } |$ . Second, applying logarithm multiplication rule, the nominator is written as the argument’s exponent. Third, Bayes rule is applied to each term wrt. the remaining observable modalities to derive their conditionals. Further, we bootstrap the derivation technique in a bi- and tri-modal (c.f. tri-modal case in Sec. 6.1) case to illustrate the advantages. By excessively applying the scheme until convergence of the mathematical expression, it leads for a bi-modal set $\\mathcal { M } = \\{ a , b \\}$ to the following result: ",
319
+ "bbox": [
320
+ 173,
321
+ 506,
322
+ 825,
323
+ 632
324
+ ],
325
+ "page_idx": 2
326
+ },
327
+ {
328
+ "type": "equation",
329
+ "img_path": "images/349e3d907b73dd88abf225daf2dd32e8b27078167f4670426dceb1d7e624f4fd.jpg",
330
+ "text": "$$\n\\begin{array} { r l } & { L _ { \\mathrm { M } ^ { 2 } } = 2 / 2 \\log p ( a , b ) = 1 / 2 \\log p ( a , b ) ^ { 2 } = 1 / 2 \\log p ( a , b ) p ( a , b ) = 1 / 2 \\log p ( b ) p ( a | b ) p ( b | a ) p ( a ) } \\\\ & { \\qquad = 1 / 2 ( \\log p ( a ) + \\log p ( b | a ) + \\log p ( a | b ) + \\log p ( b ) ) = 1 / 2 ( L _ { \\mathrm { a } } + L _ { \\mathrm { M } } + L _ { \\mathrm { b } } ) } \\end{array}\n$$",
331
+ "text_format": "latex",
332
+ "bbox": [
333
+ 183,
334
+ 637,
335
+ 794,
336
+ 678
337
+ ],
338
+ "page_idx": 2
339
+ },
340
+ {
341
+ "type": "text",
342
+ "text": "This term can be written as inequality wrt. each ELBO of the marginals $L _ { \\mathrm { a } } , L _ { \\mathrm { b } }$ and conditionals $L _ { \\mathrm { M } }$ : ",
343
+ "bbox": [
344
+ 174,
345
+ 688,
346
+ 825,
347
+ 717
348
+ ],
349
+ "page_idx": 2
350
+ },
351
+ {
352
+ "type": "equation",
353
+ "img_path": "images/436a3efab78cc870341eed5db6bd293963397b19f8125e5ba57933f78be003b0.jpg",
354
+ "text": "$$\n\\begin{array} { r l } & { 2 L _ { \\mathsf { M } ^ { 2 } } \\geq 2 \\mathcal { L } _ { \\mathsf { M } ^ { 2 } } = \\mathcal { L } _ { \\mathsf { a } } + \\mathcal { L } _ { \\mathsf { b } } + \\mathcal { L } _ { \\mathsf { M } } = } \\\\ & { \\ - \\beta _ { \\mathsf { a } } \\mathrm { D } _ { \\mathrm { K L } } ( q _ { \\phi _ { \\mathsf { a } } } ( z | a ) \\| p ( z ) ) + \\mathbb { E } _ { q _ { \\phi _ { \\mathsf { a } } } ( z | a ) } \\log ( p _ { \\theta _ { \\mathsf { a } } } ( a | z ) ) } \\\\ & { \\ - \\beta _ { \\mathsf { b } } \\mathrm { D } _ { \\mathrm { K L } } ( q _ { \\phi _ { \\mathsf { b } } } ( z | b ) \\| p ( z ) ) + \\mathbb { E } _ { q _ { \\phi _ { \\mathsf { b } } } ( z | b ) } \\log ( p _ { \\theta _ { \\mathsf { b } } } ( b | z ) ) } \\\\ & { \\ + \\mathbb { E } _ { q _ { \\phi _ { \\mathsf { a b } } } ( z | a , b ) } \\log ( p _ { \\theta _ { \\mathsf { a } } } ( a | z ) ) + \\mathbb { E } _ { q _ { \\phi _ { \\mathsf { a b } } } ( z | a , b ) } \\log ( p _ { \\theta _ { \\mathsf { b } } } ( b | z ) ) - \\beta _ { \\mathsf { a b } } \\mathrm { D } _ { \\mathrm { K L } } ( q _ { \\phi _ { \\mathsf { a b } } } ( z | a , b ) \\| p ( z ) ) } \\\\ & { \\ - \\ \\alpha \\mathrm { D } _ { \\mathrm { K L } } ( q _ { \\phi _ { \\mathsf { a b } } } ( z | a , b ) \\| q _ { \\phi _ { \\mathsf { a } } } ( z | a ) ) - \\alpha \\mathrm { D } _ { \\mathrm { K L } } ( q _ { \\phi _ { \\mathsf { a b } } } ( z | a , b ) \\| q _ { \\phi _ { \\mathsf { b } } } ( z | b ) ) . } \\end{array}\n$$",
355
+ "text_format": "latex",
356
+ "bbox": [
357
+ 215,
358
+ 722,
359
+ 781,
360
+ 823
361
+ ],
362
+ "page_idx": 2
363
+ },
364
+ {
365
+ "type": "text",
366
+ "text": "Equation 6 is substituted by all formerly derived ELBO expressions lead to the combination of the uni-modal VAEs wrt. a and b (c.f. Eq. 7 to 8) and the JMVAE comprising the VAE wrt. the joint modality ab (c.f. Eq. 9) and mutual latent space (c.f. Eq. 10). Equation 7 and 8 have the effect that their regularizers care about the uni-modal distribution to deviate not too much from the common prior while their reconstruction term shapes the underlying embedding of the mutual latent space. We further apply the concept of $\\beta$ -VAE (Higgins et al. (2016; 2017a); Burgess et al. (2018)) to the regularizers via $\\beta _ { * }$ and adopt the factor $\\alpha$ from Suzuki et al. (2017) for the mutual regularizer. ",
367
+ "bbox": [
368
+ 173,
369
+ 825,
370
+ 825,
371
+ 924
372
+ ],
373
+ "page_idx": 2
374
+ },
375
+ {
376
+ "type": "text",
377
+ "text": "However, while $\\beta$ -VAE have the property to disentangle the latent space, our main concern is the balance between the input and the latent space using a constant normalized factor $\\beta _ { \\mathrm { n o r m } } = \\beta _ { * } D _ { * } / D _ { z }$ . ",
378
+ "bbox": [
379
+ 171,
380
+ 103,
381
+ 823,
382
+ 132
383
+ ],
384
+ "page_idx": 3
385
+ },
386
+ {
387
+ "type": "text",
388
+ "text": "If the derivation, which we leave out for the sake of brevity, is applied to the log-likelihood LM2M of a set $\\mathcal { M }$ , one can show that it results into a recursive form consisting of JMVAEs’ and ${ \\bf M } ^ { 2 }$ VAEs’ log-likelihood terms ",
389
+ "bbox": [
390
+ 174,
391
+ 138,
392
+ 823,
393
+ 184
394
+ ],
395
+ "page_idx": 3
396
+ },
397
+ {
398
+ "type": "equation",
399
+ "img_path": "images/b6b1c2e8a832191e3420f948e58acc99635dc58c9a538d9e1918694d08f9c43b.jpg",
400
+ "text": "$$\nL _ { \\mathrm { M } ^ { 2 } , \\mathrm { M } } = \\frac { 1 } { | \\mathcal { M } | } \\left( L _ { \\mathrm { M } , \\mathrm { M } } + \\sum _ { \\widetilde { m } \\in \\widetilde { \\mathcal { M } } } L _ { \\mathrm { M } ^ { 2 } _ { \\widetilde { m } } } \\right) \\geq \\frac { 1 } { | \\mathcal { M } | } \\left( \\mathcal { L } _ { \\mathrm { M } , \\mathrm { M } } + \\sum _ { \\widetilde { m } \\in \\widetilde { \\mathcal { M } } } \\mathcal { L } _ { \\mathrm { M } ^ { 2 } _ { \\widetilde { m } } } \\right) = : \\mathcal { L } _ { \\mathrm { M } ^ { 2 } , \\mathrm { M } } .\n$$",
401
+ "text_format": "latex",
402
+ "bbox": [
403
+ 212,
404
+ 190,
405
+ 758,
406
+ 242
407
+ ],
408
+ "page_idx": 3
409
+ },
410
+ {
411
+ "type": "text",
412
+ "text": "While the derivation of Eq. 11 is given in Sec 6.1.3, the properties are as follows: ",
413
+ "bbox": [
414
+ 173,
415
+ 256,
416
+ 707,
417
+ 272
418
+ ],
419
+ "page_idx": 3
420
+ },
421
+ {
422
+ "type": "text",
423
+ "text": "• the $\\mathbf { M } ^ { 2 } \\mathbf { V A E }$ consist out of $2 ^ { | { \\mathcal { M } } | } - 1$ encoders and $| { \\mathcal { M } } |$ decoders comprising all modality combinations \n• while it also allows the bi-directional exchange of modalities, it further allows the setup of arbitrary modality combinations having 1 to $| { \\mathcal { M } } |$ modalities \nsubsets of minor cardinality are weighted less and have a therefore minor impact in shaping the overall posterior distribution (vice versa, the major subsets dominate the shaping and the minor sets adapt to it) \n• all encoder/decoder networks can jointly be trained using SGVB ",
424
+ "bbox": [
425
+ 215,
426
+ 284,
427
+ 825,
428
+ 416
429
+ ],
430
+ "page_idx": 3
431
+ },
432
+ {
433
+ "type": "text",
434
+ "text": "4 DATA SETS ",
435
+ "text_level": 1,
436
+ "bbox": [
437
+ 174,
438
+ 435,
439
+ 300,
440
+ 453
441
+ ],
442
+ "page_idx": 3
443
+ },
444
+ {
445
+ "type": "text",
446
+ "text": "It is quite common in the multi-modal VAE community to model a bi-modal dataset as follows (Wang et al. (2016); Ngiam et al. (2011); Suzuki et al. (2017); Vedantam et al. (2017)): The first modality $a$ denotes the raw data and $b$ denotes the label (e.g. the digits’ images and labels as onehot vector wrt. the MNIST dataset). This is a rather artificial assumption and only sufficient when the objective is within a semi-supervised training framework. Real multi-modal data does not show this behavior as there are commonly multiple raw data inputs. Unfortunately, only complex multimodal datasets of heterogeneous sensor setups exist (Ofli et al. (2013); Udacity (2016); Kragh et al. (2017)), which makes a comprehensive evaluation for VAEs futile. On the other hand, creating own multi-modal datasets is exhaustive since training generative models either demand dense sampling or supervised signals to form a consistent latent manifold (Bengio et al. (2012)). ",
447
+ "bbox": [
448
+ 173,
449
+ 468,
450
+ 825,
451
+ 608
452
+ ],
453
+ "page_idx": 3
454
+ },
455
+ {
456
+ "type": "text",
457
+ "text": "While na¨ıve consolidation of non-coherently datasets does not meet the conditions of data continuity, as discussed later, we propose a consolidation technique by sampling from superimposed latent spaces of various uni-modal trained CVAEs in Sec. 4.1. This approach allows the generation of multi-modal datasets from distinct and disconnected uni-modal sets. Second, we propose and bi-modal mixture of Gaussians (MoG) dataset to show particular behaviors of the various VAE approaches in Sec. 4.2. ",
458
+ "bbox": [
459
+ 174,
460
+ 614,
461
+ 825,
462
+ 698
463
+ ],
464
+ "page_idx": 3
465
+ },
466
+ {
467
+ "type": "text",
468
+ "text": "4.1 MULTI-MODAL DATA GENERATION ",
469
+ "text_level": 1,
470
+ "bbox": [
471
+ 176,
472
+ 717,
473
+ 460,
474
+ 731
475
+ ],
476
+ "page_idx": 3
477
+ },
478
+ {
479
+ "type": "text",
480
+ "text": "Perry et al. (2010) state that Hebbian learning relies on the fact that the same objects are continuously transformed to their nearest neighbor in the observable space. Higgins et al. (2016) adopted this approach to their assumptions, that this notion can be generalized within the latent manifold learning. Further, neither a coherent manifold nor a proper factorization of the latent space can be trained if these assumptions are not fulfilled by the dataset. In summary, this means that observed data has to have the property of continues transformation wrt. to their properties (e.g. position and shape of an object), such that a small deviation of the observations results in proportional deviations in the latent space. We adopt this assumption for multi-modal datasets where observations should correlate if the same quantity is observed, such that a small deviation in the common latent representation between all modalities conducts a proportional impact in all observations. This becomes an actual fundamental requirement for any multi-modal dataset, as correlation and coherence are within the objective of multi-modal sensor fusion. In the following, we propose a technique to generate new multi-modal datasets, given different uni-modal enclosed sets which meet the former conditions. ",
481
+ "bbox": [
482
+ 174,
483
+ 743,
484
+ 825,
485
+ 922
486
+ ],
487
+ "page_idx": 3
488
+ },
489
+ {
490
+ "type": "text",
491
+ "text": "A valuable property of the VAE’s learned posterior distribution is, that it matches the desired prior quite sufficiently if only a single class is observed. This characteristic can be found again in the conditional VAE (CVAE) Kingma et al. (2014); Sohn et al. (2015) as it’s training is supported by the ground truth labels of the observations. Thus, it actually builds non-related posterior distribution for each class label, where every distribution matches a given prior. Furthermore, we adopt the idea of $\\beta$ -VAE Higgins et al. (2017b) which learns disentangled and factorized latent representations. Combining the properties of both advantages allows the superimposing of latent manifolds from various uni-modal encoders as shown in Fig. 2 (Top-Right). Now, latent samples can be drawn from the posterior to operate all CVAE encoders, with the desired label, to generate continues multi-modal data. ",
492
+ "bbox": [
493
+ 173,
494
+ 103,
495
+ 825,
496
+ 242
497
+ ],
498
+ "page_idx": 4
499
+ },
500
+ {
501
+ "type": "text",
502
+ "text": "To test the approach we consolidate MNIST (LeCun Yann et al. (1998)) and fashion-MNIST (Xiao et al. (2017)) to an entangled-MNIST (e-MNIST) set by sampling from the prior (i.e. $z \\sim \\mathcal { N } ( 0 , \\mathbf { I } ) )$ to generate observation tuples from the corresponding encoder networks $p _ { \\theta _ { a } } ( a | z , C )$ and $p _ { \\theta _ { b } } ( b | z , C )$ with class label $C$ . The network architecture is explained in Sec. 3. To avoid artifacts, only samples from within $2 \\sigma$ of the prior are obtained. ",
503
+ "bbox": [
504
+ 174,
505
+ 250,
506
+ 825,
507
+ 319
508
+ ],
509
+ "page_idx": 4
510
+ },
511
+ {
512
+ "type": "text",
513
+ "text": "Furthermore, we train a bi-modal JMVAE on the newly generated data to depict properties of the different datasets. We are aware of the fact that consolidation of uni-modal datasets cannot be achieved easily since continuity is hardly measurable. Therefore, na¨ıve consolidation results in a mixed dataset (i.e. mixed-MNIST) as shown in Fig. 2. To mimic this behavior and to achieve a fair comparison of the ELBO, we shuffle the generated fashion-MNIST per class label of e-MNIST to generate an equivalent mixed-e-MNIST (me-MNIST) set. ",
514
+ "bbox": [
515
+ 174,
516
+ 325,
517
+ 825,
518
+ 410
519
+ ],
520
+ "page_idx": 4
521
+ },
522
+ {
523
+ "type": "text",
524
+ "text": "As shown in Fig. 2 (bottom), the JMVAE’s latent space reveals that for m-MNIST single clusters share the same mean as the best representative of a single label, but the variance of any uni-modal trained encoder remains orthogonal. Thus, the continuity in the observations does not correlate with each other by any means. On the other hand, the e-MNIST set with continues samples shows the desired behavior of multi-modal datasets as the JMVAE trains a coherent distribution for all uniand multi-modal encoders. These observations show that our proposed approach for generating new entangled datasets meet the formulated requirements of multi-modal datasets. ",
525
+ "bbox": [
526
+ 174,
527
+ 416,
528
+ 825,
529
+ 515
530
+ ],
531
+ "page_idx": 4
532
+ },
533
+ {
534
+ "type": "text",
535
+ "text": "4.2 MOG-EXAMPLE ",
536
+ "text_level": 1,
537
+ "bbox": [
538
+ 176,
539
+ 546,
540
+ 328,
541
+ 560
542
+ ],
543
+ "page_idx": 4
544
+ },
545
+ {
546
+ "type": "text",
547
+ "text": "We investigate a Mixture-of-Gaussians (MoG) distribution, as depicted in Fig. 3, as bi-modal observations to mimic the output of e.g. feature extractors or classifiers. While they commonly already provide linear separable observations, we focus on ambiguity resolving properties of the VAE in particular. ",
548
+ "bbox": [
549
+ 174,
550
+ 579,
551
+ 823,
552
+ 635
553
+ ],
554
+ "page_idx": 4
555
+ },
556
+ {
557
+ "type": "text",
558
+ "text": "The bi-modal $( a , b )$ observations of Mixture-of-Gaussians have ten classes $( 0 , \\ldots , 9 )$ each. $a$ ’s observations are organized on a grid where (5,6,7) and (0,8) result in ambiguous observations by sharing the same mean. $b$ ’s observations are organized on a circle where (0,9) have ambiguous mean values. ",
559
+ "bbox": [
560
+ 176,
561
+ 641,
562
+ 823,
563
+ 684
564
+ ],
565
+ "page_idx": 4
566
+ },
567
+ {
568
+ "type": "text",
569
+ "text": "This rather artificial experiment has the purpose to depict and evaluate ambiguous resolving properties of the VAEs. However, data of multi-modal sensor setups for complementary fusion show similar behavior, as various modalities are rectified to achieve a complete view of the scene (e.g. vision and grope to rectify objects). In that case, various dependencies of the generative process, given the class labels as factorized latent state representation $\\boldsymbol { z } = ( z _ { 0 } , \\ldots , z _ { 9 } )$ , are possible. This is mimicked by the MoG-Experiment, in a simplified assumption, as: $p ( a , b | z )$ , $p ( a | z _ { 1 } , \\ldots , z _ { 4 } , z _ { 9 } )$ , and $p ( b | z _ { 1 } , \\dots , z _ { 8 } )$ . ",
570
+ "bbox": [
571
+ 174,
572
+ 690,
573
+ 825,
574
+ 790
575
+ ],
576
+ "page_idx": 4
577
+ },
578
+ {
579
+ "type": "text",
580
+ "text": "5 EXPERIMENTS ",
581
+ "text_level": 1,
582
+ "bbox": [
583
+ 176,
584
+ 824,
585
+ 326,
586
+ 840
587
+ ],
588
+ "page_idx": 4
589
+ },
590
+ {
591
+ "type": "text",
592
+ "text": "We apply the datasets explained in Sec. 4 to test and depict the capabilities of the $\\mathbf { M } ^ { 2 } \\mathbf { V } \\mathbf { A } \\mathbf { E }$ . First, we investigate the MoG data comprehensively. Second, we evaluate the ELBO of various approaches to the e-MNIST dataset. The VAEs are compared qualitatively, by visualizing the latent space, and quantitatively by performing lower bound tests $\\mathcal { L } _ { \\widetilde { \\mathcal { M } } }$ for every subset ${ \\widetilde { \\mathcal { M } } } \\subseteq { \\mathcal { M } }$ wrt. to the decoding ",
593
+ "bbox": [
594
+ 174,
595
+ 864,
596
+ 823,
597
+ 925
598
+ ],
599
+ "page_idx": 4
600
+ },
601
+ {
602
+ "type": "image",
603
+ "img_path": "images/3fde56fef4ef0e262a8c7a57e4df4fa4876cb81377bafb36d490b67353ceb3bc.jpg",
604
+ "image_caption": [
605
+ "Figure 2: Top-Left: Depiction of na¨ıve mixed MNIST (m-MNIST) vs. proposed entangled MNIST (e-MNIST). m-MNIST is pairwise plotted with the closest match of MNIST digits according to the mean-squared-error. The corresponding fashion-MNIST samples show no continuity nor correlation (despite the intended class correlation). e-MNIST shows the desired entanglement for changes of a single latent space factor. Top-Right: Latent space of the CVAE for the modalities $a$ (MNIST) and $b$ (fashion-MNIST). Bottom: Latent space of a trained JMVAE (c.f. Sec. 6.1.4). m-MNIST shows clear orthogonalization between modalities of the same class and segregation between classes (colorization is wrt. the CVAE legend). e-MNIST shows a coherently learned latent space between the uni- and multi-modal encoders. Thus, the JMVAE learns the correlation inside the dataset sufficiently $( \\mathcal { L } _ { a , b | \\mathrm { m e - M N I S T } } = - 2 0 4 . 4 8$ vs. $\\mathcal { L } _ { a , b | \\mathrm { e - M N I S T } } = - 1 9 9 . 2 3 )$ . "
606
+ ],
607
+ "image_footnote": [],
608
+ "bbox": [
609
+ 207,
610
+ 99,
611
+ 794,
612
+ 428
613
+ ],
614
+ "page_idx": 5
615
+ },
616
+ {
617
+ "type": "image",
618
+ "img_path": "images/a7223c8789eeaabca99004d5056ba2ab10424657bc3719f8d4f7ef0b1004cc14.jpg",
619
+ "image_caption": [
620
+ "Figure 3: MoG input signals with for the modalities $a$ and $b$ . The depicted observations are sampled for the corresponding modality for each class. "
621
+ ],
622
+ "image_footnote": [],
623
+ "bbox": [
624
+ 349,
625
+ 614,
626
+ 650,
627
+ 731
628
+ ],
629
+ "page_idx": 5
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "of all modalities $p _ { \\theta _ { \\mathcal { M } } }$ ",
634
+ "bbox": [
635
+ 173,
636
+ 814,
637
+ 318,
638
+ 829
639
+ ],
640
+ "page_idx": 5
641
+ },
642
+ {
643
+ "type": "equation",
644
+ "img_path": "images/47ad7828d09756d49b4a7aeaa6ee868a68679d4e336601b571acde198e571e83.jpg",
645
+ "text": "$$\n\\mathcal { L } _ { \\widetilde { M } } = \\mathbb { E } _ { q _ { \\phi _ { \\widetilde { M } } } ( z | \\widetilde { M } ) } \\log \\frac { p _ { \\theta _ { \\mathcal { M } } } ( \\mathcal { M } | z ) p ( z ) } { q _ { \\phi _ { \\widetilde { M } } } \\Big ( z | \\widetilde { \\mathcal { M } } \\Big ) }\n$$",
646
+ "text_format": "latex",
647
+ "bbox": [
648
+ 369,
649
+ 847,
650
+ 627,
651
+ 890
652
+ ],
653
+ "page_idx": 5
654
+ },
655
+ {
656
+ "type": "text",
657
+ "text": "with $p ( z ) = \\mathcal { N } ( z ; \\mathbf { 0 } , \\mathbf { I } )$ . All VAE architectures can be found in Sec. 6.1.4. ",
658
+ "bbox": [
659
+ 173,
660
+ 909,
661
+ 656,
662
+ 924
663
+ ],
664
+ "page_idx": 5
665
+ },
666
+ {
667
+ "type": "image",
668
+ "img_path": "images/6c7f440aa21a2e2bfe8569e53318502b9458bb7b263a152ca1eb5d56572af077.jpg",
669
+ "image_caption": [
670
+ "Figure 4: Latent space embeddings of the bi-modal MoG dataset by the three encoder networks of the $\\mathbf { M } ^ { 2 } \\mathbf { V } \\mathbf { A } \\mathbf { E }$ . Classes and ELBO colorization is depicted for various parameter settings of $\\beta _ { * }$ and $\\alpha$ . "
671
+ ],
672
+ "image_footnote": [],
673
+ "bbox": [
674
+ 179,
675
+ 94,
676
+ 805,
677
+ 448
678
+ ],
679
+ "page_idx": 6
680
+ },
681
+ {
682
+ "type": "text",
683
+ "text": "5.1 MOG-EXPERIMENT ",
684
+ "text_level": 1,
685
+ "bbox": [
686
+ 174,
687
+ 518,
688
+ 351,
689
+ 534
690
+ ],
691
+ "page_idx": 6
692
+ },
693
+ {
694
+ "type": "text",
695
+ "text": "We evaluate the latent space with the premise in mind, that a good generative model should not just generate good data but also gives a good latent representation $z$ . ",
696
+ "bbox": [
697
+ 174,
698
+ 547,
699
+ 823,
700
+ 575
701
+ ],
702
+ "page_idx": 6
703
+ },
704
+ {
705
+ "type": "text",
706
+ "text": "5.1.1 PARAMETRIZATION ",
707
+ "text_level": 1,
708
+ "bbox": [
709
+ 176,
710
+ 597,
711
+ 362,
712
+ 611
713
+ ],
714
+ "page_idx": 6
715
+ },
716
+ {
717
+ "type": "text",
718
+ "text": "We first investigate the impact of the parameter set $( \\beta _ { * } , \\alpha )$ on the $\\mathbf { M } ^ { 2 } \\mathbf { V } \\mathbf { A } \\mathbf { E }$ to find a latent space representation, which suits our needs to learn actions from it. ",
719
+ "bbox": [
720
+ 176,
721
+ 623,
722
+ 823,
723
+ 651
724
+ ],
725
+ "page_idx": 6
726
+ },
727
+ {
728
+ "type": "text",
729
+ "text": "As the $\\alpha$ parameter controls the mutual connection of all encoders in latent space, we found that a direct connection (i.e. $\\alpha = 1 .$ ) puts too much learning pressure on matching the mutual latent distributions between uni- and multi-modal encoders. Thus, classes which should be separated in the multi-modal latent space collapse to the mean distributions of the uni-modal encoders. For $\\alpha \\lessapprox 1 0 ^ { - 2 }$ , the encoders are able to find an expressive latent space distribution by means of separable collapsed classes of uni-modal encoders, and expanded classes of multi-modal around it (c.f. Fig. 4 top/left). ",
730
+ "bbox": [
731
+ 174,
732
+ 659,
733
+ 825,
734
+ 756
735
+ ],
736
+ "page_idx": 6
737
+ },
738
+ {
739
+ "type": "text",
740
+ "text": "By the findings of Higgins et al. (2017b), high $\\beta$ values result in highly entangled factors in latent space whereas small normalized $\\beta _ { \\mathrm { n o r m } } \\lessapprox 1 0 ^ { - 2 }$ show pretty robust disentanglement in all their test cases. The impact of $\\beta$ shows similar behavior on the $\\mathbf { M } ^ { 2 } \\mathbf { V A E }$ and thus, we chose small $\\beta$ values of $\\beta _ { \\mathrm { { n o r m } } } = 1 0 ^ { - 2 }$ to relax the learning pressure caused by the prior. While the over optimization wrt. to the prior leads to a fuzzy generation of data $p ( \\mathcal { M } | z )$ and collapse in latent space, high relaxation $( \\beta _ { \\mathrm { { n o r m } } } \\ll 1 0 ^ { - 3 } ,$ ) causes loss of expressiveness between uni- and multi-modal encoding of a single class by means of the difference in the ELBO. ",
741
+ "bbox": [
742
+ 174,
743
+ 762,
744
+ 825,
745
+ 861
746
+ ],
747
+ "page_idx": 6
748
+ },
749
+ {
750
+ "type": "text",
751
+ "text": "It is worth noticing, that diverging $\\beta$ parameters between multi- and uni-modal regularization (e.g. $\\beta _ { \\mathrm { a b } } \\ll \\beta _ { \\mathrm { a } }$ or vice versa) results in lower ELBOs, but for the sake of expressiveness of latent embedding and the ELBO between encoders’ embeddings. We argue that learning pressure should be applied equally to all encoders so that they experience a similar learning impact. ",
752
+ "bbox": [
753
+ 174,
754
+ 867,
755
+ 823,
756
+ 924
757
+ ],
758
+ "page_idx": 6
759
+ },
760
+ {
761
+ "type": "text",
762
+ "text": "Another observation results from the fact, that the reconstruction loss of the $\\mathbf { M } ^ { 2 } \\mathbf { V } \\mathbf { A } \\mathbf { E }$ ’s objective causes learning of mean representatives of classes in the observation space. This causes the artifact, that if for instance three classes exist in the output space, where one represents the overall mean, and an uni-modal encoder only sees the collapse of classes to that particular mean value, the latent encoding of this uni-modal encoder will collapse to the same mean as well. However, while it is not longer separable (not even non-linearly) in latent space by its mean value, the ELBO for the observation drives up and gives, therefore, evidence about the embedding quality. This insight might be fruitful in terms of epistemic (ambiguity-resolving) tasks, where for instance an unsupervised reinforcement learning approach could use the ELBO as a signal to learn epistemic exploration. ",
763
+ "bbox": [
764
+ 173,
765
+ 103,
766
+ 825,
767
+ 229
768
+ ],
769
+ "page_idx": 7
770
+ },
771
+ {
772
+ "type": "text",
773
+ "text": "5.1.2 COMPARISION ",
774
+ "text_level": 1,
775
+ "bbox": [
776
+ 174,
777
+ 250,
778
+ 328,
779
+ 263
780
+ ],
781
+ "page_idx": 7
782
+ },
783
+ {
784
+ "type": "image",
785
+ "img_path": "images/3ca44be7de39faa13d9ece6ac3a693d3b122b7582779c1af651ee299e04ecff7.jpg",
786
+ "image_caption": [
787
+ "Figure 5: Bi-modal latent space embeddings by the three multi-modal VAEs JMVAE-Zero (left), tVAE (mid.), and ${ \\bf M } ^ { 2 }$ VAE (right). The bi-modal input signals are an arrangement of the MoG distributions with ambiguities wrt. their mean values. The ELBO (colorization wrt. Figure 4) is estimated by Eq. 12 and is depicted qualitatively, as it can only be compared between encoders of the same approach. "
788
+ ],
789
+ "image_footnote": [],
790
+ "bbox": [
791
+ 171,
792
+ 281,
793
+ 825,
794
+ 544
795
+ ],
796
+ "page_idx": 7
797
+ },
798
+ {
799
+ "type": "text",
800
+ "text": "Comparing the three approaches to estimate the multi-modal marginal log-likelihood by maximizing the ELBO, one can see from Fig. 5 that the most coherent latent space distribution was learned by the proposed $\\mathbf { M } ^ { 2 } \\mathbf { V } \\mathbf { A } \\mathbf { E }$ . ",
801
+ "bbox": [
802
+ 174,
803
+ 651,
804
+ 825,
805
+ 693
806
+ ],
807
+ "page_idx": 7
808
+ },
809
+ {
810
+ "type": "text",
811
+ "text": "While the JMVAE-Zero learned similarities between $q _ { \\phi _ { \\mathrm { a b } } }$ and $q _ { \\phi _ { \\mathrm { a } } }$ , it learned a complete new embedding for the classes (1,2) with $q _ { \\phi _ { \\mathrm { b } } }$ (denoted by $( \\mathbb { S } )$ ). Furthermore, the ELBO per embedding allows no conclusion between the embeddings of the various encoders. ",
812
+ "bbox": [
813
+ 174,
814
+ 700,
815
+ 823,
816
+ 742
817
+ ],
818
+ "page_idx": 7
819
+ },
820
+ {
821
+ "type": "text",
822
+ "text": "The tVAE founds a much more coherent embedding between the encoders. This was achieved by the fact, that first the full multi-modal VAE, consisting out of the encoder $q _ { \\phi _ { \\mathrm { a b } } }$ and two decoder $p _ { \\theta _ { \\mathrm { a } } }$ and $p _ { \\theta _ { \\mathrm { b } } }$ , was trained. Second, the decoder weights are pinned to train the remaining uni-modal networks which enforces coherence. However, the ELBO per embedding also does not allow any direct conclusion between the embeddings of the various encoders. This is depicted by $( \\sim )$ , where the multi-modal encoder $q _ { \\phi _ { \\mathrm { a b } } }$ produces embeddings of higher energy than these of the uni-modal ones. This can happen as there is no regularizer which enforces the variational distribution of the encoders to match each other and thus, the KL-divergence may differ between the models for similar encodings. ",
823
+ "bbox": [
824
+ 173,
825
+ 750,
826
+ 825,
827
+ 875
828
+ ],
829
+ "page_idx": 7
830
+ },
831
+ {
832
+ "type": "text",
833
+ "text": "The $\\mathbf { M } ^ { 2 } \\mathbf { V } \\mathbf { A } \\mathbf { E }$ , on the other hand, enforces the encoders inherently to approximate the same posterior distribution which can be seen by the strong coherence between all embeddings. Furthermore, classes which are separated in the multi-modal latent embedding collapse to the mean values in the uni-modal ones as denoted by $( + )$ and $( - )$ . This behavior is also rendered by the ELBO. As the $\\mathbf { M } ^ { 2 } \\mathbf { V } \\mathbf { A } \\mathbf { E }$ makes ambiguous embeddings, the reconstruction loss drives up (c.f. $( * )$ and $( / ) ,$ ). ",
834
+ "bbox": [
835
+ 176,
836
+ 882,
837
+ 823,
838
+ 924
839
+ ],
840
+ "page_idx": 7
841
+ },
842
+ {
843
+ "type": "text",
844
+ "text": "",
845
+ "bbox": [
846
+ 171,
847
+ 103,
848
+ 823,
849
+ 132
850
+ ],
851
+ "page_idx": 8
852
+ },
853
+ {
854
+ "type": "text",
855
+ "text": "The embeddings also show an interesting fact about the class (0): As this class is only ambiguously detectable in the uni-modal case, all VAEs learn a linear separable and therefore unambiguous embedding if both modalities make an observation of this class (denoted by $( - )$ for the $\\mathbf { M } ^ { 2 } \\mathbf { V } \\mathbf { A } \\mathbf { E } )$ . ",
856
+ "bbox": [
857
+ 176,
858
+ 138,
859
+ 823,
860
+ 181
861
+ ],
862
+ "page_idx": 8
863
+ },
864
+ {
865
+ "type": "text",
866
+ "text": "5.2 IN-PLACE SENSOR FUSION ",
867
+ "text_level": 1,
868
+ "bbox": [
869
+ 176,
870
+ 200,
871
+ 401,
872
+ 215
873
+ ],
874
+ "page_idx": 8
875
+ },
876
+ {
877
+ "type": "text",
878
+ "text": "Further, we introduce the concept of in-place sensor fusion using multi-modal VAEs. This approach is applicable in distributed active-sensing tasks where the latent space representation $z$ of observations $\\mathcal { M } ^ { \\prime }$ (i.e. an object or point of interest was observed by a set of modalities) can be interpreted as inverse sensor model (c.f. Thrun et al. (2005)). This compressed information can be efficiently transmitted between all sensing agents and also be updated as follows: $z$ can be unfolded to the original observation using the VAE’s decoder networks and combined with any new observation $m$ to update the information in-place $z \\to z ^ { * }$ via ",
879
+ "bbox": [
880
+ 173,
881
+ 227,
882
+ 825,
883
+ 325
884
+ ],
885
+ "page_idx": 8
886
+ },
887
+ {
888
+ "type": "equation",
889
+ "img_path": "images/f670154006204a8ebb20c8279e6f61ac3b3a2db1cb45cabf394fb8e3ce0e6141.jpg",
890
+ "text": "$$\nq _ { \\phi _ { m \\perp } M ^ { \\prime } } ( z ^ { * } | m , \\mathcal { M } ^ { \\prime } ) \\quad \\mathrm { { w i t h } } \\quad \\mathcal { M } ^ { \\prime } = \\bigcup _ { m ^ { \\prime } i n \\mathcal { M } ^ { \\prime } } p _ { \\theta _ { m ^ { \\prime } } } ( m ^ { \\prime } | z ) .\n$$",
891
+ "text_format": "latex",
892
+ "bbox": [
893
+ 313,
894
+ 334,
895
+ 684,
896
+ 369
897
+ ],
898
+ "page_idx": 8
899
+ },
900
+ {
901
+ "type": "text",
902
+ "text": "However, a necessary requirement of Eq. 13 is that auto re-encoding (i.e. $z z$ via $q _ { \\phi _ { \\mathcal { M ^ { \\prime } } } } ( z | \\mathcal { M } ^ { \\prime } ) )$ does not manipulate the information comprised by $z$ in an unrecoverable way (e.g. label-switching). Thus, we assume that VAEs tend to have a natural denoising characteristic (despite the explicit denoising Auto Encoders) which should re-encode any $z$ in a better version of its own by means of the reconstruction loss wrt. $z$ . This behavior is shown in Fig. 6 where we underlay the latent representation with the reconstruction loss of every particular $z$ . One can see the learned discrimination of the latent space by means of high entropy separating the clusters vicinity. Furthermore, initial $z$ values are auto re-encoded which draw the trajectories along their path in latent space. The observable properties of the VAE are that every seed converges to a fixed-point while performing descending steps on the latent space manifold. However, this statement is only valid in general for the proposed $\\mathbf { M } ^ { 2 } \\mathrm { V A E }$ , as the JMVAE-Zero and tVAE learn no or only similar coherent latent spaces between the encoder networks. Thus, seeds may be attracted by wrong attractors which makes these approach not sufficient for in-place sensor fusion. ",
903
+ "bbox": [
904
+ 173,
905
+ 377,
906
+ 825,
907
+ 558
908
+ ],
909
+ "page_idx": 8
910
+ },
911
+ {
912
+ "type": "image",
913
+ "img_path": "images/cd3afdd90f3c152430a31819ed88e5a41c5c82109378a3c0c2f71c49657f00d2.jpg",
914
+ "image_caption": [
915
+ "Figure 6: From top to bottom: JMVAE-Zero, tVAE, and ${ \\bf M } ^ { 2 }$ VAE. Left: Latent space representation with class colorization. Right: Corresponding colorization of the latent space for every $z$ obtained by auto re-encoding. White dots denote randomly drawn seeds which auto re-encoding steps are represented by the black trajectory. See Fig. 5 for legends. "
916
+ ],
917
+ "image_footnote": [],
918
+ "bbox": [
919
+ 173,
920
+ 575,
921
+ 818,
922
+ 840
923
+ ],
924
+ "page_idx": 8
925
+ },
926
+ {
927
+ "type": "text",
928
+ "text": "5.3 E-MNIST EVALUATION ",
929
+ "text_level": 1,
930
+ "bbox": [
931
+ 174,
932
+ 103,
933
+ 380,
934
+ 117
935
+ ],
936
+ "page_idx": 9
937
+ },
938
+ {
939
+ "type": "text",
940
+ "text": "For this experiment, we estimated the ELBO by Eq. 12 to evaluate the performance of models JMVAE-Zero, tVAE, and $\\mathbf { M } ^ { 2 } \\mathbf { V } \\mathbf { A } \\mathbf { E }$ . We chose the model wrt. to the evaluation in Fig. 4 with $\\beta _ { \\mathrm { n o r m } } ~ = ~ 0 . 0 1$ which is $\\beta _ { * } \\approx 4$ for the given MNIST image dimension of $D _ { a } \\ = \\ | | \\bar { ( 2 8 , 2 8 , 1 ) } | |$ and $D _ { z } = 2$ . However, Tbl. 1 shows quantitatively and Fig. 7 depicts qualitatively that the proposed $\\mathbf { M } ^ { 2 } \\mathbf { V } \\mathbf { A } \\mathbf { E }$ reaches the highest ELBO value, as well as it learns the most expressive latent space distribution. Furthermore, by sampling from the latent space for data generation, the $\\mathbf { M } ^ { 2 } \\mathbf { V } \\mathbf { A } \\mathbf { E }$ reveals crisp reconstructions in comparison to the other approaches. ",
941
+ "bbox": [
942
+ 174,
943
+ 130,
944
+ 823,
945
+ 186
946
+ ],
947
+ "page_idx": 9
948
+ },
949
+ {
950
+ "type": "table",
951
+ "img_path": "images/df6b12454a306f78dd7cc6b3a05f71b22b5e57662f6fae07263b327c90493f64.jpg",
952
+ "table_caption": [
953
+ "Table 1: Evidence lower bound test for uni- and multi-modal setups of the VAEs (higher is better). "
954
+ ],
955
+ "table_footnote": [],
956
+ "table_body": "<table><tr><td colspan=\"3\">M²VAE</td><td colspan=\"3\">tVAE</td><td colspan=\"3\">JMVAE-Zero</td></tr><tr><td>La,b</td><td>La</td><td>Lb</td><td>La.b</td><td>La</td><td>Lb</td><td>La,b</td><td>La</td><td>Lb</td></tr><tr><td>-10.75</td><td>-10.91</td><td>-16.01</td><td>-23.6</td><td>-101.28</td><td>-88.75</td><td>-24.19</td><td>-131.05</td><td>-99.71</td></tr></table>",
957
+ "bbox": [
958
+ 179,
959
+ 231,
960
+ 820,
961
+ 273
962
+ ],
963
+ "page_idx": 9
964
+ },
965
+ {
966
+ "type": "image",
967
+ "img_path": "images/42bb0c94e113d1a4888761a38cf9b5cf7d34394b3ad721f22fd9ce8a0c19353f.jpg",
968
+ "image_caption": [
969
+ "Figure 7: From top to bottom: JMVAE-Zero, tVAE, and $\\mathbf { M } ^ { 2 } \\mathbf { V } \\mathbf { A } \\mathbf { E }$ . Left: Latent space representation with class colorization. Right: Reconstruction from latent space by applying the corresponding decoder networks. $z$ is sampled linearly within $2 \\sigma$ of the prior for all figures. "
970
+ ],
971
+ "image_footnote": [],
972
+ "bbox": [
973
+ 173,
974
+ 308,
975
+ 825,
976
+ 609
977
+ ],
978
+ "page_idx": 9
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "",
983
+ "bbox": [
984
+ 174,
985
+ 686,
986
+ 825,
987
+ 728
988
+ ],
989
+ "page_idx": 9
990
+ },
991
+ {
992
+ "type": "text",
993
+ "text": "6 CONCLUSION ",
994
+ "text_level": 1,
995
+ "bbox": [
996
+ 174,
997
+ 751,
998
+ 318,
999
+ 767
1000
+ ],
1001
+ "page_idx": 9
1002
+ },
1003
+ {
1004
+ "type": "text",
1005
+ "text": "This work presents a novel multi-modal Variational Auto Encoder which is derived from the complete marginal joint log-likelihood. We showed that this expression can jointly be trained on an Mixture-of-Gaussian dataset with ambiguous observations, as well as on a complex dataset derived from MNIST and fashion-MNIST. Furthermore, we formulated requirements and characteristics for multi-modal data for sensor fusion and derived a technique to learn new datasets, namely the proposed entangled-MNIST, which suffice these requirements. Lastly, we developed the idea of in-place sensor fusion in distributed, active sensing scenarios and formulated the requirements, by means of auto re-encoding, to VAEs. This revealed the properties of VAEs, that they tend to denoise the observable data which leads to an attractor behavior in latent space. However, we performed all qualitative evaluations of the latent space with the premise in mind, that a good generative model should not just generate good data but also gives a good latent representation. This does also correlate with the quantitative behaviors, as our proposed model achieved the highest ELBO values. Future work will concentrate on the integration of the ambiguous resolving characteristics to an epistemic-exploration scenario. ",
1006
+ "bbox": [
1007
+ 174,
1008
+ 784,
1009
+ 825,
1010
+ 924
1011
+ ],
1012
+ "page_idx": 9
1013
+ },
1014
+ {
1015
+ "type": "text",
1016
+ "text": "",
1017
+ "bbox": [
1018
+ 174,
1019
+ 103,
1020
+ 823,
1021
+ 159
1022
+ ],
1023
+ "page_idx": 10
1024
+ },
1025
+ {
1026
+ "type": "text",
1027
+ "text": "ACKNOWLEDGMENTS ",
1028
+ "text_level": 1,
1029
+ "bbox": [
1030
+ 176,
1031
+ 175,
1032
+ 326,
1033
+ 188
1034
+ ],
1035
+ "page_idx": 10
1036
+ },
1037
+ {
1038
+ "type": "text",
1039
+ "text": "This research was supported by ’CITEC’ (EXC 277) at Bielefeld University and the Federal Ministry of Education and Research (57388272). The responsibility for the content of this publication lies with the author. ",
1040
+ "bbox": [
1041
+ 176,
1042
+ 198,
1043
+ 825,
1044
+ 241
1045
+ ],
1046
+ "page_idx": 10
1047
+ },
1048
+ {
1049
+ "type": "text",
1050
+ "text": "REFERENCES ",
1051
+ "text_level": 1,
1052
+ "bbox": [
1053
+ 176,
1054
+ 261,
1055
+ 285,
1056
+ 276
1057
+ ],
1058
+ "page_idx": 10
1059
+ },
1060
+ {
1061
+ "type": "text",
1062
+ "text": "Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation Learning: A Review and New Perspectives. (1993):1–30, 2012. ISSN 15324435. doi: 10.1145/1756006.1756025. URL http://arxiv.org/abs/1206.5538. \nChristopher P. Burgess, Irina Higgins, Arka Pal, Loic Matthey, Nick Watters, Guillaume Desjardins, and Alexander Lerchner. Understanding disentangling in $\\beta$ -VAE. (Nips), 2018. URL http: //arxiv.org/abs/1804.03599. \nCesar Cadena, Anthony Dick, and Ian D Reid. Multi-modal Auto-Encoders as Joint Estimators for Robotics Scene Understanding. In Nancy Amato, Siddhartha Srinivasa, Nora Ayanian, and Scott Kiundersma (eds.), Robotics: Science and System XIII, Cambridge, 2016. MIT Press. doi: 10.15607/RSS.2016.XII.041. \nIrina Higgins, Loic Matthey, Xavier Glorot, Arka Pal, Benigno Uria, Charles Blundell, Shakir Mohamed, and Alexander Lerchner. Early Visual Concept Learning with Unsupervised Deep Learning. 2016. URL http://arxiv.org/abs/1606.05579. \nIrina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, Alexander Lerchner, and Google Deepmind. beta-VAE: Learning Basic Visual Concepts with a Constrained Variational Framework. Iclr, (July):1–13, 2017a. URL https: //openreview.net/forum?id $=$ Sy2fzU9gl. \nIrina Higgins, Arka Pal, Andrei A. Rusu, Loic Matthey, Christopher P Burgess, Alexander Pritzel, Matthew Botvinick, Charles Blundell, and Alexander Lerchner. DARLA: Improving Zero-Shot Transfer in Reinforcement Learning. 2017b. ISSN 1938-7228. URL http://arxiv.org/ abs/1707.08475. \nDiederik P Kingma and Max Welling. Auto-Encoding Variational Bayes. CoRR, abs/1312.6, 2013. URL http://arxiv.org/abs/1312.6114. \nDiederik P. Kingma, Danilo J. Rezende, Shakir Mohamed, and Max Welling. Semi-Supervised Learning with Deep Generative Models. pp. 1–9, 2014. ISSN 10495258. URL http: //arxiv.org/abs/1406.5298. \nMikkel Fly Kragh, Peter Christiansen, Morten Stigaard Laursen, Morten Larsen, Kim Arild Steen, Ole Green, Henrik Karstoft, and Rasmus Nyholm Jørgensen. FieldSAFE: Dataset for Obstacle Detection in Agriculture. Sensors, 17(11), 2017. \nHugo Larochelle, Dumitru Erhan, Aaron Courville, James Bergstra, and Yoshua Bengio. An Empirical Evaluation of Deep Architectures on Problems with Many Factors of Variation. In Proceedings of the 24th International Conference on Machine Learning, ICML ’07, pp. 473–480, New York, NY, USA, 2007. ACM. ISBN 978-1-59593-793-3. doi: 10.1145/1273496.1273556. URL http://doi.acm.org/10.1145/1273496.1273556. \nLeCun Yann, Cortes Corinna, and Burges Christopher. THE MNIST DATABASE of handwritten digits. The Courant Institute of Mathematical Sciences, 1998. \nJiquan Ngiam, Aditya Khosla, Mingyu Kim, Juhan Nam, Honglak Lee, and Andrew Y Ng. Multimodal Deep Learning. Proceedings of The 28th International Conference on Machine Learning (ICML), 2011. ISSN 9781450306195. doi: 10.1145/2647868.2654931. ",
1063
+ "bbox": [
1064
+ 169,
1065
+ 276,
1066
+ 826,
1067
+ 922
1068
+ ],
1069
+ "page_idx": 10
1070
+ },
1071
+ {
1072
+ "type": "text",
1073
+ "text": "Ferda Ofli, Rizwan Chaudhry, Gregorij Kurillo, Rene Vidal, and Ruzena Bajcsy. Berkeley MHAD: A comprehensive Multimodal Human Action Database. In Proceedings of IEEE Workshop on Applications of Computer Vision, 2013. ISBN 9781467350532. doi: 10.1109/WACV.2013.6474999. ",
1074
+ "bbox": [
1075
+ 176,
1076
+ 103,
1077
+ 821,
1078
+ 146
1079
+ ],
1080
+ "page_idx": 11
1081
+ },
1082
+ {
1083
+ "type": "text",
1084
+ "text": "Gaurav Pandey and Ambedkar Dukkipati. Variational methods for conditional multimodal deep learning. Proceedings of the International Joint Conference on Neural Networks, 2017-May: 308–315, 2017. doi: 10.1109/IJCNN.2017.7965870. ",
1085
+ "bbox": [
1086
+ 176,
1087
+ 152,
1088
+ 821,
1089
+ 195
1090
+ ],
1091
+ "page_idx": 11
1092
+ },
1093
+ {
1094
+ "type": "text",
1095
+ "text": "G. Perry, E. T. Rolls, and S. M. Stringer. Continuous transformation learning of translation invariant representations. Experimental Brain Research, 204(2):255–270, 2010. ISSN 00144819. doi: 10.1007/s00221-010-2309-0. ",
1096
+ "bbox": [
1097
+ 178,
1098
+ 202,
1099
+ 821,
1100
+ 244
1101
+ ],
1102
+ "page_idx": 11
1103
+ },
1104
+ {
1105
+ "type": "text",
1106
+ "text": "Marc’Aurelio Ranzato, Christopher Poultney, Sumit Chopra, and Yann LeCun. Efficient Learning of Sparse Representations with an Energy-based Model. In Proceedings of the 19th International Conference on Neural Information Processing Systems, NIPS’06, pp. 1137–1144, Cambridge, MA, USA, 2006. MIT Press. URL http://dl.acm.org/citation.cfm?id= 2976456.2976599. ",
1107
+ "bbox": [
1108
+ 173,
1109
+ 251,
1110
+ 825,
1111
+ 321
1112
+ ],
1113
+ "page_idx": 11
1114
+ },
1115
+ {
1116
+ "type": "text",
1117
+ "text": "Kihyuk Sohn, Honglak Lee, and Xinchen Yan. Learning Structured Output Representation using Deep Conditional Generative Models. In C Cortes, N D Lawrence, D D Lee, M Sugiyama, and R Garnett (eds.), Advances in Neural Information Processing Systems 28, pp. 3483–3491. Curran Associates, Inc., 2015. ",
1118
+ "bbox": [
1119
+ 174,
1120
+ 329,
1121
+ 825,
1122
+ 386
1123
+ ],
1124
+ "page_idx": 11
1125
+ },
1126
+ {
1127
+ "type": "text",
1128
+ "text": "Masahiro Suzuki, Kotaro Nakayama, and Yutaka Matsuo. Joint multimodal learning with deep generative models. pp. 1–12, 2017. ",
1129
+ "bbox": [
1130
+ 171,
1131
+ 392,
1132
+ 823,
1133
+ 421
1134
+ ],
1135
+ "page_idx": 11
1136
+ },
1137
+ {
1138
+ "type": "text",
1139
+ "text": "Sebastian Thrun, Wolfram Burgard, and Dieter Fox. Probabilistic Robotics. MIT Press, Cambridge, Mass., 2005. ISBN 9780262201629. ",
1140
+ "bbox": [
1141
+ 173,
1142
+ 428,
1143
+ 821,
1144
+ 457
1145
+ ],
1146
+ "page_idx": 11
1147
+ },
1148
+ {
1149
+ "type": "text",
1150
+ "text": "Udacity. Self-Driving Car: Annotated Driving Dataset, 2016. URL https://github.com/ udacity/self-driving-car/tree/master/annotations. ",
1151
+ "bbox": [
1152
+ 173,
1153
+ 463,
1154
+ 821,
1155
+ 493
1156
+ ],
1157
+ "page_idx": 11
1158
+ },
1159
+ {
1160
+ "type": "text",
1161
+ "text": "Ramakrishna Vedantam, Ian Fischer, Jonathan Huang, and Kevin Murphy. Generative Models of Visually Grounded Imagination. pp. 1–21, 2017. URL http://arxiv.org/abs/1705. 10762. ",
1162
+ "bbox": [
1163
+ 173,
1164
+ 500,
1165
+ 823,
1166
+ 541
1167
+ ],
1168
+ "page_idx": 11
1169
+ },
1170
+ {
1171
+ "type": "text",
1172
+ "text": "Weiran Wang, Xinchen Yan, Honglak Lee, and Karen Livescu. Deep Variational Canonical Correlation Analysis. 1, 2016. URL http://arxiv.org/abs/1610.03454. ",
1173
+ "bbox": [
1174
+ 173,
1175
+ 549,
1176
+ 821,
1177
+ 579
1178
+ ],
1179
+ "page_idx": 11
1180
+ },
1181
+ {
1182
+ "type": "text",
1183
+ "text": "Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms. pp. 1–6, 2017. URL http://arxiv.org/abs/ 1708.07747. ",
1184
+ "bbox": [
1185
+ 174,
1186
+ 585,
1187
+ 825,
1188
+ 627
1189
+ ],
1190
+ "page_idx": 11
1191
+ },
1192
+ {
1193
+ "type": "text",
1194
+ "text": "APPENDIX ",
1195
+ "text_level": 1,
1196
+ "bbox": [
1197
+ 176,
1198
+ 650,
1199
+ 281,
1200
+ 666
1201
+ ],
1202
+ "page_idx": 11
1203
+ },
1204
+ {
1205
+ "type": "text",
1206
+ "text": "6.1 EXTENSION TO THREE MODALITIES ",
1207
+ "text_level": 1,
1208
+ "bbox": [
1209
+ 176,
1210
+ 681,
1211
+ 464,
1212
+ 695
1213
+ ],
1214
+ "page_idx": 11
1215
+ },
1216
+ {
1217
+ "type": "text",
1218
+ "text": "The proposed, as well as approach by Suzuki et al. (2017), can be extended to multiple modalities $\\mathcal { M } = \\{ a , b , c \\}$ . The conditional marginal log-likelihood of $a$ can be written as ",
1219
+ "bbox": [
1220
+ 174,
1221
+ 707,
1222
+ 823,
1223
+ 734
1224
+ ],
1225
+ "page_idx": 11
1226
+ },
1227
+ {
1228
+ "type": "equation",
1229
+ "img_path": "images/4d527b6b6e19e36aa14a0f2e75bfed6ed49f733925544527672e8377a5a079cd.jpg",
1230
+ "text": "$$\n\\begin{array} { r } { \\log p ( a | b , c ) { = } \\mathcal { L } _ { \\widetilde { \\mathrm { M } } _ { \\mathrm { a } } } { + } \\mathrm { D } _ { \\mathrm { K L } } ( q ( z | \\mathcal { M } ) \\Vert p ( z | \\mathcal { M } ) ) { \\geq } \\mathcal { L } _ { \\widetilde { \\mathrm { M } } _ { \\mathrm { a } } } . } \\end{array}\n$$",
1231
+ "text_format": "latex",
1232
+ "bbox": [
1233
+ 325,
1234
+ 737,
1235
+ 669,
1236
+ 757
1237
+ ],
1238
+ "page_idx": 11
1239
+ },
1240
+ {
1241
+ "type": "text",
1242
+ "text": "6.1.1 JMVAE FOR THREE MODALITIES ",
1243
+ "text_level": 1,
1244
+ "bbox": [
1245
+ 176,
1246
+ 765,
1247
+ 460,
1248
+ 780
1249
+ ],
1250
+ "page_idx": 11
1251
+ },
1252
+ {
1253
+ "type": "text",
1254
+ "text": "The VI between a set of distributions $\\mathcal { M }$ can be written as $\\begin{array} { r } { - \\mathbb { E } _ { p ( \\mathcal { M } ) } \\sum _ { m \\in \\mathcal { M } } \\log p ( m | \\mathcal { M } \\setminus m ) } \\end{array}$ , which leads to an expression of maximizing the ELBO of negative VI (c.f. Suzuki et al. (2017)). Following this approach, the log-likelihood $L _ { 3 \\mathrm { M } }$ can be expressed by the ELBOs, by utilizing Eq. 14, of their conditionals and KL divergence: ",
1255
+ "bbox": [
1256
+ 174,
1257
+ 789,
1258
+ 825,
1259
+ 844
1260
+ ],
1261
+ "page_idx": 11
1262
+ },
1263
+ {
1264
+ "type": "equation",
1265
+ "img_path": "images/18351dcfb4a59c88dbe281c9331b5011cadf4651a3adbd92b1c3fb97bafb9fdd.jpg",
1266
+ "text": "$$\n\\begin{array} { r l } & { L _ { \\mathrm { 3 M } } = \\log p ( a | b , c ) + \\log ( p ( b | a , c ) ) + \\log ( p ( c | b , c ) ) } \\\\ & { \\qquad \\geq \\mathcal { L } _ { \\widetilde { \\mathrm { M } } _ { \\mathrm { a } } } + \\mathcal { L } _ { \\widetilde { \\mathrm { M } } _ { \\mathrm { b } } } + \\mathcal { L } _ { \\widetilde { \\mathrm { M } } _ { \\mathrm { c } } } } \\\\ & { \\qquad \\geq \\mathcal { L } _ { \\widetilde { \\mathrm { J } } } - \\mathrm { D } _ { \\mathrm { K L } } ( q ( z | a , b , c ) \\| p ( z | b , c ) ) } \\\\ & { \\qquad - \\mathrm { D } _ { \\mathrm { K L } } ( q ( z | a , b , c ) \\| p ( z | a , c ) ) - \\mathrm { D } _ { \\mathrm { K L } } ( q ( z | a , b , c ) \\| p ( z | b , c ) ) } \\end{array}\n$$",
1267
+ "text_format": "latex",
1268
+ "bbox": [
1269
+ 294,
1270
+ 845,
1271
+ 702,
1272
+ 924
1273
+ ],
1274
+ "page_idx": 11
1275
+ },
1276
+ {
1277
+ "type": "text",
1278
+ "text": "with $\\mathcal { L } _ { \\widetilde { \\mathrm { J } } }$ being the joint ELBO of a joint probability $p ( \\mathcal { M } )$ which expression is analog to Eq. 2. ",
1279
+ "bbox": [
1280
+ 171,
1281
+ 103,
1282
+ 794,
1283
+ 119
1284
+ ],
1285
+ "page_idx": 12
1286
+ },
1287
+ {
1288
+ "type": "text",
1289
+ "text": "6.1.2 $\\mathbf { M } ^ { 2 } \\mathbf { V } \\mathbf { A } \\mathbf { E }$ FOR THREE MODALITIES ",
1290
+ "text_level": 1,
1291
+ "bbox": [
1292
+ 176,
1293
+ 135,
1294
+ 460,
1295
+ 150
1296
+ ],
1297
+ "page_idx": 12
1298
+ },
1299
+ {
1300
+ "type": "text",
1301
+ "text": "Applying the proposed scheme to the joint log-likelihood of three modalities results in the following expression: ",
1302
+ "bbox": [
1303
+ 176,
1304
+ 159,
1305
+ 823,
1306
+ 188
1307
+ ],
1308
+ "page_idx": 12
1309
+ },
1310
+ {
1311
+ "type": "equation",
1312
+ "img_path": "images/d881db35c22fe4796322befe0608dfa8638126012acc3af26408f3f50a5a964c.jpg",
1313
+ "text": "$$\n\\begin{array} { r l } & { L _ { 3 \\mathrm { M } ^ { 2 } } } \\\\ & { = 3 / 3 \\log p ( a , b , c ) = 1 / 3 \\log p ( a , b , c ) ^ { 3 } } \\\\ & { = 3 / 3 \\log p ( a , b , c ) p ( a , b , c ) p ( a , b , c ) } \\\\ & { = 1 / 3 \\log p ( a , b ) p ( b , c ) p ( a , c ) p ( a | b , c ) p ( b | a , c ) p ( c | a , b ) } \\\\ & { = 1 / 3 ( \\log ( p ( a , b ) ) + \\log ( p ( b , c ) ) + \\log ( p ( a , c ) ) } \\\\ & { \\quad + \\log p ( a | b , c ) + \\log p ( b | a , c ) + \\log p ( c | a , b ) ) } \\\\ & { = 1 / 3 ( 2 / 2 ( \\log p ( a , b ) + \\log p ( b , c ) + \\log p ( a , c ) ) + L _ { 3 \\mathrm { M } } ) } \\\\ & { = 1 / 6 \\big ( \\log p ( a , b ) ^ { 2 } + \\log p ( b , c ) ^ { 2 } + \\log p ( a , c ) ^ { 2 } \\big ) + L _ { 3 \\mathrm { M } / 3 } } \\\\ & { = 1 / 6 \\big ( L _ { \\mathrm { M } ^ { 2 } \\mathrm { ~ * } } + L _ { \\mathrm { M } _ { \\mathrm { M } ^ { 2 } \\mathrm { s } } } + L _ { \\mathrm { M } ^ { 2 } \\mathrm { s } } \\big ) + 1 / 3 L _ { 3 \\mathrm { M } } } \\end{array}\n$$",
1314
+ "text_format": "latex",
1315
+ "bbox": [
1316
+ 269,
1317
+ 194,
1318
+ 629,
1319
+ 364
1320
+ ],
1321
+ "page_idx": 12
1322
+ },
1323
+ {
1324
+ "type": "text",
1325
+ "text": "From here on, one can substitute all log-likelihoods given the expressions in Sec. 3 and ??, to derive the ELBO L3M2 . ",
1326
+ "bbox": [
1327
+ 173,
1328
+ 367,
1329
+ 825,
1330
+ 397
1331
+ ],
1332
+ "page_idx": 12
1333
+ },
1334
+ {
1335
+ "type": "text",
1336
+ "text": "6.1.3 ${ \\bf M } ^ { 2 }$ VAE DERIVATION ",
1337
+ "text_level": 1,
1338
+ "bbox": [
1339
+ 174,
1340
+ 411,
1341
+ 377,
1342
+ 428
1343
+ ],
1344
+ "page_idx": 12
1345
+ },
1346
+ {
1347
+ "type": "equation",
1348
+ "img_path": "images/1f62f088926753f829ccf7a827a2c1257fe71322081e06afc9f8e206a343424a.jpg",
1349
+ "text": "$$\n\\begin{array} { r l } & { L _ { \\mathrm { M } ^ { 2 } , \\boldsymbol { \\mathcal { M } } } = \\log p ( \\boldsymbol { \\mathcal { M } } ) \\stackrel { \\mathrm { m u l } ~ , 1 } { = } \\stackrel { | \\mathcal { M } | / | \\mathcal { M } | } { | \\mathcal { M } | } \\log p ( \\boldsymbol { \\mathcal { M } } ) \\stackrel { \\log . \\mathrm { m u l } . } { = } 1 / | \\mathcal { M } | \\log p ( \\boldsymbol { \\mathcal { M } } ) \\stackrel { | \\mathcal { M } | } { = } } \\\\ & { \\stackrel { \\mathrm { B a y e s } ~ } { = } 1 / | \\mathcal { M } | \\displaystyle \\sum _ { m \\in \\mathcal { M } } \\log p ( \\boldsymbol { \\mathcal { M } } \\setminus m ) p ( m | \\mathcal { M } \\setminus m ) } \\\\ & { \\stackrel { \\mathrm { l o g . a d d } } { = } 1 / | \\mathcal { M } | \\displaystyle \\sum _ { m \\in \\mathcal { M } } \\log p ( \\boldsymbol { \\mathcal { M } } \\setminus m ) + \\log p ( m | \\mathcal { M } \\setminus m ) } \\end{array}\n$$",
1350
+ "text_format": "latex",
1351
+ "bbox": [
1352
+ 264,
1353
+ 441,
1354
+ 732,
1355
+ 541
1356
+ ],
1357
+ "page_idx": 12
1358
+ },
1359
+ {
1360
+ "type": "text",
1361
+ "text": "The expression $\\begin{array} { r } { \\sum _ { m \\in \\mathcal { M } } \\log p ( m | \\mathcal { M } \\setminus m ) } \\end{array}$ is the general form of the marginal log-likelihood for the variation of information (VI), as introduced by Suzuki et al. (2017) for the JMVAE, for any set $\\mathcal { M }$ . Thus, it can be directly substituted with $L _ { \\mathrm { M } _ { \\mathcal { M } } }$ . The expression $\\textstyle \\sum _ { m \\in { \\mathcal { M } } } \\log p ( { \\mathcal { M } } \\setminus m )$ is the combination of all joint log-likelihoods of the subsets of $\\mathcal { M }$ which have one less element. Therefore, this term can be rewritten as ",
1362
+ "bbox": [
1363
+ 173,
1364
+ 546,
1365
+ 825,
1366
+ 616
1367
+ ],
1368
+ "page_idx": 12
1369
+ },
1370
+ {
1371
+ "type": "equation",
1372
+ "img_path": "images/734b3f2e45c57a9858588470ab9577023fbac4dde6a1f83b27133112dee197d6.jpg",
1373
+ "text": "$$\n\\sum _ { m \\in \\mathcal { M } } \\log p ( \\mathcal { M } \\setminus m ) = \\sum _ { \\widetilde { m } \\in \\widetilde { \\mathcal { M } } } \\log p ( \\widetilde { m } )\n$$",
1374
+ "text_format": "latex",
1375
+ "bbox": [
1376
+ 370,
1377
+ 621,
1378
+ 627,
1379
+ 657
1380
+ ],
1381
+ "page_idx": 12
1382
+ },
1383
+ {
1384
+ "type": "text",
1385
+ "text": "with $\\widetilde { \\mathcal { M } } = \\{ m | m \\in \\mathcal { P } ( \\mathcal { M } ) , | m | = | \\mathcal { M } | - 1 \\}$ Finally, $\\log p ( \\widetilde { m } )$ can be substituted by $L _ { \\mathrm { M } ^ { 2 } \\widetilde { m } }$ without loss of generality. However, it is worth noticing that substitution stops at the end of recursion and therefore, all final expressions $\\log p ( \\widetilde { m } ) \\forall | \\widetilde { m } | \\equiv 1$ remain. $\\boxed { \\begin{array} { r l } \\end{array} }$ ",
1386
+ "bbox": [
1387
+ 174,
1388
+ 666,
1389
+ 825,
1390
+ 712
1391
+ ],
1392
+ "page_idx": 12
1393
+ },
1394
+ {
1395
+ "type": "text",
1396
+ "text": "6.1.4 NETWORK ARCHITECTURE ",
1397
+ "text_level": 1,
1398
+ "bbox": [
1399
+ 176,
1400
+ 727,
1401
+ 416,
1402
+ 741
1403
+ ],
1404
+ "page_idx": 12
1405
+ },
1406
+ {
1407
+ "type": "text",
1408
+ "text": "We designed all VAEs such that the latent space prior is given by a Gaussian with unit variance. Furthermore, all VAEs sample from a Gaussian variational distribution that is parametrized by the encoder networks. A summary of all architectures used in this paper can be seen in Tbl. 2. The reconstruction loss for calculating the evidence lower bound was performed by binary cross-entropy (BCE) for the e-MNIST and root-mean-squared error (RMS) for the MoG experiment. ",
1409
+ "bbox": [
1410
+ 173,
1411
+ 751,
1412
+ 826,
1413
+ 821
1414
+ ],
1415
+ "page_idx": 12
1416
+ },
1417
+ {
1418
+ "type": "text",
1419
+ "text": "Furthermore, the CVAE for training the e-MNIST dataset is designed as depicted in Tbl. 3. ",
1420
+ "bbox": [
1421
+ 169,
1422
+ 827,
1423
+ 769,
1424
+ 843
1425
+ ],
1426
+ "page_idx": 12
1427
+ },
1428
+ {
1429
+ "type": "table",
1430
+ "img_path": "images/fdbeba8a2836a3b9cd904ccba31ec6840aad774c457e22e8595e38ba0b612625.jpg",
1431
+ "table_caption": [
1432
+ "Table 2: Various VAE architectures and optimizers for the e-MNIST and MoG experiments. $\\mathrm { { u m / m m } }$ stand for uni- and multi-modal while fc refers to fully-connected layers. "
1433
+ ],
1434
+ "table_footnote": [],
1435
+ "table_body": "<table><tr><td>Issue</td><td>VAE</td><td>Optimizer</td><td colspan=\"2\">VAEarchitecture</td><td></td></tr><tr><td>e-MNIST</td><td>JMVAE-Z.</td><td>adam</td><td>encoder decoder</td><td>fc 2x784-2x128-2x64-concat-64-2 (ReLU) fc 2x64-2x128-2x786 (tanh)</td><td rowspan=\"3\"></td></tr><tr><td>e-MNIST</td><td>tVAE</td><td>adam</td><td>um enc. mm enc. decoder</td><td>fc 784-128-64-2 (ReLU) fc 2x784-2x128-2x64-concat-64-2 (ReLU) fc 2x64-2x128-2x786 (tanh)</td></tr><tr><td>e-MNIST</td><td>M²VAE</td><td>adam</td><td>um enc. mm enc. decoder</td><td>fc 784-128-64-2 (ReLU) fc 2x784-2x128-2x64-concat-64-2 (ReLU) fc 2x64-2x128-2x786 (tanh)</td></tr><tr><td>MoG</td><td>JMVAE-Z.</td><td>rmsprop</td><td>encoder decoder</td><td>fc 2x2-2x128-concat-64-2 (ReLU) fc 2x128-2x2 (tanh)</td><td rowspan=\"2\"></td></tr><tr><td>MoG</td><td>tVAE</td><td>rmsprop</td><td>um enc. mm enc. decoder</td><td>fc 2x2-2x128-2x2 (ReLU) fc 2x2-2x128-concat-64-2 (ReLU) fc 2x128-2x2 (tanh)</td></tr><tr><td>MoG</td><td>M²VAE</td><td>rmsprop</td><td>um enc. mm enc. decoder</td><td></td><td>fc 2-128-2 (ReLU) fc 2x2-2x128-concat-64-2 (ReLU) fc 2x128-2x2 (tanh)</td></tr></table>",
1436
+ "bbox": [
1437
+ 174,
1438
+ 246,
1439
+ 823,
1440
+ 488
1441
+ ],
1442
+ "page_idx": 13
1443
+ },
1444
+ {
1445
+ "type": "table",
1446
+ "img_path": "images/7618f0844bb08e90c8c832311556d30cd3388a9d1f05f2b308b5e19c74816fd5.jpg",
1447
+ "table_caption": [
1448
+ "Table 3: CVAE architecture for each dataset MNIST and fashion-MNIST. The label as one-hotvector is concatenated after the convolution layers and fed into the fully-connected (fc) layers. For convolutional architectures the numbers in parenthesis indicate strides, while padding is always same. "
1449
+ ],
1450
+ "table_footnote": [],
1451
+ "table_body": "<table><tr><td>encoder decoder</td><td>conv1x2x2-64x2x2(2)-64x3x3-64x3x3-concatlabelC-fc 128-2 concat label C-fc 128-deconv reverse of encoder (ReLU)</td></tr></table>",
1452
+ "bbox": [
1453
+ 246,
1454
+ 786,
1455
+ 750,
1456
+ 814
1457
+ ],
1458
+ "page_idx": 13
1459
+ },
1460
+ {
1461
+ "type": "text",
1462
+ "text": "CVAE architecture ",
1463
+ "text_level": 1,
1464
+ "bbox": [
1465
+ 465,
1466
+ 772,
1467
+ 602,
1468
+ 785
1469
+ ],
1470
+ "page_idx": 13
1471
+ }
1472
+ ]