ZHANGYUXUAN-zR commited on
Commit
e39a340
·
verified ·
1 Parent(s): 0c97677

Add files using upload-large-folder tool

Browse files
parse/train/BklWt24tvH/BklWt24tvH.md ADDED
@@ -0,0 +1,297 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEARNING STRUCTURED COMMUNICATION FOR MULTI-AGENT REINFORCEMENT LEARNING
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Learning to cooperate is crucial for many practical large-scale multi-agent applications. In this work, we consider an important collaborative task, in which agents learn to efficiently communicate with each other under a multi-agent reinforcement learning (MARL) setting. Despite the fact that there has been a number of existing works along this line, achieving global cooperation at scale is still challenging. In particular, most of the existing algorithms suffer from issues such as scalability and high communication complexity, in the sense that when the agent population is large, it can be difficult to extract effective information for highperformance MARL. In contrast, the proposed algorithmic framework, termed Learning Structured Communication (LSC), is not only scalable but also learns efficiently. The key idea is to allow the agents to dynamically learn a hierarchical communication structure, while under such a structure the graph neural network (GNN) is used to efficiently extract useful information to be exchanged between the neighboring agents. A number of new techniques are proposed to tightly integrate the communication structure learning, GNN optimization and MARL tasks. Extensive experiments are performed to demonstrate that, the proposed LSC framework enjoys high communication efficiency, scalability, and global cooperation capability.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Reinforcement learning (RL) has achieved remarkable success in solving single-agent sequential decision problems under interactive and complicated environments, such as games (Mnih et al., 2015; Silver et al., 2016) and robotics (Lillicrap et al., 2016). In many real world applications such as intelligent transportation systems (Adler & Blue, 2002) and unmanned systems(Semsar-Kazerooni & Khorasani, 2009), not only one, but usually a large number of agents are involved in the learning tasks. Such a setting naturally leads to the popular multi-agent reinforcement learning (MARL) problems, where the key research challenges include how to design scalable and efficient learning schemes under an unstationary environment (caused by partial observation and/or the dynamics of other agents’ policies), with large and/or dynamic problem dimension, and complicated and uncertain relationship between agents.
12
+
13
+ Learning to communicate among agents has been regarded as an effective manner to strengthen the inter-agent collaboration and ultimately improve the quality of policies learned by MARL. Various communication-based MARL algorithms have been devised recently, e.g., DIAL (Foerster et al., 2016), CommNet (Sukhbaatar et al., 2016), ATOC (Jiang & Lu, 2018), IC3Net (Singh et al., 2019) and TarMAC (Das et al., 2019). These schemes aim to improve the inter-agent collaboration by learning communication strategy to exchange information between agents. However, there are still two bottlenecks unresolved, especially when faced a large number of agents.
14
+
15
+ One bottleneck lies in that achieving effective communication and global collaboration is difficult with limited resources, such as narrow communication bandwidth and energy. In particular, DIAL and TarMAC require each agent to communicate with all the other agents, i.e., a fully-connected communication network (Figure 1(a)), which is not feasible for large scale scenarios with geographically apart agents. CommNet and IC3 assume a star network (Figure 1(b)) with a central node coordinating the global collaboration of agents, which again does not allow large scale scenarios with long range communications. ATOC introduces an interesting attention scheme to build a tree communication network (Figure 1(c)). While the tree network can be scaled, global collaboration has to be realized through inefficient multi-hop and sequential communications. In a word, improper communication topologies will limit the cooperation ability in large scale scenarios.
16
+
17
+ ![](images/09eb91c9b734e9c9c8c44815a4bfcd72f7394328b5f4c9833ea0779c7f89056d.jpg)
18
+ Figure 1: Topology of different communication structures and LSC falls into the hierarchical one.
19
+
20
+ Another bottleneck is the difficulty of extracting essential information to exchange between agents for achieving high-performance MARL, especially when the number of agents grows. Most of the existing works simply concatenate, take the mean or use the LSTM to extract information to be exchanged. First two lack in considering the inter-relationship between agents, and LSTM assumes that there is a fixed sequence of message passing between agents, that is, the relationship between agents is predefined. Recently, TarMAC utilized an attention scheme to aggregate messages by considering the relationship from each agent to all others. However, the improper communication topology still hinders the information extraction. The communication structure needs to be jointly designed with the information extraction scheme to achieve further improved learning performance.
21
+
22
+ ![](images/9a2b7a55ae6e8e9eccd61d39a980a7266b618c0db2f5d7c0308e71dc88ab74d0.jpg)
23
+ Figure 2: Procedure for dynamically establishing structured communication network. Left: Each agent determines its communication importance weight based on partial local observation. For instance, the agent “G” finds the target (red square), then it will be possible to get a higher weight “4” and become the central. Right: The importance weight generation step and network construction step will be repeated iteratively. After communication and action procedures, agents will generate their new communication importance weights, and determine to keep or change their roles respectively. Further, the structured communication network will be re-established.
24
+
25
+ To address the above two issues, we propose a novel structured communication-based algorithm, called learning structured communication (LSC). Our LSC combines a structured communication network module and a communication-based policy module, which aims to establish a scalable hierarchically structured network and information exchange scheme for large scale MARL. In particular, a hierarchically structured communication network (Figure 1(d)) is dynamically learned based on local partial observations of agents. In the hierarchically structured network, all agents are grouped into clusters, where global collaboration can be achieved via intra-group and inter-group communications. In contrast to the other three types in Figure 1, the proposed hierarchical communication network is more flexible and scalable, with fewer resources needed to achieve long-range and global collaboration.
26
+
27
+ The procedure to establish such a hierarchically structured communication network is shown in Figure 2. To better utilize the relationship between agents given the hierarchically structured communication network and obtain more effective information extraction, graph neural network (GNN) (Scarselli et al., 2008) is employed. In GNN, each communication step involves information embedding and aggregation. Benefiting from the unordered aggregation power and the dynamic graph adaptability of GNN, the proposed LSC algorithm can extract valuable information effectively. The GNN-based information extraction procedure is depicted in Figure 3.
28
+
29
+ ![](images/04e07a7ce05f083c607e123a87efcdbeaa43bf76832c324f1095069d0987aa28.jpg)
30
+ Figure 3: GNN-based communication extraction procedure. Each node denotes an agent. The edge embedding can be considered as the communication message. The network learning procedure properly fits the communication procedure, and effectively learn valuable messages involving the global network structure and agents relationship. Left: Low-level normal agents transfer their local valuable embeddings to the associated central agents. Middle: High-level central agents communicate with each other to gain a sense of global perception. Right: All central agents broadcast embedding information to their normal agents to form global cooperation.
31
+
32
+ This paper is devoted to the learning of communication structure among agents. To our knowledge, this is the first work of hierarchical structured learning to communication for MARL. It allows to learn communication structure adaptively instead of using predefined forms. Specifically:
33
+
34
+ i) To improve scalability for a large number of agents, a hierarchical structure is devised that divides the agents into higher-level central agents and sub-level normal ones. As such, the communication network is sparsified. While it still allows for more effective global cooperation via message passing among the central agents, compared with the star/tree structures.
35
+
36
+ ii) For effective communication and global cooperation, the message representation learning is deeply integrated into the information aggregating and permeating through the network, via graph neural network (GNN), which is a natural combination with the hierarchical communication structure.
37
+
38
+ iii) Extensive experiments on both MAgent and StarCraft2 show our approach achieves state-of-theart scalability and effectiveness on large-scale MARL problems.
39
+
40
+ # 2 RELATED WORK AND PRELIMINARIES
41
+
42
+ Many multi-agent reinforcement learning algorithms without communication in the inference procedure have experienced fast development. Recent works like MADDPG (Lowe et al., 2017), QMIX (Rashid et al., 2018), COMA (Foerster et al., 2018) and MAAC (Iqbal & Sha, 2019) adopt a centralized training and decentralized implementing framework. All agents’ local observations and actions are considered to improve the learning stability. These algorithms are generally not suitable for large-scale case due to explosive growing number of agents.
43
+
44
+ Communication-based MARL algorithms have been showed effective for large-scale agent cooperation. Earlier works assume that all agents need to communicate with each other. DIAL (Foerster et al., 2016) learns to communication through back-propagating all other agents’ gradients to the message generator network. Similarly, CommNet (Sukhbaatar et al., 2016) sends all agents’ hidden states to the shared communication channel and further learns the message based on the average of all other hidden states. MFRL (Yang et al., 2018) approximates the influence of other agents by averaging the actions of surrounding neighbor agents, which could mitigate the dimensional disaster for large-scale cases. However, this can be considered as a predefined communication pattern, which is unable to adapt to complex large-scale scenarios. Communication between all agents will lead to high communication complexity and difficulty of useful information extraction. DGN (Jiang et al., 2018) employs graph convolution network (GCN) to extract relationships between agents which could result in better collaboration. However, it considers all agents equivalently and assumes the communication of each agent has to involve all neighbor agents which limits to adapt to more practical bandwidth-limited environments. IC3Net (Singh et al., 2019) uses a communication gate to decide whether to communicate with the center, but adopt the same star structure like CommNet which requires high bandwidth and can hard to extract valuable information with only one center. ATOC (Jiang & Lu, 2018) and TarMAC (Das et al., 2019) introduce the attention mechanism to determine when to communicate and whom to communicate with, respectively. TarMAC focuses more on message aggregation rather than the communication structure. SchedNet (Kim et al., 2019) aims to learn a weight-based scheduler to determine the communication sequence and priority. From the perspective of employing GNN into MARL, MAGNet (Malysheva et al., 2018) that utilizes a relevance graph representation of the environment and a message passing mechanism to help agents learning. However, it requires heuristic rules to establish the graph which is hard to achieve in complex environments. RFM (Tacchetti et al., 2019) use graph to represent the relationship between different entities, aiming to provide interpretable representations.
45
+
46
+ Before the main method, we introduce some preliminaries to facilitate the presentation.
47
+
48
+ Partial Observable Stochastic Games. In stochastic games, agents learn policies by maximizing their cumulative rewards through interacting with the environment and other agents. The partial observable stochastic games (POSG) can be characterized as a tuple $\langle \mathcal { T } , \mathcal { S } , \mathfrak { b } ^ { 0 } , \mathcal { A } , \mathcal { O } , \mathcal { P } , \mathcal { P } _ { e } , \mathcal { \bar { R } } \rangle$ where $\mathcal { T }$ denotes the set of agents indexed from 1 to $n ; S$ denotes the finite set of states; $b ^ { 0 }$ represents the initial state distribution and $\mathcal { A }$ denotes the set of joint actions. $A _ { i }$ is the action space of agent $i$ , $\mathbf { a } = \langle a _ { 1 } , \cdot , a _ { n } \rangle$ denotes a joint action; $\mathcal { O }$ denotes the joint observations and $O _ { i }$ is the observation space for agent $i$ , $\mathbf { o } = \langle o _ { 1 } , \cdot , o _ { n } \rangle$ denotes a joint observation; $\mathcal { P }$ denotes the Markovian transition distribution with $P \left( \tilde { s } , \mathbf { o } | s , \mathbf { a } \right)$ as the probability of state $s$ transit to $\tilde { s }$ and result o after taking action a. $\mathcal { P } _ { e } ( o | s )$ is the Markovian observation emission probability function. $\mathcal { R } : \mathcal { S } \times \mathcal { A } \mathbb { R } ^ { n }$ means the reward function for agents. The overall task of the MARL problem can be solved by properly objective function modeling, which also indicates the relationship among agents, e.g., cooperation, competition or mixed.
49
+
50
+ Graph Neural Network. Graph neural network (GNN) (Scarselli et al., 2008) is a deep embedding framework to handle graph-based data on a graph $\mathcal { G } = ( \nu , \mathcal { E } )$ . $\mathbf { v } _ { i }$ denotes the node feature vector for node $v _ { i } \in \mathcal V$ (for $N _ { v }$ nodes), $\mathbf { e } _ { k }$ denotes the edge feature vector for edge $e _ { k } \in \mathcal { E }$ (for $N _ { e }$ edges) with $r _ { k } , s _ { k }$ be the receiver and sender of edge $e _ { k }$ respectively. The vector u denotes the global feature. The graph network framework in (Battaglia et al., 2018) is employed, which divides computation on graph data to several blocks to gain flexible processing ability. Each block introduces the aggregation and embedding functions to handle graph data. There are many variants of GNN, like messagepassing neural network (Gilmer et al., 2017) and non local neural networks (Wang et al., 2018). By treating every agent as a node and each communication message exchanging as the edge in a graph, the observations and messages as the attributes of nodes and edges, respectively. The whole communication process can be formulated to a graph neural network. The relationships among agents can be effectively extracted to enable efficient communication message learning.
51
+
52
+ Independent Deep Q-Learning. Deep $Q$ -Network (DQN) (Mnih et al., 2015) is popular in deep reinforcement learning, which is one of the few RL algorithms applicable for large-scale MARL. In each step, each agent observes state $s$ and takes an action $a$ based on policy $\pi$ . It receives reward $r$ and next state $\tilde { s }$ from environment. To maximize the cumulative reward $\boldsymbol { R } = \textstyle \sum _ { t } \boldsymbol { r } _ { t }$ , DQN learns the action-value function $Q ^ { \pi } ( s , a ) = \mathbb { E } _ { s \sim \mathcal { P } , a \sim \pi ( s ) }$ $[ R _ { t } | s _ { t } = s , a _ { t } = a ]$ by minimizing $\mathcal { L } ( \boldsymbol { \theta } ) = \mathbb { E } _ { s , a , r , \tilde { s } } \left[ \tilde { y } - Q ( s , a ; \boldsymbol { \theta } ) \right]$ , where $\tilde { y } = r + \gamma \operatorname* { m a x } _ { \tilde { a } } Q \left( \tilde { s } , \tilde { a } ; \theta \right)$ . The agent follows $\epsilon$ -greedy policy, that is, selects the action that maximizes the $Q$ -value with probability $_ { 1 - \epsilon }$ or randomly. The Independent Deep $Q$ -Learning (IDQN) (Tampuu et al., 2017) is an extension of DQN by ignoring the influence of other agents for multi-agent case. Every agent learns a $Q$ -function $Q ^ { a } ( u ^ { a } | s ; \theta ^ { a } )$ based on its own observation and received reward.
53
+
54
+ Our algorithm employs DQN as the basic RL algorithm based on the following two considerations: 1) our algorithm is dedicated to discuss the learning communication mechanism in largescaleMARL scenarios, as a result we can choose a concise and effective basic RL algorithm like thewell-known DQN; 2) data collection in large-scale MARL environments is extremely inefficiently,while DQN has excellent data efficiency as an offline RL algorithm.
55
+
56
+ # 3 LSC: LEARNING STRUCTURED COMMUNICATION
57
+
58
+ Our communication architecture has two key modules: structured communication network module and communication-based policy module, shown in Figure 4. The first module aims to establish the dynamic hierarchical structured communication network in a distributed fashion, while the second module contains the GNN-based communication extraction and $Q$ -network components. Without loss of generality, we use DQN as the basic reinforcement algorithm, however our approach can incorporate any value-based or actor-critic methods. The details of LSC is depicted in Algorithm 1
59
+
60
+ ![](images/048ed0234ca042406849a542e89119473e14516603b69e9251a76aec83d5aa35.jpg)
61
+ Figure 4: Algorithm framework of LSC with Structured Communication Network Module and Communication-based Policy Module, where $s _ { i }$ , $o _ { i }$ , $a _ { i }$ and $w _ { i }$ denote state (global perception), observation, action and importance weight of agent $i$ . The former module uses partial observation to establish the communication structure. The latter employs GNN-based communication and $Q$ - Network to extract communication content and produces collaboration policies respectively based on established communication structure.
62
+
63
+ 1: Initialization: weight generator parameters $\theta ^ { w }$ , $Q$ -net parameters $\theta ^ { Q }$ , GNN parameters $\theta ^ { g n n }$ ,
64
+ target $Q$ -net parameters $\theta ^ { \tilde { Q } }$ , replay buffer $\mathcal { R } = \emptyset$ , group radius $d$ , the number of agents $n$ ;
65
+ 2: for Episode $= 1 , \cdots , M$ do
66
+ 3: Reset $t = 0$ , global state $s ^ { t }$ and observation $o _ { i } ^ { t }$ for each agent $i$ , Normal agents set $\mathcal { V } _ { n } ^ { t } =$
67
+ {all agents} and $\bar { \mathcal { V } } _ { c } ^ { t } = \mathcal { O }$ ;
68
+ 4: for $t = 1 , \cdots , T$ and $s _ { t } \neq$ terminal do
69
+ 5: for each agent $i$ do
70
+ 6: With probability $\epsilon$ pick a random action $\boldsymbol { w } _ { i } ^ { t }$ else $w _ { i } ^ { t } = \arg \operatorname* { m a x } _ { \{ w _ { i } \} } Q _ { \theta ^ { w } } ( o _ { i } ^ { t } )$ ;
71
+ 7: Get current position $\mathrm { P O S s } _ { i } ^ { t }$ of each agent $i$ ;
72
+ 8: $( \boldsymbol { \gamma } _ { n } ^ { t } , \boldsymbol { \gamma } _ { c } ^ { t } , \boldsymbol { \mathcal { E } } ) = \mathrm { C B R P } ( ( \boldsymbol { \gamma } _ { n } ^ { t - 1 } , \boldsymbol { \gamma } _ { c } ^ { t - 1 } ) , \{ \boldsymbol { w } _ { 1 } ^ { t } , \cdots , \boldsymbol { w } _ { n } ^ { t } \} , \{ \mathrm { P O S s } _ { 1 } ^ { t } , \cdots , \mathrm { P O S s } _ { n } ^ { t } \} , d ) ;$
73
+ 9: $\left\{ q _ { 1 } ^ { t } , \cdot \cdot \cdot , q _ { n } ^ { t } \right\} = \mathrm { H C O M M } ( \mathcal { V } _ { n } ^ { t } , \mathcal { V } _ { c } ^ { t } , \mathcal { E } )$ ;
74
+ 10: for each agent $i$ do
75
+ 11: With probability $\epsilon$ pick a random action $a _ { i } ^ { t }$ else choose the action that has the largest
76
+ 12: value in the vector $\mathbf { \bar { \rho } } _ { q _ { i } ^ { t } }$ ;
77
+ 13: Execute global actions and get global reward $r ^ { t }$ , next state $s ^ { t + 1 }$ , next observation $o ^ { t + 1 }$ ;
78
+ 14: Get updated position $\mathrm { P O S s } _ { i } ^ { t + 1 }$ for each agent $i$ ;
79
+ 15: Store $\begin{array} { r } { ( s ^ { t } , o ^ { t } , \{ \mathrm { P O S s } _ { 1 } ^ { t } , \cdot \cdot \cdot , \mathrm { P O S s } _ { n } ^ { t } \} , a ^ { t } , r ^ { t } , o ^ { t + 1 } , \{ \mathrm { P O S s } _ { 1 } ^ { t + 1 } , \cdot \cdot \cdot , \mathrm { P O S s } _ { n } ^ { t + 1 } \} , s ^ { t + 1 } ) \cup \{ \mathrm { P O S s } _ { 1 } ^ { t } , \cdot \cdot \cdot , \mathrm { P O S s } _ { n } ^ { t } \} , s ^ { t + 1 } ) \mathrm { ~ ; ~ } } \end{array}$ to $\mathcal { R }$ ;
80
+ 16: for $k = 1 , \cdots , K$ do
81
+ 17: Sample a random mini-batch transitions from $\mathcal { R }$ ;
82
+ 18: Update weight generator $\theta ^ { w }$ by minimizing Eq. (1);
83
+ 19: Update communication based policy module $( \theta ^ { Q } , \theta ^ { g n n } )$ by minimizing Eq. (2);
84
+ 20: Update the target networks through Eq. (3).
85
+
86
+ Specifically, the CBRP function automatically and distributively establishes the structured communication network based on the learnt importance weights. The HCOMM function denotes the communication-based policy module, which outputs the $Q$ -values based on the GNN-based communication messages. Both CBRP and HCOMM are discussed in the following subsections, and the details of CBRP and HCOMM can be found in Appendix.
87
+
88
+ # 3.1 STRUCTURED COMMUNICATION NETWORK MODULE
89
+
90
+ The structured communication network module takes the role of establishing a hierarchical structured communication network which will be employed in communication-based policy module. Two sub-modules are included, i.e., the weight generator and the Cluster Based Routing Protocol (CBRP). The weight generator sub-module aims to determine the importance weight for each agent automatically. It is modeled through a neural network $f _ { w g } : o w$ , where the weight $w$ can measure the confidence of an agent to become a center. Further, the CBRP sub-module employs the weights of all agents $\{ w _ { i } \}$ to construct the hierarchical structured communication network. To emphasize, the CBRP sub-module can be implemented in a distributed fashion, as a result, the central agents can be elected distributedly. This advantage ensures the practicability for large-scale case.
91
+
92
+ The CBRP method (Rezaee & Yaghmaee, 2009) is a typical method for establishing a hierarchical routing structure. The key idea for CBRP is that each agent will check whether central agent or agent that has larger weight $w$ exists in its receptive area. The agent will become a central agent if no above agent is found, else it will keep its own role. With enough checking steps, each agent will either be an central agent or in some central agents’ receptive. All agents can be separated into several groups with each central agent as the group leader. The overall hierarchical structured communication network further will be established by fully connecting all central agents from different groups and connecting the agents in each group to their central agent.
93
+
94
+ There is a strong connection between these two modules in LSC algorithm. Different generated weights will lead to different hierarchical structured communication network, which would cause diverse performance of the communication-based policy. Some experiment results also have confirmed that the weights have a great influence on the performance, which motivates us to train these two modules end-to-end. However the CBRP sub-module is not differentiable, which means the gradients cannot be back-propagated from communication-based policy module to the weight generator sub-module. Therefore, we introduce another RL task as an auxiliary, i.e., each agent takes its weight as an action by treating the communication-based policy module as an extra unobservable part of the environment, and receiving the same reward as the main RL task in the communication-based policy module discussed below. Moreover the weight $w$ is constrained in the integer set $\{ 0 , 1 , 2 , 3 , 4 \}$ . The action space becomes discrete, as a result DQN algorithm can be used again to train the weight generator. At this time, the weight generator can be regarded as a $Q$ -value function. The loss $\ell ( \theta ^ { w } )$ for the weight generator sub-module becomes clear as follows, with $y _ { i } = r _ { i } + \gamma \operatorname* { m a x } _ { \tilde { w } _ { i } } Q _ { \theta ^ { w } } ( \tilde { o } _ { i } , \tilde { w } _ { i } )$ . $r _ { i }$ denotes the reward received for agent $i$ from environment.n
95
+
96
+ $$
97
+ \ell ( \theta ^ { w } ) ^ { \smile } = \mathbb { E } _ { { \mathbf { o } } , { \mathbf { w } } , r , { \tilde { \mathbf { o } } } } \big [ \sum _ { i = 1 } ( Q _ { \theta ^ { w } } ( o _ { i } , w _ { i } ) - y _ { i } ) ^ { 2 } \big ] .
98
+ $$
99
+
100
+ # 3.2 COMMUNICATION-BASED POLICY MODULE
101
+
102
+ After the structured communication network topology is determined, the communication-based policy module will learn the communication content and generate the final global collaboration policy. The communication-based policy module consists of two sub-modules, i.e., GNN-based communication sub-module and the $Q$ -Net sub-module. The first one aims to learn the communication messages and further update overall state perception, while the other sub-module learns the policy based on the new state perceptions after efficient communication. Different from many existing works (Foerster et al., 2016; Das et al., 2019; Singh et al., 2019), the agents play differently in the GNN-base communication sub-module. Central agents should guarantee high-level information and dominate the agents in their driven groups respectively. The hope is that such a structure can ensure the effectiveness of communication and the efficiency of intra-group and inter-group collaboration.
103
+
104
+ Recall Figure 3, the well-established hierarchical structured communication network can be represented by a tuple $( \nu , \mathcal { E } )$ while the edges are directed. The node set $\nu$ contains $N _ { v }$ nodes which can be divided into the central node set $\mathcal { V } _ { c }$ and the normal node set $\nu _ { n }$ . For central node $i \in \mathcal { V } _ { c }$ , the node feature vector $v _ { i }$ includes the embedding feature $v _ { i } ^ { n }$ , the central role feature $v _ { i } ^ { c }$ and the global feature $v _ { i } ^ { g }$ ; for normal node $i \in \mathcal { V } _ { n }$ , the node feature vector $v _ { i }$ only includes the embedding feature $v _ { i } ^ { n }$ . For each edge $( i \to j ) \in \mathcal { E }$ with $i , j \in \mathcal { V }$ , the edge feature vector is denoted as $e _ { i j }$ . Functions $\phi$ and $\rho$ denote the update embedding function and aggregate function respectively. As shown in Figure 3, the overall GNN-based communication sub-module consists of three steps, and the GNN operation is detailed in Table 1 and as follows:
105
+
106
+ Step 1: Intra-group aggregation. In each group, the normal agent embeds their local information and sends it to the associated central agent $j \in \mathcal { V } _ { c }$ ; the central agent aggregates the information from all associated normal agents and updates its central role feature;
107
+
108
+ Step 2: Inter-group sharing. The central agent communicates with the other central agent with cluster information, further aggregates the received and indicates the global perception;
109
+
110
+ Step 3: Intra-group sharing. The central agent communicates all its feature with the associated normal agents while the normal agent aggregates the received information from central agents. Both the embedding feature of central and normal agents will be updated.
111
+
112
+ Table 1: GNN-based Communication Architecture
113
+
114
+ <table><tr><td rowspan=1 colspan=1>Type</td><td rowspan=1 colspan=1>Edge(i→j)∈ε</td><td rowspan=1 colspan=1>EdgeUpdateScheme</td><td rowspan=1 colspan=2>NodeUpdateScheme</td></tr><tr><td rowspan=1 colspan=1>Step1:intra-group aggregation</td><td rowspan=1 colspan=1>i∈Vn,j∈Vc</td><td rowspan=1 colspan=1>eij=(u),ej=p({eijf(i→)∈ε)</td><td rowspan=1 colspan=1>u=Φ(ej,u&quot;)</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>Step 2: inter-group sharing</td><td rowspan=1 colspan=1>iEVc,j∈Vc</td><td rowspan=1 colspan=1>eij=Φ(u,u),ej=p({eij(i→j)∈ε)</td><td rowspan=1 colspan=2>u=Φ(e,)</td></tr><tr><td rowspan=1 colspan=1>Step 3: intra-group sharing</td><td rowspan=1 colspan=1>iEVc,jEVnUVc</td><td rowspan=1 colspan=1>eij=(u,v,v),ej=p({eijs(i→)∈ε)</td><td rowspan=1 colspan=2>U=Φ(e,U),U=Φ(ej,U&quot;)</td></tr></table>
115
+
116
+ Table 2: Comparison of different MARL algorithms for communication efficiency.
117
+
118
+ <table><tr><td rowspan=1 colspan=1>Algorithm</td><td rowspan=1 colspan=1>DIAL</td><td rowspan=1 colspan=1>CommNet</td><td rowspan=1 colspan=1>IC3</td><td rowspan=1 colspan=1>ATOC</td><td rowspan=1 colspan=1>LSC</td></tr><tr><td rowspan=1 colspan=1>Nmsg</td><td rowspan=1 colspan=1>O(n2)</td><td rowspan=1 colspan=1>O(n)</td><td rowspan=1 colspan=1>O(n)</td><td rowspan=1 colspan=1>O(kb)</td><td rowspan=1 colspan=1>O(k² + kb)</td></tr><tr><td rowspan=1 colspan=1>Nstep</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>O(d)</td><td rowspan=1 colspan=1>0(1)</td></tr><tr><td rowspan=1 colspan=1>Nb-r</td><td rowspan=1 colspan=1>O(n)</td><td rowspan=1 colspan=1>O(n)</td><td rowspan=1 colspan=1>O(n)</td><td rowspan=1 colspan=1>0(6)</td><td rowspan=1 colspan=1>O(max(b,k))</td></tr></table>
119
+
120
+ The GNN-based communication sub-module is modeled as a GNN $( f _ { \theta ^ { g n n } } )$ with parameter $\theta ^ { g n n }$ , while the following $Q$ -Net of agent $i$ $( Q _ { \theta ^ { Q } } ^ { i } )$ is parameterized by shared parameter $\bar { \theta } ^ { Q }$ . The gradient can be back-propagated from $Q$ -Net to the graph neural network, as a result the overall loss of communication based policy module is as follows:
121
+
122
+ $$
123
+ \ell ( \theta ^ { Q } , \theta ^ { g n n } ) : = \mathbb { E } _ { { \mathbf { o } } , { \mathbf { a } } , r , { \tilde { \mathbf { o } } } } \left[ \sum _ { i = 1 } ^ { n } \left( Q _ { \theta ^ { Q } } ^ { i } \big ( f _ { \theta ^ { g n n } } ( \mathbf { o } ) , a _ { i } \big ) - y _ { i } \right) ^ { 2 } \right] ,
124
+ $$
125
+
126
+ where $\begin{array} { r } { y _ { i } \ = \ r _ { i } + \gamma \operatorname* { m a x } _ { { \tilde { a } } _ { i } } Q _ { \theta ^ { Q } } ^ { i } \big ( f _ { \theta ^ { g n n } } ( \tilde { \mathbf { o } } ) , \tilde { a } _ { i } \big ) } \end{array}$ . $r _ { i }$ denotes the reward received for agent $i$ from environment. Some softly updating scheme is further employed to update target network, i.e.,
127
+
128
+ $$
129
+ \theta ^ { \tilde { Q } } = \tau \theta ^ { Q } + ( 1 - \tau ) \theta ^ { \tilde { Q } } , \quad \mathrm { a n d } \quad \theta ^ { g \tilde { n } n } = \tau \theta ^ { g n n } + ( 1 - \tau ) \theta ^ { g \tilde { n } n } .
130
+ $$
131
+
132
+ Here we discuss communication efficiency from three aspects: the number of message exchanging $( N _ { m s g } )$ among agents; the number of steps during the communication procedure $( N _ { s t e p } )$ ; the communication bandwidth and range requirements for each agent $( N _ { b - r } )$ , and $n$ is the total number of agents. The details about communication efficiency are presented in Table 2 for each stage of the MARL algorithms. For DIAL, each agent communicates with all other agents based on the fullyconnected network, which results in $\bar { \mathcal { O } } ( n ^ { 2 } )$ message exchanging complexity. DIAL need only one communication step, however the communication bandwidth and range requirement for each agent is high and in the order of ${ \mathcal { O } } ( n )$ . Different from DIAL, CommNet and IC3 both employ the star communication network, as a result the number of message exchanging is in the order of ${ \mathcal { O } } ( n )$ . $N _ { s t e p }$ and $N _ { b - r }$ are the same as DIAL. The communication complexity of ATOC and our proposed LSC depends on the number of groups (denoted as $k < n$ , which is automatically determined in the algorithms) and the maximum output degree of the communication network (denoted as $b < n$ ). For ATOC, the communication network it tree-type, so that it only need to exchange $\mathcal { O } ( k b )$ messages. However, the number of steps is larger for ATOC for its sequential property and is in the order of $\mathcal O ( d )$ $\cdot d$ denotes the depth of the communication network). $N _ { b - r }$ will become much smaller to be ${ \mathcal { O } } ( b )$ because communication happens in groups. Furthermore for our LSC, the number of message exchanging is a bit larger than ATOC due to the communication among all elected centers, i.e., $\check { \mathcal { O } } ( k ^ { 2 } + k b )$ . However the depth of the hierarchical communication network is only two which results in $\mathcal { O } ( 1 )$ communication steps, while $N _ { b - r }$ is in the order of ${ \mathcal { O } } ( \operatorname* { m a x } ( b , k ) )$ . Overall, our LSC algorithm has advantage in the communication efficiency.
133
+
134
+ # 4 EXPERIMENTS
135
+
136
+ We compare LSC with state-of-the-art MARL methods in two large-scale battle environments, i.e., the grid world platform MAgent (Zheng et al., 2017) and StarCraft2 (Samvelyan et al., 2019), to evaluate their performances from aspects of both network structure and communication.
137
+
138
+ # 4.1 LARGE SCALE BATTLE GAME IN MAGENT
139
+
140
+ Settings. In a MAgent battle, agents fighting against enemies in a $4 0 \times 4 0$ grid world. Each agent only receives its local observation, acts independently and cooperatively, and further gains its reward. The goal for each agent is to attack its enemies and prevent them from being attacked. Each agent from both sides has a $6 \times 6$ visual field and can attack its 8 adjacent grids. The speed, attack power and health point for each agent are 1, 1 and 4, which are increased to 2, 2 and 10 for the enemy to increase the difficulty. The reward is $+ 5$ for successfully attacking an enemy, $- 2$ for being killed and $- 0 . 0 1$ for attacking a blank grid.
141
+
142
+ ![](images/bd036eca6c6cac1c0596d05aee84084283dca2cc55f958da5ce2638174641d2e.jpg)
143
+
144
+ Baselines. To evaluate the effects of communication scheme, three peer methods on learning to communicate for MARL, i.e., CommNet, IC3 and ATOC, are chosen to compete with our proposed LSC. Considering the weakness of mean aggregation, we replace the aggregation function of CommNet and IC3 with GNN which is same as LSC. The group radius is 6, the same as the visual field, in ATOC and LSC. All communication messages are embedded to 3-dimension vectors for cost-effectiveness. Besides, two MARL methods with no communication, i.e., IDQN and MFQ are also compared, since they are widely used in large-scale environments. In MAgent, the policy of enemy is pretrained by IDQN.
145
+
146
+ Policy performance. Figure 5(a) and Table 3 show the overall performances of compared algorithm in a 64 vs. 64 battle. The learning curves in Figure 5(a) present the average reward of different agents by epoch. LSC achieves better rewards quickly after 700 epochs and finally converges to an obvious higher point (about 1.15) than baselines. Table 3 and Table 4 give quantitative comparisons of these methods. Each algorithm is given 50 trials with its well-trained model. Mean-reward, $N _ { k i l l }$ , $N _ { d e a d }$ , $R a t i o _ { k d }$ in Table 3 denote the mean of average final rewards of agents, the number of killed enemies and dead agents, and the ratio $N _ { k i l l } / N _ { d e a d }$ , respectively. Following Figure 5(a), LSC can obtain a better mean reward stably, with a $3 0 \%$ performance advantage at least. $N _ { k i l l }$ are similar, because all approaches fulfill the mission, and beat the pre-trained IDQN. It is achieved by LSC with the least casualty, i.e., the smallest $N _ { d e a d }$ and the highest $R a t i o _ { k d }$ . Table 4 gives the comparisons in terms of the number of epochs to achieve the same reward value from 0.7 to 1.2 within maximal 1750 epochs in the training procedure. One can see that LSC needs fewer epochs to achieve the same reward compared with all the other algorithms, while more reward can be guaranteed within the maximal epochs. These results indicate that LSC can promote collaboration and cooperation, and produce superior policies.
147
+
148
+ Communication effectiveness. As observed from the blue and orange curves in Figure 5(a) and the first and fifth columns in Table 3, that LSC outperforms IDQN greatly. Since IDQN is the special case of LSC without communication procedure, this phenomenon demonstrates the usefulness of our proposed communication solution. Meanwhile, it can be noted that LSC also surpasses other MARL with communication algorithms, which is the consequence of its advanced structure. As mentioned in our experiments, CommNet and IC3 adopt the same message dimension and the same aggregation function as LSC, which leads to better performances than the original versions. However, the star structure makes the center node need to process all agents’ information in CommNet and IC3. When the agent number increases, the message extraction could be difficult. Thus, the final performances cannot be compared with the LSC. For ATOC in large scale environments, the message needs to jump multiple times between local circles, and multiple information aggregation and extraction bring in approximation error, which results in policy deterioration.
149
+
150
+ Scalability. Figure 5(b) shows the total reward curves of team by the agent number (10-99). Especially when the team has 99 agents, the reward of LSC is 1.45-2.75 times of other methods. It can be seen that the structured communication of LSC confers superior performances at different scales, because it utilizes the divide-and-conquer strategy to automatically group local agents and aggregate centers. In Figure 5(b) When the agent number is less than 80, the communication between agents can help to learn policy, so the orange dashed line is almost bellow other lines. When the number is more than 80, the demand of star-style information processing exceed the ability of aggregation network, thus CommNet and IC3 are inferior to IDQN. For ATOC, the jump of message becomes the bottleneck as the agent number increases, as inspected in the analysis above. To sum up, the experiments indicate LSC obviously has better scalability than the baseline.
151
+
152
+ Table 3: Performance comparisons in terms of average mean-reward, numbers and ratio of kills and death (64 vs. 64 agents, in 50 testing trials). The bold stands for the best result in each row.
153
+
154
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>LSC</td><td rowspan=1 colspan=1>CommNet</td><td rowspan=1 colspan=1>IC3</td><td rowspan=1 colspan=1>ATOC</td><td rowspan=1 colspan=1>IDQN</td><td rowspan=1 colspan=1>MFQ</td></tr><tr><td rowspan=1 colspan=1>Mean-reward</td><td rowspan=1 colspan=1>1.11</td><td rowspan=1 colspan=1>0.86</td><td rowspan=1 colspan=1>0.93</td><td rowspan=1 colspan=1>0.58</td><td rowspan=1 colspan=1>0.8</td><td rowspan=1 colspan=1>0.83</td></tr><tr><td rowspan=1 colspan=1>Nkill</td><td rowspan=1 colspan=1>62.6</td><td rowspan=1 colspan=1>61.3</td><td rowspan=1 colspan=1>62.48</td><td rowspan=1 colspan=1>61.46</td><td rowspan=1 colspan=1>62.1</td><td rowspan=1 colspan=1>62</td></tr><tr><td rowspan=1 colspan=1>Ndead</td><td rowspan=1 colspan=1>28.9</td><td rowspan=1 colspan=1>31.64</td><td rowspan=1 colspan=1>32.0</td><td rowspan=1 colspan=1>51.42</td><td rowspan=1 colspan=1>32.3</td><td rowspan=1 colspan=1>31.4</td></tr><tr><td rowspan=1 colspan=1>Ratiokd</td><td rowspan=1 colspan=1>2.16</td><td rowspan=1 colspan=1>1.93</td><td rowspan=1 colspan=1>1.95</td><td rowspan=1 colspan=1>1.20</td><td rowspan=1 colspan=1>1.92</td><td rowspan=1 colspan=1>1.97</td></tr></table>
155
+
156
+ Table 4: Comparisons on the used epoch number to achieve same reward of the training procedure in the MAgent environment.
157
+
158
+ <table><tr><td rowspan=1 colspan=1>Reward</td><td rowspan=1 colspan=1>LSC</td><td rowspan=1 colspan=1>CommNet</td><td rowspan=1 colspan=1>IC3</td><td rowspan=1 colspan=1>ATOC</td><td rowspan=1 colspan=1>IDQN</td><td rowspan=1 colspan=1>MFQ</td></tr><tr><td rowspan=1 colspan=1>0.7</td><td rowspan=1 colspan=1>769</td><td rowspan=1 colspan=1>1199</td><td rowspan=1 colspan=1>787</td><td rowspan=1 colspan=1>933</td><td rowspan=1 colspan=1>1133</td><td rowspan=1 colspan=1>1254</td></tr><tr><td rowspan=1 colspan=1>0.8</td><td rowspan=1 colspan=1>828</td><td rowspan=1 colspan=1>1292</td><td rowspan=1 colspan=1>935</td><td rowspan=1 colspan=1>1151</td><td rowspan=1 colspan=1>1460</td><td rowspan=1 colspan=1>1304</td></tr><tr><td rowspan=1 colspan=1>0.9</td><td rowspan=1 colspan=1>1051</td><td rowspan=1 colspan=1>1525</td><td rowspan=1 colspan=1>1508</td><td rowspan=1 colspan=1>1471</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>1426</td></tr><tr><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1271</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>1588</td><td rowspan=1 colspan=1>1506</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td></tr><tr><td rowspan=1 colspan=1>1.1</td><td rowspan=1 colspan=1>1413</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>1619</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td></tr><tr><td rowspan=1 colspan=1>1.2</td><td rowspan=1 colspan=1>1704</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td></tr></table>
159
+
160
+ ![](images/29236312a1f97ea6b57f01616db6dae3f5f0cf3ec7b6562fc25a7d4525f258bb.jpg)
161
+ Figure 6: Behavior illustration. The first row shows two typical behavior by LSC. In the second row, the top and bottom plot denote the early state and the near to final battle state, respectively.
162
+
163
+ Message visualization. To analyze the communication messages learned by GNN, we execute LSC with its well-trained policy 50 times, and visualize the 3 dimensional vector sent by central nodes in Figure 5. Observing Figure 5(c) and 5(d), after receiving messages, the majority of agents choose to move, and the minority choose to attack. This means that agents in LSC is very positive to adjust the team formation and then cooperate to attack. It is worthy to notice that most messages have a small norm (less than 10), and the norm of a large proportion is around 0. From the aspect of optimization, the redundant messages with larger norm will bring in more noise to other agents. In this way, LSC minimizes the impact of redundant messages on the final performance. This similar phenomenon that central nodes is nearly silent in many cases, is also mentioned by CommNet (Sukhbaatar et al., 2016). Therefore, the message representation module via the GNN-based communication module can generate meaningful and efficient messages theoretically and empirically.
164
+
165
+ Behavior pattern. Here, we demonstrate the battle tactics evolved for MARL via structured communication. To analyzed the globally cooperation strategy of LSC, we visualize the progress of the battle. For fairness, we start six algorithms from the same state in Figure 6(a). The typical behavior patterns learnt by LSC are presented in the figures of the first row. Via the intra-group communication and cooperation, in Figure 6(b), the blue team (LSC) organizes an encirclement to nearby red enemies; the team has a local numerical superiority, and focus agents’ fire to wipe out enemies, denoted by the black attack arrows in Figure 6(c). These show the intra-group cooperation of LSC. Upper figures in the second row of Figure 6 shows the situation of early stage (17 steps) after initialization for six methods, and lower figures show the states after 50 steps. From these results, we may arrive a conclusion that the team with our LSC can beat the opponent more quickly with a more aggressive policy. By intra-group and inter-group collaboration, Figure 6(d) LSC has carried out encircling and fire-focusing many times, and achieves an enormous advantage within only 17 steps, and wipe out the enemies within 50 steps. For both IDQN and MFQ, agents tend to cooperate within their visual range, and once the agents get separated out of visual range, they can hardly form global cooperation, which lead to the failure result in Figure 6(h) and 6(i). Similarly, agents controlled by ATOC communicate only among group range, thus they encounter similar situations. Agents for CommNet and IC3 have global communication, however once some agents get far away from the central agents, central agents can hardly understand their messages, making ineffective cooperation. As Figure 6(e) and 6(f), some agents get far away from the majority of agents, thus their results are not ideal. To sum up, in Figure 6(d), agents controlled by LSC form a global encircle strategy by communication in both intra-group and inter-group, thus LSC-based agents can wipe out enemies faster than the baselines.
166
+
167
+ # 4.2 LARGE SCALE BATTLE GAME IN STARCRAFT2
168
+
169
+ Battle game in StarCraft2 is a confrontation between two marine teams shown in appendix, which is much more complex than MAgent. Specifically, we use a 25 vs. $\mathrm { 2 5 \ m a p }$ , i.e., $\bf { 2 5 m }$ , where the range vision is 9 and the map size is $1 9 2 0 \times 1 2 0 0$ . To evaluate the cooperation, agents one team are controlled by the individual learned policy. Here, we compare our LSC with IQDN, Commnet and IC3. The action space consists of movement to an adjacent grid and shooting with the range 6. We adopt the same dense reward setting (0.44 for killing an enemy, 8.9 for winning the battle) as SMAC (Samvelyan et al., 2019). Agents of the enemy are controlled by the built-in game AI.
170
+
171
+ In Figure 7, LSC outperforms compared algorithms, where the blue reward curve is much higher than others. Although the agent number (25) is fewer than MAgent, the observation and action space of StarCraft2 are much larger, leading to the difficulty to learn policy. Therefore, the performance of IDQN and MFQ degrades notably in this complex environment, while LSC, IC3, CommNet and ATOC outperform it. This is because they entail communication to facilitate cooperation. Moreover, LSC outperforms IC3, CommNet and ATOC. This demonstrates that flexible hierarchical communication and expressive GNN-based message extraction make LSC more qualified for complex tasks than CommNet and IC3’s star-style communication.
172
+
173
+ ![](images/235460517f0307b26554e39c65610a801ed617f686502d36412eb10816620ebd.jpg)
174
+ Figure 7: Reward curves on StarCraft2
175
+
176
+ # 5 CONCLUSION AND FUTURE WORK
177
+
178
+ In this paper, a novel learning structured communication (LSC) algorithm is proposed for multiagent reinforcement learning. The hierarchical structure is self-learned by cluster based routing protocol. The communication message representation is naturally embedded and extracted via a graph neural network. Experiments in large-scale games (MAgent and StarCraft2) demonstrated that our LSC can outperform existing learning-to-communicate algorithms with better communication efficiency, cooperation capability, and scalability. In the future, we will improve LSC by considering some practical constraints, such as communication bandwidth and delay.
179
+
180
+ # REFERENCES
181
+
182
+ Jeffrey L Adler and Victor J Blue. A cooperative multi-agent transportation management and route guidance system. Transportation Research Part C: Emerging Technologies, 10(5-6):433–454, 2002.
183
+
184
+ Peter W. Battaglia, Jessica B. Hamrick, Victor Bapst, Alvaro Sanchez-Gonzalez, Vinicius Zambaldi, Mateusz Malinowski, Andrea Tacchetti, David Raposo, Adam Santoro, Ryan Faulkner, Caglar Gulcehre, Francis Song, Andrew Ballard, Justin Gilmer, George Dahl, Ashish Vaswani, Kelsey Allen, Charles Nash, Victoria Langston, Chris Dyer, Nicolas Heess, Daan Wierstra, Pushmeet Kohli, Matt Botvinick, Oriol Vinyals, Yujia Li, and Razvan Pascanu. Relational inductive biases, deep learning, and graph networks, 2018.
185
+
186
+ Abhishek Das, Theophile Gervet, Joshua Romoff, Dhruv Batra, Devi Parikh, Mike Rabbat, and ´ Joelle Pineau. TarMAC: Targeted multi-agent communication. In ICML, pp. 1538–1546, 2019.
187
+
188
+ Jakob Foerster, Ioannis Alexandros Assael, Nando de Freitas, and Shimon Whiteson. Learning to communicate with deep multi-agent reinforcement learning. In NeurIPS, pp. 2137–2145, 2016.
189
+
190
+ Jakob N Foerster, Gregory Farquhar, Triantafyllos Afouras, Nantas Nardelli, and Shimon Whiteson. Counterfactual multi-agent policy gradients. In AAAI, pp. 2974–2982, 2018.
191
+
192
+ Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. Neural message passing for quantum chemistry. In ICML, pp. 1263–1272, 2017.
193
+
194
+ Shariq Iqbal and Fei Sha. Actor-attention-critic for multi-agent reinforcement learning. In ICML, pp. 2961–2970, 2019.
195
+
196
+ Jiechuan Jiang and Zongqing Lu. Learning attentional communication for multi-agent cooperation. In NeurIPS, pp. 7254–7264, 2018.
197
+
198
+ Jiechuan Jiang, Chen Dun, and Zongqing Lu. Graph convolutional reinforcement learning for multiagent cooperation. ArXiv, abs/1810.09202, 2018.
199
+
200
+ Daewoo Kim, Sangwoo Moon, David Hostallero, Wan Ju Kang, Taeyoung Lee, Kyunghwan Son, and Yung Yi. Learning to schedule communication in multi-agent reinforcement learning. In ICLR, 2019.
201
+
202
+ Timothy Lillicrap, Jonathan Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. In ICLR, 2016.
203
+
204
+ Ryan Lowe, Yi Wu, Aviv Tamar, Jean Harb, OpenAI Pieter Abbeel, and Igor Mordatch. Multi-agent actor-critic for mixed cooperative-competitive environments. In NeurIPS, pp. 6379–6390, 2017.
205
+
206
+ Aleksandra Malysheva, Tegg Taekyong Sung, Chae-Bong Sohn, Daniel Kudenko, and Aleksei Shpilman. Deep multi-agent reinforcement learning with relevance graphs, 2018.
207
+
208
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin A Riedmiller, Andreas Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015.
209
+
210
+ Tabish Rashid, Mikayel Samvelyan, Christian Schroeder de Witt, Gregory Farquhar, Jakob Foerster, and Shimon Whiteson. QMIX: Monotonic value function factorisation for deep multi-agent reinforcement learning. In ICML, pp. 4292–4301, 2018.
211
+
212
+ M Rezaee and M Yaghmaee. Cluster based routing protocol for mobile ad hoc networks. INFOCOMP, 8(1):30–36, 2009.
213
+
214
+ Mikayel Samvelyan, Tabish Rashid, Christian Schroeder de Witt, Gregory Farquhar, Nantas Nardelli, Tim G. J. Rudner, Chia-Man Hung, Philiph H. S. Torr, Jakob Foerster, and Shimon Whiteson. The StarCraft Multi-Agent Challenge. CoRR, abs/1902.04043, 2019.
215
+
216
+ Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 20(1):61–80, 2008.
217
+
218
+ Elham Semsar-Kazerooni and Khashayar Khorasani. Multi-agent team cooperation: A game theory approach. Automatica, 45(10):2205–2213, 2009.
219
+
220
+ David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George van den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, Sander Dieleman, Dominik Grewe, John Nham, Nal Kalchbrenner, Ilya Sutskever, Timothy Lillicrap, Madeleine Leach, Koray Kavukcuoglu, Thore Graepel, and Demis Hassabis. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, January 2016.
221
+
222
+ Amanpreet Singh, Tushar Jain, and Sainbayar Sukhbaatar. Learning when to communicate at scale in multiagent cooperative and competitive tasks. In ICLR, 2019.
223
+
224
+ Sainbayar Sukhbaatar, Rob Fergus, et al. Learning multiagent communication with backpropagation. In NeurIPS, pp. 2244–2252, 2016.
225
+
226
+ Andrea Tacchetti, H. Francis Song, Pedro A. M. Mediano, Vinicius Zambaldi, Janos Kram ´ ar, Neil C. ´ Rabinowitz, Thore Graepel, Matthew Botvinick, and Peter W. Battaglia. Relational forward models for multi-agent learning. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id $=$ rJlEojAqFm.
227
+
228
+ Ardi Tampuu, Tambet Matiisen, Dorian Kodelja, Ilya Kuzovkin, Kristjan Korjus, Juhan Aru, Jaan Aru, and Raul Vicente. Multiagent cooperation and competition with deep reinforcement learning. PLOS ONE, 12(4):1–15, 2017.
229
+
230
+ Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, pp. 7794–7803, 2018.
231
+
232
+ Yaodong Yang, Rui Luo, Minne Li, Ming Zhou, Weinan Zhang, and Jun Wang. Mean field multiagent reinforcement learning. In ICML, pp. 5571–5580, 2018.
233
+
234
+ Lianmin Zheng, Jiacheng Yang, Han Cai, Ming Zhou, Weinan Zhang, and Yong Yu. MAgent: A many-agent reinforcement learning platform for artificial collective intelligence. In AAAI, pp. 8222–8223, 2017.
235
+
236
+ # A APPENDIX
237
+
238
+ # A.1 CBRP ALGORITHM AND HCOMM ALGORITHM
239
+
240
+ <table><tr><td colspan="2">Algorithm 2 CBRP: Cluster Based Routing Protocol</td></tr><tr><td>1: function CBRP(Vt,Vt),{wt,.,w}, 2: is the undecided nodes set and ε = ;</td><td>{POSst,..,POSst},d) Define neighbours are distance &lt; d,Te is a constant to control the max-waiting time,Vu = </td></tr><tr><td>3: 4: 5:</td><td>Each node i broadcast its weight wt to neighbours; for i is in central node set Vt do Maintain the structure</td></tr><tr><td></td><td>if there is a central nodes in neighbours and its weight is bigger than agent i then</td></tr><tr><td>6: 7:</td><td>Pop node i from Vt and append it to Vt ;</td></tr><tr><td>8:</td><td>for i is in normal nodes set Vt and no central node is in its neighbour do</td></tr><tr><td>9:</td><td>Pop node i from Vt and append it to Vu; Elect central nodes</td></tr><tr><td>10:</td><td>fori is in Vu concurrently do</td></tr><tr><td>11:</td><td>if does not receive larger weight for Te then</td></tr><tr><td></td><td>append i to Vt and broadcast to neighbours;</td></tr><tr><td>12:</td><td></td></tr><tr><td>13:</td><td>else</td></tr><tr><td>14:</td><td>Wait for the signal from central node for 2Te;</td></tr><tr><td>15:</td><td>if received a signal from central node then</td></tr><tr><td></td><td>append i to Vt;</td></tr><tr><td>16:</td><td>else</td></tr><tr><td>17:</td><td>append i to Vt;</td></tr><tr><td>18:</td><td>for i in Vt do √ generate communication link</td></tr><tr><td>19:</td><td>for j in Vt and j is neighbouring i do</td></tr><tr><td>20:</td><td>append eij = O and eji = O to ε;</td></tr><tr><td>21:</td><td></td></tr><tr><td>22:</td><td>for j in Vt do</td></tr><tr><td></td><td>append eij = 0 toε;</td></tr><tr><td>23:</td><td>Return (Vt,Vt,ε)</td></tr></table>
241
+
242
+ # A.2 DETAILS AND DISCUSSIONS OF ALL HYPERPARAMETERS
243
+
244
+ For both MAgent and StarCraft2 environments, the details of all hyperparameters used for approaches are summarized in the following Table 5 and Table 6. All common hyperparameters of all approaches are set to be the same in the same environments. Except for the ”ATOC”, we change the message dimension to 64 in both enviroments. For the reason that if the dimension of messages is set to be 3 as other algorithms, the necessary GRU embedding in ATOC leads to failure while 64 seems to be robust.
245
+
246
+ For the neural network setting in MAgent enviroment, the node encoder part are all implemented with two convolutional layers with 32 filters and kernel size 3 and a MLP with 256 units. For the $Q$ Encoder part, they are implemented with MLP(128, 64, 13). The message generators for algorithms except for ATOC are implemented with $\mathrm { M L P } ( 6 4 , 3 2 , 3 )$ and the aggregation functions are segment sum. While for ATOC, the message generator is MLP(128, 64) and the aggregation functin isGRU(64). As for neural network setting in Starcraft2, we only tune the input and output layer to adapt to the new environment. All these settings can ensure repeatability.
247
+
248
+ # A.3 BATTLE SCENARIOS OF MAGENT AND STARCRAFT2
249
+
250
+ # A.4 DISCUSSIONS ON WEIGHT GENERATOR AND GROUP RADIUS
251
+
252
+ Although LSC utilize the reward feedback to establish the weight generator, which will be various with respect to different settings. To investigate the improvement brought by our learned importance weight generator, we also compare with a basic random weight generator (randomly chosen the central nodes and separate normal nodes into groups). As shown in Figure 9(a), our learned weight generator significantly outperforms randomly. Faster convergence of our learned weight generator
253
+
254
+ # Algorithm 3 HCOMM: Communication based Policy Module
255
+
256
+ 1: function $\overline { { \mathrm { H C O M M } ( \mathcal { V } _ { n } , \mathcal { V } _ { c } , \mathcal { E } ) } }$
257
+ 2: $\sharp$ Intra-group aggregation
258
+ 3: for $v ^ { i }$ in $\nu _ { n }$ do
259
+ 4: for $v ^ { j }$ in $\mathcal { V } _ { c }$ and $( i j )$ in $\mathcal { E }$ do
260
+ 5: $e _ { i j } = \phi ^ { e n c } ( v ^ { i } )$ ; $\triangleright$ Generate normal to central messages
261
+ 6: for $v _ { j }$ in $\mathcal { V } _ { c }$ do $\bar { e } _ { j } = \rho ( \{ e _ { i j } \} _ { ( i j ) \in \mathcal { E } } )$ ; . Central agents aggregate received messages
262
+ 7: $v _ { j } ^ { c } = \phi ( \bar { e } _ { j } , v _ { j } ^ { n } ) ;$ . Generate cluster perception
263
+ 8: $\sharp$ Inter-group sharing
264
+ 9: for $v _ { j }$ in $\mathcal { V } _ { c }$ do
265
+ 10: for $v _ { i }$ in $\mathcal { V } _ { c }$ and $( i j )$ ) in $\mathcal { E }$ do
266
+ 11: $e _ { i j } = \phi ( v _ { i } ^ { c } , v _ { i } ^ { n } ) ;$ ; . Generate central to central messages
267
+ 12: for $v _ { j }$ in $\mathcal { V } _ { c }$ do
268
+ 14: 13: $\begin{array} { l } { \bar { e _ { j } } = \rho ( \{ e _ { i j } \} _ { ( i j ) \in \mathcal { E } } ) ; } \\ { v _ { j } ^ { g } = \phi ( \bar { e } _ { j } , v _ { j } ^ { n } ) ; } \end{array}$ . Aggregate received central to central messages $\triangleright$ Obtain global perception
269
+ 15: $\sharp$ Intro-group sharing
270
+ 16: for $v _ { i }$ in $\mathcal { V } _ { c }$ do
271
+ 17: for $v _ { j }$ in $\nu _ { n }$ and $( i j )$ in $\mathcal { E }$ do
272
+ 18: $\bar { e _ { i j } } = \phi ( v _ { i } ^ { g } , v _ { i } ^ { \dot { c } } , v _ { i } ^ { n } , e _ { j i } ) , \bar { e } _ { j } = \rho ( \{ e _ { i j } \} _ { ( i j ) \in \mathcal { E } } )$ ; $\triangleright$ Generate central to normal
273
+ messages
274
+ 19: for $v _ { j }$ in $\smash { \mathcal { V } _ { n } \cup \mathcal { V } _ { c } }$ do
275
+ 20: for $v _ { i }$ in $\mathcal { V } _ { c }$ and $( i j )$ in $\mathcal { E }$ do
276
+ 21: $\bar { e } _ { j } = \rho ( \{ e _ { i j } \} _ { ( i j ) \in \mathcal { E } } ) ;$ ; . Aggregate received central to normal messages
277
+ 22: vnj = φ(¯ej , vnj ); . Update states
278
+ 23: q j = Q ( v nj );
279
+ return q.
280
+
281
+ Table 5: Hyperparamaters for Magent
282
+
283
+ <table><tr><td rowspan=1 colspan=1>Parameter</td><td rowspan=1 colspan=1>LSC</td><td rowspan=1 colspan=1>IDQN</td><td rowspan=1 colspan=1>MFQ</td><td rowspan=1 colspan=1>CommNet</td><td rowspan=1 colspan=1>IC3</td><td rowspan=1 colspan=1>ATOC</td></tr><tr><td rowspan=1 colspan=1>Episodes</td><td rowspan=1 colspan=1>1750</td><td rowspan=1 colspan=1>1750</td><td rowspan=1 colspan=1>1750</td><td rowspan=1 colspan=1>1750</td><td rowspan=1 colspan=1>1750</td><td rowspan=1 colspan=1>1750</td></tr><tr><td rowspan=1 colspan=1>Estart</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td></tr><tr><td rowspan=1 colspan=1>Eend</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td></tr><tr><td rowspan=1 colspan=1>Learning rate</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td></tr><tr><td rowspan=1 colspan=1>Max env steps</td><td rowspan=1 colspan=1>400</td><td rowspan=1 colspan=1>400</td><td rowspan=1 colspan=1>400</td><td rowspan=1 colspan=1>400</td><td rowspan=1 colspan=1>400</td><td rowspan=1 colspan=1>400</td></tr><tr><td rowspan=1 colspan=1>dimension of messages</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>64</td></tr><tr><td rowspan=1 colspan=1>radius of communication</td><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>~</td><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>~</td><td rowspan=1 colspan=1>~</td><td rowspan=1 colspan=1>6</td></tr></table>
284
+
285
+ Table 6: Hyperparamaters for Starcraft2
286
+
287
+ <table><tr><td rowspan=1 colspan=1>Parameter</td><td rowspan=1 colspan=1>LSC</td><td rowspan=1 colspan=1>IDQN</td><td rowspan=1 colspan=1>MFQ</td><td rowspan=1 colspan=1>CommNet</td><td rowspan=1 colspan=1>IC3</td><td rowspan=1 colspan=1>ATOC</td></tr><tr><td rowspan=1 colspan=1>Total steps</td><td rowspan=1 colspan=1>600k</td><td rowspan=1 colspan=1>600k</td><td rowspan=1 colspan=1>600k</td><td rowspan=1 colspan=1>600k</td><td rowspan=1 colspan=1>600k</td><td rowspan=1 colspan=1>600k</td></tr><tr><td rowspan=1 colspan=1>Estart</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td></tr><tr><td rowspan=1 colspan=1>Eend</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.05</td></tr><tr><td rowspan=1 colspan=1>Learning rate</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td></tr><tr><td rowspan=1 colspan=1>Max env steps</td><td rowspan=1 colspan=1>10000</td><td rowspan=1 colspan=1>10000</td><td rowspan=1 colspan=1>10000</td><td rowspan=1 colspan=1>10000</td><td rowspan=1 colspan=1>10000</td><td rowspan=1 colspan=1>10000</td></tr><tr><td rowspan=1 colspan=1>dimension of messages</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>64</td></tr><tr><td rowspan=1 colspan=1>radius of communication</td><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>~</td><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>~</td><td rowspan=1 colspan=1>~</td><td rowspan=1 colspan=1>6</td></tr></table>
288
+
289
+ shows the efficiency brought by involving the reward guided weight generator. The hierarchical structured communication network guaranteed through the learned weight generator improves the communication efficiency. The higher average reward obtained by our learned weight generator also shows the necessity of selecting central nodes based on the learned weight generator rather than randomly chosen.
290
+
291
+ ![](images/26c5da0daac9a3bd939363d7da6a65e948cbc99ad56200d9e21ee1ea77d6268e.jpg)
292
+ Figure 8: Battle scenarios of MAgent and StarCraft2.
293
+
294
+ ![](images/06d61b4765147e2e2a74a8391fec2cd063e220488df5715e30b64056d05e6df6.jpg)
295
+ Figure 9: Discussions on weight generator and group radius.
296
+
297
+ To better investigate the hierarchical structure, we compare our LSC algorithm with respect to different group radius $d$ , i.e., 3, 6, 12 and 60. As shown in Figure 9(b), LSC with radius 6 outperform other settings. When the radius increasing, the agents can establish inter-groups cooperation easier. However, LSC with radius 60 performs worse than all the other three cases. LSC with extremely large radius will downgrade to CommNet which is not an effective way to extract valuable information.
parse/train/BklWt24tvH/BklWt24tvH_content_list.json ADDED
@@ -0,0 +1,1413 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "LEARNING STRUCTURED COMMUNICATION FOR MULTI-AGENT REINFORCEMENT LEARNING ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 99,
9
+ 759,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 171,
20
+ 398,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 234,
32
+ 544,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Learning to cooperate is crucial for many practical large-scale multi-agent applications. In this work, we consider an important collaborative task, in which agents learn to efficiently communicate with each other under a multi-agent reinforcement learning (MARL) setting. Despite the fact that there has been a number of existing works along this line, achieving global cooperation at scale is still challenging. In particular, most of the existing algorithms suffer from issues such as scalability and high communication complexity, in the sense that when the agent population is large, it can be difficult to extract effective information for highperformance MARL. In contrast, the proposed algorithmic framework, termed Learning Structured Communication (LSC), is not only scalable but also learns efficiently. The key idea is to allow the agents to dynamically learn a hierarchical communication structure, while under such a structure the graph neural network (GNN) is used to efficiently extract useful information to be exchanged between the neighboring agents. A number of new techniques are proposed to tightly integrate the communication structure learning, GNN optimization and MARL tasks. Extensive experiments are performed to demonstrate that, the proposed LSC framework enjoys high communication efficiency, scalability, and global cooperation capability. ",
40
+ "bbox": [
41
+ 233,
42
+ 266,
43
+ 764,
44
+ 517
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 178,
54
+ 544,
55
+ 336,
56
+ 560
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Reinforcement learning (RL) has achieved remarkable success in solving single-agent sequential decision problems under interactive and complicated environments, such as games (Mnih et al., 2015; Silver et al., 2016) and robotics (Lillicrap et al., 2016). In many real world applications such as intelligent transportation systems (Adler & Blue, 2002) and unmanned systems(Semsar-Kazerooni & Khorasani, 2009), not only one, but usually a large number of agents are involved in the learning tasks. Such a setting naturally leads to the popular multi-agent reinforcement learning (MARL) problems, where the key research challenges include how to design scalable and efficient learning schemes under an unstationary environment (caused by partial observation and/or the dynamics of other agents’ policies), with large and/or dynamic problem dimension, and complicated and uncertain relationship between agents. ",
63
+ "bbox": [
64
+ 174,
65
+ 575,
66
+ 825,
67
+ 714
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Learning to communicate among agents has been regarded as an effective manner to strengthen the inter-agent collaboration and ultimately improve the quality of policies learned by MARL. Various communication-based MARL algorithms have been devised recently, e.g., DIAL (Foerster et al., 2016), CommNet (Sukhbaatar et al., 2016), ATOC (Jiang & Lu, 2018), IC3Net (Singh et al., 2019) and TarMAC (Das et al., 2019). These schemes aim to improve the inter-agent collaboration by learning communication strategy to exchange information between agents. However, there are still two bottlenecks unresolved, especially when faced a large number of agents. ",
74
+ "bbox": [
75
+ 174,
76
+ 722,
77
+ 825,
78
+ 819
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "One bottleneck lies in that achieving effective communication and global collaboration is difficult with limited resources, such as narrow communication bandwidth and energy. In particular, DIAL and TarMAC require each agent to communicate with all the other agents, i.e., a fully-connected communication network (Figure 1(a)), which is not feasible for large scale scenarios with geographically apart agents. CommNet and IC3 assume a star network (Figure 1(b)) with a central node coordinating the global collaboration of agents, which again does not allow large scale scenarios with long range communications. ATOC introduces an interesting attention scheme to build a tree communication network (Figure 1(c)). While the tree network can be scaled, global collaboration has to be realized through inefficient multi-hop and sequential communications. In a word, improper communication topologies will limit the cooperation ability in large scale scenarios. ",
85
+ "bbox": [
86
+ 174,
87
+ 825,
88
+ 823,
89
+ 924
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/09eb91c9b734e9c9c8c44815a4bfcd72f7394328b5f4c9833ea0779c7f89056d.jpg",
96
+ "image_caption": [
97
+ "Figure 1: Topology of different communication structures and LSC falls into the hierarchical one. "
98
+ ],
99
+ "image_footnote": [],
100
+ "bbox": [
101
+ 196,
102
+ 104,
103
+ 795,
104
+ 213
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "",
111
+ "bbox": [
112
+ 174,
113
+ 251,
114
+ 825,
115
+ 294
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "Another bottleneck is the difficulty of extracting essential information to exchange between agents for achieving high-performance MARL, especially when the number of agents grows. Most of the existing works simply concatenate, take the mean or use the LSTM to extract information to be exchanged. First two lack in considering the inter-relationship between agents, and LSTM assumes that there is a fixed sequence of message passing between agents, that is, the relationship between agents is predefined. Recently, TarMAC utilized an attention scheme to aggregate messages by considering the relationship from each agent to all others. However, the improper communication topology still hinders the information extraction. The communication structure needs to be jointly designed with the information extraction scheme to achieve further improved learning performance. ",
122
+ "bbox": [
123
+ 173,
124
+ 300,
125
+ 825,
126
+ 426
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "image",
132
+ "img_path": "images/9a2b7a55ae6e8e9eccd61d39a980a7266b618c0db2f5d7c0308e71dc88ab74d0.jpg",
133
+ "image_caption": [
134
+ "Figure 2: Procedure for dynamically establishing structured communication network. Left: Each agent determines its communication importance weight based on partial local observation. For instance, the agent “G” finds the target (red square), then it will be possible to get a higher weight “4” and become the central. Right: The importance weight generation step and network construction step will be repeated iteratively. After communication and action procedures, agents will generate their new communication importance weights, and determine to keep or change their roles respectively. Further, the structured communication network will be re-established. "
135
+ ],
136
+ "image_footnote": [],
137
+ "bbox": [
138
+ 171,
139
+ 448,
140
+ 823,
141
+ 560
142
+ ],
143
+ "page_idx": 1
144
+ },
145
+ {
146
+ "type": "text",
147
+ "text": "To address the above two issues, we propose a novel structured communication-based algorithm, called learning structured communication (LSC). Our LSC combines a structured communication network module and a communication-based policy module, which aims to establish a scalable hierarchically structured network and information exchange scheme for large scale MARL. In particular, a hierarchically structured communication network (Figure 1(d)) is dynamically learned based on local partial observations of agents. In the hierarchically structured network, all agents are grouped into clusters, where global collaboration can be achieved via intra-group and inter-group communications. In contrast to the other three types in Figure 1, the proposed hierarchical communication network is more flexible and scalable, with fewer resources needed to achieve long-range and global collaboration. ",
148
+ "bbox": [
149
+ 173,
150
+ 680,
151
+ 825,
152
+ 819
153
+ ],
154
+ "page_idx": 1
155
+ },
156
+ {
157
+ "type": "text",
158
+ "text": "The procedure to establish such a hierarchically structured communication network is shown in Figure 2. To better utilize the relationship between agents given the hierarchically structured communication network and obtain more effective information extraction, graph neural network (GNN) (Scarselli et al., 2008) is employed. In GNN, each communication step involves information embedding and aggregation. Benefiting from the unordered aggregation power and the dynamic graph adaptability of GNN, the proposed LSC algorithm can extract valuable information effectively. The GNN-based information extraction procedure is depicted in Figure 3. ",
159
+ "bbox": [
160
+ 173,
161
+ 825,
162
+ 825,
163
+ 924
164
+ ],
165
+ "page_idx": 1
166
+ },
167
+ {
168
+ "type": "image",
169
+ "img_path": "images/04e07a7ce05f083c607e123a87efcdbeaa43bf76832c324f1095069d0987aa28.jpg",
170
+ "image_caption": [
171
+ "Figure 3: GNN-based communication extraction procedure. Each node denotes an agent. The edge embedding can be considered as the communication message. The network learning procedure properly fits the communication procedure, and effectively learn valuable messages involving the global network structure and agents relationship. Left: Low-level normal agents transfer their local valuable embeddings to the associated central agents. Middle: High-level central agents communicate with each other to gain a sense of global perception. Right: All central agents broadcast embedding information to their normal agents to form global cooperation. "
172
+ ],
173
+ "image_footnote": [],
174
+ "bbox": [
175
+ 173,
176
+ 98,
177
+ 826,
178
+ 203
179
+ ],
180
+ "page_idx": 2
181
+ },
182
+ {
183
+ "type": "text",
184
+ "text": "This paper is devoted to the learning of communication structure among agents. To our knowledge, this is the first work of hierarchical structured learning to communication for MARL. It allows to learn communication structure adaptively instead of using predefined forms. Specifically: ",
185
+ "bbox": [
186
+ 176,
187
+ 334,
188
+ 825,
189
+ 376
190
+ ],
191
+ "page_idx": 2
192
+ },
193
+ {
194
+ "type": "text",
195
+ "text": "i) To improve scalability for a large number of agents, a hierarchical structure is devised that divides the agents into higher-level central agents and sub-level normal ones. As such, the communication network is sparsified. While it still allows for more effective global cooperation via message passing among the central agents, compared with the star/tree structures. ",
196
+ "bbox": [
197
+ 174,
198
+ 380,
199
+ 825,
200
+ 435
201
+ ],
202
+ "page_idx": 2
203
+ },
204
+ {
205
+ "type": "text",
206
+ "text": "ii) For effective communication and global cooperation, the message representation learning is deeply integrated into the information aggregating and permeating through the network, via graph neural network (GNN), which is a natural combination with the hierarchical communication structure. ",
207
+ "bbox": [
208
+ 176,
209
+ 439,
210
+ 825,
211
+ 494
212
+ ],
213
+ "page_idx": 2
214
+ },
215
+ {
216
+ "type": "text",
217
+ "text": "iii) Extensive experiments on both MAgent and StarCraft2 show our approach achieves state-of-theart scalability and effectiveness on large-scale MARL problems. ",
218
+ "bbox": [
219
+ 174,
220
+ 498,
221
+ 821,
222
+ 526
223
+ ],
224
+ "page_idx": 2
225
+ },
226
+ {
227
+ "type": "text",
228
+ "text": "2 RELATED WORK AND PRELIMINARIES ",
229
+ "text_level": 1,
230
+ "bbox": [
231
+ 174,
232
+ 550,
233
+ 524,
234
+ 565
235
+ ],
236
+ "page_idx": 2
237
+ },
238
+ {
239
+ "type": "text",
240
+ "text": "Many multi-agent reinforcement learning algorithms without communication in the inference procedure have experienced fast development. Recent works like MADDPG (Lowe et al., 2017), QMIX (Rashid et al., 2018), COMA (Foerster et al., 2018) and MAAC (Iqbal & Sha, 2019) adopt a centralized training and decentralized implementing framework. All agents’ local observations and actions are considered to improve the learning stability. These algorithms are generally not suitable for large-scale case due to explosive growing number of agents. ",
241
+ "bbox": [
242
+ 174,
243
+ 583,
244
+ 825,
245
+ 667
246
+ ],
247
+ "page_idx": 2
248
+ },
249
+ {
250
+ "type": "text",
251
+ "text": "Communication-based MARL algorithms have been showed effective for large-scale agent cooperation. Earlier works assume that all agents need to communicate with each other. DIAL (Foerster et al., 2016) learns to communication through back-propagating all other agents’ gradients to the message generator network. Similarly, CommNet (Sukhbaatar et al., 2016) sends all agents’ hidden states to the shared communication channel and further learns the message based on the average of all other hidden states. MFRL (Yang et al., 2018) approximates the influence of other agents by averaging the actions of surrounding neighbor agents, which could mitigate the dimensional disaster for large-scale cases. However, this can be considered as a predefined communication pattern, which is unable to adapt to complex large-scale scenarios. Communication between all agents will lead to high communication complexity and difficulty of useful information extraction. DGN (Jiang et al., 2018) employs graph convolution network (GCN) to extract relationships between agents which could result in better collaboration. However, it considers all agents equivalently and assumes the communication of each agent has to involve all neighbor agents which limits to adapt to more practical bandwidth-limited environments. IC3Net (Singh et al., 2019) uses a communication gate to decide whether to communicate with the center, but adopt the same star structure like CommNet which requires high bandwidth and can hard to extract valuable information with only one center. ATOC (Jiang & Lu, 2018) and TarMAC (Das et al., 2019) introduce the attention mechanism to determine when to communicate and whom to communicate with, respectively. TarMAC focuses more on message aggregation rather than the communication structure. SchedNet (Kim et al., 2019) aims to learn a weight-based scheduler to determine the communication sequence and priority. From the perspective of employing GNN into MARL, MAGNet (Malysheva et al., 2018) that utilizes a relevance graph representation of the environment and a message passing mechanism to help agents learning. However, it requires heuristic rules to establish the graph which is hard to achieve in complex environments. RFM (Tacchetti et al., 2019) use graph to represent the relationship between different entities, aiming to provide interpretable representations. ",
252
+ "bbox": [
253
+ 174,
254
+ 674,
255
+ 825,
256
+ 924
257
+ ],
258
+ "page_idx": 2
259
+ },
260
+ {
261
+ "type": "text",
262
+ "text": "",
263
+ "bbox": [
264
+ 174,
265
+ 103,
266
+ 825,
267
+ 202
268
+ ],
269
+ "page_idx": 3
270
+ },
271
+ {
272
+ "type": "text",
273
+ "text": "Before the main method, we introduce some preliminaries to facilitate the presentation. ",
274
+ "bbox": [
275
+ 176,
276
+ 208,
277
+ 745,
278
+ 222
279
+ ],
280
+ "page_idx": 3
281
+ },
282
+ {
283
+ "type": "text",
284
+ "text": "Partial Observable Stochastic Games. In stochastic games, agents learn policies by maximizing their cumulative rewards through interacting with the environment and other agents. The partial observable stochastic games (POSG) can be characterized as a tuple $\\langle \\mathcal { T } , \\mathcal { S } , \\mathfrak { b } ^ { 0 } , \\mathcal { A } , \\mathcal { O } , \\mathcal { P } , \\mathcal { P } _ { e } , \\mathcal { \\bar { R } } \\rangle$ where $\\mathcal { T }$ denotes the set of agents indexed from 1 to $n ; S$ denotes the finite set of states; $b ^ { 0 }$ represents the initial state distribution and $\\mathcal { A }$ denotes the set of joint actions. $A _ { i }$ is the action space of agent $i$ , $\\mathbf { a } = \\langle a _ { 1 } , \\cdot , a _ { n } \\rangle$ denotes a joint action; $\\mathcal { O }$ denotes the joint observations and $O _ { i }$ is the observation space for agent $i$ , $\\mathbf { o } = \\langle o _ { 1 } , \\cdot , o _ { n } \\rangle$ denotes a joint observation; $\\mathcal { P }$ denotes the Markovian transition distribution with $P \\left( \\tilde { s } , \\mathbf { o } | s , \\mathbf { a } \\right)$ as the probability of state $s$ transit to $\\tilde { s }$ and result o after taking action a. $\\mathcal { P } _ { e } ( o | s )$ is the Markovian observation emission probability function. $\\mathcal { R } : \\mathcal { S } \\times \\mathcal { A } \\mathbb { R } ^ { n }$ means the reward function for agents. The overall task of the MARL problem can be solved by properly objective function modeling, which also indicates the relationship among agents, e.g., cooperation, competition or mixed. ",
285
+ "bbox": [
286
+ 173,
287
+ 223,
288
+ 825,
289
+ 392
290
+ ],
291
+ "page_idx": 3
292
+ },
293
+ {
294
+ "type": "text",
295
+ "text": "Graph Neural Network. Graph neural network (GNN) (Scarselli et al., 2008) is a deep embedding framework to handle graph-based data on a graph $\\mathcal { G } = ( \\nu , \\mathcal { E } )$ . $\\mathbf { v } _ { i }$ denotes the node feature vector for node $v _ { i } \\in \\mathcal V$ (for $N _ { v }$ nodes), $\\mathbf { e } _ { k }$ denotes the edge feature vector for edge $e _ { k } \\in \\mathcal { E }$ (for $N _ { e }$ edges) with $r _ { k } , s _ { k }$ be the receiver and sender of edge $e _ { k }$ respectively. The vector u denotes the global feature. The graph network framework in (Battaglia et al., 2018) is employed, which divides computation on graph data to several blocks to gain flexible processing ability. Each block introduces the aggregation and embedding functions to handle graph data. There are many variants of GNN, like messagepassing neural network (Gilmer et al., 2017) and non local neural networks (Wang et al., 2018). By treating every agent as a node and each communication message exchanging as the edge in a graph, the observations and messages as the attributes of nodes and edges, respectively. The whole communication process can be formulated to a graph neural network. The relationships among agents can be effectively extracted to enable efficient communication message learning. ",
296
+ "bbox": [
297
+ 173,
298
+ 393,
299
+ 825,
300
+ 559
301
+ ],
302
+ "page_idx": 3
303
+ },
304
+ {
305
+ "type": "text",
306
+ "text": "Independent Deep Q-Learning. Deep $Q$ -Network (DQN) (Mnih et al., 2015) is popular in deep reinforcement learning, which is one of the few RL algorithms applicable for large-scale MARL. In each step, each agent observes state $s$ and takes an action $a$ based on policy $\\pi$ . It receives reward $r$ and next state $\\tilde { s }$ from environment. To maximize the cumulative reward $\\boldsymbol { R } = \\textstyle \\sum _ { t } \\boldsymbol { r } _ { t }$ , DQN learns the action-value function $Q ^ { \\pi } ( s , a ) = \\mathbb { E } _ { s \\sim \\mathcal { P } , a \\sim \\pi ( s ) }$ $[ R _ { t } | s _ { t } = s , a _ { t } = a ]$ by minimizing $\\mathcal { L } ( \\boldsymbol { \\theta } ) = \\mathbb { E } _ { s , a , r , \\tilde { s } } \\left[ \\tilde { y } - Q ( s , a ; \\boldsymbol { \\theta } ) \\right]$ , where $\\tilde { y } = r + \\gamma \\operatorname* { m a x } _ { \\tilde { a } } Q \\left( \\tilde { s } , \\tilde { a } ; \\theta \\right)$ . The agent follows $\\epsilon$ -greedy policy, that is, selects the action that maximizes the $Q$ -value with probability $_ { 1 - \\epsilon }$ or randomly. The Independent Deep $Q$ -Learning (IDQN) (Tampuu et al., 2017) is an extension of DQN by ignoring the influence of other agents for multi-agent case. Every agent learns a $Q$ -function $Q ^ { a } ( u ^ { a } | s ; \\theta ^ { a } )$ based on its own observation and received reward. ",
307
+ "bbox": [
308
+ 173,
309
+ 560,
310
+ 825,
311
+ 699
312
+ ],
313
+ "page_idx": 3
314
+ },
315
+ {
316
+ "type": "text",
317
+ "text": "Our algorithm employs DQN as the basic RL algorithm based on the following two considerations: 1) our algorithm is dedicated to discuss the learning communication mechanism in largescaleMARL scenarios, as a result we can choose a concise and effective basic RL algorithm like thewell-known DQN; 2) data collection in large-scale MARL environments is extremely inefficiently,while DQN has excellent data efficiency as an offline RL algorithm. ",
318
+ "bbox": [
319
+ 174,
320
+ 707,
321
+ 823,
322
+ 776
323
+ ],
324
+ "page_idx": 3
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "3 LSC: LEARNING STRUCTURED COMMUNICATION ",
329
+ "text_level": 1,
330
+ "bbox": [
331
+ 174,
332
+ 804,
333
+ 619,
334
+ 820
335
+ ],
336
+ "page_idx": 3
337
+ },
338
+ {
339
+ "type": "text",
340
+ "text": "Our communication architecture has two key modules: structured communication network module and communication-based policy module, shown in Figure 4. The first module aims to establish the dynamic hierarchical structured communication network in a distributed fashion, while the second module contains the GNN-based communication extraction and $Q$ -network components. Without loss of generality, we use DQN as the basic reinforcement algorithm, however our approach can incorporate any value-based or actor-critic methods. The details of LSC is depicted in Algorithm 1 ",
341
+ "bbox": [
342
+ 174,
343
+ 840,
344
+ 825,
345
+ 922
346
+ ],
347
+ "page_idx": 3
348
+ },
349
+ {
350
+ "type": "image",
351
+ "img_path": "images/048ed0234ca042406849a542e89119473e14516603b69e9251a76aec83d5aa35.jpg",
352
+ "image_caption": [
353
+ "Figure 4: Algorithm framework of LSC with Structured Communication Network Module and Communication-based Policy Module, where $s _ { i }$ , $o _ { i }$ , $a _ { i }$ and $w _ { i }$ denote state (global perception), observation, action and importance weight of agent $i$ . The former module uses partial observation to establish the communication structure. The latter employs GNN-based communication and $Q$ - Network to extract communication content and produces collaboration policies respectively based on established communication structure. "
354
+ ],
355
+ "image_footnote": [],
356
+ "bbox": [
357
+ 236,
358
+ 98,
359
+ 758,
360
+ 267
361
+ ],
362
+ "page_idx": 4
363
+ },
364
+ {
365
+ "type": "text",
366
+ "text": "1: Initialization: weight generator parameters $\\theta ^ { w }$ , $Q$ -net parameters $\\theta ^ { Q }$ , GNN parameters $\\theta ^ { g n n }$ , \ntarget $Q$ -net parameters $\\theta ^ { \\tilde { Q } }$ , replay buffer $\\mathcal { R } = \\emptyset$ , group radius $d$ , the number of agents $n$ ; \n2: for Episode $= 1 , \\cdots , M$ do \n3: Reset $t = 0$ , global state $s ^ { t }$ and observation $o _ { i } ^ { t }$ for each agent $i$ , Normal agents set $\\mathcal { V } _ { n } ^ { t } =$ \n{all agents} and $\\bar { \\mathcal { V } } _ { c } ^ { t } = \\mathcal { O }$ ; \n4: for $t = 1 , \\cdots , T$ and $s _ { t } \\neq$ terminal do \n5: for each agent $i$ do \n6: With probability $\\epsilon$ pick a random action $\\boldsymbol { w } _ { i } ^ { t }$ else $w _ { i } ^ { t } = \\arg \\operatorname* { m a x } _ { \\{ w _ { i } \\} } Q _ { \\theta ^ { w } } ( o _ { i } ^ { t } )$ ; \n7: Get current position $\\mathrm { P O S s } _ { i } ^ { t }$ of each agent $i$ ; \n8: $( \\boldsymbol { \\gamma } _ { n } ^ { t } , \\boldsymbol { \\gamma } _ { c } ^ { t } , \\boldsymbol { \\mathcal { E } } ) = \\mathrm { C B R P } ( ( \\boldsymbol { \\gamma } _ { n } ^ { t - 1 } , \\boldsymbol { \\gamma } _ { c } ^ { t - 1 } ) , \\{ \\boldsymbol { w } _ { 1 } ^ { t } , \\cdots , \\boldsymbol { w } _ { n } ^ { t } \\} , \\{ \\mathrm { P O S s } _ { 1 } ^ { t } , \\cdots , \\mathrm { P O S s } _ { n } ^ { t } \\} , d ) ;$ \n9: $\\left\\{ q _ { 1 } ^ { t } , \\cdot \\cdot \\cdot , q _ { n } ^ { t } \\right\\} = \\mathrm { H C O M M } ( \\mathcal { V } _ { n } ^ { t } , \\mathcal { V } _ { c } ^ { t } , \\mathcal { E } )$ ; \n10: for each agent $i$ do \n11: With probability $\\epsilon$ pick a random action $a _ { i } ^ { t }$ else choose the action that has the largest \n12: value in the vector $\\mathbf { \\bar { \\rho } } _ { q _ { i } ^ { t } }$ ; \n13: Execute global actions and get global reward $r ^ { t }$ , next state $s ^ { t + 1 }$ , next observation $o ^ { t + 1 }$ ; \n14: Get updated position $\\mathrm { P O S s } _ { i } ^ { t + 1 }$ for each agent $i$ ; \n15: Store $\\begin{array} { r } { ( s ^ { t } , o ^ { t } , \\{ \\mathrm { P O S s } _ { 1 } ^ { t } , \\cdot \\cdot \\cdot , \\mathrm { P O S s } _ { n } ^ { t } \\} , a ^ { t } , r ^ { t } , o ^ { t + 1 } , \\{ \\mathrm { P O S s } _ { 1 } ^ { t + 1 } , \\cdot \\cdot \\cdot , \\mathrm { P O S s } _ { n } ^ { t + 1 } \\} , s ^ { t + 1 } ) \\cup \\{ \\mathrm { P O S s } _ { 1 } ^ { t } , \\cdot \\cdot \\cdot , \\mathrm { P O S s } _ { n } ^ { t } \\} , s ^ { t + 1 } ) \\mathrm { ~ ; ~ } } \\end{array}$ to $\\mathcal { R }$ ; \n16: for $k = 1 , \\cdots , K$ do \n17: Sample a random mini-batch transitions from $\\mathcal { R }$ ; \n18: Update weight generator $\\theta ^ { w }$ by minimizing Eq. (1); \n19: Update communication based policy module $( \\theta ^ { Q } , \\theta ^ { g n n } )$ by minimizing Eq. (2); \n20: Update the target networks through Eq. (3). ",
367
+ "bbox": [
368
+ 176,
369
+ 386,
370
+ 826,
371
+ 713
372
+ ],
373
+ "page_idx": 4
374
+ },
375
+ {
376
+ "type": "text",
377
+ "text": "Specifically, the CBRP function automatically and distributively establishes the structured communication network based on the learnt importance weights. The HCOMM function denotes the communication-based policy module, which outputs the $Q$ -values based on the GNN-based communication messages. Both CBRP and HCOMM are discussed in the following subsections, and the details of CBRP and HCOMM can be found in Appendix. ",
378
+ "bbox": [
379
+ 173,
380
+ 741,
381
+ 825,
382
+ 810
383
+ ],
384
+ "page_idx": 4
385
+ },
386
+ {
387
+ "type": "text",
388
+ "text": "3.1 STRUCTURED COMMUNICATION NETWORK MODULE ",
389
+ "text_level": 1,
390
+ "bbox": [
391
+ 173,
392
+ 828,
393
+ 583,
394
+ 843
395
+ ],
396
+ "page_idx": 4
397
+ },
398
+ {
399
+ "type": "text",
400
+ "text": "The structured communication network module takes the role of establishing a hierarchical structured communication network which will be employed in communication-based policy module. Two sub-modules are included, i.e., the weight generator and the Cluster Based Routing Protocol (CBRP). The weight generator sub-module aims to determine the importance weight for each agent automatically. It is modeled through a neural network $f _ { w g } : o w$ , where the weight $w$ can measure the confidence of an agent to become a center. Further, the CBRP sub-module employs the weights of all agents $\\{ w _ { i } \\}$ to construct the hierarchical structured communication network. To emphasize, the CBRP sub-module can be implemented in a distributed fashion, as a result, the central agents can be elected distributedly. This advantage ensures the practicability for large-scale case. ",
401
+ "bbox": [
402
+ 174,
403
+ 853,
404
+ 823,
405
+ 924
406
+ ],
407
+ "page_idx": 4
408
+ },
409
+ {
410
+ "type": "text",
411
+ "text": "",
412
+ "bbox": [
413
+ 174,
414
+ 103,
415
+ 823,
416
+ 160
417
+ ],
418
+ "page_idx": 5
419
+ },
420
+ {
421
+ "type": "text",
422
+ "text": "The CBRP method (Rezaee & Yaghmaee, 2009) is a typical method for establishing a hierarchical routing structure. The key idea for CBRP is that each agent will check whether central agent or agent that has larger weight $w$ exists in its receptive area. The agent will become a central agent if no above agent is found, else it will keep its own role. With enough checking steps, each agent will either be an central agent or in some central agents’ receptive. All agents can be separated into several groups with each central agent as the group leader. The overall hierarchical structured communication network further will be established by fully connecting all central agents from different groups and connecting the agents in each group to their central agent. ",
423
+ "bbox": [
424
+ 174,
425
+ 166,
426
+ 825,
427
+ 279
428
+ ],
429
+ "page_idx": 5
430
+ },
431
+ {
432
+ "type": "text",
433
+ "text": "There is a strong connection between these two modules in LSC algorithm. Different generated weights will lead to different hierarchical structured communication network, which would cause diverse performance of the communication-based policy. Some experiment results also have confirmed that the weights have a great influence on the performance, which motivates us to train these two modules end-to-end. However the CBRP sub-module is not differentiable, which means the gradients cannot be back-propagated from communication-based policy module to the weight generator sub-module. Therefore, we introduce another RL task as an auxiliary, i.e., each agent takes its weight as an action by treating the communication-based policy module as an extra unobservable part of the environment, and receiving the same reward as the main RL task in the communication-based policy module discussed below. Moreover the weight $w$ is constrained in the integer set $\\{ 0 , 1 , 2 , 3 , 4 \\}$ . The action space becomes discrete, as a result DQN algorithm can be used again to train the weight generator. At this time, the weight generator can be regarded as a $Q$ -value function. The loss $\\ell ( \\theta ^ { w } )$ for the weight generator sub-module becomes clear as follows, with $y _ { i } = r _ { i } + \\gamma \\operatorname* { m a x } _ { \\tilde { w } _ { i } } Q _ { \\theta ^ { w } } ( \\tilde { o } _ { i } , \\tilde { w } _ { i } )$ . $r _ { i }$ denotes the reward received for agent $i$ from environment.n ",
434
+ "bbox": [
435
+ 173,
436
+ 285,
437
+ 825,
438
+ 478
439
+ ],
440
+ "page_idx": 5
441
+ },
442
+ {
443
+ "type": "equation",
444
+ "img_path": "images/13dfa58be4623121229d24b17f72eefe8e3b19d73bf632c9283f97b52a716de6.jpg",
445
+ "text": "$$\n\\ell ( \\theta ^ { w } ) ^ { \\smile } = \\mathbb { E } _ { { \\mathbf { o } } , { \\mathbf { w } } , r , { \\tilde { \\mathbf { o } } } } \\big [ \\sum _ { i = 1 } ( Q _ { \\theta ^ { w } } ( o _ { i } , w _ { i } ) - y _ { i } ) ^ { 2 } \\big ] .\n$$",
446
+ "text_format": "latex",
447
+ "bbox": [
448
+ 349,
449
+ 477,
450
+ 647,
451
+ 510
452
+ ],
453
+ "page_idx": 5
454
+ },
455
+ {
456
+ "type": "text",
457
+ "text": "3.2 COMMUNICATION-BASED POLICY MODULE ",
458
+ "text_level": 1,
459
+ "bbox": [
460
+ 174,
461
+ 515,
462
+ 517,
463
+ 530
464
+ ],
465
+ "page_idx": 5
466
+ },
467
+ {
468
+ "type": "text",
469
+ "text": "After the structured communication network topology is determined, the communication-based policy module will learn the communication content and generate the final global collaboration policy. The communication-based policy module consists of two sub-modules, i.e., GNN-based communication sub-module and the $Q$ -Net sub-module. The first one aims to learn the communication messages and further update overall state perception, while the other sub-module learns the policy based on the new state perceptions after efficient communication. Different from many existing works (Foerster et al., 2016; Das et al., 2019; Singh et al., 2019), the agents play differently in the GNN-base communication sub-module. Central agents should guarantee high-level information and dominate the agents in their driven groups respectively. The hope is that such a structure can ensure the effectiveness of communication and the efficiency of intra-group and inter-group collaboration. ",
470
+ "bbox": [
471
+ 173,
472
+ 540,
473
+ 825,
474
+ 680
475
+ ],
476
+ "page_idx": 5
477
+ },
478
+ {
479
+ "type": "text",
480
+ "text": "Recall Figure 3, the well-established hierarchical structured communication network can be represented by a tuple $( \\nu , \\mathcal { E } )$ while the edges are directed. The node set $\\nu$ contains $N _ { v }$ nodes which can be divided into the central node set $\\mathcal { V } _ { c }$ and the normal node set $\\nu _ { n }$ . For central node $i \\in \\mathcal { V } _ { c }$ , the node feature vector $v _ { i }$ includes the embedding feature $v _ { i } ^ { n }$ , the central role feature $v _ { i } ^ { c }$ and the global feature $v _ { i } ^ { g }$ ; for normal node $i \\in \\mathcal { V } _ { n }$ , the node feature vector $v _ { i }$ only includes the embedding feature $v _ { i } ^ { n }$ . For each edge $( i \\to j ) \\in \\mathcal { E }$ with $i , j \\in \\mathcal { V }$ , the edge feature vector is denoted as $e _ { i j }$ . Functions $\\phi$ and $\\rho$ denote the update embedding function and aggregate function respectively. As shown in Figure 3, the overall GNN-based communication sub-module consists of three steps, and the GNN operation is detailed in Table 1 and as follows: ",
481
+ "bbox": [
482
+ 173,
483
+ 686,
484
+ 825,
485
+ 811
486
+ ],
487
+ "page_idx": 5
488
+ },
489
+ {
490
+ "type": "text",
491
+ "text": "Step 1: Intra-group aggregation. In each group, the normal agent embeds their local information and sends it to the associated central agent $j \\in \\mathcal { V } _ { c }$ ; the central agent aggregates the information from all associated normal agents and updates its central role feature; ",
492
+ "bbox": [
493
+ 174,
494
+ 813,
495
+ 825,
496
+ 853
497
+ ],
498
+ "page_idx": 5
499
+ },
500
+ {
501
+ "type": "text",
502
+ "text": "Step 2: Inter-group sharing. The central agent communicates with the other central agent with cluster information, further aggregates the received and indicates the global perception; ",
503
+ "bbox": [
504
+ 173,
505
+ 854,
506
+ 821,
507
+ 882
508
+ ],
509
+ "page_idx": 5
510
+ },
511
+ {
512
+ "type": "text",
513
+ "text": "Step 3: Intra-group sharing. The central agent communicates all its feature with the associated normal agents while the normal agent aggregates the received information from central agents. Both the embedding feature of central and normal agents will be updated. ",
514
+ "bbox": [
515
+ 176,
516
+ 882,
517
+ 823,
518
+ 924
519
+ ],
520
+ "page_idx": 5
521
+ },
522
+ {
523
+ "type": "table",
524
+ "img_path": "images/0f46f5204346021616d3237881db9aae44f5537d92f578cca28ddc5a88477cd2.jpg",
525
+ "table_caption": [
526
+ "Table 1: GNN-based Communication Architecture "
527
+ ],
528
+ "table_footnote": [],
529
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Type</td><td rowspan=1 colspan=1>Edge(i→j)∈ε</td><td rowspan=1 colspan=1>EdgeUpdateScheme</td><td rowspan=1 colspan=2>NodeUpdateScheme</td></tr><tr><td rowspan=1 colspan=1>Step1:intra-group aggregation</td><td rowspan=1 colspan=1>i∈Vn,j∈Vc</td><td rowspan=1 colspan=1>eij=(u),ej=p({eijf(i→)∈ε)</td><td rowspan=1 colspan=1>u=Φ(ej,u&quot;)</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>Step 2: inter-group sharing</td><td rowspan=1 colspan=1>iEVc,j∈Vc</td><td rowspan=1 colspan=1>eij=Φ(u,u),ej=p({eij(i→j)∈ε)</td><td rowspan=1 colspan=2>u=Φ(e,)</td></tr><tr><td rowspan=1 colspan=1>Step 3: intra-group sharing</td><td rowspan=1 colspan=1>iEVc,jEVnUVc</td><td rowspan=1 colspan=1>eij=(u,v,v),ej=p({eijs(i→)∈ε)</td><td rowspan=1 colspan=2>U=Φ(e,U),U=Φ(ej,U&quot;)</td></tr></table>",
530
+ "bbox": [
531
+ 173,
532
+ 125,
533
+ 825,
534
+ 172
535
+ ],
536
+ "page_idx": 6
537
+ },
538
+ {
539
+ "type": "table",
540
+ "img_path": "images/7829aca4ddb6052acd8862bd45c5954a8165c66f16d8c9a9f28a01267c826719.jpg",
541
+ "table_caption": [
542
+ "Table 2: Comparison of different MARL algorithms for communication efficiency. "
543
+ ],
544
+ "table_footnote": [],
545
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Algorithm</td><td rowspan=1 colspan=1>DIAL</td><td rowspan=1 colspan=1>CommNet</td><td rowspan=1 colspan=1>IC3</td><td rowspan=1 colspan=1>ATOC</td><td rowspan=1 colspan=1>LSC</td></tr><tr><td rowspan=1 colspan=1>Nmsg</td><td rowspan=1 colspan=1>O(n2)</td><td rowspan=1 colspan=1>O(n)</td><td rowspan=1 colspan=1>O(n)</td><td rowspan=1 colspan=1>O(kb)</td><td rowspan=1 colspan=1>O(k² + kb)</td></tr><tr><td rowspan=1 colspan=1>Nstep</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>O(d)</td><td rowspan=1 colspan=1>0(1)</td></tr><tr><td rowspan=1 colspan=1>Nb-r</td><td rowspan=1 colspan=1>O(n)</td><td rowspan=1 colspan=1>O(n)</td><td rowspan=1 colspan=1>O(n)</td><td rowspan=1 colspan=1>0(6)</td><td rowspan=1 colspan=1>O(max(b,k))</td></tr></table>",
546
+ "bbox": [
547
+ 279,
548
+ 212,
549
+ 717,
550
+ 267
551
+ ],
552
+ "page_idx": 6
553
+ },
554
+ {
555
+ "type": "text",
556
+ "text": "The GNN-based communication sub-module is modeled as a GNN $( f _ { \\theta ^ { g n n } } )$ with parameter $\\theta ^ { g n n }$ , while the following $Q$ -Net of agent $i$ $( Q _ { \\theta ^ { Q } } ^ { i } )$ is parameterized by shared parameter $\\bar { \\theta } ^ { Q }$ . The gradient can be back-propagated from $Q$ -Net to the graph neural network, as a result the overall loss of communication based policy module is as follows: ",
557
+ "bbox": [
558
+ 174,
559
+ 292,
560
+ 825,
561
+ 349
562
+ ],
563
+ "page_idx": 6
564
+ },
565
+ {
566
+ "type": "equation",
567
+ "img_path": "images/f662c7f743833070bd70a067737f92a7428c9db0ad35895d41031a64725483c3.jpg",
568
+ "text": "$$\n\\ell ( \\theta ^ { Q } , \\theta ^ { g n n } ) : = \\mathbb { E } _ { { \\mathbf { o } } , { \\mathbf { a } } , r , { \\tilde { \\mathbf { o } } } } \\left[ \\sum _ { i = 1 } ^ { n } \\left( Q _ { \\theta ^ { Q } } ^ { i } \\big ( f _ { \\theta ^ { g n n } } ( \\mathbf { o } ) , a _ { i } \\big ) - y _ { i } \\right) ^ { 2 } \\right] ,\n$$",
569
+ "text_format": "latex",
570
+ "bbox": [
571
+ 302,
572
+ 356,
573
+ 694,
574
+ 398
575
+ ],
576
+ "page_idx": 6
577
+ },
578
+ {
579
+ "type": "text",
580
+ "text": "where $\\begin{array} { r } { y _ { i } \\ = \\ r _ { i } + \\gamma \\operatorname* { m a x } _ { { \\tilde { a } } _ { i } } Q _ { \\theta ^ { Q } } ^ { i } \\big ( f _ { \\theta ^ { g n n } } ( \\tilde { \\mathbf { o } } ) , \\tilde { a } _ { i } \\big ) } \\end{array}$ . $r _ { i }$ denotes the reward received for agent $i$ from environment. Some softly updating scheme is further employed to update target network, i.e., ",
581
+ "bbox": [
582
+ 174,
583
+ 406,
584
+ 821,
585
+ 435
586
+ ],
587
+ "page_idx": 6
588
+ },
589
+ {
590
+ "type": "equation",
591
+ "img_path": "images/64735d812720088ca9e4962dbf7ab3c9bdca4606d678bf3b20eb1bd6ff9173e4.jpg",
592
+ "text": "$$\n\\theta ^ { \\tilde { Q } } = \\tau \\theta ^ { Q } + ( 1 - \\tau ) \\theta ^ { \\tilde { Q } } , \\quad \\mathrm { a n d } \\quad \\theta ^ { g \\tilde { n } n } = \\tau \\theta ^ { g n n } + ( 1 - \\tau ) \\theta ^ { g \\tilde { n } n } .\n$$",
593
+ "text_format": "latex",
594
+ "bbox": [
595
+ 284,
596
+ 443,
597
+ 714,
598
+ 463
599
+ ],
600
+ "page_idx": 6
601
+ },
602
+ {
603
+ "type": "text",
604
+ "text": "Here we discuss communication efficiency from three aspects: the number of message exchanging $( N _ { m s g } )$ among agents; the number of steps during the communication procedure $( N _ { s t e p } )$ ; the communication bandwidth and range requirements for each agent $( N _ { b - r } )$ , and $n$ is the total number of agents. The details about communication efficiency are presented in Table 2 for each stage of the MARL algorithms. For DIAL, each agent communicates with all other agents based on the fullyconnected network, which results in $\\bar { \\mathcal { O } } ( n ^ { 2 } )$ message exchanging complexity. DIAL need only one communication step, however the communication bandwidth and range requirement for each agent is high and in the order of ${ \\mathcal { O } } ( n )$ . Different from DIAL, CommNet and IC3 both employ the star communication network, as a result the number of message exchanging is in the order of ${ \\mathcal { O } } ( n )$ . $N _ { s t e p }$ and $N _ { b - r }$ are the same as DIAL. The communication complexity of ATOC and our proposed LSC depends on the number of groups (denoted as $k < n$ , which is automatically determined in the algorithms) and the maximum output degree of the communication network (denoted as $b < n$ ). For ATOC, the communication network it tree-type, so that it only need to exchange $\\mathcal { O } ( k b )$ messages. However, the number of steps is larger for ATOC for its sequential property and is in the order of $\\mathcal O ( d )$ $\\cdot d$ denotes the depth of the communication network). $N _ { b - r }$ will become much smaller to be ${ \\mathcal { O } } ( b )$ because communication happens in groups. Furthermore for our LSC, the number of message exchanging is a bit larger than ATOC due to the communication among all elected centers, i.e., $\\check { \\mathcal { O } } ( k ^ { 2 } + k b )$ . However the depth of the hierarchical communication network is only two which results in $\\mathcal { O } ( 1 )$ communication steps, while $N _ { b - r }$ is in the order of ${ \\mathcal { O } } ( \\operatorname* { m a x } ( b , k ) )$ . Overall, our LSC algorithm has advantage in the communication efficiency. ",
605
+ "bbox": [
606
+ 173,
607
+ 478,
608
+ 825,
609
+ 756
610
+ ],
611
+ "page_idx": 6
612
+ },
613
+ {
614
+ "type": "text",
615
+ "text": "4 EXPERIMENTS ",
616
+ "text_level": 1,
617
+ "bbox": [
618
+ 176,
619
+ 763,
620
+ 326,
621
+ 780
622
+ ],
623
+ "page_idx": 6
624
+ },
625
+ {
626
+ "type": "text",
627
+ "text": "We compare LSC with state-of-the-art MARL methods in two large-scale battle environments, i.e., the grid world platform MAgent (Zheng et al., 2017) and StarCraft2 (Samvelyan et al., 2019), to evaluate their performances from aspects of both network structure and communication. ",
628
+ "bbox": [
629
+ 174,
630
+ 795,
631
+ 825,
632
+ 838
633
+ ],
634
+ "page_idx": 6
635
+ },
636
+ {
637
+ "type": "text",
638
+ "text": "4.1 LARGE SCALE BATTLE GAME IN MAGENT ",
639
+ "text_level": 1,
640
+ "bbox": [
641
+ 174,
642
+ 854,
643
+ 509,
644
+ 869
645
+ ],
646
+ "page_idx": 6
647
+ },
648
+ {
649
+ "type": "text",
650
+ "text": "Settings. In a MAgent battle, agents fighting against enemies in a $4 0 \\times 4 0$ grid world. Each agent only receives its local observation, acts independently and cooperatively, and further gains its reward. The goal for each agent is to attack its enemies and prevent them from being attacked. Each agent from both sides has a $6 \\times 6$ visual field and can attack its 8 adjacent grids. The speed, attack power and health point for each agent are 1, 1 and 4, which are increased to 2, 2 and 10 for the enemy to increase the difficulty. The reward is $+ 5$ for successfully attacking an enemy, $- 2$ for being killed and $- 0 . 0 1$ for attacking a blank grid. ",
651
+ "bbox": [
652
+ 174,
653
+ 882,
654
+ 825,
655
+ 924
656
+ ],
657
+ "page_idx": 6
658
+ },
659
+ {
660
+ "type": "image",
661
+ "img_path": "images/bd036eca6c6cac1c0596d05aee84084283dca2cc55f958da5ce2638174641d2e.jpg",
662
+ "image_caption": [],
663
+ "image_footnote": [],
664
+ "bbox": [
665
+ 184,
666
+ 107,
667
+ 810,
668
+ 224
669
+ ],
670
+ "page_idx": 7
671
+ },
672
+ {
673
+ "type": "text",
674
+ "text": "",
675
+ "bbox": [
676
+ 174,
677
+ 255,
678
+ 825,
679
+ 311
680
+ ],
681
+ "page_idx": 7
682
+ },
683
+ {
684
+ "type": "text",
685
+ "text": "Baselines. To evaluate the effects of communication scheme, three peer methods on learning to communicate for MARL, i.e., CommNet, IC3 and ATOC, are chosen to compete with our proposed LSC. Considering the weakness of mean aggregation, we replace the aggregation function of CommNet and IC3 with GNN which is same as LSC. The group radius is 6, the same as the visual field, in ATOC and LSC. All communication messages are embedded to 3-dimension vectors for cost-effectiveness. Besides, two MARL methods with no communication, i.e., IDQN and MFQ are also compared, since they are widely used in large-scale environments. In MAgent, the policy of enemy is pretrained by IDQN. ",
686
+ "bbox": [
687
+ 173,
688
+ 318,
689
+ 825,
690
+ 429
691
+ ],
692
+ "page_idx": 7
693
+ },
694
+ {
695
+ "type": "text",
696
+ "text": "Policy performance. Figure 5(a) and Table 3 show the overall performances of compared algorithm in a 64 vs. 64 battle. The learning curves in Figure 5(a) present the average reward of different agents by epoch. LSC achieves better rewards quickly after 700 epochs and finally converges to an obvious higher point (about 1.15) than baselines. Table 3 and Table 4 give quantitative comparisons of these methods. Each algorithm is given 50 trials with its well-trained model. Mean-reward, $N _ { k i l l }$ , $N _ { d e a d }$ , $R a t i o _ { k d }$ in Table 3 denote the mean of average final rewards of agents, the number of killed enemies and dead agents, and the ratio $N _ { k i l l } / N _ { d e a d }$ , respectively. Following Figure 5(a), LSC can obtain a better mean reward stably, with a $3 0 \\%$ performance advantage at least. $N _ { k i l l }$ are similar, because all approaches fulfill the mission, and beat the pre-trained IDQN. It is achieved by LSC with the least casualty, i.e., the smallest $N _ { d e a d }$ and the highest $R a t i o _ { k d }$ . Table 4 gives the comparisons in terms of the number of epochs to achieve the same reward value from 0.7 to 1.2 within maximal 1750 epochs in the training procedure. One can see that LSC needs fewer epochs to achieve the same reward compared with all the other algorithms, while more reward can be guaranteed within the maximal epochs. These results indicate that LSC can promote collaboration and cooperation, and produce superior policies. ",
697
+ "bbox": [
698
+ 173,
699
+ 436,
700
+ 825,
701
+ 645
702
+ ],
703
+ "page_idx": 7
704
+ },
705
+ {
706
+ "type": "text",
707
+ "text": "Communication effectiveness. As observed from the blue and orange curves in Figure 5(a) and the first and fifth columns in Table 3, that LSC outperforms IDQN greatly. Since IDQN is the special case of LSC without communication procedure, this phenomenon demonstrates the usefulness of our proposed communication solution. Meanwhile, it can be noted that LSC also surpasses other MARL with communication algorithms, which is the consequence of its advanced structure. As mentioned in our experiments, CommNet and IC3 adopt the same message dimension and the same aggregation function as LSC, which leads to better performances than the original versions. However, the star structure makes the center node need to process all agents’ information in CommNet and IC3. When the agent number increases, the message extraction could be difficult. Thus, the final performances cannot be compared with the LSC. For ATOC in large scale environments, the message needs to jump multiple times between local circles, and multiple information aggregation and extraction bring in approximation error, which results in policy deterioration. ",
708
+ "bbox": [
709
+ 173,
710
+ 652,
711
+ 825,
712
+ 819
713
+ ],
714
+ "page_idx": 7
715
+ },
716
+ {
717
+ "type": "text",
718
+ "text": "Scalability. Figure 5(b) shows the total reward curves of team by the agent number (10-99). Especially when the team has 99 agents, the reward of LSC is 1.45-2.75 times of other methods. It can be seen that the structured communication of LSC confers superior performances at different scales, because it utilizes the divide-and-conquer strategy to automatically group local agents and aggregate centers. In Figure 5(b) When the agent number is less than 80, the communication between agents can help to learn policy, so the orange dashed line is almost bellow other lines. When the number is more than 80, the demand of star-style information processing exceed the ability of aggregation network, thus CommNet and IC3 are inferior to IDQN. For ATOC, the jump of message becomes the bottleneck as the agent number increases, as inspected in the analysis above. To sum up, the experiments indicate LSC obviously has better scalability than the baseline. ",
719
+ "bbox": [
720
+ 174,
721
+ 827,
722
+ 825,
723
+ 924
724
+ ],
725
+ "page_idx": 7
726
+ },
727
+ {
728
+ "type": "table",
729
+ "img_path": "images/641e50ccd34c1d3901395073f277b538b1e64396a4bb2f2456879a5b2e1bd95a.jpg",
730
+ "table_caption": [
731
+ "Table 3: Performance comparisons in terms of average mean-reward, numbers and ratio of kills and death (64 vs. 64 agents, in 50 testing trials). The bold stands for the best result in each row. "
732
+ ],
733
+ "table_footnote": [],
734
+ "table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>LSC</td><td rowspan=1 colspan=1>CommNet</td><td rowspan=1 colspan=1>IC3</td><td rowspan=1 colspan=1>ATOC</td><td rowspan=1 colspan=1>IDQN</td><td rowspan=1 colspan=1>MFQ</td></tr><tr><td rowspan=1 colspan=1>Mean-reward</td><td rowspan=1 colspan=1>1.11</td><td rowspan=1 colspan=1>0.86</td><td rowspan=1 colspan=1>0.93</td><td rowspan=1 colspan=1>0.58</td><td rowspan=1 colspan=1>0.8</td><td rowspan=1 colspan=1>0.83</td></tr><tr><td rowspan=1 colspan=1>Nkill</td><td rowspan=1 colspan=1>62.6</td><td rowspan=1 colspan=1>61.3</td><td rowspan=1 colspan=1>62.48</td><td rowspan=1 colspan=1>61.46</td><td rowspan=1 colspan=1>62.1</td><td rowspan=1 colspan=1>62</td></tr><tr><td rowspan=1 colspan=1>Ndead</td><td rowspan=1 colspan=1>28.9</td><td rowspan=1 colspan=1>31.64</td><td rowspan=1 colspan=1>32.0</td><td rowspan=1 colspan=1>51.42</td><td rowspan=1 colspan=1>32.3</td><td rowspan=1 colspan=1>31.4</td></tr><tr><td rowspan=1 colspan=1>Ratiokd</td><td rowspan=1 colspan=1>2.16</td><td rowspan=1 colspan=1>1.93</td><td rowspan=1 colspan=1>1.95</td><td rowspan=1 colspan=1>1.20</td><td rowspan=1 colspan=1>1.92</td><td rowspan=1 colspan=1>1.97</td></tr></table>",
735
+ "bbox": [
736
+ 264,
737
+ 140,
738
+ 730,
739
+ 208
740
+ ],
741
+ "page_idx": 8
742
+ },
743
+ {
744
+ "type": "table",
745
+ "img_path": "images/8ead8ad9c0c35aac0c701189a9681fb271ac07a3adad392bd469fc10fc254bca.jpg",
746
+ "table_caption": [
747
+ "Table 4: Comparisons on the used epoch number to achieve same reward of the training procedure in the MAgent environment. "
748
+ ],
749
+ "table_footnote": [],
750
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Reward</td><td rowspan=1 colspan=1>LSC</td><td rowspan=1 colspan=1>CommNet</td><td rowspan=1 colspan=1>IC3</td><td rowspan=1 colspan=1>ATOC</td><td rowspan=1 colspan=1>IDQN</td><td rowspan=1 colspan=1>MFQ</td></tr><tr><td rowspan=1 colspan=1>0.7</td><td rowspan=1 colspan=1>769</td><td rowspan=1 colspan=1>1199</td><td rowspan=1 colspan=1>787</td><td rowspan=1 colspan=1>933</td><td rowspan=1 colspan=1>1133</td><td rowspan=1 colspan=1>1254</td></tr><tr><td rowspan=1 colspan=1>0.8</td><td rowspan=1 colspan=1>828</td><td rowspan=1 colspan=1>1292</td><td rowspan=1 colspan=1>935</td><td rowspan=1 colspan=1>1151</td><td rowspan=1 colspan=1>1460</td><td rowspan=1 colspan=1>1304</td></tr><tr><td rowspan=1 colspan=1>0.9</td><td rowspan=1 colspan=1>1051</td><td rowspan=1 colspan=1>1525</td><td rowspan=1 colspan=1>1508</td><td rowspan=1 colspan=1>1471</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>1426</td></tr><tr><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1271</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>1588</td><td rowspan=1 colspan=1>1506</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td></tr><tr><td rowspan=1 colspan=1>1.1</td><td rowspan=1 colspan=1>1413</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>1619</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td></tr><tr><td rowspan=1 colspan=1>1.2</td><td rowspan=1 colspan=1>1704</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td></tr></table>",
751
+ "bbox": [
752
+ 289,
753
+ 263,
754
+ 705,
755
+ 357
756
+ ],
757
+ "page_idx": 8
758
+ },
759
+ {
760
+ "type": "image",
761
+ "img_path": "images/29236312a1f97ea6b57f01616db6dae3f5f0cf3ec7b6562fc25a7d4525f258bb.jpg",
762
+ "image_caption": [
763
+ "Figure 6: Behavior illustration. The first row shows two typical behavior by LSC. In the second row, the top and bottom plot denote the early state and the near to final battle state, respectively. "
764
+ ],
765
+ "image_footnote": [],
766
+ "bbox": [
767
+ 191,
768
+ 378,
769
+ 803,
770
+ 637
771
+ ],
772
+ "page_idx": 8
773
+ },
774
+ {
775
+ "type": "text",
776
+ "text": "",
777
+ "bbox": [
778
+ 174,
779
+ 699,
780
+ 825,
781
+ 741
782
+ ],
783
+ "page_idx": 8
784
+ },
785
+ {
786
+ "type": "text",
787
+ "text": "Message visualization. To analyze the communication messages learned by GNN, we execute LSC with its well-trained policy 50 times, and visualize the 3 dimensional vector sent by central nodes in Figure 5. Observing Figure 5(c) and 5(d), after receiving messages, the majority of agents choose to move, and the minority choose to attack. This means that agents in LSC is very positive to adjust the team formation and then cooperate to attack. It is worthy to notice that most messages have a small norm (less than 10), and the norm of a large proportion is around 0. From the aspect of optimization, the redundant messages with larger norm will bring in more noise to other agents. In this way, LSC minimizes the impact of redundant messages on the final performance. This similar phenomenon that central nodes is nearly silent in many cases, is also mentioned by CommNet (Sukhbaatar et al., 2016). Therefore, the message representation module via the GNN-based communication module can generate meaningful and efficient messages theoretically and empirically. ",
788
+ "bbox": [
789
+ 173,
790
+ 742,
791
+ 825,
792
+ 895
793
+ ],
794
+ "page_idx": 8
795
+ },
796
+ {
797
+ "type": "text",
798
+ "text": "Behavior pattern. Here, we demonstrate the battle tactics evolved for MARL via structured communication. To analyzed the globally cooperation strategy of LSC, we visualize the progress of the battle. For fairness, we start six algorithms from the same state in Figure 6(a). The typical behavior patterns learnt by LSC are presented in the figures of the first row. Via the intra-group communication and cooperation, in Figure 6(b), the blue team (LSC) organizes an encirclement to nearby red enemies; the team has a local numerical superiority, and focus agents’ fire to wipe out enemies, denoted by the black attack arrows in Figure 6(c). These show the intra-group cooperation of LSC. Upper figures in the second row of Figure 6 shows the situation of early stage (17 steps) after initialization for six methods, and lower figures show the states after 50 steps. From these results, we may arrive a conclusion that the team with our LSC can beat the opponent more quickly with a more aggressive policy. By intra-group and inter-group collaboration, Figure 6(d) LSC has carried out encircling and fire-focusing many times, and achieves an enormous advantage within only 17 steps, and wipe out the enemies within 50 steps. For both IDQN and MFQ, agents tend to cooperate within their visual range, and once the agents get separated out of visual range, they can hardly form global cooperation, which lead to the failure result in Figure 6(h) and 6(i). Similarly, agents controlled by ATOC communicate only among group range, thus they encounter similar situations. Agents for CommNet and IC3 have global communication, however once some agents get far away from the central agents, central agents can hardly understand their messages, making ineffective cooperation. As Figure 6(e) and 6(f), some agents get far away from the majority of agents, thus their results are not ideal. To sum up, in Figure 6(d), agents controlled by LSC form a global encircle strategy by communication in both intra-group and inter-group, thus LSC-based agents can wipe out enemies faster than the baselines. ",
799
+ "bbox": [
800
+ 173,
801
+ 896,
802
+ 823,
803
+ 924
804
+ ],
805
+ "page_idx": 8
806
+ },
807
+ {
808
+ "type": "text",
809
+ "text": "",
810
+ "bbox": [
811
+ 173,
812
+ 103,
813
+ 825,
814
+ 380
815
+ ],
816
+ "page_idx": 9
817
+ },
818
+ {
819
+ "type": "text",
820
+ "text": "4.2 LARGE SCALE BATTLE GAME IN STARCRAFT2 ",
821
+ "text_level": 1,
822
+ "bbox": [
823
+ 174,
824
+ 397,
825
+ 540,
826
+ 412
827
+ ],
828
+ "page_idx": 9
829
+ },
830
+ {
831
+ "type": "text",
832
+ "text": "Battle game in StarCraft2 is a confrontation between two marine teams shown in appendix, which is much more complex than MAgent. Specifically, we use a 25 vs. $\\mathrm { 2 5 \\ m a p }$ , i.e., $\\bf { 2 5 m }$ , where the range vision is 9 and the map size is $1 9 2 0 \\times 1 2 0 0$ . To evaluate the cooperation, agents one team are controlled by the individual learned policy. Here, we compare our LSC with IQDN, Commnet and IC3. The action space consists of movement to an adjacent grid and shooting with the range 6. We adopt the same dense reward setting (0.44 for killing an enemy, 8.9 for winning the battle) as SMAC (Samvelyan et al., 2019). Agents of the enemy are controlled by the built-in game AI. ",
833
+ "bbox": [
834
+ 173,
835
+ 424,
836
+ 825,
837
+ 522
838
+ ],
839
+ "page_idx": 9
840
+ },
841
+ {
842
+ "type": "text",
843
+ "text": "In Figure 7, LSC outperforms compared algorithms, where the blue reward curve is much higher than others. Although the agent number (25) is fewer than MAgent, the observation and action space of StarCraft2 are much larger, leading to the difficulty to learn policy. Therefore, the performance of IDQN and MFQ degrades notably in this complex environment, while LSC, IC3, CommNet and ATOC outperform it. This is because they entail communication to facilitate cooperation. Moreover, LSC outperforms IC3, CommNet and ATOC. This demonstrates that flexible hierarchical communication and expressive GNN-based message extraction make LSC more qualified for complex tasks than CommNet and IC3’s star-style communication. ",
844
+ "bbox": [
845
+ 174,
846
+ 542,
847
+ 549,
848
+ 736
849
+ ],
850
+ "page_idx": 9
851
+ },
852
+ {
853
+ "type": "image",
854
+ "img_path": "images/235460517f0307b26554e39c65610a801ed617f686502d36412eb10816620ebd.jpg",
855
+ "image_caption": [
856
+ "Figure 7: Reward curves on StarCraft2 "
857
+ ],
858
+ "image_footnote": [],
859
+ "bbox": [
860
+ 566,
861
+ 542,
862
+ 816,
863
+ 685
864
+ ],
865
+ "page_idx": 9
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "5 CONCLUSION AND FUTURE WORK ",
870
+ "text_level": 1,
871
+ "bbox": [
872
+ 174,
873
+ 757,
874
+ 495,
875
+ 773
876
+ ],
877
+ "page_idx": 9
878
+ },
879
+ {
880
+ "type": "text",
881
+ "text": "In this paper, a novel learning structured communication (LSC) algorithm is proposed for multiagent reinforcement learning. The hierarchical structure is self-learned by cluster based routing protocol. The communication message representation is naturally embedded and extracted via a graph neural network. Experiments in large-scale games (MAgent and StarCraft2) demonstrated that our LSC can outperform existing learning-to-communicate algorithms with better communication efficiency, cooperation capability, and scalability. In the future, we will improve LSC by considering some practical constraints, such as communication bandwidth and delay. ",
882
+ "bbox": [
883
+ 174,
884
+ 789,
885
+ 825,
886
+ 886
887
+ ],
888
+ "page_idx": 9
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "REFERENCES ",
893
+ "text_level": 1,
894
+ "bbox": [
895
+ 176,
896
+ 102,
897
+ 285,
898
+ 117
899
+ ],
900
+ "page_idx": 10
901
+ },
902
+ {
903
+ "type": "text",
904
+ "text": "Jeffrey L Adler and Victor J Blue. A cooperative multi-agent transportation management and route guidance system. Transportation Research Part C: Emerging Technologies, 10(5-6):433–454, 2002. ",
905
+ "bbox": [
906
+ 173,
907
+ 126,
908
+ 825,
909
+ 167
910
+ ],
911
+ "page_idx": 10
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "Peter W. Battaglia, Jessica B. Hamrick, Victor Bapst, Alvaro Sanchez-Gonzalez, Vinicius Zambaldi, Mateusz Malinowski, Andrea Tacchetti, David Raposo, Adam Santoro, Ryan Faulkner, Caglar Gulcehre, Francis Song, Andrew Ballard, Justin Gilmer, George Dahl, Ashish Vaswani, Kelsey Allen, Charles Nash, Victoria Langston, Chris Dyer, Nicolas Heess, Daan Wierstra, Pushmeet Kohli, Matt Botvinick, Oriol Vinyals, Yujia Li, and Razvan Pascanu. Relational inductive biases, deep learning, and graph networks, 2018. ",
916
+ "bbox": [
917
+ 174,
918
+ 179,
919
+ 825,
920
+ 262
921
+ ],
922
+ "page_idx": 10
923
+ },
924
+ {
925
+ "type": "text",
926
+ "text": "Abhishek Das, Theophile Gervet, Joshua Romoff, Dhruv Batra, Devi Parikh, Mike Rabbat, and ´ Joelle Pineau. TarMAC: Targeted multi-agent communication. In ICML, pp. 1538–1546, 2019. ",
927
+ "bbox": [
928
+ 173,
929
+ 272,
930
+ 823,
931
+ 301
932
+ ],
933
+ "page_idx": 10
934
+ },
935
+ {
936
+ "type": "text",
937
+ "text": "Jakob Foerster, Ioannis Alexandros Assael, Nando de Freitas, and Shimon Whiteson. Learning to communicate with deep multi-agent reinforcement learning. In NeurIPS, pp. 2137–2145, 2016. ",
938
+ "bbox": [
939
+ 173,
940
+ 310,
941
+ 823,
942
+ 340
943
+ ],
944
+ "page_idx": 10
945
+ },
946
+ {
947
+ "type": "text",
948
+ "text": "Jakob N Foerster, Gregory Farquhar, Triantafyllos Afouras, Nantas Nardelli, and Shimon Whiteson. Counterfactual multi-agent policy gradients. In AAAI, pp. 2974–2982, 2018. ",
949
+ "bbox": [
950
+ 174,
951
+ 349,
952
+ 821,
953
+ 378
954
+ ],
955
+ "page_idx": 10
956
+ },
957
+ {
958
+ "type": "text",
959
+ "text": "Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. Neural message passing for quantum chemistry. In ICML, pp. 1263–1272, 2017. ",
960
+ "bbox": [
961
+ 173,
962
+ 387,
963
+ 821,
964
+ 417
965
+ ],
966
+ "page_idx": 10
967
+ },
968
+ {
969
+ "type": "text",
970
+ "text": "Shariq Iqbal and Fei Sha. Actor-attention-critic for multi-agent reinforcement learning. In ICML, pp. 2961–2970, 2019. ",
971
+ "bbox": [
972
+ 171,
973
+ 426,
974
+ 825,
975
+ 455
976
+ ],
977
+ "page_idx": 10
978
+ },
979
+ {
980
+ "type": "text",
981
+ "text": "Jiechuan Jiang and Zongqing Lu. Learning attentional communication for multi-agent cooperation. In NeurIPS, pp. 7254–7264, 2018. ",
982
+ "bbox": [
983
+ 171,
984
+ 464,
985
+ 823,
986
+ 494
987
+ ],
988
+ "page_idx": 10
989
+ },
990
+ {
991
+ "type": "text",
992
+ "text": "Jiechuan Jiang, Chen Dun, and Zongqing Lu. Graph convolutional reinforcement learning for multiagent cooperation. ArXiv, abs/1810.09202, 2018. ",
993
+ "bbox": [
994
+ 171,
995
+ 503,
996
+ 823,
997
+ 532
998
+ ],
999
+ "page_idx": 10
1000
+ },
1001
+ {
1002
+ "type": "text",
1003
+ "text": "Daewoo Kim, Sangwoo Moon, David Hostallero, Wan Ju Kang, Taeyoung Lee, Kyunghwan Son, and Yung Yi. Learning to schedule communication in multi-agent reinforcement learning. In ICLR, 2019. ",
1004
+ "bbox": [
1005
+ 174,
1006
+ 541,
1007
+ 823,
1008
+ 584
1009
+ ],
1010
+ "page_idx": 10
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "Timothy Lillicrap, Jonathan Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. In ICLR, 2016. ",
1015
+ "bbox": [
1016
+ 173,
1017
+ 594,
1018
+ 823,
1019
+ 623
1020
+ ],
1021
+ "page_idx": 10
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "Ryan Lowe, Yi Wu, Aviv Tamar, Jean Harb, OpenAI Pieter Abbeel, and Igor Mordatch. Multi-agent actor-critic for mixed cooperative-competitive environments. In NeurIPS, pp. 6379–6390, 2017. ",
1026
+ "bbox": [
1027
+ 174,
1028
+ 632,
1029
+ 821,
1030
+ 662
1031
+ ],
1032
+ "page_idx": 10
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "Aleksandra Malysheva, Tegg Taekyong Sung, Chae-Bong Sohn, Daniel Kudenko, and Aleksei Shpilman. Deep multi-agent reinforcement learning with relevance graphs, 2018. ",
1037
+ "bbox": [
1038
+ 171,
1039
+ 671,
1040
+ 821,
1041
+ 700
1042
+ ],
1043
+ "page_idx": 10
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin A Riedmiller, Andreas Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. ",
1048
+ "bbox": [
1049
+ 173,
1050
+ 709,
1051
+ 825,
1052
+ 780
1053
+ ],
1054
+ "page_idx": 10
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "Tabish Rashid, Mikayel Samvelyan, Christian Schroeder de Witt, Gregory Farquhar, Jakob Foerster, and Shimon Whiteson. QMIX: Monotonic value function factorisation for deep multi-agent reinforcement learning. In ICML, pp. 4292–4301, 2018. ",
1059
+ "bbox": [
1060
+ 173,
1061
+ 790,
1062
+ 823,
1063
+ 833
1064
+ ],
1065
+ "page_idx": 10
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "M Rezaee and M Yaghmaee. Cluster based routing protocol for mobile ad hoc networks. INFOCOMP, 8(1):30–36, 2009. ",
1070
+ "bbox": [
1071
+ 169,
1072
+ 843,
1073
+ 821,
1074
+ 871
1075
+ ],
1076
+ "page_idx": 10
1077
+ },
1078
+ {
1079
+ "type": "text",
1080
+ "text": "Mikayel Samvelyan, Tabish Rashid, Christian Schroeder de Witt, Gregory Farquhar, Nantas Nardelli, Tim G. J. Rudner, Chia-Man Hung, Philiph H. S. Torr, Jakob Foerster, and Shimon Whiteson. The StarCraft Multi-Agent Challenge. CoRR, abs/1902.04043, 2019. ",
1081
+ "bbox": [
1082
+ 174,
1083
+ 882,
1084
+ 825,
1085
+ 924
1086
+ ],
1087
+ "page_idx": 10
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 20(1):61–80, 2008. ",
1092
+ "bbox": [
1093
+ 173,
1094
+ 103,
1095
+ 820,
1096
+ 132
1097
+ ],
1098
+ "page_idx": 11
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Elham Semsar-Kazerooni and Khashayar Khorasani. Multi-agent team cooperation: A game theory approach. Automatica, 45(10):2205–2213, 2009. ",
1103
+ "bbox": [
1104
+ 173,
1105
+ 141,
1106
+ 821,
1107
+ 170
1108
+ ],
1109
+ "page_idx": 11
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George van den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, Sander Dieleman, Dominik Grewe, John Nham, Nal Kalchbrenner, Ilya Sutskever, Timothy Lillicrap, Madeleine Leach, Koray Kavukcuoglu, Thore Graepel, and Demis Hassabis. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, January 2016. ",
1114
+ "bbox": [
1115
+ 174,
1116
+ 179,
1117
+ 825,
1118
+ 248
1119
+ ],
1120
+ "page_idx": 11
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "Amanpreet Singh, Tushar Jain, and Sainbayar Sukhbaatar. Learning when to communicate at scale in multiagent cooperative and competitive tasks. In ICLR, 2019. ",
1125
+ "bbox": [
1126
+ 174,
1127
+ 257,
1128
+ 821,
1129
+ 286
1130
+ ],
1131
+ "page_idx": 11
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "Sainbayar Sukhbaatar, Rob Fergus, et al. Learning multiagent communication with backpropagation. In NeurIPS, pp. 2244–2252, 2016. ",
1136
+ "bbox": [
1137
+ 174,
1138
+ 295,
1139
+ 820,
1140
+ 325
1141
+ ],
1142
+ "page_idx": 11
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "Andrea Tacchetti, H. Francis Song, Pedro A. M. Mediano, Vinicius Zambaldi, Janos Kram ´ ar, Neil C. ´ Rabinowitz, Thore Graepel, Matthew Botvinick, and Peter W. Battaglia. Relational forward models for multi-agent learning. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id $=$ rJlEojAqFm. ",
1147
+ "bbox": [
1148
+ 174,
1149
+ 333,
1150
+ 825,
1151
+ 390
1152
+ ],
1153
+ "page_idx": 11
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "Ardi Tampuu, Tambet Matiisen, Dorian Kodelja, Ilya Kuzovkin, Kristjan Korjus, Juhan Aru, Jaan Aru, and Raul Vicente. Multiagent cooperation and competition with deep reinforcement learning. PLOS ONE, 12(4):1–15, 2017. ",
1158
+ "bbox": [
1159
+ 174,
1160
+ 398,
1161
+ 825,
1162
+ 441
1163
+ ],
1164
+ "page_idx": 11
1165
+ },
1166
+ {
1167
+ "type": "text",
1168
+ "text": "Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, pp. 7794–7803, 2018. ",
1169
+ "bbox": [
1170
+ 174,
1171
+ 450,
1172
+ 823,
1173
+ 479
1174
+ ],
1175
+ "page_idx": 11
1176
+ },
1177
+ {
1178
+ "type": "text",
1179
+ "text": "Yaodong Yang, Rui Luo, Minne Li, Ming Zhou, Weinan Zhang, and Jun Wang. Mean field multiagent reinforcement learning. In ICML, pp. 5571–5580, 2018. ",
1180
+ "bbox": [
1181
+ 173,
1182
+ 488,
1183
+ 823,
1184
+ 517
1185
+ ],
1186
+ "page_idx": 11
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "Lianmin Zheng, Jiacheng Yang, Han Cai, Ming Zhou, Weinan Zhang, and Yong Yu. MAgent: A many-agent reinforcement learning platform for artificial collective intelligence. In AAAI, pp. 8222–8223, 2017. ",
1191
+ "bbox": [
1192
+ 171,
1193
+ 526,
1194
+ 821,
1195
+ 569
1196
+ ],
1197
+ "page_idx": 11
1198
+ },
1199
+ {
1200
+ "type": "text",
1201
+ "text": "A APPENDIX ",
1202
+ "text_level": 1,
1203
+ "bbox": [
1204
+ 176,
1205
+ 102,
1206
+ 297,
1207
+ 117
1208
+ ],
1209
+ "page_idx": 12
1210
+ },
1211
+ {
1212
+ "type": "text",
1213
+ "text": "A.1 CBRP ALGORITHM AND HCOMM ALGORITHM ",
1214
+ "text_level": 1,
1215
+ "bbox": [
1216
+ 174,
1217
+ 133,
1218
+ 553,
1219
+ 148
1220
+ ],
1221
+ "page_idx": 12
1222
+ },
1223
+ {
1224
+ "type": "table",
1225
+ "img_path": "images/ad49975dfb5deedb100c3b224420fcf9b302c984013dc8cdda33cbeee9253a6b.jpg",
1226
+ "table_caption": [],
1227
+ "table_footnote": [],
1228
+ "table_body": "<table><tr><td colspan=\"2\">Algorithm 2 CBRP: Cluster Based Routing Protocol</td></tr><tr><td>1: function CBRP(Vt,Vt),{wt,.,w}, 2: is the undecided nodes set and ε = ;</td><td>{POSst,..,POSst},d) Define neighbours are distance &lt; d,Te is a constant to control the max-waiting time,Vu = </td></tr><tr><td>3: 4: 5:</td><td>Each node i broadcast its weight wt to neighbours; for i is in central node set Vt do Maintain the structure</td></tr><tr><td></td><td>if there is a central nodes in neighbours and its weight is bigger than agent i then</td></tr><tr><td>6: 7:</td><td>Pop node i from Vt and append it to Vt ;</td></tr><tr><td>8:</td><td>for i is in normal nodes set Vt and no central node is in its neighbour do</td></tr><tr><td>9:</td><td>Pop node i from Vt and append it to Vu; Elect central nodes</td></tr><tr><td>10:</td><td>fori is in Vu concurrently do</td></tr><tr><td>11:</td><td>if does not receive larger weight for Te then</td></tr><tr><td></td><td>append i to Vt and broadcast to neighbours;</td></tr><tr><td>12:</td><td></td></tr><tr><td>13:</td><td>else</td></tr><tr><td>14:</td><td>Wait for the signal from central node for 2Te;</td></tr><tr><td>15:</td><td>if received a signal from central node then</td></tr><tr><td></td><td>append i to Vt;</td></tr><tr><td>16:</td><td>else</td></tr><tr><td>17:</td><td>append i to Vt;</td></tr><tr><td>18:</td><td>for i in Vt do √ generate communication link</td></tr><tr><td>19:</td><td>for j in Vt and j is neighbouring i do</td></tr><tr><td>20:</td><td>append eij = O and eji = O to ε;</td></tr><tr><td>21:</td><td></td></tr><tr><td>22:</td><td>for j in Vt do</td></tr><tr><td></td><td>append eij = 0 toε;</td></tr><tr><td>23:</td><td>Return (Vt,Vt,ε)</td></tr></table>",
1229
+ "bbox": [
1230
+ 176,
1231
+ 166,
1232
+ 826,
1233
+ 540
1234
+ ],
1235
+ "page_idx": 12
1236
+ },
1237
+ {
1238
+ "type": "text",
1239
+ "text": "A.2 DETAILS AND DISCUSSIONS OF ALL HYPERPARAMETERS ",
1240
+ "text_level": 1,
1241
+ "bbox": [
1242
+ 174,
1243
+ 569,
1244
+ 616,
1245
+ 584
1246
+ ],
1247
+ "page_idx": 12
1248
+ },
1249
+ {
1250
+ "type": "text",
1251
+ "text": "For both MAgent and StarCraft2 environments, the details of all hyperparameters used for approaches are summarized in the following Table 5 and Table 6. All common hyperparameters of all approaches are set to be the same in the same environments. Except for the ”ATOC”, we change the message dimension to 64 in both enviroments. For the reason that if the dimension of messages is set to be 3 as other algorithms, the necessary GRU embedding in ATOC leads to failure while 64 seems to be robust. ",
1252
+ "bbox": [
1253
+ 173,
1254
+ 595,
1255
+ 825,
1256
+ 679
1257
+ ],
1258
+ "page_idx": 12
1259
+ },
1260
+ {
1261
+ "type": "text",
1262
+ "text": "For the neural network setting in MAgent enviroment, the node encoder part are all implemented with two convolutional layers with 32 filters and kernel size 3 and a MLP with 256 units. For the $Q$ Encoder part, they are implemented with MLP(128, 64, 13). The message generators for algorithms except for ATOC are implemented with $\\mathrm { M L P } ( 6 4 , 3 2 , 3 )$ and the aggregation functions are segment sum. While for ATOC, the message generator is MLP(128, 64) and the aggregation functin isGRU(64). As for neural network setting in Starcraft2, we only tune the input and output layer to adapt to the new environment. All these settings can ensure repeatability. ",
1263
+ "bbox": [
1264
+ 174,
1265
+ 686,
1266
+ 825,
1267
+ 784
1268
+ ],
1269
+ "page_idx": 12
1270
+ },
1271
+ {
1272
+ "type": "text",
1273
+ "text": "A.3 BATTLE SCENARIOS OF MAGENT AND STARCRAFT2 ",
1274
+ "text_level": 1,
1275
+ "bbox": [
1276
+ 176,
1277
+ 801,
1278
+ 583,
1279
+ 815
1280
+ ],
1281
+ "page_idx": 12
1282
+ },
1283
+ {
1284
+ "type": "text",
1285
+ "text": "A.4 DISCUSSIONS ON WEIGHT GENERATOR AND GROUP RADIUS ",
1286
+ "text_level": 1,
1287
+ "bbox": [
1288
+ 176,
1289
+ 827,
1290
+ 638,
1291
+ 842
1292
+ ],
1293
+ "page_idx": 12
1294
+ },
1295
+ {
1296
+ "type": "text",
1297
+ "text": "Although LSC utilize the reward feedback to establish the weight generator, which will be various with respect to different settings. To investigate the improvement brought by our learned importance weight generator, we also compare with a basic random weight generator (randomly chosen the central nodes and separate normal nodes into groups). As shown in Figure 9(a), our learned weight generator significantly outperforms randomly. Faster convergence of our learned weight generator ",
1298
+ "bbox": [
1299
+ 176,
1300
+ 854,
1301
+ 823,
1302
+ 924
1303
+ ],
1304
+ "page_idx": 12
1305
+ },
1306
+ {
1307
+ "type": "text",
1308
+ "text": "Algorithm 3 HCOMM: Communication based Policy Module ",
1309
+ "text_level": 1,
1310
+ "bbox": [
1311
+ 173,
1312
+ 103,
1313
+ 588,
1314
+ 118
1315
+ ],
1316
+ "page_idx": 13
1317
+ },
1318
+ {
1319
+ "type": "text",
1320
+ "text": "1: function $\\overline { { \\mathrm { H C O M M } ( \\mathcal { V } _ { n } , \\mathcal { V } _ { c } , \\mathcal { E } ) } }$ \n2: $\\sharp$ Intra-group aggregation \n3: for $v ^ { i }$ in $\\nu _ { n }$ do \n4: for $v ^ { j }$ in $\\mathcal { V } _ { c }$ and $( i j )$ in $\\mathcal { E }$ do \n5: $e _ { i j } = \\phi ^ { e n c } ( v ^ { i } )$ ; $\\triangleright$ Generate normal to central messages \n6: for $v _ { j }$ in $\\mathcal { V } _ { c }$ do $\\bar { e } _ { j } = \\rho ( \\{ e _ { i j } \\} _ { ( i j ) \\in \\mathcal { E } } )$ ; . Central agents aggregate received messages \n7: $v _ { j } ^ { c } = \\phi ( \\bar { e } _ { j } , v _ { j } ^ { n } ) ;$ . Generate cluster perception \n8: $\\sharp$ Inter-group sharing \n9: for $v _ { j }$ in $\\mathcal { V } _ { c }$ do \n10: for $v _ { i }$ in $\\mathcal { V } _ { c }$ and $( i j )$ ) in $\\mathcal { E }$ do \n11: $e _ { i j } = \\phi ( v _ { i } ^ { c } , v _ { i } ^ { n } ) ;$ ; . Generate central to central messages \n12: for $v _ { j }$ in $\\mathcal { V } _ { c }$ do \n14: 13: $\\begin{array} { l } { \\bar { e _ { j } } = \\rho ( \\{ e _ { i j } \\} _ { ( i j ) \\in \\mathcal { E } } ) ; } \\\\ { v _ { j } ^ { g } = \\phi ( \\bar { e } _ { j } , v _ { j } ^ { n } ) ; } \\end{array}$ . Aggregate received central to central messages $\\triangleright$ Obtain global perception \n15: $\\sharp$ Intro-group sharing \n16: for $v _ { i }$ in $\\mathcal { V } _ { c }$ do \n17: for $v _ { j }$ in $\\nu _ { n }$ and $( i j )$ in $\\mathcal { E }$ do \n18: $\\bar { e _ { i j } } = \\phi ( v _ { i } ^ { g } , v _ { i } ^ { \\dot { c } } , v _ { i } ^ { n } , e _ { j i } ) , \\bar { e } _ { j } = \\rho ( \\{ e _ { i j } \\} _ { ( i j ) \\in \\mathcal { E } } )$ ; $\\triangleright$ Generate central to normal \nmessages \n19: for $v _ { j }$ in $\\smash { \\mathcal { V } _ { n } \\cup \\mathcal { V } _ { c } }$ do \n20: for $v _ { i }$ in $\\mathcal { V } _ { c }$ and $( i j )$ in $\\mathcal { E }$ do \n21: $\\bar { e } _ { j } = \\rho ( \\{ e _ { i j } \\} _ { ( i j ) \\in \\mathcal { E } } ) ;$ ; . Aggregate received central to normal messages \n22: vnj = φ(¯ej , vnj ); . Update states \n23: q j = Q ( v nj ); \nreturn q. ",
1321
+ "bbox": [
1322
+ 173,
1323
+ 121,
1324
+ 826,
1325
+ 507
1326
+ ],
1327
+ "page_idx": 13
1328
+ },
1329
+ {
1330
+ "type": "table",
1331
+ "img_path": "images/fb738d527074117e810d2fcf78833db2261b6ad6cbc1883ef286feff8e3ef78e.jpg",
1332
+ "table_caption": [
1333
+ "Table 5: Hyperparamaters for Magent "
1334
+ ],
1335
+ "table_footnote": [],
1336
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Parameter</td><td rowspan=1 colspan=1>LSC</td><td rowspan=1 colspan=1>IDQN</td><td rowspan=1 colspan=1>MFQ</td><td rowspan=1 colspan=1>CommNet</td><td rowspan=1 colspan=1>IC3</td><td rowspan=1 colspan=1>ATOC</td></tr><tr><td rowspan=1 colspan=1>Episodes</td><td rowspan=1 colspan=1>1750</td><td rowspan=1 colspan=1>1750</td><td rowspan=1 colspan=1>1750</td><td rowspan=1 colspan=1>1750</td><td rowspan=1 colspan=1>1750</td><td rowspan=1 colspan=1>1750</td></tr><tr><td rowspan=1 colspan=1>Estart</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td></tr><tr><td rowspan=1 colspan=1>Eend</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td></tr><tr><td rowspan=1 colspan=1>Learning rate</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td></tr><tr><td rowspan=1 colspan=1>Max env steps</td><td rowspan=1 colspan=1>400</td><td rowspan=1 colspan=1>400</td><td rowspan=1 colspan=1>400</td><td rowspan=1 colspan=1>400</td><td rowspan=1 colspan=1>400</td><td rowspan=1 colspan=1>400</td></tr><tr><td rowspan=1 colspan=1>dimension of messages</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>64</td></tr><tr><td rowspan=1 colspan=1>radius of communication</td><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>~</td><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>~</td><td rowspan=1 colspan=1>~</td><td rowspan=1 colspan=1>6</td></tr></table>",
1337
+ "bbox": [
1338
+ 240,
1339
+ 555,
1340
+ 754,
1341
+ 662
1342
+ ],
1343
+ "page_idx": 13
1344
+ },
1345
+ {
1346
+ "type": "table",
1347
+ "img_path": "images/5d10004c1a5ef475db8bd500c1328ecf7ec63841650b4d4232f7ea28849b1b3b.jpg",
1348
+ "table_caption": [
1349
+ "Table 6: Hyperparamaters for Starcraft2 "
1350
+ ],
1351
+ "table_footnote": [],
1352
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Parameter</td><td rowspan=1 colspan=1>LSC</td><td rowspan=1 colspan=1>IDQN</td><td rowspan=1 colspan=1>MFQ</td><td rowspan=1 colspan=1>CommNet</td><td rowspan=1 colspan=1>IC3</td><td rowspan=1 colspan=1>ATOC</td></tr><tr><td rowspan=1 colspan=1>Total steps</td><td rowspan=1 colspan=1>600k</td><td rowspan=1 colspan=1>600k</td><td rowspan=1 colspan=1>600k</td><td rowspan=1 colspan=1>600k</td><td rowspan=1 colspan=1>600k</td><td rowspan=1 colspan=1>600k</td></tr><tr><td rowspan=1 colspan=1>Estart</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td></tr><tr><td rowspan=1 colspan=1>Eend</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.05</td></tr><tr><td rowspan=1 colspan=1>Learning rate</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td><td rowspan=1 colspan=1>1e-4</td></tr><tr><td rowspan=1 colspan=1>Max env steps</td><td rowspan=1 colspan=1>10000</td><td rowspan=1 colspan=1>10000</td><td rowspan=1 colspan=1>10000</td><td rowspan=1 colspan=1>10000</td><td rowspan=1 colspan=1>10000</td><td rowspan=1 colspan=1>10000</td></tr><tr><td rowspan=1 colspan=1>dimension of messages</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>64</td></tr><tr><td rowspan=1 colspan=1>radius of communication</td><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>~</td><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>~</td><td rowspan=1 colspan=1>~</td><td rowspan=1 colspan=1>6</td></tr></table>",
1353
+ "bbox": [
1354
+ 230,
1355
+ 710,
1356
+ 764,
1357
+ 819
1358
+ ],
1359
+ "page_idx": 13
1360
+ },
1361
+ {
1362
+ "type": "text",
1363
+ "text": "shows the efficiency brought by involving the reward guided weight generator. The hierarchical structured communication network guaranteed through the learned weight generator improves the communication efficiency. The higher average reward obtained by our learned weight generator also shows the necessity of selecting central nodes based on the learned weight generator rather than randomly chosen. ",
1364
+ "bbox": [
1365
+ 174,
1366
+ 853,
1367
+ 825,
1368
+ 924
1369
+ ],
1370
+ "page_idx": 13
1371
+ },
1372
+ {
1373
+ "type": "image",
1374
+ "img_path": "images/26c5da0daac9a3bd939363d7da6a65e948cbc99ad56200d9e21ee1ea77d6268e.jpg",
1375
+ "image_caption": [
1376
+ "Figure 8: Battle scenarios of MAgent and StarCraft2. "
1377
+ ],
1378
+ "image_footnote": [],
1379
+ "bbox": [
1380
+ 207,
1381
+ 106,
1382
+ 784,
1383
+ 291
1384
+ ],
1385
+ "page_idx": 14
1386
+ },
1387
+ {
1388
+ "type": "image",
1389
+ "img_path": "images/06d61b4765147e2e2a74a8391fec2cd063e220488df5715e30b64056d05e6df6.jpg",
1390
+ "image_caption": [
1391
+ "Figure 9: Discussions on weight generator and group radius. "
1392
+ ],
1393
+ "image_footnote": [],
1394
+ "bbox": [
1395
+ 235,
1396
+ 332,
1397
+ 758,
1398
+ 498
1399
+ ],
1400
+ "page_idx": 14
1401
+ },
1402
+ {
1403
+ "type": "text",
1404
+ "text": "To better investigate the hierarchical structure, we compare our LSC algorithm with respect to different group radius $d$ , i.e., 3, 6, 12 and 60. As shown in Figure 9(b), LSC with radius 6 outperform other settings. When the radius increasing, the agents can establish inter-groups cooperation easier. However, LSC with radius 60 performs worse than all the other three cases. LSC with extremely large radius will downgrade to CommNet which is not an effective way to extract valuable information. ",
1405
+ "bbox": [
1406
+ 173,
1407
+ 554,
1408
+ 825,
1409
+ 625
1410
+ ],
1411
+ "page_idx": 14
1412
+ }
1413
+ ]
parse/train/BklWt24tvH/BklWt24tvH_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BklWt24tvH/BklWt24tvH_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1e0-30qKm/H1e0-30qKm.md ADDED
@@ -0,0 +1,292 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # UNLABELED DISENTANGLING OF GANS WITH GUIDED SIAMESE NETWORKS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Disentangling underlying generative factors of a data distribution is important for interpretability and generalizable representations. In this paper, we introduce two novel disentangling methods. Our first method, Unlabeled Disentangling GAN (UD-GAN, unsupervised), decomposes the latent noise by generating similar/dissimilar image pairs and it learns a distance metric on these pairs with siamese networks and a contrastive loss. This pairwise approach provides consistent representations for similar data points. Our second method (UD-GAN-G, weakly supervised) modifies the UD-GAN with user-defined guidance functions, which restrict the information that goes into the siamese networks. This constraint helps UD-GAN-G to focus on the desired semantic variations in the data. We show that both our methods outperform existing unsupervised approaches in quantitative metrics that measure semantic accuracy of the learned representations. In addition, we illustrate that simple guidance functions we use in UD-GAN-G allow us to directly capture the desired variations in the data.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Generative Adversarial Networks (GANs) (Goodfellow et al., 2014) are generative model estimators, where two neural networks (generator and discriminator) are trained in an adversarial setting, so that likelihood-based probabilistic modeling is not necessary. This works particularly well for sampling from a complex probability distribution, such as images. Although GANs yield realistic looking images (Radford et al., 2015), the original formulation in (Goodfellow et al., 2014) only allows for randomly sampling from the data distribution without disentangled structural or semantic control over the generated data points.
12
+
13
+ One way to disentangle the generation process is to use conditional GANs (Mirza & Osindero, 2014; Odena et al., 2017). These models modify the generator by conditioning it with supervised labels. Then, they either take the same labels as input in the discriminator (Mirza & Osindero, 2014) and measure the image-label compatibility, or classify the correct label at the output, given the generated image (Odena et al., 2017). Conditional GANs rely on a dataset with labels, which might not always be available or might be time-consuming to collect.
14
+
15
+ In this paper, we propose two GAN-based methods that learns disentangled representations without using labeled data. Our first method, Unlabeled Disentangling GAN (UD-GAN), generates image pairs, then embeds them with Siamese Networks (Chopra et al., 2005), and finally learns a distance metric on a disentangled representation space. Whereas our second method, UD-GAN-G, uses guidance functions to restrict the input to our siamese networks, so that they capture desired semantic variations.
16
+
17
+ # 2 RELATED WORK
18
+
19
+ There have been many studies on learning disentangled representations in generative models, which can be grouped into the level of supervision/labeled data they require.
20
+
21
+ Disentangled representations (supervised). In (Zhu et al., 2014; Yang et al., 2015), the identity and the viewpoint of an object are disentangled via reconstructing the same object from a different viewpoint and minimizing a reconstruction loss. Whereas in (Kingma et al., 2014; Makhzani et al., 2016), the style and category of an object is separated via autoencoders, where an encoder embeds the style of an input image to a latent representation, and a decoder takes the category and style input to reconstruct the input image. In (Tran et al., 2017; Yin et al., 2017), autoencoders and GANs are combined to decompose identity and attribute of an object, where the disentangled representation is obtained at the encoder outputs, and image labels are used at the output of the discriminator.
22
+
23
+ Disentangled representations (semi-supervised). In (Reed et al., 2014), they clamp the hidden units for a pair of images with the same identity but with different pose or expression to have the same identity representation. Whereas in (Kulkarni et al., 2015), synthesized images are used to disentangle pose, light, and shape of an object by passing a batch of images where only one attribute varies and the rest of the representation is clamped to be the same. These techniques only require a batch of samples with one attribute different at a time.
24
+
25
+ Disentangled representations (unsupervised). InfoGAN (Chen et al., 2016) is an unsupervised technique that discovers categorical and continuous factors by maximizing the mutual information between a GAN’s noise variables and the generated image. $\beta$ -VAE (Higgins et al., 2017) and DIPVAE (Kumar et al., 2018) are unsupervised autoencoder-based techniques that disentangle different factors in the latent representation of an encoded image. In $\beta$ -VAE, the KL-divergence between the latent and a prior distribution is weighted with a factor $\beta > 1$ to encourage disentanglement in the posterior latent distributions. Wheres in DIP-VAE, the covariance matrix of the latent distribution is encouraged to be an identity matrix, thus leading to uncorrelated latent representations.
26
+
27
+ For all of the unsupervised methods, after a model is trained, a human needs to investigate which factors map to which semantic property. In addition, as the methods are unsupervised, not all desirable factors might be represented. In contrast, our method builds on existing approaches with two important modifications: (i) We operate on pairs of similar/dissimilar image pairs. (ii) We compute the image embeddings using separate networks, which allows us to guide the disentangling process with information restriction.
28
+
29
+ # 3 UNLABELED DISENTANGLING GAN
30
+
31
+ # 3.1 BACKGROUND: GENERATIVE ADVERSARIAL NETWORKS
32
+
33
+ In GANs, the generator, $G ( . )$ , maps a latent variable $\mathbf { z }$ , which has an easy-to-sample distribution, into a more complex and unknown distribution, such as images. On the other hand, the discriminator $D ( . )$ tries to distinguish real images from the ones that are generated by $G$ . In (Goodfellow et al., 2014), the training is performed as a minimax game as follows:
34
+
35
+ $$
36
+ \operatorname* { m i n } _ { G } \operatorname* { m a x } _ { D } V ( G , D ) = \underset { \mathbf { x } \sim \mathbb { P } _ { \mathrm { R } } } { \mathbb { E } } [ \log D ( \mathbf { x } ) ] + \underset { \mathbf { z } \sim \mathbb { P } _ { \mathrm { Z } } } { \mathbb { E } } [ \log ( 1 - D ( G ( \mathbf { z } ) ) ) ] ,
37
+ $$
38
+
39
+ where $\mathbb { P } _ { \mathrm { R } }$ and $\mathbb { P } _ { \mathrm { Z } }$ are the probability distributions of real images and the latent variable $\mathbf { z }$ , respectively. We train our GAN by using the loss in equation 1. In order to increase stability, we modify the generator loss by maximzing $\log ( D ( G ( \mathbf { z } ) ) )$ , instead of minimizing the second term in equation 1.
40
+
41
+ # 3.2 A NOVEL GAN ARCHITECTURE: UD-GAN
42
+
43
+ In a standard GAN setting, all of the variation in the distribution of real images is captured by the latent variable z. However, a single dimension or a slice of $\mathbf { z }$ does not necessarily have a semantic meaning. In this paper, our target is to slice the latent variable into multiple vectors, where each vector controls a different semantic variation.
44
+
45
+ Our network architecture is visualized in Figure 1. In our method, the latent vector $\begin{array} { r l } { \mathbf { z } } & { { } = } \end{array}$ $[ \mathbf { q } _ { 1 } , \mathbf { q } _ { 2 } , . . . , \mathbf { q } _ { N _ { A } } ]$ is the concatenation of $N _ { A }$ knobs, $\{ \mathbf { q } _ { i } \} _ { i = 1 } ^ { N _ { A } }$ , which represent different attributes we aim to disentangle. One can add a final variable that captures the variation (and the noise) that is not picked up by the knobs. In our experiments, this additional variable did not have a notable effect. In our notation, $\mathbf { q } _ { \bar { i } }$ refers to all of the knobs, except $\mathbf { q } _ { i }$ . In order to train our model, first, for each $\mathbf { q } _ { i }$ , we sample two different vectors, $\mathbf { q } _ { i } ^ { ( 1 ) }$ and ${ \bf q } _ { i } ^ { ( 2 ) }$ from Unif $( - 1 , 1 )$ . If we would attempt to form a batch by combinatorially concatenating all knob samples, we get a batch size of $2 ^ { N _ { A } }$ , which grows exponentially with the number of attributes. To avoid this computational burden, we train our model through stochastic sampling of one attribute at a time. For example, if the $i ^ { t h }$ attribute is chosen, we generate four images as shown in Figure 1.
46
+
47
+ ![](images/12fcb55a985b94ae43aadc86857d735459deec4b23ea1e191005d67708010c8a.jpg)
48
+ Figure 1: The flowchart of our architecture. Sampled latents from different attributes are combined into latent vectors. Generated images are grouped with respect to different attributes (here, represented by shape) by Siamese Networks (denoted as $\phi _ { i }$ ).
49
+
50
+ The image pairs that are generated with the same $\mathbf { q } _ { i }$ vectors, $\left\{ \mathbf { x } _ { 1 1 } , \mathbf { x } _ { 1 2 } \right\}$ or $\left\{ \mathbf { x } _ { 2 1 } , \mathbf { x } _ { 2 2 } \right\}$ , should have the same $i ^ { t h }$ attribute, regardless of the values of $\mathbf { q } _ { \bar { i } }$ . We can ensure this via embedding the generated image pairs into a representation space with Siamese Networks (Chopra et al., 2005), which are denoted as $\phi _ { i } ( . )$ , and then learning a distance metric on the embedding vectors by employing Contrastive Loss (Hadsell et al., 2006). An optional guidance function is used to restrict the information that goes into a siamese network, thus letting us approximate a desired representation space. The guidance is disabled for our unsupervised UD-GAN approach. Whereas for UD-GAN-G, the guidance is a simple, user-defined function, which is discussed in Section 3.3.
51
+
52
+ We use a Contrastive Loss function to pull similar image pairs together, and push dissimilar pairs apart as follows:
53
+
54
+ $$
55
+ \mathcal { L } _ { \phi _ { i } } = \frac { 1 } { 2 } \sum _ { n _ { i } = 1 } ^ { 2 } \rho _ { i } ( \mathbf { x } _ { n _ { i } 1 } , \mathbf { x } _ { n _ { i } 2 } ) ^ { 2 } + \frac { 1 } { 4 } \sum _ { n _ { \bar { i } } = 1 } ^ { 2 } \sum _ { m _ { \bar { i } } = 1 } ^ { 2 } \operatorname* { m a x } ( 0 , \gamma _ { \mathrm { i } } ^ { ( 1 , 2 ) } - \rho _ { i } ( \mathbf { x } _ { 1 n _ { \bar { i } } } , \mathbf { x } _ { 2 m _ { \bar { i } } } ) ) ^ { 2 } ,
56
+ $$
57
+
58
+ where, $\mathcal { L } _ { \phi _ { i } }$ is the Contrastive Loss for the $i ^ { t h }$ Siamese Network $\phi _ { i } ( . )$ , the function $\rho _ { i } ( { \bf x } _ { n _ { i } 1 } , { \bf x } _ { n _ { i } 2 } ) =$ $\big | \big | \phi _ { i } ( \mathbf { x } _ { n _ { i } 1 } ) - \phi _ { i } ( \mathbf { x } _ { n _ { i } 2 } ) \big | \big | _ { 2 }$ is a shorthand for embedding distance between ${ \bf x } _ { n _ { i } 1 }$ and ${ \bf x } _ { n _ { i } 2 }$ , and $\gamma _ { \mathrm { i } } ^ { ( 1 , 2 ) }$ is an adaptive margin of the form $\gamma _ { \mathrm { i } } ^ { ( 1 , 2 ) } ~ = ~ \big | \big | \mathbf { q } _ { i } ^ { ( 1 ) } - \mathbf { q } _ { i } ^ { ( 2 ) } \big | \big | _ { 2 }$ . Using an adaptive margin makes the distance between two latent samples semantically meaningful and we empirically found that it improves the training stability.
59
+
60
+ The discriminator network $D$ is not modified and is trained to separate real and generated image distributions. Donahue et al. (2018) use a similar latent variable slicing for capturing illumination and pose variations of a face with a fixed identity. Their discriminator needs image pairs, which must be labeled for real images, to judge the quality and identity of the faces. Our method does not require any labels for the real images. Instead, we create similar and dissimilar image pairs via concatenating latent variables and generating image batches. Our final loss function is:
61
+
62
+ $$
63
+ \begin{array} { c } { \mathcal { L } _ { \phi } = \lambda _ { \phi _ { i } } \mathcal { L } _ { \phi _ { i } } , \quad i \sim \mathrm { C a t } ( N _ { A } ) } \\ { \displaystyle \operatorname* { m i n } _ { G } \operatorname* { m a x } _ { D } V ( G , D ) = \mathcal { L } _ { G A N } + \mathcal { L } _ { \phi } , } \end{array}
64
+ $$
65
+
66
+ where, $\mathcal { L } _ { W G A N }$ is the GAN loss described in equation 1, $\lambda _ { \phi _ { i } }$ is the weight of the embedding loss, and the sampling of the latent variables depends on $i$ and is performed as described above.
67
+
68
+ # 3.3 DISENTANGLING WITH GUIDANCE FUNCTIONS: UD-GAN-G
69
+
70
+ A guidance function reduces the information content that flows into a siamese network and causes the corresponding embedding space to capture only the variations in the restricted input. For example, consider we want to capture the hair-related attributes in the CelebA dataset (Liu et al., 2015), which contains aligned images of human faces. By cropping every region but the top part of a generated image, we are able to guide $\phi _ { t o p } ( . )$ to learn only the variations in the “Hair Color” as shown in the first row of Figure 2. Note that, the knob $\mathbf { q } _ { t o p }$ (that corresponds to $\phi _ { t o p . } ( . ) \big _ { ; }$ ) changes the hair color not only at the cropped part of the image but as a whole. This is due to the interplay between the adversarial part of our loss (see equation 3), which enforces global realism in images, and the contrastive loss, which administers disentangled representations. As shown in Figure 2, different guidance functions leads to capturing different variations in the CelebA dataset.
71
+
72
+ ![](images/72857c19566f79f0bc53ae3106f465d491ef96c259c4cc9f014a772864221607.jpg)
73
+ Figure 2: (left) Four of our siamese networks are guided with differently cropped images. (right) Varying latent variables that correspond to guided siamese networks captures desired variations.
74
+
75
+ # 3.4 PROBABILISTIC INTERPRETATION
76
+
77
+ We can gain a probabilistic interpretation of our method on a toy example. Let us assume a problem, where we want to generate images of colored polygons (see Figure 1), where there are two independent factors of variation: shape and color, which we want to capture using two knobs $\mathbf { q } _ { i }$ and ${ \bf q } _ { j }$ , respectively. When we set ${ \bf q } _ { j }$ to a certain value and vary $\mathbf { q } _ { i }$ , we want to generate polygons with the same color, but different shapes, and vice versa.
78
+
79
+ Let $\mathbb { P }$ be the probability distribution of colored polygons. For each attribute, $\mathbb { P }$ can be decomposed into a mixture distribution as follows:
80
+
81
+ $$
82
+ \mathbb { P } = \sum _ { k = 1 } ^ { N _ { i } } \pi _ { i } ^ { ( k ) } \mathbb { Q } _ { i } ^ { ( k ) } \quad \gets \mathrm { ~ f o r ~ a t t r i b u t e ~ } i , \qquad \mathbb { P } = \sum _ { k = 1 } ^ { N _ { j } } \pi _ { j } ^ { ( k ) } \mathbb { Q } _ { j } ^ { ( k ) } \quad \gets \mathrm { ~ f o r ~ a t t r i b u t e ~ } j \gets \mathbb { P } \operatorname { m a x } _ { i } ^ { ( k ) } \mathbb { Q } _ { i } ^ { ( k ) } ,
83
+ $$
84
+
85
+ where , Q(k) is a mixture component and π(k)i is its corresponding probability of choosing it, and Ni is the number of different values an attribute (in our example, $i$ corresponds to shape) can take. A similar explanation can be made for attribute $j$ , i.e. color. For the sake of this analysis, we accept that for each attribute, $\mathbb { P }$ can be decomposed into different discrete mixture distributions as shown in Figure 3. For this specific case, $\mathbb { Q } _ { i } ^ { ( 1 ) }$ and $\mathbb { Q } _ { i } ^ { ( 2 ) }$ are the distributions of colored squares and colored diamonds, respectively. For the color attribute, which is indexed by $j$ , each $\mathbb { Q } _ { j } ^ { ( k ) }$ corresponds to a distribution of polygons with a single color (i.e., green polygons).
86
+
87
+ Our contrastive loss in equation 2 has two terms. The first term is minimizing the spread of each mixture component $\mathbb { Q } _ { i } ^ { ( k ) }$ . This spread is inversely related to disentanglement. If all samples from
88
+
89
+ ![](images/dd13128020a66e3c7aa9292146e12ee88fead4ab2cc1dbd1a665b0716172dff7.jpg)
90
+ Figure 3: Illustration of the embedding spaces and separated probability distributions after training our model.
91
+
92
+ Q(k) are mapped to the same embedding vector, the effect of $j$ (and any other attribute) on the representation $\phi _ { i } ( . )$ disappears and disentangling is achieved. During training, we stochastically go through all embedding spaces and minimize their spread, thus resulting in a disentangled representation in Table 9 in Appendix G.
93
+
94
+ The second term in equation 2 separates all $\mathbb { Q } _ { i } ^ { ( k ) }$ from each other using an adaptive margin $\gamma _ { i } ^ { ( 1 , 2 ) }$ . This margin depends on the difference between input latent pairs, so that the resulting embedding space is smooth. In other words, we separate rectangles, circles, and ovals from each other, but circles should be closer to ovals than squares, due to their relative similarity. In the following, we focus on the shape attribute that is represented by $i$ , however, derivations carry over to the color attribute $j$ .
95
+
96
+ In order to separate the probability distributions over image embeddings, one can maximize a divergence between all pairs from Q(k)i . One way to measure the distance between these distributions is to use the unbiased estimator of the energy distance (Szekely & Rizzo, 2004): ´
97
+
98
+ $$
99
+ D _ { E } ( \mathbb { Q } _ { i } ^ { ( 1 ) } , \mathbb { Q } _ { i } ^ { ( 2 ) } ; \phi _ { i } , j ) = - \frac { 1 } { 2 } \sum _ { n _ { i } = 1 } ^ { 2 } \rho _ { i } ( \mathbf { x } _ { n _ { i } 1 } , \mathbf { x } _ { n _ { i } 2 } ) ^ { 2 } + \frac { 1 } { 4 } \sum _ { n _ { j } = 1 } ^ { 2 } \sum _ { m _ { j } = 1 } ^ { 2 } \rho _ { i } ( \mathbf { x } _ { 1 n _ { j } } , \mathbf { x } _ { 2 m _ { j } } ) ^ { 2 }
100
+ $$
101
+
102
+ The energy distance in equation 5 can be interpreted as an instance of Maximum Mean Discrepancy (Binkowski et al., 2018) and resembles the Contrastive Loss (Hadsell et al., 2006). We can ´ rewrite equation 5 using the Contrastive Loss in equation 2 as follows:
103
+
104
+ $$
105
+ D _ { E } = - \mathcal { L } _ { \phi _ { i } } + \frac { 1 } { 4 } \sum _ { n _ { j } = 1 } ^ { 2 } \sum _ { m _ { j } = 1 } ^ { 2 } \rho _ { i } ( \mathbf { x } _ { 1 n _ { j } } , \mathbf { x } _ { 2 m _ { j } } ) ^ { 2 } + \operatorname* { m a x } ( 0 , \gamma _ { \mathrm { i } } ^ { ( 1 , 2 ) } - \rho _ { i } ( \mathbf { x } _ { 1 n _ { j } } , \mathbf { x } _ { 2 m _ { j } } ) ) ^ { 2 }
106
+ $$
107
+
108
+ Each element in the second sum is quadratic function and has its minimum at $\rho _ { i } ( { \bf x } _ { 1 n _ { j } } , { \bf x } _ { 2 m _ { j } } ) =$ $\gamma _ { \mathrm { i } } ^ { ( 1 , 2 ) } / 2$ and the value of the minimum is $\left( \gamma _ { \mathrm { i } } ^ { ( 1 , 2 ) } \right) ^ { 2 } / 2$ . So, we can rewrite equation 6 as follows:
109
+
110
+ $$
111
+ D _ { E } ( \mathbb { Q } _ { i } ^ { ( 1 ) } , \mathbb { Q } _ { i } ^ { ( 2 ) } ; \phi _ { i } , j ) \ge \frac { \big ( \gamma _ { \mathrm { i } } ^ { ( 1 , 2 ) } \big ) ^ { 2 } } { 2 } - \mathcal { L } _ { \phi _ { i } } .
112
+ $$
113
+
114
+ Therefore, as the margin γ(1i $\gamma _ { \mathrm { i } } ^ { ( 1 , 2 ) }$ depends only on the input latent variables and is not trainable, minimizing our embedding loss $\mathcal { L } _ { \phi _ { i } }$ maximizes the lower bound for the energy distance $D _ { E }$ . This corresponds to learning a Siamese Network $\phi _ { i } ( . )$ that separates two probability distributions $\mathbb { Q } _ { i } ^ { ( 1 ) }$ and $\mathbb { Q } _ { i } ^ { ( 2 ) }$ , i.e., colored squares and colored diamonds, from each other and minimizes the spread of each distribution, thus resulting in disentangling the effect of $j$ from $i$ . The same derivation can be made for the color attribute. After jointly training the Siamese Networks, we can achieve the embedding spaces represented in Figure 3. An example of one such disentangled embedding space is illustrated for MNIST (LeCun & Cortes, 2010) digits in Figure 4 in Appendix B.
115
+
116
+ # 4 EXPERIMENTS
117
+
118
+ # 4.1 SETUP
119
+
120
+ We perform our experiments on a server with Intel Xeon Gold 6134 CPU, 256GB system memory, and an NVIDIA V100 GPU with 16GB of graphics memory. Our generator and discriminator architectures are outlined in our Appendix A. Each knob is a 1-dimensional slice of the latent variable and is sampled from Uni $\tilde { \cdot } ( - 1 , 1 )$ . We use ADAM (Kingma & Ba, 2014) as an optimizer for our training with the following parameters: learning rate $ _ { = 0 . 0 0 0 2 }$ and $\beta _ { 1 } = 0 . 5$ . We will release our code after the review process.
121
+
122
+ Datasets. We evaluate our method on two image datasets: (i) the CelebA dataset (Liu et al., 2015), which consists of over 200,000 images of aligned faces. We cropped the images to $6 4 \times 6 4$ pixels in size. (ii) the 2D Shapes (Higgins et al., 2017), which is a dataset that is synthetically created with different properties, such as shape, scale, orientation, and $\mathbf { X } ^ { } -$ -y locations. Both datasets are divided into training and test sets with a $90 \% - 1 0 \%$ ratio. The weight values for the contrastive loss is $\lambda _ { \phi } = 1$ for the CelebA dataset and $\lambda _ { \phi } = 5$ for the 2D shapes dataset. We use a 32 and 10-dimensional latent variables for the CelebA and the 2D Shapes datasets, respectively.
123
+
124
+ Baselines. We have two versions of our algorithm. UD-GAN refers to the results that are obtained without any guidance at the input of our siamese networks, whereas UD-GAN-G represents a guided training. We compare our method against $\beta$ -VAE (Higgins et al., 2017), DIP-VAE (Kumar et al., 2018), and InfoGAN (Chen et al., 2016) to compare against both autoencoder and GAN-based approaches. We get the quantitative and visual results for $\beta$ -VAE and DIP-VAE from (Higgins et al., 2017) and (Kumar et al., 2018), and use our own implementation of InfoGAN for training and testing. The same generator/discriminator architecture is used for InfoGAN and our method.
125
+
126
+ Guidance. For the CelebA dataset, the first 28 of 32 latent knobs are unguided and therefore are processed by the same siamese network that outputs a 28-dimensional embedding vector1. Whereas the remaining four knobs correspond to four siamese networks $( \phi _ { t o p } , \phi _ { m i u } , \phi _ { m i l } , \phi _ { b o t } )$ that are guided with cropped images in Figure 2. For the 2D shapes dataset, we have 10 knobs, where the first 7 dimensions are unguided. In order to guide the remaining three networks, we estimate the center of mass $( \hat { M } _ { x } , \hat { M } _ { y } )$ and the size $\hat { S }$ of the generated object and feed them to our siamese networks, $\phi _ { X } ( \hat { M } _ { x } ) , \phi _ { Y } ( \hat { M } _ { y } )$ , and $\phi _ { S } ( \hat { S } )$ . More information for this computation can be found in Appendix D.
127
+
128
+ # 4.2 RESULTS
129
+
130
+ Disentanglement Metric. This metric was proposed by Higgins et al. (2017) and measures whether learned disentangled representations can capture separate semantic variations in a dataset. In $\beta$ - VAE and DIP-VAE, this representation is the output of the encoder, i.e., the inferred latent variable. For InfoGAN, we use the representation learned by the discriminator. In our method, we use the concatenated outputs of our siamese networks, which we denote as $\phi ( . )$ .
131
+
132
+ The disentanglement metric scores for different methods are illustrated in Table 1. Here, we can see that both of our methods outperforms the baseline on the CelebA dataset. All of the baseline approaches relate the latent variables to generated images on per-image basis. Whereas our approach attempts to relate similarities/differences of latent variable pairs to image pairs, which provides a discriminative image embedding, where each dimension is invariant to unwanted factors (Hadsell et al., 2006).
133
+
134
+ For both datasets, our guided network (UD-GAN-G) performs better than our unguided approach, especially on the CelebA dataset. This might be due to the correlations between irrelevant attributes. For example the correlation coefficient between “Wearing Lipstick” and “Wavy Hair” attributes is 0.36, although they are not necessarily dependent. One of our guided networks receive the cropped image around the mouth of a person, which prevents cluttering it with hairstyle. Therefore, this guidance provides better disentanglement and results in an improved score as shown in Table 1. Due to containing simple synthetic images, our disentanglement scores for the 2D shapes dataset are very high. The reason we get 100.0 score on our guided method is because of the guidances we choose, which are highly correlated with the ground truth labels, as shown in Table 7 in Appendix D.
135
+
136
+ Table 1: Disentanglement metric scores (Higgins et al., 2017), which measure how strongly and independently the dataset attributes are captured by a method.
137
+
138
+ <table><tr><td>Method</td><td>2DS Shapes</td><td>CelebA</td></tr><tr><td>β-VAE</td><td>99.2</td><td>7.1</td></tr><tr><td>InfoGAN</td><td>88.4</td><td>12.3</td></tr><tr><td>DIP-VAE</td><td>98.7</td><td>14.8</td></tr><tr><td>UD-GAN</td><td>99.1</td><td>15.4</td></tr><tr><td>UD-GAN-G</td><td>100.0</td><td>16.5</td></tr></table>
139
+
140
+ CelebA Attribute Classification. Kumar et al. (2018) introduced a binary classification metric for the CelebA attributes that project a test image embedding onto average embedding vectors of attributes. In Table 2, we compare our method against baseline approaches on CelebA attribute classification accuracy using the aforementioned projection vector. Similar to the results in Table 1, our guided approach slightly outperforms our unguided method and the other completely unsupervised techniques. This is because some attributes in the CelebA dataset can be spatially isolated via cropping, which leads to a better classification performance. For example, the attributes that are related to hair (Black Hair, Blond Hair, Wavy Hair) and mouth (Mouth Slightly Open, Wearing Lipstick) are captured better by the guided approach, because our top and bottom crops (see Figure 2) are detaching the effects of other variations and are making attributes less correlated. The accuracy on the attribute “Bangs” is worse on the guided approach. This might be due to heuristic cropping we perform that divides the relevant image region into two slits.
141
+
142
+ Table 2: CelebA attribute classification accuracy.
143
+
144
+ <table><tr><td>AAaaheedperaga</td><td></td><td></td><td></td><td>Bre aerr</td><td>Jre pulr</td><td>Paaeeaes</td><td></td><td>wado cprons nntn</td><td>peeg tr</td><td>JAH KAem</td><td>WhSeer</td><td>Vahsdrsieer</td></tr><tr><td>Prriea β-VAE</td><td>71.6</td><td>Aeeie 72.6</td><td>sueg 90.6</td><td>79.3</td><td>89.1</td><td>79.3</td><td>Wr 83.5</td><td>76.1</td><td>86.9</td><td>67.8</td><td>95.9</td><td>82.4</td></tr><tr><td>DIP-VAE</td><td>73.7</td><td>73.2</td><td>90.9</td><td>80.6</td><td>91.9</td><td>81.5</td><td>85.9</td><td>75.9</td><td>85.3</td><td>71.5</td><td>96.2</td><td>84.7</td></tr><tr><td>InfoGAN</td><td>74.7</td><td>73.8</td><td>90.9</td><td>80.9</td><td>91.5</td><td>82.6</td><td>87.4</td><td>76.9</td><td>88.7</td><td>74.3</td><td>97.3</td><td>86.9</td></tr><tr><td>UD-GAN</td><td>75.0</td><td>74.8</td><td>90.5</td><td>82.1</td><td>91.5</td><td>84.2</td><td>86.2</td><td>79.7</td><td>87.5</td><td>75.1</td><td>96.5</td><td>85.6</td></tr><tr><td>UD-GAN-G</td><td>75.0</td><td>75.5</td><td>90.2</td><td>82.3</td><td>92.1</td><td>84.2</td><td>89.9</td><td>82.2</td><td>87.7</td><td>75.6</td><td>96.7</td><td>87.3</td></tr></table>
145
+
146
+ Visual Comparison. In Table 3, we illustrate images generated by different methods on the CelebA dataset. Each of the three rows capture the change in a semantic property: smile, azimuth, and hair color, respectively. Within each image group, a latent dimension is varied (from top to bottom) to visualize the semantic change in that property. Compared to adversarial methods, such as InfoGAN and UD-GAN-G, the DIP-VAE method generates blurrier images, due to the data likelihood term in VAE-based approaches, which is usually implemented as a pixel-wise image reconstruction loss. In GAN-based approaches, this is handled via a learnable discriminator in an adversarial setting. In Table 1 and 2, we quantitatively show the advantage of using our guided approach. Another advantage is to have better control over the captured attributes. For example, in all unsupervised approaches (including UD-GAN), we need to check which latent dimension represents corresponds to which visual attribute. In some cases, a semantic attribute might not be captured due to the correlated nature of a dataset. Whereas, in UD-GAN-G, we directly obtain the variations in smile, azimuth, and hair color through cropping the bottom, middle, and top part of our images, respectively. Thanks to our guidance in Figure 2, we can directly manipulate these three attributes using the knobs $\mathbf { q } _ { b o t }$ , $\mathbf { q } _ { m i l }$ , and $\mathbf { q } _ { t o p }$ as shown in Table 3.
147
+
148
+ The same trend is true for the 2D Shapes dataset results in Table 4. Although the $\mathrm { X }$ and Y positions and the scale of the synthetic object is captured by both our unsupervised and guided approaches, the guidance we choose directly captures the desired feature on in advance chosen knobs ${ \bf q } _ { X } , { \bf q } _ { Y }$ , and $\mathbf { q } _ { S }$ , respectively.
149
+
150
+ ![](images/01d42ff2809765efe5d0ee8e0efe0cabaded6de33c9d2f95b57d2b573d9e7a3e.jpg)
151
+ Table 4: Generated images for the 2D Shapes dataset by varying a latent dimension, which corresponds to a semantic property (first row: UD-GAN, second row: UD-GAN-G).
152
+
153
+ ![](images/eb73b64e75325e51c4443195f4d40946f30723b561f0dce9c2d5ab6160e4a59c.jpg)
154
+
155
+ # 4.3 DISCUSSION
156
+
157
+ In completely unsupervised approaches, there is no guarantee to capture all of the desired semantic variations. The main premise behind UD-GAN-G is to find very simple, yet effective ways to capture some of the variation in the data. This weak supervision helps us to obtain proxies to certain semantic properties, so that we get the desired features without training the model multiple times with different hyperparameters or initializations.
158
+
159
+ In the aligned the CelebA dataset, each face is roughly centered around the nose. This reduces the variation and simplifies the problem of guidance design, as we show in Figure 2. In more complex scenarios, where the objects can appear in a large variety of scales, translations, and viewpoints, one can use a pre-trained object detection and localization method, such as YOLO (Redmon et al., 2015), as a guidance network. This enables us to use the knowledge obtained from a labeled dataset, such as ImageNet (Russakovsky et al., 2015) to disentangle a new unlabeled dataset. Note that backpropagating the gradients of a deep network into an image might cause adversarial samples (Szegedy et al., 2014). However, the discriminator can alleviate this by rejecting problematic images.
160
+
161
+ In order to backpropagate the gradients from the siamese networks to the generator, the guidance function we use needs to be differentiable. This might pose a limitation to our method; however, differentiable relaxations can instead be used to guide our network. For example, one can employ differentiable relaxation of the superpixel segmentation in (Jampani et al., 2018) to disentangle a low-level image segmentation.
162
+
163
+ Our latent variables are sampled from a uniform distribution. In addition, image similarity is measured by using L2-distance between a pair of image embeddings. We experimented with modeling some latent dimensions as categorical variables. However, we encountered training stability issues, due to computing the softmax loss between two learnable categorical image embeddings, instead of one embedding and one fixed label vector as it is usually done. We plan to tackle that problem in our future work.
164
+
165
+ # 5 CONCLUSION
166
+
167
+ In this paper we introduced UD-GAN and UD-GAN-G, novel GAN formulations which employ Siamese networks with contrastive losses in order to make slices of the latent noise space disentangled and more semantically meaningful. Our experiments encompassed guided and unguided approaches for the embedding networks, and illustrated how our methods can be used for semantically meaningful image manipulation. Our qualitative and quantiative results confirm that our method can adjust well to the intrinsic factors of variation of the data and outperform the current state-of-the-art methods on the CelebA and 2D Shapes datasets. In future work, we plan to investigate more powerful forms of embedders, e.g. extracting information from pre-trained networks for semantic segmentation and landmark detection. This allows for even more powerful novel image manipulation techniques.
168
+
169
+ # REFERENCES
170
+
171
+ M. Binkowski, D. J. Sutherland, M. Arbel, and A. Gretton. Demystifying MMD GANs. ´ ICLR, 2018.
172
+ Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. NIPS, 2016.
173
+ Sumit Chopra, Raia Hadsell, and Yann LeCun. Learning a similarity metric discriminatively, with application to face verification. In CVPR, 2005.
174
+ C. Donahue, Z. C. Lipton, A. Balsubramani, and J. McAuley. Semantically Decomposing the Latent Spaces of Generative Adversarial Networks. ICLR, 2018.
175
+ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, 2014.
176
+ Yandong Guo, Lei Zhang, Yuxiao Hu, Xiaodong He, and Jianfeng Gao. MS-Celeb-1M: A dataset and benchmark for large scale face recognition. In European Conference on Computer Vision, 2016.
177
+
178
+ R. Hadsell, S. Chopra, and Y. LeCun. Dimensionality reduction by learning an invariant mapping. CVPR, 2006.
179
+
180
+ Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. Beta-vae: Learning basic visual concepts with a constrained variational framework. In ICLR, 2017.
181
+
182
+ Varun Jampani, Deqing Sun, Ming-Yu Liu, Ming-Hsuan Yang, and Jan Kautz. Superpixel sampling networks. ECCV, 2018.
183
+
184
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, 2014.
185
+
186
+ Diederik P. Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semisupervised learning with deep generative models. In NIPS, 2014.
187
+
188
+ Tejas D. Kulkarni, William F. Whitney, Pushmeet Kohli, and Josh Tenenbaum. Deep convolutional inverse graphics network. In NIPS, 2015.
189
+
190
+ Abhishek Kumar, Prasanna Sattigeri, and Avinash Balakrishnan. Variational inference of disentangled latent concepts from unlabeled observations. In ICLR, 2018.
191
+
192
+ Yann LeCun and Corinna Cortes. MNIST handwritten digit database. 2010.
193
+
194
+ Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In ICCV, 2015.
195
+
196
+ Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, and Ian Goodfellow. Adversarial autoencoders. In ICLR, 2016.
197
+
198
+ Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. CoRR, 2014.
199
+
200
+ A. Odena, C. Olah, and J. Shlens. Conditional image synthesis with auxiliary classifier gans. In ICML, 2017.
201
+
202
+ Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. CoRR, 2015.
203
+
204
+ Joseph Redmon, Santosh Kumar Divvala, Ross B. Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. CoRR, 2015.
205
+
206
+ Scott Reed, Kihyuk Sohn, Yuting Zhang, and Honglak Lee. Learning to disentangle factors of variation with manifold interaction. In ICML, 2014.
207
+
208
+ Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. IJCV, 2015.
209
+
210
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In ICLR, 2014.
211
+
212
+ Gabor J. Sz ´ ekely and Maria L. Rizzo. Testing for equal distributions in high dimensions. ´ InterStat, 2004.
213
+
214
+ L. Tran, X. Yin, and X. Liu. Disentangled representation learning gan for pose-invariant face recognition. In CVPR, 2017.
215
+
216
+ Laurens van der Maaten and Geoffrey Hinton. Journal of Machine Learning Research, 2008.
217
+
218
+ Jimei Yang, Scott Reed, Ming-Hsuan Yang, and Honglak Lee. Weakly-supervised disentangling with recurrent transformations for 3d view synthesis. In NIPS, 2015.
219
+
220
+ Weidong Yin, Yanwei Fu, Leonid Sigal, and Xiangyang Xue. Semi-latent gan: Learning to generate and modify facial images from attributes. CoRR, 2017.
221
+
222
+ Zhenyao Zhu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Multi-view perceptron: a deep model for learning face identity and view representations. In NIPS, 2014.
223
+
224
+ # APPENDIX
225
+
226
+ # A NEURAL NETWORK ARCHITECTURES
227
+
228
+ In Table 5, we show the neural network layers we use in our generator for different datasets. Our discriminator and siamese network architectures are the inverted version of our generator. Each fully connected and Conv2D layer is followed by a Leaky ReLU non-linearity, except the last layer.
229
+
230
+ Table 5: The architectures of our generator networks.
231
+
232
+ <table><tr><td>Layer</td><td>CelebA</td><td>2D Shapes</td></tr><tr><td>Latents Fully Connected Reshape Conv2D-Transpose (3 × 3) Conv2D (3 × 3)</td><td>(32) (2048) (128 ×4×4) (128 ×8× 8) (128×8× 8) (128 × 16 × 16) (128 × 16 × 16)</td><td>(10) (512) (32 × 4 × 4) (32 ×8 × 8) (32 ×8 × 8)</td></tr></table>
233
+
234
+ # B CHOOSING SEMANTICS WITH GUIDANCE
235
+
236
+ The Siamese Networks $\phi _ { i }$ are desired to map images into embedding spaces, where they can be grouped within a distinct semantic context. For the example shown in Figure 4, where we disentangle the shape and the color, this might not be directly achievable in a completely unsupervised setting, because the separation in equation 4 is not unique. However, we can still benefit from the disentangling capability of our method via small assumptions and domain knowledge, without collecting labeled data.
237
+
238
+ Consider the toy example, where we extend the MNIST dataset (LeCun & Cortes, 2010) to have a random color, sampled from a uniform RGB color distribution. We define our problem to independently capture the shape of a digit with ${ \bf q } _ { 1 }$ and its color with $\mathbf { q } _ { 2 }$ .
239
+
240
+ In Figure 4(a), we show images created by a generator, which is trained along with two networks, $\phi _ { 1 }$ and $\phi _ { 2 }$ , without any guidance in an unsupervised setting. We can see that the knobs, ${ \bf q } _ { 1 }$ and $\mathbf { q } _ { 2 }$ , capture the variations in the data, however, these variations are coupled with multiple semantic properties. Each knob modifies a complicated combination of shape and color.
241
+
242
+ However, if we design a network architecture in a slightly smarter way, we should be able to separate the shape and the color attributes. This is exemplified in Figure 4(b), where instead of feeding the whole image to $\phi _ { 2 }$ , we feed the average color of some randomly sampled pixels from a generated image. This choice prevents $\phi _ { 2 }$ to capture the spatial structure of the generated digit and to focus only on color. After the training our method with a modified $\phi _ { 2 }$ , the first network captures shape of a digit, and the second one captures the color variations. This can also be observed in Figure 4(c) and 4(d), where we use t-SNE (van der Maaten & Hinton, 2008) to visualize embedding spaces for shape and color, respectively.
243
+
244
+ # C EXPERIMENTS ON ADDITIONAL GUIDANCES
245
+
246
+ In order to show the effect of the guided siamese networks, we perform three experiments on the MS-Celeb dataset (Guo et al., 2016) by using different guiding proxies. In the first experiment, only one of the two networks is guided with an edge detector at the input. Results of this experiment are shown in Table 6. We can see that the first knob, which is connected to edges, captures the overall outline and roughly controls the identity of the generated face. On the other hand, the unguided second knob modifies the image with minimal changes to image edges. This change, in this case, corresponds to the lighting of the face.
247
+
248
+ ![](images/a5fa1934003ed8b4f645a6b63ac18dffbe95d422db8a3cc6a816e19474d7aab2.jpg)
249
+ Figure 4: (a) Samples from the colored version of the MNIST dataset. (b) Images generated after an unsupervised training with two knobs and (c) after a guided training (the knob values are interpolated between two values and then concatenated to generate the final image). (d) The t-SNE representation of the embedding vectors for shape and (e) color.
250
+
251
+ We perform a second experiment with the edge detector, where in this case, the second knob is guided with the average color of the generated image. In Table 6, we can observe the results of our disentangled image manipulation. The first knob with the edge detector again captures the outline of the face, and the second average color knob modifies a combination of the light and the skin color, similar to the results in Figure Table 6.
252
+
253
+ In our third experiment, we employ the cropped guidance networks. The two knobs receive the cropped top and bottom part of the image for training. Although these image crops are not independent, we still get acceptable results that are shown in Table 6. Adjusting the first knob only modifies the upper part of the face; the hair and the eyes. Similarly, the second knob is responsible for determining the chin and mouth shape.
254
+
255
+ ![](images/d1a043ab156b85747d6085bf642ada155283325bfcf4576c02d5e9838b1772c7.jpg)
256
+ Table 6: The results of UD-GAN-G using differently guided siamese networks.
257
+
258
+ # D GUIDING FOR THE 2D SHAPES DATASET
259
+
260
+ In order to guide our siamese networks for the 2D shapes dataset, we estimate the center of mass of the generated image, and the size of the generated object as follows:
261
+
262
+ $$
263
+ \begin{array} { l } { \displaystyle \hat { M } _ { x } = \frac { 1 } { Z } \sum _ { c _ { x } , c _ { y } } c _ { x } \cdot \mathbf { x } [ c _ { x } , c _ { y } ] , \qquad \hat { M } _ { y } = \frac { 1 } { Z } \sum _ { c _ { x } , c _ { y } } c _ { y } \cdot \mathbf { x } [ c _ { x } , c _ { y } ] } \\ { \displaystyle \hat { S } = \frac { 1 } { Z } \sum _ { c _ { x } , c _ { y } } \big ( ( c _ { x } - \hat { M } _ { x } ) ^ { 2 } + ( c _ { y } - \hat { M } _ { y } ) ^ { 2 } \big ) \cdot \mathbf { x } [ c _ { x } , c _ { y } ] } \\ { \displaystyle Z = \sum _ { c _ { x } , c _ { y } } \mathbf { x } [ c _ { x } , c _ { y } ] , } \end{array}
264
+ $$
265
+
266
+ where, $\mathbf { x }$ is a generated image, $\mathbf { x } [ c _ { x } , c _ { y } ]$ is the pixel intensity at image coordinates $[ c _ { x } , c _ { y } ]$ , $( \hat { M } _ { x } , \hat { M } _ { y } )$ are the coordinates of the center of mass of $\mathbf { x }$ , and $\hat { S }$ is the size estimate for the generated object. As the 2D shapes dataset is relatively simple and contain only one object, these guidances are highly correlated with the ground truth attributes as shown in Table 7.
267
+
268
+ Table 7: Correlation between ground truth attributes of the 2D shapes dataset and the calculated proxies.
269
+
270
+ <table><tr><td>Ground Truth Attribute</td><td>M</td><td>My</td><td>S</td></tr><tr><td>Shape</td><td>0.000</td><td>-0.002</td><td>-0.366</td></tr><tr><td>Scale</td><td>-0.000</td><td>-0.000</td><td>0.910</td></tr><tr><td>Orientation</td><td>0.027</td><td>0.000</td><td>-0.001</td></tr><tr><td>X Position</td><td>0.998</td><td>-0.000</td><td>-0.000</td></tr><tr><td>Y Position</td><td>-0.000</td><td>0.998</td><td>0.001</td></tr></table>
271
+
272
+ # E ADDITIONAL SEMANTIC MANIPULATION
273
+
274
+ In Figure 5, we illustrate additional semantic properties that are captured by UD-GAN-G.
275
+
276
+ ![](images/2f11d146cedc28be549b90279d53d0ccd94a09ad35f5e9a7bbb0b8d801864ea7.jpg)
277
+ Figure 5: Semantic properties that are captured by our method.
278
+
279
+ # F CELEBA ATTRIBUTE CLASSIFICATION
280
+
281
+ In Table 8, we compare the classification perfromance of our method to InfoGAN on all attributes in the CelebA dataset.
282
+
283
+ Table 8: CelebA attribute classification accuracy.
284
+
285
+ <table><tr><td>Piriea</td><td>Soppr ooaos</td><td>Aardlracs</td><td>Leeera</td><td>rrggepensrg</td><td>3</td><td>sueg</td><td>srrgg</td><td>Ber</td><td></td><td>Je alr</td><td>JBh ppllt</td><td>PrnlI</td><td>Jrr gmig</td><td>per g gg grss</td><td>Cqppa</td><td></td><td>Doo eretr</td><td>assessrg</td><td></td><td>Ceeer</td><td>heeri</td><td>Paaeee</td><td>regeeeroh</td></tr><tr><td>InfoGAN UD-GAN-G</td><td>90.4 90.4</td><td>75.0</td><td>74.7 73.8 75.5</td><td>80.6 81.3</td><td>97.9 97.9</td><td>90.9 90.2</td><td></td><td>67.5 68.1</td><td>80.4 80.7</td><td>80.9 82.3</td><td>91.5 92.1</td><td>94.9 95.1</td><td>82.1 81.9</td><td></td><td>87.8 88.6</td><td>94.6 94.6</td><td>95.4 95.5</td><td></td><td>94.5 95.4</td><td>95.8 95.5</td><td>97.0 97.0</td><td>82.6 84.2</td><td>78.0 81.2</td></tr><tr><td></td><td></td><td>urligir</td><td>Hrrrtece</td><td>N LIee</td><td>Peeg ce</td><td></td><td>Dree</td><td>rs saee</td><td>PSn nir</td><td>rrenereer</td><td>Boot ses</td><td>seiniiprs</td><td></td><td>Buiiia</td><td>srereet</td><td>WH a</td><td>argaieers</td><td></td><td>Wafaaaa</td><td>wapsdrrseer</td><td>areeec</td><td>waeeggee</td><td>BunoX</td></tr><tr><td>InfoGAN UD-GAN-G</td><td>89.9</td><td>87.476.9 82.2</td><td>96.1 96.1</td><td>85.3 85.2</td><td>88.7 87.7</td><td></td><td>72.0 72.4</td><td>95.9 96.4</td><td>72.9 73.6</td><td>91.5 92.0</td><td>93.2 93.9</td><td>95.6 95.3</td><td></td><td>82.1 86.4</td><td>79.1 79.2</td><td>74.3 75.6</td><td>79.8 80.4</td><td></td><td>97.3 96.7</td><td>86.9 87.3</td><td>86.3 86.3</td><td>93.0 93.0</td><td>80.9 81.1</td></tr></table>
286
+
287
+ # G ATTRIBUTE CORRELATIONS.
288
+
289
+ In Table 9, we compare the correlation between different embedding (or latent) dimensions and the correlation between embedding dimensions and the CelebA attributes. Although DIP-VAE encodes a more un-correlated representation, due to the correlated nature of CelebA attributes, it does not necessarily transfer to a disentangled semantic representation, as illustrated by the quantitative results in Table 1 and 2.
290
+
291
+ ![](images/e08491e471674af1e8d893b13a78b4d647fb3aa65d26b7ba8d9222315c9dc859.jpg)
292
+ Table 9: Correlation between embeddings (or latents) with each other (first row) and with CelebA attributes(second row). Negative correlations are inverted for visibility purposes.
parse/train/H1e0-30qKm/H1e0-30qKm_content_list.json ADDED
@@ -0,0 +1,1541 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "UNLABELED DISENTANGLING OF GANS WITH GUIDED SIAMESE NETWORKS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 823,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 171,
20
+ 398,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 234,
32
+ 544,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Disentangling underlying generative factors of a data distribution is important for interpretability and generalizable representations. In this paper, we introduce two novel disentangling methods. Our first method, Unlabeled Disentangling GAN (UD-GAN, unsupervised), decomposes the latent noise by generating similar/dissimilar image pairs and it learns a distance metric on these pairs with siamese networks and a contrastive loss. This pairwise approach provides consistent representations for similar data points. Our second method (UD-GAN-G, weakly supervised) modifies the UD-GAN with user-defined guidance functions, which restrict the information that goes into the siamese networks. This constraint helps UD-GAN-G to focus on the desired semantic variations in the data. We show that both our methods outperform existing unsupervised approaches in quantitative metrics that measure semantic accuracy of the learned representations. In addition, we illustrate that simple guidance functions we use in UD-GAN-G allow us to directly capture the desired variations in the data. ",
40
+ "bbox": [
41
+ 233,
42
+ 267,
43
+ 764,
44
+ 460
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 488,
55
+ 336,
56
+ 503
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Generative Adversarial Networks (GANs) (Goodfellow et al., 2014) are generative model estimators, where two neural networks (generator and discriminator) are trained in an adversarial setting, so that likelihood-based probabilistic modeling is not necessary. This works particularly well for sampling from a complex probability distribution, such as images. Although GANs yield realistic looking images (Radford et al., 2015), the original formulation in (Goodfellow et al., 2014) only allows for randomly sampling from the data distribution without disentangled structural or semantic control over the generated data points. ",
63
+ "bbox": [
64
+ 174,
65
+ 520,
66
+ 825,
67
+ 617
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "One way to disentangle the generation process is to use conditional GANs (Mirza & Osindero, 2014; Odena et al., 2017). These models modify the generator by conditioning it with supervised labels. Then, they either take the same labels as input in the discriminator (Mirza & Osindero, 2014) and measure the image-label compatibility, or classify the correct label at the output, given the generated image (Odena et al., 2017). Conditional GANs rely on a dataset with labels, which might not always be available or might be time-consuming to collect. ",
74
+ "bbox": [
75
+ 174,
76
+ 625,
77
+ 825,
78
+ 708
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "In this paper, we propose two GAN-based methods that learns disentangled representations without using labeled data. Our first method, Unlabeled Disentangling GAN (UD-GAN), generates image pairs, then embeds them with Siamese Networks (Chopra et al., 2005), and finally learns a distance metric on a disentangled representation space. Whereas our second method, UD-GAN-G, uses guidance functions to restrict the input to our siamese networks, so that they capture desired semantic variations. ",
85
+ "bbox": [
86
+ 174,
87
+ 715,
88
+ 825,
89
+ 799
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "2 RELATED WORK ",
96
+ "text_level": 1,
97
+ "bbox": [
98
+ 176,
99
+ 819,
100
+ 344,
101
+ 835
102
+ ],
103
+ "page_idx": 0
104
+ },
105
+ {
106
+ "type": "text",
107
+ "text": "There have been many studies on learning disentangled representations in generative models, which can be grouped into the level of supervision/labeled data they require. ",
108
+ "bbox": [
109
+ 173,
110
+ 852,
111
+ 823,
112
+ 878
113
+ ],
114
+ "page_idx": 0
115
+ },
116
+ {
117
+ "type": "text",
118
+ "text": "Disentangled representations (supervised). In (Zhu et al., 2014; Yang et al., 2015), the identity and the viewpoint of an object are disentangled via reconstructing the same object from a different viewpoint and minimizing a reconstruction loss. Whereas in (Kingma et al., 2014; Makhzani et al., 2016), the style and category of an object is separated via autoencoders, where an encoder embeds the style of an input image to a latent representation, and a decoder takes the category and style input to reconstruct the input image. In (Tran et al., 2017; Yin et al., 2017), autoencoders and GANs are combined to decompose identity and attribute of an object, where the disentangled representation is obtained at the encoder outputs, and image labels are used at the output of the discriminator. ",
119
+ "bbox": [
120
+ 173,
121
+ 895,
122
+ 821,
123
+ 924
124
+ ],
125
+ "page_idx": 0
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "",
130
+ "bbox": [
131
+ 174,
132
+ 103,
133
+ 825,
134
+ 188
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "Disentangled representations (semi-supervised). In (Reed et al., 2014), they clamp the hidden units for a pair of images with the same identity but with different pose or expression to have the same identity representation. Whereas in (Kulkarni et al., 2015), synthesized images are used to disentangle pose, light, and shape of an object by passing a batch of images where only one attribute varies and the rest of the representation is clamped to be the same. These techniques only require a batch of samples with one attribute different at a time. ",
141
+ "bbox": [
142
+ 174,
143
+ 202,
144
+ 825,
145
+ 286
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "Disentangled representations (unsupervised). InfoGAN (Chen et al., 2016) is an unsupervised technique that discovers categorical and continuous factors by maximizing the mutual information between a GAN’s noise variables and the generated image. $\\beta$ -VAE (Higgins et al., 2017) and DIPVAE (Kumar et al., 2018) are unsupervised autoencoder-based techniques that disentangle different factors in the latent representation of an encoded image. In $\\beta$ -VAE, the KL-divergence between the latent and a prior distribution is weighted with a factor $\\beta > 1$ to encourage disentanglement in the posterior latent distributions. Wheres in DIP-VAE, the covariance matrix of the latent distribution is encouraged to be an identity matrix, thus leading to uncorrelated latent representations. ",
152
+ "bbox": [
153
+ 174,
154
+ 301,
155
+ 825,
156
+ 412
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "For all of the unsupervised methods, after a model is trained, a human needs to investigate which factors map to which semantic property. In addition, as the methods are unsupervised, not all desirable factors might be represented. In contrast, our method builds on existing approaches with two important modifications: (i) We operate on pairs of similar/dissimilar image pairs. (ii) We compute the image embeddings using separate networks, which allows us to guide the disentangling process with information restriction. ",
163
+ "bbox": [
164
+ 174,
165
+ 420,
166
+ 825,
167
+ 503
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "3 UNLABELED DISENTANGLING GAN ",
174
+ "text_level": 1,
175
+ "bbox": [
176
+ 174,
177
+ 522,
178
+ 508,
179
+ 540
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "3.1 BACKGROUND: GENERATIVE ADVERSARIAL NETWORKS ",
186
+ "text_level": 1,
187
+ "bbox": [
188
+ 174,
189
+ 554,
190
+ 609,
191
+ 569
192
+ ],
193
+ "page_idx": 1
194
+ },
195
+ {
196
+ "type": "text",
197
+ "text": "In GANs, the generator, $G ( . )$ , maps a latent variable $\\mathbf { z }$ , which has an easy-to-sample distribution, into a more complex and unknown distribution, such as images. On the other hand, the discriminator $D ( . )$ tries to distinguish real images from the ones that are generated by $G$ . In (Goodfellow et al., 2014), the training is performed as a minimax game as follows: ",
198
+ "bbox": [
199
+ 173,
200
+ 579,
201
+ 825,
202
+ 636
203
+ ],
204
+ "page_idx": 1
205
+ },
206
+ {
207
+ "type": "equation",
208
+ "img_path": "images/4ac40a319baff90619e56dba7eae3e97a29b15f0e179c8cb62cfc2d3181385f0.jpg",
209
+ "text": "$$\n\\operatorname* { m i n } _ { G } \\operatorname* { m a x } _ { D } V ( G , D ) = \\underset { \\mathbf { x } \\sim \\mathbb { P } _ { \\mathrm { R } } } { \\mathbb { E } } [ \\log D ( \\mathbf { x } ) ] + \\underset { \\mathbf { z } \\sim \\mathbb { P } _ { \\mathrm { Z } } } { \\mathbb { E } } [ \\log ( 1 - D ( G ( \\mathbf { z } ) ) ) ] ,\n$$",
210
+ "text_format": "latex",
211
+ "bbox": [
212
+ 279,
213
+ 642,
214
+ 717,
215
+ 665
216
+ ],
217
+ "page_idx": 1
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "where $\\mathbb { P } _ { \\mathrm { R } }$ and $\\mathbb { P } _ { \\mathrm { Z } }$ are the probability distributions of real images and the latent variable $\\mathbf { z }$ , respectively. We train our GAN by using the loss in equation 1. In order to increase stability, we modify the generator loss by maximzing $\\log ( D ( G ( \\mathbf { z } ) ) )$ , instead of minimizing the second term in equation 1. ",
222
+ "bbox": [
223
+ 174,
224
+ 670,
225
+ 825,
226
+ 713
227
+ ],
228
+ "page_idx": 1
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "3.2 A NOVEL GAN ARCHITECTURE: UD-GAN ",
233
+ "text_level": 1,
234
+ "bbox": [
235
+ 178,
236
+ 729,
237
+ 516,
238
+ 744
239
+ ],
240
+ "page_idx": 1
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "In a standard GAN setting, all of the variation in the distribution of real images is captured by the latent variable z. However, a single dimension or a slice of $\\mathbf { z }$ does not necessarily have a semantic meaning. In this paper, our target is to slice the latent variable into multiple vectors, where each vector controls a different semantic variation. ",
245
+ "bbox": [
246
+ 174,
247
+ 756,
248
+ 825,
249
+ 811
250
+ ],
251
+ "page_idx": 1
252
+ },
253
+ {
254
+ "type": "text",
255
+ "text": "Our network architecture is visualized in Figure 1. In our method, the latent vector $\\begin{array} { r l } { \\mathbf { z } } & { { } = } \\end{array}$ $[ \\mathbf { q } _ { 1 } , \\mathbf { q } _ { 2 } , . . . , \\mathbf { q } _ { N _ { A } } ]$ is the concatenation of $N _ { A }$ knobs, $\\{ \\mathbf { q } _ { i } \\} _ { i = 1 } ^ { N _ { A } }$ , which represent different attributes we aim to disentangle. One can add a final variable that captures the variation (and the noise) that is not picked up by the knobs. In our experiments, this additional variable did not have a notable effect. In our notation, $\\mathbf { q } _ { \\bar { i } }$ refers to all of the knobs, except $\\mathbf { q } _ { i }$ . In order to train our model, first, for each $\\mathbf { q } _ { i }$ , we sample two different vectors, $\\mathbf { q } _ { i } ^ { ( 1 ) }$ and ${ \\bf q } _ { i } ^ { ( 2 ) }$ from Unif $( - 1 , 1 )$ . If we would attempt to form a batch by combinatorially concatenating all knob samples, we get a batch size of $2 ^ { N _ { A } }$ , which grows exponentially with the number of attributes. To avoid this computational burden, we train our model through stochastic sampling of one attribute at a time. For example, if the $i ^ { t h }$ attribute is chosen, we generate four images as shown in Figure 1. ",
256
+ "bbox": [
257
+ 174,
258
+ 818,
259
+ 825,
260
+ 924
261
+ ],
262
+ "page_idx": 1
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "",
267
+ "bbox": [
268
+ 176,
269
+ 103,
270
+ 825,
271
+ 146
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "image",
277
+ "img_path": "images/12fcb55a985b94ae43aadc86857d735459deec4b23ea1e191005d67708010c8a.jpg",
278
+ "image_caption": [
279
+ "Figure 1: The flowchart of our architecture. Sampled latents from different attributes are combined into latent vectors. Generated images are grouped with respect to different attributes (here, represented by shape) by Siamese Networks (denoted as $\\phi _ { i }$ ). "
280
+ ],
281
+ "image_footnote": [],
282
+ "bbox": [
283
+ 200,
284
+ 160,
285
+ 795,
286
+ 429
287
+ ],
288
+ "page_idx": 2
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "The image pairs that are generated with the same $\\mathbf { q } _ { i }$ vectors, $\\left\\{ \\mathbf { x } _ { 1 1 } , \\mathbf { x } _ { 1 2 } \\right\\}$ or $\\left\\{ \\mathbf { x } _ { 2 1 } , \\mathbf { x } _ { 2 2 } \\right\\}$ , should have the same $i ^ { t h }$ attribute, regardless of the values of $\\mathbf { q } _ { \\bar { i } }$ . We can ensure this via embedding the generated image pairs into a representation space with Siamese Networks (Chopra et al., 2005), which are denoted as $\\phi _ { i } ( . )$ , and then learning a distance metric on the embedding vectors by employing Contrastive Loss (Hadsell et al., 2006). An optional guidance function is used to restrict the information that goes into a siamese network, thus letting us approximate a desired representation space. The guidance is disabled for our unsupervised UD-GAN approach. Whereas for UD-GAN-G, the guidance is a simple, user-defined function, which is discussed in Section 3.3. ",
293
+ "bbox": [
294
+ 173,
295
+ 501,
296
+ 825,
297
+ 613
298
+ ],
299
+ "page_idx": 2
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "We use a Contrastive Loss function to pull similar image pairs together, and push dissimilar pairs apart as follows: ",
304
+ "bbox": [
305
+ 173,
306
+ 619,
307
+ 825,
308
+ 648
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "equation",
314
+ "img_path": "images/fa3a3e3328673e286ed7e9c480c45aa001d345ae756d882eb2df68c552f14083.jpg",
315
+ "text": "$$\n\\mathcal { L } _ { \\phi _ { i } } = \\frac { 1 } { 2 } \\sum _ { n _ { i } = 1 } ^ { 2 } \\rho _ { i } ( \\mathbf { x } _ { n _ { i } 1 } , \\mathbf { x } _ { n _ { i } 2 } ) ^ { 2 } + \\frac { 1 } { 4 } \\sum _ { n _ { \\bar { i } } = 1 } ^ { 2 } \\sum _ { m _ { \\bar { i } } = 1 } ^ { 2 } \\operatorname* { m a x } ( 0 , \\gamma _ { \\mathrm { i } } ^ { ( 1 , 2 ) } - \\rho _ { i } ( \\mathbf { x } _ { 1 n _ { \\bar { i } } } , \\mathbf { x } _ { 2 m _ { \\bar { i } } } ) ) ^ { 2 } ,\n$$",
316
+ "text_format": "latex",
317
+ "bbox": [
318
+ 236,
319
+ 652,
320
+ 759,
321
+ 698
322
+ ],
323
+ "page_idx": 2
324
+ },
325
+ {
326
+ "type": "text",
327
+ "text": "where, $\\mathcal { L } _ { \\phi _ { i } }$ is the Contrastive Loss for the $i ^ { t h }$ Siamese Network $\\phi _ { i } ( . )$ , the function $\\rho _ { i } ( { \\bf x } _ { n _ { i } 1 } , { \\bf x } _ { n _ { i } 2 } ) =$ $\\big | \\big | \\phi _ { i } ( \\mathbf { x } _ { n _ { i } 1 } ) - \\phi _ { i } ( \\mathbf { x } _ { n _ { i } 2 } ) \\big | \\big | _ { 2 }$ is a shorthand for embedding distance between ${ \\bf x } _ { n _ { i } 1 }$ and ${ \\bf x } _ { n _ { i } 2 }$ , and $\\gamma _ { \\mathrm { i } } ^ { ( 1 , 2 ) }$ is an adaptive margin of the form $\\gamma _ { \\mathrm { i } } ^ { ( 1 , 2 ) } ~ = ~ \\big | \\big | \\mathbf { q } _ { i } ^ { ( 1 ) } - \\mathbf { q } _ { i } ^ { ( 2 ) } \\big | \\big | _ { 2 }$ . Using an adaptive margin makes the distance between two latent samples semantically meaningful and we empirically found that it improves the training stability. ",
328
+ "bbox": [
329
+ 173,
330
+ 703,
331
+ 825,
332
+ 785
333
+ ],
334
+ "page_idx": 2
335
+ },
336
+ {
337
+ "type": "text",
338
+ "text": "The discriminator network $D$ is not modified and is trained to separate real and generated image distributions. Donahue et al. (2018) use a similar latent variable slicing for capturing illumination and pose variations of a face with a fixed identity. Their discriminator needs image pairs, which must be labeled for real images, to judge the quality and identity of the faces. Our method does not require any labels for the real images. Instead, we create similar and dissimilar image pairs via concatenating latent variables and generating image batches. Our final loss function is: ",
339
+ "bbox": [
340
+ 173,
341
+ 791,
342
+ 825,
343
+ 876
344
+ ],
345
+ "page_idx": 2
346
+ },
347
+ {
348
+ "type": "equation",
349
+ "img_path": "images/3faf28c04439616126fa6e8bfff404d25d9035ac416338a8b117afc57f8b9341.jpg",
350
+ "text": "$$\n\\begin{array} { c } { \\mathcal { L } _ { \\phi } = \\lambda _ { \\phi _ { i } } \\mathcal { L } _ { \\phi _ { i } } , \\quad i \\sim \\mathrm { C a t } ( N _ { A } ) } \\\\ { \\displaystyle \\operatorname* { m i n } _ { G } \\operatorname* { m a x } _ { D } V ( G , D ) = \\mathcal { L } _ { G A N } + \\mathcal { L } _ { \\phi } , } \\end{array}\n$$",
351
+ "text_format": "latex",
352
+ "bbox": [
353
+ 343,
354
+ 878,
355
+ 653,
356
+ 922
357
+ ],
358
+ "page_idx": 2
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "where, $\\mathcal { L } _ { W G A N }$ is the GAN loss described in equation 1, $\\lambda _ { \\phi _ { i } }$ is the weight of the embedding loss, and the sampling of the latent variables depends on $i$ and is performed as described above. ",
363
+ "bbox": [
364
+ 171,
365
+ 103,
366
+ 823,
367
+ 132
368
+ ],
369
+ "page_idx": 3
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "3.3 DISENTANGLING WITH GUIDANCE FUNCTIONS: UD-GAN-G ",
374
+ "text_level": 1,
375
+ "bbox": [
376
+ 174,
377
+ 147,
378
+ 638,
379
+ 162
380
+ ],
381
+ "page_idx": 3
382
+ },
383
+ {
384
+ "type": "text",
385
+ "text": "A guidance function reduces the information content that flows into a siamese network and causes the corresponding embedding space to capture only the variations in the restricted input. For example, consider we want to capture the hair-related attributes in the CelebA dataset (Liu et al., 2015), which contains aligned images of human faces. By cropping every region but the top part of a generated image, we are able to guide $\\phi _ { t o p } ( . )$ to learn only the variations in the “Hair Color” as shown in the first row of Figure 2. Note that, the knob $\\mathbf { q } _ { t o p }$ (that corresponds to $\\phi _ { t o p . } ( . ) \\big _ { ; }$ ) changes the hair color not only at the cropped part of the image but as a whole. This is due to the interplay between the adversarial part of our loss (see equation 3), which enforces global realism in images, and the contrastive loss, which administers disentangled representations. As shown in Figure 2, different guidance functions leads to capturing different variations in the CelebA dataset. ",
386
+ "bbox": [
387
+ 173,
388
+ 172,
389
+ 825,
390
+ 315
391
+ ],
392
+ "page_idx": 3
393
+ },
394
+ {
395
+ "type": "image",
396
+ "img_path": "images/72857c19566f79f0bc53ae3106f465d491ef96c259c4cc9f014a772864221607.jpg",
397
+ "image_caption": [
398
+ "Figure 2: (left) Four of our siamese networks are guided with differently cropped images. (right) Varying latent variables that correspond to guided siamese networks captures desired variations. "
399
+ ],
400
+ "image_footnote": [],
401
+ "bbox": [
402
+ 179,
403
+ 329,
404
+ 821,
405
+ 534
406
+ ],
407
+ "page_idx": 3
408
+ },
409
+ {
410
+ "type": "text",
411
+ "text": "3.4 PROBABILISTIC INTERPRETATION ",
412
+ "text_level": 1,
413
+ "bbox": [
414
+ 178,
415
+ 599,
416
+ 447,
417
+ 613
418
+ ],
419
+ "page_idx": 3
420
+ },
421
+ {
422
+ "type": "text",
423
+ "text": "We can gain a probabilistic interpretation of our method on a toy example. Let us assume a problem, where we want to generate images of colored polygons (see Figure 1), where there are two independent factors of variation: shape and color, which we want to capture using two knobs $\\mathbf { q } _ { i }$ and ${ \\bf q } _ { j }$ , respectively. When we set ${ \\bf q } _ { j }$ to a certain value and vary $\\mathbf { q } _ { i }$ , we want to generate polygons with the same color, but different shapes, and vice versa. ",
424
+ "bbox": [
425
+ 174,
426
+ 625,
427
+ 825,
428
+ 695
429
+ ],
430
+ "page_idx": 3
431
+ },
432
+ {
433
+ "type": "text",
434
+ "text": "Let $\\mathbb { P }$ be the probability distribution of colored polygons. For each attribute, $\\mathbb { P }$ can be decomposed into a mixture distribution as follows: ",
435
+ "bbox": [
436
+ 173,
437
+ 702,
438
+ 823,
439
+ 729
440
+ ],
441
+ "page_idx": 3
442
+ },
443
+ {
444
+ "type": "equation",
445
+ "img_path": "images/2804bdb41277fc5791bd3c9f5a5ba0f2d758ede0666edaa451aa349145f4e663.jpg",
446
+ "text": "$$\n\\mathbb { P } = \\sum _ { k = 1 } ^ { N _ { i } } \\pi _ { i } ^ { ( k ) } \\mathbb { Q } _ { i } ^ { ( k ) } \\quad \\gets \\mathrm { ~ f o r ~ a t t r i b u t e ~ } i , \\qquad \\mathbb { P } = \\sum _ { k = 1 } ^ { N _ { j } } \\pi _ { j } ^ { ( k ) } \\mathbb { Q } _ { j } ^ { ( k ) } \\quad \\gets \\mathrm { ~ f o r ~ a t t r i b u t e ~ } j \\gets \\mathbb { P } \\operatorname { m a x } _ { i } ^ { ( k ) } \\mathbb { Q } _ { i } ^ { ( k ) } ,\n$$",
447
+ "text_format": "latex",
448
+ "bbox": [
449
+ 214,
450
+ 729,
451
+ 784,
452
+ 775
453
+ ],
454
+ "page_idx": 3
455
+ },
456
+ {
457
+ "type": "text",
458
+ "text": "where , Q(k) is a mixture component and π(k)i is its corresponding probability of choosing it, and Ni is the number of different values an attribute (in our example, $i$ corresponds to shape) can take. A similar explanation can be made for attribute $j$ , i.e. color. For the sake of this analysis, we accept that for each attribute, $\\mathbb { P }$ can be decomposed into different discrete mixture distributions as shown in Figure 3. For this specific case, $\\mathbb { Q } _ { i } ^ { ( 1 ) }$ and $\\mathbb { Q } _ { i } ^ { ( 2 ) }$ are the distributions of colored squares and colored diamonds, respectively. For the color attribute, which is indexed by $j$ , each $\\mathbb { Q } _ { j } ^ { ( k ) }$ corresponds to a distribution of polygons with a single color (i.e., green polygons). ",
459
+ "bbox": [
460
+ 173,
461
+ 776,
462
+ 826,
463
+ 887
464
+ ],
465
+ "page_idx": 3
466
+ },
467
+ {
468
+ "type": "text",
469
+ "text": "Our contrastive loss in equation 2 has two terms. The first term is minimizing the spread of each mixture component $\\mathbb { Q } _ { i } ^ { ( k ) }$ . This spread is inversely related to disentanglement. If all samples from ",
470
+ "bbox": [
471
+ 174,
472
+ 892,
473
+ 823,
474
+ 924
475
+ ],
476
+ "page_idx": 3
477
+ },
478
+ {
479
+ "type": "image",
480
+ "img_path": "images/dd13128020a66e3c7aa9292146e12ee88fead4ab2cc1dbd1a665b0716172dff7.jpg",
481
+ "image_caption": [
482
+ "Figure 3: Illustration of the embedding spaces and separated probability distributions after training our model. "
483
+ ],
484
+ "image_footnote": [],
485
+ "bbox": [
486
+ 205,
487
+ 111,
488
+ 800,
489
+ 257
490
+ ],
491
+ "page_idx": 4
492
+ },
493
+ {
494
+ "type": "text",
495
+ "text": "Q(k) are mapped to the same embedding vector, the effect of $j$ (and any other attribute) on the representation $\\phi _ { i } ( . )$ disappears and disentangling is achieved. During training, we stochastically go through all embedding spaces and minimize their spread, thus resulting in a disentangled representation in Table 9 in Appendix G. ",
496
+ "bbox": [
497
+ 173,
498
+ 327,
499
+ 825,
500
+ 385
501
+ ],
502
+ "page_idx": 4
503
+ },
504
+ {
505
+ "type": "text",
506
+ "text": "The second term in equation 2 separates all $\\mathbb { Q } _ { i } ^ { ( k ) }$ from each other using an adaptive margin $\\gamma _ { i } ^ { ( 1 , 2 ) }$ . This margin depends on the difference between input latent pairs, so that the resulting embedding space is smooth. In other words, we separate rectangles, circles, and ovals from each other, but circles should be closer to ovals than squares, due to their relative similarity. In the following, we focus on the shape attribute that is represented by $i$ , however, derivations carry over to the color attribute $j$ . ",
507
+ "bbox": [
508
+ 173,
509
+ 391,
510
+ 825,
511
+ 479
512
+ ],
513
+ "page_idx": 4
514
+ },
515
+ {
516
+ "type": "text",
517
+ "text": "In order to separate the probability distributions over image embeddings, one can maximize a divergence between all pairs from Q(k)i . One way to measure the distance between these distributions is to use the unbiased estimator of the energy distance (Szekely & Rizzo, 2004): ´ ",
518
+ "bbox": [
519
+ 174,
520
+ 484,
521
+ 825,
522
+ 531
523
+ ],
524
+ "page_idx": 4
525
+ },
526
+ {
527
+ "type": "equation",
528
+ "img_path": "images/166a45c349d5f330949400a6ecebd68b03c018ef6f9a484af95759f15017fcb1.jpg",
529
+ "text": "$$\nD _ { E } ( \\mathbb { Q } _ { i } ^ { ( 1 ) } , \\mathbb { Q } _ { i } ^ { ( 2 ) } ; \\phi _ { i } , j ) = - \\frac { 1 } { 2 } \\sum _ { n _ { i } = 1 } ^ { 2 } \\rho _ { i } ( \\mathbf { x } _ { n _ { i } 1 } , \\mathbf { x } _ { n _ { i } 2 } ) ^ { 2 } + \\frac { 1 } { 4 } \\sum _ { n _ { j } = 1 } ^ { 2 } \\sum _ { m _ { j } = 1 } ^ { 2 } \\rho _ { i } ( \\mathbf { x } _ { 1 n _ { j } } , \\mathbf { x } _ { 2 m _ { j } } ) ^ { 2 }\n$$",
530
+ "text_format": "latex",
531
+ "bbox": [
532
+ 228,
533
+ 541,
534
+ 769,
535
+ 587
536
+ ],
537
+ "page_idx": 4
538
+ },
539
+ {
540
+ "type": "text",
541
+ "text": "The energy distance in equation 5 can be interpreted as an instance of Maximum Mean Discrepancy (Binkowski et al., 2018) and resembles the Contrastive Loss (Hadsell et al., 2006). We can ´ rewrite equation 5 using the Contrastive Loss in equation 2 as follows: ",
542
+ "bbox": [
543
+ 174,
544
+ 597,
545
+ 823,
546
+ 640
547
+ ],
548
+ "page_idx": 4
549
+ },
550
+ {
551
+ "type": "equation",
552
+ "img_path": "images/9318422d120348ceed0be94fb8d9441e469cab849e3827c9cdeb75ff48bff96b.jpg",
553
+ "text": "$$\nD _ { E } = - \\mathcal { L } _ { \\phi _ { i } } + \\frac { 1 } { 4 } \\sum _ { n _ { j } = 1 } ^ { 2 } \\sum _ { m _ { j } = 1 } ^ { 2 } \\rho _ { i } ( \\mathbf { x } _ { 1 n _ { j } } , \\mathbf { x } _ { 2 m _ { j } } ) ^ { 2 } + \\operatorname* { m a x } ( 0 , \\gamma _ { \\mathrm { i } } ^ { ( 1 , 2 ) } - \\rho _ { i } ( \\mathbf { x } _ { 1 n _ { j } } , \\mathbf { x } _ { 2 m _ { j } } ) ) ^ { 2 }\n$$",
554
+ "text_format": "latex",
555
+ "bbox": [
556
+ 230,
557
+ 650,
558
+ 766,
559
+ 696
560
+ ],
561
+ "page_idx": 4
562
+ },
563
+ {
564
+ "type": "text",
565
+ "text": "Each element in the second sum is quadratic function and has its minimum at $\\rho _ { i } ( { \\bf x } _ { 1 n _ { j } } , { \\bf x } _ { 2 m _ { j } } ) =$ $\\gamma _ { \\mathrm { i } } ^ { ( 1 , 2 ) } / 2$ and the value of the minimum is $\\left( \\gamma _ { \\mathrm { i } } ^ { ( 1 , 2 ) } \\right) ^ { 2 } / 2$ . So, we can rewrite equation 6 as follows: ",
566
+ "bbox": [
567
+ 173,
568
+ 707,
569
+ 828,
570
+ 742
571
+ ],
572
+ "page_idx": 4
573
+ },
574
+ {
575
+ "type": "equation",
576
+ "img_path": "images/8fb120e64c2115f1e9c3167cfc47ec32112db573660bf2b51bf3a2a4360c3186.jpg",
577
+ "text": "$$\nD _ { E } ( \\mathbb { Q } _ { i } ^ { ( 1 ) } , \\mathbb { Q } _ { i } ^ { ( 2 ) } ; \\phi _ { i } , j ) \\ge \\frac { \\big ( \\gamma _ { \\mathrm { i } } ^ { ( 1 , 2 ) } \\big ) ^ { 2 } } { 2 } - \\mathcal { L } _ { \\phi _ { i } } .\n$$",
578
+ "text_format": "latex",
579
+ "bbox": [
580
+ 354,
581
+ 752,
582
+ 643,
583
+ 789
584
+ ],
585
+ "page_idx": 4
586
+ },
587
+ {
588
+ "type": "text",
589
+ "text": "Therefore, as the margin γ(1i $\\gamma _ { \\mathrm { i } } ^ { ( 1 , 2 ) }$ depends only on the input latent variables and is not trainable, minimizing our embedding loss $\\mathcal { L } _ { \\phi _ { i } }$ maximizes the lower bound for the energy distance $D _ { E }$ . This corresponds to learning a Siamese Network $\\phi _ { i } ( . )$ that separates two probability distributions $\\mathbb { Q } _ { i } ^ { ( 1 ) }$ and $\\mathbb { Q } _ { i } ^ { ( 2 ) }$ , i.e., colored squares and colored diamonds, from each other and minimizes the spread of each distribution, thus resulting in disentangling the effect of $j$ from $i$ . The same derivation can be made for the color attribute. After jointly training the Siamese Networks, we can achieve the embedding spaces represented in Figure 3. An example of one such disentangled embedding space is illustrated for MNIST (LeCun & Cortes, 2010) digits in Figure 4 in Appendix B. ",
590
+ "bbox": [
591
+ 173,
592
+ 799,
593
+ 825,
594
+ 924
595
+ ],
596
+ "page_idx": 4
597
+ },
598
+ {
599
+ "type": "text",
600
+ "text": "4 EXPERIMENTS ",
601
+ "text_level": 1,
602
+ "bbox": [
603
+ 176,
604
+ 102,
605
+ 326,
606
+ 118
607
+ ],
608
+ "page_idx": 5
609
+ },
610
+ {
611
+ "type": "text",
612
+ "text": "4.1 SETUP ",
613
+ "text_level": 1,
614
+ "bbox": [
615
+ 174,
616
+ 133,
617
+ 261,
618
+ 148
619
+ ],
620
+ "page_idx": 5
621
+ },
622
+ {
623
+ "type": "text",
624
+ "text": "We perform our experiments on a server with Intel Xeon Gold 6134 CPU, 256GB system memory, and an NVIDIA V100 GPU with 16GB of graphics memory. Our generator and discriminator architectures are outlined in our Appendix A. Each knob is a 1-dimensional slice of the latent variable and is sampled from Uni $\\tilde { \\cdot } ( - 1 , 1 )$ . We use ADAM (Kingma & Ba, 2014) as an optimizer for our training with the following parameters: learning rate $ _ { = 0 . 0 0 0 2 }$ and $\\beta _ { 1 } = 0 . 5$ . We will release our code after the review process. ",
625
+ "bbox": [
626
+ 174,
627
+ 160,
628
+ 825,
629
+ 243
630
+ ],
631
+ "page_idx": 5
632
+ },
633
+ {
634
+ "type": "text",
635
+ "text": "Datasets. We evaluate our method on two image datasets: (i) the CelebA dataset (Liu et al., 2015), which consists of over 200,000 images of aligned faces. We cropped the images to $6 4 \\times 6 4$ pixels in size. (ii) the 2D Shapes (Higgins et al., 2017), which is a dataset that is synthetically created with different properties, such as shape, scale, orientation, and $\\mathbf { X } ^ { } -$ -y locations. Both datasets are divided into training and test sets with a $90 \\% - 1 0 \\%$ ratio. The weight values for the contrastive loss is $\\lambda _ { \\phi } = 1$ for the CelebA dataset and $\\lambda _ { \\phi } = 5$ for the 2D shapes dataset. We use a 32 and 10-dimensional latent variables for the CelebA and the 2D Shapes datasets, respectively. ",
636
+ "bbox": [
637
+ 174,
638
+ 251,
639
+ 825,
640
+ 348
641
+ ],
642
+ "page_idx": 5
643
+ },
644
+ {
645
+ "type": "text",
646
+ "text": "Baselines. We have two versions of our algorithm. UD-GAN refers to the results that are obtained without any guidance at the input of our siamese networks, whereas UD-GAN-G represents a guided training. We compare our method against $\\beta$ -VAE (Higgins et al., 2017), DIP-VAE (Kumar et al., 2018), and InfoGAN (Chen et al., 2016) to compare against both autoencoder and GAN-based approaches. We get the quantitative and visual results for $\\beta$ -VAE and DIP-VAE from (Higgins et al., 2017) and (Kumar et al., 2018), and use our own implementation of InfoGAN for training and testing. The same generator/discriminator architecture is used for InfoGAN and our method. ",
647
+ "bbox": [
648
+ 174,
649
+ 354,
650
+ 825,
651
+ 452
652
+ ],
653
+ "page_idx": 5
654
+ },
655
+ {
656
+ "type": "text",
657
+ "text": "Guidance. For the CelebA dataset, the first 28 of 32 latent knobs are unguided and therefore are processed by the same siamese network that outputs a 28-dimensional embedding vector1. Whereas the remaining four knobs correspond to four siamese networks $( \\phi _ { t o p } , \\phi _ { m i u } , \\phi _ { m i l } , \\phi _ { b o t } )$ that are guided with cropped images in Figure 2. For the 2D shapes dataset, we have 10 knobs, where the first 7 dimensions are unguided. In order to guide the remaining three networks, we estimate the center of mass $( \\hat { M } _ { x } , \\hat { M } _ { y } )$ and the size $\\hat { S }$ of the generated object and feed them to our siamese networks, $\\phi _ { X } ( \\hat { M } _ { x } ) , \\phi _ { Y } ( \\hat { M } _ { y } )$ , and $\\phi _ { S } ( \\hat { S } )$ . More information for this computation can be found in Appendix D. ",
658
+ "bbox": [
659
+ 174,
660
+ 459,
661
+ 825,
662
+ 563
663
+ ],
664
+ "page_idx": 5
665
+ },
666
+ {
667
+ "type": "text",
668
+ "text": "4.2 RESULTS ",
669
+ "text_level": 1,
670
+ "bbox": [
671
+ 174,
672
+ 579,
673
+ 277,
674
+ 594
675
+ ],
676
+ "page_idx": 5
677
+ },
678
+ {
679
+ "type": "text",
680
+ "text": "Disentanglement Metric. This metric was proposed by Higgins et al. (2017) and measures whether learned disentangled representations can capture separate semantic variations in a dataset. In $\\beta$ - VAE and DIP-VAE, this representation is the output of the encoder, i.e., the inferred latent variable. For InfoGAN, we use the representation learned by the discriminator. In our method, we use the concatenated outputs of our siamese networks, which we denote as $\\phi ( . )$ . ",
681
+ "bbox": [
682
+ 174,
683
+ 606,
684
+ 825,
685
+ 676
686
+ ],
687
+ "page_idx": 5
688
+ },
689
+ {
690
+ "type": "text",
691
+ "text": "The disentanglement metric scores for different methods are illustrated in Table 1. Here, we can see that both of our methods outperforms the baseline on the CelebA dataset. All of the baseline approaches relate the latent variables to generated images on per-image basis. Whereas our approach attempts to relate similarities/differences of latent variable pairs to image pairs, which provides a discriminative image embedding, where each dimension is invariant to unwanted factors (Hadsell et al., 2006). ",
692
+ "bbox": [
693
+ 174,
694
+ 683,
695
+ 825,
696
+ 766
697
+ ],
698
+ "page_idx": 5
699
+ },
700
+ {
701
+ "type": "text",
702
+ "text": "For both datasets, our guided network (UD-GAN-G) performs better than our unguided approach, especially on the CelebA dataset. This might be due to the correlations between irrelevant attributes. For example the correlation coefficient between “Wearing Lipstick” and “Wavy Hair” attributes is 0.36, although they are not necessarily dependent. One of our guided networks receive the cropped image around the mouth of a person, which prevents cluttering it with hairstyle. Therefore, this guidance provides better disentanglement and results in an improved score as shown in Table 1. Due to containing simple synthetic images, our disentanglement scores for the 2D shapes dataset are very high. The reason we get 100.0 score on our guided method is because of the guidances we choose, which are highly correlated with the ground truth labels, as shown in Table 7 in Appendix D. ",
703
+ "bbox": [
704
+ 174,
705
+ 772,
706
+ 825,
707
+ 898
708
+ ],
709
+ "page_idx": 5
710
+ },
711
+ {
712
+ "type": "table",
713
+ "img_path": "images/1ae23c22610b45987d42f75c55445b1a59db4cba786b02640f6b55a37c119e4a.jpg",
714
+ "table_caption": [
715
+ "Table 1: Disentanglement metric scores (Higgins et al., 2017), which measure how strongly and independently the dataset attributes are captured by a method. "
716
+ ],
717
+ "table_footnote": [],
718
+ "table_body": "<table><tr><td>Method</td><td>2DS Shapes</td><td>CelebA</td></tr><tr><td>β-VAE</td><td>99.2</td><td>7.1</td></tr><tr><td>InfoGAN</td><td>88.4</td><td>12.3</td></tr><tr><td>DIP-VAE</td><td>98.7</td><td>14.8</td></tr><tr><td>UD-GAN</td><td>99.1</td><td>15.4</td></tr><tr><td>UD-GAN-G</td><td>100.0</td><td>16.5</td></tr></table>",
719
+ "bbox": [
720
+ 364,
721
+ 141,
722
+ 629,
723
+ 228
724
+ ],
725
+ "page_idx": 6
726
+ },
727
+ {
728
+ "type": "text",
729
+ "text": "CelebA Attribute Classification. Kumar et al. (2018) introduced a binary classification metric for the CelebA attributes that project a test image embedding onto average embedding vectors of attributes. In Table 2, we compare our method against baseline approaches on CelebA attribute classification accuracy using the aforementioned projection vector. Similar to the results in Table 1, our guided approach slightly outperforms our unguided method and the other completely unsupervised techniques. This is because some attributes in the CelebA dataset can be spatially isolated via cropping, which leads to a better classification performance. For example, the attributes that are related to hair (Black Hair, Blond Hair, Wavy Hair) and mouth (Mouth Slightly Open, Wearing Lipstick) are captured better by the guided approach, because our top and bottom crops (see Figure 2) are detaching the effects of other variations and are making attributes less correlated. The accuracy on the attribute “Bangs” is worse on the guided approach. This might be due to heuristic cropping we perform that divides the relevant image region into two slits. ",
730
+ "bbox": [
731
+ 173,
732
+ 257,
733
+ 825,
734
+ 424
735
+ ],
736
+ "page_idx": 6
737
+ },
738
+ {
739
+ "type": "table",
740
+ "img_path": "images/3251dfcf3cab7fd738dde8de1cf3748789738e3c88a775831af365eff3b94a02.jpg",
741
+ "table_caption": [
742
+ "Table 2: CelebA attribute classification accuracy. "
743
+ ],
744
+ "table_footnote": [],
745
+ "table_body": "<table><tr><td>AAaaheedperaga</td><td></td><td></td><td></td><td>Bre aerr</td><td>Jre pulr</td><td>Paaeeaes</td><td></td><td>wado cprons nntn</td><td>peeg tr</td><td>JAH KAem</td><td>WhSeer</td><td>Vahsdrsieer</td></tr><tr><td>Prriea β-VAE</td><td>71.6</td><td>Aeeie 72.6</td><td>sueg 90.6</td><td>79.3</td><td>89.1</td><td>79.3</td><td>Wr 83.5</td><td>76.1</td><td>86.9</td><td>67.8</td><td>95.9</td><td>82.4</td></tr><tr><td>DIP-VAE</td><td>73.7</td><td>73.2</td><td>90.9</td><td>80.6</td><td>91.9</td><td>81.5</td><td>85.9</td><td>75.9</td><td>85.3</td><td>71.5</td><td>96.2</td><td>84.7</td></tr><tr><td>InfoGAN</td><td>74.7</td><td>73.8</td><td>90.9</td><td>80.9</td><td>91.5</td><td>82.6</td><td>87.4</td><td>76.9</td><td>88.7</td><td>74.3</td><td>97.3</td><td>86.9</td></tr><tr><td>UD-GAN</td><td>75.0</td><td>74.8</td><td>90.5</td><td>82.1</td><td>91.5</td><td>84.2</td><td>86.2</td><td>79.7</td><td>87.5</td><td>75.1</td><td>96.5</td><td>85.6</td></tr><tr><td>UD-GAN-G</td><td>75.0</td><td>75.5</td><td>90.2</td><td>82.3</td><td>92.1</td><td>84.2</td><td>89.9</td><td>82.2</td><td>87.7</td><td>75.6</td><td>96.7</td><td>87.3</td></tr></table>",
746
+ "bbox": [
747
+ 178,
748
+ 467,
749
+ 818,
750
+ 635
751
+ ],
752
+ "page_idx": 6
753
+ },
754
+ {
755
+ "type": "text",
756
+ "text": "Visual Comparison. In Table 3, we illustrate images generated by different methods on the CelebA dataset. Each of the three rows capture the change in a semantic property: smile, azimuth, and hair color, respectively. Within each image group, a latent dimension is varied (from top to bottom) to visualize the semantic change in that property. Compared to adversarial methods, such as InfoGAN and UD-GAN-G, the DIP-VAE method generates blurrier images, due to the data likelihood term in VAE-based approaches, which is usually implemented as a pixel-wise image reconstruction loss. In GAN-based approaches, this is handled via a learnable discriminator in an adversarial setting. In Table 1 and 2, we quantitatively show the advantage of using our guided approach. Another advantage is to have better control over the captured attributes. For example, in all unsupervised approaches (including UD-GAN), we need to check which latent dimension represents corresponds to which visual attribute. In some cases, a semantic attribute might not be captured due to the correlated nature of a dataset. Whereas, in UD-GAN-G, we directly obtain the variations in smile, azimuth, and hair color through cropping the bottom, middle, and top part of our images, respectively. Thanks to our guidance in Figure 2, we can directly manipulate these three attributes using the knobs $\\mathbf { q } _ { b o t }$ , $\\mathbf { q } _ { m i l }$ , and $\\mathbf { q } _ { t o p }$ as shown in Table 3. ",
757
+ "bbox": [
758
+ 173,
759
+ 652,
760
+ 825,
761
+ 861
762
+ ],
763
+ "page_idx": 6
764
+ },
765
+ {
766
+ "type": "text",
767
+ "text": "The same trend is true for the 2D Shapes dataset results in Table 4. Although the $\\mathrm { X }$ and Y positions and the scale of the synthetic object is captured by both our unsupervised and guided approaches, the guidance we choose directly captures the desired feature on in advance chosen knobs ${ \\bf q } _ { X } , { \\bf q } _ { Y }$ , and $\\mathbf { q } _ { S }$ , respectively. ",
768
+ "bbox": [
769
+ 174,
770
+ 867,
771
+ 823,
772
+ 924
773
+ ],
774
+ "page_idx": 6
775
+ },
776
+ {
777
+ "type": "image",
778
+ "img_path": "images/01d42ff2809765efe5d0ee8e0efe0cabaded6de33c9d2f95b57d2b573d9e7a3e.jpg",
779
+ "image_caption": [
780
+ "Table 4: Generated images for the 2D Shapes dataset by varying a latent dimension, which corresponds to a semantic property (first row: UD-GAN, second row: UD-GAN-G). "
781
+ ],
782
+ "image_footnote": [],
783
+ "bbox": [
784
+ 184,
785
+ 126,
786
+ 812,
787
+ 531
788
+ ],
789
+ "page_idx": 7
790
+ },
791
+ {
792
+ "type": "image",
793
+ "img_path": "images/eb73b64e75325e51c4443195f4d40946f30723b561f0dce9c2d5ab6160e4a59c.jpg",
794
+ "image_caption": [],
795
+ "image_footnote": [],
796
+ "bbox": [
797
+ 176,
798
+ 585,
799
+ 810,
800
+ 840
801
+ ],
802
+ "page_idx": 7
803
+ },
804
+ {
805
+ "type": "text",
806
+ "text": "4.3 DISCUSSION ",
807
+ "text_level": 1,
808
+ "bbox": [
809
+ 174,
810
+ 868,
811
+ 302,
812
+ 882
813
+ ],
814
+ "page_idx": 7
815
+ },
816
+ {
817
+ "type": "text",
818
+ "text": "In completely unsupervised approaches, there is no guarantee to capture all of the desired semantic variations. The main premise behind UD-GAN-G is to find very simple, yet effective ways to capture some of the variation in the data. This weak supervision helps us to obtain proxies to certain semantic properties, so that we get the desired features without training the model multiple times with different hyperparameters or initializations. ",
819
+ "bbox": [
820
+ 174,
821
+ 895,
822
+ 825,
823
+ 924
824
+ ],
825
+ "page_idx": 7
826
+ },
827
+ {
828
+ "type": "text",
829
+ "text": "",
830
+ "bbox": [
831
+ 176,
832
+ 103,
833
+ 823,
834
+ 145
835
+ ],
836
+ "page_idx": 8
837
+ },
838
+ {
839
+ "type": "text",
840
+ "text": "In the aligned the CelebA dataset, each face is roughly centered around the nose. This reduces the variation and simplifies the problem of guidance design, as we show in Figure 2. In more complex scenarios, where the objects can appear in a large variety of scales, translations, and viewpoints, one can use a pre-trained object detection and localization method, such as YOLO (Redmon et al., 2015), as a guidance network. This enables us to use the knowledge obtained from a labeled dataset, such as ImageNet (Russakovsky et al., 2015) to disentangle a new unlabeled dataset. Note that backpropagating the gradients of a deep network into an image might cause adversarial samples (Szegedy et al., 2014). However, the discriminator can alleviate this by rejecting problematic images. ",
841
+ "bbox": [
842
+ 174,
843
+ 152,
844
+ 825,
845
+ 263
846
+ ],
847
+ "page_idx": 8
848
+ },
849
+ {
850
+ "type": "text",
851
+ "text": "In order to backpropagate the gradients from the siamese networks to the generator, the guidance function we use needs to be differentiable. This might pose a limitation to our method; however, differentiable relaxations can instead be used to guide our network. For example, one can employ differentiable relaxation of the superpixel segmentation in (Jampani et al., 2018) to disentangle a low-level image segmentation. ",
852
+ "bbox": [
853
+ 174,
854
+ 271,
855
+ 823,
856
+ 340
857
+ ],
858
+ "page_idx": 8
859
+ },
860
+ {
861
+ "type": "text",
862
+ "text": "Our latent variables are sampled from a uniform distribution. In addition, image similarity is measured by using L2-distance between a pair of image embeddings. We experimented with modeling some latent dimensions as categorical variables. However, we encountered training stability issues, due to computing the softmax loss between two learnable categorical image embeddings, instead of one embedding and one fixed label vector as it is usually done. We plan to tackle that problem in our future work. ",
863
+ "bbox": [
864
+ 174,
865
+ 347,
866
+ 825,
867
+ 431
868
+ ],
869
+ "page_idx": 8
870
+ },
871
+ {
872
+ "type": "text",
873
+ "text": "5 CONCLUSION ",
874
+ "text_level": 1,
875
+ "bbox": [
876
+ 176,
877
+ 453,
878
+ 318,
879
+ 469
880
+ ],
881
+ "page_idx": 8
882
+ },
883
+ {
884
+ "type": "text",
885
+ "text": "In this paper we introduced UD-GAN and UD-GAN-G, novel GAN formulations which employ Siamese networks with contrastive losses in order to make slices of the latent noise space disentangled and more semantically meaningful. Our experiments encompassed guided and unguided approaches for the embedding networks, and illustrated how our methods can be used for semantically meaningful image manipulation. Our qualitative and quantiative results confirm that our method can adjust well to the intrinsic factors of variation of the data and outperform the current state-of-the-art methods on the CelebA and 2D Shapes datasets. In future work, we plan to investigate more powerful forms of embedders, e.g. extracting information from pre-trained networks for semantic segmentation and landmark detection. This allows for even more powerful novel image manipulation techniques. ",
886
+ "bbox": [
887
+ 174,
888
+ 484,
889
+ 825,
890
+ 625
891
+ ],
892
+ "page_idx": 8
893
+ },
894
+ {
895
+ "type": "text",
896
+ "text": "REFERENCES ",
897
+ "text_level": 1,
898
+ "bbox": [
899
+ 174,
900
+ 646,
901
+ 285,
902
+ 661
903
+ ],
904
+ "page_idx": 8
905
+ },
906
+ {
907
+ "type": "text",
908
+ "text": "M. Binkowski, D. J. Sutherland, M. Arbel, and A. Gretton. Demystifying MMD GANs. ´ ICLR, 2018. \nXi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. NIPS, 2016. \nSumit Chopra, Raia Hadsell, and Yann LeCun. Learning a similarity metric discriminatively, with application to face verification. In CVPR, 2005. \nC. Donahue, Z. C. Lipton, A. Balsubramani, and J. McAuley. Semantically Decomposing the Latent Spaces of Generative Adversarial Networks. ICLR, 2018. \nIan Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, 2014. \nYandong Guo, Lei Zhang, Yuxiao Hu, Xiaodong He, and Jianfeng Gao. MS-Celeb-1M: A dataset and benchmark for large scale face recognition. In European Conference on Computer Vision, 2016. ",
909
+ "bbox": [
910
+ 171,
911
+ 669,
912
+ 826,
913
+ 924
914
+ ],
915
+ "page_idx": 8
916
+ },
917
+ {
918
+ "type": "text",
919
+ "text": "R. Hadsell, S. Chopra, and Y. LeCun. Dimensionality reduction by learning an invariant mapping. CVPR, 2006. ",
920
+ "bbox": [
921
+ 171,
922
+ 103,
923
+ 823,
924
+ 133
925
+ ],
926
+ "page_idx": 9
927
+ },
928
+ {
929
+ "type": "text",
930
+ "text": "Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. Beta-vae: Learning basic visual concepts with a constrained variational framework. In ICLR, 2017. ",
931
+ "bbox": [
932
+ 174,
933
+ 140,
934
+ 823,
935
+ 184
936
+ ],
937
+ "page_idx": 9
938
+ },
939
+ {
940
+ "type": "text",
941
+ "text": "Varun Jampani, Deqing Sun, Ming-Yu Liu, Ming-Hsuan Yang, and Jan Kautz. Superpixel sampling networks. ECCV, 2018. ",
942
+ "bbox": [
943
+ 174,
944
+ 190,
945
+ 823,
946
+ 220
947
+ ],
948
+ "page_idx": 9
949
+ },
950
+ {
951
+ "type": "text",
952
+ "text": "Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, 2014. ",
953
+ "bbox": [
954
+ 176,
955
+ 228,
956
+ 802,
957
+ 244
958
+ ],
959
+ "page_idx": 9
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "Diederik P. Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semisupervised learning with deep generative models. In NIPS, 2014. ",
964
+ "bbox": [
965
+ 173,
966
+ 252,
967
+ 821,
968
+ 281
969
+ ],
970
+ "page_idx": 9
971
+ },
972
+ {
973
+ "type": "text",
974
+ "text": "Tejas D. Kulkarni, William F. Whitney, Pushmeet Kohli, and Josh Tenenbaum. Deep convolutional inverse graphics network. In NIPS, 2015. ",
975
+ "bbox": [
976
+ 173,
977
+ 289,
978
+ 823,
979
+ 319
980
+ ],
981
+ "page_idx": 9
982
+ },
983
+ {
984
+ "type": "text",
985
+ "text": "Abhishek Kumar, Prasanna Sattigeri, and Avinash Balakrishnan. Variational inference of disentangled latent concepts from unlabeled observations. In ICLR, 2018. ",
986
+ "bbox": [
987
+ 173,
988
+ 327,
989
+ 821,
990
+ 356
991
+ ],
992
+ "page_idx": 9
993
+ },
994
+ {
995
+ "type": "text",
996
+ "text": "Yann LeCun and Corinna Cortes. MNIST handwritten digit database. 2010. ",
997
+ "bbox": [
998
+ 174,
999
+ 363,
1000
+ 673,
1001
+ 380
1002
+ ],
1003
+ "page_idx": 9
1004
+ },
1005
+ {
1006
+ "type": "text",
1007
+ "text": "Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In ICCV, 2015. ",
1008
+ "bbox": [
1009
+ 173,
1010
+ 387,
1011
+ 825,
1012
+ 416
1013
+ ],
1014
+ "page_idx": 9
1015
+ },
1016
+ {
1017
+ "type": "text",
1018
+ "text": "Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, and Ian Goodfellow. Adversarial autoencoders. In ICLR, 2016. ",
1019
+ "bbox": [
1020
+ 173,
1021
+ 424,
1022
+ 823,
1023
+ 454
1024
+ ],
1025
+ "page_idx": 9
1026
+ },
1027
+ {
1028
+ "type": "text",
1029
+ "text": "Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. CoRR, 2014. ",
1030
+ "bbox": [
1031
+ 171,
1032
+ 462,
1033
+ 758,
1034
+ 478
1035
+ ],
1036
+ "page_idx": 9
1037
+ },
1038
+ {
1039
+ "type": "text",
1040
+ "text": "A. Odena, C. Olah, and J. Shlens. Conditional image synthesis with auxiliary classifier gans. In ICML, 2017. ",
1041
+ "bbox": [
1042
+ 176,
1043
+ 484,
1044
+ 825,
1045
+ 515
1046
+ ],
1047
+ "page_idx": 9
1048
+ },
1049
+ {
1050
+ "type": "text",
1051
+ "text": "Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. CoRR, 2015. ",
1052
+ "bbox": [
1053
+ 174,
1054
+ 522,
1055
+ 825,
1056
+ 551
1057
+ ],
1058
+ "page_idx": 9
1059
+ },
1060
+ {
1061
+ "type": "text",
1062
+ "text": "Joseph Redmon, Santosh Kumar Divvala, Ross B. Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. CoRR, 2015. ",
1063
+ "bbox": [
1064
+ 174,
1065
+ 559,
1066
+ 823,
1067
+ 589
1068
+ ],
1069
+ "page_idx": 9
1070
+ },
1071
+ {
1072
+ "type": "text",
1073
+ "text": "Scott Reed, Kihyuk Sohn, Yuting Zhang, and Honglak Lee. Learning to disentangle factors of variation with manifold interaction. In ICML, 2014. ",
1074
+ "bbox": [
1075
+ 173,
1076
+ 597,
1077
+ 825,
1078
+ 626
1079
+ ],
1080
+ "page_idx": 9
1081
+ },
1082
+ {
1083
+ "type": "text",
1084
+ "text": "Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. IJCV, 2015. ",
1085
+ "bbox": [
1086
+ 176,
1087
+ 633,
1088
+ 823,
1089
+ 678
1090
+ ],
1091
+ "page_idx": 9
1092
+ },
1093
+ {
1094
+ "type": "text",
1095
+ "text": "Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In ICLR, 2014. ",
1096
+ "bbox": [
1097
+ 176,
1098
+ 685,
1099
+ 823,
1100
+ 714
1101
+ ],
1102
+ "page_idx": 9
1103
+ },
1104
+ {
1105
+ "type": "text",
1106
+ "text": "Gabor J. Sz ´ ekely and Maria L. Rizzo. Testing for equal distributions in high dimensions. ´ InterStat, 2004. ",
1107
+ "bbox": [
1108
+ 174,
1109
+ 722,
1110
+ 825,
1111
+ 752
1112
+ ],
1113
+ "page_idx": 9
1114
+ },
1115
+ {
1116
+ "type": "text",
1117
+ "text": "L. Tran, X. Yin, and X. Liu. Disentangled representation learning gan for pose-invariant face recognition. In CVPR, 2017. ",
1118
+ "bbox": [
1119
+ 174,
1120
+ 760,
1121
+ 823,
1122
+ 789
1123
+ ],
1124
+ "page_idx": 9
1125
+ },
1126
+ {
1127
+ "type": "text",
1128
+ "text": "Laurens van der Maaten and Geoffrey Hinton. Journal of Machine Learning Research, 2008. ",
1129
+ "bbox": [
1130
+ 171,
1131
+ 796,
1132
+ 784,
1133
+ 813
1134
+ ],
1135
+ "page_idx": 9
1136
+ },
1137
+ {
1138
+ "type": "text",
1139
+ "text": "Jimei Yang, Scott Reed, Ming-Hsuan Yang, and Honglak Lee. Weakly-supervised disentangling with recurrent transformations for 3d view synthesis. In NIPS, 2015. ",
1140
+ "bbox": [
1141
+ 173,
1142
+ 820,
1143
+ 821,
1144
+ 849
1145
+ ],
1146
+ "page_idx": 9
1147
+ },
1148
+ {
1149
+ "type": "text",
1150
+ "text": "Weidong Yin, Yanwei Fu, Leonid Sigal, and Xiangyang Xue. Semi-latent gan: Learning to generate and modify facial images from attributes. CoRR, 2017. ",
1151
+ "bbox": [
1152
+ 174,
1153
+ 858,
1154
+ 823,
1155
+ 887
1156
+ ],
1157
+ "page_idx": 9
1158
+ },
1159
+ {
1160
+ "type": "text",
1161
+ "text": "Zhenyao Zhu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Multi-view perceptron: a deep model for learning face identity and view representations. In NIPS, 2014. ",
1162
+ "bbox": [
1163
+ 174,
1164
+ 895,
1165
+ 821,
1166
+ 924
1167
+ ],
1168
+ "page_idx": 9
1169
+ },
1170
+ {
1171
+ "type": "text",
1172
+ "text": "APPENDIX ",
1173
+ "text_level": 1,
1174
+ "bbox": [
1175
+ 176,
1176
+ 103,
1177
+ 263,
1178
+ 117
1179
+ ],
1180
+ "page_idx": 10
1181
+ },
1182
+ {
1183
+ "type": "text",
1184
+ "text": "A NEURAL NETWORK ARCHITECTURES ",
1185
+ "text_level": 1,
1186
+ "bbox": [
1187
+ 176,
1188
+ 136,
1189
+ 522,
1190
+ 152
1191
+ ],
1192
+ "page_idx": 10
1193
+ },
1194
+ {
1195
+ "type": "text",
1196
+ "text": "In Table 5, we show the neural network layers we use in our generator for different datasets. Our discriminator and siamese network architectures are the inverted version of our generator. Each fully connected and Conv2D layer is followed by a Leaky ReLU non-linearity, except the last layer. ",
1197
+ "bbox": [
1198
+ 174,
1199
+ 167,
1200
+ 825,
1201
+ 210
1202
+ ],
1203
+ "page_idx": 10
1204
+ },
1205
+ {
1206
+ "type": "table",
1207
+ "img_path": "images/26fcadf3ea213c6e9acc4656d7f2ce595f69a3f75007f635372bd70aa2bcd41d.jpg",
1208
+ "table_caption": [
1209
+ "Table 5: The architectures of our generator networks. "
1210
+ ],
1211
+ "table_footnote": [],
1212
+ "table_body": "<table><tr><td>Layer</td><td>CelebA</td><td>2D Shapes</td></tr><tr><td>Latents Fully Connected Reshape Conv2D-Transpose (3 × 3) Conv2D (3 × 3)</td><td>(32) (2048) (128 ×4×4) (128 ×8× 8) (128×8× 8) (128 × 16 × 16) (128 × 16 × 16)</td><td>(10) (512) (32 × 4 × 4) (32 ×8 × 8) (32 ×8 × 8)</td></tr></table>",
1213
+ "bbox": [
1214
+ 272,
1215
+ 250,
1216
+ 722,
1217
+ 434
1218
+ ],
1219
+ "page_idx": 10
1220
+ },
1221
+ {
1222
+ "type": "text",
1223
+ "text": "B CHOOSING SEMANTICS WITH GUIDANCE ",
1224
+ "text_level": 1,
1225
+ "bbox": [
1226
+ 174,
1227
+ 469,
1228
+ 550,
1229
+ 486
1230
+ ],
1231
+ "page_idx": 10
1232
+ },
1233
+ {
1234
+ "type": "text",
1235
+ "text": "The Siamese Networks $\\phi _ { i }$ are desired to map images into embedding spaces, where they can be grouped within a distinct semantic context. For the example shown in Figure 4, where we disentangle the shape and the color, this might not be directly achievable in a completely unsupervised setting, because the separation in equation 4 is not unique. However, we can still benefit from the disentangling capability of our method via small assumptions and domain knowledge, without collecting labeled data. ",
1236
+ "bbox": [
1237
+ 174,
1238
+ 501,
1239
+ 825,
1240
+ 585
1241
+ ],
1242
+ "page_idx": 10
1243
+ },
1244
+ {
1245
+ "type": "text",
1246
+ "text": "Consider the toy example, where we extend the MNIST dataset (LeCun & Cortes, 2010) to have a random color, sampled from a uniform RGB color distribution. We define our problem to independently capture the shape of a digit with ${ \\bf q } _ { 1 }$ and its color with $\\mathbf { q } _ { 2 }$ . ",
1247
+ "bbox": [
1248
+ 176,
1249
+ 592,
1250
+ 821,
1251
+ 635
1252
+ ],
1253
+ "page_idx": 10
1254
+ },
1255
+ {
1256
+ "type": "text",
1257
+ "text": "In Figure 4(a), we show images created by a generator, which is trained along with two networks, $\\phi _ { 1 }$ and $\\phi _ { 2 }$ , without any guidance in an unsupervised setting. We can see that the knobs, ${ \\bf q } _ { 1 }$ and $\\mathbf { q } _ { 2 }$ , capture the variations in the data, however, these variations are coupled with multiple semantic properties. Each knob modifies a complicated combination of shape and color. ",
1258
+ "bbox": [
1259
+ 174,
1260
+ 641,
1261
+ 825,
1262
+ 696
1263
+ ],
1264
+ "page_idx": 10
1265
+ },
1266
+ {
1267
+ "type": "text",
1268
+ "text": "However, if we design a network architecture in a slightly smarter way, we should be able to separate the shape and the color attributes. This is exemplified in Figure 4(b), where instead of feeding the whole image to $\\phi _ { 2 }$ , we feed the average color of some randomly sampled pixels from a generated image. This choice prevents $\\phi _ { 2 }$ to capture the spatial structure of the generated digit and to focus only on color. After the training our method with a modified $\\phi _ { 2 }$ , the first network captures shape of a digit, and the second one captures the color variations. This can also be observed in Figure 4(c) and 4(d), where we use t-SNE (van der Maaten & Hinton, 2008) to visualize embedding spaces for shape and color, respectively. ",
1269
+ "bbox": [
1270
+ 173,
1271
+ 703,
1272
+ 825,
1273
+ 815
1274
+ ],
1275
+ "page_idx": 10
1276
+ },
1277
+ {
1278
+ "type": "text",
1279
+ "text": "C EXPERIMENTS ON ADDITIONAL GUIDANCES ",
1280
+ "text_level": 1,
1281
+ "bbox": [
1282
+ 174,
1283
+ 835,
1284
+ 580,
1285
+ 852
1286
+ ],
1287
+ "page_idx": 10
1288
+ },
1289
+ {
1290
+ "type": "text",
1291
+ "text": "In order to show the effect of the guided siamese networks, we perform three experiments on the MS-Celeb dataset (Guo et al., 2016) by using different guiding proxies. In the first experiment, only one of the two networks is guided with an edge detector at the input. Results of this experiment are shown in Table 6. We can see that the first knob, which is connected to edges, captures the overall outline and roughly controls the identity of the generated face. On the other hand, the unguided second knob modifies the image with minimal changes to image edges. This change, in this case, corresponds to the lighting of the face. ",
1292
+ "bbox": [
1293
+ 174,
1294
+ 867,
1295
+ 823,
1296
+ 922
1297
+ ],
1298
+ "page_idx": 10
1299
+ },
1300
+ {
1301
+ "type": "image",
1302
+ "img_path": "images/a5fa1934003ed8b4f645a6b63ac18dffbe95d422db8a3cc6a816e19474d7aab2.jpg",
1303
+ "image_caption": [
1304
+ "Figure 4: (a) Samples from the colored version of the MNIST dataset. (b) Images generated after an unsupervised training with two knobs and (c) after a guided training (the knob values are interpolated between two values and then concatenated to generate the final image). (d) The t-SNE representation of the embedding vectors for shape and (e) color. "
1305
+ ],
1306
+ "image_footnote": [],
1307
+ "bbox": [
1308
+ 192,
1309
+ 116,
1310
+ 810,
1311
+ 260
1312
+ ],
1313
+ "page_idx": 11
1314
+ },
1315
+ {
1316
+ "type": "text",
1317
+ "text": "",
1318
+ "bbox": [
1319
+ 174,
1320
+ 406,
1321
+ 825,
1322
+ 449
1323
+ ],
1324
+ "page_idx": 11
1325
+ },
1326
+ {
1327
+ "type": "text",
1328
+ "text": "We perform a second experiment with the edge detector, where in this case, the second knob is guided with the average color of the generated image. In Table 6, we can observe the results of our disentangled image manipulation. The first knob with the edge detector again captures the outline of the face, and the second average color knob modifies a combination of the light and the skin color, similar to the results in Figure Table 6. ",
1329
+ "bbox": [
1330
+ 174,
1331
+ 457,
1332
+ 825,
1333
+ 526
1334
+ ],
1335
+ "page_idx": 11
1336
+ },
1337
+ {
1338
+ "type": "text",
1339
+ "text": "In our third experiment, we employ the cropped guidance networks. The two knobs receive the cropped top and bottom part of the image for training. Although these image crops are not independent, we still get acceptable results that are shown in Table 6. Adjusting the first knob only modifies the upper part of the face; the hair and the eyes. Similarly, the second knob is responsible for determining the chin and mouth shape. ",
1340
+ "bbox": [
1341
+ 174,
1342
+ 534,
1343
+ 825,
1344
+ 603
1345
+ ],
1346
+ "page_idx": 11
1347
+ },
1348
+ {
1349
+ "type": "image",
1350
+ "img_path": "images/d1a043ab156b85747d6085bf642ada155283325bfcf4576c02d5e9838b1772c7.jpg",
1351
+ "image_caption": [
1352
+ "Table 6: The results of UD-GAN-G using differently guided siamese networks. "
1353
+ ],
1354
+ "image_footnote": [],
1355
+ "bbox": [
1356
+ 178,
1357
+ 694,
1358
+ 810,
1359
+ 853
1360
+ ],
1361
+ "page_idx": 11
1362
+ },
1363
+ {
1364
+ "type": "text",
1365
+ "text": "D GUIDING FOR THE 2D SHAPES DATASET ",
1366
+ "text_level": 1,
1367
+ "bbox": [
1368
+ 173,
1369
+ 101,
1370
+ 547,
1371
+ 118
1372
+ ],
1373
+ "page_idx": 12
1374
+ },
1375
+ {
1376
+ "type": "text",
1377
+ "text": "In order to guide our siamese networks for the 2D shapes dataset, we estimate the center of mass of the generated image, and the size of the generated object as follows: ",
1378
+ "bbox": [
1379
+ 173,
1380
+ 132,
1381
+ 825,
1382
+ 162
1383
+ ],
1384
+ "page_idx": 12
1385
+ },
1386
+ {
1387
+ "type": "equation",
1388
+ "img_path": "images/23624e189fa09cf5841e77f2b8c4850224beab9e7ff59ef08b402cc7e973a776.jpg",
1389
+ "text": "$$\n\\begin{array} { l } { \\displaystyle \\hat { M } _ { x } = \\frac { 1 } { Z } \\sum _ { c _ { x } , c _ { y } } c _ { x } \\cdot \\mathbf { x } [ c _ { x } , c _ { y } ] , \\qquad \\hat { M } _ { y } = \\frac { 1 } { Z } \\sum _ { c _ { x } , c _ { y } } c _ { y } \\cdot \\mathbf { x } [ c _ { x } , c _ { y } ] } \\\\ { \\displaystyle \\hat { S } = \\frac { 1 } { Z } \\sum _ { c _ { x } , c _ { y } } \\big ( ( c _ { x } - \\hat { M } _ { x } ) ^ { 2 } + ( c _ { y } - \\hat { M } _ { y } ) ^ { 2 } \\big ) \\cdot \\mathbf { x } [ c _ { x } , c _ { y } ] } \\\\ { \\displaystyle Z = \\sum _ { c _ { x } , c _ { y } } \\mathbf { x } [ c _ { x } , c _ { y } ] , } \\end{array}\n$$",
1390
+ "text_format": "latex",
1391
+ "bbox": [
1392
+ 287,
1393
+ 167,
1394
+ 710,
1395
+ 285
1396
+ ],
1397
+ "page_idx": 12
1398
+ },
1399
+ {
1400
+ "type": "text",
1401
+ "text": "where, $\\mathbf { x }$ is a generated image, $\\mathbf { x } [ c _ { x } , c _ { y } ]$ is the pixel intensity at image coordinates $[ c _ { x } , c _ { y } ]$ , $( \\hat { M } _ { x } , \\hat { M } _ { y } )$ are the coordinates of the center of mass of $\\mathbf { x }$ , and $\\hat { S }$ is the size estimate for the generated object. As the 2D shapes dataset is relatively simple and contain only one object, these guidances are highly correlated with the ground truth attributes as shown in Table 7. ",
1402
+ "bbox": [
1403
+ 173,
1404
+ 292,
1405
+ 825,
1406
+ 353
1407
+ ],
1408
+ "page_idx": 12
1409
+ },
1410
+ {
1411
+ "type": "table",
1412
+ "img_path": "images/1b5cba6a8953bfcf245b0e700898fd1992c93ba33e110d59661c2d62f33d2be7.jpg",
1413
+ "table_caption": [
1414
+ "Table 7: Correlation between ground truth attributes of the 2D shapes dataset and the calculated proxies. "
1415
+ ],
1416
+ "table_footnote": [],
1417
+ "table_body": "<table><tr><td>Ground Truth Attribute</td><td>M</td><td>My</td><td>S</td></tr><tr><td>Shape</td><td>0.000</td><td>-0.002</td><td>-0.366</td></tr><tr><td>Scale</td><td>-0.000</td><td>-0.000</td><td>0.910</td></tr><tr><td>Orientation</td><td>0.027</td><td>0.000</td><td>-0.001</td></tr><tr><td>X Position</td><td>0.998</td><td>-0.000</td><td>-0.000</td></tr><tr><td>Y Position</td><td>-0.000</td><td>0.998</td><td>0.001</td></tr></table>",
1418
+ "bbox": [
1419
+ 315,
1420
+ 405,
1421
+ 678,
1422
+ 494
1423
+ ],
1424
+ "page_idx": 12
1425
+ },
1426
+ {
1427
+ "type": "text",
1428
+ "text": "E ADDITIONAL SEMANTIC MANIPULATION ",
1429
+ "text_level": 1,
1430
+ "bbox": [
1431
+ 173,
1432
+ 522,
1433
+ 550,
1434
+ 539
1435
+ ],
1436
+ "page_idx": 12
1437
+ },
1438
+ {
1439
+ "type": "text",
1440
+ "text": "In Figure 5, we illustrate additional semantic properties that are captured by UD-GAN-G. ",
1441
+ "bbox": [
1442
+ 173,
1443
+ 553,
1444
+ 761,
1445
+ 569
1446
+ ],
1447
+ "page_idx": 12
1448
+ },
1449
+ {
1450
+ "type": "image",
1451
+ "img_path": "images/2f11d146cedc28be549b90279d53d0ccd94a09ad35f5e9a7bbb0b8d801864ea7.jpg",
1452
+ "image_caption": [
1453
+ "Figure 5: Semantic properties that are captured by our method. "
1454
+ ],
1455
+ "image_footnote": [],
1456
+ "bbox": [
1457
+ 218,
1458
+ 594,
1459
+ 777,
1460
+ 881
1461
+ ],
1462
+ "page_idx": 12
1463
+ },
1464
+ {
1465
+ "type": "text",
1466
+ "text": "F CELEBA ATTRIBUTE CLASSIFICATION ",
1467
+ "text_level": 1,
1468
+ "bbox": [
1469
+ 174,
1470
+ 102,
1471
+ 526,
1472
+ 118
1473
+ ],
1474
+ "page_idx": 13
1475
+ },
1476
+ {
1477
+ "type": "text",
1478
+ "text": "In Table 8, we compare the classification perfromance of our method to InfoGAN on all attributes in the CelebA dataset. ",
1479
+ "bbox": [
1480
+ 171,
1481
+ 133,
1482
+ 823,
1483
+ 161
1484
+ ],
1485
+ "page_idx": 13
1486
+ },
1487
+ {
1488
+ "type": "table",
1489
+ "img_path": "images/48438573e48156a2224e54430222c4642fa197773019f8f06c80f3484a03fbad.jpg",
1490
+ "table_caption": [
1491
+ "Table 8: CelebA attribute classification accuracy. "
1492
+ ],
1493
+ "table_footnote": [],
1494
+ "table_body": "<table><tr><td>Piriea</td><td>Soppr ooaos</td><td>Aardlracs</td><td>Leeera</td><td>rrggepensrg</td><td>3</td><td>sueg</td><td>srrgg</td><td>Ber</td><td></td><td>Je alr</td><td>JBh ppllt</td><td>PrnlI</td><td>Jrr gmig</td><td>per g gg grss</td><td>Cqppa</td><td></td><td>Doo eretr</td><td>assessrg</td><td></td><td>Ceeer</td><td>heeri</td><td>Paaeee</td><td>regeeeroh</td></tr><tr><td>InfoGAN UD-GAN-G</td><td>90.4 90.4</td><td>75.0</td><td>74.7 73.8 75.5</td><td>80.6 81.3</td><td>97.9 97.9</td><td>90.9 90.2</td><td></td><td>67.5 68.1</td><td>80.4 80.7</td><td>80.9 82.3</td><td>91.5 92.1</td><td>94.9 95.1</td><td>82.1 81.9</td><td></td><td>87.8 88.6</td><td>94.6 94.6</td><td>95.4 95.5</td><td></td><td>94.5 95.4</td><td>95.8 95.5</td><td>97.0 97.0</td><td>82.6 84.2</td><td>78.0 81.2</td></tr><tr><td></td><td></td><td>urligir</td><td>Hrrrtece</td><td>N LIee</td><td>Peeg ce</td><td></td><td>Dree</td><td>rs saee</td><td>PSn nir</td><td>rrenereer</td><td>Boot ses</td><td>seiniiprs</td><td></td><td>Buiiia</td><td>srereet</td><td>WH a</td><td>argaieers</td><td></td><td>Wafaaaa</td><td>wapsdrrseer</td><td>areeec</td><td>waeeggee</td><td>BunoX</td></tr><tr><td>InfoGAN UD-GAN-G</td><td>89.9</td><td>87.476.9 82.2</td><td>96.1 96.1</td><td>85.3 85.2</td><td>88.7 87.7</td><td></td><td>72.0 72.4</td><td>95.9 96.4</td><td>72.9 73.6</td><td>91.5 92.0</td><td>93.2 93.9</td><td>95.6 95.3</td><td></td><td>82.1 86.4</td><td>79.1 79.2</td><td>74.3 75.6</td><td>79.8 80.4</td><td></td><td>97.3 96.7</td><td>86.9 87.3</td><td>86.3 86.3</td><td>93.0 93.0</td><td>80.9 81.1</td></tr></table>",
1495
+ "bbox": [
1496
+ 181,
1497
+ 199,
1498
+ 815,
1499
+ 364
1500
+ ],
1501
+ "page_idx": 13
1502
+ },
1503
+ {
1504
+ "type": "text",
1505
+ "text": "G ATTRIBUTE CORRELATIONS. ",
1506
+ "text_level": 1,
1507
+ "bbox": [
1508
+ 176,
1509
+ 401,
1510
+ 447,
1511
+ 417
1512
+ ],
1513
+ "page_idx": 13
1514
+ },
1515
+ {
1516
+ "type": "text",
1517
+ "text": "In Table 9, we compare the correlation between different embedding (or latent) dimensions and the correlation between embedding dimensions and the CelebA attributes. Although DIP-VAE encodes a more un-correlated representation, due to the correlated nature of CelebA attributes, it does not necessarily transfer to a disentangled semantic representation, as illustrated by the quantitative results in Table 1 and 2. ",
1518
+ "bbox": [
1519
+ 173,
1520
+ 433,
1521
+ 825,
1522
+ 503
1523
+ ],
1524
+ "page_idx": 13
1525
+ },
1526
+ {
1527
+ "type": "image",
1528
+ "img_path": "images/e08491e471674af1e8d893b13a78b4d647fb3aa65d26b7ba8d9222315c9dc859.jpg",
1529
+ "image_caption": [
1530
+ "Table 9: Correlation between embeddings (or latents) with each other (first row) and with CelebA attributes(second row). Negative correlations are inverted for visibility purposes. "
1531
+ ],
1532
+ "image_footnote": [],
1533
+ "bbox": [
1534
+ 197,
1535
+ 553,
1536
+ 789,
1537
+ 772
1538
+ ],
1539
+ "page_idx": 13
1540
+ }
1541
+ ]
parse/train/H1e0-30qKm/H1e0-30qKm_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1e0-30qKm/H1e0-30qKm_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HkzyX3CcFQ/HkzyX3CcFQ.md ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CONTEXTUAL RECURRENT CONVOLUTIONAL MODEL FOR ROBUST VISUAL LEARNING
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Feedforward convolutional neural network has achieved a great success in many computer vision tasks. While it validly imitates the hierarchical structure of biological visual system, it still lacks one essential architectural feature: contextual recurrent connections with feedback, which widely exists in biological visual system. In this work, we designed a Contextual Recurrent Convolutional Network with this feature embedded in a standard CNN structure. We found that such feedback connections could enable lower layers to “rethink” about their representations given the top-down contextual information. We carefully studied the components of this network, and showed its robustness and superiority over feedforward baselines in such tasks as noise image classification, partially occluded object recognition and fine-grained image classification. We believed this work could be an important step to help bridge the gap between computer vision models and real biological visual system.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ It has been long established that the primate’s ventral visual system has a hierarchical structure (Felleman & Van Essen, 1991) including early (V1, V2), intermediate (V4), and higher (IT) visual areas. Modern deep convolutional neural networks (CNNs) for image recognition (Krizhevsky et al., 2012; Simonyan & Zisserman, 2014) trained on large image data sets like ImageNet (Russakovsky et al., 2015) imitate this hierarchical structure with multiple layers. There is a hierarchical correspondence between internal feature representations of a deep CNN’s different layers and neural representations of different visual areas (Cichy et al., 2016; Yamins & DiCarlo, 2016); lower visual areas (V1, V2) are best explained by a deep CNN’s internal representations from lower layers (Cadena et al., 2017; Khaligh-Razavi & Kriegeskorte, 2014) and higher areas (IT, V4) are best explained by its higher layers (Khaligh-Razavi & Kriegeskorte, 2014; Yamins et al., 2014). Deep CNNs explain neuron responses in ventral visual system better than any other model class (Yamins & DiCarlo, 2016; Kriegeskorte, 2015), and this success indicates that deep CNNs share some similarities with the ventral visual system, in terms of architecture and internal feature representations (Yamins & DiCarlo, 2016).
12
+
13
+ However, there is one key structural component that is missing in the standard feedforward deep CNNs: contextual feedback recurrent connections between neurons in different areas (Felleman & Van Essen, 1991). These connections greatly contribute to the complexity of the visual system, and may be essential for the success of the visual systems in reality; for example, there are evidences that recurrent connections are crucial for object recognition under noise, clutter, and occlusion (O’Reilly et al., 2013; Spoerer et al., 2017; Rajaei et al., 2018).
14
+
15
+ In this paper, we explored a variety of model with different recurrent architectures, contextual modules, and information flows to understand the computational advantages of feedback circuits. We are interested in understanding what and how top-down and bottom-up contextual information can be combined to improve in performance in visual tasks. We investigated VGG16 (Simonyan & Zisserman, 2014), a standard CNN that coarsely approximate the ventral visual hierarchical stream, and its recurrent variants for comparison. To introduce feedback recurrent connections, we divided VGG16’s layers into stages and selectively added feedback connections from the groups’ highest layers to their lowest layers. At the end of each feedback connection, there is a contextual module (Section 3.2) that refines the bottom-up input with gated contextual information. We tested and compared several networks with such contextual modules against VGG16 in several standard image classification task, as well as visual tasks in which refinement under feedback guidance is more likely to produce some beneficial effects, such as object recognition under degraded conditions (noise, clutter and occlusion) and fine-grained recognition. We found that our network could outperform all the baseline feedforward networks and surpassed them by a large margin in finegrained and occlusion tasks. We also studied the internal feature representations of our network to illustrate the effectiveness of the structure. While much future work has to be done, our work can still be an important step to bridge the gap between biological visual systems and state-of-the-art computer vision models.
16
+
17
+ ![](images/ae70cc4f9bf6f412ce0d69740ecef4031811076f7601476b71360a3cecfef767.jpg)
18
+ Figure 1: The schematic of a Contextual Recurrent Convolutional Network (CRCN). Check Section 3.1 for details.
19
+
20
+ # 2 RELATED WORK
21
+
22
+ Although recurrent network modules including LSTM (Hochreiter & Schmidhuber, 1997) and Gated Recurrent Unit (Cho et al., 2014) have been widely used in temporal prediction (Wang et al., 2017c) and processing of sequential data (e.g. video classification (Donahue et al., 2015)), few studies have been done to augment feedforward CNNs with recurrent connections in image-based computer vision tasks.
23
+
24
+ Image classification. Standard deep CNNs for image classification suffer from occlusion and noise (Wang et al., 2017a;b; Zhang et al., 2017), since heavy occlusion and noise severely corrupt feature representations at lower layers and therefore cause degradation of higher semantic layers. With the inclusion of feedback connections, a model can “rethink” or refine its feature representations at lower layers using feedback information from higher layers (Li et al., 2018); after multiple rounds of feedback and refinement, input signals from distracting objects (noise, irrelevant objects, etc.) will be suppressed in the final feature representation (Cao et al., 2015). Li et al. (2018) used the output posterior possibilities of a CNN to refine its intermediate feature maps; however, their method requires posterior possibilities for refinement and thus cannot be applied in scenarios where supervision is absent. Jetley et al. (2018) used more global and semantic features at higher convolutional layers to sharpen more local feature maps at lower layers for image classification on CIFAR datasets; however, our own experimentation suggests that this method only works when the higher and lower layers have a relatively small semantic gap (similarly sized receptive fields); on highresolution dataset like ImageNet, large semantic gaps between higher and lower layers make this method difficult to work.
25
+
26
+ ![](images/c818429efbdf29d1c84f329e718e4c6789a006e89bfdced8503dbcfff561faf0.jpg)
27
+ Figure 2: The details of a VGG-style context-gating recurrent model.
28
+
29
+ Other computer vision tasks. Linsley et al. (2018) designed a model with explicit horizontal recurrent connections to solve contour detection problems, and Spoerer et al. (2017) evaluated the performance of various models with recurrent connections on digit recognition tasks under clutter. The tasks evaluated in these studies are rather simple and contrived, and it remains to be seen whether their models and conclusions can apply to real world computer vision problems. (Li et al., 2018) uses posterior possibilities at the last fully connected layer to select intermediate feature map representations; however, the posterior possibility vector is not informative enough and the input of the feedback connection is totally fixed, which makes it less flexible to fully mimic the recurrent connections in the visual system. Overall, feedback and recurrent connections are present in multiple layers of the visual hierarchy, and this study constrains feedback connections to the output classification layer only. It is worth noting that a recent study (Nayebi et al., 2018) is motivated by recurrent connections in the brain as well; however, their work focuses on exploring the computational benefits of local recurrent connections while ours focuses on feedback recurrent ones. Thus, we believe that our work is complementary to theirs.
30
+
31
+ # 3 METHODS
32
+
33
+ In this section, we will describe the overall architecture of our proposed model and discuss some design details.
34
+
35
+ # 3.1 OVERALL MODEL ARCHITECTURE
36
+
37
+ The main structure of our Contextual Recurrent Convolutional Network (CRCN) is shown in Figure 1. A CRCN model is a standard feedforward convolutional network augmented with feedback connections attached to some layers. At the end of each feedback connection, a contextual module fuses top-down and bottom-up information (dashed red lines in Figure 1) to provide refined and sharpened input to the augmented layer.
38
+
39
+ Given an input image, the model generates intermediate feature representations and output responses in multiple time steps. At the first time step $t = 0$ in Figure 1), the model passes the input through the feedforward route (black arrows in Figure 1) as in a standard CNN. At later time steps ${ \bf \chi } _ { t } > 0$ in Figure 1), each contextual module fuses output representations of lower and higher layers at the previous step (dashed red lines in Figure 1) to generate the refined input at the current time step (red lines in Figure 1). Mathematically, we have
40
+
41
+ $$
42
+ O _ { k } ^ { ( t ) } = \left\{ \begin{array} { l l } { f _ { k } ( O _ { k - 1 } ^ { ( t ) } ) } & { \mathrm { i f ~ } t = 0 \mathrm { o r } k \not \in S _ { G } } \\ { c _ { k } ( O _ { k - 1 } ^ { ( t - 1 ) } , O _ { h ( k ) } ^ { ( t - 1 ) } ) } & { \mathrm { i f ~ } t > 0 \mathrm { a n d } k \in S _ { G } } \end{array} , \right.
43
+ $$
44
+
45
+ where $S _ { G }$ is the index set of layers augmented with feedback connections and contextual modules, $c _ { k } ( \cdot , \cdot )$ (detailed in Eqs. (2)) is the contextual module for layer $k$ , $O _ { k } ^ { ( t ) }$ denotes the output of layer $k$ at time $t$ , $h ( \cdot )$ is a function that maps the index of an augmented layer to that of its higher feedback
46
+
47
+ ![](images/108da1c42b6e53c65483574604265f6835682348f541309f96ae51c7a14303e6.jpg)
48
+ Figure 3: The schematic of our proposed contextual module. Layer $k$ denotes the bottom-up layer and layer $h ( k )$ denotes the top-down layer aligned with the size of $\mathbf { k }$ layer. The left black arrow shows the feed-forward pipeline.
49
+
50
+ <table><tr><td>Model</td><td>CIFAR-10</td><td>CIFAR-100</td></tr><tr><td>VGG-small VGG-ATT VGG-LR-2 VGG-CRCN-1 VGG-CRCN-2</td><td>91.20 91.77 91.49 92.37</td><td>67.06 69.48 68.99 70.82</td></tr></table>
51
+
52
+ Table 1: Top-1 image classification accuracy on CIFAR datasets. VGG-small means VGG model with only one FC layer. VGG-ATT means the model proposed in (Jetley et al., 2018), VGGLR-2 means the ”rethinking” one-FC-layer VGG model with 2 unrolling times proposed in (Li et al., 2018). CRCN- $n$ means our 2-recurrentconnection model with $n$ unrolling times.
53
+
54
+ layer, and $f _ { k } ( \cdot )$ denotes the (feedforward) operation to compute the output of layer $k$ given some input.
55
+
56
+ # 3.2 CONTEXTUAL MODULE DESIGN
57
+
58
+ The key part of the Contextual Recurrent Convolutional Network model is the contextual module at the end of each feedback connection. Figure 3 shows one possible design of the contextual module, which is inspired by traditional RNN modules including LSTM (Hochreiter & Schmidhuber, 1997) and Gated Recurrent Unit (Cho et al., 2014). In this scheme, a gate map is generated by the concatenation of the bottom-up and the (upsampled) top-down feature map passing through a $3 \times 3$ convolution (black circle with “C” and black arrows with circle). Then a tanh function is applied to the map to generate a gate map. The gate map then controls the amount of contextual information that can go through by a point-wise multiplication (red lines). To make the information flow more stable, we add it with bottom-up feature map (black circle with $" + "$ ). The equations are presented in Eqs. (2). Then we use this new feature representation to replace the old one and continue feedforward calculation as described in Section 3.1.
59
+
60
+ $$
61
+ \begin{array} { l } { O _ { k } ^ { ( t ) } = g a t e * \mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) + O _ { k } ^ { ( t - 1 ) } } \\ { g a t e = \mathrm { T a n h } ( \mathrm { C o n v } _ { 3 \times 3 } ( \mathrm { C o n c a t } ( \mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) , O _ { k - 1 } ^ { ( t - 1 ) } ) ) ) } \end{array}
62
+ $$
63
+
64
+ # 3.3 LOCATION OF RECURRENT CONNECTIONS
65
+
66
+ Since there exists a gap between the semantic meanings of feature representations of bottom-up and top-down layers, we argue that recurrent connection across too many layers can do harm to the performance. Therefore, we derive three sets of connections, conv3 2 to conv2 2, conv4 2 to conv3 3, and $\mathsf { c o n v } 5 _ { - 2 }$ to $\mathtt { C O n v 4 \_ 3 }$ respectively. It is worth noting that all these connections go across pooling layers, for pooling layers can greatly enlarge the receptive field of neurons and enrich the contextual information of top-down information flow. For information flow in networks with multiple recurrent connections, take the network structure in Figure 2 as an example. The part between conv2 2 and $\mathsf { c o n v } 5 _ { - 2 }$ will be unrolled for a certain number of times. To make the experiments setting consistent, we used model with two recurrent connections $( \log 1 + \log 2 )$ in all the tasks.
67
+
68
+ # 4 EXPERIMENTS AND ANALYSIS
69
+
70
+ We first tested the Contextual Recurrent Convolutional model on standard image classification task including CIFAR-10, CIFAR-100, ImageNet and fine-grained image classification dataset CUB-200.
71
+
72
+ ![](images/a8a67c4dae333977bc1db2e243aeb8cd6f3bad6d705c60c1fd081fb1e04e80af.jpg)
73
+ Figure 4: The example images and results of noise image classification experiment. Upper four images show an example of images with different levels of Gaussian noise added. From left to right, the standard deviations are 0, 10, 30, 50, respectively. Lower right figure shows the increased percentage of our unroll-2-times model on top-1 noise image accuracy compared with feedforward model. Lower left figure shows the adversarial attack result. The fooling rate is measured by the absolute accuracy drop when adversarial attack is performed on the model. We use standard FGSM attack on all ImageNet validation images. The blue line shows the fooling rate of our unroll-2-times model, red line shows the feed-forward model and the orange line shows the model proposed by (Li et al., 2018). As the attack gets stronger, our model shows more robustness.
74
+
75
+ <table><tr><td>Model</td><td>Occlusion</td></tr><tr><td>VGG-small VGG-ATT (Jetley et al., 2018) VGG-LR-2 (Li et al., 2018) VGG-CRCN-2</td><td>34.50 46.57 45.88</td></tr></table>
76
+
77
+ Table 2: Top-1 accuracy on CUB-200 datasets.
78
+
79
+ <table><tr><td>Model</td><td>CUB-200</td></tr><tr><td>VGG-small</td><td>64.88</td></tr><tr><td>VGG-ATT (Jetley et al., 2018)</td><td>73.19</td></tr><tr><td>VGG-LR-2 (Li et al., 2018)</td><td>72.99</td></tr><tr><td>VGG-CRCN-2</td><td>74.90</td></tr></table>
80
+
81
+ Table 3: Top-1 accuracy on Occlusion datasets.
82
+
83
+ To display the robustness of our model, we showed its performance on noise image classification, adversarial attack and occluded images. We found that our model achieved considerate performance gain compared with the standard feedforward model on all these tasks. Notice that our proposed models are based on VGG16 with 2 recurrent connection(loop1+loop2 in Figure 2) in all the tasks.
84
+
85
+ # 4.1 STANDARD IMAGE CLASSIFICATION
86
+
87
+ CIFAR-10: Because CIFAR-10 and CIFAR-100 datasets only contain tiny images, the receptive fields of neurons in layers beyond conv3 2 already cover an image entirely. Although the real power of contextual modulation is hindered by this limitation, our model can still beat the baseline VGG16 network by a large margin (Second column in Table 1). Our model also compared favorably to two other recent models with recurrent connections. Again, our models showed better results.
88
+
89
+ CIFAR-100: Based on the assumption that contextual modulation can help layers capture more detailed information, we also tested our model on CIFAR-100 dataset, which is a 100-category version of CIFAR-10. Our model got a larger improvement compared with feedforward and other models (The third column in Table.1).
90
+
91
+ Table 4: Noise image classification top-1 accuracy on different module structures. VGG16: standard feedforward model. module 1: top-down gating contextual. module 2: contextual gating contextual. module 3: contextual gating top-down and top-down gating contextual combined. Proposed: contextual gating top-down.
92
+
93
+ <table><tr><td rowspan=1 colspan=1>ModelsNoise Level</td><td rowspan=1 colspan=1>VGG16</td><td rowspan=1 colspan=1>Module 1</td><td rowspan=1 colspan=1>Module 2</td><td rowspan=1 colspan=1>Module 3</td><td rowspan=1 colspan=1>Proposed</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>71.076</td><td rowspan=1 colspan=1>71.608</td><td rowspan=1 colspan=1>71.540</td><td rowspan=1 colspan=1>71.500</td><td rowspan=2 colspan=1>71.63266.760</td></tr><tr><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>65.456</td><td rowspan=1 colspan=1>66.400</td><td rowspan=1 colspan=1>66.578</td><td rowspan=1 colspan=1>66.580</td></tr><tr><td rowspan=1 colspan=1>20</td><td rowspan=1 colspan=1>54.090</td><td rowspan=1 colspan=1>56.630</td><td rowspan=1 colspan=1>55.944</td><td rowspan=2 colspan=1>56.04041.520</td><td rowspan=2 colspan=1>56.29442.104</td></tr><tr><td rowspan=1 colspan=1>30</td><td rowspan=1 colspan=1>39.124</td><td rowspan=1 colspan=1>41.090</td><td rowspan=1 colspan=1>41.800</td></tr><tr><td rowspan=1 colspan=1>40</td><td rowspan=1 colspan=1>24.068</td><td rowspan=1 colspan=1>26.980</td><td rowspan=1 colspan=1>27.634</td><td rowspan=2 colspan=1>26.91015.460</td><td rowspan=2 colspan=1>27.76616.310</td></tr><tr><td rowspan=1 colspan=1>50</td><td rowspan=1 colspan=1>13.072</td><td rowspan=1 colspan=1>15.890</td><td rowspan=1 colspan=1>16.458</td></tr></table>
94
+
95
+ Table 5: Noise image classification top-1 accuracy on different loop locations. Loop1 corresponds to the first feedback connection in Figure 2. The same for Loop2, 3, $1 + 2$ , $^ { 2 + 3 }$ and $1 + 2 + 3$ .
96
+
97
+ <table><tr><td></td><td>Locations</td><td rowspan="2">Loop 1</td><td rowspan="2">Loop 2</td><td rowspan="2">Loop 3</td><td rowspan="2">Loop 1+2</td><td rowspan="2">Loop 2+3</td><td rowspan="2">Loop 1+2+3</td></tr><tr><td>Noise Level</td><td></td></tr><tr><td colspan="2">0</td><td>71.581</td><td>71.672</td><td>71.580</td><td>71.632</td><td>71.646</td><td>71.745</td></tr><tr><td colspan="2">10</td><td>66.151</td><td>66.075</td><td>65.952</td><td>66.760</td><td>66.646</td><td>67.620</td></tr><tr><td colspan="2">20</td><td>55.301</td><td>55.240</td><td>54.692</td><td>56.294</td><td>56.000</td><td>56.988</td></tr><tr><td colspan="2">30</td><td>40.271</td><td>40.150</td><td>39.773</td><td>42.104</td><td>41.621</td><td>42.686</td></tr><tr><td colspan="2">40</td><td>25.600</td><td>25.490</td><td>24.910</td><td>27.766</td><td>27.110</td><td>28.120</td></tr><tr><td colspan="2">50</td><td>14.045</td><td>13.932</td><td>12.418</td><td>16.310</td><td>16.014</td><td>17.102</td></tr></table>
98
+
99
+ # 4.2 NOISE IMAGE CLASSIFICATION AND ADVERSARIAL ATTACK
100
+
101
+ ImageNet: ImageNet (Krizhevsky et al., 2012) is the commonly used large-scale image classification dataset. It contains over 1 million images with 1000 categories. In this task, to test the robustness of our model, we added different levels of Gaussian noise on the $2 2 4 \mathrm { p x } \times 2 2 4 \mathrm { p x }$ images in the validation set and calculated the performance drop. In detail, we used the two recurrent connection model for this task $( \log 1 { + } \log 2$ in Figure 2). Notice that all models are not trained on noise images. The result of top1 error without any noise is shown in Table 7. We found that the performance gap between our model and feedforward VGG model got larger as the noise level increased. Results are shown in Figure 4. Also, we showed the noise ImageNet top-1 accuracy of our model, (Li et al., 2018)’s model and feed-forward model in Table 8.
102
+
103
+ Additionally, we also tested adversarial attacks on our model. Figure 4 shows the results with different $\mathrm { L } _ { \infty }$ norm coefficient. We also found that our model had much lower fooling rates than feedforward model and (Li et al., 2018)’s model with the increasing of the norms, which successfully proved our model’s robustness.
104
+
105
+ # 4.3 FINE-GRAINED IMAGE CLASSIFICATION
106
+
107
+ We argued that the contextual module can help the network to preserve more fine-grained details in feature representations, and thus we tested our model on CUB-200 fine-grained bird classification dataset (Wah et al., 2011). We used the same model as ImageNet classification task which indicates that our model contains two recurrent connection(loop1+loop2 in Figure 2). As a result, our model can outperform much better than the feed-forward VGG model(Zagoruyko & Komodakis, 2016) and other similar models with the same experimental settings. The result is shown in 2.
108
+
109
+ # 4.4 OCCLUDED IMAGE TASK
110
+
111
+ To further prove the robust ability of our model, we tested our model on VehicleOcclusion dataset (Wang et al., 2017b), which contains 4549 training images and 4507 testing images covering six types of vehicles, i.e., airplane, bicycle, bus, car, motorbike and train. For each test image in dataset, some randomly-positioned occluders (irrelevant to the target object) are placed onto the target object, and make sure that the occlusion ratio of the target object is constrained. One example is shown in Figure 6. In this task, we used multi-recurrent model which is similar with the model mentioned in Imagenet task. Here, we found that our model can achieve a huge improvement, which is shown in 3.
112
+
113
+ # 4.5 DISCUSSION AND ANALYSIS
114
+
115
+ ![](images/a8284c5476404fddf0f65095157e0dd6b6e973e8c60be71465f296a34b0b00f2.jpg)
116
+ Figure 5: The results of t-SNE visualization. Upper four sub-figures shows the result of VGG16. (a) shows the result of conv4 layer without noise. (b) shows conv4 layer with noise level 30. (c) shows FC layer without noise. (d) shows FC layer with noise level 30.Lower four sub-figures shows the corresponding results of VGG-CRCN-2 model.
117
+
118
+ # 4.5.1 LOCATION OF RECURRENT CONNECTIONS
119
+
120
+ We implemented all the possible combinations of recurrent connections listed in Figure 2. We denote connection from conv3 2 to conv2 2, conv4 2 to conv3 3, and conv5 2 to $\mathsf { C O n v 4 } _ { - 3 }$ as Loop 1, Loop 2 and Loop 3, respectively. The same naming scheme goes for Loop $1 + 2$ and Loop $1 + 2 + 3$ , etc. We tested altogether 6 different models on the noise classification experiment, the settings of which were completely the same. In Table 5, by comparing the corresponding columns where one more recurrent connection is added, we can find that having more loops yields better classification accuracy and robustness, consistent with the reciprocal loops between successive layers in the hierarchical visual cortex. Especially, we can also find that the importance of Loop 1 is slightly better than Loop 2 and Loop 3, indicating the early layers may benefit more from the additional contextual information as an aid.
121
+
122
+ # 4.5.2 CONTEXTUAL MODULE STRUCTURE
123
+
124
+ In additional to the original contextual module in Figure 3, we implemented three other structures that we thought were all reasonable, so as to further study the effect and importance of top-down information and contextual modulation. Briefly, we refer Module 1 to the scheme that top-down feature map gating contextual map, Module 2 to contextual map gating contextual map itself, Module 3 to the scheme that top-down feature map gating contextual map, as well as contextual map gating top-down feature map, and afterwards the two gating results are added together. The final output of all three modules are the gating output added by bottom-up feature map. By “contextual map”, we mean the concatenation of top-down and bottom-up feature map undergone a $3 \times 3$ convolution layer. By “gating”, we mean the gated map element-wisely multiplied with the Sigmoid responses of the gate map. For formulas and further details of the three module structures, we guide readers to read the supplementary materials.
125
+
126
+ Table 6: Noise image classification top-1 accuracy on different unrolling times of our proposed model. VGG16 means Feed-forward VGG16 model and Unroll x indicates Unroll x times during the test process.
127
+
128
+ <table><tr><td rowspan=1 colspan=4>ModelsNoise Level</td><td rowspan=1 colspan=1>VGG16</td><td rowspan=1 colspan=1>Unroll 0</td><td rowspan=1 colspan=1>Unroll 1</td><td rowspan=1 colspan=1>Unroll 2</td><td rowspan=1 colspan=1>Unroll 3</td><td></td><td rowspan=1 colspan=1>Unroll 4</td></tr><tr><td rowspan=1 colspan=4>0</td><td rowspan=1 colspan=1>71.076</td><td rowspan=1 colspan=1>71.018</td><td rowspan=1 colspan=1>71.032</td><td rowspan=1 colspan=1>71.221</td><td rowspan=2 colspan=1>71.21666.481</td><td></td><td rowspan=2 colspan=1>71.61266.757</td></tr><tr><td rowspan=1 colspan=4>10</td><td rowspan=1 colspan=1>65.456</td><td rowspan=1 colspan=1>66.271</td><td rowspan=1 colspan=1>66.368</td><td rowspan=1 colspan=1>66.484</td><td></td><td rowspan=1 colspan=1>66.757</td></tr><tr><td rowspan=2 colspan=4>2030</td><td rowspan=1 colspan=1>54.090</td><td rowspan=1 colspan=1>55.810</td><td rowspan=1 colspan=1>55.880</td><td rowspan=1 colspan=1>55.938</td><td rowspan=1 colspan=1>55.894</td><td rowspan=2 colspan=2>56.29142.054</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>39.124</td><td rowspan=2 colspan=1>41.44227.588</td><td rowspan=2 colspan=1>41.49228.010</td><td rowspan=1 colspan=1>41.516</td><td rowspan=2 colspan=1>41.55128.031</td><td rowspan=2 colspan=1>42.05428.102</td></tr><tr><td rowspan=1 colspan=2>40</td><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>24.068</td><td rowspan=1 colspan=1>28.044</td><td></td><td rowspan=2 colspan=1>28.10216.271</td></tr><tr><td rowspan=1 colspan=4>50</td><td rowspan=1 colspan=1>13.072</td><td rowspan=1 colspan=1>15.860</td><td rowspan=1 colspan=1>15.941</td><td rowspan=1 colspan=1>15.954</td><td rowspan=1 colspan=1>15.982</td><td></td></tr></table>
129
+
130
+ We did the same noise image classification experiments on these different contextual modules to give a comparison. We use the Loop $1 + 2$ model as the remaining fixed part. The performance of these modules are listed in Figure 4. The differences among these contextual modules lie in how the gate map is generated and what information is to be gated. The best model is obtained by generating the gate map from contextual map and then use it to gate top-down information. By comparing it with Module 1, we find that using only top-down information to generate the map and control total data flow is not adequate, possibly because top-down information is too abstract and coarse. By comparing the best module with Module 2, we find that only top-down information is necessary to be gated. A direct addition of bottom-up map with the output of the gate is adequate to keep all the details in lower level feature maps.
131
+
132
+ # 4.5.3 FEATURE ANALYSIS
133
+
134
+ We drew t-SNE visualization of feature representations of both final fully connected layers and layers with recurrent connections attached (e.g. conv2 2, conv3 3, conv4 3). We selected 5 out of 1000 categories from ImageNet validation set. To effectively capture the changes of feature representations of intermediate convolutional layers, we used ImageNet bounding box annotations and did an average pooling of all the feature responses corresponding to the object bounding box. By comparing the representations of both networks, we can find that the Contextual Recurrent Network is able to form a more distinct clustering than VGG16 network. Notice that we also tested the presentation when a high noise (standard deviation equal to 30) is added to the images. We can find a consistent improvement over VGG16 network in both intermediate representations and representations directly linked to the final classification task. The results are shown in Figure 5.
135
+
136
+ # 4.5.4 UNROLLING PROCESS
137
+
138
+ There is another finding that the contextual module dynamics in recurrent connections not only helps to refine the low-level feature representation during inference, it can also refine the feedforward weights, resulting in better performance in computer vision tasks even in the first iteration, acting as a regularizer. The results are shown in Table 6.
139
+
140
+ # 5 CONCLUSION
141
+
142
+ In this paper, we proposed a novel Contextual Recurrent Convolutional Network. Based on the recurrent connections between layers in the hierarchy of a feedforward deep convolutional neural network, the new network can show some robust properties in some computer vision tasks compared with its feedforward baseline. Moreover, the network shares many common properties with biological visual system. We hope this work will not only shed light on the effectiveness of recurrent connections in robust learning and general computer vision tasks, but also give people some inspirations to bridge the gap between computer vision models and real biological visual system.
143
+
144
+ # REFERENCES
145
+
146
+ Santiago A Cadena, George H Denfield, Edgar Y Walker, Leon A Gatys, Andreas S Tolias, Matthias Bethge, and Alexander S Ecker. Deep convolutional models improve predictions of macaque v1 responses to natural images. bioRxiv, 2017. doi: 10.1101/201764. URL https://www. biorxiv.org/content/early/2017/10/11/201764.
147
+
148
+ Chunshui Cao, Xianming Liu, Yi Yang, Yinan Yu, Jiang Wang, Zilei Wang, Yongzhen Huang, Liang Wang, Chang Huang, Wei Xu, Deva Ramanan, and Thomas S. Huang. Look and think twice: Capturing top-down visual attention with feedback convolutional neural networks. In 2015 IEEE International Conference on Computer Vision, ICCV 2015, Santiago, Chile, December 7- 13, 2015, pp. 2956–2964. IEEE Computer Society, 2015. doi: 10.1109/ICCV.2015.338. URL https://doi.org/10.1109/ICCV.2015.338.
149
+
150
+ Kyunghyun Cho, Bart van Merrienboer, C¸ aglar Gulc¸ehre, Fethi Bougares, Holger Schwenk, and ¨ Yoshua Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. CoRR, abs/1406.1078, 2014. URL http://arxiv.org/abs/1406. 1078.
151
+
152
+ Radoslaw Martin Cichy, Aditya Khosla, Dimitrios Pantazis, Antonio Torralba, and Aude Oliva. Comparison of deep neural networks to spatio-temporal cortical dynamics of human visual object recognition reveals hierarchical correspondence. Scientific Reports, 6:27755 EP –, 06 2016. URL http://dx.doi.org/10.1038/srep27755.
153
+
154
+ Jeff Donahue, Lisa Anne Hendricks, Sergio Guadarrama, Marcus Rohrbach, Subhashini Venugopalan, Kate Saenko, and Trevor Darrell. Long-term recurrent convolutional networks for visual recognition and description. In CVPR, 2015.
155
+
156
+ Daniel J. Felleman and David C. Van Essen. Distributed hierarchical processing in the primate cerebral cortex. Cerebral Cortex, 1(1):1–47, 1991. doi: 10.1093/cercor/1.1.1-a. URL http: //dx.doi.org/10.1093/cercor/1.1.1-a.
157
+
158
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9(8): 1735–1780, 1997. doi: 10.1162/neco.1997.9.8.1735. URL https://doi.org/10.1162/ neco.1997.9.8.1735.
159
+
160
+ Saumya Jetley, Nicholas A. Lord, Namhoon Lee, and Philip H. S. Torr. Learn to pay attention. CoRR, abs/1804.02391, 2018. URL http://arxiv.org/abs/1804.02391.
161
+
162
+ Seyed-Mahdi Khaligh-Razavi and Nikolaus Kriegeskorte. Deep supervised, but not unsupervised, models may explain it cortical representation. PLOS Computational Biology, 10(11):1–29, 11 2014. doi: 10.1371/journal.pcbi.1003915. URL https://doi.org/10.1371/journal. pcbi.1003915.
163
+
164
+ Nikolaus Kriegeskorte. Deep Neural Networks: A New Framework for Modeling Biological Vision and Brain Information Processing. Annual Review of Vision Science, 1(1):417–446, November 2015. doi: 10.1146/annurev-vision-082114-035447. URL http://www.annualreviews. org/doi/10.1146/annurev-vision-082114-035447.
165
+
166
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In Peter L. Bartlett, Fernando C. N. Pereira, Christopher J. C. Burges, Leon Bottou, and Kilian Q. Weinberger (eds.), ´ Advances in Neural Information Processing Systems 25: 26th Annual Conference on Neural Information Processing Systems 2012. Proceedings of a meeting held December 3-6, 2012, Lake Tahoe, Nevada, United States., pp. 1106–1114, 2012.
167
+
168
+ Xin Li, Zequn Jie, Jiashi Feng, Changsong Liu, and Shuicheng Yan. Learning with rethinking: Recurrently improving convolutional neural networks through feedback. Pattern Recognition, 79:183–194, 2018.
169
+
170
+ Drew Linsley, Junkyung Kim, Vijay Veerabadran, and Thomas Serre. Learning long-range spatial dependencies with horizontal gated-recurrent units. CoRR, abs/1805.08315, 2018. URL http: //arxiv.org/abs/1805.08315.
171
+
172
+ Aran Nayebi, Daniel Bear, Jonas Kubilius, Kohitij Kar, Surya Ganguli, David Sussillo, James J. DiCarlo, and Daniel L. K. Yamins. Task-driven convolutional recurrent models of the visual system. CoRR, abs/1807.00053, 2018. URL http://arxiv.org/abs/1807.00053.
173
+
174
+ Randall O’Reilly, Dean Wyatte, Seth Herd, Brian Mingus, and David Jilk. Recurrent processing during object recognition. Frontiers in Psychology, 4:124, 2013. ISSN 1664-1078. doi: 10. 3389/fpsyg.2013.00124. URL https://www.frontiersin.org/article/10.3389/ fpsyg.2013.00124.
175
+
176
+ Karim Rajaei, Yalda Mohsenzadeh, Reza Ebrahimpour, and Seyed-Mahdi Khaligh-Razavi. Beyond core object recognition: Recurrent processes account for object recognition under occlusion. bioRxiv, 2018. doi: 10.1101/302034. URL https://www.biorxiv.org/content/ early/2018/04/17/302034.
177
+
178
+ Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. doi: 10.1007/s11263-015-0816-y.
179
+
180
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. URL http://arxiv.org/abs/1409.1556.
181
+
182
+ Courtney J. Spoerer, Patrick McClure, and Nikolaus Kriegeskorte. Recurrent convolutional neural networks: A better model of biological object recognition. Frontiers in Psychology, 8:1551, 2017. ISSN 1664-1078. doi: 10.3389/fpsyg.2017.01551. URL https://www.frontiersin. org/article/10.3389/fpsyg.2017.01551.
183
+
184
+ C. Wah, S. Branson, P. Welinder, P. Perona, and S. Belongie. The Caltech-UCSD Birds-200-2011 Dataset. Technical report, 2011.
185
+
186
+ Hao Wang, Xingyu Lin, Yimeng Zhang, and Tai Sing Lee. Learning robust object recognition using composed scenes from generative models. CoRR, abs/1705.07594, 2017a. URL http: //arxiv.org/abs/1705.07594.
187
+
188
+ Jianyu Wang, Cihang Xie, Zhishuai Zhang, Jun Zhu, Lingxi Xie, and Alan L. Yuille. Detecting semantic parts on partially occluded objects. CoRR, abs/1707.07819, 2017b. URL http:// arxiv.org/abs/1707.07819.
189
+
190
+ Yunbo Wang, Mingsheng Long, Jianmin Wang, Zhifeng Gao, and Philip S Yu. Predrnn: Recurrent neural networks for predictive learning using spatiotemporal lstms. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), Advances in Neural Information Processing Systems 30, pp. 879–888. Curran Associates, Inc., 2017c.
191
+
192
+ D L K Yamins, H Hong, C F Cadieu, E A Solomon, D Seibert, and J J DiCarlo. Performanceoptimized hierarchical models predict neural responses in higher visual cortex. Proceedings of the National Academy of Sciences, 111(23):8619–8624, June 2014. doi: 10.1073/pnas.1403112111. URL http://www.pnas.org/cgi/doi/10.1073/pnas.1403112111.
193
+
194
+ Daniel L K Yamins and James J DiCarlo. Using goal-driven deep learning models to understand sensory cortex. Nature Neuroscience, 19(3):356–365, February 2016. doi: 10.1038/nn.4244. URL http://www.nature.com/doifinder/10.1038/nn.4244.
195
+
196
+ Sergey Zagoruyko and Nikos Komodakis. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. CoRR, abs/1612.03928, 2016. URL http://arxiv.org/abs/1612.03928.
197
+
198
+ Zhishuai Zhang, Cihang Xie, Jianyu Wang, Lingxi Xie, and Alan L. Yuille. Deepvoting: An explainable framework for semantic part detection under partial occlusion. CoRR, abs/1709.04577, 2017. URL http://arxiv.org/abs/1709.04577.
199
+
200
+ Table 7: ImageNet classification top-1 accuracy.
201
+
202
+ <table><tr><td>Models</td><td>Imagenet</td></tr><tr><td>VGG16 (Simonyan &amp; Zisserman,2014)</td><td>71.076</td></tr><tr><td>VGG-LR-2 (Li et al., 2018)</td><td>71.550</td></tr><tr><td>VGG-CRCN-2</td><td>71.632</td></tr></table>
203
+
204
+ # 6 SUPPLEMENTARY MATERIALS
205
+
206
+ # 6.1 DETAILS OF DIFFERENT CONTEXTUAL MODULES
207
+
208
+ We tested three other possible contextual modules in Section 4. Here are the detailed formulations of the three modules.
209
+
210
+ $$
211
+ \begin{array} { c } { { O _ { k } ^ { ( t ) } = g a t e * c o n t e x t u a l + O _ { k } ^ { ( t - 1 ) } } } \\ { { g a t e = \mathrm { T a n h } ( \mathrm { C o n v } _ { 1 \times 1 } ( \mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) ) ) } } \\ { { c o n t e x t u a l = \mathrm { C o n v } _ { 3 \times 3 } ( \mathrm { C o n c a t } ( \mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) , O _ { k - 1 } ^ { ( t - 1 ) } ) ) } } \end{array}
212
+ $$
213
+
214
+ $$
215
+ \begin{array} { c } { { O _ { k } ^ { ( t ) } = g a t e * c o n t e x t u a l + O _ { k } ^ { ( t - 1 ) } } } \\ { { g a t e = \mathrm { T a n h } ( \mathrm { C o n v } _ { 1 \times 1 } ( \mathrm { C o n c a t } ( \mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) , O _ { k - 1 } ^ { ( t - 1 ) } ) ) ) } } \\ { { c o n t e x t u a l = \mathrm { C o n v } _ { 3 \times 3 } ( \mathrm { C o n c a t } ( \mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) , O _ { k - 1 } ^ { ( t - 1 ) } ) ) } } \end{array}
216
+ $$
217
+
218
+ $$
219
+ \begin{array} { c } { { { \cal O } _ { k } ^ { ( t ) } = g a t e \_ c o n t e x t u a l * O _ { k + h ( k ) } ^ { ( t - 1 ) } + g a t e * c o n t e x t u a l + O _ { k } ^ { ( t - 1 ) } } } \\ { { g a t e = \mathrm { T a n h } ( \mathrm { C o n v } _ { 1 \times 1 } ( \mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) ) ) } } \\ { { \displaystyle c o n t e x t u a l = \mathrm { C o n v } _ { 3 \times 3 } ( \mathrm { C o n c a t } ( \mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) , O _ { k } ^ { ( t - 1 ) } ) ) } } \\ { { \displaystyle g a t e \_ c o n t e x t u a l = \mathrm { T a n h } ( c o n t e x t u a l ) } } \end{array}
220
+ $$
221
+
222
+ In the module described by Eqs. (3), we first generated the gate by the top-down layer. Then we used the gate to control the contextual information generated by concatenating bottom-up layer and top-down layer. To stable the information flow, we added it with the bottom-up layer.
223
+
224
+ In the module described by Eqs. (4), we first generated the gate by contextual information which is the same as our proposed module. Then we used the gate to control the contextual information itself which we thought was a feasible way to store the largest information. To stable the information flow, we also added it with the bottom-up layer.
225
+
226
+ We generated two gates by both contextual information and top-down layer in the module described by Eqs. (5). Then we used the gate contextual to control the top-down information and used the gate to control the contextual information. To stable the information flow, we also added it with the bottom-up layer.
227
+
228
+ # 6.2 IMAGE EXAMPLES OF DIFFERENT TASKS
229
+
230
+ In this section, we showed some examples of image occlusion task and adversarial noise task.
231
+
232
+ In the left of Figure 6, we showed one image occlusion example. And we showed one adversarial noise example in the right of Figure 6.
233
+
234
+ ![](images/ad4b6a865aee985c8c8f5d483d0485f0e6bb3f879ef815eb878cbb7da123bff8.jpg)
235
+ Figure 6: Examples of different task. Left: An example of image occlusion task. We quantified the scale of occluders in the image. Right: An example of Adversarial Attack noise. We can see the noise is not obvious to the human eyes but can lead a significant influence to the neural network. We used Fast Gradient Sign Non-target to generate the noise. The left is the original image and the right one is the image adding the noise.
236
+
237
+ Table 8: Noise image classification top-1 accuracy on Imagenet.
238
+
239
+ <table><tr><td></td><td rowspan="2">Models VGG16</td><td rowspan="2">VGG-LR-2</td><td rowspan="2">VGG-CRCN-2</td></tr><tr><td>Noise Level</td></tr><tr><td>0</td><td>71.076</td><td>71.551</td><td>71.632</td></tr><tr><td>10</td><td>65.456</td><td>66.012</td><td>67.620</td></tr><tr><td>20</td><td>54.090</td><td>54.640</td><td>56.988</td></tr><tr><td>30</td><td>39.124</td><td>39.634</td><td>42.686</td></tr><tr><td>40</td><td>24.068</td><td>24.721</td><td>28.120</td></tr><tr><td>50</td><td>13.072</td><td>13.907</td><td>17.102</td></tr></table>
240
+
241
+ # 6.3 IMAGENET TOP1 ACCURACY
242
+
243
+ In Table 7, we showed the Imagenet Top1 accuracy results. Notice that we did not compare our model with VGG-ATT model proposed in (Jetley et al., 2018) because their model is not reasonable on high resolution image dataset. Therefore, their model cannot extract effective attention map from the ImageNet images.
244
+
245
+ # 6.4 NOISE IMAGENET TOP1 ACCURACY
246
+
247
+ In Table 8, we showed the Imagenet Top1 accuracy results with different level of Gaussian noise. VGG16 here means the standard VGG16 model. Notice that we also compared our model with (Li et al., 2018)’s model which we name ”VGG-LR-2”.
parse/train/HkzyX3CcFQ/HkzyX3CcFQ_content_list.json ADDED
@@ -0,0 +1,1331 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "CONTEXTUAL RECURRENT CONVOLUTIONAL MODEL FOR ROBUST VISUAL LEARNING ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 823,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 171,
20
+ 398,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 234,
32
+ 544,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Feedforward convolutional neural network has achieved a great success in many computer vision tasks. While it validly imitates the hierarchical structure of biological visual system, it still lacks one essential architectural feature: contextual recurrent connections with feedback, which widely exists in biological visual system. In this work, we designed a Contextual Recurrent Convolutional Network with this feature embedded in a standard CNN structure. We found that such feedback connections could enable lower layers to “rethink” about their representations given the top-down contextual information. We carefully studied the components of this network, and showed its robustness and superiority over feedforward baselines in such tasks as noise image classification, partially occluded object recognition and fine-grained image classification. We believed this work could be an important step to help bridge the gap between computer vision models and real biological visual system. ",
40
+ "bbox": [
41
+ 233,
42
+ 267,
43
+ 764,
44
+ 446
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 474,
55
+ 336,
56
+ 491
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "It has been long established that the primate’s ventral visual system has a hierarchical structure (Felleman & Van Essen, 1991) including early (V1, V2), intermediate (V4), and higher (IT) visual areas. Modern deep convolutional neural networks (CNNs) for image recognition (Krizhevsky et al., 2012; Simonyan & Zisserman, 2014) trained on large image data sets like ImageNet (Russakovsky et al., 2015) imitate this hierarchical structure with multiple layers. There is a hierarchical correspondence between internal feature representations of a deep CNN’s different layers and neural representations of different visual areas (Cichy et al., 2016; Yamins & DiCarlo, 2016); lower visual areas (V1, V2) are best explained by a deep CNN’s internal representations from lower layers (Cadena et al., 2017; Khaligh-Razavi & Kriegeskorte, 2014) and higher areas (IT, V4) are best explained by its higher layers (Khaligh-Razavi & Kriegeskorte, 2014; Yamins et al., 2014). Deep CNNs explain neuron responses in ventral visual system better than any other model class (Yamins & DiCarlo, 2016; Kriegeskorte, 2015), and this success indicates that deep CNNs share some similarities with the ventral visual system, in terms of architecture and internal feature representations (Yamins & DiCarlo, 2016). ",
63
+ "bbox": [
64
+ 174,
65
+ 507,
66
+ 825,
67
+ 700
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "However, there is one key structural component that is missing in the standard feedforward deep CNNs: contextual feedback recurrent connections between neurons in different areas (Felleman & Van Essen, 1991). These connections greatly contribute to the complexity of the visual system, and may be essential for the success of the visual systems in reality; for example, there are evidences that recurrent connections are crucial for object recognition under noise, clutter, and occlusion (O’Reilly et al., 2013; Spoerer et al., 2017; Rajaei et al., 2018). ",
74
+ "bbox": [
75
+ 174,
76
+ 708,
77
+ 823,
78
+ 791
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "In this paper, we explored a variety of model with different recurrent architectures, contextual modules, and information flows to understand the computational advantages of feedback circuits. We are interested in understanding what and how top-down and bottom-up contextual information can be combined to improve in performance in visual tasks. We investigated VGG16 (Simonyan & Zisserman, 2014), a standard CNN that coarsely approximate the ventral visual hierarchical stream, and its recurrent variants for comparison. To introduce feedback recurrent connections, we divided VGG16’s layers into stages and selectively added feedback connections from the groups’ highest layers to their lowest layers. At the end of each feedback connection, there is a contextual module (Section 3.2) that refines the bottom-up input with gated contextual information. We tested and compared several networks with such contextual modules against VGG16 in several standard image classification task, as well as visual tasks in which refinement under feedback guidance is more likely to produce some beneficial effects, such as object recognition under degraded conditions (noise, clutter and occlusion) and fine-grained recognition. We found that our network could outperform all the baseline feedforward networks and surpassed them by a large margin in finegrained and occlusion tasks. We also studied the internal feature representations of our network to illustrate the effectiveness of the structure. While much future work has to be done, our work can still be an important step to bridge the gap between biological visual systems and state-of-the-art computer vision models. ",
85
+ "bbox": [
86
+ 174,
87
+ 799,
88
+ 825,
89
+ 924
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/ae70cc4f9bf6f412ce0d69740ecef4031811076f7601476b71360a3cecfef767.jpg",
96
+ "image_caption": [
97
+ "Figure 1: The schematic of a Contextual Recurrent Convolutional Network (CRCN). Check Section 3.1 for details. "
98
+ ],
99
+ "image_footnote": [],
100
+ "bbox": [
101
+ 173,
102
+ 106,
103
+ 823,
104
+ 397
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "",
111
+ "bbox": [
112
+ 174,
113
+ 468,
114
+ 825,
115
+ 593
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "2 RELATED WORK ",
122
+ "text_level": 1,
123
+ "bbox": [
124
+ 176,
125
+ 618,
126
+ 344,
127
+ 635
128
+ ],
129
+ "page_idx": 1
130
+ },
131
+ {
132
+ "type": "text",
133
+ "text": "Although recurrent network modules including LSTM (Hochreiter & Schmidhuber, 1997) and Gated Recurrent Unit (Cho et al., 2014) have been widely used in temporal prediction (Wang et al., 2017c) and processing of sequential data (e.g. video classification (Donahue et al., 2015)), few studies have been done to augment feedforward CNNs with recurrent connections in image-based computer vision tasks. ",
134
+ "bbox": [
135
+ 174,
136
+ 652,
137
+ 825,
138
+ 723
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "Image classification. Standard deep CNNs for image classification suffer from occlusion and noise (Wang et al., 2017a;b; Zhang et al., 2017), since heavy occlusion and noise severely corrupt feature representations at lower layers and therefore cause degradation of higher semantic layers. With the inclusion of feedback connections, a model can “rethink” or refine its feature representations at lower layers using feedback information from higher layers (Li et al., 2018); after multiple rounds of feedback and refinement, input signals from distracting objects (noise, irrelevant objects, etc.) will be suppressed in the final feature representation (Cao et al., 2015). Li et al. (2018) used the output posterior possibilities of a CNN to refine its intermediate feature maps; however, their method requires posterior possibilities for refinement and thus cannot be applied in scenarios where supervision is absent. Jetley et al. (2018) used more global and semantic features at higher convolutional layers to sharpen more local feature maps at lower layers for image classification on CIFAR datasets; however, our own experimentation suggests that this method only works when the higher and lower layers have a relatively small semantic gap (similarly sized receptive fields); on highresolution dataset like ImageNet, large semantic gaps between higher and lower layers make this method difficult to work. ",
145
+ "bbox": [
146
+ 174,
147
+ 742,
148
+ 825,
149
+ 924
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "image",
155
+ "img_path": "images/c818429efbdf29d1c84f329e718e4c6789a006e89bfdced8503dbcfff561faf0.jpg",
156
+ "image_caption": [
157
+ "Figure 2: The details of a VGG-style context-gating recurrent model. "
158
+ ],
159
+ "image_footnote": [],
160
+ "bbox": [
161
+ 179,
162
+ 99,
163
+ 784,
164
+ 251
165
+ ],
166
+ "page_idx": 2
167
+ },
168
+ {
169
+ "type": "text",
170
+ "text": "",
171
+ "bbox": [
172
+ 174,
173
+ 306,
174
+ 823,
175
+ 334
176
+ ],
177
+ "page_idx": 2
178
+ },
179
+ {
180
+ "type": "text",
181
+ "text": "Other computer vision tasks. Linsley et al. (2018) designed a model with explicit horizontal recurrent connections to solve contour detection problems, and Spoerer et al. (2017) evaluated the performance of various models with recurrent connections on digit recognition tasks under clutter. The tasks evaluated in these studies are rather simple and contrived, and it remains to be seen whether their models and conclusions can apply to real world computer vision problems. (Li et al., 2018) uses posterior possibilities at the last fully connected layer to select intermediate feature map representations; however, the posterior possibility vector is not informative enough and the input of the feedback connection is totally fixed, which makes it less flexible to fully mimic the recurrent connections in the visual system. Overall, feedback and recurrent connections are present in multiple layers of the visual hierarchy, and this study constrains feedback connections to the output classification layer only. It is worth noting that a recent study (Nayebi et al., 2018) is motivated by recurrent connections in the brain as well; however, their work focuses on exploring the computational benefits of local recurrent connections while ours focuses on feedback recurrent ones. Thus, we believe that our work is complementary to theirs. ",
182
+ "bbox": [
183
+ 173,
184
+ 349,
185
+ 825,
186
+ 545
187
+ ],
188
+ "page_idx": 2
189
+ },
190
+ {
191
+ "type": "text",
192
+ "text": "3 METHODS ",
193
+ "text_level": 1,
194
+ "bbox": [
195
+ 174,
196
+ 564,
197
+ 290,
198
+ 580
199
+ ],
200
+ "page_idx": 2
201
+ },
202
+ {
203
+ "type": "text",
204
+ "text": "In this section, we will describe the overall architecture of our proposed model and discuss some design details. ",
205
+ "bbox": [
206
+ 174,
207
+ 595,
208
+ 823,
209
+ 623
210
+ ],
211
+ "page_idx": 2
212
+ },
213
+ {
214
+ "type": "text",
215
+ "text": "3.1 OVERALL MODEL ARCHITECTURE ",
216
+ "text_level": 1,
217
+ "bbox": [
218
+ 176,
219
+ 641,
220
+ 455,
221
+ 655
222
+ ],
223
+ "page_idx": 2
224
+ },
225
+ {
226
+ "type": "text",
227
+ "text": "The main structure of our Contextual Recurrent Convolutional Network (CRCN) is shown in Figure 1. A CRCN model is a standard feedforward convolutional network augmented with feedback connections attached to some layers. At the end of each feedback connection, a contextual module fuses top-down and bottom-up information (dashed red lines in Figure 1) to provide refined and sharpened input to the augmented layer. ",
228
+ "bbox": [
229
+ 174,
230
+ 666,
231
+ 825,
232
+ 737
233
+ ],
234
+ "page_idx": 2
235
+ },
236
+ {
237
+ "type": "text",
238
+ "text": "Given an input image, the model generates intermediate feature representations and output responses in multiple time steps. At the first time step $t = 0$ in Figure 1), the model passes the input through the feedforward route (black arrows in Figure 1) as in a standard CNN. At later time steps ${ \\bf \\chi } _ { t } > 0$ in Figure 1), each contextual module fuses output representations of lower and higher layers at the previous step (dashed red lines in Figure 1) to generate the refined input at the current time step (red lines in Figure 1). Mathematically, we have ",
239
+ "bbox": [
240
+ 174,
241
+ 743,
242
+ 825,
243
+ 827
244
+ ],
245
+ "page_idx": 2
246
+ },
247
+ {
248
+ "type": "equation",
249
+ "img_path": "images/b8121286814843e761ee7f2386712540bd7ea1206d0719740b5ba434b53ec162.jpg",
250
+ "text": "$$\nO _ { k } ^ { ( t ) } = \\left\\{ \\begin{array} { l l } { f _ { k } ( O _ { k - 1 } ^ { ( t ) } ) } & { \\mathrm { i f ~ } t = 0 \\mathrm { o r } k \\not \\in S _ { G } } \\\\ { c _ { k } ( O _ { k - 1 } ^ { ( t - 1 ) } , O _ { h ( k ) } ^ { ( t - 1 ) } ) } & { \\mathrm { i f ~ } t > 0 \\mathrm { a n d } k \\in S _ { G } } \\end{array} , \\right.\n$$",
251
+ "text_format": "latex",
252
+ "bbox": [
253
+ 323,
254
+ 832,
255
+ 673,
256
+ 875
257
+ ],
258
+ "page_idx": 2
259
+ },
260
+ {
261
+ "type": "text",
262
+ "text": "where $S _ { G }$ is the index set of layers augmented with feedback connections and contextual modules, $c _ { k } ( \\cdot , \\cdot )$ (detailed in Eqs. (2)) is the contextual module for layer $k$ , $O _ { k } ^ { ( t ) }$ denotes the output of layer $k$ at time $t$ , $h ( \\cdot )$ is a function that maps the index of an augmented layer to that of its higher feedback ",
263
+ "bbox": [
264
+ 174,
265
+ 877,
266
+ 823,
267
+ 924
268
+ ],
269
+ "page_idx": 2
270
+ },
271
+ {
272
+ "type": "image",
273
+ "img_path": "images/108da1c42b6e53c65483574604265f6835682348f541309f96ae51c7a14303e6.jpg",
274
+ "image_caption": [
275
+ "Figure 3: The schematic of our proposed contextual module. Layer $k$ denotes the bottom-up layer and layer $h ( k )$ denotes the top-down layer aligned with the size of $\\mathbf { k }$ layer. The left black arrow shows the feed-forward pipeline. "
276
+ ],
277
+ "image_footnote": [],
278
+ "bbox": [
279
+ 176,
280
+ 102,
281
+ 483,
282
+ 224
283
+ ],
284
+ "page_idx": 3
285
+ },
286
+ {
287
+ "type": "table",
288
+ "img_path": "images/c1b34135b5cf40a419db3c48ca46ae716e1850ba7ce61b720c6ca47721d5b1cc.jpg",
289
+ "table_caption": [],
290
+ "table_footnote": [],
291
+ "table_body": "<table><tr><td>Model</td><td>CIFAR-10</td><td>CIFAR-100</td></tr><tr><td>VGG-small VGG-ATT VGG-LR-2 VGG-CRCN-1 VGG-CRCN-2</td><td>91.20 91.77 91.49 92.37</td><td>67.06 69.48 68.99 70.82</td></tr></table>",
292
+ "bbox": [
293
+ 511,
294
+ 128,
295
+ 818,
296
+ 227
297
+ ],
298
+ "page_idx": 3
299
+ },
300
+ {
301
+ "type": "text",
302
+ "text": "Table 1: Top-1 image classification accuracy on CIFAR datasets. VGG-small means VGG model with only one FC layer. VGG-ATT means the model proposed in (Jetley et al., 2018), VGGLR-2 means the ”rethinking” one-FC-layer VGG model with 2 unrolling times proposed in (Li et al., 2018). CRCN- $n$ means our 2-recurrentconnection model with $n$ unrolling times. ",
303
+ "bbox": [
304
+ 504,
305
+ 238,
306
+ 825,
307
+ 349
308
+ ],
309
+ "page_idx": 3
310
+ },
311
+ {
312
+ "type": "text",
313
+ "text": "layer, and $f _ { k } ( \\cdot )$ denotes the (feedforward) operation to compute the output of layer $k$ given some input. ",
314
+ "bbox": [
315
+ 174,
316
+ 373,
317
+ 823,
318
+ 401
319
+ ],
320
+ "page_idx": 3
321
+ },
322
+ {
323
+ "type": "text",
324
+ "text": "3.2 CONTEXTUAL MODULE DESIGN ",
325
+ "text_level": 1,
326
+ "bbox": [
327
+ 176,
328
+ 417,
329
+ 437,
330
+ 433
331
+ ],
332
+ "page_idx": 3
333
+ },
334
+ {
335
+ "type": "text",
336
+ "text": "The key part of the Contextual Recurrent Convolutional Network model is the contextual module at the end of each feedback connection. Figure 3 shows one possible design of the contextual module, which is inspired by traditional RNN modules including LSTM (Hochreiter & Schmidhuber, 1997) and Gated Recurrent Unit (Cho et al., 2014). In this scheme, a gate map is generated by the concatenation of the bottom-up and the (upsampled) top-down feature map passing through a $3 \\times 3$ convolution (black circle with “C” and black arrows with circle). Then a tanh function is applied to the map to generate a gate map. The gate map then controls the amount of contextual information that can go through by a point-wise multiplication (red lines). To make the information flow more stable, we add it with bottom-up feature map (black circle with $\" + \"$ ). The equations are presented in Eqs. (2). Then we use this new feature representation to replace the old one and continue feedforward calculation as described in Section 3.1. ",
337
+ "bbox": [
338
+ 173,
339
+ 444,
340
+ 825,
341
+ 597
342
+ ],
343
+ "page_idx": 3
344
+ },
345
+ {
346
+ "type": "equation",
347
+ "img_path": "images/b263756d83a8f45737fce73600d4a327621868a0bd0afc7d259dddb8cc125a50.jpg",
348
+ "text": "$$\n\\begin{array} { l } { O _ { k } ^ { ( t ) } = g a t e * \\mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) + O _ { k } ^ { ( t - 1 ) } } \\\\ { g a t e = \\mathrm { T a n h } ( \\mathrm { C o n v } _ { 3 \\times 3 } ( \\mathrm { C o n c a t } ( \\mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) , O _ { k - 1 } ^ { ( t - 1 ) } ) ) ) } \\end{array}\n$$",
349
+ "text_format": "latex",
350
+ "bbox": [
351
+ 285,
352
+ 616,
353
+ 710,
354
+ 667
355
+ ],
356
+ "page_idx": 3
357
+ },
358
+ {
359
+ "type": "text",
360
+ "text": "3.3 LOCATION OF RECURRENT CONNECTIONS",
361
+ "text_level": 1,
362
+ "bbox": [
363
+ 178,
364
+ 679,
365
+ 508,
366
+ 694
367
+ ],
368
+ "page_idx": 3
369
+ },
370
+ {
371
+ "type": "text",
372
+ "text": "Since there exists a gap between the semantic meanings of feature representations of bottom-up and top-down layers, we argue that recurrent connection across too many layers can do harm to the performance. Therefore, we derive three sets of connections, conv3 2 to conv2 2, conv4 2 to conv3 3, and $\\mathsf { c o n v } 5 _ { - 2 }$ to $\\mathtt { C O n v 4 \\_ 3 }$ respectively. It is worth noting that all these connections go across pooling layers, for pooling layers can greatly enlarge the receptive field of neurons and enrich the contextual information of top-down information flow. For information flow in networks with multiple recurrent connections, take the network structure in Figure 2 as an example. The part between conv2 2 and $\\mathsf { c o n v } 5 _ { - 2 }$ will be unrolled for a certain number of times. To make the experiments setting consistent, we used model with two recurrent connections $( \\log 1 + \\log 2 )$ in all the tasks. ",
373
+ "bbox": [
374
+ 173,
375
+ 705,
376
+ 825,
377
+ 844
378
+ ],
379
+ "page_idx": 3
380
+ },
381
+ {
382
+ "type": "text",
383
+ "text": "4 EXPERIMENTS AND ANALYSIS ",
384
+ "text_level": 1,
385
+ "bbox": [
386
+ 176,
387
+ 864,
388
+ 459,
389
+ 881
390
+ ],
391
+ "page_idx": 3
392
+ },
393
+ {
394
+ "type": "text",
395
+ "text": "We first tested the Contextual Recurrent Convolutional model on standard image classification task including CIFAR-10, CIFAR-100, ImageNet and fine-grained image classification dataset CUB-200. ",
396
+ "bbox": [
397
+ 174,
398
+ 895,
399
+ 825,
400
+ 924
401
+ ],
402
+ "page_idx": 3
403
+ },
404
+ {
405
+ "type": "image",
406
+ "img_path": "images/a8a67c4dae333977bc1db2e243aeb8cd6f3bad6d705c60c1fd081fb1e04e80af.jpg",
407
+ "image_caption": [
408
+ "Figure 4: The example images and results of noise image classification experiment. Upper four images show an example of images with different levels of Gaussian noise added. From left to right, the standard deviations are 0, 10, 30, 50, respectively. Lower right figure shows the increased percentage of our unroll-2-times model on top-1 noise image accuracy compared with feedforward model. Lower left figure shows the adversarial attack result. The fooling rate is measured by the absolute accuracy drop when adversarial attack is performed on the model. We use standard FGSM attack on all ImageNet validation images. The blue line shows the fooling rate of our unroll-2-times model, red line shows the feed-forward model and the orange line shows the model proposed by (Li et al., 2018). As the attack gets stronger, our model shows more robustness. "
409
+ ],
410
+ "image_footnote": [],
411
+ "bbox": [
412
+ 179,
413
+ 109,
414
+ 820,
415
+ 392
416
+ ],
417
+ "page_idx": 4
418
+ },
419
+ {
420
+ "type": "table",
421
+ "img_path": "images/2c032d141d64900b1bdd6cf60008ed2884cf1b0e7296e2cac8e7a1b113853d86.jpg",
422
+ "table_caption": [],
423
+ "table_footnote": [],
424
+ "table_body": "<table><tr><td>Model</td><td>Occlusion</td></tr><tr><td>VGG-small VGG-ATT (Jetley et al., 2018) VGG-LR-2 (Li et al., 2018) VGG-CRCN-2</td><td>34.50 46.57 45.88</td></tr></table>",
425
+ "bbox": [
426
+ 511,
427
+ 549,
428
+ 821,
429
+ 636
430
+ ],
431
+ "page_idx": 4
432
+ },
433
+ {
434
+ "type": "table",
435
+ "img_path": "images/017335a92d888caac827eb5ac646d105d5862a04f93cec5357683ca50c9fb441.jpg",
436
+ "table_caption": [
437
+ "Table 2: Top-1 accuracy on CUB-200 datasets. "
438
+ ],
439
+ "table_footnote": [
440
+ "Table 3: Top-1 accuracy on Occlusion datasets. "
441
+ ],
442
+ "table_body": "<table><tr><td>Model</td><td>CUB-200</td></tr><tr><td>VGG-small</td><td>64.88</td></tr><tr><td>VGG-ATT (Jetley et al., 2018)</td><td>73.19</td></tr><tr><td>VGG-LR-2 (Li et al., 2018)</td><td>72.99</td></tr><tr><td>VGG-CRCN-2</td><td>74.90</td></tr></table>",
443
+ "bbox": [
444
+ 179,
445
+ 549,
446
+ 486,
447
+ 635
448
+ ],
449
+ "page_idx": 4
450
+ },
451
+ {
452
+ "type": "text",
453
+ "text": "To display the robustness of our model, we showed its performance on noise image classification, adversarial attack and occluded images. We found that our model achieved considerate performance gain compared with the standard feedforward model on all these tasks. Notice that our proposed models are based on VGG16 with 2 recurrent connection(loop1+loop2 in Figure 2) in all the tasks. ",
454
+ "bbox": [
455
+ 174,
456
+ 689,
457
+ 825,
458
+ 744
459
+ ],
460
+ "page_idx": 4
461
+ },
462
+ {
463
+ "type": "text",
464
+ "text": "4.1 STANDARD IMAGE CLASSIFICATION ",
465
+ "text_level": 1,
466
+ "bbox": [
467
+ 176,
468
+ 763,
469
+ 464,
470
+ 779
471
+ ],
472
+ "page_idx": 4
473
+ },
474
+ {
475
+ "type": "text",
476
+ "text": "CIFAR-10: Because CIFAR-10 and CIFAR-100 datasets only contain tiny images, the receptive fields of neurons in layers beyond conv3 2 already cover an image entirely. Although the real power of contextual modulation is hindered by this limitation, our model can still beat the baseline VGG16 network by a large margin (Second column in Table 1). Our model also compared favorably to two other recent models with recurrent connections. Again, our models showed better results. ",
477
+ "bbox": [
478
+ 174,
479
+ 790,
480
+ 825,
481
+ 861
482
+ ],
483
+ "page_idx": 4
484
+ },
485
+ {
486
+ "type": "text",
487
+ "text": "CIFAR-100: Based on the assumption that contextual modulation can help layers capture more detailed information, we also tested our model on CIFAR-100 dataset, which is a 100-category version of CIFAR-10. Our model got a larger improvement compared with feedforward and other models (The third column in Table.1). ",
488
+ "bbox": [
489
+ 174,
490
+ 867,
491
+ 823,
492
+ 924
493
+ ],
494
+ "page_idx": 4
495
+ },
496
+ {
497
+ "type": "table",
498
+ "img_path": "images/76632fece3b7c86aa28e6c7935a4dc44d09172a5c4d1f3d905479649c634e29d.jpg",
499
+ "table_caption": [
500
+ "Table 4: Noise image classification top-1 accuracy on different module structures. VGG16: standard feedforward model. module 1: top-down gating contextual. module 2: contextual gating contextual. module 3: contextual gating top-down and top-down gating contextual combined. Proposed: contextual gating top-down. "
501
+ ],
502
+ "table_footnote": [],
503
+ "table_body": "<table><tr><td rowspan=1 colspan=1>ModelsNoise Level</td><td rowspan=1 colspan=1>VGG16</td><td rowspan=1 colspan=1>Module 1</td><td rowspan=1 colspan=1>Module 2</td><td rowspan=1 colspan=1>Module 3</td><td rowspan=1 colspan=1>Proposed</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>71.076</td><td rowspan=1 colspan=1>71.608</td><td rowspan=1 colspan=1>71.540</td><td rowspan=1 colspan=1>71.500</td><td rowspan=2 colspan=1>71.63266.760</td></tr><tr><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>65.456</td><td rowspan=1 colspan=1>66.400</td><td rowspan=1 colspan=1>66.578</td><td rowspan=1 colspan=1>66.580</td></tr><tr><td rowspan=1 colspan=1>20</td><td rowspan=1 colspan=1>54.090</td><td rowspan=1 colspan=1>56.630</td><td rowspan=1 colspan=1>55.944</td><td rowspan=2 colspan=1>56.04041.520</td><td rowspan=2 colspan=1>56.29442.104</td></tr><tr><td rowspan=1 colspan=1>30</td><td rowspan=1 colspan=1>39.124</td><td rowspan=1 colspan=1>41.090</td><td rowspan=1 colspan=1>41.800</td></tr><tr><td rowspan=1 colspan=1>40</td><td rowspan=1 colspan=1>24.068</td><td rowspan=1 colspan=1>26.980</td><td rowspan=1 colspan=1>27.634</td><td rowspan=2 colspan=1>26.91015.460</td><td rowspan=2 colspan=1>27.76616.310</td></tr><tr><td rowspan=1 colspan=1>50</td><td rowspan=1 colspan=1>13.072</td><td rowspan=1 colspan=1>15.890</td><td rowspan=1 colspan=1>16.458</td></tr></table>",
504
+ "bbox": [
505
+ 194,
506
+ 102,
507
+ 797,
508
+ 228
509
+ ],
510
+ "page_idx": 5
511
+ },
512
+ {
513
+ "type": "table",
514
+ "img_path": "images/0315bd840718acc5418836e55f5c35ac8f917533ad1a7e6680ec594db8e09d7e.jpg",
515
+ "table_caption": [
516
+ "Table 5: Noise image classification top-1 accuracy on different loop locations. Loop1 corresponds to the first feedback connection in Figure 2. The same for Loop2, 3, $1 + 2$ , $^ { 2 + 3 }$ and $1 + 2 + 3$ . "
517
+ ],
518
+ "table_footnote": [],
519
+ "table_body": "<table><tr><td></td><td>Locations</td><td rowspan=\"2\">Loop 1</td><td rowspan=\"2\">Loop 2</td><td rowspan=\"2\">Loop 3</td><td rowspan=\"2\">Loop 1+2</td><td rowspan=\"2\">Loop 2+3</td><td rowspan=\"2\">Loop 1+2+3</td></tr><tr><td>Noise Level</td><td></td></tr><tr><td colspan=\"2\">0</td><td>71.581</td><td>71.672</td><td>71.580</td><td>71.632</td><td>71.646</td><td>71.745</td></tr><tr><td colspan=\"2\">10</td><td>66.151</td><td>66.075</td><td>65.952</td><td>66.760</td><td>66.646</td><td>67.620</td></tr><tr><td colspan=\"2\">20</td><td>55.301</td><td>55.240</td><td>54.692</td><td>56.294</td><td>56.000</td><td>56.988</td></tr><tr><td colspan=\"2\">30</td><td>40.271</td><td>40.150</td><td>39.773</td><td>42.104</td><td>41.621</td><td>42.686</td></tr><tr><td colspan=\"2\">40</td><td>25.600</td><td>25.490</td><td>24.910</td><td>27.766</td><td>27.110</td><td>28.120</td></tr><tr><td colspan=\"2\">50</td><td>14.045</td><td>13.932</td><td>12.418</td><td>16.310</td><td>16.014</td><td>17.102</td></tr></table>",
520
+ "bbox": [
521
+ 181,
522
+ 310,
523
+ 851,
524
+ 438
525
+ ],
526
+ "page_idx": 5
527
+ },
528
+ {
529
+ "type": "text",
530
+ "text": "4.2 NOISE IMAGE CLASSIFICATION AND ADVERSARIAL ATTACK ",
531
+ "text_level": 1,
532
+ "bbox": [
533
+ 174,
534
+ 506,
535
+ 633,
536
+ 520
537
+ ],
538
+ "page_idx": 5
539
+ },
540
+ {
541
+ "type": "text",
542
+ "text": "ImageNet: ImageNet (Krizhevsky et al., 2012) is the commonly used large-scale image classification dataset. It contains over 1 million images with 1000 categories. In this task, to test the robustness of our model, we added different levels of Gaussian noise on the $2 2 4 \\mathrm { p x } \\times 2 2 4 \\mathrm { p x }$ images in the validation set and calculated the performance drop. In detail, we used the two recurrent connection model for this task $( \\log 1 { + } \\log 2$ in Figure 2). Notice that all models are not trained on noise images. The result of top1 error without any noise is shown in Table 7. We found that the performance gap between our model and feedforward VGG model got larger as the noise level increased. Results are shown in Figure 4. Also, we showed the noise ImageNet top-1 accuracy of our model, (Li et al., 2018)’s model and feed-forward model in Table 8. ",
543
+ "bbox": [
544
+ 174,
545
+ 531,
546
+ 825,
547
+ 657
548
+ ],
549
+ "page_idx": 5
550
+ },
551
+ {
552
+ "type": "text",
553
+ "text": "Additionally, we also tested adversarial attacks on our model. Figure 4 shows the results with different $\\mathrm { L } _ { \\infty }$ norm coefficient. We also found that our model had much lower fooling rates than feedforward model and (Li et al., 2018)’s model with the increasing of the norms, which successfully proved our model’s robustness. ",
554
+ "bbox": [
555
+ 174,
556
+ 665,
557
+ 825,
558
+ 719
559
+ ],
560
+ "page_idx": 5
561
+ },
562
+ {
563
+ "type": "text",
564
+ "text": "4.3 FINE-GRAINED IMAGE CLASSIFICATION ",
565
+ "text_level": 1,
566
+ "bbox": [
567
+ 176,
568
+ 739,
569
+ 491,
570
+ 753
571
+ ],
572
+ "page_idx": 5
573
+ },
574
+ {
575
+ "type": "text",
576
+ "text": "We argued that the contextual module can help the network to preserve more fine-grained details in feature representations, and thus we tested our model on CUB-200 fine-grained bird classification dataset (Wah et al., 2011). We used the same model as ImageNet classification task which indicates that our model contains two recurrent connection(loop1+loop2 in Figure 2). As a result, our model can outperform much better than the feed-forward VGG model(Zagoruyko & Komodakis, 2016) and other similar models with the same experimental settings. The result is shown in 2. ",
577
+ "bbox": [
578
+ 174,
579
+ 766,
580
+ 825,
581
+ 849
582
+ ],
583
+ "page_idx": 5
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "4.4 OCCLUDED IMAGE TASK ",
588
+ "text_level": 1,
589
+ "bbox": [
590
+ 174,
591
+ 868,
592
+ 387,
593
+ 882
594
+ ],
595
+ "page_idx": 5
596
+ },
597
+ {
598
+ "type": "text",
599
+ "text": "To further prove the robust ability of our model, we tested our model on VehicleOcclusion dataset (Wang et al., 2017b), which contains 4549 training images and 4507 testing images covering six types of vehicles, i.e., airplane, bicycle, bus, car, motorbike and train. For each test image in dataset, some randomly-positioned occluders (irrelevant to the target object) are placed onto the target object, and make sure that the occlusion ratio of the target object is constrained. One example is shown in Figure 6. In this task, we used multi-recurrent model which is similar with the model mentioned in Imagenet task. Here, we found that our model can achieve a huge improvement, which is shown in 3. ",
600
+ "bbox": [
601
+ 174,
602
+ 895,
603
+ 823,
604
+ 924
605
+ ],
606
+ "page_idx": 5
607
+ },
608
+ {
609
+ "type": "text",
610
+ "text": "",
611
+ "bbox": [
612
+ 174,
613
+ 103,
614
+ 825,
615
+ 186
616
+ ],
617
+ "page_idx": 6
618
+ },
619
+ {
620
+ "type": "text",
621
+ "text": "4.5 DISCUSSION AND ANALYSIS ",
622
+ "text_level": 1,
623
+ "bbox": [
624
+ 176,
625
+ 205,
626
+ 411,
627
+ 218
628
+ ],
629
+ "page_idx": 6
630
+ },
631
+ {
632
+ "type": "image",
633
+ "img_path": "images/a8284c5476404fddf0f65095157e0dd6b6e973e8c60be71465f296a34b0b00f2.jpg",
634
+ "image_caption": [
635
+ "Figure 5: The results of t-SNE visualization. Upper four sub-figures shows the result of VGG16. (a) shows the result of conv4 layer without noise. (b) shows conv4 layer with noise level 30. (c) shows FC layer without noise. (d) shows FC layer with noise level 30.Lower four sub-figures shows the corresponding results of VGG-CRCN-2 model. "
636
+ ],
637
+ "image_footnote": [],
638
+ "bbox": [
639
+ 184,
640
+ 234,
641
+ 776,
642
+ 468
643
+ ],
644
+ "page_idx": 6
645
+ },
646
+ {
647
+ "type": "text",
648
+ "text": "4.5.1 LOCATION OF RECURRENT CONNECTIONS",
649
+ "text_level": 1,
650
+ "bbox": [
651
+ 174,
652
+ 568,
653
+ 522,
654
+ 583
655
+ ],
656
+ "page_idx": 6
657
+ },
658
+ {
659
+ "type": "text",
660
+ "text": "We implemented all the possible combinations of recurrent connections listed in Figure 2. We denote connection from conv3 2 to conv2 2, conv4 2 to conv3 3, and conv5 2 to $\\mathsf { C O n v 4 } _ { - 3 }$ as Loop 1, Loop 2 and Loop 3, respectively. The same naming scheme goes for Loop $1 + 2$ and Loop $1 + 2 + 3$ , etc. We tested altogether 6 different models on the noise classification experiment, the settings of which were completely the same. In Table 5, by comparing the corresponding columns where one more recurrent connection is added, we can find that having more loops yields better classification accuracy and robustness, consistent with the reciprocal loops between successive layers in the hierarchical visual cortex. Especially, we can also find that the importance of Loop 1 is slightly better than Loop 2 and Loop 3, indicating the early layers may benefit more from the additional contextual information as an aid. ",
661
+ "bbox": [
662
+ 173,
663
+ 592,
664
+ 825,
665
+ 731
666
+ ],
667
+ "page_idx": 6
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "4.5.2 CONTEXTUAL MODULE STRUCTURE ",
672
+ "text_level": 1,
673
+ "bbox": [
674
+ 176,
675
+ 746,
676
+ 482,
677
+ 761
678
+ ],
679
+ "page_idx": 6
680
+ },
681
+ {
682
+ "type": "text",
683
+ "text": "In additional to the original contextual module in Figure 3, we implemented three other structures that we thought were all reasonable, so as to further study the effect and importance of top-down information and contextual modulation. Briefly, we refer Module 1 to the scheme that top-down feature map gating contextual map, Module 2 to contextual map gating contextual map itself, Module 3 to the scheme that top-down feature map gating contextual map, as well as contextual map gating top-down feature map, and afterwards the two gating results are added together. The final output of all three modules are the gating output added by bottom-up feature map. By “contextual map”, we mean the concatenation of top-down and bottom-up feature map undergone a $3 \\times 3$ convolution layer. By “gating”, we mean the gated map element-wisely multiplied with the Sigmoid responses of the gate map. For formulas and further details of the three module structures, we guide readers to read the supplementary materials. ",
684
+ "bbox": [
685
+ 174,
686
+ 770,
687
+ 825,
688
+ 924
689
+ ],
690
+ "page_idx": 6
691
+ },
692
+ {
693
+ "type": "table",
694
+ "img_path": "images/adb2d17d13af74ab0c51b3238c94a259ac7a8ec4f60eff70a62ef4abaae7dba6.jpg",
695
+ "table_caption": [
696
+ "Table 6: Noise image classification top-1 accuracy on different unrolling times of our proposed model. VGG16 means Feed-forward VGG16 model and Unroll x indicates Unroll x times during the test process. "
697
+ ],
698
+ "table_footnote": [],
699
+ "table_body": "<table><tr><td rowspan=1 colspan=4>ModelsNoise Level</td><td rowspan=1 colspan=1>VGG16</td><td rowspan=1 colspan=1>Unroll 0</td><td rowspan=1 colspan=1>Unroll 1</td><td rowspan=1 colspan=1>Unroll 2</td><td rowspan=1 colspan=1>Unroll 3</td><td></td><td rowspan=1 colspan=1>Unroll 4</td></tr><tr><td rowspan=1 colspan=4>0</td><td rowspan=1 colspan=1>71.076</td><td rowspan=1 colspan=1>71.018</td><td rowspan=1 colspan=1>71.032</td><td rowspan=1 colspan=1>71.221</td><td rowspan=2 colspan=1>71.21666.481</td><td></td><td rowspan=2 colspan=1>71.61266.757</td></tr><tr><td rowspan=1 colspan=4>10</td><td rowspan=1 colspan=1>65.456</td><td rowspan=1 colspan=1>66.271</td><td rowspan=1 colspan=1>66.368</td><td rowspan=1 colspan=1>66.484</td><td></td><td rowspan=1 colspan=1>66.757</td></tr><tr><td rowspan=2 colspan=4>2030</td><td rowspan=1 colspan=1>54.090</td><td rowspan=1 colspan=1>55.810</td><td rowspan=1 colspan=1>55.880</td><td rowspan=1 colspan=1>55.938</td><td rowspan=1 colspan=1>55.894</td><td rowspan=2 colspan=2>56.29142.054</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>39.124</td><td rowspan=2 colspan=1>41.44227.588</td><td rowspan=2 colspan=1>41.49228.010</td><td rowspan=1 colspan=1>41.516</td><td rowspan=2 colspan=1>41.55128.031</td><td rowspan=2 colspan=1>42.05428.102</td></tr><tr><td rowspan=1 colspan=2>40</td><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>24.068</td><td rowspan=1 colspan=1>28.044</td><td></td><td rowspan=2 colspan=1>28.10216.271</td></tr><tr><td rowspan=1 colspan=4>50</td><td rowspan=1 colspan=1>13.072</td><td rowspan=1 colspan=1>15.860</td><td rowspan=1 colspan=1>15.941</td><td rowspan=1 colspan=1>15.954</td><td rowspan=1 colspan=1>15.982</td><td></td></tr></table>",
700
+ "bbox": [
701
+ 181,
702
+ 102,
703
+ 826,
704
+ 228
705
+ ],
706
+ "page_idx": 7
707
+ },
708
+ {
709
+ "type": "text",
710
+ "text": "We did the same noise image classification experiments on these different contextual modules to give a comparison. We use the Loop $1 + 2$ model as the remaining fixed part. The performance of these modules are listed in Figure 4. The differences among these contextual modules lie in how the gate map is generated and what information is to be gated. The best model is obtained by generating the gate map from contextual map and then use it to gate top-down information. By comparing it with Module 1, we find that using only top-down information to generate the map and control total data flow is not adequate, possibly because top-down information is too abstract and coarse. By comparing the best module with Module 2, we find that only top-down information is necessary to be gated. A direct addition of bottom-up map with the output of the gate is adequate to keep all the details in lower level feature maps. ",
711
+ "bbox": [
712
+ 174,
713
+ 316,
714
+ 825,
715
+ 455
716
+ ],
717
+ "page_idx": 7
718
+ },
719
+ {
720
+ "type": "text",
721
+ "text": "4.5.3 FEATURE ANALYSIS ",
722
+ "text_level": 1,
723
+ "bbox": [
724
+ 176,
725
+ 481,
726
+ 369,
727
+ 496
728
+ ],
729
+ "page_idx": 7
730
+ },
731
+ {
732
+ "type": "text",
733
+ "text": "We drew t-SNE visualization of feature representations of both final fully connected layers and layers with recurrent connections attached (e.g. conv2 2, conv3 3, conv4 3). We selected 5 out of 1000 categories from ImageNet validation set. To effectively capture the changes of feature representations of intermediate convolutional layers, we used ImageNet bounding box annotations and did an average pooling of all the feature responses corresponding to the object bounding box. By comparing the representations of both networks, we can find that the Contextual Recurrent Network is able to form a more distinct clustering than VGG16 network. Notice that we also tested the presentation when a high noise (standard deviation equal to 30) is added to the images. We can find a consistent improvement over VGG16 network in both intermediate representations and representations directly linked to the final classification task. The results are shown in Figure 5. ",
734
+ "bbox": [
735
+ 174,
736
+ 508,
737
+ 825,
738
+ 648
739
+ ],
740
+ "page_idx": 7
741
+ },
742
+ {
743
+ "type": "text",
744
+ "text": "4.5.4 UNROLLING PROCESS ",
745
+ "text_level": 1,
746
+ "bbox": [
747
+ 176,
748
+ 674,
749
+ 382,
750
+ 689
751
+ ],
752
+ "page_idx": 7
753
+ },
754
+ {
755
+ "type": "text",
756
+ "text": "There is another finding that the contextual module dynamics in recurrent connections not only helps to refine the low-level feature representation during inference, it can also refine the feedforward weights, resulting in better performance in computer vision tasks even in the first iteration, acting as a regularizer. The results are shown in Table 6. ",
757
+ "bbox": [
758
+ 174,
759
+ 702,
760
+ 825,
761
+ 757
762
+ ],
763
+ "page_idx": 7
764
+ },
765
+ {
766
+ "type": "text",
767
+ "text": "5 CONCLUSION ",
768
+ "text_level": 1,
769
+ "bbox": [
770
+ 176,
771
+ 789,
772
+ 318,
773
+ 804
774
+ ],
775
+ "page_idx": 7
776
+ },
777
+ {
778
+ "type": "text",
779
+ "text": "In this paper, we proposed a novel Contextual Recurrent Convolutional Network. Based on the recurrent connections between layers in the hierarchy of a feedforward deep convolutional neural network, the new network can show some robust properties in some computer vision tasks compared with its feedforward baseline. Moreover, the network shares many common properties with biological visual system. We hope this work will not only shed light on the effectiveness of recurrent connections in robust learning and general computer vision tasks, but also give people some inspirations to bridge the gap between computer vision models and real biological visual system. ",
780
+ "bbox": [
781
+ 174,
782
+ 825,
783
+ 823,
784
+ 924
785
+ ],
786
+ "page_idx": 7
787
+ },
788
+ {
789
+ "type": "text",
790
+ "text": "REFERENCES ",
791
+ "text_level": 1,
792
+ "bbox": [
793
+ 176,
794
+ 103,
795
+ 285,
796
+ 117
797
+ ],
798
+ "page_idx": 8
799
+ },
800
+ {
801
+ "type": "text",
802
+ "text": "Santiago A Cadena, George H Denfield, Edgar Y Walker, Leon A Gatys, Andreas S Tolias, Matthias Bethge, and Alexander S Ecker. Deep convolutional models improve predictions of macaque v1 responses to natural images. bioRxiv, 2017. doi: 10.1101/201764. URL https://www. biorxiv.org/content/early/2017/10/11/201764. ",
803
+ "bbox": [
804
+ 174,
805
+ 126,
806
+ 825,
807
+ 183
808
+ ],
809
+ "page_idx": 8
810
+ },
811
+ {
812
+ "type": "text",
813
+ "text": "Chunshui Cao, Xianming Liu, Yi Yang, Yinan Yu, Jiang Wang, Zilei Wang, Yongzhen Huang, Liang Wang, Chang Huang, Wei Xu, Deva Ramanan, and Thomas S. Huang. Look and think twice: Capturing top-down visual attention with feedback convolutional neural networks. In 2015 IEEE International Conference on Computer Vision, ICCV 2015, Santiago, Chile, December 7- 13, 2015, pp. 2956–2964. IEEE Computer Society, 2015. doi: 10.1109/ICCV.2015.338. URL https://doi.org/10.1109/ICCV.2015.338. ",
814
+ "bbox": [
815
+ 173,
816
+ 193,
817
+ 825,
818
+ 276
819
+ ],
820
+ "page_idx": 8
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "Kyunghyun Cho, Bart van Merrienboer, C¸ aglar Gulc¸ehre, Fethi Bougares, Holger Schwenk, and ¨ Yoshua Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. CoRR, abs/1406.1078, 2014. URL http://arxiv.org/abs/1406. 1078. ",
825
+ "bbox": [
826
+ 174,
827
+ 286,
828
+ 825,
829
+ 342
830
+ ],
831
+ "page_idx": 8
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "Radoslaw Martin Cichy, Aditya Khosla, Dimitrios Pantazis, Antonio Torralba, and Aude Oliva. Comparison of deep neural networks to spatio-temporal cortical dynamics of human visual object recognition reveals hierarchical correspondence. Scientific Reports, 6:27755 EP –, 06 2016. URL http://dx.doi.org/10.1038/srep27755. ",
836
+ "bbox": [
837
+ 174,
838
+ 353,
839
+ 825,
840
+ 410
841
+ ],
842
+ "page_idx": 8
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "Jeff Donahue, Lisa Anne Hendricks, Sergio Guadarrama, Marcus Rohrbach, Subhashini Venugopalan, Kate Saenko, and Trevor Darrell. Long-term recurrent convolutional networks for visual recognition and description. In CVPR, 2015. ",
847
+ "bbox": [
848
+ 174,
849
+ 419,
850
+ 825,
851
+ 462
852
+ ],
853
+ "page_idx": 8
854
+ },
855
+ {
856
+ "type": "text",
857
+ "text": "Daniel J. Felleman and David C. Van Essen. Distributed hierarchical processing in the primate cerebral cortex. Cerebral Cortex, 1(1):1–47, 1991. doi: 10.1093/cercor/1.1.1-a. URL http: //dx.doi.org/10.1093/cercor/1.1.1-a. ",
858
+ "bbox": [
859
+ 174,
860
+ 472,
861
+ 825,
862
+ 515
863
+ ],
864
+ "page_idx": 8
865
+ },
866
+ {
867
+ "type": "text",
868
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9(8): 1735–1780, 1997. doi: 10.1162/neco.1997.9.8.1735. URL https://doi.org/10.1162/ neco.1997.9.8.1735. ",
869
+ "bbox": [
870
+ 174,
871
+ 525,
872
+ 825,
873
+ 566
874
+ ],
875
+ "page_idx": 8
876
+ },
877
+ {
878
+ "type": "text",
879
+ "text": "Saumya Jetley, Nicholas A. Lord, Namhoon Lee, and Philip H. S. Torr. Learn to pay attention. CoRR, abs/1804.02391, 2018. URL http://arxiv.org/abs/1804.02391. ",
880
+ "bbox": [
881
+ 173,
882
+ 577,
883
+ 823,
884
+ 606
885
+ ],
886
+ "page_idx": 8
887
+ },
888
+ {
889
+ "type": "text",
890
+ "text": "Seyed-Mahdi Khaligh-Razavi and Nikolaus Kriegeskorte. Deep supervised, but not unsupervised, models may explain it cortical representation. PLOS Computational Biology, 10(11):1–29, 11 2014. doi: 10.1371/journal.pcbi.1003915. URL https://doi.org/10.1371/journal. pcbi.1003915. ",
891
+ "bbox": [
892
+ 174,
893
+ 616,
894
+ 825,
895
+ 672
896
+ ],
897
+ "page_idx": 8
898
+ },
899
+ {
900
+ "type": "text",
901
+ "text": "Nikolaus Kriegeskorte. Deep Neural Networks: A New Framework for Modeling Biological Vision and Brain Information Processing. Annual Review of Vision Science, 1(1):417–446, November 2015. doi: 10.1146/annurev-vision-082114-035447. URL http://www.annualreviews. org/doi/10.1146/annurev-vision-082114-035447. ",
902
+ "bbox": [
903
+ 174,
904
+ 681,
905
+ 823,
906
+ 738
907
+ ],
908
+ "page_idx": 8
909
+ },
910
+ {
911
+ "type": "text",
912
+ "text": "Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In Peter L. Bartlett, Fernando C. N. Pereira, Christopher J. C. Burges, Leon Bottou, and Kilian Q. Weinberger (eds.), ´ Advances in Neural Information Processing Systems 25: 26th Annual Conference on Neural Information Processing Systems 2012. Proceedings of a meeting held December 3-6, 2012, Lake Tahoe, Nevada, United States., pp. 1106–1114, 2012. ",
913
+ "bbox": [
914
+ 174,
915
+ 748,
916
+ 825,
917
+ 819
918
+ ],
919
+ "page_idx": 8
920
+ },
921
+ {
922
+ "type": "text",
923
+ "text": "Xin Li, Zequn Jie, Jiashi Feng, Changsong Liu, and Shuicheng Yan. Learning with rethinking: Recurrently improving convolutional neural networks through feedback. Pattern Recognition, 79:183–194, 2018. ",
924
+ "bbox": [
925
+ 173,
926
+ 829,
927
+ 823,
928
+ 871
929
+ ],
930
+ "page_idx": 8
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "Drew Linsley, Junkyung Kim, Vijay Veerabadran, and Thomas Serre. Learning long-range spatial dependencies with horizontal gated-recurrent units. CoRR, abs/1805.08315, 2018. URL http: //arxiv.org/abs/1805.08315. ",
935
+ "bbox": [
936
+ 176,
937
+ 882,
938
+ 823,
939
+ 922
940
+ ],
941
+ "page_idx": 8
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "Aran Nayebi, Daniel Bear, Jonas Kubilius, Kohitij Kar, Surya Ganguli, David Sussillo, James J. DiCarlo, and Daniel L. K. Yamins. Task-driven convolutional recurrent models of the visual system. CoRR, abs/1807.00053, 2018. URL http://arxiv.org/abs/1807.00053. ",
946
+ "bbox": [
947
+ 178,
948
+ 103,
949
+ 823,
950
+ 146
951
+ ],
952
+ "page_idx": 9
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "Randall O’Reilly, Dean Wyatte, Seth Herd, Brian Mingus, and David Jilk. Recurrent processing during object recognition. Frontiers in Psychology, 4:124, 2013. ISSN 1664-1078. doi: 10. 3389/fpsyg.2013.00124. URL https://www.frontiersin.org/article/10.3389/ fpsyg.2013.00124. ",
957
+ "bbox": [
958
+ 173,
959
+ 159,
960
+ 825,
961
+ 214
962
+ ],
963
+ "page_idx": 9
964
+ },
965
+ {
966
+ "type": "text",
967
+ "text": "Karim Rajaei, Yalda Mohsenzadeh, Reza Ebrahimpour, and Seyed-Mahdi Khaligh-Razavi. Beyond core object recognition: Recurrent processes account for object recognition under occlusion. bioRxiv, 2018. doi: 10.1101/302034. URL https://www.biorxiv.org/content/ early/2018/04/17/302034. ",
968
+ "bbox": [
969
+ 174,
970
+ 227,
971
+ 825,
972
+ 284
973
+ ],
974
+ "page_idx": 9
975
+ },
976
+ {
977
+ "type": "text",
978
+ "text": "Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. doi: 10.1007/s11263-015-0816-y. ",
979
+ "bbox": [
980
+ 173,
981
+ 296,
982
+ 825,
983
+ 353
984
+ ],
985
+ "page_idx": 9
986
+ },
987
+ {
988
+ "type": "text",
989
+ "text": "Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. URL http://arxiv.org/abs/1409.1556. ",
990
+ "bbox": [
991
+ 169,
992
+ 364,
993
+ 825,
994
+ 395
995
+ ],
996
+ "page_idx": 9
997
+ },
998
+ {
999
+ "type": "text",
1000
+ "text": "Courtney J. Spoerer, Patrick McClure, and Nikolaus Kriegeskorte. Recurrent convolutional neural networks: A better model of biological object recognition. Frontiers in Psychology, 8:1551, 2017. ISSN 1664-1078. doi: 10.3389/fpsyg.2017.01551. URL https://www.frontiersin. org/article/10.3389/fpsyg.2017.01551. ",
1001
+ "bbox": [
1002
+ 173,
1003
+ 406,
1004
+ 825,
1005
+ 463
1006
+ ],
1007
+ "page_idx": 9
1008
+ },
1009
+ {
1010
+ "type": "text",
1011
+ "text": "C. Wah, S. Branson, P. Welinder, P. Perona, and S. Belongie. The Caltech-UCSD Birds-200-2011 Dataset. Technical report, 2011. ",
1012
+ "bbox": [
1013
+ 174,
1014
+ 474,
1015
+ 823,
1016
+ 503
1017
+ ],
1018
+ "page_idx": 9
1019
+ },
1020
+ {
1021
+ "type": "text",
1022
+ "text": "Hao Wang, Xingyu Lin, Yimeng Zhang, and Tai Sing Lee. Learning robust object recognition using composed scenes from generative models. CoRR, abs/1705.07594, 2017a. URL http: //arxiv.org/abs/1705.07594. ",
1023
+ "bbox": [
1024
+ 173,
1025
+ 515,
1026
+ 823,
1027
+ 559
1028
+ ],
1029
+ "page_idx": 9
1030
+ },
1031
+ {
1032
+ "type": "text",
1033
+ "text": "Jianyu Wang, Cihang Xie, Zhishuai Zhang, Jun Zhu, Lingxi Xie, and Alan L. Yuille. Detecting semantic parts on partially occluded objects. CoRR, abs/1707.07819, 2017b. URL http:// arxiv.org/abs/1707.07819. ",
1034
+ "bbox": [
1035
+ 173,
1036
+ 570,
1037
+ 825,
1038
+ 613
1039
+ ],
1040
+ "page_idx": 9
1041
+ },
1042
+ {
1043
+ "type": "text",
1044
+ "text": "Yunbo Wang, Mingsheng Long, Jianmin Wang, Zhifeng Gao, and Philip S Yu. Predrnn: Recurrent neural networks for predictive learning using spatiotemporal lstms. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), Advances in Neural Information Processing Systems 30, pp. 879–888. Curran Associates, Inc., 2017c. ",
1045
+ "bbox": [
1046
+ 174,
1047
+ 626,
1048
+ 825,
1049
+ 683
1050
+ ],
1051
+ "page_idx": 9
1052
+ },
1053
+ {
1054
+ "type": "text",
1055
+ "text": "D L K Yamins, H Hong, C F Cadieu, E A Solomon, D Seibert, and J J DiCarlo. Performanceoptimized hierarchical models predict neural responses in higher visual cortex. Proceedings of the National Academy of Sciences, 111(23):8619–8624, June 2014. doi: 10.1073/pnas.1403112111. URL http://www.pnas.org/cgi/doi/10.1073/pnas.1403112111. ",
1056
+ "bbox": [
1057
+ 173,
1058
+ 694,
1059
+ 825,
1060
+ 752
1061
+ ],
1062
+ "page_idx": 9
1063
+ },
1064
+ {
1065
+ "type": "text",
1066
+ "text": "Daniel L K Yamins and James J DiCarlo. Using goal-driven deep learning models to understand sensory cortex. Nature Neuroscience, 19(3):356–365, February 2016. doi: 10.1038/nn.4244. URL http://www.nature.com/doifinder/10.1038/nn.4244. ",
1067
+ "bbox": [
1068
+ 173,
1069
+ 763,
1070
+ 823,
1071
+ 806
1072
+ ],
1073
+ "page_idx": 9
1074
+ },
1075
+ {
1076
+ "type": "text",
1077
+ "text": "Sergey Zagoruyko and Nikos Komodakis. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. CoRR, abs/1612.03928, 2016. URL http://arxiv.org/abs/1612.03928. ",
1078
+ "bbox": [
1079
+ 174,
1080
+ 819,
1081
+ 825,
1082
+ 862
1083
+ ],
1084
+ "page_idx": 9
1085
+ },
1086
+ {
1087
+ "type": "text",
1088
+ "text": "Zhishuai Zhang, Cihang Xie, Jianyu Wang, Lingxi Xie, and Alan L. Yuille. Deepvoting: An explainable framework for semantic part detection under partial occlusion. CoRR, abs/1709.04577, 2017. URL http://arxiv.org/abs/1709.04577. ",
1089
+ "bbox": [
1090
+ 174,
1091
+ 875,
1092
+ 825,
1093
+ 916
1094
+ ],
1095
+ "page_idx": 9
1096
+ },
1097
+ {
1098
+ "type": "table",
1099
+ "img_path": "images/f901803ce320ccfbb4c2d3abb08ac969e5ecad66ed60fad78b48f4f040b0693c.jpg",
1100
+ "table_caption": [
1101
+ "Table 7: ImageNet classification top-1 accuracy. "
1102
+ ],
1103
+ "table_footnote": [],
1104
+ "table_body": "<table><tr><td>Models</td><td>Imagenet</td></tr><tr><td>VGG16 (Simonyan &amp; Zisserman,2014)</td><td>71.076</td></tr><tr><td>VGG-LR-2 (Li et al., 2018)</td><td>71.550</td></tr><tr><td>VGG-CRCN-2</td><td>71.632</td></tr></table>",
1105
+ "bbox": [
1106
+ 313,
1107
+ 102,
1108
+ 679,
1109
+ 172
1110
+ ],
1111
+ "page_idx": 10
1112
+ },
1113
+ {
1114
+ "type": "text",
1115
+ "text": "6 SUPPLEMENTARY MATERIALS ",
1116
+ "text_level": 1,
1117
+ "bbox": [
1118
+ 174,
1119
+ 226,
1120
+ 457,
1121
+ 242
1122
+ ],
1123
+ "page_idx": 10
1124
+ },
1125
+ {
1126
+ "type": "text",
1127
+ "text": "6.1 DETAILS OF DIFFERENT CONTEXTUAL MODULES ",
1128
+ "text_level": 1,
1129
+ "bbox": [
1130
+ 173,
1131
+ 258,
1132
+ 552,
1133
+ 273
1134
+ ],
1135
+ "page_idx": 10
1136
+ },
1137
+ {
1138
+ "type": "text",
1139
+ "text": "We tested three other possible contextual modules in Section 4. Here are the detailed formulations of the three modules. ",
1140
+ "bbox": [
1141
+ 174,
1142
+ 285,
1143
+ 823,
1144
+ 314
1145
+ ],
1146
+ "page_idx": 10
1147
+ },
1148
+ {
1149
+ "type": "equation",
1150
+ "img_path": "images/34e6c4ec9f30889ba9c4b0d633e079b974809d7159eaae6e7057cb549ef89ed4.jpg",
1151
+ "text": "$$\n\\begin{array} { c } { { O _ { k } ^ { ( t ) } = g a t e * c o n t e x t u a l + O _ { k } ^ { ( t - 1 ) } } } \\\\ { { g a t e = \\mathrm { T a n h } ( \\mathrm { C o n v } _ { 1 \\times 1 } ( \\mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) ) ) } } \\\\ { { c o n t e x t u a l = \\mathrm { C o n v } _ { 3 \\times 3 } ( \\mathrm { C o n c a t } ( \\mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) , O _ { k - 1 } ^ { ( t - 1 ) } ) ) } } \\end{array}\n$$",
1152
+ "text_format": "latex",
1153
+ "bbox": [
1154
+ 287,
1155
+ 340,
1156
+ 709,
1157
+ 414
1158
+ ],
1159
+ "page_idx": 10
1160
+ },
1161
+ {
1162
+ "type": "equation",
1163
+ "img_path": "images/8e3ccc2107eba2a946b67efddd92c511d401c76e1f4e86a20a905df002ca26b4.jpg",
1164
+ "text": "$$\n\\begin{array} { c } { { O _ { k } ^ { ( t ) } = g a t e * c o n t e x t u a l + O _ { k } ^ { ( t - 1 ) } } } \\\\ { { g a t e = \\mathrm { T a n h } ( \\mathrm { C o n v } _ { 1 \\times 1 } ( \\mathrm { C o n c a t } ( \\mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) , O _ { k - 1 } ^ { ( t - 1 ) } ) ) ) } } \\\\ { { c o n t e x t u a l = \\mathrm { C o n v } _ { 3 \\times 3 } ( \\mathrm { C o n c a t } ( \\mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) , O _ { k - 1 } ^ { ( t - 1 ) } ) ) } } \\end{array}\n$$",
1165
+ "text_format": "latex",
1166
+ "bbox": [
1167
+ 261,
1168
+ 446,
1169
+ 733,
1170
+ 520
1171
+ ],
1172
+ "page_idx": 10
1173
+ },
1174
+ {
1175
+ "type": "equation",
1176
+ "img_path": "images/12f845e6e2a62061a25633ed9311cefbf037f590529cbf01620c0fe4ac2f8c4b.jpg",
1177
+ "text": "$$\n\\begin{array} { c } { { { \\cal O } _ { k } ^ { ( t ) } = g a t e \\_ c o n t e x t u a l * O _ { k + h ( k ) } ^ { ( t - 1 ) } + g a t e * c o n t e x t u a l + O _ { k } ^ { ( t - 1 ) } } } \\\\ { { g a t e = \\mathrm { T a n h } ( \\mathrm { C o n v } _ { 1 \\times 1 } ( \\mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) ) ) } } \\\\ { { \\displaystyle c o n t e x t u a l = \\mathrm { C o n v } _ { 3 \\times 3 } ( \\mathrm { C o n c a t } ( \\mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) , O _ { k } ^ { ( t - 1 ) } ) ) } } \\\\ { { \\displaystyle g a t e \\_ c o n t e x t u a l = \\mathrm { T a n h } ( c o n t e x t u a l ) } } \\end{array}\n$$",
1178
+ "text_format": "latex",
1179
+ "bbox": [
1180
+ 240,
1181
+ 550,
1182
+ 763,
1183
+ 645
1184
+ ],
1185
+ "page_idx": 10
1186
+ },
1187
+ {
1188
+ "type": "text",
1189
+ "text": "In the module described by Eqs. (3), we first generated the gate by the top-down layer. Then we used the gate to control the contextual information generated by concatenating bottom-up layer and top-down layer. To stable the information flow, we added it with the bottom-up layer. ",
1190
+ "bbox": [
1191
+ 176,
1192
+ 659,
1193
+ 823,
1194
+ 702
1195
+ ],
1196
+ "page_idx": 10
1197
+ },
1198
+ {
1199
+ "type": "text",
1200
+ "text": "In the module described by Eqs. (4), we first generated the gate by contextual information which is the same as our proposed module. Then we used the gate to control the contextual information itself which we thought was a feasible way to store the largest information. To stable the information flow, we also added it with the bottom-up layer. ",
1201
+ "bbox": [
1202
+ 174,
1203
+ 708,
1204
+ 825,
1205
+ 763
1206
+ ],
1207
+ "page_idx": 10
1208
+ },
1209
+ {
1210
+ "type": "text",
1211
+ "text": "We generated two gates by both contextual information and top-down layer in the module described by Eqs. (5). Then we used the gate contextual to control the top-down information and used the gate to control the contextual information. To stable the information flow, we also added it with the bottom-up layer. ",
1212
+ "bbox": [
1213
+ 174,
1214
+ 770,
1215
+ 825,
1216
+ 828
1217
+ ],
1218
+ "page_idx": 10
1219
+ },
1220
+ {
1221
+ "type": "text",
1222
+ "text": "6.2 IMAGE EXAMPLES OF DIFFERENT TASKS ",
1223
+ "text_level": 1,
1224
+ "bbox": [
1225
+ 173,
1226
+ 845,
1227
+ 500,
1228
+ 861
1229
+ ],
1230
+ "page_idx": 10
1231
+ },
1232
+ {
1233
+ "type": "text",
1234
+ "text": "In this section, we showed some examples of image occlusion task and adversarial noise task. ",
1235
+ "bbox": [
1236
+ 169,
1237
+ 873,
1238
+ 787,
1239
+ 888
1240
+ ],
1241
+ "page_idx": 10
1242
+ },
1243
+ {
1244
+ "type": "text",
1245
+ "text": "In the left of Figure 6, we showed one image occlusion example. And we showed one adversarial noise example in the right of Figure 6. ",
1246
+ "bbox": [
1247
+ 174,
1248
+ 895,
1249
+ 821,
1250
+ 924
1251
+ ],
1252
+ "page_idx": 10
1253
+ },
1254
+ {
1255
+ "type": "image",
1256
+ "img_path": "images/ad4b6a865aee985c8c8f5d483d0485f0e6bb3f879ef815eb878cbb7da123bff8.jpg",
1257
+ "image_caption": [
1258
+ "Figure 6: Examples of different task. Left: An example of image occlusion task. We quantified the scale of occluders in the image. Right: An example of Adversarial Attack noise. We can see the noise is not obvious to the human eyes but can lead a significant influence to the neural network. We used Fast Gradient Sign Non-target to generate the noise. The left is the original image and the right one is the image adding the noise. "
1259
+ ],
1260
+ "image_footnote": [],
1261
+ "bbox": [
1262
+ 197,
1263
+ 101,
1264
+ 794,
1265
+ 195
1266
+ ],
1267
+ "page_idx": 11
1268
+ },
1269
+ {
1270
+ "type": "table",
1271
+ "img_path": "images/26445947f2ea99c1ffed6e914aa889810ee171754af6f0237c6af810f7bff79e.jpg",
1272
+ "table_caption": [
1273
+ "Table 8: Noise image classification top-1 accuracy on Imagenet. "
1274
+ ],
1275
+ "table_footnote": [],
1276
+ "table_body": "<table><tr><td></td><td rowspan=\"2\">Models VGG16</td><td rowspan=\"2\">VGG-LR-2</td><td rowspan=\"2\">VGG-CRCN-2</td></tr><tr><td>Noise Level</td></tr><tr><td>0</td><td>71.076</td><td>71.551</td><td>71.632</td></tr><tr><td>10</td><td>65.456</td><td>66.012</td><td>67.620</td></tr><tr><td>20</td><td>54.090</td><td>54.640</td><td>56.988</td></tr><tr><td>30</td><td>39.124</td><td>39.634</td><td>42.686</td></tr><tr><td>40</td><td>24.068</td><td>24.721</td><td>28.120</td></tr><tr><td>50</td><td>13.072</td><td>13.907</td><td>17.102</td></tr></table>",
1277
+ "bbox": [
1278
+ 253,
1279
+ 291,
1280
+ 740,
1281
+ 420
1282
+ ],
1283
+ "page_idx": 11
1284
+ },
1285
+ {
1286
+ "type": "text",
1287
+ "text": "6.3 IMAGENET TOP1 ACCURACY ",
1288
+ "text_level": 1,
1289
+ "bbox": [
1290
+ 176,
1291
+ 470,
1292
+ 418,
1293
+ 486
1294
+ ],
1295
+ "page_idx": 11
1296
+ },
1297
+ {
1298
+ "type": "text",
1299
+ "text": "In Table 7, we showed the Imagenet Top1 accuracy results. Notice that we did not compare our model with VGG-ATT model proposed in (Jetley et al., 2018) because their model is not reasonable on high resolution image dataset. Therefore, their model cannot extract effective attention map from the ImageNet images. ",
1300
+ "bbox": [
1301
+ 173,
1302
+ 497,
1303
+ 825,
1304
+ 554
1305
+ ],
1306
+ "page_idx": 11
1307
+ },
1308
+ {
1309
+ "type": "text",
1310
+ "text": "6.4 NOISE IMAGENET TOP1 ACCURACY ",
1311
+ "text_level": 1,
1312
+ "bbox": [
1313
+ 176,
1314
+ 570,
1315
+ 465,
1316
+ 584
1317
+ ],
1318
+ "page_idx": 11
1319
+ },
1320
+ {
1321
+ "type": "text",
1322
+ "text": "In Table 8, we showed the Imagenet Top1 accuracy results with different level of Gaussian noise. VGG16 here means the standard VGG16 model. Notice that we also compared our model with (Li et al., 2018)’s model which we name ”VGG-LR-2”. ",
1323
+ "bbox": [
1324
+ 174,
1325
+ 597,
1326
+ 825,
1327
+ 638
1328
+ ],
1329
+ "page_idx": 11
1330
+ }
1331
+ ]
parse/train/HkzyX3CcFQ/HkzyX3CcFQ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HkzyX3CcFQ/HkzyX3CcFQ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Sklv5iRqYX/Sklv5iRqYX.md ADDED
@@ -0,0 +1,523 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MULTI-DOMAIN ADVERSARIAL LEARNING
2
+
3
+ Alice Schoenauer Sebag1,† alice.schoenauer@polytechnique.org
4
+
5
+ Louise Heinrich1, louise.heinrich@ucsf.edu
6
+
7
+ Marc Schoenauer2, marc.schoenauer@inria.fr
8
+
9
+ Michele Sebag2, sebag@lri.fr
10
+
11
+ Lani F. $\mathbf { W } \mathbf { u } ^ { 1 }$ , lani.wu@ucsf.edu
12
+
13
+ Steven J. Altschuler1 steven.altschuler@ucsf.edu
14
+
15
+ 1 Department of Pharmaceutical Chemistry UCSF, San Francisco, CA 94158
16
+
17
+ 2 INRIA-CNRS-UPSud-UPSaclay TAU, U. Paris-Sud, 91405 Orsay
18
+
19
+ # ABSTRACT
20
+
21
+ Multi-domain learning (MDL) aims at obtaining a model with minimal average risk across multiple domains. Our empirical motivation is automated microscopy data, where cultured cells are imaged after being exposed to known and unknown chemical perturbations, and each dataset displays significant experimental bias. This paper presents a multi-domain adversarial learning approach, MULANN, to leverage multiple datasets with overlapping but distinct class sets, in a semisupervised setting. Our contributions include: i) a bound on the average- and worst-domain risk in MDL, obtained using the $\mathcal { H }$ -divergence; ii) a new loss to accommodate semi-supervised multi-domain learning and domain adaptation; iii) the experimental validation of the approach, improving on the state of the art on three standard image benchmarks, and a novel bioimage dataset, CELL.1
22
+
23
+ # 1 INTRODUCTION
24
+
25
+ Advances in technology have enabled large scale dataset generation by life sciences laboratories. These datasets contain information about overlapping but non-identical known and unknown experimental conditions. A challenge is how to best leverage information across multiple datasets on the same subject, and to make discoveries that could not have been obtained from any individual dataset alone.
26
+
27
+ Transfer learning provides a formal framework for addressing this challenge, particularly crucial in cases where data acquisition is expensive and heavily impacted by experimental settings. One such field is automated microscopy, which can capture thousands of images of cultured cells after exposure to different experimental perturbations (e.g from chemical or genetic sources). A goal is to classify mechanisms by which perturbations affect cellular processes based on the similarity of cell images. In principle, it should be possible to tackle microscopy image classification as yet another visual object recognition task. However, two major challenges arise compared to mainstream visual object recognition problems (Russakovsky et al., 2015). First, biological images are heavily impacted by experimental choices, such as microscope settings and experimental reagents. Second, there is no standardized set of labeled perturbations, and datasets often contain labeled examples for a subset of possible classes only. This has limited microscopy image classification to single datasets and does not leverage the growing number of datasets collected by the life sciences community. These challenges make it desirable to learn models across many microscopy datasets, that achieve both good robustness w.r.t. experimental settings and good class coverage, all the while being robust to the fact that datasets contain samples from overlapping but distinct class sets.
28
+
29
+ Multi-domain learning (MDL) aims to learn a model of minimal risk from datasets drawn from distinct underlying distributions (Dredze et al., 2010), and is a particular case of transfer learning (Pan & Yang, 2010). As such, it contrasts with the so-called domain adaptation (DA) problem (Bickel et al., 2007; Ben-David et al., 2010; Ganin et al., 2016; Pan & Yang, 2010). DA aims at learning a model with minimal risk on a distribution called "target" by leveraging other distributions called "sources". Notably, most DA methods assume that target classes are identical to source classes, or a subset thereof in the case of partial DA (Cao et al., 2018; Zhang et al., 2018).
30
+
31
+ The expected benefits of MDL, compared to training a separate model on each individual dataset, are two-fold. First, MDL leverages more (labeled and unlabeled) information, allowing better generalization while accommodating the specifics of each domain (Dredze et al., 2010; Xiao et al., 2016). Thus, MDL models have a higher chance of ab initio performing well on a new domain − a problem referred to as domain generalization (Muandet et al., 2013) or zero-shot domain adaptation (Yang & Hospedales, 2015). Second, MDL enables knowledge transfer between domains: in unsupervised and semi-supervised settings, concepts learned on one domain are applied to another, significantly reducing the need for labeled examples from the latter (Pan & Yang, 2010).
32
+
33
+ Learning a single model from samples drawn from $n$ distributions raises the question of available learning guarantees regarding the model error on each distribution. Kifer et al. (2004) introduced the notion of $\mathcal { H }$ -divergence to measure the distance between source and target marginal distributions in DA. Ben-David et al. (2006; 2010) have shown that a finite sample estimate of this divergence can be used to bound the target risk of the learned model.
34
+
35
+ The contributions of our work are threefold. First, we extend the DA guarantees to MDL (Sec. 3.1), showing that the risk of the learned model over all considered domains is upper bounded by the oracle risk and the sum of the $\mathcal { H }$ -divergences between any two domains. Furthermore, an upper bound on the classifier imbalance (the difference between the individual domain risk, and the average risk over all domains) is obtained, thus bounding the worst-domain risk. Second, we propose the approach Multi-domain Learning Adversarial Neural Network (MULANN), which extends Domain Adversarial Neural Networks (DANNs) (Ganin et al., 2016) to semi-supervised DA and MDL. Relaxing the DA assumption, MULANN handles the so-called class asymmetry issue (when each domain may contain varying numbers of labeled and unlabeled examples of a subset of all possible classes), through designing a new loss (Sec. 3.2). Finally, MULANN is empirically validated in both DA and MDL settings (Sec. 4), as it significantly outperforms the state of the art on three standard image benchmarks (Saenko et al., 2010; Le Cun et al., 1998), and a novel bioimage benchmark, CELL, where the state of the art involves extensive domain-dependent pre-processing.
36
+
37
+ Notation. Let $\mathcal { X }$ denote an input space and $\mathcal { V } = \{ 1 , \ldots , L \}$ a set of classes. For $i = 1 , \ldots , n$ dataset $S _ { i }$ is an iid sample drawn from distribution $\mathcal { D } _ { i }$ on $\mathcal { X } \times \mathcal { V }$ . The marginal distribution of $\mathcal { D } _ { i }$ on $\mathcal { X }$ is denoted by $\mathcal { D } _ { i } ^ { \mathcal { X } }$ . Let $\mathcal { H }$ be a hypothesis space; for each $h$ in $\mathcal { H }$ $( h : \mathcal { X } \mapsto \mathcal { Y } )$ ) we define the risk under distribution $\mathcal { D } _ { i }$ as $\epsilon _ { i } ( h ) = \mathbb { P } _ { \mathbf { x } , y \sim \mathcal { D } _ { i } } ( h ( \mathbf { x } ) \neq y ) . \ h _ { i } ^ { \star }$ (respectively $h ^ { \star }$ ) denotes the oracle hypothesis according to distribution $\mathcal { D } _ { i }$ (resp. with minimal total risk over all domains):
38
+
39
+ $$
40
+ \begin{array} { c } { \displaystyle \epsilon _ { i } ^ { \star } = \epsilon _ { i } ( h _ { i } ^ { \star } ) = \underset { h \in \mathcal { H } } { m i n } \epsilon _ { i } ( h ) } \\ { \displaystyle \bar { \epsilon } ( h ^ { \star } ) = \underset { h \in \mathcal { H } } { m i n } \bar { \epsilon } ( h ) = \underset { h \in \mathcal { H } } { m i n } \frac { 1 } { n } \sum _ { i } \epsilon _ { i } ( h ) } \end{array}
41
+ $$
42
+
43
+ In the semi-supervised setting, the label associated with an instance might be missing. In the following, "domain" and "distribution" will be used interchangeably, and the "classes of a domain" denote the classes for which labeled or unlabeled examples are available in this domain.
44
+
45
+ # 2 STATE OF THE ART
46
+
47
+ Machine learning classically relies on the iid setting: when training and test samples are independently drawn from the same joint distribution $P ( X , Y )$ (Vapnik, 1998). Two other settings emerged in the 1990s, "concept drift" and "covariate shift". They respectively occur when conditional data distributions $P ( { \cal Y } | { \bar { \cal X } } )$ and marginal data distributions $P ( X )$ change, either continuously or abruptly, across training data or between train and test data (Shimodaira, 2000). Since then, transfer learning has come to designate methods to learn across drifting, shifting or distinct distributions, or even distinct tasks (Pratt et al., 1991; Pan & Yang, 2010). Restricting ourselves to addressing a single task on a common input space, we distinguish two objectives: minimizing the learning risk over all considered distributions (MDL), or over a single target distribution while exploiting samples from richer source(s) (DA). MDL is thus distinct from multiple source DA by their respective focus on the average risk over all distributions, versus target accuracy only. Samples from the different domains can be all, partially, or not labeled (supervised, semi-supervised and unsupervised settings). Finally, different domains can involve the same classes, or some domains can involve classes not included in other domains, referred to as class asymmetry.
48
+
49
+ In MDL, the different domains can be taken into account by maintaining shared and domain-specific parameters (Dredze et al., 2010), or through a domain-specific use of shared parameters. The domaindependent use of these parameters can be learned, e.g. using domain-guided dropout (Xiao et al., 2016), or based on prior knowledge about domain semantic relationships (Yang & Hospedales, 2015).
50
+
51
+ Early DA approaches leverage source examples to learn on the target domain in various ways, e.g. through reweighting source datapoints (Mansour, 2009; Huang et al., 2006; Gong et al., 2013), or defining an extended representation to learn from both source and target (Daumé III & Marcu, 2006). Other approaches proceed by aligning the source and target representations with PCA-based correlation alignment (Sun et al., 2016), or subspace alignment (Fernando et al., 2015). In the field of computer vision, a somewhat related way of mapping examples in one domain onto the other is image-to-image translation, possibly in combination with a generative adversarial network (see references in Appendix A).
52
+
53
+ Intuitively, the difficulty of DA crucially depends on the distance between source and target distribution. Accordingly, a large set of DA methods proceed by reducing this distance in the original input space $\mathcal { X }$ , e.g. via importance sampling (Bickel et al., 2007) or by modifying the source representation using optimal transport (Courty et al., 2017; Damodaran et al., 2018). Another option is to map source and target samples on a latent space where they will have minimal distance. Neural networks have been intensively exploited to build such latent spaces, either through generative adversarial mechanisms (Tzeng et al., 2017; Ghifary et al., 2016), or through combining task objective with an approximation of the distance between source(s) and target. Examples of used distances include the Maximum Mean Discrepancy due to Gretton et al. (2007) (Tzeng et al., 2014; Bousmalis et al., 2016), some of its variants (Long et al., 2015; 2016), the $\mathcal { L } _ { 2 }$ contrastive divergence (Motiian et al., 2017), the Frobenius norm of the output feature correlation matrices (Sun & Saenko, 2016), or the $\mathcal { H }$ -divergence (Ben-David et al., 2006; 2010; Ganin et al., 2016; Pei et al., 2018; Long et al., 2017) (more in Sec. 3). Most DA methods assume that source(s) and target contain examples from the same classes; in particular, in standard benchmarks such as OFFICE (Saenko et al., 2010), all domains contain examples from the same classes. Notable exceptions are partial DA methods, where target classes are expected to be a subset of source classes e.g. (Zhang et al., 2018; Cao et al., 2018). DA and partial DA methods share two drawbacks when applied to semi-supervised MDL with non-identical domain class sets. First, neither generic nor partial DA methods try to mitigate the impact of unlabeled samples from a class without any labeled counterparts. Second, as they focus on target performance, (partial) DA methods do not discuss the impact of extra labeled source classes on source accuracy. However, as shown in Sec. 4.3, class asymmetry can heavily impact model performance if not accounted for.
54
+
55
+ Bioinformatics is increasingly appreciating the need for domain adaptation methods (Borgwardt et al., 2006; Schweikert et al., 2008; Xu & Yang, 2011; Vallania et al., 2017). Indeed, experimentalists regularly face the issues of concept drift and covariate shift. Most biological experiments that last more than a few days are subject to technical variations between groups of samples, referred to as batch effects. Batch effects in image-based screening data are usually tackled with specific normalization methods (Birmingham et al., 2009). More recently, work by Ando et al. (2017) applied CorAl (Sun et al., 2016) for this purpose, aligning each batch with the entire experiment. DA has been applied to image-based datasets for improving or accelerating image segmentation tasks (Becker et al., 2015; van Opbroek et al., 2015; Bermúdez-Chacón et al., 2016; Kamnitsas et al., 2017). However, to our knowledge, MDL has not yet been used in Bioimage Informatics, and this work is the first to leverage distinct microscopy screening datasets using MDL.
56
+
57
+ # 3 MULTI-DOMAIN ADVERSARIAL LEARNING
58
+
59
+ The $\mathcal { H }$ -divergence has been introduced to bound the DA risk (Ben-David et al., 2006; 2010; Ganin et al., 2016). This section extends the DA theoretical results to the MDL case (Sec. 3.1), supporting
60
+
61
+ the design of the MULANN approach (Sec. 3.2). The reader is referred to Appendix B for formal definitions and proofs.
62
+
63
+ # 3.1 $\mathcal { H }$ -DIVERGENCE FOR MDL
64
+
65
+ The distance between source and target partly governs the difficulty of DA. The $\mathcal { H }$ -divergence has been introduced to define such a distance which can be empirically estimated with proven guarantees (Batu et al., 2000; Kifer et al., 2004). This divergence measures how well one can discriminate between samples from two marginals. It inspired an adversarial approach to DA (Ganin et al., 2016), through the finding of a feature space in which a binary classification loss between source and target projections is maximal, and thus their $\mathcal { H }$ -divergence minimal. Furthermore, the target risk is upper-bounded by the empirical source risk, the empirical $\mathcal { H }$ -divergence between source(s) and target marginals, and the oracle DA risk (Ben-David et al., 2006; 2010; Zhang et al., 2012).
66
+
67
+ Bounding the MDL loss using the $\mathcal { H }$ -divergence. A main difference between DA and MDL is that MDL aims to minimize the average risk over all domains while DA aims to minimize the target risk only. Considering for simplicity a binary classification MDL problem and taking inspiration from (Mansour et al., 2008; Ben-David et al., 2010), the MDL loss can be formulated as an optimal convex combination of domain risks. A straightforward extension of Ben-David et al. (2010) (Theorem 2 in Appendix B.2) establishes that the compound empirical risk is upper bounded by the sum of: i) the oracle risk on each domain; ii) a statistical learning term involving the VC dimension of $\mathcal { H }$ ; iii) the divergence among any two domains as measured by their $\mathcal { H }$ -divergence and summed oracle risk. This result states that, assuming a representation in which domains are as indistinguishable as possible and on which every 1- and 2-domain classification task is well addressed, then there exists a model that performs well on all of them. In the 2-domain case, the bound is minimized when one minimizes the convex combination of losses in the same proportion as samples.
68
+
69
+ Bounding the worst risk. The classifier imbalance w.r.t. the $i$ -th domain is defined as $| \epsilon _ { i } ( h ) - \bar { \epsilon } ( h ) |$ The extent to which marginal $\mathcal { D } _ { i }$ can best be distinguished by a classifier from $\mathcal { H }$ (i.e., the $\mathcal { H }$ - divergence), and the intrinsic difficulty $\boldsymbol { \epsilon } _ { i } ^ { \star }$ of the $i$ -th classification task, yield an upper-bound on the classifier imbalance (proof in Appendix B.3):
70
+
71
+ Proposition 1. Given an input space $\mathcal { X }$ , n distributions $\mathcal { D } _ { i }$ over $\mathcal { X } \times \{ 0 , 1 \}$ and hypothesis class $\mathcal { H }$ on $\mathcal { X }$ , for any $h \in \mathcal H$ , let $\epsilon _ { i } ( h )$ (respectively $\bar { \epsilon } ( h ) .$ ) denote the classification risk of $h$ w.r.t. distribution $\mathcal { D } _ { i }$ (resp. its average risk over all $\mathcal { D } _ { i }$ ). The risk imbalance $| \epsilon _ { i } ( h ) - \bar { \epsilon } ( h ) |$ is upper bounded as:
72
+
73
+ $$
74
+ \vert \epsilon _ { i } ( h ) - \bar { \epsilon } ( h ) \vert \leq \epsilon _ { i } ^ { \star } + \frac { 1 } { n } { \sum _ { j } } \epsilon _ { j } ^ { \star } + \frac { 1 } { n } { \sum _ { j } } \left( d _ { \mathcal { H } } ( \mathcal { D } _ { i } ^ { X } , \mathcal { D } _ { j } ^ { X } ) + \Delta _ { i j } \right)
75
+ $$
76
+
77
+ Accordingly, every care taken to minimize $\mathcal { H }$ -divergences or $\Delta _ { i j }$ (e.g. using the class-wise contrastive losses (Motiian et al., 2017)) improves the above upper bound. An alternative bound of the classifier imbalance can be obtained by using the $\mathcal { H } \Delta \mathcal { H }$ -divergence (proposition 3, and corollaries 4, 5 for the 2-domain case in Appendix).
78
+
79
+ # 3.2 MULANN: MULTI-DOMAIN ADVERSARIAL LEARNING
80
+
81
+ As pointed out by e.g. Pei et al. (2018), when minimizing the $\mathcal { H }$ -divergence between two domains, a negative transfer can occur in the case of class asymmetry, when domains involve distinct sets of classes. For instance, if a domain has unlabeled samples from a class which is not present in the other domains, both global (Ganin et al., 2016) and class-wise (Pei et al., 2018) domain alignments will likely deteriorate at least one of the domain risks by putting the unlabeled samples close to labeled ones from the same domain. A similar issue arises if a domain has no (labeled or unlabeled) samples in classes which are represented in other domains. In general, unlabeled samples are only subject to constraints from the domain discriminator, as opposed to labeled samples. Thus, in the case of class asymmetry, domain alignment will tend to shuffle unlabeled samples more than labeled ones.
82
+
83
+ This limitation is addressed in MULANN by defining a new discrimination task referred to as Known Unknown Discrimination (KUD). Let us assume that, in each domain, a fraction $p ^ { \star }$ of unlabeled samples comes from extra classes, i.e. classes with no labeled samples within the domain. KUD aims at discriminating, within each domain, labeled samples from unlabeled ones that most likely belong to such extra classes. More precisely, unlabeled samples of each domain are ranked according to the entropy of their classification according to the current classifier, restricted to their domain classes.
84
+
85
+ ![](images/3a4b4482f539a2cf61c6f5fcb8eb9d05f01b2d38ddf0b23928314a307211d7fc.jpg)
86
+ Figure 1: Left: MULANN architecture. GRL: gradient reversal layer from Ganin et al. (2016). Right: impact of parameter $p$ in comparison with the groundtruth $p ^ { \star }$ on MNIST MNIST-M. $p = 0$ corresponds to DANN: no data flowed through the KUD module (see text for details).
87
+
88
+ ![](images/635e055cfedea56131514faa6d7078a3a4c41e77ccc3b5f162b685936bbfc650.jpg)
89
+
90
+ Introducing the hyper-parameter $p$ , the top $p \%$ examples according to this classification entropy are deemed "most likely unknown", and thus discriminated from the labeled ones of the same domain. The KUD module aims at repulsing the most likely unknown unlabeled samples from the labeled ones within each domain (Fig. 1), thus resisting the contractive effects of global domain alignment.
91
+
92
+ Overall, MULANN involves $3 { + } n ^ { \prime }$ interacting modules, where $n ^ { \prime }$ is the number of domains with unlabeled data. The first module is the feature extractor with parameters $\theta _ { f }$ , which maps the input space $\mathcal { X }$ to some latent feature space $\Omega$ . $2 { + } n ^ { \prime }$ modules are defined on $\Omega$ : the classifier module, the domain discriminator module, and the $n ^ { \prime }$ KUD modules, with respective parameters $\theta _ { c }$ , $\theta _ { d }$ and $( \theta _ { u , i } ) _ { i }$ . All modules are simultaneously learned by minimizing loss $\mathcal { L } ( \theta _ { f } , \theta _ { c } , \theta _ { d } , \theta _ { u } )$ :
93
+
94
+ $$
95
+ \mathcal { L } ( \theta _ { f } , \theta _ { c } , \theta _ { d } , \theta _ { u } ) = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \left( \mathcal { L } _ { c } ^ { i } ( \theta _ { f } , \theta _ { c } ) - \lambda \mathcal { L } _ { d } ^ { i } ( \theta _ { f } , \theta _ { d } ) \right) + \frac { \zeta } { n ^ { \prime } } \sum _ { j = 1 } ^ { n ^ { \prime } } \mathcal { L } _ { u } ^ { j } ( \theta _ { f } , \theta _ { u , j } )
96
+ $$
97
+
98
+ where $\zeta$ and $\lambda$ are hyper-parameters, $\mathcal { L } _ { c } ^ { i } ( \theta _ { f } , \theta _ { c } )$ is the empirical classification loss on labeled examples in $S _ { i }$ , $\mathcal { L } _ { d } ^ { i } ( \theta _ { f } , \theta _ { d } )$ is the domain discrimination loss (multi-class cross-entropy loss of classifying examples from $S _ { i }$ in class $\romannumeral 1$ ), and $\mathcal { L } _ { u } ^ { i } ( \theta _ { f } , \theta _ { u , i } )$ is the KUD loss (binary cross-entropy loss of discriminating labelled samples from $S _ { i }$ from the "most likely unknown" unlabelled samples from $S _ { i }$ ).
99
+
100
+ The loss minimization aims to find a saddle point $( \hat { \theta } _ { f } , \hat { \theta } _ { y } , \hat { \theta } _ { d } , \hat { \theta } _ { u } )$ , achieving an equilibrium between the classification performance, the discrimination among domains (to be prevented) and the discrimination among labeled and some unlabeled samples within each domain (to be optimized). The sensitivity w.r.t. hyperparameter $p$ will be discussed in Sec. 4.3.
101
+
102
+ # 4 EXPERIMENTAL VALIDATION
103
+
104
+ This section reports on the experimental validation of MULANN in DA and MDL settings on three image datasets (Sec. 4.2), prior to analyzing MULANN and investigating the impact of class asymmetry on model performances (Sec. 4.3).
105
+
106
+ # 4.1 IMPLEMENTATION
107
+
108
+ Datasets The DA setting considers three benchmarks: DIGITS, including the well-known MNIST and MNIST-M (Le Cun et al., 1998; Ganin et al., 2016); Synthetic road signs and German traffic sign benchmark (Chigorin et al., 2012; Stallkamp et al., 2012) and OFFICE (Saenko et al., 2010). The MDL setting considers the new CELL benchmark, which is made of fluorescence microscopy images of cells (detailed in Appendix C). Each image contains tens to hundreds of cells that have been exposed to a given chemical compound, in three domains: California (C), Texas (T) and England (E). There are 13 classes across the three domains (Appendix, Fig. 2); a drug class is a group of compounds targeting a similar known biological process, e.g. DNA replication. Four domain shifts are considered: $C { } \mathrm { T } ,$ $\mathrm { T } { } \mathrm { E }$ , $\mathrm { E } { } \mathrm { C }$ and $\mathrm { C } \mathrm { T } \mathrm { E }$ .
109
+
110
+ Baselines and hyperparameters. In all experiments, MULANN is compared to DANN (Ganin et al., 2016) and its extension MADA (Pei et al., 2018) (that involves one domain discriminator module per class rather than a single global one). For DANN, MADA and MULANN, the same pre-trained VGG-16 architecture (Simonyan & Zisserman, 2014) from Caffe (Jia et al., 2014) is used for OFFICE and CELL2; the same small convolutional network as Ganin et al. (2016) is used for DIGITS (see Appendix D.1 for details). The models are trained in Torch (Collobert et al., 2011) using stochastic gradient descent with momentum $\mathrm { \Phi } ^ { \prime } \rho = 0 . 9 \mathrm { \Phi } ,$ ). As in (Ganin et al., 2016), no hyper-parameter grid-search is performed for OFFICE results - double cross-validation is used for all other benchmarks. Hyper-parameter ranges can be found in Appendix D.2.
111
+
112
+ Semi-supervised setting. For OFFICE and CELL, we follow the experimental settings from Saenko et al. (2010). A fixed number of labeled images per class is used for one of the domains in all cases (20 for Amazon, 8 for DSLR and Webcam, 10 in CELL). For the other domain, 10 labeled images per class are used for half of the classes (15 for OFFICE, 4 for CELL). For DIGITS and RoadSigns, all labeled source train data is used, whereas labeled target data is used for half of the classes only (5 for DIGITS, 22 for RoadSigns). In DA, the evaluation is performed on all target images from the unlabeled classes. In MDL, the evaluation is performed on all source and target classes (considering labeled and unlabeled samples).
113
+
114
+ Evaluation goals. A first goal is to assess MULANN performance comparatively to the baselines. A second goal is to assess how the experimental setting impacts model performance. As domain discriminator and KUD modules can use both labeled and unlabeled images, a major question regards the impact of seeing unlabeled images during training. Two experiments are conducted to assess this impact: a) the same unlabeled images are used for training and evaluation (referred to as fully transductive setting, noted FT) ; b) some unlabeled images are used for training, and others for evaluation (referred to as non-fully transductive setting, noted NFT). (The case where no unlabeled images are used during training is discarded due to poor results).
115
+
116
+ # 4.2 EVALUATION
117
+
118
+ DA on DIGITS, RoadSigns and OFFICE. Table 1 compares MULANN with DANN and MADA (Sec. 4.1). Other baselines include: Learning from source and target examples with no transfer loss; Published results from (Motiian et al., 2017) (legend CCSA), that uses a contrastive loss to penalizes large (resp. small) distances between same (resp. different) classes and different domains in the feature space; Published results from (Tzeng et al., 2015), an extension of DANN that adds a loss on target softmax values ("soft label loss"; legend Tseng15). Overall, MULANN yields the best results, significantly improving upon the former best results on the most difficult cases, i.e., $\mathrm { D } { } \mathrm { A }$ , $\mathbf { A } { } \mathbf { D }$ or $\mathrm { W } { \to } \mathrm { A }$ . As could be expected, the fully transductive results match or significantly outperform the non-fully transductive ones. Notably, MADA performs similarly to DANN on DIGITS and RoadSigns, but worse on OFFICE; a potential explanation is that MADA is hindered as the number of classes, and thus domain discriminators, increases (respectively 10, 32 and 43 classes).
119
+
120
+ MDL on CELL. A state of the art method for fluorescence microscopy images relies on tailored approaches for quantifying changes to cell morphology (Kang et al., 2016). Objects (cells) are segmented in each image, and circa 650 shape, intensity and texture features are extracted for each object in each image. The profile of each image is defined as the vector of its Kolmogorov-Smirnov statistics, computed for each feature by comparing its distribution to that of the same feature from pooled negative controls of the same plate3. Classification in profile space is realized using linear discriminant analysis, followed by k-nearest neighbor $\mathrm { L D A + k \mathrm { - } N N }$ ) ("Baseline P" in Table 2). As a state of the art shallow approach to MDL to be applied in profile space, CORAL (Sun et al., 2016) was chosen $( " ) { } ^ { \circ } + { \mathrm { C O R A L } } "$ in Table 2). A third baseline corresponds to fine-tuning VGG-16 without any transfer loss ("Baseline NN").
121
+
122
+ Table 2 compares DANN, MADA and MULANN to the baselines, where columns 4-7 (resp. 8-9) consider raw images (resp. the profile representations).4 The fact that a profile-based baseline generally outperforms an image-based baseline was expected, as profiles are designed to reduce the impact of experimental settings (column 4 vs. 8). The fact that standard deviations tend to be larger here than for OFFICE, RoadSigns or DIGITS is explained by a higher intra-class heterogeneity; some classes comprise images from different compounds with similar but not identical biological activity. Most interestingly, MULANN and $\mathrm { P + C O R A L }$ both improve classification accuracy on unlabeled classes at the cost of a slighty worse classification accuracy for the labeled classes (in all cases but one). This is explained as reducing the divergence between domain marginals on the latent feature space prevents the classifier from exploiting dataset-dependent biases. Overall, MULANN and $\mathrm { P } +$ CORAL attain comparable results on two-domain cases, with MULANN performing significantly better in the three-domain case. Finally, MULANN matches or significantly outperforms DANN and MADA.
123
+
124
+ Table 1: Classification results on target test set in the semi-supervised DA setting (average and stdev on 5 seeds or folds). Bold: results less than 1 stdev from the best in each column. See text.
125
+
126
+ <table><tr><td colspan="2">Source Target</td><td>Mnist Mnist-M</td><td>SynSigns GTSRB</td><td>DSLR Amazon</td><td>Amazon DSLR</td><td>Webcam DSLR</td><td>DSLR Webcam</td><td>Webcam Amazon</td><td>Amazon Webcam</td><td>OFFICE average</td></tr><tr><td colspan="2">Baseline</td><td>35.6 (0.6)</td><td>85.1 (1.2)</td><td>35.5 (0.5)</td><td>58.5 (1.7)</td><td>90.9 (1.8)</td><td>90.6 (0.6)</td><td>34.4 (2.7)</td><td>55.8 (1.5)</td><td>61.0</td></tr><tr><td colspan="2">Tzeng15 CCSA</td><td></td><td></td><td>43.1 (0.2)</td><td>68.0 (0.5)</td><td>97.5 (0.1)</td><td>90.0 (0.2)</td><td>40.5 (0.2)</td><td>59.3 (0.6)</td><td>66.4</td></tr><tr><td rowspan="3">NFT</td><td>DANN</td><td>90.4 (1.1) 89.8 (1.1))</td><td></td><td>42.6 (0.6) 50.9 (2.4)</td><td>70.5 (0.6)</td><td>96.2 (0.3)</td><td>90.0 (0.2) 91.9 (0.7)</td><td>43.6 (1.0)</td><td>63.3 (0.9)</td><td>67.8</td></tr><tr><td>MADA</td><td>89.9 (0.8)</td><td>88.7 (1.0)</td><td>44.8 (3.3)</td><td>68.6 (4.9) 64.0 (3.9)</td><td>88.8 (3.2) 88.2 (4.2)</td><td>89.1 (3.4)</td><td>48.8 (3.8) 44.7 (4.8)</td><td>73.0 (2.6) 72.2 (3.1)</td><td>70.3</td></tr><tr><td>MULANN</td><td>91.5 (0.4)</td><td>92.1 (1.4)</td><td>57.6 (3.9)</td><td>75.8 (3.7)</td><td>93.3 (2.5)</td><td>89.9 (1.6)</td><td>54.9 (3.9)</td><td>76.8 (3.1)</td><td>67.2 74.7</td></tr><tr><td rowspan="3">FT</td><td>DANN</td><td>90.6 (1.2)</td><td>86.7 (0.8)</td><td>52.2 (2.2)</td><td>77.4 (2.2)</td><td>94.6 (1.2)</td><td>90.7 (1.7)</td><td>53.0 (1.9)</td><td>74.3 (2.7)</td><td>73.7</td></tr><tr><td>MADA</td><td>91.0 (1.1)</td><td>84.8 (1.6)</td><td>51.6 (2.5)</td><td>78.8 (3.6)</td><td>91.7 (1.7)</td><td></td><td>88.8 (2.3) 53.8 (2.6)</td><td>73.5 (2.2)</td><td>73.0</td></tr><tr><td>MULANN</td><td>92.7 (0.6)</td><td>89.1 (1.5)</td><td>63.9 (2.4)</td><td>81.7 (1.7)</td><td>95.4 (2.4)</td><td>89.3 (2.8)</td><td>64.2 (2.5)</td><td>80.8 (2.7)</td><td>79.2</td></tr></table>
127
+
128
+ Table 2: CELL test classification accuracy results on all domains (average and stdev on 5 folds), in the fully transductive setting (see table 5 in Appendix for non-transductive ones, and sections C.4, C.5 for details about image and class selection).
129
+
130
+ <table><tr><td>Shift</td><td>Image set #classes</td><td></td><td>Baseline NN</td><td>IDANN</td><td>MADA</td><td>MULANN</td><td>Baseline P</td><td>P+Coral</td></tr><tr><td rowspan="3">E-C</td><td>E</td><td>7</td><td>63.7 (7.0)</td><td>62.9 (7.6)</td><td>59.5 (9.5)</td><td>64.4 (8.0)</td><td>74.1 (3.9)</td><td>58.4 (6.1)</td></tr><tr><td>C lab.</td><td>4</td><td>97.0 (1.6)</td><td>86.4 (10.3)</td><td>86.1 (6.5)</td><td>82.4 (10.2)</td><td>95.4 (3.2)</td><td>86.6 (6.0)</td></tr><tr><td>C unlab.</td><td>3</td><td>0.6 (1.2)</td><td>54.4 (18.3)</td><td>33.6 (17.5)</td><td>58.4 (19.7)</td><td>25.5 (5.7)</td><td>42.2 (9.5)</td></tr><tr><td rowspan="3">C-T</td><td>C</td><td>10</td><td>90.4 (1.8)</td><td>90.0 (1.3)</td><td>87.2 (2.4)</td><td>88.0 (3.6)</td><td>96.1 (1.0)</td><td>93.8 (0.9)</td></tr><tr><td>Tlab.</td><td>7</td><td>93.8 (2.0)</td><td>93.6 (1.8)</td><td>89.2 (2.4)</td><td>90.0 (1.9)</td><td>95.2 (3.1)</td><td>93.4 (3.0)</td></tr><tr><td>Tunlab.</td><td>3</td><td>36.4 (10.7)</td><td>68.3 (6.4)</td><td>63.7 (10.4)</td><td>91.6 (5.7)</td><td>68.1 (2.1)</td><td>86.0 (7.8)</td></tr><tr><td rowspan="3">T-E</td><td>T</td><td>7</td><td>88.9 (6.6)</td><td>90.8 (3.9)</td><td>87.7 (2.1)</td><td>85.7 (6.6)</td><td>89.3 (8.7)</td><td>90.3 (3.1)</td></tr><tr><td>E lab.</td><td>4</td><td>60.0 (5.3)</td><td>59.4 (6.8)</td><td>56.5 (12.3)</td><td>54.5 (6.5)</td><td>59.4 (8.1)</td><td>50.3 (6.4)</td></tr><tr><td>E unlab.</td><td>3</td><td>19.0 (14.4)</td><td>72.7 (10.1)</td><td>56.2 (16.6)</td><td>71.7 (21.9)</td><td>32.9 (12.3)</td><td>48.1 (10.0)</td></tr><tr><td rowspan="4">C-T-E T</td><td>C</td><td>7</td><td>89.8 (3.5)</td><td>87.8 (4.6)</td><td>92.8 (1.5)</td><td>88.8 (5.2)</td><td>96.3 (1.1)</td><td>89.3 (5.0)</td></tr><tr><td></td><td>7</td><td>92.6 (2.6)</td><td>90.2 (1.2)</td><td>94.2 (2.3)</td><td>92.5 (3.0)</td><td>96.8 (2.5)</td><td>89.9 (3.1)</td></tr><tr><td>E lab.</td><td>4</td><td>62.3 (5.5)</td><td>56.7 (4.2)</td><td>53.6 (8.5)</td><td>48.1 (5.3)</td><td>57.3 (6.1)</td><td>44.4 (7.2)</td></tr><tr><td>E unlab.</td><td>3</td><td>19.9 (13.5)</td><td>49.4 (6.5)</td><td>46.5 (6.9)</td><td>79.4 (5.3)</td><td>45.5 (13.6)</td><td>62.8 (7.2)</td></tr></table>
131
+
132
+ # 4.3 ANALYSES
133
+
134
+ Two complementary studies are conducted to investigate the impact of hyperparameter $p$ and that of class asymmetry. The tSNE (van der Maaten & Hinton, 2008) visualizations of the feature space for DANN, MADA and MULANN are displayed in Appendix, Fig. 3.
135
+
136
+ Sensitivity w.r.t. the fraction $p$ of "known unknowns". MULANN was designed to counter the negative transfer that is potentially caused by class asymmetry. This is achieved through the repulsion of labeled examples in each domain from the fraction $p$ of unlabeled examples deemed to belong to extra classes (not represented in the domain). The sensitivity of MULANN performance to the value of $p$ and its difference to the ground truth $p ^ { \star }$ is investigated on MNIST MNIST-M. A first remark is that discrepancies between $p$ and $p ^ { \star }$ has no influence on the accuracy on a domain without unlabeled datapoints (Fig. 4 in Appendix). Fig. 1, right, displays the error depending on $p$ for various values of $p ^ { \star }$ . As could have been expected, it is better to underestimate than to overestimate $p ^ { \star }$ ; it is even better to slightly underestimate it than to get it right, as the entropy ranking of unlabeled examples can be perturbed by classifier errors.
137
+
138
+ Table 3: Class content per case in the asymmetry experiments
139
+
140
+ <table><tr><td>Case</td><td>Dom. 1 Lab.</td><td>Dom.2 Lab.|Unlab.</td><td></td></tr><tr><td>1</td><td>α,β</td><td>a β</td><td></td></tr><tr><td>2</td><td>a,β,</td><td>a α</td><td>B ,8</td></tr><tr><td>3</td><td>α,β</td><td></td><td>B,8</td></tr><tr><td>4</td><td>a,β,</td><td>α</td><td></td></tr></table>
141
+
142
+ ![](images/d8b54e95adcdad90c2fdbe59fb8282d7e86542c630c7f6319f0dd7da8d4002c7.jpg)
143
+ Figure 3: Impact of asymmetry in class content between domains on OFFICE $( \mathsf { W } { \to } \mathbf { A } )$ for DANN, MADA and MULANN. See text for details. Better seen in color.
144
+
145
+ Impact of class/domain asymmetry. Section 4.2 reports on the classification accuracy when all classes are represented in all domains of a given shift. In the general case however, the classes represented by the unlabeled examples are unknown, hence there might exist "orphan" classes, with labeled or unlabeled samples, unique to a single domain. The impact of such orphan classes, referred to as class asymmetry, is investigated in the 2-domain case. Four types of samples are considered (Table 3): A class might have labeled examples in both domains $( \alpha )$ , labeled in one domain and unlabeled in the other domain $( \beta )$ , labeled in one domain and absent in the other one (orphan $\gamma$ ), and finally unlabeled in one domain and absent in the other one (orphan $\delta$ ). The impact of the class asymmetry is displayed on Fig. 3, reporting the average classification accuracy of $\alpha , \beta$ classes on domain 1 on the $\mathbf { X }$ -axis, and classification accuracy of unlabeled $\beta$ classes on domain 2 on the y-axis, for MULANN, DANN and MADA on OFFICE (on CELL in Fig. 5, Appendix).
146
+
147
+ A clear trend is that adding labeled orphans $\gamma$ (case $" 2 "$ , Fig. 3) entails a loss of accuracy for all algorithms compared to the no-orphan reference (case "1"). This is explained as follows: on the one hand, the $\gamma$ samples are subject to the classifier pressure as all labeled samples; on the other hand, they must be shuffled with samples from domain 2 due to the domain discriminator(s) pressure. Thus, the easiest solution is to shuffle the unlabeled $\beta$ samples around, and the loss of accuracy on these $\beta$ samples is very significant (the $" 2 "$ is lower on the $y$ -axis compared to "1" for all algorithms). The perturbation is less severe for the labeled $( \alpha , \beta )$ samples in domain 1, which are preserved by the classifier pressure $x$ -axis).
148
+
149
+ The results in case $" 3 "$ are consistent with the above explanation: since the unlabeled $\delta$ samples are only seen by the discriminator(s), their addition has little impact on either the labeled or unlabeled data classification accuracy (Figs. 3 and 5). Finally, there is no clear trend in the impact of both labeled and unlabeled orphans (case "4"): labeled $( \alpha , \beta )$ (resp. unlabeled $\beta$ ) are only affected for MADA on CELL (resp. MULANN on OFFICE). Overall, these results show that class asymmetry matters for practical applications of transfer learning, and can adversely affect all three adversarial methods (Figs. 3 and 5), with asymmetry in labeled class content ("2") being the most detrimental to model performance.
150
+
151
+ # 5 DISCUSSION AND FURTHER WORK
152
+
153
+ This paper extends the use of domain adversarial learning to multi-domain learning, establishing how the $\mathcal { H }$ -divergence can be used to bound both the risk across all domains and the worst-domain risk (imbalance on a specific domain). The stress is put on the notion of class asymmetry, that is, when some domains contain labeled or unlabeled examples of classes not present in other domains. Showing the significant impact of class asymmetry on the state of the art, this paper also introduces MULANN, where a new loss is meant to resist the contractive effects of the adversarial domain discriminator and to repulse (a fraction of) unlabeled examples from labeled ones in each domain.
154
+
155
+ The merits of the approach are satisfactorily demonstrated by comparison to DANN and MADA on DIGITS, RoadSigns and OFFICE, and results obtained on the real-world CELL problem establish a new baseline for the microscopy image community.
156
+
157
+ A perspective for further study is to bridge the gap between the proposed loss and importance sampling techniques, iteratively exploiting the latent representation to identify orphan samples and adapt the loss while learning. Further work will also focus on how to identify and preserve relevant domain-specific behaviours while learning in a domain adversarial setting (e.g., if different cell types have distinct responses to the same class of perturbations).
158
+
159
+ # ACKNOWLEDGMENTS
160
+
161
+ This work was supported by NIH RO1 CA184984 (LFW), R01GM112690 (SJA) and the Institute of Computational Health Sciences at UCSF (SJA and LFW). We thank the Shoichet lab (UCSF) for access to their GPUs and Theresa Gebert for suggestions and feedback.
162
+
163
+ # REFERENCES
164
+
165
+ D. Michael Ando, Cory McLean, and Marc Berndl. Improving phenotypic measurements in high-content imaging screens. bioRxiv, 2017. doi: 10.1101/161422. URL https://www.biorxiv.org/content/ early/2017/07/10/161422.
166
+ Asha Anoosheh, Eirikur Agustsson, Radu Timofte, and Luc Van Gool. Combogan: Unrestrained scalability for image domain translation. CoRR, abs/1712.06909, 2017.
167
+ Tugkan Batu, Lance Fortnow, Ronitt Rubinfeld, Warren D. Smith, and Patrick White. Testing that distributions are close. In 41st Annual Symposium on Foundations of Computer Science, FOCS 2000, 12-14 November 2000, Redondo Beach, California, USA, pp. 259–269, 2000. doi: 10.1109/SFCS.2000.892113. URL https://doi.org/10.1109/SFCS.2000.892113.
168
+ C. Becker, C. M. Christoudias, and P. Fua. Domain adaptation for microscopy imaging. IEEE Trans Med Imaging, 34(5):1125–1139, May 2015.
169
+ Shai Ben-David, John Blitzer, Koby Crammer, and Fernando Pereira. Analysis of representations for domain adaptation. In Proceedings of the 19th International Conference on Neural Information Processing Systems, NIPS’06, pp. 137–144, Cambridge, MA, USA, 2006. MIT Press. URL http://dl.acm.org/ citation.cfm?id $= _ { c } ^ { \prime }$ 2976456.2976474.
170
+ Shai Ben-David, John Blitzer, Koby Crammer, Alex Kulesza, Fernando Pereira, and Jennifer Wortman Vaughan. A theory of learning from different domains. Machine Learning, 79(1):151–175, May 2010.
171
+ Róger Bermúdez-Chacón, Carlos Becker, Mathieu Salzmann, and Pascal Fua. Scalable unsupervised domain adaptation for electron microscopy. In Sebastien Ourselin, Leo Joskowicz, Mert R. Sabuncu, Gozde Unal, and William Wells (eds.), Medical Image Computing and Computer-Assisted Intervention – MICCAI 2016, pp. 326–334, Cham, 2016. Springer International Publishing. ISBN 978-3-319-46723-8.
172
+ Steffen Bickel, Michael Brückner, and Tobias Scheffer. Discriminative learning for differing training and test distributions. In Proceedings of the 24th International Conference on Machine Learning, ICML ’07, pp. 81–88, New York, NY, USA, 2007. ACM. ISBN 978-1-59593-793-3. doi: 10.1145/1273496.1273507. URL http://doi.acm.org/10.1145/1273496.1273507.
173
+ A. Birmingham, L. M. Selfors, T. Forster, D. Wrobel, C. J. Kennedy, E. Shanks, J. Santoyo-Lopez, D. J. Dunican, A. Long, D. Kelleher, Q. Smith, R. L. Beijersbergen, P. Ghazal, and C. E. Shamu. Statistical methods for analysis of high-throughput RNA interference screens. Nat. Methods, 6(8):569–575, Aug 2009.
174
+ K. M. Borgwardt, A. Gretton, M. J. Rasch, H. P. Kriegel, B. Scholkopf, and A. J. Smola. Integrating structured biological data by Kernel Maximum Mean Discrepancy. Bioinformatics, 22(14):49–57, Jul 2006.
175
+ Konstantinos Bousmalis, George Trigeorgis, Nathan Silberman, Dilip Krishnan, and Dumitru Erhan. Domain separation networks. CoRR, abs/1608.06019, 2016. URL http://arxiv.org/abs/1608.06019.
176
+ Olivier Bousquet and André Elisseeff. Stability and generalization. Journal of Machine Learning Research, 2: 499–526, 2002.
177
+ P. D. Caie, R. E. Walls, A. Ingleston-Orme, S. Daya, T. Houslay, R. Eagle, M. E. Roberts, and N. O. Carragher. High-content phenotypic profiling of drug response signatures across distinct cancer cells. Mol. Cancer Ther., 9(6):1913–1926, Jun 2010.
178
+
179
+ Zhangjie Cao, Mingsheng Long, Jianmin Wang, and Michael I. Jordan. Partial transfer learning with selective adversarial networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018.
180
+
181
+ Alexander Chigorin, Gleb Krivovyaz, Alexander Velizhev, and Anton Konushin. A method for traffic sign detection in an image with learning from synthetic data. In 14th International Conference Digital Signal Processing and its Applications, volume 2, pp. 316–319, 2012. URL http://graphics.cs.msu.ru/ files/papers/dspa2012_chigorin_ts_recognition.pdf.
182
+
183
+ Yunjey Choi, Minje Choi, Munyoung Kim, Jung-Woo Ha, Sunghun Kim, and Jaegul Choo. Stargan: Unified generative adversarial networks for multi-domain image-to-image translation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018.
184
+
185
+ R. Collobert, K. Kavukcuoglu, and C. Farabet. Torch7: A matlab-like environment for machine learning. In BigLearn, NIPS Workshop, 2011.
186
+
187
+ N. Courty, R. Flamary, D. Tuia, and A. Rakotomamonjy. Optimal transport for domain adaptation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39(9):1853–1865, Sept 2017. ISSN 0162-8828. doi: 10.1109/TPAMI.2016.2615921.
188
+
189
+ Bharath Bhushan Damodaran, Benjamin Kellenberger, Rémi Flamary, Devis Tuia, and Nicolas Courty. Deepjdot: Deep joint distribution optimal transport for unsupervised domain adaptation. CoRR, abs/1803.10081, 2018. URL http://arxiv.org/abs/1803.10081.
190
+
191
+ Hal Daumé III and Daniel Marcu. Domain adaptation for statistical classifiers. J. Artif. Intell. Res., 26:101–126, 2006.
192
+
193
+ Mark Dredze, Alex Kulesza, and Koby Crammer. Multi-domain learning by confidence-weighted parameter combination. Machine Learning, 79(1):123–149, May 2010. ISSN 1573-0565. doi: 10.1007/s10994-009-5148-0. URL https://doi.org/10.1007/s10994-009-5148-0.
194
+
195
+ Basura Fernando, Tatiana Tommasi, and Tinne Tuytelaars. Joint cross-domain classification and subspace learning for unsupervised adaptation. Pattern Recognition Letters, 65:60–66, 2015. doi: 10.1016/j.patrec. 2015.07.009. URL https://doi.org/10.1016/j.patrec.2015.07.009.
196
+
197
+ Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. Journal of Machine Learning Research, 17(59):1–35, 2016. URL http://jmlr.org/papers/v17/15-239.html.
198
+
199
+ Muhammad Ghifary, W. Bastiaan Kleijn, Mengjie Zhang, David Balduzzi, and Wen Li. Deep reconstructionclassification networks for unsupervised domain adaptation. In Computer Vision - ECCV, pp. 597–613, 2016.
200
+
201
+ Boqing Gong, Kristen Grauman, and Fei Sha. Connecting the dots with landmarks: Discriminatively learning domain-invariant features for unsupervised domain adaptation. In Proceedings of the 30th International Conference on International Conference on Machine Learning - Volume 28, ICML’13, pp. I–222–I–230. JMLR.org, 2013. URL http://dl.acm.org/citation.cfm?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ 3042817.3042844.
202
+
203
+ Arthur Gretton, Karsten M. Borgwardt, Malte J. Rasch, Bernhard Schölkopf, and Alexander J. Smola. A kernel method for the two-sample-problem. In NIPS, pp. 513–520. MIT Press, 2007.
204
+
205
+ Jiayuan Huang, Alexander J. Smola, Arthur Gretton, Karsten M. Borgwardt, and Bernhard Scholkopf. Correcting sample selection bias by unlabeled data. In Proceedings of the 19th International Conference on Neural Information Processing Systems, NIPS’06, pp. 601–608, Cambridge, MA, USA, 2006. MIT Press. URL http://dl.acm.org/citation.cfm?id=2976456.2976532.
206
+
207
+ Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A. Efros. Image-to-image translation with conditional adversarial networks. In CVPR, pp. 5967–5976. IEEE Computer Society, 2017.
208
+
209
+ Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014.
210
+
211
+ Eric Jones, Travis Oliphant, Pearu Peterson, et al. SciPy: Open source scientific tools for Python, 2001–. URL http://www.scipy.org/. [Online; accessed <today>].
212
+
213
+ Konstantinos Kamnitsas, Christian Baumgartner, Christian Ledig, Virginia Newcombe, Joanna Simpson, Andrew Kane, David Menon, Aditya Nori, Antonio Criminisi, Daniel Rueckert, and Ben Glocker. Unsupervised domain adaptation in brain lesion segmentation with adversarial networks. In Marc Niethammer, Martin Styner, Stephen Aylward, Hongtu Zhu, Ipek Oguz, Pew-Thian Yap, and Dinggang Shen (eds.), Information Processing in Medical Imaging, pp. 597–609, Cham, 2017. Springer International Publishing. ISBN 978-3- 319-59050-9.
214
+
215
+ J. Kang, C. H. Hsu, Q. Wu, S. Liu, A. D. Coster, B. A. Posner, S. J. Altschuler, and L. F. Wu. Improving drug discovery with high-content phenotypic screens by systematic selection of reporter cell lines. Nat. Biotechnol., 34(1):70–77, Jan 2016.
216
+
217
+ Daniel Kifer, Shai Ben-David, and Johannes Gehrke. Detecting change in data streams. In Proceedings of the Thirtieth International Conference on Very Large Data Bases - Volume 30, VLDB ’04, pp. 180–191. VLDB Endowment, 2004. ISBN 0-12-088469-0. URL http://dl.acm.org/citation.cfm?id $=$ 1316689.1316707.
218
+
219
+ Piotr Koniusz, Yusuf Tas, and Fatih Porikli. Domain adaptation by mixture of alignments of second- or higherorder scatter tensors. CoRR, abs/1611.08195, 2016. URL http://arxiv.org/abs/1611.08195.
220
+
221
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In F. Pereira, C. J. C. Burges, L. Bottou, and K. Q. Weinberger (eds.), Advances in Neural Information Processing Systems 25, pp. 1097–1105. Curran Associates, Inc., 2012. URL http://papers.nips.cc/paper/ 4824-imagenet-classification-with-deep-convolutional-neural-networks. pdf.
222
+
223
+ Y. Le Cun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, Nov 1998. ISSN 0018-9219. doi: 10.1109/5.726791.
224
+
225
+ Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), Advances in Neural Information Processing Systems 30, pp. 700–708. Curran Associates, Inc., 2017. URL http://papers.nips.cc/paper/ 6672-unsupervised-image-to-image-translation-networks.pdf.
226
+
227
+ V. Ljosa, K. L. Sokolnicki, and A. E. Carpenter. Annotated high-throughput microscopy image sets for validation. Nat. Methods, 9(7):637, Jun 2012.
228
+
229
+ Mingsheng Long, Yue Cao, Jianmin Wang, and Michael I. Jordan. Learning transferable features with deep adaptation networks. In Proceedings of the 32Nd International Conference on International Conference on Machine Learning - Volume 37, ICML’15, pp. 97–105. JMLR.org, 2015. URL http://dl.acm.org/ citation.cfm?id=3045118.3045130.
230
+
231
+ Mingsheng Long, Jianmin Wang, and Michael I. Jordan. Deep transfer learning with joint adaptation networks. CoRR, abs/1605.06636, 2016. URL http://arxiv.org/abs/1605.06636.
232
+
233
+ Mingsheng Long, Zhangjie Cao, Jianmin Wang, and Michael I. Jordan. Domain adaptation with randomized multilinear adversarial networks. CoRR, abs/1705.10667, 2017. URL http://arxiv.org/abs/1705. 10667.
234
+
235
+ Yishay Mansour. Learning and domain adaptation. In Algorithmic Learning Theory, 20th International Conference, ALT, pp. 4–6, 2009.
236
+
237
+ Yishay Mansour, Mehryar Mohri, and Afshin Rostamizadeh. Domain adaptation with multiple sources. In Proceedings of the 21st International Conference on Neural Information Processing Systems, NIPS’08, pp. 1041–1048, USA, 2008. Curran Associates Inc. ISBN 978-1-6056-0-949-2. URL http://dl.acm.org/ citation.cfm?id ${ \boldsymbol { = } } { \boldsymbol { \zeta } }$ 981780.2981910.
238
+
239
+ Saeid Motiian, Marco Piccirilli, Donald A. Adjeroh, and Gianfranco Doretto. Unified deep supervised domain adaptation and generalization. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017.
240
+
241
+ Krikamol Muandet, David Balduzzi, and Bernhard Schölkopf. Domain generalization via invariant feature representation. In Proceedings of the 30th International Conference on International Conference on Machine Learning - Volume 28, ICML’13, pp. I–10–I–18. JMLR.org, 2013. URL http://dl.acm.org/ citation.cfm?id=3042817.3042820.
242
+
243
+ Nobuyuki Otsu. A Threshold Selection Method from Gray-level Histograms. IEEE Transactions on Systems, Man and Cybernetics, 9(1):62–66, 1979. doi: 10.1109/TSMC.1979.4310076. URL http://dx.doi. org/10.1109/TSMC.1979.4310076.
244
+
245
+ S. J. Pan and Q. Yang. A survey on transfer learning. IEEE Transactions on Knowledge and Data Engineering, 22(10):1345–1359, Oct 2010. ISSN 1041-4347.
246
+
247
+ Zhongyi Pei, Zhangjie Cao, Mingsheng Long, and Jianmin Wang. Multi-adversarial domain adaptation. In Proceedings of the 32nd AAAI Conference on Artificial Intelligence, 2018. URL https://www.aaai. org/ocs/index.php/AAAI/AAAI18/paper/view/17067.
248
+
249
+ L. Y. Pratt, J. Mostow, and C. A. Kamm. Direct transfer of learned information among neural networks. In Proceedings of the Ninth National Conference on Artificial Intelligence (AAAI-91), AAAI’91, pp. 584–589. Anaheim, CA, 1991. URL https://www.aaai.org/Papers/AAAI/1991/AAAI91-091.pdf.
250
+
251
+ S. Preibisch, S. Saalfeld, and P. Tomancak. Globally optimal stitching of tiled 3D microscopic image acquisitions. Bioinformatics, 25(11):1463–1465, Jun 2009.
252
+
253
+ Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. doi: 10.1007/s11263-015-0816-y.
254
+
255
+ Kate Saenko, Brian Kulis, Mario Fritz, and Trevor Darrell. Adapting visual category models to new domains. In Kostas Daniilidis, Petros Maragos, and Nikos Paragios (eds.), Computer Vision – ECCV 2010, pp. 213–226, Berlin, Heidelberg, 2010. Springer Berlin Heidelberg. ISBN 978-3-642-15561-1.
256
+
257
+ Swami Sankaranarayanan, Yogesh Balaji, Carlos D. Castillo, and Rama Chellappa. Generate to adapt: Aligning domains using generative adversarial networks. CoRR, abs/1704.01705, 2017. URL http://arxiv.org/ abs/1704.01705.
258
+
259
+ C. A. Schneider, W. S. Rasband, and K. W. Eliceiri. NIH Image to ImageJ: 25 years of image analysis. Nat. Methods, 9(7):671–675, Jul 2012.
260
+
261
+ Gabriele Schweikert, Christian Widmer, Bernhard Schölkopf, and Gunnar Rätsch. An empirical analysis of domain adaptation algorithms for genomic sequence analysis. In Proceedings of the 21st International Conference on Neural Information Processing Systems, NIPS’08, pp. 1433–1440, USA, 2008. Curran Associates Inc. ISBN 978-1-6056-0-949-2. URL http://dl.acm.org/citation.cfm?id=2981780.2981959.
262
+
263
+ Hidetoshi Shimodaira. Improving predictive inference under covariate shift by weighting the log-likelihood function. Journal of Statistical Planning and Inference, 90(2):227–244, 2000.
264
+
265
+ Rui Shu, Hung H. Bui, Hirokazu Narui, and Stefano Ermon. A DIRT-T approach to unsupervised domain adaptation. In Proceedings of the 6th International Conference on Learning Representations (ICLR), 2018.
266
+
267
+ A. Sigal, R. Milo, A. Cohen, N. Geva-Zatorsky, Y. Klein, I. Alaluf, N. Swerdlin, N. Perzov, T. Danon, Y. Liron, T. Raveh, A. E. Carpenter, G. Lahav, and U. Alon. Dynamic proteomics in individual human cells uncovers widespread cell-cycle dependence of nuclear proteins. Nat. Methods, 3(7):525–531, Jul 2006.
268
+
269
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. URL http://arxiv.org/abs/1409.1556.
270
+
271
+ J. Stallkamp, M. Schlipsing, J. Salmen, and C. Igel. Man vs. computer: Benchmarking machine learning algorithms for traffic sign recognition. Neural Networks, pp. –, 2012. ISSN 0893-6080. doi: 10.1016/j.neunet.2012.02.016. URL http://www.sciencedirect.com/science/article/ pii/S0893608012000457.
272
+
273
+ T. Stoeger, N. Battich, M. D. Herrmann, Y. Yakimovich, and L. Pelkmans. Computer vision for image-based transcriptomics. Methods, 85:44–53, Sep 2015.
274
+
275
+ Baochen Sun and Kate Saenko. Deep coral: Correlation alignment for deep domain adaptation. In Gang Hua and Hervé Jégou (eds.), Computer Vision – ECCV 2016 Workshops, pp. 443–450, Cham, 2016. Springer International Publishing. ISBN 978-3-319-49409-8.
276
+
277
+ Baochen Sun, Jiashi Feng, and Kate Saenko. Return of frustratingly easy domain adaptation. In Proceedings of the 29th AAAI Conference on Artificial Intelligence, AAAI, 2016. URL http://arxiv.org/abs/ 1511.05547.
278
+
279
+ Yaniv Taigman, Adam Polyak, and Lior Wolf. Unsupervised cross-domain image generation. CoRR, abs/1611.02200, 2016. URL http://arxiv.org/abs/1611.02200.
280
+
281
+ E. Tzeng, J. Hoffman, T. Darrell, and K. Saenko. Simultaneous deep transfer across domains and tasks. In 2015 IEEE International Conference on Computer Vision (ICCV), pp. 4068–4076, Dec 2015. doi: 10.1109/ICCV.2015.463.
282
+
283
+ Eric Tzeng, Judy Hoffman, Ning Zhang, Kate Saenko, and Trevor Darrell. Deep domain confusion: Maximizing for domain invariance. CoRR, abs/1412.3474, 2014. URL http://arxiv.org/abs/1412.3474.
284
+
285
+ Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. CoRR, abs/1702.05464, 2017. URL http://arxiv.org/abs/1702.05464.
286
+
287
+ Francesco Vallania, Andrew Tam, Shane Lofgren, Steven Schaffert, Tej D. Azad, Erika Bongen, Meia Alsup, Michael Alonso, Mark Davis, Edgar Engleman, and Purvesh Khatri. Leveraging heterogeneity across multiple data sets increases accuracy of cell-mixture deconvolution and reduces biological and technical biases. bioRxiv, 2017. doi: 10.1101/206466. URL https://www.biorxiv.org/content/early/2017/10/20/ 206466.
288
+
289
+ Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-SNE. Journal of Machine Learning Research, 9:2579–2605, 2008. URL http://www.jmlr.org/papers/v9/vandermaaten08a. html.
290
+
291
+ Annegreet van Opbroek, M. Arfan Ikram, Meike W. Vernooij, and Marleen de Bruijne. Transfer learning improves supervised image segmentation across imaging protocols. I E E E Transactions on Medical Imaging, 34(5):1018–1030, 2015. ISSN 0278-0062. doi: 10.1109/TMI.2014.2366792.
292
+
293
+ V. N. Vapnik. Statistical Learning Theory. Wiley, 1998.
294
+
295
+ Tong Xiao, Hongsheng Li, Wanli Ouyang, and Xiaogang Wang. Learning deep feature representations with domain guided dropout for person re-identification. In Proceedings of the \*\*th Conference on Computer Vision and Pattern Recognition, CVPR’16, 2016. URL http://arxiv.org/abs/1604.07528.
296
+
297
+ Qian Xu and Qiang Yang. A Survey of Transfer and Multitask Learning in Bioinformatics. Journal of Computing Science and Engineering, August 2011.
298
+
299
+ Yongxin Yang and Timothy M. Hospedales. A unified perspective on multi-domain and multi-task learning. In Proceedings of the 3d International Conference on Representation Learning, ICLR’15, 2015.
300
+
301
+ Zili Yi, Hao (Richard) Zhang, Ping Tan, and Minglun Gong. Dualgan: Unsupervised dual learning for image-toimage translation. In ICCV, pp. 2868–2876. IEEE Computer Society, 2017.
302
+
303
+ Chao Zhang, Lei Zhang, and Jieping Ye. Generalization bounds for domain adaptation. In F. Pereira, C. J. C. Burges, L. Bottou, and K. Q. Weinberger (eds.), Advances in Neural Information Processing Systems 25, pp. 3320–3328. Curran Associates, Inc., 2012. URL http://papers.nips.cc/paper/ 4684-generalization-bounds-for-domain-adaptation.pdf.
304
+
305
+ Jing Zhang, Zewei Ding, Wanqing Li, and Philip Ogunbona. Importance weighted adversarial nets for partial domain adaptation. CoRR, abs/1803.09210, 2018. URL http://arxiv.org/abs/1803.09210.
306
+
307
+ Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, pp. 2242–2251. IEEE Computer Society, 2017.
308
+
309
+ # A EXTENDED STATE-OF-THE-ART: IMAGE TRANSLATION
310
+
311
+ In the field of computer vision, another way of mapping examples in one domain onto the other domain is image-to-image translation. In the supervised case (the true pairs made of an image and its translation are given), Pic2Pix (Isola et al., 2017) trains a conditional GAN to discriminate true pairs from fake ones. In the unsupervised case, another loss is designed to enforce cycle consistency (simultaneously learning the mapping $\phi$ from domain $A$ to $B$ , $\psi$ from $B$ to $A$ , and requiring $\phi o \psi = \mathrm { I d } )$ ) (Zhu et al., 2017; Yi et al., 2017). Note that translation approaches do not per se address domain adaptation as they are agnostic w.r.t. the classes. Additional losses are used to overcome this limitation: Domain transfer network (DTN) (Taigman et al., 2016) uses an auto-encoder-like loss in the latent space; GenToAdapt (Sankaranarayanan et al., 2017) uses a classifier loss in the latent space; UNIT (Liu et al., 2017) uses a VAE loss.
312
+
313
+ StarGAN (Choi et al., 2018) combines image-to-image translation with a GAN, where the discriminator is trained to discriminate true from fake pairs on the one hand, and the domain on the other hand. ComboGAN (Anoosheh et al., 2017) learns two networks per domain, an encoder and a decoder. DIRT-T (Shu et al., 2018) uses a conditional GAN and a classifier in the latent space, with two additional losses, respectively enforcing the cluster assumption (the classifier boundary should not cross high density region) and a virtual adversarial training (the hypothesis should be invariant under slight perturbations of the input).
314
+
315
+ Interestingly, DA and MDL (like deep learning in general) tend to combine quite some losses; two benefits are expected from using a mixture of losses, a smoother optimization landscape and a good stability of the representation (Bousquet & Elisseeff, 2002).
316
+
317
+ # B PROOFS
318
+
319
+ # B.1 DEFINITION OF THE $\mathcal { H }$ -DIVERGENCE
320
+
321
+ Definition. (Kifer et al., 2004; Ben-David et al., 2006; 2010) Given a domain $\mathcal { X }$ , two distributions $\mathcal { D }$ and $\mathcal { D } ^ { \prime }$ over that domain and a binary hypothesis class $\mathcal { H }$ on $\mathcal { X }$ , the $\mathcal { H }$ -divergence between $\mathcal { D }$ and $\mathcal { D } ^ { \prime }$ is defined as:
322
+
323
+ $$
324
+ d _ { \mathcal { H } } ( \mathcal { D } , \mathcal { D ^ { \prime } } ) = 2 \mathbf { \Pi } _ { h \in \mathcal { H } } ^ { s u p } | \mathbb { P } _ { \mathcal { D } } ( h ( \mathbf { x } ) = 1 ) - \mathbb { P } _ { \mathcal { D ^ { \prime } } } ( h ( \mathbf { x } ) = 1 ) |
325
+ $$
326
+
327
+ B.2 BOUNDING MDL LOSS USING THE $\mathcal { H }$ -DIVERGENCE
328
+
329
+ Theorem 2. Given an input space $\mathcal { X }$ , we consider n distributions $\mathcal { D } _ { i }$ over $\mathcal { X } \times \{ 0 ; 1 \}$ and a hypothesis class $\mathcal { H }$ on $\mathcal { X }$ of $V C$ dimension $d$ . Let $\alpha$ and $\gamma$ be in the simplex of dimension $n$ . If $S$ is a sample of size m which contains $\gamma _ { i } m$ samples from $\mathcal { D } _ { i }$ , and $\hat { h }$ is the empirical minimizer of $\textstyle \sum _ { i } \alpha _ { i } { \hat { \epsilon } } _ { i }$ on $( S _ { i } ) _ { i }$ , then for any $\delta > 0$ , with probability at least $1 - \delta$ , the compound empirical error is upper bounded as:
330
+
331
+ $$
332
+ \sum _ { i } \epsilon _ { i } ( \hat { h } ) \leq \sum _ { i } \epsilon _ { i } ^ { \star } + 4 n B ( \alpha ) + 2 \sum _ { i \leq j } ( \alpha _ { i } + \alpha _ { j } ) \left( d _ { \mathcal { H } } ( \mathcal { D } _ { i } ^ { X } , \mathcal { D } _ { j } ^ { X } ) + \beta _ { i , j } \right)
333
+ $$
334
+
335
+ with
336
+
337
+ $$
338
+ B ( \alpha ) = \sqrt { \sum _ { j } \frac { \alpha _ { j } ^ { 2 } } { \gamma _ { j } } } \sqrt { \frac { 2 d \log ( 2 ( m + 1 ) ) + \log ( \frac { 4 } { \delta } ) } { m } }
339
+ $$
340
+
341
+ and
342
+
343
+ $$
344
+ \beta _ { i , j } = \underset { h \in \mathcal { H } } { m i n } ~ ( \epsilon _ { i } ( h ) + \epsilon _ { j } ( h ) )
345
+ $$
346
+
347
+ A tighter bound can be obtained by replacing $d _ { \mathcal { H } } ( \mathcal { D } _ { i } , \mathcal { D } _ { j } )$ with $\scriptstyle { \frac { 1 } { 2 } } d _ { { \mathcal { H } } \Delta { \mathcal { H } } } ( D _ { i } , D _ { j } )$ . The H∆Hdivergence (Ben-David et al., 2010) operates on the symmetric difference hypothesis space $\mathcal { H } \Delta \mathcal { H }$ . However, divergence $\mathcal { H } \Delta \mathcal { H }$ does not lend itself to empirical estimation: even Ben-David et al. (2010) fall back on $\mathcal { H }$ -divergence in their empirical validation.
348
+
349
+ Proof of theorem 2 For $i , j$ we note $\beta _ { i , j } = \epsilon _ { i } ( h _ { i , j } ^ { \star } ) + \epsilon _ { j } ( h _ { i , j } ^ { \star } ) = \underset { h \in \mathcal { H } } { m i n } \left( \epsilon _ { i } ( h ) + \epsilon _ { j } ( h ) \right)$ . For $\alpha$ in the $n$ -dimensional simplex and $h \in \mathcal H$ , we note $\begin{array} { r } { \epsilon _ { \alpha } ( h ) = \sum _ { i } \alpha _ { i } \epsilon _ { i } ( h ) } \end{array}$ .
350
+
351
+ We have for $\alpha$ in the simplex of dimension $n$ , $h \in \mathcal H$ and $j \in \{ 1 , \dots , m \}$ , using the triangle inequality (similarly to the proof of Theorem 4 in (Ben-David et al., 2010))
352
+
353
+ $$
354
+ \begin{array} { r l } { | \epsilon _ { \alpha } ( h ) - \epsilon _ { j } ( h ) | = } & { \displaystyle \left| \sum _ { i } \alpha _ { i } \left( \mathbb { E } _ { \mathbf { x } , y \sim \mathcal { D } _ { i } } | h ( \mathbf { x } ) - y | - \mathbb { E } _ { \mathbf { x } , y \sim \mathcal { D } _ { j } } | h ( \mathbf { x } ) - y | \right) \right| } \\ & { \leq \sum _ { i } \alpha _ { i } \left| \mathbb { E } _ { \mathbf { x } , y \sim \mathcal { D } _ { i } } | h ( \mathbf { x } ) - y | - \mathbb { E } _ { \mathbf { x } , y \sim \mathcal { D } _ { j } } | h ( \mathbf { x } ) - y | \right| } \\ & { \leq \displaystyle \sum _ { i } \alpha _ { i } \left| \mathbb { E } _ { \mathbf { x } , y \sim \mathcal { D } _ { i } } | h ( \mathbf { x } ) - y | - \mathbb { E } _ { \mathbf { x } \sim \mathcal { D } _ { i } } | h ( \mathbf { x } ) - h _ { i , j } ^ { \star } ( \mathbf { x } ) | \right| } \\ & { \quad \quad + \alpha _ { i } \left| \mathbb { E } _ { \mathbf { x } \sim \mathcal { D } _ { i } } | h ( \mathbf { x } ) - h _ { i , j } ^ { \star } ( \mathbf { x } ) | - \mathbb { E } _ { \mathbf { x } \sim \mathcal { D } _ { i } } | h ( \mathbf { x } ) - h _ { i , j } ^ { \star } ( \mathbf { x } ) | \right| } \\ & { \quad \quad + \alpha _ { i } \left| \mathbb { E } _ { \mathbf { x } \sim \mathcal { D } _ { j } } | h ( \mathbf { x } ) - h _ { i , j } ^ { \star } ( \mathbf { x } ) | - \mathbb { E } _ { \mathbf { x } \sim \mathcal { D } _ { j } } | h ( \mathbf { x } ) - h _ { i , j } ^ { \star } ( \mathbf { x } ) | \right| } \\ & { \quad \leq \displaystyle \sum _ { i } \alpha _ { i } \left( \beta _ { i , j } + d _ { \mathcal { H } } ( \mathcal { D } _ { i } , \mathcal { D } _ { j } ) \right) } \end{array}
355
+ $$
356
+
357
+ The last line follows from the definitions of $\beta _ { i , j }$ and $\mathcal { H }$ -divergence. Thus using lemma 6 in (Ben-David et al., 2010)
358
+
359
+ $$
360
+ \begin{array} { l } { \displaystyle \epsilon _ { j } ( \hat { h } ) \leq \epsilon _ { \alpha } ( \hat { h } ) + \sum _ { i } \alpha _ { i } \left( \beta _ { i , j } + d _ { \mathcal { H } } ( D _ { i } , \mathcal { D } _ { j } ) \right) } \\ { \leq \epsilon _ { \alpha } ( \hat { h } ) + 2 B ( \alpha ) + \sum _ { i } \alpha _ { i } \left( \beta _ { i , j } + d _ { \mathcal { H } } ( \mathcal { D } _ { i } , \mathcal { D } _ { j } ) \right) } \\ { \leq \epsilon _ { \alpha } ( h _ { j } ^ { * } ) + 2 B ( \alpha ) + \sum _ { i } \alpha _ { i } \left( \beta _ { i , j } + d _ { \mathcal { H } } ( \mathcal { D } _ { i } , \mathcal { D } _ { j } ) \right) } \\ { \leq \epsilon _ { \alpha } ( h _ { j } ^ { * } ) + 4 B ( \alpha ) + \sum _ { i } \alpha _ { i } \left( \beta _ { i , j } + d _ { \mathcal { H } } ( \mathcal { D } _ { i } , \mathcal { D } _ { j } ) \right) } \\ { \leq \epsilon _ { i } ^ { * } + 4 B ( \alpha ) + 2 \sum _ { i } \alpha _ { i } \left( \beta _ { i , j } + d _ { \mathcal { H } } ( \mathcal { D } _ { i } , \mathcal { D } _ { j } ) \right) } \end{array}
361
+ $$
362
+
363
+ with
364
+
365
+ $$
366
+ B ( \alpha ) = \sqrt { \sum _ { j } \frac { \alpha _ { j } ^ { 2 } } { \beta _ { j } } } \sqrt { \frac { 2 d \log ( 2 ( m + 1 ) ) + \log ( \frac { 4 } { \delta } ) } { m } }
367
+ $$
368
+
369
+ Hence the result.
370
+
371
+ # B.3 BOUNDING DOMAIN IMBALANCE
372
+
373
+ Proof of proposition 1 We have for $h \in \mathcal H$ and $j \in [ 1 , \ldots , m ]$ , using the triangle inequality and the definition of $\epsilon _ { i } ^ { \star }$ (similarly to the proof of Theorem 1 in (Ben-David et al., 2006))
374
+
375
+ $$
376
+ \begin{array} { r l } { \displaystyle \epsilon _ { j } ( h ) = \mathbb { P } _ { \mathbf { x } , y \sim \mathcal { D } _ { j } } ( h ( \mathbf { x } ) \neq y ) } & { } \\ { \displaystyle = \mathbb { E } _ { \mathbf { x } , y \sim \mathcal { D } _ { j } } | h ( \mathbf { x } ) - y | } & { } \\ { \displaystyle \leq \mathbb { E } _ { \mathcal { D } _ { j } ^ { x } } | h ( \mathbf { x } ) - h _ { j } ^ { \star } ( \mathbf { x } ) | + \mathbb { E } _ { \mathcal { D } _ { j } } | h _ { j } ^ { \star } ( \mathbf { x } ) - y | } & { } \\ { \displaystyle \leq \mathbb { E } _ { \mathcal { D } _ { j } ^ { x } } | h ( \mathbf { x } ) - \frac { 1 } { n } \sum _ { i } h _ { i } ^ { \star } ( \mathbf { x } ) | + \mathbb { E } _ { \mathcal { D } _ { j } ^ { x } } | \frac { 1 } { n } \sum _ { i } h _ { i } ^ { \star } ( \mathbf { x } ) - h _ { j } ^ { \star } ( \mathbf { x } ) | + \epsilon _ { j } ^ { \star } } & { } \\ { \displaystyle } & { \displaystyle \leq \frac { 1 } { n } \sum _ { i } \mathbb { E } _ { \mathcal { D } _ { j } ^ { x } } | h ( \mathbf { x } ) - h _ { i } ^ { \star } ( \mathbf { x } ) | + \frac { 1 } { n } \sum _ { i } \mathbb { E } _ { \mathcal { D } _ { j } ^ { x } } | h _ { i } ^ { \star } ( \mathbf { x } ) - h _ { j } ^ { \star } ( \mathbf { x } ) | + \epsilon _ { j } ^ { \star } } \end{array}
377
+ $$
378
+
379
+ We have for $i$
380
+
381
+ $$
382
+ \begin{array} { r l } & { \mathbb { E } _ { \mathcal { D } _ { j } ^ { X } } | h ( \mathbf x ) - h _ { i } ^ { \star } ( \mathbf x ) | \leq \mathbb { E } _ { \mathcal { D } _ { i } ^ { X } } | h ( \mathbf x ) - h _ { i } ^ { \star } ( \mathbf x ) | + | \mathbb { E } _ { \mathcal { D } _ { i } ^ { X } } | h ( \mathbf x ) - h _ { i } ^ { \star } ( \mathbf x ) | - \mathbb { E } _ { \mathcal { D } _ { j } ^ { X } } | h ( \mathbf x ) - h _ { i } ^ { \star } ( \mathbf x ) | | } \\ & { \qquad \leq \epsilon _ { i } ( h ) + \epsilon _ { i } ^ { \star } + d _ { \mathcal { H } } ( \mathcal { D } _ { i } ^ { X } , \mathcal { D } _ { j } ^ { X } ) } \end{array}
383
+ $$
384
+
385
+ The second line follows from the triangle inequality and the definition of the $\mathcal { H }$ -divergence. Thus
386
+
387
+ $$
388
+ \epsilon _ { j } ( h ) \leq \frac { 1 } { n } \sum _ { i } \Big ( \epsilon _ { i } ( h ) + \epsilon _ { i } ^ { \star } + d _ { \mathcal { H } } ( \mathcal { D } _ { i } ^ { X } , \mathcal { D } _ { j } ^ { X } ) + \mathbb { E } _ { \mathcal { D } _ { j } ^ { X } } | h _ { i } ^ { \star } ( \mathbf { x } ) - h _ { j } ^ { \star } ( \mathbf { x } ) | \Big ) + \epsilon _ { j } ^ { \star }
389
+ $$
390
+
391
+ By symmetry we obtain
392
+
393
+ $$
394
+ \frac { 1 } { n } \sum _ { i } \epsilon _ { i } ( h ) \leq \epsilon _ { j } ( h ) + \frac { 1 } { n } \sum _ { i } \Big ( \epsilon _ { i } ^ { \star } + d _ { \mathcal { H } } ( \mathcal { D } _ { i } ^ { X } , \mathcal { D } _ { j } ^ { X } ) + \mathbb { E } _ { \mathcal { D } _ { i } ^ { X } } | h _ { i } ^ { \star } ( \mathbf { x } ) - h _ { j } ^ { \star } ( \mathbf { x } ) | \Big ) + \epsilon _ { j } ^ { \star }
395
+ $$
396
+
397
+ Thus the result.
398
+
399
+ Proposition 3. Given a domain $\mathcal { X }$ , m distributions $\mathcal { D } _ { i }$ over $\mathcal { X } \times \{ 0 ; 1 \}$ and a hypothesis class $\mathcal { H }$ on $\mathcal { X }$ , we have for $h \in \mathcal H$ and $j \in [ 1 , \dots , m ]$
400
+
401
+ $$
402
+ \epsilon _ { j } ( h ) - \frac { 1 } { n } { \sum _ { i } } \epsilon _ { i } ( h ) | \leq 2 \left( \epsilon _ { j } ^ { \star } + \frac { 1 } { n } { \sum _ { i } } \epsilon _ { i } ^ { \star } \right) + \epsilon _ { j } ( h ^ { \star } ) + \beta + \frac { 1 } { n } { \sum _ { i } } d _ { \mathcal { H } } ( \mathscr { D } _ { i } ^ { X } , \mathscr { D } _ { j } ^ { X } ) + \frac { 1 } { 2 } d _ { \mathcal { H } \Delta \mathcal { H } } ( \mathscr { D } _ { i } , \mathscr { D } _ { j } )
403
+ $$
404
+
405
+ where
406
+
407
+ $$
408
+ \beta = \sum _ { j } \epsilon _ { j } ( h ^ { \star } ) = \operatorname* { m i n } _ { h \in \mathcal { H } } \sum _ { j } \epsilon _ { j } ( h )
409
+ $$
410
+
411
+ Proof For $i , j \in [ i , \dots , m ]$ we have
412
+
413
+ $$
414
+ \begin{array} { r l } & { \mathbb { E } _ { \mathcal { D } _ { i } } \lvert h _ { i } ^ { \star } ( \mathbf { x } ) - h _ { j } ^ { \star } ( \mathbf { x } ) \rvert \le \mathbb { E } _ { \mathcal { D } _ { i } } \lvert h _ { j } ^ { \star } ( \mathbf { x } ) - h ^ { \star } ( \mathbf { x } ) \rvert + \mathbb { E } _ { \mathcal { D } _ { i } } \lvert h ^ { \star } ( \mathbf { x } ) - h _ { i } ^ { \star } ( \mathbf { x } ) \rvert } \\ & { \qquad \le \mathbb { E } _ { \mathcal { D } _ { j } } \lvert h _ { j } ^ { \star } ( \mathbf { x } ) - h ^ { \star } ( \mathbf { x } ) \rvert + \frac { 1 } { 2 } d _ { \mathcal { H } \Delta \mathcal { H } } ( \mathcal { D } _ { i } , \mathcal { D } _ { j } ) + \epsilon _ { i } ( h ^ { \star } ) + \epsilon _ { i } ^ { \star } } \\ & { \qquad \le \epsilon _ { i } ( h ^ { \star } ) + \epsilon _ { j } ( h ^ { \star } ) + \epsilon _ { i } ^ { \star } + \epsilon _ { j } ^ { \star } + \frac { 1 } { 2 } d _ { \mathcal { H } \Delta \mathcal { H } } ( \mathcal { D } _ { i } , \mathcal { D } _ { j } ) } \end{array}
415
+ $$
416
+
417
+ The second line follows from Lemma 3 from (Ben-David et al., 2010), and the third from the triangle inequality. From this and proposition 1 we obtain the result. 
418
+
419
+ # Corollaries for the 2-domain case
420
+
421
+ Corollary 4. Given a domain $\mathcal { X }$ , two distributions $\mathcal { D } _ { S }$ and $\mathcal { D } _ { T }$ over $\mathcal { X } \times \{ 0 , 1 \}$ and a hypothesis class $\mathcal { H }$ on $\mathcal { X }$ , we have for $h \in \mathcal H$
422
+
423
+ $$
424
+ \begin{array} { c } { \left. \epsilon _ { S } ( h ) - \epsilon _ { T } ( h ) \right. \leq \epsilon _ { T } ^ { \star } + \epsilon _ { S } ^ { \star } + \Delta + d _ { \mathcal { H } } ( \mathcal { D } _ { S } ^ { X } , \mathcal { D } _ { T } ^ { X } ) } \\ { \Delta = m a x ( E _ { \mathcal { D } _ { T } ^ { X } } | { h } _ { S } ^ { \star } ( { \bf x } ) - { h } _ { T } ^ { \star } ( { \bf x } ) | , E _ { \mathcal { D } _ { S } ^ { X } } | { h } _ { S } ^ { \star } ( { \bf x } ) - { h } _ { T } ^ { \star } ( { \bf x } ) | ) } \end{array}
425
+ $$
426
+
427
+ Corollary 5. Given a domain $\mathcal { X }$ , two distributions $\mathcal { D } _ { S }$ and $\mathcal { D } _ { T }$ over $\mathcal { X } \times \{ 0 ; 1 \}$ and a hypothesis class $\mathcal { H }$ on $\mathcal { X }$ , we have for $h \in \mathcal H$
428
+
429
+ $$
430
+ \begin{array} { r } { | \epsilon _ { S } ( h ) - \epsilon _ { T } ( h ) | \le 2 ( \epsilon _ { T } ^ { \star } + \epsilon _ { S } ^ { \star } ) + \beta + \frac 1 2 d _ { \mathcal { H } \Delta \mathcal { H } } ( \mathcal { D } _ { S } , \mathcal { D } _ { T } ) + d _ { \mathcal { H } } ( \mathcal { D } _ { S } ^ { X } , \mathcal { D } _ { T } ^ { X } ) } \end{array}
431
+ $$
432
+
433
+ where
434
+
435
+ $$
436
+ \beta = \epsilon _ { S } ( h ^ { \star } ) + \epsilon _ { T } ( h ^ { \star } ) = \underset { h \in \mathcal { H } } { m i n } \epsilon _ { S } ( h ) + \epsilon _ { T } ( h )
437
+ $$
438
+
439
+ # C CELL DATASET
440
+
441
+ # C.1 TEXAS DOMAIN
442
+
443
+ This dataset is extracted from that published in (Kang et al., 2016). It contains 455 biologically active images, in 11 classes, on four 384-well plates, in three channels: H2B-CFP, XRCC5-YFP and cytoplasmic-mCherry. Our analysis used 10 classes: ’Actin’, ’Aurora’, ’DNA’, ’ER’, ’HDAC’, ’Hsp90’, ’MT’, ’PLK’, ’Proteasome’, ’mTOR’.
444
+
445
+ On top of the quality control from the original paper, a visual quality control was implemented to remove images with only apoptotic cells, and XRCC5-YFP channel images were smoothed using a median filter of size 2 using SciPy (Jones et al., 2001–).
446
+
447
+ ![](images/e954feef091722ae00bd5f3fd6a0e3710514721a1ebd1a5f3d3f6f3e2d90ce8c.jpg)
448
+ Figure 2: Examples from six classes in the Bio dataset (red: cell nuclei, blue: cell cytoplasm, magnification: 10X). Empty squares: the domain does not contain any known examples from this class. Best seen in color.
449
+
450
+ # C.2 CALIFORNIA DOMAIN
451
+
452
+ This dataset is designed to be similar to the Texas domain (Kang et al., 2016), generated using the same cell line, but in a different laboratory, by a different biologist, and using different equipment. It contains 1,077 biologically active images, in 10 classes, on ten 384-well plates, in three channels: H2B-CFP, XRCC5-YFP and cytoplasmic-mCherry. The classes are: ’Actin’, ’Aurora’, ’DNA’, ’ER’, ’HDAC’, ’Hsp90’, ’MT’, ’PLK’, ’Proteasome’, ’mTOR’.
453
+
454
+ Cell culture, drug screening and image acquisition Previously (Kang et al., 2016), retroviral transduction of a marker plasmid "pSeg" was used to stably express H2B-CFP and cytoplasmicmCherry tags in A549 human lung adenocarcinoma cells. A CD-tagging approach (Sigal et al., 2006) was used to add an N-terminal YFP tag to endogenous XRCC5.
455
+
456
+ Cells were maintained in RPMI1640 media containing $10 \%$ FBS, $2 \ \mathrm { m M }$ glutamine, 50 units/ml penicillin, and $5 0 ~ \mu \mathrm { g / m l }$ streptomycin (all from Life Technologies, Inc.), at $3 7 ^ { \circ } C$ $C , 5 \% \mathrm { C O ^ { 2 } }$ and $100 \%$ humidity. 24h prior to drug addition, cells were seeded onto 384-well plate at a density of 1200 cells/well. Following compound addition, cells were incubated at $3 7 ^ { \circ } C$ for 48 hours. Images were then acquired using a GE InCell Analyzer 2000. One image was acquired per well using a $1 0 \mathrm { x }$ objective lens with $2 \mathbf { x } 2$ binning.
457
+
458
+ Image processing Uneven illumination was corrected as described in (Stoeger et al., 2015). Background noise was removed using the ImageJ RollingBall plugin (Schneider et al., 2012). Images were segmented, object features extracted and biological activity determined as previously described (Kang et al., 2016). A visual quality control was implemented to remove images with obvious anomalies (e.g. presence of a hair or out-of-focus image) and images with only apoptotic cells. YFP-XRCC5 channel images were smoothed using a median filter of size 2.
459
+
460
+ # C.3 ENGLAND DOMAIN
461
+
462
+ This dataset was published by Caie et al. (2010) and retrieved from (Ljosa et al., 2012). It contains 879 biologically active images of MCF7 breast adenocarcinoma cells, in 15 classes on 55 96-well plates, in 3 channels: Alexa Fluor 488 (Tubulin), Alexa Fluor 568 (Actin) and DAPI (nuclei). Classes with fewer than 15 images and absent from the other datasets ("Calcium regulation", "Cholesterol", "Epithelial", "MEK", "mTOR") were not used, which leaves 10 classes: ’Actin’, ’Aurora’, ’DNA’, ’ER’, ’Eg5 inhibitor’, ’HDAC’, ’Kinase’, ’MT’, ’Proteasome’, ’Protein synthesis’.
463
+
464
+ Image processing As the images were acquired using a 20X objective, they were stitched using ImageJ plugin (Preibisch et al., 2009) and down-scaled 2 times. Cells thus appear the same size as in the other domains. Images were segmented, object features extracted and biological activity obtained as previously described (Kang et al., 2016). A visual quality control was implemented to remove images with obvious anomalies and images with only apoptotic cells. Images with too few cells were also removed: an Otsu filter (Otsu, 1979) was used to estimate the percentage of pixels containing nuclei in each image, and images with less than $1 \%$ nuclear pixels were removed. Tubulin channel images were smoothed using a median filter of size 2.
465
+
466
+ # C.4 COMMON IMAGE PRE-PROCESSING
467
+
468
+ Images which were not significantly distinct from negative controls were identified as previously (Kang et al., 2016) and excluded from our analysis. Previous work on the England dataset further focused on images which "clearly [have] one of 12 different primary mechanims of action" (Ljosa et al., 2012). We chose not to do so, since it results in a simpler problem $90 \%$ accuracy easy to reach) with much less room for improvement.
469
+
470
+ Images from all domains were down-scaled 4 times and flattened to form RGB images. Images were normalized by subtracting the intensity values from negative controls (DMSO) of the same plate in each channel. England, Texas and California share images for cell nucleus and cytoplasm, but their third channel differs: Texas and California shows the protein XRCC5, whereas England shows the Actin protein. Therefore, the experiments which combine Texas and England, and California and England used only the first two channels, feeding an empty third channel into the network. Similarly, profiles contain 443 features which are related to the first two channels, and 202 features which are related to the third channel. Only the former were used in experiments which involve the England dataset.
471
+
472
+ C.5 SEMI-SUPERVISED MDL EXPERIMENTS
473
+
474
+ <table><tr><td>Shift</td><td>Dom.2,labeled classes</td><td>Domain 2,unlabeled classes</td></tr><tr><td>E-C</td><td>HDAC, Proteasome,Actin,Aurora</td><td>DNA,MT, ER</td></tr><tr><td>C-T</td><td>DNA,HDAC,MT,ER,Aurora,mTOR,PLK</td><td>Actin,Proteasome,Hsp90</td></tr><tr><td>T-E</td><td>DNA,MT,Proteasome,Actin,ER</td><td>Aurora, HDAC,Actin</td></tr><tr><td>C-T-E</td><td>DNA,MT, Proteasome,Actin, ER</td><td>Aurora,HDAC,Actin</td></tr></table>
475
+
476
+ Table 3: Class content for the CELL experiments in table 2. In all cases, the first domain contains the same classes as domain 2, though with labeled examples from all classes. These classes were picked as those with best classification accuracy in an unsupervised setting; results are similar when picking the classes with worst classification accuracy. 10 labeled images per class were used for training.
477
+
478
+ # D EXPERIMENTAL SETTINGS
479
+
480
+ # D.1 ARCHITECTURE
481
+
482
+ As in (Ganin et al., 2016; Tzeng et al., 2014), a bottleneck fully connected layer is added after the last dense layer of VGG-16. Learning rates on weights (resp. biases) from "from scratch" layers is ten (resp, twenty) times that on parameters of fine-tuned layers. Instance normalization is used on DIGITS, whereas global normalization is used on OFFICE and CELL.
483
+
484
+ Table 4: Architectures. In the case when considering only two domains, $i = 1$ and the last activation of domain discriminators is a sigmoid. When considering three domains, $i = 3$ and the activation is a softmax. Knowledge discriminator architecture is identical to that of domain discriminators without the gradient reversal layer.
485
+
486
+ <table><tr><td>OFFICE and CELL</td><td>DIGITS</td></tr><tr><td colspan="2">Feature extractor</td></tr><tr><td>VGG-16, layers Conv1 to FC7</td><td>5x5 conv. 32; ReLU; 2x2 max pool, 2x2 stride</td></tr><tr><td>Fully connected 256</td><td>5x5 conv. 48; ReLU; 2x2 max pool, 2x2 stride</td></tr><tr><td colspan="2">Classifier</td></tr><tr><td>Output of feature extractor</td><td>Output of feature extractor</td></tr><tr><td></td><td>Fully connected 10o; ReLU Fully connected 10o; ReLU</td></tr><tr><td>Fully connected L; Softmax</td><td>Fully connected L; Softmax</td></tr><tr><td colspan="2">Domain discriminator</td></tr><tr><td>Output of feature extractor Gradient reversal layer Fully connected 1,024; ReLU; Dropout (0.5)</td><td>Output of feature extractor Gradient reversal layer</td></tr></table>
487
+
488
+ D.2 HYPER-PARAMETER SEARCH
489
+
490
+ <table><tr><td>Parameter</td><td>DIGITS and Signs</td><td>CELL</td></tr><tr><td>Learning rate (lr)</td><td>10-3,10-4</td><td>10-4 (+ 10-5 for 3-dom.)</td></tr><tr><td>Individual lr</td><td>NA</td><td>True,False</td></tr><tr><td>Lr schedule 入</td><td></td><td>Exponentially decreasing, constant 0.1,0.8</td></tr><tr><td>入schedule</td><td></td><td>Exponentially increasing,constant</td></tr><tr><td></td><td></td><td></td></tr><tr><td>s</td><td></td><td>0.1,0.8</td></tr></table>
491
+
492
+ Table 5: Range of hyper-parameters which were evaluated in cross-validation experiments. Exponentially decreasing schedule, exponentially increasing schedule, indiv. lr (learning rates from layers which were trained from scratch are multiplied by 10), as in (Ganin et al., 2016).
493
+
494
+ # E ADDITIONAL RESULTS
495
+
496
+ # E.1 3-DOMAIN RESULTS ON OFFICE
497
+
498
+ Table 6: Classification results on target test set in the semi-supervised DA setting (average and stdev on 5 seeds or folds)
499
+
500
+ <table><tr><td>Sources Target</td><td>D,W Amazon</td><td>A,W DSLR</td><td>A,D Webcam</td></tr><tr><td>Baseline DANN FT MADA MULANN</td><td>41.7 (1.0) 57.5 (1.6) 37.5 (6.8) 54.5 (3.8)</td><td>90.9 (1.3) 92.3 (1.8) Not conv. 92.1 (2.6)</td><td>89.4 (1.5) 91.2 (0.7) 88.3 (0.7) 92.0 (1.0)</td></tr></table>
501
+
502
+ ![](images/bbf8caa4824152a7f56d0487f4b86f0f935e8869490fdbfa330a21a6ca402e84.jpg)
503
+ Figure 3: Visualization of class features on Webcam (red) $>$ Amazon (blue). Dimmer colors indicate classes for which labeled examples are available in both domains.
504
+
505
+ # E.2 TSNE VISUALIZATION
506
+
507
+ We use tSNE (van der Maaten & Hinton, 2008) to visualize the common feature space in the example of Webcam Amazon. Fig. 3 shows that classes are overall better separated with MULANN. In particular, when using MULANN, unlabeled examples (blue) are both more grouped and closer to labeled points from the other domain.
508
+
509
+ # E.3 SEMI-SUPERVISED MDL ON THE BIO DATASET
510
+
511
+ Table 5: CELL average test classification results on all domain (average and stdev on 5 folds). P stands for "profiles", "lab." for labeled and "unlab." for unlabeled. Baselines are obtained by training MULANN with $\lambda = 0$ (NN) and $\mathrm { L D A + k { \mathrm { - } } N N }$ (P) on both domains. Results were obtained in the non-fully transductive setting, without hyper-parameter optimization.
512
+
513
+ <table><tr><td>Shift</td><td>Image set # classes</td><td></td><td>sBaseline NN DANN</td><td></td><td>MADA</td><td>MULANN</td><td>|Baseline P</td><td>P+Coral</td></tr><tr><td rowspan="3">E-C</td><td>E</td><td>7</td><td>74.1 (5.4)</td><td>71.6 (5.8)</td><td>63.6 (6.1)</td><td>72.7 (4.0)</td><td>78.1 (8.0)</td><td>66.4 (2.4)</td></tr><tr><td>C lab.</td><td>4</td><td>98.3 (0.6)</td><td>96.1 (1.5)</td><td>92.3 (5.2)</td><td>89.1 (6.4)</td><td>98.2 (2.4)</td><td>94.1 (2.3)</td></tr><tr><td>C unlab.</td><td>3</td><td>0.4 (0.7)</td><td>34.8 (20.7)</td><td>14.5 (7.4)</td><td>25.7 (12.3)</td><td>21.5 (8.4)</td><td>36.8 (3.7)</td></tr><tr><td rowspan="3">C-T</td><td>C</td><td>10</td><td>91.4 (1.8)</td><td>87.0 (2.2)</td><td>87.9 (3.9)</td><td>89.3 (1.8)</td><td>96.1 (1.1)</td><td>93.3 (1.8)</td></tr><tr><td>Tlab.</td><td>7</td><td>93.7 (1.3)</td><td>91.0 (4.4)</td><td>86.7 (7.5)</td><td>89.2 (1.2)</td><td>96.2 (2.4)</td><td>92.8 (3.2)</td></tr><tr><td>Tunlab.</td><td>3</td><td>24.4 (10.0)</td><td>61.4 (7.7)</td><td>56.2 (14.0)</td><td>77.7 (4.0)</td><td>59.6 (11.3)</td><td>87.6 (8.2)</td></tr><tr><td rowspan="3">T-E</td><td>T</td><td>7</td><td>95.2 (2.2)</td><td>90.3 (5.4)</td><td>93.7 (3.0)</td><td>88.2 (6.4)</td><td>94.2 (6.3)</td><td>92.6 (4.0)</td></tr><tr><td>E lab.</td><td>4</td><td>75.2 (9.7)</td><td>61.9 (8.5)</td><td>71.0 (12.7)</td><td>72.8 (14.2)</td><td>81.1 (8.8)</td><td>61.2 (4.0)</td></tr><tr><td>Eunlab.</td><td>3</td><td>5.7 (6.6)</td><td>31.4 (17.5)</td><td>26.0 (19.4)</td><td>51.3 (13.5)</td><td>16.1 (9.5)</td><td>25.7 (12.6)</td></tr><tr><td rowspan="4">C-T-E T</td><td>C</td><td>7</td><td>94.7 (2.0)</td><td>91.7 (1.4)</td><td>82.7 (3.8)</td><td>93.9 (1.7)</td><td>94.1 (2.0)</td><td>89.4 (2.2)</td></tr><tr><td></td><td>7</td><td>94.8 (2.1)</td><td>93.7 (4.7)</td><td>86.5 (4.2)</td><td>94.9 (2.1)</td><td>97.8 (0.5)</td><td>89.6 (8.0)</td></tr><tr><td>E lab.</td><td>4</td><td>74.1 (9.8)</td><td>67.7 (12.8)</td><td>48.2 (11.7)</td><td>66.6 (9.0)</td><td>74.7 (10.5)</td><td>55.6(7.5)</td></tr><tr><td>E unlab.</td><td>3</td><td>10.7 (9.7)</td><td>48.6 (21.9)</td><td>22.6 (11.3)</td><td>69.3 (21.1)</td><td>36.3 (6.6)</td><td>52.5 (22.5)</td></tr></table>
514
+
515
+ E.4 IMPACT OF $p - p ^ { \star }$ ON A DOMAIN WITHOUT UNLABELED DATAPOINTS
516
+
517
+ # E.5 ASYMMETRY RESULTS ON CELL
518
+
519
+ ![](images/5fb1b7b6c0f74bd2f7e289cc9e281ec63bffd3505ec91527fe2022a5142e9260.jpg)
520
+ Figure 4: Impact of parameter $p$ in comparison with $p ^ { \star }$ on $\mathbf { M N I S T } \mathbf { M N I S T - M }$ . $p = 0$ corresponds to DANN (see text for details): no data flowed through the KUD module. We can see that different values of $( p , p ^ { \star } )$ do not influence the accuracy on a domain which did not have any unlabaled datapoints from extra classes (MNIST in this case).
521
+
522
+ ![](images/b70d62f610ba71bc1f847598ec6ba1706ad1deee281cc3f425fce0304994db47.jpg)
523
+ Figure 5: Impact of asymmetry in class content between domains on CELL $\mathrm { T } \mathrm { E } ,$ ) for DANN, MADA and MULANN.
parse/train/Sklv5iRqYX/Sklv5iRqYX_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Sklv5iRqYX/Sklv5iRqYX_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Sklv5iRqYX/Sklv5iRqYX_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/jLoC4ez43PZ/jLoC4ez43PZ.md ADDED
@@ -0,0 +1,376 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GRAPHCODEBERT: PRE-TRAINING CODE REPRESENTATIONS WITH DATA FLOW
2
+
3
+ Daya $\mathbf { G u o ^ { 1 * } }$ , Shuo $ { \mathbf { R e n } } ^ { 2 * }$ , Shuai $\mathbf { L u ^ { 3 * } }$ , Zhangyin $\mathbf { F e n g ^ { 4 * } }$ , Duyu Tang5, Shujie $\mathbf { L i u ^ { 5 } }$ , Long Zhou5, Nan Duan5, Alexey Svyatkovskiy6, Shengyu $\mathbf { F u } ^ { 6 }$ , Michele Tufano6, Shao Kun Deng6, Colin Clement6, Dawn Drain6, Neel Sundaresan6, Jian $\mathbf { Y i n } ^ { 1 }$ , Daxin Jiang7, and Ming Zhou5
4
+
5
+ 1School of Computer Science and Engineering, Sun Yat-sen University.
6
+ 2Beihang University, 3Peking University, 4Harbin Institute of Technology,
7
+ 5Microsoft Research Asia, 6Microsoft Devdiv, 7Microsoft STCA
8
+
9
+ # ABSTRACT
10
+
11
+ Pre-trained models for programming language have achieved dramatic empirical improvements on a variety of code-related tasks such as code search, code completion, code summarization, etc. However, existing pre-trained models regard a code snippet as a sequence of tokens, while ignoring the inherent structure of code, which provides crucial code semantics and would enhance the code understanding process. We present GraphCodeBERT, a pre-trained model for programming language that considers the inherent structure of code. Instead of taking syntactic-level structure of code like abstract syntax tree (AST), we use data flow in the pre-training stage, which is a semantic-level structure of code that encodes the relation of “wherethe-value-comes-from” between variables. Such a semantic-level structure is less complex and does not bring an unnecessarily deep hierarchy of AST, the property of which makes the model more efficient. We develop GraphCodeBERT based on Transformer. In addition to using the task of masked language modeling, we introduce two structure-aware pre-training tasks. One is to predict code structure edges, and the other is to align representations between source code and code structure. We implement the model in an efficient way with a graph-guided masked attention function to incorporate the code structure. We evaluate our model on four tasks, including code search, clone detection, code translation, and code refinement. Results show that code structure and newly introduced pre-training tasks can improve GraphCodeBERT and achieves state-of-the-art performance on the four downstream tasks. We further show that the model prefers structure-level attentions over token-level attentions in the task of code search.1
12
+
13
+ # 1 INTRODUCTION
14
+
15
+ Pre-trained models such as ELMo (Peters et al., 2018), GPT (Radford et al., 2018) and BERT (Devlin et al., 2018) have led to strong improvement on numerous natural language processing (NLP) tasks. These pre-trained models are first pre-trained on a large unsupervised text corpus, and then fine-tuned on downstream tasks. The success of pre-trained models in NLP also promotes the development of pre-trained models for programming language. Existing works (Kanade et al., 2019; Karampatsis & Sutton, 2020; Feng et al., 2020; Svyatkovskiy et al., 2020; Buratti et al., 2020) regard a source code as a sequence of tokens and pre-train models on source code to support code-related tasks such as code search, code completion, code summarization, etc. However, previous works only utilize source code for pre-training, while ignoring the inherent structure of code. Such code structure provides useful semantic information of code, which would benefit the code understanding process. Taking the expression $v = m a x . v a l u e - m i n \_ v a l u e$ as an example, $v$ is computed from max value and min value. Programmers do not always follow the naming conventions so that it’s hard to understand the semantic of the variable $v$ only from its name. The semantic structure of code provides a way to understand the semantic of the variable $v$ by leveraging dependency relation between variables.
16
+
17
+ In this work, we present GraphCodeBERT, a pre-trained model for programming language that considers the inherent structure of code. Instead of taking syntactic-level structure of code like abstract syntax tree (AST), we leverage semantic-level information of code, i.e. data flow, for pretraining. Data flow is a graph, in which nodes represent variables and edges represent the relation of “where-the-value-comes-from” between variables. Compared with AST, data flow is less complex and does not bring an unnecessarily deep hierarchy, the property of which makes the model more efficient. In order to learn code representation from source code and code structure, we introduce two new structure-aware pre-training tasks. One is data flow edges prediction for learning representation from code structure, and the other is variable-alignment across source code and data flow for aligning representation between source code and code structure. GraphCodeBERT is based on Transformer neural architecture (Vaswani et al., 2017) and we extend it by introducing a graph-guided masked attention function to incorporate the code structure.
18
+
19
+ We pre-train GraphCodeBERT on the CodeSearchNet dataset (Husain et al., 2019), which includes $2 . 3 \mathbf { M }$ functions of six programming languages paired with natural language documents. We evaluate the model on four downstream tasks: natural language code search, clone detection, code translation, and code refinement. Experiments show that our model achieves state-of-the-art performance on the four tasks. Further analysis shows that code structure and newly introduced pre-training tasks can improve GraphCodeBERT and the model has consistent preference for attending data flow.
20
+
21
+ In summary, the contributions of this paper are: (1) GraphCodeBERT is the first pre-trained model that leverages semantic structure of code to learn code representation. (2) We introduce two new structure-aware pre-training tasks for learning representation from source code and data flow. (3) GraphCodeBERT provides significant improvement on four downstream tasks, i.e. code search, clone detection, code translation, and code refinement.
22
+
23
+ # 2 RELATED WORKS
24
+
25
+ Pre-Trained Models for Programming Languages Inspired by the big success of pre-training in NLP (Devlin et al., 2018; Yang et al., 2019; Liu et al., 2019; Raffel et al., 2019), pre-trained models for programming languages also promotes the development of code intelligence (Kanade et al., 2019; Feng et al., 2020; Karampatsis & Sutton, 2020; Svyatkovskiy et al., 2020; Buratti et al., 2020). Kanade et al. (2019) pre-train a BERT model on a massive corpus of Python source codes by masked language modeling and next sentence prediction objectives. Feng et al. (2020) propose CodeBERT, a bimodal pre-trained model for programming and natural languages by masked language modeling and replaced token detection to support text-code tasks such as code search. Karampatsis & Sutton (2020) pre-train contextual embeddings on a JavaScript corpus using the ELMo framework for program repair task. Svyatkovskiy et al. (2020) propose GPT-C, which is a variant of the GPT-2 trained from scratch on source code data to support generative tasks like code completion. Buratti et al. (2020) present C-BERT, a transformer-based language model pre-trained on a collection of repositories written in C language, and achieve high accuracy in the abstract syntax tree (AST) tagging task.
26
+
27
+ Different with previous works, GraphCodeBERT is the first pre-trained model that leverages code structure to learn code representation to improve code understanding. We further introduce a graphguided masked attention function to incorporate the code structure into Transformer and two new structure-aware pre-training tasks to learn representation from source code and code structure.
28
+
29
+ Neural Networks with Code Structure In recent years, some neural networks leveraging code structure such as AST have been proposed and achieved strong performance in code-related tasks like code completion (Li et al., 2017; Alon et al., 2019; Kim et al., 2020), code generation (Rabinovich et al., 2017; Yin & Neubig, 2017; Brockschmidt et al., 2018), code clone detection (Wei & Li, 2017; Zhang et al., 2019; Wang et al., 2020), code summarization (Alon et al., 2018; Hu et al., 2018) and so on (Nguyen & Nguyen, 2015; Allamanis et al., 2018; Hellendoorn et al., 2019). Nguyen & Nguyen (2015) propose an AST-based language model to support the detection and suggestion of a syntactic template at the current editing location. Allamanis et al. (2018) use graphs to represent programs and graph neural network to reason over program structures. Hellendoorn et al. (2019) propose two different architectures using a gated graph neural network and Transformers for combining local and global information to leverage richly structured representations of source code. However, these works leverage code structure to learn models on specific tasks from scratch without using pre-trained models. In this work, we study how to leverage code structure for pre-training code representation.
30
+
31
+ # 3 DATA FLOW
32
+
33
+ In this section, we describe the basic concept and extraction of data flow. In next section, we will describe how to use data flow for pre-training.
34
+
35
+ Data flow is a graph that represents dependency relation between variables, in which nodes represent variables and edges represent where the value of each variable comes from. Unlike AST, data flow is same under different abstract grammars for the same source code. Such code structure provides crucial code semantic information for code understanding. Taking $v = m a x \_ v a l u e - m i n \_ v a l u e$ as an example, programmers do not always follow the naming conventions so that it is hard to understand the semantic of the variable. Data flow provides a way to understand the semantic of the variable $v$ to some extent, i.e. the value of $v$ comes from max value and min value in data flow. Besides, data flow supports the model to consider long-range dependencies induced by using the same variable or function in distant locations. Taking Figure 1 as an example, there are four variables with same name (i.e. $x ^ { 3 }$ , $x ^ { 7 }$ , $x ^ { 9 }$ and $x ^ { 1 1 }$ ) but with different semantic. The graph in the figure shows dependency relation between these variables and supports $x ^ { 1 1 }$ to pay more attention to $x ^ { 7 }$ and $x ^ { 9 }$ instead of $x ^ { \mathrm { { 3 } } }$ Next, we describe how to extract data flow from a source code.
36
+
37
+ ![](images/232408c9aa6d8ccf6d1b6feb29c4a806e5dc4b802a24d9e59b5ad8e3766e4180.jpg)
38
+ Figure 1: The procedure of extracting data flow given a source code. The graph in the rightmost is data flow that represents the relation of ”where-the-value-comes-from” between variables.
39
+
40
+ Figure 1 shows the extraction of data flow through a source code. Given a source code $C =$ $\{ c _ { 1 } , . c _ { 2 } , . . . , c _ { n } \}$ , we first parse the code into an abstract syntax tree (AST) by a standard compiler $\mathrm { \ t o o l } ^ { 2 }$ . The AST includes syntax information of the code and terminals (leaves) are used to identify the variable sequence, denoted as $V = \{ v _ { 1 } , v _ { 2 } , . . . , v _ { k } \}$ . We take each variable as a node of the graph and an direct edge $\varepsilon = \langle v _ { i } , v _ { j } \rangle$ from $v _ { i }$ to $v _ { j }$ refers that the value of $j$ -th variable comes from $i$ -th variable. Taking $x = e x p r$ as an example, edges from all variables in expr to $x$ are added into the graph. We denote the set of directed edges as $E = \{ \varepsilon _ { 1 } , \varepsilon _ { 2 } , . . . , \varepsilon _ { l } \}$ and the graph $\mathcal { G } ( C ) = ( V , E )$ is data flow used to represent dependency relation between variables of the source code $C$ .
41
+
42
+ # 4 GRAPHCODEBERT
43
+
44
+ In this section, we describe GraphCodeBERT, a graph-based pre-trained model based on Transformer for programming language. We introduce model architecture, graph-guided masked attention and pre-training tasks including standard masked language model and newly introduced ones. More details about model pre-training setting are provided in the Appendix A.
45
+
46
+ ![](images/2037df2dc8d88acbaac38c69032837884a735d6c50ea832db1f2e0ef5c1cf6cd.jpg)
47
+ Figure 2: An illustration about GraphCodeBERT pre-training. The model takes source code paired with comment and the corresponding data flow as the input, and is pre-trained using standard masked language modeling (Devlin et al., 2018) and two structure-aware tasks. One structure-aware task is to predict where a variable is identified from (marked with orange lines) and the other is data flow edges prediction between variables (marked with blue lines).
48
+
49
+ # 4.1 MODEL ARCHITECTURE
50
+
51
+ Figure 2 shows the model architecture of GraphCodeBERT. We follow BERT (Devlin et al., 2018) and use the multi-layer bidirectional Transformer (Vaswani et al., 2017) as the model backbone. Instead of only using source code, we also utilize paired comments to pre-train the model to support more code-related tasks involving natural language such as natural language code search (Feng et al., 2020). We further take data flow, which is a graph, as a part of the input to the model.
52
+
53
+ Given a source code $C = \{ c _ { 1 } , c _ { 2 } , . . . , c _ { n } \}$ with its comment $W = \{ w _ { 1 } , w _ { 2 } , . . . , w _ { m } \}$ , we can obtain the corresponding data flow $\mathcal { G } ( C ) = ( V , E )$ as discussed in the Section 3, where $V \doteq \{ v _ { 1 } , v _ { 2 } , . . . , v _ { k } \}$ is a set of variables and $E = \{ \varepsilon _ { 1 } , \varepsilon _ { 2 } , . . . , \varepsilon _ { l } \}$ is a set of direct edges that represent where the value of each variable comes from. We concatenate the comment, source code and the set of variables as the sequence input $X = \{ [ C L S ] , W , [ S E P ] , C , [ S E P ] , V \}$ , where $[ C L S ]$ is a special token in front of three segments and $[ S E P ]$ is a special symbol to split two kinds of data types.
54
+
55
+ GraphCodeBERT takes the sequence $X$ as the input and then converts the sequence into input vectors $H ^ { 0 }$ . For each token, its input vector is constructed by summing the corresponding token and position embeddings. We use a special position embedding for all variables to indicate that they are nodes of data flow. The model applies $_ \mathrm { N }$ transformer layers over the input vectors to produce contextual representations $H ^ { n } = t r a n s f o r m e r _ { n } ( H ^ { n - 1 } ) , \stackrel { . } { n } \in [ 1 , N ]$ . Each transformer layer contains an architecturally identical transformer that applies a multi-headed self-attention operation (Vaswani et al., 2017) followed by a feed forward layer over the input $H ^ { n - 1 }$ in the $n$ -th layer.
56
+
57
+ $$
58
+ \begin{array} { c } { { G ^ { n } = L N ( M u l t i A t t n ( H ^ { n - 1 } ) + H ^ { n - 1 } ) } } \\ { { H ^ { n } = L N ( F F N ( G ^ { n } ) + G ^ { n } ) } } \end{array}
59
+ $$
60
+
61
+ where M ultiAttn is a multi-headed self-attention mechanism, $F F N$ is a two layers feed forward network, and $L N$ represents a layer normalization operation. For the $n$ -th transformer layer, the output $\hat { G } ^ { n }$ of a multi-headed self-attention is computed via:
62
+
63
+ $$
64
+ \begin{array} { c } { Q _ { i } = H ^ { n - 1 } W _ { i } ^ { Q } , K _ { i } = H ^ { n - 1 } W _ { i } ^ { K } , V _ { i } = H ^ { n - 1 } W _ { i } ^ { V } } \\ { \displaystyle h e a d _ { i } = \mathrm { s o f t m a x } ( \frac { \mathrm { Q _ { i } } \mathrm { K _ { i } ^ { T } } } { \sqrt { \mathrm { d _ { k } } } } + \mathrm { M } ) \mathrm { V _ { i } } } \\ { \hat { G } ^ { n } = [ h e a d _ { 1 } ; . . . ; h e a d _ { u } ] W _ { n } ^ { O } } \end{array}
65
+ $$
66
+
67
+ where the previous layer’s output $H ^ { n - 1 } \in \mathbb { R } ^ { | X | \times d _ { h } }$ is linearly projected to a triplet of queries, keys and values using model parameters $W _ { i } ^ { Q } , W _ { i } ^ { K } , W _ { i } ^ { V } \in \mathbb { R } ^ { d _ { h } \times d _ { k } }$ , respectively. $u$ is the number of heads, $d _ { k }$ is the dimension of a head, and $W _ { n } ^ { O } \in \mathbb { R } ^ { d _ { h } \times d _ { h } }$ is the model parameters. $M \in \mathbb { R } ^ { | X | \times | X | }$ is a mask matrix, where $M _ { i j }$ is 0 if $i$ -th token is allowed to attend $j$ -th token otherwise $- \infty$ .
68
+
69
+ # 4.2 GRAPH-GUIDED MASKED ATTENTION
70
+
71
+ To incorporate the graph structure into Transformer, we define a graph-guided masked attention function to filter out irrelevant signals. The attention masking function could avoid the key $k _ { i }$ attended by the query $q _ { j }$ by adding the attention score $q _ { j } ^ { T } k _ { i }$ an infinitely negative value so that the attention weight becomes zero after using a softmax function. To represent dependency relation between variables, a node-query $q _ { v _ { i } }$ is allowed to attend to a node-key $k _ { v _ { j } }$ if there is a direct edge from the node $v _ { j }$ to the node $v _ { i }$ (i.e. $\langle v _ { j } , v _ { i } \rangle \in E )$ or they are the same node (i.e. $i = j$ ). Otherwise, the attention is masked by adding an infinitely negative value into the attention score. To represent the relation between source code tokens and nodes of the data flow, we first define a set $E ^ { ' }$ , where $\langle v _ { i } , c _ { j } \rangle / \langle c _ { j } , v _ { i } \rangle \in E ^ { ' }$ if the variable $v _ { i }$ is identified from the source code token $c _ { j }$ . We then allow the node $q _ { v _ { i } }$ and code $k _ { c _ { j } }$ attend each other if and only if $\langle v _ { i } , c _ { j } \rangle / \langle c _ { j } , v _ { i } \rangle \in E ^ { ' } .$ . More formally, we use the following graph-guided masked attention matrix as the mask matrix $M$ in the equation 4:
72
+
73
+ $$
74
+ M _ { i j } = \left\{ \begin{array} { l l } { 0 } & { \mathrm { i f ~ } q _ { i } \in \{ [ C L S ] , [ S E P ] \} \mathrm { ~ o r ~ } q _ { i } , k _ { j } \in W \cup C \mathrm { ~ o r ~ } \langle q _ { i } , k _ { j } \rangle \in E \cup E ^ { ' } \mathrm { ~ } } \\ { - \infty } & { \mathrm { o t h e r w i s e ~ } } \end{array} \right.
75
+ $$
76
+
77
+ # 4.3 PRE-TRAINING TASKS
78
+
79
+ We describe three pre-training tasks used for pre-training GraphCodeBERT in this section. The first task is masked language modeling (Devlin et al., 2018) for learning representation from the source code. The second task is data flow edge prediction for learning representation from data flow, where we first mask some variables’ data flow edges and then let GraphCodeBERT predict those edges. The last task is variable-alignment across source code and data flow for aligning representation between source code and data flow, which predicts where a variable is identified from.
80
+
81
+ Masked Language Modeling We follow Devlin et al. (2018) to apply masked language modeling (MLM) pre-training task. Specially, we sample randomly $15 \%$ of the tokens from the source code and paired comment. We replace them with a [MASK] token $80 \%$ of the time, with a random token $10 \%$ of the time, and leave them unchanged $10 \%$ of the time. The MLM objective is to predict original tokens of these sampled tokens, which has proven effective in previous works (Devlin et al., 2018; Liu et al., 2019; Feng et al., 2020). In particular, the model can leverage the comment context if the source code context is not sufficient to infer the masked code token, encouraging the model to align the natural language and programming language representations.
82
+
83
+ Edge Prediction To learn representation from data flow, we introduce a pre-training task of data flow edges prediction. The motivation is to encourage the model to learn structure-aware representation that encodes the relation of “where-the-value-comes-from” for better code understanding. Specially, we randomly sample $20 \%$ of nodes $V _ { s }$ in data flow, mask direct edges connecting these sampled nodes by add an infinitely negative value in the mask matrix, and then predict these masked edges $E _ { m a s k }$ . Taking the variable $x ^ { \bar { 1 1 } }$ in Figure 2 for an example, we first mask edges $\langle x ^ { 7 } , x ^ { 1 1 } \rangle$ and $\langle x ^ { 9 } , x ^ { 1 1 } \rangle$ in the graph and then let the model to predict these edges. Formally, the pre-training objective of the task is calculated as Equation 7, where $E _ { c } = V _ { s } \times V \cup V \times V _ { s }$ is a set of candidates for edge prediction, $\delta ( e _ { i j } \in E )$ is 1 if $\langle v _ { i } , v _ { j } \rangle \in E$ otherwise 0, and the probability $p _ { e _ { i j } }$ of existing an edge from $i$ -th to $j$ -th node is calculated by dot product following a sigmoid function using representations of two nodes from GraphCodeBERT. To balance positive-negative ratio of examples, we sample negative and positive samples with the same number for $E _ { c }$ .
84
+
85
+ $$
86
+ \mathit { l o s s } _ { \mathit { E d g e P r e d } } = - \sum _ { \mathit { e _ { i j } \in E _ { c } } } [ \delta ( \mathit { e _ { i j } \in E _ { m a s k } } ) l o g p _ { e _ { i j } } + ( 1 - \delta ( \mathit { e _ { i j } \in E _ { m a s k } } ) ) l o g ( 1 - p _ { e _ { i j } } ) ]
87
+ $$
88
+
89
+ Node Alignment To align representation between source code and data flow, we introduce a pretraining task of node alignment across source code and data flow, which is similar to data flow edge prediction. Instead of predicting edges between nodes, we predict edges between code tokens and nodes. The motivation is to encourage the model to align variables and source code according to data flow. Taking Figure 3 for an example, we first mask edges between the variable $x ^ { 1 1 }$ in data flow and code tokens, and then predict which code token the variable $x ^ { 1 1 }$ in data flow is identified from. As we can see, the model could predict that the variable $x ^ { 1 1 }$ is identified form the variable $x$ in the expression “return $\mathbf { X } ^ { \prime \prime }$ according to data flow information (i.e. the value of $x ^ { 1 1 }$ comes from $x ^ { 7 }$ or $x ^ { 9 }$ ).
90
+
91
+ ![](images/4f26e58046cd12c26958c0e0b33a784468ff5357134a69a2c5f76f18d60dfa04.jpg)
92
+ Figure 3: An example of the Node Alignment task.
93
+
94
+ Specially, we randomly sample $20 \%$ nodes $V _ { s } ^ { ' }$ in the graph, mask edges between code tokens and sampled nodes, and then predict masked edges $E _ { m a s k } ^ { ' }$ . The pre-training objective of this task is similar to Equation 7, where $E _ { c } ^ { ' } = V _ { s } ^ { ' } \times C$ is a set of candidates for node alignment. Similarly, we also sample negative and positive samples with the same number for $E _ { c } ^ { ' }$ .
95
+
96
+ $$
97
+ \mathit { l o s s } _ { N o d e A l i g n } = - \sum _ { e _ { i j } \in E _ { c } ^ { \prime } } [ \delta ( e _ { i j } \in E _ { m a s k } ^ { \prime } ) l o g { p _ { e _ { i j } } } + ( 1 - \delta ( e _ { i j } \in E _ { m a s k } ^ { \prime } ) ) l o g ( 1 - p _ { e _ { i j } } ) ]
98
+ $$
99
+
100
+ # 5 EXPERIMENTS
101
+
102
+ We evaluate our model on four downstream tasks, including code search, clone detection, code translation and code refinement. Detailed experimental settings can be found in the Appendix.
103
+
104
+ # 5.1 NATURAL LANGUAGE CODE SEARCH
105
+
106
+ Given a natural language as the input, the task aims to find the most semantically related code from a collection of candidate codes. We conduct experiments on the CodeSearchNet code corpus (Husain et al., 2019), which includes six programming languages. Different from the dataset and the setting used in the Husain et al. (2019), we filter low-quality queries by handcrafted rules and expand 1000 candidates to the whole code corpus, which is closer to the real-life scenario. We use Mean Reciprocal Rank (MRR) as our evaluation metric and report results of existing methods in the Table 1. We provide more details about the filtered dataset and also give results using the same setting of Husain et al. (2019) in the Appendix B.
107
+
108
+ <table><tr><td>model</td><td>Ruby</td><td>Javascript</td><td>Go</td><td>Python</td><td>Java</td><td>Php</td><td>Overall</td></tr><tr><td>NBow</td><td>0.162</td><td>0.157</td><td>0.330</td><td>0.161</td><td>0.171</td><td>0.152</td><td>0.189</td></tr><tr><td>CNN</td><td>0.276</td><td>0.224</td><td>0.680</td><td>0.242</td><td>0.263</td><td>0.260</td><td>0.324</td></tr><tr><td>BiRNN</td><td>0.213</td><td>0.193</td><td>0.688</td><td>0.290</td><td>0.304</td><td>0.338</td><td>0.338</td></tr><tr><td>selfAtt</td><td>0.275</td><td>0.287</td><td>0.723</td><td>0.398</td><td>0.404</td><td>0.426</td><td>0.419</td></tr><tr><td>RoBERTa</td><td>0.587</td><td>0.517</td><td>0.850</td><td>0.587</td><td>0.599</td><td>0.560</td><td>0.617</td></tr><tr><td>RoBERTa (code)</td><td>0.628</td><td>0.562</td><td>0.859</td><td>0.610</td><td>0.620</td><td>0.579</td><td>0.643</td></tr><tr><td>CodeBERT</td><td>0.679</td><td>0.620</td><td>0.882</td><td>0.672</td><td>0.676</td><td>0.628</td><td>0.693</td></tr><tr><td>GraphCodeBERT</td><td>0.703</td><td>0.644</td><td>0.897</td><td>0.692</td><td>0.691</td><td>0.649</td><td>0.713</td></tr></table>
109
+
110
+ Table 1: Results on code search. GraphCodeBERT outperforms other models significantly $( p < 0 . 0 1 )$ .
111
+
112
+ All models calculate inner product of code and query encodings as relevance scores to rank candidate codes. We follow Husain et al. (2019) to implement four methods as baselines in the first group to obtain the encodings, including bag-of-words, convolutional neural network, bidirectional recurrent neural network, and multi-head attention. The second group is the results of pre-trained models. Roberta (Liu et al., 2019) is a pre-trained model on text corpus with MLM learning objective, while RoBERTa (code) is pre-trained only on code. CodeBERT (Feng et al., 2020) is pre-trained on code-text pairs with MLM and replaced token detection learning objectives. As we can see, GraphCodeBERT that leverages code structure for pre-training brings a $2 \%$ gain of MRR, achieving the state-of-art performance. We also conducted t-test between our GraphCodeBERT and other baselines, and the results show the improvements are significant with $p < 0 . 0 1$ .
113
+
114
+ # 5.2 CODE CLONE DETECTION
115
+
116
+ Code clones are multiple code fragments that output similar results when given the same input. The task aims to measure the similarity between two code fragments, which can help reduce the cost of software maintenance and prevent bugs. We conduct experiments on the BigCloneBench dataset (Svajlenko et al., 2014) and report results in the Table 2.
117
+
118
+ Deckard (Jiang et al., 2007) is to compute vectors for structural information within ASTs and then a Locality Sensitive Hashing (LSH) (Datar et al., 2004) is used to cluster similar vectors for detection. RtvNN (White et al., 2016) trains a recursive autoencoder to learn representations for AST. CDLH (Wei & Li, 2017) learn representations of code fragments via AST-based LSTM and hamming distance is used to optimize the distance between the vector representation of AST pairs.
119
+
120
+ ASTNN Zhang et al. (2019) uses RNNs to encode AST subtrees for statements, then feed the encodings of all statement trees into an RNN to learn representation for a program. FA-AST-GMN (Wang et al., 2020) uses GNNs over a flow-augmented AST to leverages explicit control and data flow information for code clone detection. Results show that our GraphCodeBERT that leverages code structure information significantly outperforms other methods with $p ~ < ~ 0 . 0 1$ , which demonstrates the effectiveness of our pre-trained model for the task of code clone detection.
121
+
122
+ Table 2: Results on code clone detection. GraphCodeBERT outperforms other pre-trained methods significantly $( p < 0 . 0 1 )$ ).
123
+
124
+ <table><tr><td>Model</td><td>Precision</td><td>Recall</td><td>F1</td></tr><tr><td>Deckard RtvNN</td><td>0.93</td><td>0.02</td><td>0.03</td></tr><tr><td>CDLH</td><td>0.95</td><td>0.01</td><td>0.01</td></tr><tr><td>ASTNN</td><td>0.92</td><td>0.74</td><td>0.82</td></tr><tr><td>FA-AST-GMN</td><td>0.92</td><td>0.94</td><td>0.93</td></tr><tr><td>RoBERTa (code)</td><td>0.96</td><td>0.94</td><td>0.95</td></tr><tr><td>CodeBERT</td><td>0.960</td><td>0.955</td><td>0.957</td></tr><tr><td></td><td>0.964</td><td>0.966</td><td>0.965</td></tr><tr><td>GraphCodeBERT</td><td>0.973</td><td>0.968</td><td>0.971</td></tr></table>
125
+
126
+ # 5.3 CODE TRANSLATION
127
+
128
+ Code translation aims to migrate legacy software from one programming language in a platform to another. Following Nguyen et al. (2015) and Chen et al. (2018), we conduct experiments on a dataset crawled from the same several open-source projects as them and report results in the Table 3.
129
+
130
+ The Naive method is directly copying the source code as the translation result. PBSMT is short for phrase-based statistical machine translation (Koehn et al., 2003), and has been exploited in previous works (Nguyen et al., 2013; Karaivanov et al., 2014). As for the Transformer, we use the
131
+
132
+ same number of layers and hidden size as pre-trained models. To leverage the pretrained models for translation, we initialize the encoder with pre-trained models and randomly initialize parameters of the decoder and the source-to-target attention. Results show that the models initialized with pretrained models (i.e the second group) significantly outperform PBSMT and Transformer models. Among them, GraphCodeBERT achieves state-of-art performance, which demonstrates the effectiveness of our model for code translation.
133
+
134
+ Table 3: Results on code translation. GraphCodeBERT outperforms other models significantly $( p < 0 . 0 5 )$ .
135
+
136
+ <table><tr><td rowspan="2">Method</td><td>Java- →C#</td><td colspan="2">C#-→Java</td></tr><tr><td>BLEU</td><td>Acc BLEU</td><td>Acc</td></tr><tr><td>Naive</td><td>18.54 0.0</td><td>18.69</td><td>0.0</td></tr><tr><td>PBSMT</td><td>43.53 12.5</td><td>40.06</td><td>16.1</td></tr><tr><td>Transformer</td><td>55.84</td><td>33.0 50.47</td><td>37.9</td></tr><tr><td>RoBERTa (code)</td><td>77.46</td><td>56.1 71.99</td><td>57.9</td></tr><tr><td>CodeBERT</td><td>79.92</td><td>59.0 72.14</td><td>58.0</td></tr><tr><td>GraphCodeBERT</td><td>80.58</td><td>59.4 72.64</td><td>58.8</td></tr></table>
137
+
138
+ # 5.4 CODE REFINEMENT
139
+
140
+ Code refinement aims to automatically fix bugs in the code, which can contribute to reducing the cost of bug-fixes. We use the dataset released by Tufano et al. (2019) and report results in the Table 4.
141
+
142
+ The Naive method directly copies the buggy code as the refinement result. For the Transformer, we use the same number of layers and hidden size as the pre-trained models. Same as the Section 5.3, we initialize the encoder with pre-trained models and randomly initialize parameters of the decoder
143
+
144
+ and the source-to-target attention. Then we use the training data to fine-tune the whole model. In the table, we see that the Transformer significantly outperforms LSTM. Results in the second group shows that pre-trained models outperform Transformer models further, and GraphCodeBERT achieves better performance than other pre-trained models on both datasets, which shows leveraging code structure information are helpful to the task of code refinement.
145
+
146
+ Table 4: Results on code refinement.
147
+
148
+ <table><tr><td rowspan="2">Method</td><td colspan="2">small</td><td colspan="2">medium</td></tr><tr><td>BLEU</td><td>Acc</td><td>BLEU</td><td>Acc</td></tr><tr><td>Naive</td><td>78.06</td><td>0.0</td><td>90.91</td><td>0.0</td></tr><tr><td>LSTM Transformer</td><td>76.76</td><td>10.0</td><td>72.08</td><td>2.5</td></tr><tr><td>RoBERTa (code)</td><td>77.21 77.30</td><td>14.7</td><td>89.25</td><td>3.7</td></tr><tr><td>CodeBERT</td><td></td><td>15.9</td><td>90.07</td><td>4.1</td></tr><tr><td></td><td>77.42</td><td>16.4</td><td>91.07</td><td>5.2</td></tr><tr><td>GraphCodeBERT</td><td>80.02</td><td>17.3</td><td>91.31</td><td>9.1</td></tr></table>
149
+
150
+ # 5.5 MODEL ANALYSIS
151
+
152
+ Ablation Study We conduct ablation study on the task of natural language code search to understand various components in our approach impact overall performance. We remove two pre-training tasks and data flow, respectively, to analyze their contribution. Table 5 shows that the overall performance drops from $7 1 . 3 \%$ to $7 0 . 3 \% { \sim } 7 0 . 7 \%$ when removing Node Alignment and Edge Prediction pre-training tasks, respectively, which reveals the importance of two structure-aware pre-training tasks. After ablating the data flow totally, we can see that the performance drops from $7 1 . 3 \%$ to $6 9 . 3 \%$ , which means leveraging data flow to learn code representation could improve GraphCodeBERT.
153
+
154
+ Table 5: Ablation study on natural language code search
155
+
156
+ <table><tr><td>Methods</td><td>Ruby</td><td>Javascript</td><td>Go</td><td>Python</td><td>Java</td><td>Php</td><td>Overall</td></tr><tr><td>GraphCodeBERT</td><td>0.703</td><td>0.644</td><td>0.897</td><td>0.692</td><td>0.691</td><td>0.649</td><td>0.713</td></tr><tr><td>-w/o EdgePred</td><td>0.701</td><td>0.632</td><td>0.894</td><td>0.687</td><td>0.688</td><td>0.640</td><td>0.707</td></tr><tr><td>-w/o NodeAlign</td><td>0.685</td><td>0.635</td><td>0.887</td><td>0.682</td><td>0.690</td><td>0.640</td><td>0.703</td></tr><tr><td>-w/o Data Flow</td><td>0.679</td><td>0.620</td><td>0.882</td><td>0.672</td><td>0.676</td><td>0.628</td><td>0.693</td></tr></table>
157
+
158
+ Node-vs. Token-level Attention Table 6 shows how frequently a special token $[ C L S ]$ that is used to calculate probability of correct candidate attends to code tokens (Codes) and variables (Nodes). We see that although the number of nodes account for $5 \% \sim 2 0 \%$ , attentions over nodes overwhelm node/code ratio (around $10 \%$ to $32 \%$ ) across all programming languages. The results indicate that data flow plays an important role in code understanding process and the model pays more attention to nodes in data flow than code tokens.
159
+
160
+ <table><tr><td></td><td>Ruby</td><td>Javascript</td><td>Go</td><td>Python</td><td>Java</td><td>Php</td></tr><tr><td>Codes/Nodes</td><td>90.1/9.9</td><td>94.6/5.4</td><td>95.0/5.03</td><td>80.6/19.4</td><td>93.2/6.8</td><td>87.5/12.5</td></tr><tr><td>[CLS] →Codes/Nodes</td><td>82.3/17.7</td><td>89.7/10.3</td><td>91.0/9.0</td><td>67.7/32.3</td><td>87.8/12.2</td><td>79.4/20.6</td></tr></table>
161
+
162
+ Table 6: Attention distribution $( \% )$ between code tokens (codes) and variables (nodes) across different programming language on natural language code search test sets. The first row is the ratio of the number of code tokens to nodes, and the second row is attention distribution of $[ C L S ]$ token.
163
+
164
+ Comparison between AST and Data Flow Figure 4 shows MRR score with respect to input sequence length on the validation dataset of Ruby programming language for the task of code search. AST Pre-order Traversal regards AST as a sequence by linearizing all AST nodes using pre-order traversal algorithm. AST Subtree Masking regards AST as a tree and introduce subtree masking (Nguyen et al., 2019) for self-attention of the Transformer. In subtree masking, each node-query in AST attends only to its own subtree descendants, and each leaf-query only attends to leaves of AST. Transformer has a self-attention component with $O ( n ^ { 2 } )$ time and memory complexity where $n$ is the input sequence length, and thus is not efficient to scale to long inputs.
165
+
166
+ We observe that injecting AST even hurts the performance when the sequence length is short (e.g. shorter than 128), while GraphCodeBERT consistently brings performance boost on varying sequence length and obtains better MRR score than AST-based methods. The main reason is that data flow is less complex and the number of nodes account for $5 \% \sim$ $2 0 \%$ (see Table 6), which does not bring an unnecessarily deep hierarchy of AST and makes the model more accurate and efficient.
167
+
168
+ ![](images/3b83234a977f836f6e157816cdeef8dc86a911241a292a16481a16da20cecc1d.jpg)
169
+ Figure 4: MRR score on the validation dataset of Ruby for code search with varying length of input sequence.
170
+
171
+ Case Study We also give a case study to demonstrate that data flow would enhance the code understanding process. Given a source code and a comment, we use GraphCodeBERT with and without data flow to predict whether the comment correctly describes the source code. Results are given in Figure 5. We can see that both models make correct prediction in the original example, where the threshold is 0.5 (left panel). To study the code understanding ability of models, we change the source code (center panel) and the comment (right panel), respectively. Although we make a small change on the source code (return $a r e t u r n b$ ) and the comment $( s u m \ v a l u e m e a n \ v a l u e )$ ), the semantic of the source code and the comment are completely different and corresponding gold labels change from 1 to 0. As we can see in the figure, GraphCodeBERT without using data flow fails these tests and still outputs high probability for negative examples. After leveraging data flow, GraphCodeBERT better understands the semantic of source code and makes correct predictions on all tests, which demonstrates that data flow could improve the code understanding ability of the model.
172
+
173
+ Figure 5: We take a comment and a source code as the input (first row), and use GraphCodeBERT with and without data flow to predict the probability of the source code matching the comment (third row). The label is 1 if the comment correctly describes the source code otherwise 0 (second row).
174
+
175
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Unchanged</td><td rowspan=1 colspan=1>Code:return a →return b</td><td rowspan=1 colspan=1>NL: sum value →mean value</td></tr><tr><td rowspan=1 colspan=1>Input</td><td rowspan=1 colspan=1>NL:Return sum value of an arrayCode:import numpy as npdef f(array):a=np.sum(array)b=np.mean(array)return a</td><td rowspan=1 colspan=1>NL:Return sum value of an arrayCode:import numpy as npdef f(array):a=np.sum(array)b=np.mean(array)return b</td><td rowspan=1 colspan=1>NL:Return mean value of an arrayCode:import numpy as npdef f(array):a=np.sum(array)b=np.mean(array)return a</td></tr><tr><td rowspan=1 colspan=1>Label</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1>Prediction</td><td rowspan=1 colspan=1>GraphCodeBERT: 0.6563 (1)GraphCodeBERT: 0.8728 (1)(w/o Data Flow)</td><td rowspan=1 colspan=1>GraphCodeBERT: 0.4615 (0)GraphCodeBERT: 0.8608 (1)(w/o Data Flow)</td><td rowspan=1 colspan=1>GraphCodeBERT: 0.2884 (0)GraphCodeBERT: 0.9048 (1)(w/o Data Flow)</td></tr></table>
176
+
177
+ # 6 CONCLUSION
178
+
179
+ In this paper, we present GraphCodeBERT that leverages data flow to learn code representation. To the best of our knowledge, this is the first pre-trained model that considers code structure for pre-training code representations. We introduce two structure-aware pre-training tasks and show that GraphCodeBERT achieves state-of-the-art performance on four code-related downstream tasks, including code search, clone detection, code translation and code refinement. Further analysis shows that code structure and newly introduced pre-training tasks boost the performance. Additionally, case study in the task of code search shows that applying data flow in the pre-trained model improves code understanding.
180
+
181
+ # ACKNOWLEDGMENTS
182
+
183
+ Daya Guo and Jian Yin are supported by the Research Foundation of Science and Technology Plan Project in Guangdong Province (2017B030308007).
184
+
185
+ # REFERENCES
186
+
187
+ Miltiadis Allamanis, Marc Brockschmidt, and Mahmoud Khademi. Learning to represent programs with graphs. In International Conference on Learning Representations, 2018.
188
+
189
+ Uri Alon, Shaked Brody, Omer Levy, and Eran Yahav. code2seq: Generating sequences from structured representations of code. arXiv preprint arXiv:1808.01400, 2018.
190
+
191
+ Uri Alon, Roy Sadaka, Omer Levy, and Eran Yahav. Structural language models of code. arXiv, pp. arXiv–1910, 2019.
192
+
193
+ Marc Brockschmidt, Miltiadis Allamanis, Alexander L Gaunt, and Oleksandr Polozov. Generative code modeling with graphs. arXiv preprint arXiv:1805.08490, 2018.
194
+
195
+ Luca Buratti, Saurabh Pujar, Mihaela Bornea, Scott McCarley, Yunhui Zheng, Gaetano Rossiello, Alessandro Morari, Jim Laredo, Veronika Thost, Yufan Zhuang, et al. Exploring software naturalness throughneural language models. arXiv preprint arXiv:2006.12641, 2020.
196
+
197
+ Xinyun Chen, Chang Liu, and Dawn Song. Tree-to-tree neural networks for program translation. In Advances in neural information processing systems, pp. 2547–2557, 2018.
198
+
199
+ Mayur Datar, Nicole Immorlica, Piotr Indyk, and Vahab S Mirrokni. Locality-sensitive hashing scheme based on p-stable distributions. In Proceedings of the twentieth annual symposium on Computational geometry, pp. 253–262, 2004.
200
+
201
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
202
+
203
+ Zhangyin Feng, Daya Guo, Duyu Tang, Nan Duan, Xiaocheng Feng, Ming Gong, Linjun Shou, Bing Qin, Ting Liu, Daxin Jiang, et al. Codebert: A pre-trained model for programming and natural languages. arXiv preprint arXiv:2002.08155, 2020.
204
+
205
+ Daya Guo, Duyu Tang, Nan Duan, M. Zhou, and Jian Yin. Dialog-to-action: Conversational question answering over a large-scale knowledge base. In NeurIPS, 2018.
206
+
207
+ Daya Guo, Duyu Tang, Nan Duan, M. Zhou, and Jian Yin. Coupling retrieval and meta-learning for context-dependent semantic parsing. ArXiv, abs/1906.07108, 2019.
208
+
209
+ Vincent J Hellendoorn, Charles Sutton, Rishabh Singh, Petros Maniatis, and David Bieber. Global relational models of source code. In International Conference on Learning Representations, 2019.
210
+
211
+ Xing Hu, Ge Li, Xin Xia, David Lo, and Zhi Jin. Deep code comment generation. In 2018 IEEE/ACM 26th International Conference on Program Comprehension (ICPC), pp. 200–20010. IEEE, 2018.
212
+
213
+ Hamel Husain, Ho-Hsiang Wu, Tiferet Gazit, Miltiadis Allamanis, and Marc Brockschmidt. Codesearchnet challenge: Evaluating the state of semantic code search. arXiv preprint arXiv:1909.09436, 2019.
214
+
215
+ Lingxiao Jiang, Ghassan Misherghi, Zhendong Su, and Stephane Glondu. Deckard: Scalable and accurate tree-based detection of code clones. In 29th International Conference on Software Engineering (ICSE’07), pp. 96–105. IEEE, 2007.
216
+
217
+ Aditya Kanade, Petros Maniatis, Gogul Balakrishnan, and Kensen Shi. Pre-trained contextual embedding of source code. arXiv preprint arXiv:2001.00059, 2019.
218
+
219
+ Svetoslav Karaivanov, Veselin Raychev, and Martin Vechev. Phrase-based statistical translation of programming languages. In Proceedings of the 2014 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming & Software, pp. 173–184, 2014.
220
+
221
+ Rafael-Michael Karampatsis and Charles Sutton. Scelmo: Source code embeddings from language models. arXiv preprint arXiv:2004.13214, 2020.
222
+
223
+ Seohyun Kim, Jinman Zhao, Yuchi Tian, and Satish Chandra. Code prediction by feeding trees to transformers. arXiv preprint arXiv:2003.13848, 2020.
224
+
225
+ Philipp Koehn, Franz J Och, and Daniel Marcu. Statistical phrase-based translation. Technical report, UNIVERSITY OF SOUTHERN CALIFORNIA MARINA DEL REY INFORMATION SCIENCES INST, 2003.
226
+
227
+ Guillaume Lample and Alexis Conneau. Cross-lingual language model pretraining. arXiv preprint arXiv:1901.07291, 2019.
228
+
229
+ Jian Li, Yue Wang, Michael R Lyu, and Irwin King. Code completion with neural attention and pointer networks. arXiv preprint arXiv:1711.09573, 2017.
230
+
231
+ Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019.
232
+
233
+ Anh Tuan Nguyen and Tien N Nguyen. Graph-based statistical language model for code. In 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering, volume 1, pp. 858–868. IEEE, 2015.
234
+
235
+ Anh Tuan Nguyen, Tung Thanh Nguyen, and Tien N Nguyen. Lexical statistical machine translation for language migration. In Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering, pp. 651–654, 2013.
236
+
237
+ Anh Tuan Nguyen, Tung Thanh Nguyen, and Tien N Nguyen. Divide-and-conquer approach for multi-phase statistical migration for source code (t). In 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 585–596. IEEE, 2015.
238
+
239
+ Xuan-Phi Nguyen, Shafiq Joty, Steven Hoi, and Richard Socher. Tree-structured attention with hierarchical accumulation. In International Conference on Learning Representations, 2019.
240
+
241
+ Matthew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. arXiv preprint arXiv:1802.05365, 2018.
242
+
243
+ Maxim Rabinovich, Mitchell Stern, and Dan Klein. Abstract syntax networks for code generation and semantic parsing. arXiv preprint arXiv:1704.07535, 2017.
244
+
245
+ Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving language understanding by generative pre-training. URL https://s3-us-west-2. amazonaws. com/openaiassets/researchcovers/languageunsupervised/language understanding paper. pdf, 2018.
246
+
247
+ Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv preprint arXiv:1910.10683, 2019.
248
+
249
+ Jeffrey Svajlenko, Judith F Islam, Iman Keivanloo, Chanchal K Roy, and Mohammad Mamun Mia. Towards a big data curated benchmark of inter-project code clones. In 2014 IEEE International Conference on Software Maintenance and Evolution, pp. 476–480. IEEE, 2014.
250
+
251
+ Alexey Svyatkovskiy, Shao Kun Deng, Shengyu Fu, and Neel Sundaresan. Intellicode compose: Code generation using transformer. arXiv preprint arXiv:2005.08025, 2020.
252
+
253
+ Michele Tufano, Cody Watson, Gabriele Bavota, Massimiliano Di Penta, Martin White, and Denys Poshyvanyk. An empirical study on learning bug-fixing patches in the wild via neural machine translation. ACM Transactions on Software Engineering and Methodology (TOSEM), 28(4):1–29, 2019.
254
+
255
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
256
+
257
+ Wenhan Wang, Ge Li, Bo Ma, Xin Xia, and Zhi Jin. Detecting code clones with graph neural networkand flow-augmented abstract syntax tree. arXiv preprint arXiv:2002.08653, 2020.
258
+
259
+ Huihui Wei and Ming Li. Supervised deep features for software functional clone detection by exploiting lexical and syntactical information in source code. In IJCAI, pp. 3034–3040, 2017.
260
+
261
+ Martin White, Michele Tufano, Christopher Vendome, and Denys Poshyvanyk. Deep learning code fragments for code clone detection. In 2016 31st IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 87–98. IEEE, 2016.
262
+
263
+ Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, and Quoc V Le. Xlnet: Generalized autoregressive pretraining for language understanding. arXiv preprint arXiv:1906.08237, 2019.
264
+
265
+ Pengcheng Yin and Graham Neubig. A syntactic neural model for general-purpose code generation. In The 55th Annual Meeting of the Association for Computational Linguistics (ACL), Vancouver, Canada, July 2017. URL https://arxiv.org/abs/1704.01696.
266
+
267
+ Jian Zhang, Xu Wang, Hongyu Zhang, Hailong Sun, Kaixuan Wang, and Xudong Liu. A novel neural source code representation based on abstract syntax tree. In 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE), pp. 783–794. IEEE, 2019.
268
+
269
+ # A PRE-TRAINING DETAILS
270
+
271
+ GraphCodeBERT includes 12 layers Transformer with 768 dimensional hidden states and 12 attention heads. For fair comparison, we use the same dataset as CodeBERT (Feng et al., 2020) to pretrain our model. The dataset is the CodeSearchNet dataset3 (Husain et al., 2019), which includes 2.3M functions with document pairs for six programming languages. We train the model on two DGX-2 machines, each having 16 NVIDIA Tesla V100 with 32GB memory. We set the max length of sequences and nodes as 512 and 128, respectively. We use the Adam optimizer to update model parameters with 1,024 batch size and 2e-4 learning rate. To accelerate the training process, we adopt the parameters of CodeBERT released by Feng et al. (2020) to initialize the model. The model is trained with 200K batches and costs about 83 hours.
272
+
273
+ At each iteration, we alternate EdgePred and NodeAlign objectives in combination with MLM to pre-train the model. And we follow Lample & Conneau (2019) to sample each batch from the same programming language according to a multinomial distribution with probabilities $\left\{ q _ { i } \right\} _ { i = 1 \ldots N }$ , where $n _ { i }$ is number of examples for $i$ -th programming language and $\alpha { = } 0 . 7$ . Sampling with this distribution could alleviates the bias towards high-resource languages.
274
+
275
+ $$
276
+ q _ { i } = \frac { p _ { i } ^ { \alpha } } { \sum _ { N } ^ { j = 1 } p _ { j } ^ { \alpha } } w i t h \ p _ { i } = \frac { n _ { i } } { \sum _ { N } ^ { k = 1 } n _ { k } }
277
+ $$
278
+
279
+ # B NATURAL LANGUAGE CODE SEARCH
280
+
281
+ Given a natural language as the input, code search aims to find the most semantically related code from a collection of candidate codes. We conduct experiments on the CodeSearchNet code corpus (Husain et al., 2019) and follow Husain et al. (2019) to take the first paragraph of the documentation as the query for the corresponding function. However, we observe that some queries contain content unrelated to the code, such as a link “http://...” that refers to external resources. Therefore, we filter following examples to improve the quality of the dataset.
282
+
283
+ (1) Examples whose code could not be parsed into abstract syntax tree.
284
+ (2) Examples whose query tokens number is shorter than 3 or larger than 256.
285
+ (3) Examples whose query contains special tokens such as “http://”.
286
+ (4) Examples whose query is empty or not written in English.
287
+
288
+ Different from the setting of Husain et al. (2019), the answer of each query is retrieved from the whole development and testing code corpus instead of 1,000 candidate codes. We list data statistics about the filtered dataset in Table 7.
289
+
290
+ <table><tr><td>CodeSearch</td><td>Training examples</td><td>Dev queries</td><td>Testing queries</td><td>Candidate codes</td></tr><tr><td>Go</td><td>167,288</td><td>7,325</td><td>8,122</td><td>28,120</td></tr><tr><td>Java</td><td>164,923</td><td>5,183</td><td>10,955</td><td>40,347</td></tr><tr><td>JavaScript</td><td>58,025</td><td>3,885</td><td>3,291</td><td>13,981</td></tr><tr><td>PHP</td><td>241,241</td><td>12,982</td><td>14,014</td><td>52.660</td></tr><tr><td>Python</td><td>251,820</td><td>13,914</td><td>14,918</td><td>43,827</td></tr><tr><td>Ruby</td><td>24,927</td><td>1,400</td><td>1,261</td><td>4,360</td></tr></table>
291
+
292
+ Table 7: Data statistics about the filtered dataset. For each query in the development and testing sets, the answer is retrieved from the whole candidate codes (i.e. the last row).
293
+
294
+ We use GraphCodeBERT to separately encode query and source code with data flow, and calculate inner product of their representations of the special token $[ C L S ]$ as relevance scores to rank candidate codes. In the fine-turning step, we set the learning rate as 2e-5, the batch size as 32, the max sequence length of queries and codes as 128 and 256, and the max number of nodes as 64. We use the Adam optimizer to update model parameters and perform early stopping on the development set.
295
+
296
+ We also report the results using the same setting of Husain et al. (2019) in Table 8. In this setting, models are required to retrieve an answer for a query from 1000 candidates. The results show that GraphCodeBERT also achieves the state-of-the-art performance.
297
+
298
+ <table><tr><td>model</td><td>Ruby</td><td>Javascript</td><td>Go</td><td>Python</td><td>Java</td><td>Php</td><td>Overall</td></tr><tr><td>NBow</td><td>0.429</td><td>0.461</td><td>0.641</td><td>0.581</td><td>0.514</td><td>0.484</td><td>0.518</td></tr><tr><td>CNN</td><td>0.245</td><td>0.352</td><td>0.627</td><td>0.571</td><td>0.527</td><td>0.529</td><td>0.475</td></tr><tr><td>BiRNN</td><td>0.084</td><td>0.153</td><td>0.452</td><td>0.321</td><td>0.287</td><td>0.251</td><td>0.258</td></tr><tr><td>selfAtt</td><td>0.365</td><td>0.451</td><td>0.681</td><td>0.692</td><td>0.587</td><td>0.601</td><td>0.563</td></tr><tr><td>RoBERTa</td><td>0.625</td><td>0.606</td><td>0.820</td><td>0.809</td><td>0.666</td><td>0.658</td><td>0.697</td></tr><tr><td>RoBERTa (code)</td><td>0.661</td><td>0.640</td><td>0.819</td><td>0.844</td><td>0.721</td><td>0.671</td><td>0.726</td></tr><tr><td>CodeBERT</td><td>0.693</td><td>0.706</td><td>0.840</td><td>0.869</td><td>0.748</td><td>0.706</td><td>0.760</td></tr><tr><td>GraphCodeBERT</td><td>0.732</td><td>0.711</td><td>0.841</td><td>0.879</td><td>0.757</td><td>0.725</td><td>0.774</td></tr></table>
299
+
300
+ Table 8: Results on natural language code search using the setting of Husain et al. (2019).
301
+
302
+ # C CODE CLONE DETECTION
303
+
304
+ Code clone detection aims to measure the similarity between two code fragments. We use BigCloneBench dataset (Svajlenko et al., 2014), which contains over 6,000,000 true clone pairs and 260,000 false clone pairs from 10 different functionalities. We follow the settings in Wei & Li (2017), discarding code fragments without any tagged true and false clone pairs and using 9,134 remaining code fragments. Finally, the dataset provided by Wang et al. (2020) includes 901,724/416,328/416,328 examples for training/validation/testing. We treat the task as a binary classification to fine-tune GraphCodeBERT, where we use source code and data flow as the input. The probability of true clone is calculated by dot product from the representation of $[ C L S ]$ . In the fine-turning step, we set the learning rate as 2e-5, the batch size as 16, the max sequence length as 512 the max number of nodes as 128. We use the Adam optimizer to update model parameters and tune hyper-parameters and perform early stopping on the development set.
305
+
306
+ We give a case of the GraphCodeBERT output for this task in Figure 6. In this example, two Java source codes both download content from a given URL and convert the type of the content into string type. Therefore, two codes are semantically similar since they output similar results when given the same input. As we can see, our model gives a high score for this case and the pair is classified as true clone pair.
307
+
308
+ # Input: Two source codes
309
+
310
+ # Output: Semantically similar (score: 0.983)
311
+
312
+ ![](images/71791da3e7f768c478bc6e65ea3008287655a4c68a31fcdfa4cdb7c71fa5ed4d.jpg)
313
+ Figure 6: A case of GraphCodeBERT output for the code clone detection task.
314
+
315
+ ![](images/2ca1b02463a5b63578134be75224499b32e166f2696616ebb60571bce08219a4.jpg)
316
+
317
+ # D CODE TRANSLATION
318
+
319
+ Code translation aims to migrate legacy software from one programming language in a platform to another. We conduct experiments on a dataset crawled from the same several open-source projects as Nguyen et al. (2015) and Chen et al. (2018), i.e. Lucene4, $\mathrm { P O I } ^ { 5 }$ , JGit6 and Antlr7. We do not use Itext8 and $\mathbf { J } \mathbf { T } \mathbf { S } ^ { 9 }$ as they do because of the license problem. Those projects have both Java and $\mathbf { C } \#$ implementation. We pair the methods in the two languages based on their file names and method names. After removing duplication and methods with null function body, the total number of method pairs is 11,800, and we split 500 pairs from them as the development set and another 1,000 pairs for test. To demonstrate the effectiveness of GraphCodeBERT on the task of code translation, we adopt various pre-trained models as encoders and stay hyperparameters consistent. We set the learning rate as 1e-4, the batch size as 32, the max sequence length as 256 and the max number of nodes as 64. We use the Adam optimizer to update model parameters and tune hyper-parameters and perform early stopping on the development set.
320
+
321
+ We give a case of the GraphCodeBERT output for this task in Figure 7. In this example, the model successfully translates a piece of Java code into its C# version. The differences include the type name (from “boolean” to “bool”) and the usage of getting a string value of a bool variable (from “String.valueOf(b)” to “b.ToString()”).
322
+
323
+ ![](images/3108f1bc9b8c6bab70eeda41059f782e1493bd262ec410832fa94940bd6be2cb.jpg)
324
+ Figure 7: A case of GraphCodeBERT output for the code translation task.
325
+
326
+ # E CODE REFINEMENT
327
+
328
+ Code refinement aims to automatically fix bugs in the code. We use the dataset released by Tufano et al. (2019). The source is buggy Java functions while the target is the according fixed ones. Almost all the names of variables and custom methods are normalized. The dataset contains two subsets based on the code length. For the small dataset, the numbers of training, development and test samples are 46,680, 5,835 and 5,835. For the medium dataset, the numbers are 52,364, 6,545 and 6,545. We also use the sequence-to-sequence Transformer model to conduct the experiments. In the fine-tuning step, we adopt various pre-trained models as encoders. We set the learning rate as 1e-4, the batch size as 32, the max sequence length as 256 and the max number of nodes as 64. We use the Adam optimizer to update model parameters and perform early stopping on the development set.
329
+
330
+ We give two cases of the GraphCodeBERT output for this task in Figure 8. In the first example, the model successfully fixes the operation bug (from “\*” to $" + "$ ) to match the function name “add”. In the second case, the source function and type names are normalized. The return type of this function is “void” but the buggy code gives a return value. Our model successfully removes the “return” word so that the return type of the function matches its declaration.
331
+
332
+ ![](images/144d7727faff9f8ffb980db73916f9c4de43918b232da3dece278be76b539761.jpg)
333
+ Figure 8: Two cases of GraphCodeBERT output for the code refinement task.
334
+
335
+ # F CASE STUDY
336
+
337
+ # F.1 NATURAL LANGUAGE CODE SEARCH
338
+
339
+ We give a case study to illustrate retrieved results by GraphCodeBERT on the natural language code search task, with a comparison to CodeBERT and RoBERTa (code) models. Two examples are given in Figure 9 and we can see that GraphCodeBERT successfully retrieves correct source codes for given queries on both examples. As we can see in the first case, incorporating data flow will help Graph-CodeBERT better understand the complicated expression $^ { \bullet \circ } [ ( \mathbf { k } , \mathbf { v } )$ for k, v in self.items() if v is not self.EMPTY]” by leveraging dependency relation among variables in data flow graph. In the second case, the terminology $\mathrm { ^ { 6 4 } \% \mathrm { Y } \mathrm { - } \mathcal { P } \mathrm { m } \mathrm { - } \mathcal { P } \mathrm { d } ^ { \mathrm { 3 } } }$ in Python program language is a format of date time. GraphCodeBERT and CodeBERT both successfully search the correct function. Compared with RoBERTa (code), the second case shows that utilizing natural language descriptions for pre-training helps models do better semantic matching between source codes and queries on the code search task.
340
+
341
+ # F.2 CODE CLONE DETECTION
342
+
343
+ We give a case study to compare GraphCodeBERT with CodeBERT and RoBERTa (code) models on code clone detection task. An example is shown in Figure 10. The first source code is to return the HTML content from a given URL, while the second source code is to return the last line from a fixed URL “http://kmttg.googlecode.com/svn/trunk/version”. Their semantics are not similar due to their different outputs. Data flow could help GraphCodeBERT better understand that the return value “pageHTML” in first source code comes from “pageHTML.append(line); pageHTML.append $( ^ { 6 6 } \backslash \mathbf { r } \backslash \mathbf { n } ^ { \prime 9 } )$ ;” instead of “bufferedWriter.write(pageHTML.toString());” and the return value “version” in the second source code comes from “version $=$ inputLine” or “version $=$ null;”. Although two source codes are highly overlapped (marked in yellow), GraphCodeBERT successfully predict the gold label compared with other models without data flow.
344
+
345
+ ![](images/8f176d9653a55040b3b9bd1bea2e1b8978fe085fff1cfa22e1ccc88af25bb9dd.jpg)
346
+ Figure 9: Two examples on code search task and retrieved results from different models.
347
+
348
+ ![](images/94bf11b7445190363333be5fa3b500b09ab57f428aecf6c86affa6b245528d79.jpg)
349
+ Figure 10: An examples on code clone detection task and model prediction from different models. Overlapped code snippets between two source codes are marked in yellow.
350
+
351
+ # F.3 CODE TRANSLATION AND CODE REFINEMENT
352
+
353
+ We give a case study to compare GraphCodeBERT with Transformer without using data flow on code generation tasks, including code translation and code refinement. We list three cases in Table 9 and Table 10, respectively. [src] represents the source input, [ref] represents the reference, [sys] represents Transformer without data flow and [ours] represents GraphCodeBERT. We can see that the Transformer ([sys]) baseline makes several mistakes, including repeating tokens, logic errors and syntax errors, while GraphCodeBERT ([ours]) as a encoder could improve the generation.
354
+
355
+ Table 9: Three examples that translate from Java to $\mathbf { C } \#$ programming language on code translation task. [src] represents the source input, [ref] represents the reference, [sys] represents Transformer without data flow and [ours] represents GraphCodeBERT.
356
+
357
+ <table><tr><td rowspan=1 colspan=2>Case1: Transformer outputs repeating tokens</td></tr><tr><td rowspan=1 colspan=1>[src]</td><td rowspan=1 colspan=1>public static final WeightedTerm[l getTerms(Query query){return getTerms(query,false);}</td></tr><tr><td rowspan=1 colspan=1>[ref]</td><td rowspan=1 colspan=1>public static WeightedTerm[] GetTerms(Query query){return GetTerms(query, false);}</td></tr><tr><td rowspan=1 colspan=1>[sys]</td><td rowspan=1 colspan=1>public static WeightedTerm[] GetTerms(Query query){return GetTerms(false, new staticstatic static static static static WeightTerms);}</td></tr><tr><td rowspan=1 colspan=1>[ours]</td><td rowspan=1 colspan=1>public static WeightedTerm[] GetTerms(Query query){return GetTerms(query, false);}</td></tr><tr><td rowspan=1 colspan=2>Case2: Transformer outputs codes with severe logic and syntax errors</td></tr><tr><td rowspan=1 colspan=1>[src]</td><td rowspan=1 colspan=1>public long skip(long n){int s = (int) Math.min(available(),Math.max(O,n);ptr += s;return s;}</td></tr><tr><td rowspan=1 colspan=1>[ref]</td><td rowspan=1 colspan=1>public override long Skip(long n){int s = (int)Math.Min(Available(), Math.Max(0, n));ptr += s;return s;}</td></tr><tr><td rowspan=1 colspan=1>[sys]</td><td rowspan=1 colspan=1>public override long Skip(long n){int s = Math.Min(n) == 0 ? Math.Min(00.0 :Math.Min(n, s.Length);return s;}</td></tr><tr><td rowspan=1 colspan=1>[ours]</td><td rowspan=1 colspan=1>public override long Skip(long n){int s = (int)Math.Min(Available(), Math.Max(O, n));ptr += s;return s;}</td></tr><tr><td rowspan=1 colspan=2>Case3: Transformer uses the wrong variable as a parameter.</td></tr><tr><td rowspan=1 colspan=1>[src]</td><td rowspan=1 colspan=1>public UnbufferedCharStream(int bufferSize){n = O;data = new int[bufferSize];}</td></tr><tr><td rowspan=1 colspan=1>[ref]</td><td rowspan=1 colspan=1>public UnbufferedCharStream(int bufferSize){n = O;data = new int[bufferSize];}</td></tr><tr><td rowspan=1 colspan=1>[sys]</td><td rowspan=1 colspan=1>public UnbufferedCharStream(int bufferSize){data = new int[data];}</td></tr><tr><td rowspan=1 colspan=1>[ours]</td><td rowspan=1 colspan=1>public UnbufferedCharStream(int bufferSize){n = O;data = new int[bufferSize];}</td></tr></table>
358
+
359
+ Table 10: Three examples on code refinement task. [src] represents the source input, [ref] represents the reference, [sys] represents Transformer without data flow and [ours] represents GraphCodeBERT.
360
+
361
+ <table><tr><td rowspan=1 colspan=2>Case1: Transformer adds redundant parameters (android.view.View view)</td></tr><tr><td rowspan=1 colspan=1>[src]</td><td rowspan=1 colspan=1>public void METHOD_1(){android.content.Intent VAR_1= new android.content.Intent(VAR_2);METHOD_2(VAR_1,0); android.content.Intent i= new android.content.Intent(this,VAR_3class);METHOD_3(i);}</td></tr><tr><td rowspan=1 colspan=1>[ref]</td><td rowspan=1 colspan=1>public void METHOD_1(){android.content.Intent VAR_1= new android.content.Intent(VAR_2);METHOD_2(VAR_1,0) ; }</td></tr><tr><td rowspan=1 colspan=1>[sys]</td><td rowspan=1 colspan=1>public void METHOD_1(android.view.View view){android.content.Intent VAR_1 =new android.content.Intent(VAR_2) ; METHOD_2(VAR_1,0);}</td></tr><tr><td rowspan=1 colspan=1>[ours]</td><td rowspan=1 colspan=1>public void METHOD_1(){android.content.Intent VAR_1= new android.content.Intent(VAR_2);METHOD_2(VAR_1,0) ; }</td></tr><tr><td rowspan=1 colspan=2>Case2: Transformer outputs codes with severe logic or irrelevant codes</td></tr><tr><td rowspan=1 colspan=1>[src]</td><td rowspan=1 colspan=1>public java.util.Date METHOD_1(){return VAR_1.METHOD_1() .METHOD_2() ; }</td></tr><tr><td rowspan=1 colspan=1>[ref]</td><td rowspan=1 colspan=1>public java.util.Date METHOD_1(){ if((VAR_1.METHOD_1)) != null){return VAR_1.METHOD_1().METHOD_2();} else{return null;}}</td></tr><tr><td rowspan=1 colspan=1>[sys]</td><td rowspan=1 colspan=1>public java.util.Date METHOD_1(){if((VAR_1)== null){ return new java.util.Date(); } return VAR_1. METHOD_1() . METHOD.2();}</td></tr><tr><td rowspan=1 colspan=1>[ours]</td><td rowspan=1 colspan=1>public java.util.Date METHOD_1(){if((VAR_1.METHOD_1()) != null){return VAR_1.METHOD_1().METHOD_2();} else{return null ;}}</td></tr><tr><td rowspan=1 colspan=2>Case3: Transformer makes no change</td></tr><tr><td rowspan=1 colspan=1>[src]</td><td rowspan=1 colspan=1>public java.lang.String METHOD_1(TYPE_1 VAR_1){if(VAR_1== null) return null;return VAR_1.METHOD_2() . getText();}</td></tr><tr><td rowspan=1 colspan=1>[ref]</td><td rowspan=1 colspan=1>public java.lang.String METHOD_1(TYPE_1 VAR_1){return VAR_1.METHOD_2().getText();}</td></tr><tr><td rowspan=1 colspan=1>[sys]</td><td rowspan=1 colspan=1>public java.lang.String METHOD_1(TYPE_1 VAR_1) { if(VAR_1 == null) return null;return VAR_1.METHOD_2() . getText();}</td></tr><tr><td rowspan=1 colspan=1>[ours]</td><td rowspan=1 colspan=1>public java.lang.String METHOD_1(TYPE_1 VAR_1){ return VAR_1. METHOD_2().getText() ;}</td></tr></table>
362
+
363
+ # G ERROR ANALYSIS
364
+
365
+ We also conduct error analysis and summary two main classes of errors for both code understanding and generation tasks.
366
+
367
+ Figure 11 gives three error cases of GraphCodeBERT on the natural language code search task. We observe that GraphCodeBERR mainly fails to retrieve those source code that involves functions of the library like “tf” (Tensorflow) in the first case and “ GoogleCloudStorageHook” in the second case. It’s difficult for GraphCodeBERR to understand meanings of APIs like “tf.io.read file” and “tf.image.decode image” without relevant information. A potential direction to mitigate the problem is to incorporate definitions of the library. The other major problem is that there are some terminologies like “unistr” in the query (corresponding to “decode(‘utf-8’)” in Python code) in third case. Incorporating more text-code pairs for pre-training might alleviate this problem.
368
+
369
+ As for the code generation task, Table 11 shows two cases of GraphCodeBERT on the code translation task. We find that the major problems include semantic errors like identifiers from nowhere in the first case and syntax errors like missing a “}” symbol before “return n” in the second case. This problem might be mitigated by incorporating a dedicated decoder that takes into account grammar of programming languages and different generation paradigm like generating a sequence of production rules (Yin & Neubig, 2017; Guo et al., 2018; 2019) in a context-free grammar manner.
370
+
371
+ ![](images/903dfd890d71e5c3e4cdd8c112c870ca8fc279ec3ac9fb61afc8cda06442e85d.jpg)
372
+ Figure 11: Error cases of GraphCodeBERT on the natural language code search.
373
+
374
+ Table 11: Error cases of GraphCodeBERT on the code translation task. [src] represents the source input, [ref] represents the reference and [ours] represents GraphCodeBERT.
375
+
376
+ <table><tr><td rowspan=1 colspan=2>Casel: semantic error-identifiers from nowhere.</td></tr><tr><td rowspan=1 colspan=1>[src]</td><td rowspan=1 colspan=1> public String toString( {return getKey( +“: ” + getValue(); }</td></tr><tr><td rowspan=1 colspan=1>[ref]</td><td rowspan=1 colspan=1>public override string ToStringO{return GetKey( +“:”+ GetValue(;}</td></tr><tr><td rowspan=1 colspan=1>[ours]</td><td rowspan=1 colspan=1>public override string ToStringO{return Name + “: ”+ GetValue();}</td></tr><tr><td rowspan=1 colspan=2>Case2: syntax errors -missing a“}” before “return n&quot;)</td></tr><tr><td rowspan=1 colspan=1>[src]</td><td rowspan=1 colspan=1>public static int numNonnul(Object[] data) {int n = O;if(data == null ) return n;for(Object o :data) {if(o!=null) n++;}return n;}</td></tr><tr><td rowspan=1 colspan=1>[ref]</td><td rowspan=1 colspan=1>public static int NumNonnull(object[] data){int n = O;if (data == null){return n;}foreach (object o in data){if (o != null){n++;}}return n;}</td></tr><tr><td rowspan=1 colspan=1>[ours]</td><td rowspan=1 colspan=1>public static int NumNonNull(object[] data){int n = O;if (data == null){return n;}foreach (object o in data){if (o != nul){n++;}return n;}</td></tr></table>
parse/train/jLoC4ez43PZ/jLoC4ez43PZ_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/jLoC4ez43PZ/jLoC4ez43PZ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/jLoC4ez43PZ/jLoC4ez43PZ_model.json ADDED
The diff for this file is too large to render. See raw diff